CN108763880B - Method and device for generating and detecting file watermark - Google Patents

Method and device for generating and detecting file watermark Download PDF

Info

Publication number
CN108763880B
CN108763880B CN201810576489.5A CN201810576489A CN108763880B CN 108763880 B CN108763880 B CN 108763880B CN 201810576489 A CN201810576489 A CN 201810576489A CN 108763880 B CN108763880 B CN 108763880B
Authority
CN
China
Prior art keywords
pixel point
target file
character
check value
hash check
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
CN201810576489.5A
Other languages
Chinese (zh)
Other versions
CN108763880A (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.)
Guangxi Yingteng Education Technology Co ltd
Original Assignee
Guangxi Yingteng Education Technology Co ltd
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 Guangxi Yingteng Education Technology Co ltd filed Critical Guangxi Yingteng Education Technology Co ltd
Priority to CN201810576489.5A priority Critical patent/CN108763880B/en
Publication of CN108763880A publication Critical patent/CN108763880A/en
Application granted granted Critical
Publication of CN108763880B publication Critical patent/CN108763880B/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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Technology Law (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Power Engineering (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Image Processing (AREA)

Abstract

The application discloses a method and a device for generating and detecting a file watermark. The method for generating the file watermark comprises the steps of obtaining a first target file of which the dynamic digital watermark is to be generated; generating a ciphertext on the first target file; calculating a first hash check value of the first target file according to the ciphertext; calculating a first pixel point coordinate according to the first hash check value; and drawing a dynamic digital watermark according to the first pixel point coordinate. The method and the device solve the technical problems that the generation and detection of the watermark are complicated, and the watermark is not easy to detect, so that the unauthorized use of the file is caused. By the file watermark generation and detection method and device, whether the picture on the network comes from the company or not can be quickly verified, and unauthorized use of the picture is effectively prevented.

Description

Method and device for generating and detecting file watermark
Technical Field
The present application relates to the field of electronic information, and in particular, to a method and an apparatus for generating and detecting a file watermark.
Background
With the rapid development of computer network technology and multimedia technology, people acquire various multimedia data, such as picture data, through a network, the data brings convenience to life of people, the security protection of various multimedia data becomes more and more prominent, pirates can spread unauthorized multimedia data at low cost, so the protection of multimedia data becomes very urgent, at present, the protection method of multimedia data mainly uses watermark technology, such as picture watermark, which is dynamic digital watermark loaded on multimedia data, and the watermark embeds information representing copyright into original multimedia data by utilizing the ubiquitous redundant data and randomness in the multimedia data, thereby protecting the copyright or integrity of the multimedia data and ensuring the legal rights of copyright owners.
The image watermark adding method in the prior art is complex, the added watermark can be seen visually and clearly, the added watermark is not easy to hide, and the operation is complex when the watermark is extracted for detection.
Aiming at the problems that the generation of the watermark is complicated and the watermark is not easy to detect in the related technology, so that the unauthorized use of the file is caused, an effective solution is not provided at present.
Disclosure of Invention
The application mainly aims to provide a method and a device for generating and detecting a file watermark so as to solve the technical problems that the generation and detection of the watermark are complicated, and the watermark is not easy to detect, so that the unauthorized use of the file is caused.
In order to achieve the above object, according to one aspect of the present application, a file watermark generation method is provided.
The file watermark generation method comprises the following steps: acquiring a first target file to be generated with a dynamic digital watermark;
generating a ciphertext on the first target file;
calculating a first hash check value of the first target file according to the ciphertext; and
calculating a first pixel point coordinate according to the first hash check value; and drawing a dynamic digital watermark according to the first pixel point coordinate.
Further, after generating the ciphertext on the first target file, the method further includes: acquiring the width of the first target file; and acquiring the height of the first target file.
Further, calculating the coordinates of the first pixel point according to the first hash check value includes:
intercepting a first character and a second character of the first hash check value, wherein the first character is the first N bits of the first hash check value, and the second character is the last N bits of the first hash check value; n is a preset check bit;
calculating the abscissa of the coordinate of the first pixel point according to the first character and the width and a first preset method; calculating to obtain a vertical coordinate of the first pixel point coordinate according to the second character and the height and a second preset method;
and obtaining the coordinates of the first pixel point according to the horizontal coordinates and the vertical coordinates.
Further, the drawing the dynamic digital watermark according to the first pixel point coordinate includes:
judging whether the color corresponding to the first pixel point coordinate is white or not;
if the color corresponding to the first pixel point coordinate is white, drawing a black dynamic digital watermark;
and if the color corresponding to the first pixel point coordinate is not white, drawing the white dynamic digital watermark.
Further, a method of detecting a watermark generated by the method of claim 1, comprising:
acquiring a second pixel point coordinate of the second target file;
judging whether a second hash check value of the second target file is consistent with a first hash check value of the first target file or not;
if the second hash check value of the second target file is consistent with the first hash check value, judging whether the second pixel point coordinate is consistent with the first pixel point coordinate of the first target file; and
and if the second pixel point coordinate is consistent with the first pixel point coordinate, determining the second target file and the first target file as the same file.
Further, the obtaining of the second pixel point coordinate of the second target file includes:
intercepting a third character and a fourth character of the second hash check value, wherein the third character is the first N bits of the second hash check value, and the fourth character is the last N bits of the second hash check value;
calculating the third character according to a first preset method to obtain the abscissa of the coordinate of the second pixel point;
and calculating the fourth character according to a second preset method to obtain the ordinate of the second pixel point coordinate.
In order to achieve the above object, according to another aspect of the present application, a file watermark generating apparatus and a detecting apparatus are provided.
The file watermark generating device comprises: the acquisition module is used for acquiring a first target file of which the dynamic digital watermark is to be generated;
the ciphertext module is used for generating a ciphertext on the first target file;
the hash check value module is used for calculating a first hash check value of the first target file according to the ciphertext;
the pixel point coordinate module is used for calculating a first pixel point coordinate according to the first Hash check value;
and the drawing module is used for drawing the dynamic digital watermark according to the first pixel point coordinate.
Further, the watermark generating apparatus includes: a caching module, the caching module comprising: the first server is used for caching the first character and the second character of the intercepted first hash check value; the second server is used for caching the abscissa of the coordinate of the first pixel point calculated according to the first character and the width by a first preset method and the ordinate of the coordinate of the first pixel point calculated according to the second character and the height by a second preset method; and the third server is used for caching the black dynamic digital watermark drawn when the color corresponding to the first pixel point coordinate is white and the white dynamic digital watermark drawn when the color corresponding to the first pixel point coordinate is not white.
The file watermark detection device comprises: the acquisition unit is used for acquiring a second pixel point coordinate of the second target file;
a first judging unit, configured to judge whether a second hash check value of the second target file is consistent with a first hash check value of the first target file;
a second judging unit, configured to judge whether a second pixel coordinate of the second target file is consistent with a first pixel coordinate of the first target file if a second hash check value of the second target file is consistent with the first hash check value;
and the determining unit is used for determining that the second target file and the first target file are the same file if the second pixel point coordinate is consistent with the first pixel point coordinate.
In order to achieve the above object, according to another aspect of the present application, there is provided a storage medium.
A file storage medium according to the present application includes: the storage medium stores a dynamic digital watermark generation program and a detection program, which implement the steps of the dynamic digital watermark generation method according to any one of claims 1 to 6 and the method for detecting a watermark generated by the method according to claim 1.
In the embodiment of the application, a mode of obtaining a first target file to be generated with a dynamic digital watermark is adopted, and a ciphertext is generated on the first target file and the first pixel point coordinate is obtained through calculation, so that the aim is fulfilled, the technical effect of drawing the dynamic digital watermark is realized, and the technical problems that the generation and detection of the watermark are complicated and the watermark is not easy to detect are solved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, serve to provide a further understanding of the application and to enable other features, objects, and advantages of the application to be more apparent. The drawings and their description illustrate the embodiments of the invention and do not limit it. In the drawings:
fig. 1 is a schematic diagram of a watermark generation method according to an embodiment of the present application;
fig. 2 is a schematic diagram of obtaining coordinates of a first pixel point according to an embodiment of the present application;
FIG. 3 is a schematic diagram of watermarking according to an embodiment of the present application;
fig. 4 is a schematic diagram of a watermark detection method according to an embodiment of the present application;
fig. 5 is a schematic diagram of a watermark generation apparatus according to an embodiment of the present application; and
fig. 6 is a schematic diagram of a watermark detection apparatus according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
As shown in fig. 1, the present application relates to a file watermark generation method, which includes the following steps S101 to S106,
step S101, a first target file of a dynamic digital watermark to be generated is obtained;
the first target file can be a picture file or a digital picture on a network, and can also be a picture stored in a computer.
The generation of dynamic digital watermark refers to that some identification information (namely digital watermark) is directly embedded into a digital carrier (comprising multimedia, documents, software and the like) or indirectly represented (modifying the structure of a specific area) on a user computer, and the use value of the original carrier is not influenced, and the identification information is not easy to be ascertained and modified again.
The first target file to be generated with the dynamic digital watermark may be obtained by direct downloading from a network.
Step S102, generating a ciphertext on the first target file;
the ciphertext may be composed of a number of english letters and numbers.
The generating of the ciphertext on the first target file may be appending a section of ciphertext to the end of the digitally processed picture sequence identifier.
Step S103, acquiring the width of the first target file;
the width of acquiring the first target file may be a pixel width of an identification picture.
Step S104, acquiring the height of the first target file;
the height at which the first target file is acquired may be a pixel height of an identification picture.
Step S105, calculating a first hash check value of the first target file according to the ciphertext;
the first hash check value may be an MD5 string, which is a hash function widely used in the field of computers to provide integrity protection for messages.
Calculating the first hash check value of the first target file according to the ciphertext may be calculating an MD5 value of a picture according to a ciphertext composed of a number of english alphabets and numbers.
Step S106, calculating a first pixel point coordinate according to the first Hash check value;
the first pixel point can be a grid which is formed by arranging pixel points and is called a grating by dividing the image into a plurality of small checks, wherein each small check is called a pixel point, and the computer expresses the whole image by expressing the information of the positions, the colors, the brightness and the like of the pixel points.
The first pixel point may also be a point obtained by dividing the image into very small points, which is called a pixel point, and the value of the pixel point represents the brightness of the point image.
The first pixel point coordinate may be composed of a first pixel point abscissa and a first pixel point ordinate.
The calculating of the first pixel point coordinate according to the first hash check value may be calculating to obtain an abscissa X and an ordinate Y of the first pixel point according to the MD5 value, the pixel height of the picture, and the pixel width of the picture.
And S107, drawing the dynamic digital watermark according to the first pixel point coordinate.
The step of drawing the dynamic digital watermark according to the coordinates of the first pixel point can be that after the exact position of the first pixel point is determined, the color is drawn to the first pixel point according to the color of the coordinates of the first pixel point.
For example, if the first pixel coordinates (X, Y) are close to white, the first pixel coordinates are drawn to black; otherwise, white is drawn.
From the above description, it can be seen that the following technical effects are achieved by the present application: the invention aims to provide a method for generating and detecting a dynamic digital watermark of a picture, aiming at the defects in the prior art, so that the property safety of the digital picture is ensured, the digital picture can be detected under the condition of unauthorized use, and meanwhile, the efficiency is higher. According to the MD5 values, the widths and the heights of different pictures, after the digital watermark image is dynamically generated on the picture and uploaded to the server, the manager extracts the watermark information from the picture, quickly verifies whether the picture on the network comes from the company, and effectively prevents the picture from being used without authorization.
As shown in fig. 2, in step S106 of the generation method, calculating the first pixel point coordinate according to the first hash check value specifically includes steps S201 to S204:
step S201, intercepting a first character and a second character of the first hash check value;
the first character may be a first half of the first hash check value, and the second character may be a second half of the first hash check value.
For example, if the first hash check value is a 32-bit MD5 value, the first 16-bit character is regarded as a first character of a hexadecimal number, and the last 16-bit character is regarded as a second character of the hexadecimal number.
Step S202, calculating the abscissa of the first pixel point coordinate according to the first character and the width and a first preset method;
the first character may be the first 16 bits of a 32-bit MD5 value considered a hexadecimal number.
The first predetermined method may be dividing the first character by the width to obtain a remainder.
And calculating the abscissa of the coordinate of the first pixel point according to the first character and the width and a first preset method, wherein the abscissa is obtained by dividing the first character which is regarded as a hexadecimal number by the pixel width of the picture to obtain a remainder.
Step S203, calculating a vertical coordinate of the first pixel point coordinate according to the second character and the height and a second preset method;
the second character may be the last 16 bits of a 32-bit MD5 value considered a hexadecimal number.
The second predetermined method may be dividing the second character by the height to obtain a remainder.
And calculating the vertical coordinate of the first pixel point coordinate according to the second character and the height and a second preset method, wherein the vertical coordinate of the first pixel point coordinate can be obtained by dividing the second character which is regarded as a hexadecimal number by the pixel height of the picture to obtain a remainder.
And step S204, obtaining the coordinates of the first pixel point according to the horizontal coordinate and the vertical coordinate.
Obtaining the first pixel point coordinate according to the abscissa and the ordinate may be a first pixel point coordinate formed by combining the abscissa and the ordinate obtained by the calculation in step S202 and step S203.
As shown in fig. 3, in step S107 of the generating method, the step S301 to step S303 of drawing the dynamic digital watermark according to the first pixel point coordinate specifically includes:
step S301, judging whether the color corresponding to the first pixel point coordinate is white;
the color corresponding to the first pixel point coordinate may be white, black, red, green, or other colors.
Step S302, if the color corresponding to the first pixel point coordinate is white, drawing a black dynamic digital watermark;
the step of drawing the dynamic digital watermark according to the coordinates of the first pixel point can be that after the exact position of the first pixel point is determined, the color is drawn to the first pixel point according to the color of the coordinates of the first pixel point.
For example, if the first pixel coordinates (X, Y) are close to white, the first pixel coordinates are drawn to black; otherwise, white is drawn.
Step S303, if the color corresponding to the first pixel point coordinate is not white, the white dynamic digital watermark is drawn.
For example, if the first pixel coordinates (X, Y) are close to black, the color is white.
According to the purpose of the present application, there is provided a method for detecting a watermark generated by the above method, as shown in fig. 4, the method specifically includes steps S401 to S404:
step S401, obtaining a second pixel point coordinate of the second target file;
the second target file may be a picture taken from a network or by other means.
The obtaining of the second pixel point coordinate of the second target file may be extracting an MD5 character string of the second target file, and calculating the second pixel point coordinate of the second target file according to the method in step S106.
For example, a first character and a second character of the MD5 value of the second target file are intercepted;
the first character may be a first half of a value of MD5 of the second object file, and the second character may be a second half of a value of MD5 of the second object file.
For example, if the MD5 value of the second target file is a 32-bit MD5 value, the first 16-bit character is regarded as the first character of a hexadecimal number, and the last 16-bit character is regarded as the second character of the hexadecimal number.
Step S402, judging whether a second Hash check value of the second target file is consistent with a first Hash check value of the first target file;
the second hash check value may be an MD5 string, which is a hash function widely used in the field of computers to provide integrity protection for messages.
And judging whether the second hash check value of the second target file is consistent with the first hash check value of the first target file or not, comparing the MD5 character string of the first target file with the MD5 character string of the second target file by the server, and judging whether the second hash check value of the second target file is consistent with the first hash check value of the first target file.
Step S403, if the second hash check value of the second target file is consistent with the first hash check value, determining whether the second pixel coordinate is consistent with the first pixel coordinate of the first target file;
for example, the MD5 string of the first object file is: BCJSIJECBHDTEGDJKK738GEDT5578397, the MD5 character string of the second target file is as follows: WOJDHGU84375HJKDFY79827UHF748294, if the server judges that the two are not consistent, the server further determines that the second target file and the first target file are not the same file; if the MD5 string of the second object file is: BCJSIJECBHDTEGDJKK738GEDT5578397, if the server judges that the two are consistent, further judgment is needed.
And judging whether the second pixel point coordinate is consistent with the first pixel point coordinate of the first target file or not, namely calculating the second pixel point coordinate of the second target file according to the method from the step S201 to the step S204, drawing a point primary color value for the second pixel point, and comparing the first target file with the second target file by using a drawing tool.
Step S404, if the second pixel point coordinate is consistent with the first pixel point coordinate, determining the second target file and the first target file as the same file.
If the second pixel point coordinate is consistent with the first pixel point coordinate, determining the second target file and the first target file as the same file may be, under the precondition that the MD5 character strings of the first target file and the second target file are consistent, determining that the pixel points of the second target file and the first target file are consistent in color, determining that the second target file and the second target file are the same file, that is, determining that the second target file is not authorized to use the first target file.
If yes is determined in both step S402 and step S403, the usage cannot be determined as unauthorized, and if one of the conditions is not satisfied, the usage cannot be determined as unauthorized.
According to an embodiment of the present application, there is also provided an apparatus 10 for implementing the above-mentioned file watermark generating method, as shown in fig. 5, the apparatus 10 includes:
an obtaining module 110, configured to obtain a first target file to be used for generating a dynamic digital watermark; a ciphertext module 120, configured to generate a ciphertext from the first target file; a hash check value module 130, configured to calculate a first hash check value of the first target file according to the ciphertext; a pixel point coordinate module 140, which calculates a first pixel point coordinate according to the first hash check value; the drawing module 150 draws the dynamic digital watermark according to the first pixel point coordinate; a buffer module 160, the buffer module 160 comprising: the first server is used for caching the first character and the second character of the intercepted first hash check value; the second server is used for caching the abscissa of the coordinate of the first pixel point calculated according to the first character and the width by a first preset method and the ordinate of the coordinate of the first pixel point calculated according to the second character and the height by a second preset method; and the third server is used for caching the black dynamic digital watermark drawn when the color corresponding to the first pixel point coordinate is white and the white dynamic digital watermark drawn when the color corresponding to the first pixel point coordinate is not white.
According to an embodiment of the present application, there is also provided an apparatus 20 for implementing the above-mentioned file watermark detection method, as shown in fig. 6, the present application provides a file watermark detection apparatus 20, where the watermark detection apparatus 20 includes:
an obtaining unit 210, configured to obtain a second pixel coordinate of the second target file; a first determining unit 220, configured to determine whether a second hash check value of the second target file is consistent with a first hash check value of the first target file; a second determining unit 230, configured to determine whether the second pixel coordinate is consistent with the first pixel coordinate of the first target file if the second hash check value of the second target file is consistent with the first hash check value; the determining unit 240 is configured to determine that the second target file and the first target file are the same file if the second pixel coordinate is consistent with the first pixel coordinate.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (7)

1. A method for generating a watermark for a document, comprising:
acquiring a first target file to be generated with a dynamic digital watermark;
generating a ciphertext on the first target file;
calculating a first hash check value of the first target file according to the ciphertext;
calculating a first pixel point coordinate according to the first hash check value; and
drawing a dynamic digital watermark according to the first pixel point coordinate;
after generating the ciphertext on the first target file, the method further includes:
acquiring the width of the first target file; and
acquiring the height of the first target file;
wherein, calculating the coordinates of the first pixel point according to the first hash check value comprises:
intercepting a first character and a second character of the first hash check value, wherein the first character is the first N bits of the first hash check value, and the second character is the last N bits of the first hash check value; n is a preset check bit;
calculating the abscissa of the coordinate of the first pixel point according to the first character and the width and a first preset method;
calculating to obtain a vertical coordinate of the first pixel point coordinate according to the second character and the height and a second preset method;
and obtaining the coordinates of the first pixel point according to the horizontal coordinates and the vertical coordinates.
2. The method of generating a watermark for a file according to claim 1, wherein rendering a dynamic digital watermark according to the coordinates of the first pixel point comprises:
judging whether the color corresponding to the first pixel point coordinate is white or not;
if the color corresponding to the first pixel point coordinate is white, drawing a black dynamic digital watermark;
and if the color corresponding to the first pixel point coordinate is not white, drawing the white dynamic digital watermark.
3. A method for detecting the watermark generated by the file watermark generation method according to claim 1, comprising:
acquiring a second pixel point coordinate of a second target file;
judging whether a second hash check value of the second target file is consistent with a first hash check value of the first target file or not;
if the second hash check value of the second target file is consistent with the first hash check value, judging whether the second pixel point coordinate is consistent with the first pixel point coordinate of the first target file; and
if the second pixel point coordinate is consistent with the first pixel point coordinate, determining the second target file and the first target file as the same file;
wherein, obtaining the second pixel point coordinate of the second target file comprises:
intercepting a third character and a fourth character of the second hash check value, wherein the third character is the first N bits of the second hash check value, and the fourth character is the last N bits of the second hash check value;
calculating the third character according to a first preset method to obtain the abscissa of the coordinate of the second pixel point;
and calculating the fourth character according to a second preset method to obtain the ordinate of the second pixel point coordinate.
4. A watermark generation apparatus for a document, comprising:
the acquisition module is used for acquiring a first target file of which the dynamic digital watermark is to be generated;
the ciphertext module is used for generating a ciphertext on the first target file;
the hash check value module is used for calculating a first hash check value of the first target file according to the ciphertext;
the pixel point coordinate module is used for calculating a first pixel point coordinate according to the first Hash check value;
the drawing module is used for drawing the dynamic digital watermark according to the first pixel point coordinate;
after a ciphertext is generated on the first target file, the width of the first target file is obtained, and the height of the first target file is obtained;
the pixel point coordinate module intercepts a first character and a second character of the first hash check value, wherein the first character is the front N bits of the first hash check value, the second character is the back N bits of the first hash check value, N is a preset check bit, the abscissa of the first pixel point coordinate is calculated according to the first character and the width and a first preset method, the ordinate of the first pixel point coordinate is calculated according to the second character and the height and a second preset method, and the first pixel point coordinate is obtained according to the abscissa and the ordinate.
5. The file watermark generation apparatus according to claim 4, further comprising: a caching module, the caching module comprising: the first server is used for caching the first character and the second character of the intercepted first hash check value; the second server is used for caching the abscissa of the coordinate of the first pixel point calculated according to the first character and the width by a first preset method and the ordinate of the coordinate of the first pixel point calculated according to the second character and the height by a second preset method; and the third server is used for caching the black dynamic digital watermark drawn when the color corresponding to the first pixel point coordinate is white and the white dynamic digital watermark drawn when the color corresponding to the first pixel point coordinate is not white.
6. A detection apparatus applying the method of detecting a watermark according to claim 3, comprising:
the acquisition unit is used for acquiring a second pixel point coordinate of the second target file;
a first judging unit, configured to judge whether a second hash check value of the second target file is consistent with a first hash check value of the first target file;
a second judging unit, configured to judge whether a second pixel coordinate of the second target file is consistent with a first pixel coordinate of the first target file if a second hash check value of the second target file is consistent with the first hash check value;
a determining unit, configured to determine that the second target file and the first target file are the same file if the second pixel coordinate is consistent with the first pixel coordinate;
the acquiring unit intercepts a third character and a fourth character of the second hash check value, wherein the third character is the first N bits of the second hash check value, the fourth character is the last N bits of the second hash check value, the third character is calculated according to a first preset method to obtain the abscissa of the second pixel coordinate, and the fourth character is calculated according to a second preset method to obtain the ordinate of the second pixel coordinate.
7. A storage medium having stored thereon a dynamic digital watermark generation program that implements the file watermark generation method according to any one of claims 1 to 2, and a detection program that implements the method for detecting a watermark according to claim 3.
CN201810576489.5A 2018-06-06 2018-06-06 Method and device for generating and detecting file watermark Active CN108763880B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810576489.5A CN108763880B (en) 2018-06-06 2018-06-06 Method and device for generating and detecting file watermark

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810576489.5A CN108763880B (en) 2018-06-06 2018-06-06 Method and device for generating and detecting file watermark

Publications (2)

Publication Number Publication Date
CN108763880A CN108763880A (en) 2018-11-06
CN108763880B true CN108763880B (en) 2022-02-11

Family

ID=64000305

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810576489.5A Active CN108763880B (en) 2018-06-06 2018-06-06 Method and device for generating and detecting file watermark

Country Status (1)

Country Link
CN (1) CN108763880B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110781463B (en) * 2019-10-29 2023-06-23 北京中电普华信息技术有限公司 Watermark information adding method and device
CN111400670B (en) * 2020-03-06 2023-12-15 全球能源互联网研究院有限公司 Watermark adding method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103839217A (en) * 2012-11-21 2014-06-04 句容中新软件科技有限公司 Watermark image realization method
CN103873954A (en) * 2012-12-13 2014-06-18 航天信息股份有限公司 Method of embedding invisible digital watermarking into streaming media, and apparatus and system thereof
CN106228502A (en) * 2016-07-15 2016-12-14 北华航天工业学院 The digital watermark embedding of satellite remote-sensing image tiff file and extracting method
CN106228503A (en) * 2016-07-15 2016-12-14 北华航天工业学院 The digital watermark embedding of satellite remote-sensing image SHP dot file and extracting method
CN106778106A (en) * 2016-12-05 2017-05-31 武汉圆周率软件科技有限公司 Copyright protection method and system based on modified LSB algorithms

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4716357B2 (en) * 2005-03-29 2011-07-06 Kddi株式会社 Compressed data scramble delivery device, playback device and delivery / playback device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103839217A (en) * 2012-11-21 2014-06-04 句容中新软件科技有限公司 Watermark image realization method
CN103873954A (en) * 2012-12-13 2014-06-18 航天信息股份有限公司 Method of embedding invisible digital watermarking into streaming media, and apparatus and system thereof
CN106228502A (en) * 2016-07-15 2016-12-14 北华航天工业学院 The digital watermark embedding of satellite remote-sensing image tiff file and extracting method
CN106228503A (en) * 2016-07-15 2016-12-14 北华航天工业学院 The digital watermark embedding of satellite remote-sensing image SHP dot file and extracting method
CN106778106A (en) * 2016-12-05 2017-05-31 武汉圆周率软件科技有限公司 Copyright protection method and system based on modified LSB algorithms

Also Published As

Publication number Publication date
CN108763880A (en) 2018-11-06

Similar Documents

Publication Publication Date Title
US7171021B2 (en) Data processing apparatus and method, and storage medium therefor
Rey et al. A survey of watermarking algorithms for image authentication
US20140219495A1 (en) Method and system for adding and detecting watermark
JP6127226B1 (en) Image processing apparatus, image processing method, and program
Yeung et al. Fragile watermarking of three-dimensional objects
CN111680273B (en) Watermark embedding method, watermark embedding device, electronic equipment and readable storage medium
CN110674477A (en) Document source tracing method and device based on electronic file security identification
CN112307520B (en) Electronic seal adding and verifying method and system
CN110796586B (en) Blind watermarking method and system based on digital dot matrix and readable storage medium
KR20120070664A (en) System for tracking illegal distributeur and preventing distribution of illegal content and method thereof
CN108763880B (en) Method and device for generating and detecting file watermark
CN115527101A (en) Image tampering detection method and processor
US20120174232A1 (en) Mechanism for embedding device identification information into graphical user interface objects
JP6127225B1 (en) Image processing apparatus, image processing method, and program
JP6127227B1 (en) Image processing apparatus, image processing method, and program
González-Lee et al. Script format document authentication scheme based on watermarking techniques
CN115270084A (en) Blind watermark encryption implementation method based on screenshot information protection
JP4220661B2 (en) Electronic document falsification detection method and apparatus
CN112004148B (en) Video processing method, video processing device, computer equipment and storage medium
CN114092307A (en) Watermark generation method, watermark addition method, watermark tracing equipment and storage medium
Fitriyanto et al. Implementation SHA512 hash function and Boyer-Moore string matching algorithm for Jpeg/exif message digest compilation
TWI536312B (en) Anti - copy image generation system and its operation method
JP3891328B2 (en) Data processing apparatus and data processing method
JP2000155718A (en) Copyright protecting device and computer-readable storage medium
CN117473470B (en) Dynamic watermark generation method and system and watermark tracing method

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