CN114708138B - Network disk image watermark adding method and device, network disk and storage medium - Google Patents

Network disk image watermark adding method and device, network disk and storage medium Download PDF

Info

Publication number
CN114708138B
CN114708138B CN202210626939.3A CN202210626939A CN114708138B CN 114708138 B CN114708138 B CN 114708138B CN 202210626939 A CN202210626939 A CN 202210626939A CN 114708138 B CN114708138 B CN 114708138B
Authority
CN
China
Prior art keywords
watermark
network disk
information
determining
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210626939.3A
Other languages
Chinese (zh)
Other versions
CN114708138A (en
Inventor
冉宪昆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tianjin Lenovo Collaboration Technology Inc
Original Assignee
Tianjin Lenovo Collaboration Technology Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tianjin Lenovo Collaboration Technology Inc filed Critical Tianjin Lenovo Collaboration Technology Inc
Priority to CN202210626939.3A priority Critical patent/CN114708138B/en
Publication of CN114708138A publication Critical patent/CN114708138A/en
Application granted granted Critical
Publication of CN114708138B publication Critical patent/CN114708138B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0021Image watermarking

Abstract

The embodiment of the invention discloses a method and a device for adding a network disk image watermark, a network disk and a storage medium. Wherein the method comprises the following steps: receiving a preview request of a network disk image, and calculating the information intensity of the network disk image according to the preview request; when the information intensity exceeds a preset information intensity threshold value, acquiring the hierarchy of a preview requester in a network disk organization framework according to the preview request; determining the number of added watermarks and the type of the watermarks according to the hierarchy; determining an information dense area according to the color distribution of the network disk image, and determining a watermark adding position according to the watermark adding quantity and the information dense area; and loading the watermark for the network disk image according to the watermark adding position and the watermark type. The security of the network disk image is guaranteed, and meanwhile, the complex watermark is rapidly added without consuming more network disk computing power. And further, the use experience of previewing the network disk image by the user is improved.

Description

Network disk image watermark adding method and device, network disk and storage medium
Technical Field
The embodiment of the invention relates to the technical field of network disks, in particular to a method and a device for adding a network disk image watermark, a network disk and a storage medium.
Background
The network disk is an online storage service released by internet companies. The network disk system machine room divides a certain disk space for users, provides file management functions such as storage, access, backup and sharing of files for the users free or charged, and has high-level disaster recovery backup all over the world. The user can see the network disk as a hard disk or a U disk placed on the network, whether in home, a unit or anywhere else, and can manage and edit the files in the network disk by connecting to the Internet. The portable type solar water heater is not required to be carried about and is not afraid of being lost.
In the network disk, in order to indicate the importance or confidentiality of the image in the document in the network disk or the network disk image, a watermark is usually added to the network disk. At present, watermarks are classified into text watermarks and picture watermarks. Text watermarks are commonly used in the commercial world to alert the reader that the document is copyrighted and that others cannot copy or use it free.
In the process of implementing the invention, the inventor finds the following technical problems: some network disk users can eliminate the watermark through the screenshot mode and then through the existing image processing software tools such as PS, and the like, so that the secret leakage is caused. Although the situation can be prevented by adopting more watermarks, on one hand, the readability of the network disk image in the preview process is reduced, and on the other hand, if more watermarks are added, the network disk image inevitably needs to occupy larger network disk calculation power, so that the performance of the network disk is influenced, and the experience of a user in using the network disk is further reduced.
Disclosure of Invention
The embodiment of the invention provides a method and a device for adding a network disk image watermark, a network disk and a storage medium, which aim to solve the technical problem that the experience of previewing the network disk image by a user is poor due to watermark protection of the network disk image in the prior art.
In a first aspect, an embodiment of the present invention provides a method for adding a watermark to a network disk image, including:
receiving a preview request of a network disk image, and calculating the information intensity of the network disk image according to the preview request;
when the information intensity exceeds a preset information intensity threshold value, acquiring the hierarchy of a preview requester in a network disk organization framework according to the preview request;
determining the number of added watermarks and the type of the watermarks according to the hierarchy;
determining an information dense area according to the color distribution of the network disk image, and determining a watermark adding position according to the watermark adding quantity and the information dense area;
and loading the watermark for the network disk image according to the watermark adding position and the watermark type.
In a second aspect, an embodiment of the present invention further provides a network disk image watermarking apparatus, including:
the receiving module is used for receiving a preview request of the network disk image and calculating the information intensity of the network disk image according to the preview request;
the acquisition module is used for acquiring the hierarchy of the preview requester in the network disk organization framework according to the preview request when the information intensity exceeds a preset information intensity threshold;
the determining module is used for determining the number of added watermarks and the type of the watermarks according to the hierarchy;
the adding position determining module is used for determining an information dense area according to the color distribution of the network disk image and determining a watermark adding position according to the watermark adding quantity and the information dense area;
and the adding module is used for loading the watermark for the network disk image according to the watermark adding position and the watermark type.
In a third aspect, an embodiment of the present invention further provides a network disk, including:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the method for watermarking a web disk image as provided in the above embodiments.
In a fourth aspect, the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform the method for watermarking a web disk image as provided in the foregoing embodiments.
According to the method, the device, the network disk and the storage medium for adding the network disk image watermark, which are provided by the embodiment of the invention, the preview request of the network disk image is received, and the information intensity of the network disk image is calculated according to the preview request; when the information intensity exceeds a preset information intensity threshold value, acquiring the hierarchy of a preview requester in a network disk organization framework according to the preview request; determining the number of added watermarks and the type of the watermarks according to the hierarchy; determining an information dense area according to the color distribution of the network disk image, and determining a watermark adding position according to the watermark adding quantity and the information dense area; and loading the watermark for the network disk image according to the watermark adding position and the watermark type. The possibility of divulgence can be judged according to the level of the preview user, and the density of the document is adjusted according to the possibility of divulgence, so that the complex watermark can be added to the document after the density adjustment. The method can realize that the added complex watermark is difficult to be removed, thereby ensuring the security of the network disk image and realizing the rapid addition of the complex watermark without consuming more network disk computing power. And further, the use experience of previewing the network disk image by the user is improved.
Drawings
Other features, objects and advantages of the invention will become more apparent upon reading of the detailed description of non-limiting embodiments made with reference to the following drawings:
fig. 1 is a flowchart of a method for watermarking a network disk image according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for watermarking a network disk image according to a second embodiment of the present invention;
fig. 3 is a flowchart of a method for watermarking a network disk image according to a third embodiment of the present invention;
fig. 4 is a flowchart of a method for watermarking a network disk image according to a fourth embodiment of the present invention;
fig. 5 is a structural diagram of a network disk image watermarking device according to a fifth embodiment of the present invention;
fig. 6 is a structural diagram of a mesh disk according to a sixth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a method for adding a watermark to a network disk image according to an embodiment of the present invention, where the embodiment is applicable to a situation where a complex watermark is added to a network disk image previewed by a user to ensure document security, and the method may be executed by a network disk image watermark adding apparatus, and specifically includes the following steps:
and step 110, receiving a preview request of the network disk image, and calculating the information intensity of the network disk image according to the preview request.
In this embodiment, the request for obtaining a preview of a network disk image may include: acquiring a preview request of an image in a network disk; and a preview request for acquiring a document of which the network disk contains the embedded image. The corresponding screen image may include: image files and images in documents. The network disk may provide image and document preview services to the user. The user can select the image files and the images in the documents to preview at the network disk client or the network disk WEB page. And the network disk acquires a preview request of the network disk image according to the preview selection operation of the user. After the network disk obtains the preview request, the network disk can load the watermark to the previewed document and display the document loaded with the watermark to the user.
In the present embodiment, the image elements may refer to various objects included in the image. The number and distribution of image elements in different images are the same, and generally, the image with more elements fully reflects the composition thought of the creator, so that the image has copyright protection and authentication values, and on the contrary, if the image is single, the copyright protection and authentication values are lower. Therefore, it is necessary to first determine whether the network disk image has copyright protection and authentication value, and then determine whether the watermark needs to be added.
Optionally, the calculating the information density of the web disk image according to the preview request may include: performing Fourier transform on the network disk image to obtain a spectrogram of the network disk image; and acquiring a high-frequency component in the spectrogram, and determining the information intensity of the network disk image according to the high-frequency component.
Since the low frequency components in the image spectrogram can be used to characterize the image intensity, i.e. represent the areas of the image where the brightness or gray value changes slowly, i.e. the large flat areas of the image, the main part of the image is described. The high frequency components correspond to portions of the image where the change is severe, i.e., edges (contours) and detailed portions of the image.
Therefore, the number of elements in the screen image can be determined by the high frequency component in the spectrogram. Thereby determining information intensity. Alternatively, the number of high frequency components may be taken as the information density.
And 120, when the information intensity exceeds a preset information intensity threshold value, acquiring the hierarchy of the preview requester in the network disk organization structure according to the preview request.
The watermark is usually removed in a manner that the watermark is subtracted according to the nearby color after being selected by an image processing software tool in an area with a single background content. Therefore, to enhance the difficulty of removing the watermark, a region with complex background content is usually selected to add the watermark. If the background content is complex, the addition of too many watermarks not only requires more calculation power, but also affects the preview experience. Thus, in the present embodiment, upon exceeding the information intensity threshold, the hierarchy of the preview requester in the trawl organization is first determined.
For example, the divulgence probability of the user who sends the preview request of the network disk image can be determined according to the position of the organization structure in the network disk corresponding to the user. Generally, users at lower levels in an organizational structure are at a higher risk of compromise, while users at higher levels are at a lower risk of compromise. The image to be previewed can be correspondingly processed according to the probability of possible disclosure of the current user, so that the disclosure is avoided, and the computation load for loading the watermark can be reduced.
And step 130, determining the adding quantity of the watermarks and the type of the watermarks according to the hierarchy.
Since there are many image elements, there are many areas to which watermarks can be added. Therefore, after the hierarchy is determined, the possibility of disclosure thereof can be considered, and the watermarking quantity can be further determined. For a higher level preview requestor, it is contemplated to add a small number of watermarks. Conversely, for a hierarchically lower preview requestor, it is contemplated that more watermarks may be added.
Also, the type of watermark is a factor to be considered. In this embodiment, the watermark types may include: rich information watermarks and simple information watermarks. In particular, the rich-information watermark may include: the detailed information of the net disk image in the net disk comprises the following steps: uploading people, uploading time and attribute information, and relevant information of a preview request, including: the time when the preview request is issued, the name of the user of the preview requester, etc. Whereas a simple information watermark may include only: information about the preview request.
Correspondingly, for the preview requester with a higher hierarchy, simple information watermarking can be adopted. For the preview requesters with lower levels, complex information watermarks can be adopted.
And step 140, determining an information-dense area according to the color distribution of the screen disk image, and determining a watermark adding position according to the watermark adding quantity and the information-dense area.
In this embodiment, the information dense region may be an edge region of the image element in the screen disc, and there may be a large difference in RGB values of pixels at both ends of the edge region. Therefore, it can be an information dense area. And adding the watermark in the information dense area can increase the difficulty of removing the watermark by an image processing tool.
In this embodiment, the information dense region may be determined using an existing pixel color comparison method. And randomly selecting an information-dense area according to the determined number and type of the watermarks to add the watermarks. The method can improve the safety of the network disk image under the condition of reducing the calculation force as much as possible.
And 150, loading the watermark for the network disk image according to the watermark adding position and the watermark type.
After the watermark adding position and the watermark type are determined, the watermark corresponding to the watermark type is added to the watermark adding position by using a watermark loading tool.
In the embodiment, by receiving a preview request of a network disk image, the information intensity of the network disk image is calculated according to the preview request; when the information intensity exceeds a preset information intensity threshold, acquiring the hierarchy of a preview requester in a network disk organizational structure according to the preview request; determining the number of added watermarks and the type of the watermarks according to the hierarchy; determining an information dense area according to the color distribution of the network disk image, and determining a watermark adding position according to the watermark adding quantity and the information dense area; and loading the watermark for the network disk image according to the watermark adding position and the watermark type. The method can judge the possibility of divulgence according to the level of the preview user, and carry out density adjustment on the document according to the possibility of divulgence, thereby being convenient for quickly adding complex watermarks to the document after density adjustment. The added complex watermark can be removed difficultly, so that the security of the network disk image is ensured, and the complex watermark can be rapidly added without consuming more network disk computing power. And further, the use experience of previewing the network disk image by the user is improved.
In a preferred embodiment of this embodiment, the method may further include the following steps: when the information density does not exceed a preset information density threshold, determining an information dense area according to the color distribution of the net disk image; determining the watermark type and the watermark adding position according to the information dense area; and loading the watermark for the network disk image according to the watermark adding position and the watermark type. For images with few elements, an information dense area can be determined firstly, the watermark type and the watermark adding position can be selected according to the area size of the information dense area, and due to the fact that the elements are few, when the area price of the information dense area is large, a large watermark can be selected, namely watermark information is enriched, the watermark loading amount is reduced, and preview experience cannot be visually influenced. Meanwhile, the security of the network disk image can be ensured.
Example two
Fig. 2 is a flowchart of a method for watermarking a network disk image according to a second embodiment of the present invention. In this embodiment, the information density of the network disk image calculated according to the preview request is specifically optimized as follows: dividing the screen disk image into a plurality of subblocks with the same size according to the size of the screen disk image; calculating an average color value of each sub-block; determining an information dense region according to the difference value of the average color values of each adjacent sub-block; and determining the information density of the network disk image according to the number of the information-dense areas. And the dividing the screen disk image into a plurality of sub-blocks with the same size according to the size of the screen disk image can be further optimized as follows: acquiring the hierarchy of the preview requester in a network disk organization structure; determining a size of the sub-block according to the hierarchy.
Correspondingly, the method for adding the watermark to the network disk image provided by the embodiment specifically includes:
step 210, receiving a preview request of a network disk image, acquiring a hierarchy of a preview requester in a network disk organization structure, dividing the network disk image into a plurality of subblocks with the same size according to the size of the network disk image, and determining the size of the subblock according to the hierarchy.
Because the high-frequency components of the images of the screen discs obtained by adopting Fourier transform are easily interfered by noise, especially for the images with poor quality, errors can easily occur in the information density of the calculated images. Meanwhile, the information dense area of the screen image needs to be determined according to the image pixels in the subsequent process. Therefore, in the present embodiment, the information density of the image is determined by the block comparison. For example, the size of the sub-block may be determined according to the size of the screen image, and the screen image may be divided into a plurality of sub-blocks with the same size. Ensure the same size and no misses.
Too large a block will result in less number of the dense areas of the post-determination image, while too small a block will significantly increase the amount of computation, so in this embodiment, the size of the block can be determined according to the hierarchy. Based on the characteristic that the preview applicant with higher grade has lower possibility of divulging a secret, the size of the block can be determined according to the grade. The higher the level, the larger the chunking may be, and conversely, the lower the level, the smaller the chunking. Alternatively, the proportional relationship between each level and the image size may be preset, and the size of the sub-block may be determined according to the hierarchy.
Step 220, calculating the average color value of each sub-block.
For example, the average color value of all pixel points in each sub-block can be calculated.
And step 230, determining an information dense area according to the difference value of the average color values of each adjacent sub-block.
And comparing the average color values of the adjacent sub-blocks, and determining that the difference value between the average color values of the adjacent sub-blocks is an information dense area when the difference value exceeds a preset difference value threshold.
And 240, determining the information density of the network disk image according to the number of the information-dense areas.
And counting the number of the information dense areas, and determining the information density of the network disk image according to the number.
And step 250, when the information intensity exceeds a preset information intensity threshold value, acquiring the hierarchy of the preview requester in the network disk organization structure according to the preview request.
And step 260, determining the adding quantity of the watermarks and the type of the watermarks according to the hierarchy.
And step 270, determining the watermark adding position according to the watermark adding quantity and the information dense area.
And step 280, loading the watermark for the network disk image according to the watermark adding position and the watermark type.
In this embodiment, the calculating the information density of the network disk image according to the preview request is specifically optimized as follows: dividing the net disk image into a plurality of sub-blocks with the same size according to the size of the net disk image; calculating an average color value of each sub-block; determining an information dense area according to the difference value of the average color values of each adjacent sub-block; and determining the information density of the network disk image according to the number of the information-dense areas. And the dividing the screen disk image into a plurality of sub-blocks with the same size according to the size of the screen disk image can be further optimized as follows: acquiring the hierarchy of the preview applicant in a network disk organization structure; determining a size of the sub-block according to the hierarchy. The accuracy of calculating the image information density can be improved under the condition of poor image quality. And the block size can be optimized according to the possibility of disclosure, the computation force of adding the watermark is reduced as much as possible on the premise of ensuring the security of the network disk image, and the experience of a user for reading the network disk image is improved.
EXAMPLE III
Fig. 3 is a flowchart of a method for adding a watermark to a network disk image according to a third embodiment of the present invention. In this embodiment, the determining an information dense area according to the color distribution of the screen disc image is specifically optimized as follows: inputting the net disk image into a trained target detection neural network, and acquiring an image element coordinate output result; and determining an information dense area based on the coordinate position of the object element in the output result.
Correspondingly, the method for adding the network disk image watermark provided by the embodiment specifically includes:
and 310, receiving a preview request of the network disk image, and calculating the information intensity of the network disk image according to the preview request.
And step 320, when the information intensity exceeds a preset information intensity threshold, acquiring the hierarchy of the preview requester in the network disk organization framework according to the preview request.
And step 330, determining the number of added watermarks and the type of the watermarks according to the hierarchy.
And 340, inputting the net disk image into the trained target detection neural network, and acquiring an image element coordinate output result.
And finding out which objects and corresponding positions exist in the image by the trained target detection neural network. And acquiring the object coordinates by using the target detection neural network. Which can output which image elements are present in the image and their corresponding coordinate ranges.
And 350, determining an information dense area based on the coordinate position of the object element in the output result.
Accordingly, the information dense region may be based on the boundary position in the image element.
And step 360, determining the watermark adding position according to the watermark adding quantity and the information dense area.
And step 370, loading the watermark for the network disk image according to the watermark adding position and the watermark type.
In this embodiment, the determining of the information dense region according to the color distribution of the screen disk image is specifically optimized as follows: inputting the net disk image into a trained target detection neural network, and acquiring an image element coordinate output result; and determining an information dense area based on the coordinate position of the object element in the output result. When the information density is judged by adopting the high-frequency component, the boundary area of the image elements can be determined by utilizing the coordinate range output by the target detection neural network and the corresponding object, and the boundary area is used as the information density area. The method can quickly and accurately determine the information dense area in the network disk image, and effectively improve the loading speed of the network disk image watermark.
Example four
Fig. 4 is a flowchart of a method for adding a watermark to a network disk image according to a fourth embodiment of the present invention. In this embodiment, the watermark type is specifically optimized as follows: complex color watermarks and simple color watermarks; correspondingly, the number of added watermarks and the type of the watermarks are determined according to the hierarchy, and the method is specifically optimized as follows: when the level is smaller than a preset level threshold value, determining that the watermark type is a complex color watermark; accordingly, the complex color watermark is generated by: setting a reference color group according to the color of the edge of the image element in the information dense area, wherein the colors at two ends of the reference color group are the colors at two sides of the edge of the element respectively; and setting other colors in the reference color group according to the colors on the two sides of the element edge so as to enable the gray scale of the other colors to be increased or decreased, adjusting the color of the watermark according to the color of the reference color group, and generating the complex color watermark. And optimizing the loading of the watermark for the network disk image according to the watermark adding position and the watermark type as follows: and placing the color with the maximum difference from the element in the complex color watermark into the element.
Correspondingly, the method for adding the watermark to the network disk image provided by the embodiment specifically includes:
step 410, receiving a preview request of the network disk image, and calculating the information density of the network disk image according to the preview request.
And step 420, when the information intensity exceeds a preset information intensity threshold value, acquiring the hierarchy of the preview requester in the network disk organization framework according to the preview request.
And 430, determining the number of added watermarks according to the hierarchy, determining the watermark type as the complex color watermark when the hierarchy is smaller than a preset hierarchy threshold value, and determining the number of added watermarks according to the hierarchy.
When the watermark is removed by the image modifying software, the principle is that the watermark is removed according to the contrast difference. Therefore, the color of the watermark should be as consistent as possible with the elements in the image, reducing contrast differences. Therefore, in this embodiment, the difficulty of removing the watermark can be increased without affecting the preview effect by setting the watermark color. Thus, at lower levels, where there is some potential for compromise, complex color watermarks may be employed. The colors in the complex color watermark are closer to the colors of the image elements at the position where the watermark is loaded, so that the difficulty in removing the watermark is further enhanced.
And step 440, determining an information-dense area according to the color distribution of the screen disc image, and determining a watermark adding position according to the watermark adding quantity and the information-dense area.
And step 450, loading the complex color watermark into the network disk image according to the watermark adding position. And putting the color which is the most different from the element in the complex color watermark into the element.
After the watermark adding position is determined, the color of the corresponding adjacent image element can be determined. And complex color watermarks can be set for diffraction of image elements. Illustratively, the complex color watermark is generated by: setting a reference color group according to the colors of the edges of the image elements in the information dense area, wherein the colors at two ends of the reference color group are the colors at two sides of the edges of the elements respectively; setting other colors in the reference color group according to the colors on two sides of the element edge, so that the gray scales of the other colors are increased or decreased; and adjusting the color of the watermark according to the color of the reference color group to generate the complex color watermark. By the method, the watermark with complex color is closer to the image element color of the watermark adding position, and the difficulty in removing the watermark is increased.
Optionally, the color with the largest difference from the element in the complex color watermark is placed in the element, so that at the boundary of the image elements, each element is embedded with the watermark of the color of the other element. By the method, the outline is mixed, the element expression in the image is not influenced, a previewer can clearly know the content of the network disk image, and the influence of adding the watermark on the preview is reduced.
The present embodiment specifically optimizes the watermark type as: complex color watermarks and simple color watermarks; correspondingly, the number of added watermarks and the type of the watermarks are determined according to the hierarchy, and the method is specifically optimized as follows: when the level is smaller than a preset level threshold value, determining that the watermark type is a complex color watermark; accordingly, the complex color watermark is generated by: setting a reference color group according to the color of the edge of the image element in the information dense area, wherein the colors at two ends of the reference color group are the colors at two sides of the edge of the element respectively; and setting other colors in the reference color group according to the colors on the two sides of the element edge so as to enable the gray scale of the other colors to be increased or decreased, adjusting the color of the watermark according to the color of the reference color group, and generating the complex color watermark. And optimizing the loading of the watermark for the network disk image according to the watermark adding position and the watermark type as follows: and placing the color with the maximum difference from the element in the complex color watermark into the element. It is possible to have each element embed a watermark of the color of the other at the boundary of the image elements. By the method, the outline is mixed, the element expression in the image is not influenced, a previewer can clearly know the content of the network disk image, and the influence of adding the watermark on the preview is reduced.
EXAMPLE five
Fig. 5 is a structural diagram of a network disk image watermarking apparatus according to a fifth embodiment of the present invention, and as shown in fig. 5, the apparatus includes:
a receiving module 510, configured to receive a preview request of a network disk image, and calculate information intensity of the network disk image according to the preview request;
an obtaining module 520, configured to obtain, according to the preview request, a hierarchy of a preview requester in a network disk organization framework when the information density exceeds a preset information density threshold;
a determining module 530, configured to determine, according to the hierarchy, an adding number of watermarks and a type of the watermarks;
an adding position determining module 540, configured to determine an information dense region according to color distribution of the network disk image, and determine a watermark adding position according to the number of added watermarks and the information dense region;
and an adding module 550, configured to load a watermark for the network disk image according to the watermark adding position and the watermark type.
The network disk image watermarking device provided by the embodiment calculates the information intensity of the network disk image according to the preview request by receiving the preview request of the network disk image; when the information intensity exceeds a preset information intensity threshold value, acquiring the hierarchy of a preview requester in a network disk organization framework according to the preview request; determining the number of added watermarks and the type of the watermarks according to the hierarchy; determining an information dense area according to the color distribution of the network disk image, and determining a watermark adding position according to the watermark adding quantity and the information dense area; and loading the watermark for the network disk image according to the watermark adding position and the watermark type. The method can judge the possibility of divulgence according to the level of the preview user, and carry out density adjustment on the document according to the possibility of divulgence, thereby being convenient for quickly adding complex watermarks to the document after density adjustment. The added complex watermark can be removed difficultly, so that the security of the network disk image is ensured, and the complex watermark can be rapidly added without consuming more network disk computing power. And further, the use experience of previewing the network disk image by the user is improved.
On the basis of the foregoing embodiments, the receiving module includes:
the image receiving module is used for receiving a preview request of the image in the network disk; and the embedded image receiving module is used for receiving a preview request of a document of which the network disk contains the embedded image.
On the basis of the above embodiments, the apparatus further includes:
the information dense area determining module is used for determining the information dense area according to the color distribution of the screen disc image when the information density does not exceed a preset information density threshold;
the watermark adding information determining module is used for determining the type and the adding position of the watermark according to the information dense area;
and the loading module is used for loading the watermark for the network disk image according to the watermark adding position and the watermark type.
On the basis of the foregoing embodiments, the receiving module includes:
the transformation unit is used for carrying out Fourier transformation on the net disk image to obtain a spectrogram of the net disk image;
and the information intensity determining unit is used for acquiring the high-frequency component in the spectrogram and determining the information intensity of the screen disk image according to the high-frequency component.
On the basis of the foregoing embodiments, the receiving module includes:
the dividing unit is used for dividing the screen disc image into a plurality of sub-blocks with the same size according to the size of the screen disc image;
a calculating unit for calculating an average color value of each sub-block;
the dense area determining unit is used for determining an information dense area according to the difference value of the average color values of each adjacent sub-block;
and the density determining unit is used for determining the information density of the screen disk image according to the number of the information-dense areas.
On the basis of the foregoing embodiments, the dividing unit further includes:
the hierarchy acquisition unit is used for acquiring the hierarchy of the preview requester in the network disk organization structure;
a size determining subunit, configured to determine a size of the sub-block according to the hierarchy.
On the basis of the above embodiments, the adding position determining module includes:
the input unit is used for inputting the net disk image into a trained target detection neural network and acquiring an image element coordinate output result;
and a coordinate position determination unit for determining the information dense region based on the coordinate position of the object element in the output result.
On the basis of the above embodiments, the watermark types include: complex color watermarks and simple color watermarks;
correspondingly, the determining module comprises:
a complex color watermark determining unit, configured to determine that the watermark type is a complex color watermark when the level is smaller than a preset level threshold, where the complex color watermark is generated in the following manner:
setting a reference color group according to the color of the edge of the image element in the information dense area, wherein the colors at two ends of the reference color group are the colors at two sides of the edge of the element respectively;
setting other colors in the reference color group according to the colors on two sides of the element edge, so that the gray scales of the other colors are increased or decreased;
and adjusting the color of the watermark according to the color of the reference color group to generate the complex color watermark.
On the basis of the foregoing embodiments, the watermark types further include: the tilt angle of the watermark;
correspondingly, the adding module comprises:
and the embedding unit is used for embedding the color with the maximum difference with the element in the complex color watermark into the element.
The network disk image watermark adding device provided by the embodiment of the invention can execute the network disk image watermark adding method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
EXAMPLE six
Fig. 6 is a structural diagram of a mesh tray according to a sixth embodiment of the present invention. Fig. 6 shows a block diagram of an exemplary mesh disk 12 suitable for use in implementing embodiments of the present invention. The mesh tray 12 shown in fig. 6 is only an example, and should not bring any limitation to the function and the use range of the embodiment of the present invention.
As shown in fig. 6, the network disk 12 is in the form of a general purpose computing device. The components of the mesh tray 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
The mesh tray 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by the network disk 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 30 and/or cache 32. The network disk 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 6, commonly referred to as a "hard drive"). Although not shown in FIG. 6, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. System memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28, such program modules 42 including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination of which may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of embodiments of the invention as described.
The network disk 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with the network disk 12, and/or with any devices (e.g., network card, modem, etc.) that enable the network disk 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, the network disk 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via the network adapter 20. As shown, the network adapter 20 communicates with the other modules of the network disk 12 via the bus 18. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the network disk 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 16 executes programs stored in the system memory 28 to execute various functional applications and data processing, for example, to implement the method for watermarking a network disk image according to the embodiment of the present invention.
EXAMPLE seven
The seventh embodiment of the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform any one of the foregoing methods for watermarking a network disk image.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. Those skilled in the art will appreciate that the present invention is not limited to the particular embodiments described herein, and that various obvious changes, rearrangements and substitutions will now be apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (9)

1. A method for adding a network disk image watermark is characterized by comprising the following steps:
receiving a preview request of a network disk image, and calculating the information intensity of the network disk image according to the preview request;
when the information intensity exceeds a preset information intensity threshold, acquiring the hierarchy of a preview requester in a network disk organizational structure according to the preview request;
determining the number of added watermarks and the type of the watermarks according to the hierarchy;
determining an information dense area according to the color distribution of the network disk image, and determining a watermark adding position according to the watermark adding quantity and the information dense area;
loading a watermark for the network disk image according to the watermark adding position and the watermark type;
the calculating the information intensity of the network disk image according to the preview request comprises:
performing Fourier transform on the network disk image to obtain a spectrogram of the network disk image;
obtaining high frequency components in the spectrogram, and determining the information density of the mesh image according to the high frequency components, or
Dividing the screen disk image into a plurality of subblocks with the same size according to the size of the screen disk image;
calculating an average color value of each sub-block;
determining an information dense area according to the difference value of the average color values of each adjacent sub-block;
determining the information density of the network disk image according to the number of the information-dense areas;
the determining the information dense area according to the color distribution of the screen disc image includes:
inputting the net disk image into a trained target detection neural network, and acquiring an image element coordinate output result;
and determining an information dense area based on the coordinate position of the object element in the output result.
2. The method of claim 1, wherein receiving a preview request for a webdisk image comprises:
receiving a preview request of an image in a network disk; and receiving a preview request for a document whose web disk contains an embedded image.
3. The method of claim 2, further comprising:
when the information density does not exceed a preset information density threshold, determining an information dense area according to the color distribution of the screen disk image;
determining the watermark type and the watermark adding position according to the information dense area;
and loading the watermark for the network disk image according to the watermark adding position and the watermark type.
4. The method according to claim 1, wherein the dividing the screen disk image into a plurality of sub-blocks with the same size according to the size of the screen disk image comprises:
acquiring the hierarchy of the preview requester in a network disk organization structure;
determining a size of the sub-block according to the hierarchy.
5. The method of claim 1, wherein the watermark types comprise: complex color watermarks and simple color watermarks;
correspondingly, the determining the number of added watermarks and the type of the watermarks according to the hierarchy includes:
when the level is smaller than a preset level threshold value, determining that the watermark type is a complex color watermark;
accordingly, the complex color watermark is generated by:
setting a reference color group according to the color of the edge of the image element in the information dense area, wherein the colors at two ends of the reference color group are the colors at two sides of the edge of the element respectively;
setting other colors in the reference color group according to the colors on two sides of the element edge, so that the gray scales of the other colors are increased or decreased;
and adjusting the color of the watermark according to the color of the reference color group to generate the complex color watermark.
6. The method according to claim 5, wherein loading the watermark for the network disk image according to the watermarking position and the watermark type comprises:
and placing the color with the maximum difference from the element in the complex color watermark into the element.
7. A device for watermarking a network disk image, comprising:
the receiving module is used for receiving a preview request of the network disk image and calculating the information intensity of the network disk image according to the preview request;
the acquisition module is used for acquiring the hierarchy of the preview requester in the network disk organization framework according to the preview request when the information intensity exceeds a preset information intensity threshold;
the determining module is used for determining the adding quantity and the type of the watermark according to the hierarchy;
the adding position determining module is used for determining an information dense area according to the color distribution of the network disk image and determining a watermark adding position according to the watermark adding quantity and the information dense area;
the adding module is used for loading the watermark for the network disk image according to the watermark adding position and the watermark type;
the receiving module includes:
the transformation unit is used for carrying out Fourier transformation on the net disk image to obtain a spectrogram of the net disk image;
the information density determining unit is used for acquiring high-frequency components in the spectrogram and determining the information density of the screen disk image according to the high-frequency components; or
The dividing unit is used for dividing the screen disc image into a plurality of sub-blocks with the same size according to the size of the screen disc image;
a calculating unit for calculating an average color value of each sub-block;
the dense area determining unit is used for determining an information dense area according to the difference value of the average color values of each adjacent sub-block;
a density determining unit for determining the information density of the screen image according to the number of the information-dense areas;
the adding position determination module comprises:
the input unit is used for inputting the net disk image into a trained target detection neural network and acquiring an image element coordinate output result;
and a coordinate position determination unit for determining the information dense region based on the coordinate position of the object element in the output result.
8. A mesh tray, characterized in that it comprises:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the method of watermarking a netdisk image as claimed in any one of claims 1-6.
9. A storage medium containing computer-executable instructions for performing the method of watermarking a netdisk image according to any one of claims 1 to 6 when executed by a computer processor.
CN202210626939.3A 2022-06-06 2022-06-06 Network disk image watermark adding method and device, network disk and storage medium Active CN114708138B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210626939.3A CN114708138B (en) 2022-06-06 2022-06-06 Network disk image watermark adding method and device, network disk and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210626939.3A CN114708138B (en) 2022-06-06 2022-06-06 Network disk image watermark adding method and device, network disk and storage medium

Publications (2)

Publication Number Publication Date
CN114708138A CN114708138A (en) 2022-07-05
CN114708138B true CN114708138B (en) 2022-10-04

Family

ID=82177969

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210626939.3A Active CN114708138B (en) 2022-06-06 2022-06-06 Network disk image watermark adding method and device, network disk and storage medium

Country Status (1)

Country Link
CN (1) CN114708138B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116542838B (en) * 2023-07-03 2024-03-29 平安银行股份有限公司 Watermark security processing method, device, system and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107256530A (en) * 2017-05-19 2017-10-17 努比亚技术有限公司 Adding method, mobile terminal and the readable storage medium storing program for executing of picture watermark
CN112104815A (en) * 2020-09-14 2020-12-18 欧菲微电子技术有限公司 Image brightness calculation method and device, storage medium and electronic equipment
CN112419136A (en) * 2020-11-23 2021-02-26 平安普惠企业管理有限公司 Picture watermark adding method and device, electronic equipment and storage medium

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7720249B2 (en) * 1993-11-18 2010-05-18 Digimarc Corporation Watermark embedder and reader
JP4456185B2 (en) * 1997-08-29 2010-04-28 富士通株式会社 Visible watermarked video recording medium with copy protection function and its creation / detection and recording / playback device
WO2004051917A1 (en) * 2002-11-28 2004-06-17 Digimarc Corporation Systems and methods for authentication of print media
CN102881034B (en) * 2012-05-14 2016-08-03 珠海金山办公软件有限公司 A kind of system and method inserting watermark in profile
US9251760B2 (en) * 2013-07-02 2016-02-02 Cisco Technology, Inc. Copy protection from capture devices for photos and videos
WO2015018052A1 (en) * 2013-08-09 2015-02-12 华为技术有限公司 Information presentation method and device
CN109522684B (en) * 2018-11-27 2020-07-28 中国联合网络通信集团有限公司 Data processing method, device and storage medium
CN112672102B (en) * 2019-10-15 2023-03-24 杭州海康威视数字技术股份有限公司 Video generation method and device
CN112508759B (en) * 2020-12-10 2022-03-15 清研灵智信息咨询(北京)有限公司 Big data management and mining system based on micro-service
CN113821771B (en) * 2021-11-24 2022-02-18 天津联想协同科技有限公司 Dynamic watermark adding method, device, network disk and storage medium
CN114581646A (en) * 2021-12-07 2022-06-03 深圳集智数字科技有限公司 Text recognition method and device, electronic equipment and storage medium
CN114329366B (en) * 2022-03-14 2022-07-26 天津联想协同科技有限公司 Network disk file control method and device, network disk and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107256530A (en) * 2017-05-19 2017-10-17 努比亚技术有限公司 Adding method, mobile terminal and the readable storage medium storing program for executing of picture watermark
CN112104815A (en) * 2020-09-14 2020-12-18 欧菲微电子技术有限公司 Image brightness calculation method and device, storage medium and electronic equipment
CN112419136A (en) * 2020-11-23 2021-02-26 平安普惠企业管理有限公司 Picture watermark adding method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN114708138A (en) 2022-07-05

Similar Documents

Publication Publication Date Title
US5870499A (en) Method and apparatus for data hiding in images
JP6127226B1 (en) Image processing apparatus, image processing method, and program
US8687908B2 (en) Sample based tone mapping method for high dynamic range images
EP3756130B1 (en) Image hidden information detector
US8588461B2 (en) Robust watermarking for digital media
CN111310134B (en) Screen watermark generation method, device and equipment
Lutovac et al. An algorithm for robust image watermarking based on the DCT and Zernike moments
CN114708138B (en) Network disk image watermark adding method and device, network disk and storage medium
CN112651953B (en) Picture similarity calculation method and device, computer equipment and storage medium
KR100912125B1 (en) System and method for evaluating and certifying image identifier
US8824778B2 (en) Systems and methods for depth map generation
JP2000299779A (en) Method and device for signal processing, addition and detection method for watermark and recording medium
CN113821771B (en) Dynamic watermark adding method, device, network disk and storage medium
CN112116585B (en) Image removal tampering blind detection method, system, device and storage medium
Parekh et al. Spatial domain blind watermarking for digital images
RU2331085C2 (en) Two-component integration of messages into image
Tsai et al. Applying homogeneity index modification to high-capacity high-dynamic-range image authentication with distortion tolerance
WO2022227191A1 (en) Inactive living body detection method and apparatus, electronic device, and storage medium
CN114707126B (en) Network disk document watermark adding method and device, network disk and storage medium
CN113763225A (en) Image perception hashing method, system and equipment and information data processing terminal
CN113010128A (en) Multi-screen interaction method and system based on BIM (building information modeling)
US11734785B1 (en) Systems and methods for secure watermarking of point clouds
Gao et al. Saliency-based parameter tuning for tone mapping
ABBAS A HYBRID BRIEF-SVD WATERMARKING TECHNIQUES FOR DATA PROTECTION IN CLOUD COMPUTING
Madushanka et al. SecureRights: A Blockchain-Powered Trusted DRM Framework for Robust Protection and Asserting Digital Rights

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant