CN114707126A - Method and device for adding watermark to network disk document, network disk and storage medium - Google Patents

Method and device for adding watermark to network disk document, network disk and storage medium Download PDF

Info

Publication number
CN114707126A
CN114707126A CN202210626955.2A CN202210626955A CN114707126A CN 114707126 A CN114707126 A CN 114707126A CN 202210626955 A CN202210626955 A CN 202210626955A CN 114707126 A CN114707126 A CN 114707126A
Authority
CN
China
Prior art keywords
watermark
document
network disk
determining
size
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.)
Granted
Application number
CN202210626955.2A
Other languages
Chinese (zh)
Other versions
CN114707126B (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 CN202210626955.2A priority Critical patent/CN114707126B/en
Publication of CN114707126A publication Critical patent/CN114707126A/en
Application granted granted Critical
Publication of CN114707126B publication Critical patent/CN114707126B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/16Program or content traceability, e.g. by watermarking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/106Enforcing content protection by specific content processing
    • G06F21/1063Personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • G06F40/106Display of layout of documents; Previewing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • G06F40/109Font handling; Temporal or kinetic typography

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Multimedia (AREA)
  • Artificial Intelligence (AREA)
  • Technology Law (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Image Processing (AREA)

Abstract

The embodiment of the invention discloses a method and a device for adding a network disk document watermark, a network disk and a storage medium. Wherein the method comprises the following steps: acquiring a preview request of a network disk document, and performing character information density adjustment on the network disk document according to the position of a request initiator in an organization structure acquired according to the preview request; determining a text information dense area according to the network disk document after the text information density adjustment; calculating the size of a blank space of the information dense area, and determining the type and the distribution position of the watermark according to the size of the blank space; and loading the watermark for the character information dense area of the network disk document according to the distribution position and the type of the watermark. The added complex watermark can be removed difficultly, so that the security of the network disk document is ensured, more network disk calculation power is not required to be consumed, and the complex watermark is rapidly added. And further, the use experience of previewing the network disk document by the user is improved.

Description

Method and device for adding watermark to network disk document, 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 document 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 a network disk, a document is usually watermarked in order to indicate the importance or confidentiality of the document. At present, watermarks for generating PDF documents 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 or directly read the text content in the document by the existing various software tools such as OCR tools and PS through the screenshot mode, which results in the divulgence. Although the situation can be prevented by adopting the complex watermark, on one hand, the readability of the network disk document in the previewing process is reduced, and on the other hand, if the complex watermark is added, the network disk document previewing process inevitably needs to occupy larger network disk calculation force, so that the performance of the network disk is influenced, and the experience of a user in previewing the network disk document is further reduced.
Disclosure of Invention
The embodiment of the invention provides a method and a device for adding a network disk document watermark, a network disk and a storage medium, and aims to solve the technical problem that the experience of a user for previewing the network disk document is poor due to the fact that complex watermark protection is carried out on the network disk document 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 document, including:
acquiring a preview request of a network disk document, and performing character information density adjustment on the network disk document according to the position of a request initiator in an organization structure acquired according to the preview request;
determining a text information dense area according to the network disk document after the text information density adjustment;
calculating the size of a blank space of the information dense area, and determining the type and the distribution position of the watermark according to the size of the blank space;
and loading the watermark for the character information dense area of the network disk document according to the distribution position and the type of the watermark.
In a second aspect, an embodiment of the present invention further provides a device for adding a watermark to a network disk document, including:
the adjusting module is used for acquiring a preview request of the network disk document and adjusting the text information density of the network disk document according to the position of a request initiator in an organization structure acquired by the preview request;
the determining module is used for determining a text information dense area according to the network disk document after the text information density adjustment;
the computing module is used for computing the size of the blank space of the information dense area and determining the type and the distribution position of the watermark according to the size of the blank space;
and the recording module is used for loading the watermark to the text information dense area of the network disk document according to the distribution position and the type of the watermark.
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 document 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 document as provided in the foregoing embodiments.
According to the method, the device, the network disk and the storage medium for adding the watermark to the network disk document, provided by the embodiment of the invention, through acquiring the preview request of the network disk document, the text information density of the network disk document is adjusted according to the position of the request initiator in the organization structure acquired by the preview request; determining a text information dense area according to the network disk document after the text information density adjustment; calculating the size of a blank space of the information dense area, and determining the type and the distribution position of the watermark according to the size of the blank space; and loading the watermark for the character information dense area of the network disk document according to the distribution position and the type of the watermark. 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 added complex watermark can be removed difficultly, so that the security of the network disk document 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 document 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 web disk document according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for watermarking a web disk document according to a second embodiment of the present invention;
fig. 3 is a flowchart of a method for adding a watermark to a network disk document according to a third embodiment of the present invention;
fig. 4 is a flowchart of a method for watermarking a web disk document according to a fourth embodiment of the present invention;
fig. 5 is a structural diagram of a network disk document watermark adding apparatus 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 document 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 document previewed by a user to ensure the security of the document, and the method may be executed by a network disk document watermark adding apparatus, and specifically includes the following steps:
step 110, obtaining a preview request of the network disk document, and adjusting the text information density of the network disk document according to the position of the request initiator in the organization structure obtained by the preview request.
The network disk may provide a document preview service to the user. The user can select the corresponding document 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 document 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 this embodiment, it is considered that recording a watermark in a document requires a large amount of computing resources, and the purpose of recording the watermark is to prevent and effectively trace to the source after a secret leakage. Therefore, the disclosure probability of the current user is judged at first, and dynamic watermark adjustment is carried out according to the disclosure probability.
For example, the divulgence probability of the user who sends the preview request of the webdisk document can be determined according to the position of the user corresponding to the organizational structure in the webdisk. 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.
For users with different leakage risks, more watermarks need to be added to the preview document to avoid leakage. And too much watermark loading requires more computing power implementation provided by the network disk. Thereby affecting the preview experience for the user. Therefore, in the embodiment, the document to be previewed can be processed in advance according to the possible divulgence probability of the current user, so that the complex watermark can be loaded conveniently to avoid the divulgence, and meanwhile, the computation load for loading the watermark can be reduced.
Illustratively, the space of the page number occupied by the text content in the document can be compressed, so as to reduce the space of adding the watermark. Thereby facilitating the addition of complex watermarks. Compared with the original mode, the readability is reduced to a certain extent, but the addition amount of the watermark is greatly reduced.
And step 120, determining a text information dense area according to the network disk document with the adjusted text information density.
In this embodiment, the text information dense area refers to a part of a document that has more text contents and covers more information contents. Therefore, it is necessary to add a watermark to the part to ensure the security of the document. Therefore, it is necessary to first determine a text information dense area in the web document.
For example, the determining the text information dense area according to the web document with the adjusted text information density may include: and determining a text information dense area of the network disk document according to the number of characters in a preset unit area in the network disk document.
Optionally, a corresponding preset unit area region in the document may be set, the width of the page after the margin is set is a fixed value, the preset unit area region may be determined only by additionally setting a length value according to a requirement, and the number of characters in each preset unit area region is determined, and when the number of characters exceeds a preset character number threshold, the preset unit area region is determined to be a text information dense region.
And step 130, calculating the size of the blank space of the information dense area, and determining the type and the distribution position of the watermark according to the size of the blank space.
For example, the calculating the size of the empty space of the information dense region may include: determining a title in the network disc document; respectively acquiring the word size and the character spacing of the title; determining a text part in the network disk document; respectively acquiring the word size, the line spacing and the segment spacing of the text part; and determining the corresponding blank space size according to the character space, the line space and the segment space. And the watermark is added in the blank part, so that the difficulty of previewing the document by a previewer can be effectively reduced. Therefore, the type and distribution position of the watermark can be determined according to the size of the empty space.
Considering that the currently used OCR tool or PS tool generally uses color difference to perform recognition, so as to remove the watermark. Therefore, in this embodiment, the type and distribution position of the watermark need to be set for the feature, so that the watermark portion is inserted in the text portion of the document content. To increase the difficulty of removing the watermark by OCR character recognition and PS tools.
Optionally, the determining of the type and the distribution position of the watermark according to the size of the white space may be divided into a title and a text portion, and for the title, the determining of the distribution position of the watermark may be performed according to the font size and the character spacing of the title. For example, whether to add a watermark between character intervals may be determined according to a proportional relationship between the font size and the character intervals, if the proportion is smaller than the set proportion, the watermark is added between the character intervals, otherwise, the adding number of the watermarks is set correspondingly according to the overall title width, the distribution positions of the watermarks are determined according to the font size and the character intervals of the title, and the watermarks are set in the blank areas between the character intervals at equal intervals.
For the text part, the length of the blank space can be determined according to the line spacing; determining the width of a blank space according to the length of each line; determining the number of the watermarks according to the length of the blank space, and determining the transverse position points of the watermarks according to the length of the blank space; and determining the height of the watermark according to the width of the blank space and the font size of the text part. By using the method, the adding position and the number of the watermarks in the text content can be determined. In addition, it is also possible to select a suitable watermark content as a corresponding type according to the blank space, for example: if the blank space is smaller, the watermark content only comprises the ID of the current previewer, and if the space is larger, richer watermark information such as preview time and IP address can be included, so that the tracing is facilitated. The height may also be considered as a type.
And 140, loading the watermark to the character information dense area of the network disk document according to the distribution position and the type of the watermark.
After the distribution position and the watermark type of the watermark are determined, a watermark loading tool is used for recording the watermark for the text information dense area of the network disk document. Under the condition of reducing calculation power as much as possible, the complex watermark is added to improve the security of the network disk document.
In the embodiment, by acquiring a preview request of a network disk document, the text information density of the network disk document is adjusted according to the position of a request initiator in an organization structure acquired by the preview request; determining a text information dense area according to the network disk document after the text information density adjustment; calculating the size of a blank space of the information dense area, and determining the type and the distribution position of the watermark according to the size of the blank space; and loading the watermark for the character information dense area of the network disk document according to the distribution position and the type of the watermark. 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 and the device can ensure that the added complex watermark is difficult to remove, and further ensure the security of the network disk document, and simultaneously realize the rapid addition of the complex watermark without consuming more network disk computing power. And further, the use experience of previewing the network disk document by the user is improved.
Example two
Fig. 2 is a flowchart of a method for adding a watermark to a network disk document according to a second embodiment of the present invention. In this embodiment, the text information density of the web disk document is adjusted according to the position of the originator of the preview request in the organizational structure, which is specifically optimized as follows: and comparing the position of the request initiator in the organization framework with a preset position threshold value, and adjusting the text information density of the network disk document according to the comparison result.
Correspondingly, the method for adding the watermark to the network disk document provided by the embodiment specifically includes:
step 210, obtaining a preview request of the network disk document, comparing the position of the request initiator in the organization architecture with a preset position threshold value, and performing text information density adjustment on the network disk document according to the comparison result.
The preview experience of the user is influenced by adjusting the text information density of the network disk document. Therefore, in the present embodiment, the possibility of secret leakage can be judged according to the user hierarchy, and the density of the text information of the web document can be adjusted according to the possibility. Optionally, the corresponding position, i.e. the level, of the request initiator in the network disk organization structure may be compared with a preset position threshold. The preset position threshold may be set according to an empirical value. And adjusting the density of the text information of the network disk document according to the comparison result.
For example, the adjusting the density of the text information of the web disk document according to the comparison result may include: and when the font size of the network disk document is smaller than a preset position threshold value, reducing the font size of the network disk document, and reducing the line spacing and paragraph distance in the network disk document until the reduced proportion is not smaller than the proportion of the position of the request initiator in the organization architecture and the highest level in the organization architecture. For example, a high value may be set for the highest level of the organization structure in the network disk, a low value may be set for the lowest level, and the corresponding value of each level may be determined according to the proportional relationship between the levels and the values. And comparing the data of the current request initiator in the hierarchy with a preset position threshold value, and if the data of the current request initiator in the hierarchy is smaller than the preset position threshold value, correspondingly reducing the line spacing, paragraph distance and font in the document in proportion.
And step 220, determining a text information dense area according to the network disk document with the adjusted text information density.
And 230, calculating the size of a blank space of the information dense area, and determining the type and the distribution position of the watermark according to the size of the blank space.
And 240, loading the watermark for the character information dense area of the network disk document according to the distribution position and the type of the watermark.
In this embodiment, the text information density of the web disk document is adjusted by obtaining the position of the request originator in the organization structure according to the preview request, which is specifically optimized as follows: and comparing the position of the request initiator in the organization framework with a preset position threshold value, and adjusting the text information density of the network disk document according to the comparison result. The possibility of disclosure of the previewing requester can be determined according to the position of the requester in the organization structure, the text information density can be adjusted according to the possibility of disclosure, the text information density of the document can be properly adjusted under the condition of low risk, and the readability of the website file previewing is improved on the premise of ensuring the document safety.
EXAMPLE III
Fig. 3 is a flowchart of a method for adding a watermark to a network disk document according to a third embodiment of the present invention. In this embodiment, the watermark type is specifically optimized as follows: the color of the watermark; correspondingly, the type and distribution position of the watermark can be determined according to the size of the blank space, and the method is specifically optimized as follows: determining the number of watermark characters according to the blank space of the network disk document; setting a reference color group according to the colors of characters in the screen disc document and the number of the watermark characters, gradually strengthening the gray value corresponding to each color in the reference color group, and enabling the last color to be consistent with the color of the characters in the screen disc document; setting the last color in the reference color group as a watermark intermediate color; setting a first color in the reference color group as colors at two ends of the watermark; and setting other colors in the reference array as watermark intermediate colors in sequence from large to small according to the gray value.
The method for adding the watermark to the network disk document provided by the embodiment specifically comprises the following steps:
and 310, acquiring a preview request of the network disk document, and adjusting the text information density of the network disk document according to the position of the request initiator in the organization structure acquired by the preview request.
And step 320, determining a text information dense area according to the network disk document after the text information density is adjusted.
And 330, calculating the size of the blank space of the information dense area, and determining the number of the watermark characters according to the blank space of the network disk document.
When removing a watermark by an OCR or PS method, the principle is to remove the watermark based on a contrast difference. Therefore, the color of the watermark should be as close as possible to the color of the text in the network disk document, so as to reduce the contrast difference between the two. However, this method may confuse the text portion image, and thus the corresponding text information cannot be obtained by complete reading.
Therefore, in this embodiment, the difficulty of removing the watermark or directly reading the text content can be increased by setting the watermark color without affecting the reading effect.
For example, the number of watermark characters that need to be added can be determined according to the size of the white space, and if the number of watermark characters is too large, the information is dense, and thus traceability cannot be performed. Therefore, a reasonable number of watermark characters needs to be set according to the space. Optionally, the number of the watermark characters may be determined according to the corresponding size of the watermark characters and the size of the blank space.
Step 340, setting a reference color group according to the colors of the characters in the screen disc document and the number of the watermark characters, wherein the gray value corresponding to each color in the reference color group is gradually strengthened, and the last color is consistent with the colors of the characters in the screen disc document.
The color of the watermark should be as diverse as possible to increase the difficulty of removing the watermark. However, if the number of colors is too large, the computational effort required for the watermarking operation increases. Therefore, in the present embodiment, a corresponding color can be set for each character.
Optionally, a reference color group is set for the watermark color, the reference color group may correspond to the watermark color, specifically, the text color in the current document may be referred to as the initial color of the reference color group, and according to the requirement of contrast, the text color is sequentially decreased according to the corresponding gray value and the preset value, so as to form a series of colors. And forming the corresponding colors of the reference color group.
Step 350, setting the last color in the reference color group as the watermark intermediate color.
In order to increase the difficulty of removing the watermark and avoid causing difficulty to normal reading, the last color in the reference color group, namely the color same as the characters in the document, can be used as the color of the middle character in the watermark characters.
And step 360, setting the first color in the reference color group as the colors at two ends of the watermark.
Correspondingly, the color with the largest color difference with the document characters is used as the colors of the two ends of the watermark to be distinguished from the colors of the document characters, so that the reading difficulty is avoided.
And step 370, setting other colors in the reference array as watermark intermediate colors in sequence from large to small according to the gray value.
The other colors are taken as intermediate values to achieve color transitions.
And 380, loading the watermark to the character information dense area of the network disk document according to the distribution position and the color of the watermark.
The embodiment specifically optimizes the watermark types as follows: the color of the watermark; correspondingly, the determining of the type and the distribution position of the watermark according to the size of the empty space may be specifically optimized as follows: determining the number of watermark characters according to the blank space of the network disk document; setting a reference color group according to the colors of characters in the screen disc document and the number of the watermark characters, gradually strengthening the gray value corresponding to each color in the reference color group, and enabling the last color to be consistent with the color of the characters in the screen disc document; setting the last color in the reference color group as a watermark intermediate color; setting a first color in the reference color group as colors at two ends of the watermark; and setting other colors in the reference array as watermark intermediate colors in sequence from large to small according to the gray value. Under the condition of avoiding reading difficulty, the difficulty of removing the watermark or acquiring the text content in the document through OCR can be effectively increased.
Example four
Fig. 4 is a flowchart of a method for adding a watermark to a network disk document according to a fourth embodiment of the present invention. In this embodiment, optimization is performed based on the above embodiment, and in this embodiment, the watermark types may further include: the tilt angle of the watermark; and determining the type and distribution position of the watermark according to the size of the blank space, specifically optimizing as follows: and determining the inclination angle of the watermark according to the blank space and the watermark content so that one end of the watermark is embedded into one line of characters in two adjacent lines in the character information dense area in the network disk document.
The method for adding the watermark to the network disk document provided by the embodiment specifically comprises the following steps:
and step 410, acquiring a preview request of the network disk document, and performing text information density adjustment on the network disk document according to the position of an initiator of the preview request acquisition request in an organization structure.
And step 420, determining a text information dense area according to the network disk document after the text information density is adjusted.
And 430, calculating the size of the blank space of the information dense area, and determining the number of the watermark characters according to the blank space of the network disk document.
Step 440, setting a reference color group according to the colors of the characters in the screen disc document and the number of the watermark characters, wherein the gray value corresponding to each color in the reference color group is gradually strengthened, and the last color is consistent with the colors of the characters in the screen disc document.
And step 450, setting the last color in the reference color group as the intermediate color of the watermark.
In order to increase the difficulty of removing the watermark and avoid causing difficulty to normal reading, the last color in the reference color group, namely the color same as the characters in the document, can be used as the color of the middle character in the watermark characters.
Step 460, setting the first color in the reference color group as the colors at both ends of the watermark.
And 470, setting other colors in the reference array as watermark intermediate colors in sequence from large to small according to the gray value.
And step 480, determining the inclination angle of the watermark according to the blank space and the watermark content, so that one end of the watermark is embedded into one line of characters in two adjacent lines in the character information dense area in the network disk document.
Since the minimum information content in the watermark may not be accommodated due to the small empty space area after the text information density is adjusted, the information content in the watermark may be increased by inclining the watermark in this embodiment. For example, a certain inclination angle can be set to ensure that two ends of the watermark are embedded into the upper and lower rows respectively, for example, a third proportion. While at least the shortest information content may also be included. The tracing to the source is traced to the divulgence in the later stage.
And 490, loading the watermark for the text information dense area of the network disk document according to the distribution position, the inclination angle and the watermark color.
This embodiment optimizes the watermark type as: the tilt angle of the watermark; and determining the type and distribution position of the watermark according to the size of the blank space, specifically optimizing as follows: and determining the inclination angle of the watermark according to the blank space and the watermark content so that one end of the watermark is embedded into one line of characters in two adjacent lines in the character information dense area in the network disk document. The problem of incomplete watermark information after the blank space is reduced is solved, complete embodiment of the watermark information can be ensured, and the tracing at the later stage is facilitated.
EXAMPLE five
Fig. 5 is a structural diagram of a network disk document watermarking device according to a fifth embodiment of the present invention, and as shown in fig. 5, the device includes:
an adjusting module 510, configured to obtain a preview request of a network disk document, and perform text information density adjustment on the network disk document according to a position of an initiator of the preview request in an organization structure;
a determining module 520, configured to determine a text information dense area according to the network disk document with the text information density adjusted;
a calculating module 530, configured to calculate a size of a blank space of the information-dense region, and determine a type and a distribution position of a watermark according to the size of the blank space;
and a loading module 540, configured to load a watermark for the text information dense area of the network disk document according to the distribution position and the type of the watermark.
In the apparatus for adding a watermark to a network disk document provided by this embodiment, by acquiring a preview request of a network disk document, a request originator is acquired according to the preview request to perform text information density adjustment on the network disk document at a location of an organization structure; determining a text information dense area according to the network disk document after the text information density adjustment; calculating the size of a blank space of the information dense area, and determining the type and the distribution position of the watermark according to the size of the blank space; and loading the watermark for the character information dense area of the network disk document according to the distribution position and the type of the watermark. 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 added complex watermark can be removed difficultly, so that the security of the network disk document is ensured, and the complex watermark can be rapidly added without consuming more network disk computing power. And further, the use experience of the user for previewing the network disk document is improved.
On the basis of the above embodiments, the adjusting module includes:
and the adjusting unit is used for comparing the position of the request initiator in the organization structure with a preset position threshold value and adjusting the text information density of the network disk document according to the comparison result.
On the basis of the above embodiments, the adjusting unit includes:
and the narrowing subunit is used for narrowing the font of the network disk document when the font is smaller than a preset position threshold value, and narrowing the line spacing and paragraph distance in the network disk document until the narrowed proportion is not smaller than the proportion of the position of the request initiator in the organization architecture and the highest level in the organization architecture.
On the basis of the foregoing embodiments, the determining module includes:
and the determining unit is used for determining the text information dense area of the network disk document according to the number of the characters in the preset unit area in the network disk document.
On the basis of the above embodiments, the computing module includes:
a title determining unit, configured to determine a title in the network disc document;
a first obtaining unit, configured to obtain a font size and a character spacing of the title, respectively;
the text determining unit is used for determining text parts in the network disk document;
a second obtaining unit, configured to obtain a font size, a line spacing, and a segment spacing of the text portion, respectively;
and the size determining unit is used for determining the corresponding blank space size according to the character space, the line space and the segment space.
On the basis of the foregoing embodiments, the computing module further includes:
the length determining unit is used for determining the length of the blank space according to the line spacing;
the width determining unit is used for determining the width of the blank space according to the length of each line;
the position point determining unit is used for determining the number of the watermarks according to the length of the blank space and determining the transverse position points of the watermarks according to the length of the blank space;
and the height determining unit is used for determining the height of the watermark according to the width of the blank space and the font size of the text part.
On the basis of the foregoing embodiments, the computing module further includes:
and the title watermark determining unit is used for determining the distribution position of the watermark according to the word size and the character spacing of the title.
On the basis of the above embodiments, the watermark types include: the color of the watermark;
correspondingly, the calculation module comprises:
the character quantity determining unit is used for determining the quantity of the watermark characters according to the blank space of the network disk document;
the reference color set setting unit is used for setting a reference color set according to the colors of the characters in the screen disc document and the number of the watermark characters, the gray value corresponding to each color in the reference color set is gradually strengthened, and the last color is consistent with the colors of the characters in the screen disc document;
an intermediate color setting unit configured to set a last color in the reference color set as a watermark intermediate color;
a two-end color setting unit, configured to set a first color in the reference color group as a two-end color of the watermark;
and the intermediate color setting unit is used for sequentially setting other colors in the reference array as watermark intermediate colors according to the gray value from large to small.
On the basis of the foregoing embodiments, the watermark types further include: the tilt angle of the watermark;
correspondingly, the calculation module further comprises:
and the inclination angle determining unit is used for determining the inclination angle of the watermark according to the blank space and the watermark content so as to enable one end of the watermark to be embedded into one line of characters in two adjacent lines in the character information dense area in the network disk document.
The network disk document watermark adding device provided by the embodiment of the invention can execute the network disk document 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 schematic structural diagram of a mesh disc 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 disk 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, and 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 examples or some combination thereof 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 various functional applications and data processing by running a program stored in the system memory 28, for example, to implement the method for watermarking a web document 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 watermarking methods for a web disk document.
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 also 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. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in some detail by the above embodiments, the invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the invention, and the scope of the invention is determined by the scope of the appended claims.

Claims (12)

1. A method for adding a watermark to a network disk document is characterized by comprising the following steps:
acquiring a preview request of a network disk document, and performing character information density adjustment on the network disk document according to the position of a request initiator in an organization structure acquired according to the preview request;
determining a text information dense area according to the network disk document after the text information density adjustment;
calculating the size of a blank space of the information dense area, and determining the type and the distribution position of the watermark according to the size of the blank space;
and loading the watermark for the character information dense area of the network disk document according to the distribution position and the type of the watermark.
2. The method of claim 1, wherein the obtaining a request originator according to the preview request for performing text information density adjustment on the web disk document at a location of an organizational structure comprises:
and comparing the position of the request initiator in the organization framework with a preset position threshold value, and adjusting the text information density of the network disk document according to the comparison result.
3. The method of claim 2, wherein the adjusting the density of the text information of the web disc document according to the comparison result comprises:
and when the font size of the network disk document is smaller than a preset position threshold value, reducing the font size of the network disk document, and reducing the line spacing and paragraph distance in the network disk document until the reduced proportion is not smaller than the proportion of the position of the request initiator in the organization architecture and the highest level in the organization architecture.
4. The method of claim 1, wherein determining the text information dense area according to the text information density-adjusted web document comprises:
and determining a text information dense region of the network disk document according to the number of characters in a preset unit area in the network disk document.
5. The method of claim 4, wherein the calculating the size of the white space of the information-dense region comprises:
determining a title in the network disc document;
respectively acquiring the word size and the character spacing of the title;
determining a text part in the network disk document;
respectively acquiring the word size, the line spacing and the segment spacing of the text part;
and determining the corresponding blank space size according to the character space, the line space and the segment space.
6. The method of claim 5, wherein determining the type and distribution position of the watermark according to the size of the white space comprises:
determining the length of a blank space according to the line spacing;
determining the width of a blank space according to the length of each line;
determining the number of the watermarks according to the length of the blank space, and determining the transverse position points of the watermarks according to the length of the blank space;
and determining the height of the watermark according to the width of the blank space and the font size of the text part.
7. The method of claim 5, wherein determining the type and distribution position of the watermark according to the size of the white space comprises:
and determining the distribution position of the watermark according to the word size and the character spacing of the title.
8. The method of claim 5, wherein the watermark types comprise: the color of the watermark;
correspondingly, the determining the type and the distribution position of the watermark according to the size of the white space includes:
determining the number of watermark characters according to the blank space of the network disk document;
setting a reference color group according to the colors of characters in the screen disc document and the number of the watermark characters, gradually strengthening the gray value corresponding to each color in the reference color group, and enabling the last color to be consistent with the color of the characters in the screen disc document;
setting the last color in the reference color group as a watermark intermediate color;
setting a first color in the reference color group as colors at two ends of the watermark;
and setting other colors in the reference array as watermark intermediate colors in sequence from large to small according to the gray value.
9. The method of claim 8, wherein the watermark types further comprise: the tilt angle of the watermark;
the determining the type and the distribution position of the watermark according to the size of the blank space comprises:
and determining the inclination angle of the watermark according to the blank space and the watermark content so that one end of the watermark is embedded into one line of characters in two adjacent lines in the character information dense area in the network disk document.
10. A device for watermarking a network disk document, comprising:
the adjusting module is used for acquiring a preview request of the network disk document and adjusting the text information density of the network disk document according to the position of a request initiator in an organization structure acquired by the preview request;
the determining module is used for determining a text information dense area according to the network disk document after the text information density adjustment;
the computing module is used for computing the size of the blank space of the information dense area and determining the type and the distribution position of the watermark according to the size of the blank space;
and the recording module is used for loading the watermark to the text information dense area of the network disk document according to the distribution position and the type of the watermark.
11. 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 web document according to any of claims 1-9.
12. A storage medium containing computer-executable instructions for performing the method of watermarking a netdisk document according to any of claims 1 to 9 when executed by a computer processor.
CN202210626955.2A 2022-06-06 2022-06-06 Network disk document watermark adding method and device, network disk and storage medium Active CN114707126B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210626955.2A CN114707126B (en) 2022-06-06 2022-06-06 Network disk document watermark adding method and device, network disk and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210626955.2A CN114707126B (en) 2022-06-06 2022-06-06 Network disk document watermark adding method and device, network disk and storage medium

Publications (2)

Publication Number Publication Date
CN114707126A true CN114707126A (en) 2022-07-05
CN114707126B CN114707126B (en) 2022-10-25

Family

ID=82177806

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210626955.2A Active CN114707126B (en) 2022-06-06 2022-06-06 Network disk document watermark adding method and device, network disk and storage medium

Country Status (1)

Country Link
CN (1) CN114707126B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111861846A (en) * 2020-07-10 2020-10-30 哈尔滨工业大学(深圳) Electronic document digital watermark processing method and system
CN112597455A (en) * 2020-12-29 2021-04-02 中国农业银行股份有限公司 Document anti-counterfeiting method and device
CN113486309A (en) * 2021-07-20 2021-10-08 阳光电源股份有限公司 Technical document processing method, digital watermark server and processing system
CN113704708A (en) * 2021-08-27 2021-11-26 海看网络科技(山东)股份有限公司 Method and system for watermarking online preview of document based on browser

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111861846A (en) * 2020-07-10 2020-10-30 哈尔滨工业大学(深圳) Electronic document digital watermark processing method and system
CN112597455A (en) * 2020-12-29 2021-04-02 中国农业银行股份有限公司 Document anti-counterfeiting method and device
CN113486309A (en) * 2021-07-20 2021-10-08 阳光电源股份有限公司 Technical document processing method, digital watermark server and processing system
CN113704708A (en) * 2021-08-27 2021-11-26 海看网络科技(山东)股份有限公司 Method and system for watermarking online preview of document based on browser

Also Published As

Publication number Publication date
CN114707126B (en) 2022-10-25

Similar Documents

Publication Publication Date Title
CN107239713B (en) Sensitive content data information protection method and system
US9348799B2 (en) Forming a master page for an electronic document
EP3756130B1 (en) Image hidden information detector
WO2019184138A1 (en) Bill information input method and apparatus, and computer device and storage medium
US9934390B2 (en) Data redaction system
CN108664774A (en) A kind of timely method, apparatus, storage medium and system for generating watermark
JP2007535034A (en) Multi-source, multi-destination data transfer
US8250103B2 (en) Image log management device, image log management method, image log management program
JP2004180277A (en) Digital watermark embedding method, digital watermark extracting method, apparatuses, programs and storage media therefor
CN114329366B (en) Network disk file control method and device, network disk and storage medium
JP6193406B2 (en) Serialization for differential encoding
CN107862035B (en) Network reading method and device for conference record, intelligent tablet and storage medium
CN114708138B (en) Network disk image watermark adding method and device, network disk and storage medium
US20130007599A1 (en) Optimizing the layout of electronic documents
JP2017211936A (en) Document storage processing system
CN114707126B (en) Network disk document watermark adding method and device, network disk and storage medium
US20150278162A1 (en) Retention of content in converted documents
CN113590564B (en) Data storage method, device, electronic equipment and storage medium
CN114022340A (en) Method and device for adding watermark to image and detecting image, electronic equipment and storage medium
CN113010128A (en) Multi-screen interaction method and system based on BIM (building information modeling)
US10685171B2 (en) Steganographic encoding detection and remediation
JP5885956B2 (en) Font matching
CN103970799A (en) Electronic document generating method, electronic document generating device and client-side
KR102226706B1 (en) Apparatus for hiding data using multimedia contents in document file and method therefore
JP2001312691A (en) Method/device for processing picture and storage medium

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