Method and device for watermark generation and use of watermark for document tracing

By dynamically generating irregular watermarks and invisible watermarks, combined with the watermark database, the problem of easy modification and forgery of watermarks is solved, and high reliability and accurate file traceability is achieved.

CN115114598BActive Publication Date: 2024-09-27SHANGHAI YISAIQI SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210740345.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-28
Publication Date
2024-09-27
Estimated Expiration
2042-06-28

AI Technical Summary

Technical Problem

Existing watermarks are easily modified and forged, and their traceability is poor and cannot be effectively traced to specific individuals.

Method used

Use a dynamic mechanism to generate irregular watermarks, combine visible and invisible watermarks, record and embed watermark generation requests, encrypted information and watermark generation parameters to improve the difficulty of watermark modification and forgery, and achieve file traceability through a watermark database.

Benefits of technology

It improves the reliability and traceability of watermarks, enhances the confidentiality and traceability of files, and ensures that information can be accurately traced back to specific users and terminals after information is leaked.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115114598B
    Figure CN115114598B
Patent Text Reader

Abstract

The present invention discloses a method and device for watermark generation and watermark use for file tracing. The watermark generation includes: a watermark client generates a watermark generation request; a watermark server obtains watermark content, encryption information and parameter values ​​of watermark generation parameters according to the watermark generation request and a preset watermark generation rule, and records the relevant information into a watermark database; the watermark client generates a visible watermark on a target page according to the watermark content and the parameter values ​​of the watermark generation parameters, and generates an invisible watermark on the target page according to the encryption information. The watermark is used for file tracing, including: reading the visible watermark and the invisible watermark through a computer program, matching the watermark content of the visible watermark, the parameter values ​​of the watermark generation parameters, and the encryption information of the invisible watermark with the watermark database respectively, obtaining the user information and terminal information corresponding to the file according to the matching result, and completing the file tracing. The present invention can increase the difficulty of modifying and forging the watermark, and improve the reliability and traceability of the watermark.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a method and a device for generating a watermark and using the watermark for file tracing, and belongs to the technical field of information security. Background Art

[0002] In order to protect sensitive information from being leaked, many companies use watermarks to encrypt and protect important files. Watermarks can be printed on paper documents or displayed on electronic screens or specific windows. Watermarks can not only remind operators that the information they are reading is sensitive, but also be used to trace the source when the information is leaked.

[0003] At present, most watermarks are visible and have several fixed forms. Fixed and visible watermarks are easy to identify and have low production costs, but they are also easy to modify and forge, which reduces the reliability of the watermark and makes it difficult to trace the source through the watermark. In addition, if the information is leaked, the existing watermarks often cannot be traced back to specific individuals, and the traceability capability needs to be improved. Summary of the invention

[0004] In order to solve the problems in the prior art that watermarks are easy to modify, forge and have poor traceability, the present invention proposes a method and device for watermark generation and use of watermarks for file tracing, introduces a dynamic mechanism to generate irregular watermarks, and adds invisible watermarks, which can increase the difficulty of modifying and forging watermarks and improve the reliability and traceability of watermarks.

[0005] In order to solve the above technical problems, the present invention adopts the following technical means:

[0006] In a first aspect, the present invention proposes a watermark generation method, comprising the following steps:

[0007] Get watermark generation request;

[0008] Obtaining watermark content, encryption information and parameter values ​​of watermark generation parameters according to a watermark generation request and a preset watermark generation rule;

[0009] Recording the watermark generation request, watermark content, encryption information and parameter values ​​of watermark generation parameters into a watermark database;

[0010] Generate a visible watermark on a target page according to the watermark content and parameter values ​​of the watermark generation parameters;

[0011] Generate an invisible watermark on the target page based on the encrypted information;

[0012] The watermark generation parameters include the font type, font size, color, number of lines, and font offset angle of the watermark, and the encrypted information is used as a parameter value in the watermark generation parameters.

[0013] In combination with the first aspect, further, the watermark generation request includes user information, terminal information, request time and target page information.

[0014] In combination with the first aspect, further, the watermark generation rule includes a watermark format, a value range of a watermark generation parameter and an encryption information generation logic.

[0015] In combination with the first aspect, further, a method for obtaining watermark content, watermark generation parameters and encryption information according to a watermark generation request and a preset watermark generation rule is:

[0016] According to a preset watermark format, the user information, terminal information and / or request time in the watermark generation request are used to form the watermark content;

[0017] According to the watermark generation request, the encrypted information is obtained by using the preset encryption information generation logic;

[0018] The encrypted information is used as a parameter value in the watermark generation parameters, and parameter values ​​of other watermark generation parameters are randomly generated within the value range of the watermark generation parameters.

[0019] In combination with the first aspect, further, the encryption information generation logic includes: using directional information in the watermark generation request as the encryption information.

[0020] In combination with the first aspect, further, the invisible watermark adopts a Braille pattern, and uses the approximate color of the target page to embed the encrypted information in the target page in the form of Braille, wherein the difference between the RGB value of the approximate color and the RGB value of the target page is not greater than 20.

[0021] In combination with the first aspect, further, the invisible watermark adopts an encrypted pattern and uses an image encryption algorithm to embed the encrypted information into the target page.

[0022] In a second aspect, the present invention proposes a watermark generation device based on the watermark generation method of the first aspect, comprising:

[0023] The watermark server is used to obtain a watermark generation request, obtain the watermark content, encryption information and parameter values ​​of the watermark generation parameters according to the watermark generation request and a preset watermark generation rule, and record the watermark generation request, watermark content, encryption information and parameter values ​​of the watermark generation parameters into a watermark database;

[0024] The watermark client is used to generate a watermark generation request, obtain the watermark content, encryption information and parameter values ​​of the watermark generation parameters, generate a visible watermark on the target page according to the watermark content and the parameter values ​​of the watermark generation parameters, and generate an invisible watermark on the target page according to the encryption information;

[0025] The watermark generation parameters include the font type, font size, color, number of lines, and font offset angle of the watermark, and the encrypted information is used as a parameter value in the watermark generation parameters.

[0026] In a third aspect, the present invention proposes a watermark-based file tracing method, comprising the following steps:

[0027] Acquire a file containing a visible watermark and an invisible watermark, wherein the visible watermark and the invisible watermark are generated by the watermark generation method according to the first aspect;

[0028] Read the visible watermark and the invisible watermark through a computer program, and decrypt the invisible watermark to obtain the watermark content, the parameter value of the watermark generation parameter, and the encryption information of the invisible watermark;

[0029] Matching the watermark content of the visible watermark, the parameter value of the watermark generation parameter, and the encryption information of the invisible watermark with the watermark database respectively;

[0030] Based on the matching results, it is determined whether the visible and invisible watermarks on the file are forged. At the same time, the user information and terminal information corresponding to the file are extracted from the watermark database to complete the file tracing.

[0031] In a fourth aspect, the present invention proposes a watermark-based file tracing device, comprising:

[0032] A file acquisition module, used to acquire files containing visible watermarks and invisible watermarks, wherein the visible watermarks and invisible watermarks are generated by the watermark generation method described in the first aspect;

[0033] A watermark reading module is used to read the visible watermark and the invisible watermark through a computer program, and decrypt the invisible watermark to obtain the watermark content, the parameter value of the watermark generation parameter, and the encryption information of the invisible watermark;

[0034] A data matching module is used to match the watermark content of the visible watermark, the parameter value of the watermark generation parameter, and the encryption information of the invisible watermark with the watermark database to obtain a matching result;

[0035] The anti-counterfeiting and tracing module is used to determine whether the visible watermark and invisible watermark on the file are forged based on the matching results, and to extract the user information and terminal information corresponding to the file from the watermark database to complete the file tracing.

[0036] The following advantages can be obtained by using the above technical means:

[0037] The present invention proposes a method and device for watermark generation and watermark use for file tracing. In the watermark generation method and device, the present invention introduces visible watermark and invisible watermark, and adjusts the watermark content and watermark generation parameters of the visible watermark through a dynamic mechanism, thereby improving the flexibility and variability of the visible watermark. The invisible watermark is embedded in the target page through Braille or encrypted patterns, which can further protect important files. The visible watermark and invisible watermark can increase the difficulty of watermark modification and forgery, and improve the effectiveness and reliability of watermark confidentiality. In the watermark-based file tracing method and device, the present invention stores watermark-related information through a watermark database, and parses the visible watermark and invisible watermark through a computer program after the file is leaked, obtains the watermark content, watermark generation parameters and encryption information, and matches the information with the watermark database, thereby realizing the tracing function. The watermark content, watermark generation parameters and encryption information are mutually verified, which can effectively improve the traceability of the watermark and improve the accuracy and reliability of tracing. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 A flow chart of the steps of a watermark generation method of the present invention;

[0039] Figure 2 is a schematic diagram of a visible watermark in an embodiment of the present invention;

[0040] Figure 3 A comparison diagram of Braille and numbers in an embodiment of the present invention;

[0041] Figure 4 The present invention is a flowchart of the steps of a watermark-based file tracing method. DETAILED DESCRIPTION

[0042] The technical solution of the present invention is further described below in conjunction with the accompanying drawings:

[0043] Embodiment 1:

[0044] The present invention proposes a watermark generation method, which performs watermark generation operation through a watermark client and a watermark server. The server can dynamically adjust the style and content of the watermark, and the client generates the watermark in real time after obtaining the watermark related information. Figure 1 As shown, the specific steps include:

[0045] Step A, get the watermark generation request. Run the watermark client on a PC, mobile phone or other electronic device. The watermark client is a continuously running application that automatically connects to the watermark server after the system is turned on. There are many ways to connect, such as HTTP or socket connection. After the connection is successful, the watermark client enters the normal operation state. If the connection is unsuccessful, it is necessary to continuously retry the connection. In the normal operation state, when the trigger condition (such as turning on the computer, opening a web page, APP or document) occurs, the watermark client reads the information of the terminal and the logged-in user information to generate a watermark generation request and send it to the watermark server.

[0046] The watermark generation request includes user information, terminal information, request time, target page information and other information. User information includes employee name, employee number, etc. Terminal information includes terminal name, terminal number, terminal IP, terminal hardware identification, etc. The request time uses the current time of the watermark client, or the time when the user opens the web page, APP or document that needs to be kept confidential. The target page information is the information of the web page, APP page, window or document that needs to be kept confidential.

[0047] Step B: obtaining watermark content, encryption information and parameter values ​​of watermark generation parameters according to the watermark generation request and preset watermark generation rules.

[0048] In the embodiment of the present invention, the watermark generation rules include the watermark format, the value range of the watermark generation parameters and the encryption information generation logic; the watermark generation parameters include the watermark font type, font size (12~32), color, number of lines, font offset angle (0~360°), character spacing, line spacing, etc.

[0049] Step B01: According to a preset watermark format, the user information, terminal information and / or request time in the watermark generation request are used to form the watermark content. The watermark format can be a fixed format, such as employee number + request time, or a semi-fixed format, such as employee number + any other information. In the semi-fixed format, the fixed content can be information that accurately refers to an individual.

[0050] Step B02: According to the watermark generation request, the encrypted information is obtained using the preset encryption information generation logic. The encrypted information can be numbers or other characters. Since the amount of information that can be encrypted is limited, the encrypted information has a range limit. The total length of the string should not be too large, and is generally set within 16 characters. The encryption information generation logic includes: using the directional information in the watermark generation request as the encryption information, so as to trace the specific watermark generation request according to the encryption information, for example, using the user information as the encryption information.

[0051] In an embodiment of the present invention, the encrypted information is a number, and the encryption information generation logic can use the number in the watermark generation request as the encryption information, for example, using the employee number in the user information as the encryption information; or the number obtained after operating the watermark generation request can be used as the encryption information, for example, according to the first letter of each character in the user's name, the corresponding number is searched in the nine-square grid, and the encrypted information is obtained after adding it to the terminal number.

[0052] Step B03: Use the encrypted information as a parameter value in the watermark generation parameters, and randomly generate parameter values ​​of other watermark generation parameters within the value range of the watermark generation parameters.

[0053] When the encrypted information is a number, the encrypted information can be used as a parameter value of font size, color (RGB value), number of lines or font offset angle. When the encrypted information is other characters, the encrypted information can be converted into a number or text type through a custom mapping relationship, and then used as a parameter value of the watermark generation parameter. In an embodiment of the present invention, the user's employee number is selected as the encrypted information, and the encrypted information is used as the parameter value of the font offset angle. For example, if the employee number of a user is 20, when the employee logs in to the watermark client and sends a watermark generation request, the font offset angle of the visible watermark is set to 20.

[0054] Using encrypted information as a parameter value of watermark generation parameters can embed encrypted information into visible watermarks, which can improve the variability of visible watermarks. At the same time, visible watermarks can be mutually verified with invisible watermarks, which is conducive to improving the traceability of watermarks.

[0055] Step C: recording the watermark generation request, watermark content, encryption information and parameter values ​​of watermark generation parameters into the watermark database, which is conducive to finding watermark related information and reducing the difficulty of tracing.

[0056] Step D: Generate a visible watermark on the target page according to the watermark content and the parameter values ​​of the watermark generation parameters, such as Figure 2 shown.

[0057] Step E: Generate an invisible watermark on the target page according to the encrypted information. The invisible watermark can be a Braille pattern or an encrypted pattern.

[0058] When the invisible watermark is selected as a Braille pattern, Figure 3The encrypted information is converted into a Braille pattern based on the correspondence between Braille and numbers in the target page, and then the encrypted information is embedded in the target page in the form of Braille using the approximate color of the target page, wherein the difference between the RGB value of the approximate color and the RGB value of the target page is no more than 20. By embedding the Braille pattern in the target page using the approximate color, on the one hand, the probability of the naked eye recognizing the invisible watermark can be reduced, and on the other hand, the Braille pattern and the background of the target page can be accurately distinguished by machine analysis of the RGB value of the pixel.

[0059] When the invisible watermark adopts an encrypted pattern, the encrypted information is embedded in the target page using an image encryption algorithm. The encrypted pattern can be embedded in a fixed area, such as dividing the screen into multiple blocks of a fixed size of 256*256, selecting the middle block and the bottom right corner block for encryption, and for the blocks to be encrypted, first intercept the image of the block, apply discrete cosine transform, then add the encrypted information to the high-frequency signal, and then inversely transform it back to obtain the encrypted pattern, and finally put the encrypted pattern into the target page to complete the invisible watermark. The image encrypted by the image encryption algorithm is almost the same as the original image, and even if the image is scaled and cropped, the encrypted information can be restored more stably. In an embodiment of the present invention, the python library blind-watermark is called to implement the encrypted pattern.

[0060] Embodiment 2:

[0061] Based on the method in Example 1, the present invention also proposes a watermark generation device, which includes multiple watermark clients and a watermark server. The watermark client is generally installed on the computer of the enterprise employee, and the watermark server is installed in the enterprise local area network. The watermark client exchanges information with the watermark server through the network. The watermark client sends a watermark generation request to the watermark server. The watermark server records the request of the watermark client and returns the parameters required for watermark generation. The watermark client completes the watermark generation operation.

[0062] The watermark server obtains the watermark generation request, and obtains the watermark content, encryption information, and parameter values ​​of the watermark generation parameters according to the watermark generation request and the preset watermark generation rules; the watermark generation parameters include the font type, font size, color, number of lines, font offset angle of the watermark, and the encryption information can be used as a parameter value in the watermark generation parameters. The watermark server sends the watermark content, encryption information, and watermark generation parameters to the watermark client, and records the watermark generation request, watermark content, encryption information, and parameter values ​​of the watermark generation parameters in the watermark database for subsequent query.

[0063] The watermark client generates a watermark generation request based on the current terminal information, user information (e.g., name, number), current time, etc., and sends it to the watermark server. The watermark client has preset multiple watermark generation methods, including visible watermarks and invisible watermarks. Invisible watermarks use Braille patterns or encrypted patterns. After the watermark client obtains the watermark content, encryption information, and parameter values ​​of the watermark generation parameters, it generates a visible watermark on the target page based on the watermark content and the parameter values ​​of the watermark generation parameters, selects the form of the visible watermark, and generates an invisible watermark on the target page based on the encryption information.

[0064] Administrators can update the watermark generation rules on the watermark server at any time. The update can be for all users or for specified users. After the rules are updated, when the watermark client sends a watermark generation request again, the watermark will be generated according to the new watermark generation rules.

[0065] The present invention introduces visible watermarks and invisible watermarks, and adjusts the watermark content and watermark generation parameters of the visible watermark through a dynamic mechanism, thereby improving the flexibility and variability of the visible watermark. The invisible watermark is embedded in the target page through Braille or encrypted patterns, which can further protect important documents. The visible watermarks and invisible watermarks can increase the difficulty of watermark modification and forgery, and improve the effectiveness and reliability of watermark confidentiality.

[0066] Embodiment 3:

[0067] Considering that the role of watermark is to prevent file leakage and to trace the source of leakage after the file is leaked, the present invention also proposes a file tracing method based on watermark, such as Figure 4 As shown, the following steps are included:

[0068] Step A: Obtain a file containing a visible watermark and an invisible watermark. The file here may be a leaked screenshot, photo, document, etc., wherein the visible watermark and the invisible watermark are generated by the watermark generation method in Example 1.

[0069] Step B: read the visible watermark and invisible watermark through a computer program, and decrypt the invisible watermark to obtain the watermark content, the parameter value of the watermark generation parameter, and the encryption information of the invisible watermark. If the invisible watermark is a Braille pattern, Figure 3 The Braille pattern is converted into encrypted information. If the invisible watermark is an encrypted pattern, the encrypted information is reversely decoded through the image encryption algorithm.

[0070] Step C, matching the watermark content of the visible watermark, the parameter value of the watermark generation parameter, and the encryption information of the invisible watermark with the watermark database respectively. If the same information exists in the watermark database, the match is successful, and the watermark generation request with the successful match is extracted to obtain the matching result.

[0071] Step D: Based on the matching results, determine whether the visible watermark and invisible watermark on the file are forged, and extract the user information and terminal information corresponding to the file from the watermark database to complete the file tracing.

[0072] In general, the watermark content and the parameter values ​​of the watermark generation parameters are first read from the visible watermark, and the same information is searched from the watermark database based on the watermark content and the parameter values ​​of the watermark generation parameters. If the same information can be found, the user information and terminal information are directly output according to the watermark generation request, and the tracing is completed. If the same information cannot be found, the visible watermark is likely to be modified. At this time, the encrypted information is extracted from the visible watermark and the invisible watermark respectively to determine whether the encrypted information of the two is consistent. If the encrypted information is consistent, it means that the encrypted information is valid, and the watermark generation request is searched from the watermark database based on the encrypted information, and the corresponding user information and terminal information are directly output, and the tracing is completed. If the encrypted information of the two is inconsistent, considering that the invisible watermark is more difficult to be modified and the probability is smaller, the invisible watermark is used as the main method, and the user information and terminal information corresponding to the encrypted information of the invisible watermark is output, and the tracing is completed.

[0073] The method of the present invention embeds encryption information in both the visible watermark and the invisible watermark. When tracing a file, the watermark content and watermark generation parameters of the visible watermark, the encryption information of the visible watermark, and the encryption information of the invisible watermark can be mutually verified. As long as one part is not completely destroyed / modified, the original watermark record can be located in the watermark database, which facilitates tracing and improves the accuracy of tracing.

[0074] Embodiment 4:

[0075] Based on the method in Example 3, the present invention also proposes a watermark-based file tracing device, including a file collection module, a watermark reading module, a data matching module, and an anti-counterfeiting and tracing module.

[0076] The file acquisition module is mainly used to obtain files containing visible watermarks and invisible watermarks, wherein the visible watermarks and invisible watermarks are generated by the watermark generation method in Example 1.

[0077] The watermark reading module is mainly used to read the visible watermark and invisible watermark through a computer program, and decrypt the invisible watermark to obtain the watermark content, the parameter value of the watermark generation parameter, and the encryption information of the invisible watermark.

[0078] The data matching module is mainly used to match the watermark content of the visible watermark, the parameter value of the watermark generation parameter, and the encryption information of the invisible watermark with the watermark database to obtain the matching results.

[0079] The anti-counterfeiting and traceability module is mainly used to determine whether the visible watermark and invisible watermark on the file are forged based on the matching results, and to extract the user information and terminal information corresponding to the file from the watermark database to complete the file traceability.

[0080] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0081] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0082] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0083] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0084] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A watermark generation method, It is characterized in that The steps include: Get watermark generation request; Obtaining watermark content, encryption information and parameter values ​​of watermark generation parameters according to a watermark generation request and a preset watermark generation rule; Recording the watermark generation request, watermark content, encryption information and parameter values ​​of watermark generation parameters into a watermark database; Generate a visible watermark on a target page according to the watermark content and parameter values ​​of the watermark generation parameters; Generate an invisible watermark on the target page based on the encrypted information; The watermark generation parameters include the font type, font size, color, number of lines, and font offset angle of the watermark, and the encrypted information is used as a parameter value of the watermark generation parameters; The watermark generation request includes user information, terminal information, request time and target page information; The watermark generation rules include watermark format, value range of watermark generation parameters and encryption information generation logic; The method for obtaining watermark content, watermark generation parameters and encryption information according to the watermark generation request and the preset watermark generation rules is: According to a preset watermark format, the user information, terminal information and / or request time in the watermark generation request are used to form the watermark content; According to the watermark generation request, the encrypted information is obtained by using the preset encryption information generation logic; The encrypted information is used as a parameter value in the watermark generation parameters, and parameter values ​​of other watermark generation parameters are randomly generated within the value range of the watermark generation parameters; The encryption information generation logic includes: using the directional information in the watermark generation request as the encryption information; The invisible watermark adopts a Braille pattern or an encrypted pattern; When the invisible watermark adopts a Braille pattern, the encrypted information is embedded in the target page in the form of Braille using an approximate color of the target page, wherein the difference between the RGB value of the approximate color and the RGB value of the target page is not greater than 20; When the invisible watermark adopts an encrypted pattern, the encrypted information is embedded into the target page using an image encryption algorithm.

2. A watermark generation device based on the watermark generation method according to claim 1, It is characterized in that include: The watermark server is used to obtain a watermark generation request, obtain the watermark content, encryption information and parameter values ​​of the watermark generation parameters according to the watermark generation request and a preset watermark generation rule, and record the watermark generation request, watermark content, encryption information and parameter values ​​of the watermark generation parameters into a watermark database; The watermark client is used to generate a watermark generation request, obtain the watermark content, encryption information and parameter values ​​of the watermark generation parameters, generate a visible watermark on the target page according to the watermark content and the parameter values ​​of the watermark generation parameters, and generate an invisible watermark on the target page according to the encryption information; The watermark generation parameters include the font type, font size, color, number of lines, and font offset angle of the watermark, and the encrypted information is used as a parameter value in the watermark generation parameters.

3. A watermark-based file tracing method, It is characterized in that The steps include: Acquire a file containing a visible watermark and an invisible watermark, wherein the visible watermark and the invisible watermark are generated by the watermark generation method according to claim 1; Read the visible watermark and the invisible watermark through a computer program, and decrypt the invisible watermark to obtain the watermark content, the parameter value of the watermark generation parameter, and the encryption information of the invisible watermark; Matching the watermark content of the visible watermark, the parameter value of the watermark generation parameter, and the encryption information of the invisible watermark with the watermark database respectively; Based on the matching results, it is determined whether the visible and invisible watermarks on the file are forged. At the same time, the user information and terminal information corresponding to the file are extracted from the watermark database to complete the file tracing.

4. A file tracing device based on watermark, It is characterized in that include: A file acquisition module, used to acquire files containing visible watermarks and invisible watermarks, wherein the visible watermarks and invisible watermarks are generated by the watermark generation method according to claim 1; A watermark reading module is used to read the visible watermark and the invisible watermark through a computer program, and decrypt the invisible watermark to obtain the watermark content, the parameter value of the watermark generation parameter, and the encryption information of the invisible watermark; A data matching module is used to match the watermark content of the visible watermark, the parameter value of the watermark generation parameter, and the encryption information of the invisible watermark with the watermark database to obtain a matching result; The anti-counterfeiting and tracing module is used to determine whether the visible watermark and invisible watermark on the file are forged based on the matching results, and to extract the user information and terminal information corresponding to the file from the watermark database to complete the file tracing.