[go: up one dir, main page]

CN118940231A - Method and device for adding watermark to contract - Google Patents

Method and device for adding watermark to contract Download PDF

Info

Publication number
CN118940231A
CN118940231A CN202410448368.8A CN202410448368A CN118940231A CN 118940231 A CN118940231 A CN 118940231A CN 202410448368 A CN202410448368 A CN 202410448368A CN 118940231 A CN118940231 A CN 118940231A
Authority
CN
China
Prior art keywords
contract
watermark
text
file
module
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.)
Pending
Application number
CN202410448368.8A
Other languages
Chinese (zh)
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.)
Beijing Taijifa Zhiyi Technology Co ltd
Zhejiang Seaport Investment And Operation Group Co ltd
Original Assignee
Beijing Taijifa Zhiyi Technology Co ltd
Zhejiang Seaport Investment And Operation Group 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 Beijing Taijifa Zhiyi Technology Co ltd, Zhejiang Seaport Investment And Operation Group Co ltd filed Critical Beijing Taijifa Zhiyi Technology Co ltd
Priority to CN202410448368.8A priority Critical patent/CN118940231A/en
Publication of CN118940231A publication Critical patent/CN118940231A/en
Pending legal-status Critical Current

Links

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/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Multimedia (AREA)
  • Technology Law (AREA)
  • Editing Of Facsimile Originals (AREA)

Abstract

本发明公开了一种对合同添加水印的方法及装置,该方法包括:在合同文件审查完成后,自动生成合同编号和标记信息;获取所述合同文件,并将所述合同文件的正文读取为文件流,将所述文件流写入文本对象中;确定水印相关属性;根据所述水印相关属性将所述合同编号和所述标记信息插入所述文本对象中,生成水印版合同正文。利用本发明方案,可以提高合同的防篡改效果。

The present invention discloses a method and device for adding watermarks to contracts, the method comprising: automatically generating a contract number and marking information after the contract document review is completed; obtaining the contract document, and reading the text of the contract document as a file stream, and writing the file stream into a text object; determining watermark-related attributes; inserting the contract number and the marking information into the text object according to the watermark-related attributes to generate a watermarked version of the contract text. The scheme of the present invention can improve the anti-tampering effect of the contract.

Description

Method and device for adding watermark to contract
Technical Field
The invention relates to the technical field of information security, in particular to a method and a device for adding watermarks to a syndication.
Background
In enterprises, the falsification of contracts is a common risk problem, and moreover, the leakage of contract information can cause a certain influence or loss to the enterprises. To prevent the above risk, watermarking is generally used in the body of the contract.
The watermark is a digital protection means, in the prior art, most of the watermarks are added in contracts by adopting text or picture watermarks, and the scheme of adding the watermarks for preventing tampering and information leakage is not very sound, because after the contracts are downloaded to the local area from an application system, users can modify the content of the contracts added with watermark versions, can add the same picture watermarks or text watermarks by themselves or independently make contract texts, and can acquire the watermark patterns by other modes for adding, so that the original version cannot be distinguished, and the current version cannot be distinguished, namely, the watermark adding mode only replaces the text or the picture, and the effect of preventing tampering is not really achieved.
Disclosure of Invention
The invention provides a method and a device for adding watermarks to contracts, so as to ensure uniqueness and authenticity of the contracts.
Therefore, the invention provides the following technical scheme:
According to the method and the device for adding the watermark to the contract, after the examination of the contract file is completed, the contract number and the marking information are automatically generated; acquiring a contract file, reading the text of the contract file as a file stream, and writing the file stream into a text object; and then determining the watermark correlation attribute, and inserting the contract number and the marking information into the text object according to the watermark correlation attribute to generate a watermark version contract text. By adding contract number and marking information, the realization of the picture watermark is realized through program design, the content of the watermark has uniqueness, and the watermark cannot be imitated by other methods, so that compared with the picture watermark in the prior art, the anti-tampering effect of the contract is improved.
Further, the watermark contract text is encrypted to generate a watermark contract file, so that the editing processing of the text is effectively limited, and the security of the text is ensured.
Further, when an online contract previewing request is received, the watermark version contract text is displayed, and the reading of the contract is not influenced.
Further, when receiving the contract downloading request, removing the watermark in the watermark version contract file, and storing the contract text after removing the watermark, thereby effectively preventing the original contract file text from being tampered.
Drawings
Fig. 1 is a flowchart of a method for jointly watermarking provided by an embodiment of the present invention;
Fig. 2 is another flow chart of a method for jointly watermarking provided by an embodiment of the present invention;
FIG. 3 is an example of a contract body after watermarking with the scheme of the present invention;
Fig. 4 is a schematic structural diagram of an apparatus for co-watermarking according to an embodiment of the present invention;
Fig. 5 is a schematic flow chart of processing contracts by using the apparatus for watermarking contracts according to the embodiment of the present invention.
Detailed Description
In order to make the solution of the embodiment of the present invention better understood by those skilled in the art, the embodiment of the present invention is further described in detail below with reference to the accompanying drawings and embodiments.
The embodiment of the invention provides a method and a device for adding watermarks to a contract, which automatically generate contract numbers and marking information after the examination of a contract file is completed; acquiring the contract file, reading the text of the contract file as a file stream, and writing the file stream into a text object; determining watermark correlation properties; and inserting the contract number and the marking information into the text object according to the watermark related attribute to generate a watermark version contract body, thereby realizing effective protection of the contract body.
As shown in fig. 1, a flowchart of a method for adding watermarks in a syndication according to an embodiment of the invention includes the following steps:
Step 101, automatically generating contract number and mark information after the examination of the contract document is completed.
The contract number may be automatically generated according to a predetermined rule, for example, the following contract number generation rule may be adopted:
sign-up subject number + contract underwriting department number + year (two digits) +contract type code + running number, such as: DQGW-ZH-23-ZL-001.
Of course, in practical application, the number generation rule may be set according to the actual needs of the user, which is not limited to the embodiment of the present invention.
And 102, acquiring the contract file, reading the text of the contract file as a file stream, and writing the file stream into a text object.
Specifically, the body of the contract file is read as a file stream BufferedInputStream, which is written into the Document object.
A Document object refers to an object in an HTML Document with which the HTML Document can be checked, modified, or added with content, and events within the Document processed. On a Web page, a Document object may be referenced by a Document attribute of a Window object, or directly.
Step 103, determining watermark correlation properties.
For example, watermark related attribute setting can be sequentially performed by using a seal generation tool method seal.
The watermark correlation attribute includes any one or more of the following: size (300), color (color. Light_GRAY), edge circle (e.g., set to line shape: dot-dashed line, width: 140, height: 140), inner edge circle (e.g., set to line shape: dot-dashed line, width: 132, height: 132), inner edge circle (e.g., set to line shape: dot-dashed line, width: 120, height: 120), main word (e.g., main word content is contract number, font size 30, gap 20), center word (e.g., center word content is empty string, font size 100), head-up (e.g., head-up content is empty string, font size 22, gap 10.0, gap 68).
After the setting is completed, the seal. Draw (newFile) is called, the watermark content is generated into a seal, and the seal is stored in a ZWSY. Jpg file under the appointed directory.
And step 104, inserting the contract number and the marking information into the text object according to the watermark correlation attribute to generate a watermark version contract body.
Specifically, the Aspose technical method may be invoked to transfer the Document object NEW PARAGRAPH (doc) object generated in the step 103, and transfer the doc object and set the watermark format as the picture format new Shape (doc, shape type.image).
Then, through the shape operation, the following information is set in order:
1) Watermark picture position GETIMAGEDATA (). SetImage (image),
2) Watermark gradient setRotation (0),
3) Brightness setBrightness (0.5),
4) Contrast setContrast (0.5),
5) Watermark width setWidth (60),
6) Watermark height SETHEIGHT (230),
7) Relative horizontal position
setRelativeHorizontalPosition(RelativeHorizontalPosition.PAGE)、
8) Relative vertical position
setRelativeVerticalPosition(RelativeVerticalPosition.PAGE)、
9) Text vertical alignment SETVERTICALALIGNMENT (center),
10 Text level alignment etHorizontalAlignment (horizontal alignment).
Then, watermark Para. Appendshield (shape) is called, and inserting the set watermark into the contract text.
According to the method for adding the watermark to the contract, after the examination of the contract file is completed, contract numbers and marking information are automatically generated; acquiring a contract file, reading the text of the contract file as a file stream, and writing the file stream into a text object; and then determining the watermark correlation attribute, and inserting the contract number and the marking information into the text object according to the watermark correlation attribute to generate a watermark version contract text. By adding contract number and mark information, the content of the watermark is enriched. Compared with the watermark of the fixed picture mode in the prior art, the method and the device automatically generate the watermark through programming, and improve the anti-tampering effect of the contract.
As shown in fig. 2, another flowchart of a method for adding watermarks in a syndication according to an embodiment of the invention includes the following steps:
in step 201, after the examination of the contract document is completed, the contract number and the mark information are automatically generated.
Step 202, acquiring the contract file, reading the text of the contract file as a file stream, and writing the file stream into a text object.
In step 203, watermark correlation properties are determined.
And 204, inserting the contract number and the marking information into the text object according to the watermark correlation attribute to generate a watermark version contract body.
It should be noted that, in a specific application, the marking information may be a setting frame, for example, a circular frame, a square frame, a diamond frame, and the like. In addition, the setting frame may be represented by a solid line or a broken line, and may have one or more layers. The embodiments of the present invention are not limited in this regard.
When the contract number and the mark information are inserted, the positions of the contract number and the mark information may be set arbitrarily, for example, the contract number may be placed in the setting frame or out of the setting frame, which is not limited to the embodiment of the present invention.
And 205, carrying out encryption setting on the watermark contract text to generate a watermark contract file.
For example, text may be saved as a watermarked file via a corresponding text control indiDocx, where the saved file is encrypted via control indiDocx, thereby limiting the editing process for the text.
Fig. 3 shows an example of the body of a contract after watermarking with the scheme of the present invention.
According to the method for adding the watermark to the contract, the watermark contract file is generated by encrypting the watermark contract body, so that editing processing of the body is effectively limited, and the safety of the body is ensured.
Further, in order to facilitate the user to browse the contract text, in another non-limiting embodiment of the present invention, the method may further include: and when receiving the online preview contract request, displaying the watermark version contract text.
Further, in order to meet the downloading requirement of the user on the contract, in another non-limiting embodiment of the present invention, the method may further include: and when receiving a contract downloading request, removing the watermark in the watermark version contract file, and storing the contract text after watermark removal.
In order to prevent copy-paste tampering after the text with the watermark anti-counterfeiting mark is downloaded through the text control indiDocx, the copy operation can be performed on the text with the watermark by an API method during downloading:
indiDocxAttachmentService.copyAttachmentPhysicalByGroupCode(contra ctInfoEntity.getContractText(),false).
And after copying, removing the file watermark by calling Aspose technical API interface ct.getHeaadensFootes (). GetByHeaderFooterType (headerType). RemoveAllChild ren (), and calling a contract text preservation API method to preserve the text after removing.
Therefore, by utilizing the scheme of the invention, only the watermark-free text can be downloaded when the user downloads the contract text, and the text which is opened by online previewing is the watermark version text, thereby being convenient for the user to read the contract, facilitating the user to download the contract and effectively ensuring that the contract text cannot be tampered.
Correspondingly, the embodiment of the invention also provides a device for adding the watermarks to the combination, as shown in fig. 4, which is a schematic structural diagram of the device.
The apparatus 400 for co-watermarking in this embodiment includes the following modules:
an information generating module 401, configured to automatically generate a contract number and tag information after the examination of the contract document is completed;
A file reading module 402, configured to obtain the contract file, read a body of the contract file as a file stream, and write the file stream into a text object;
A watermark setting module 403, configured to determine a watermark correlation attribute;
And the watermark insertion module 404 is configured to insert the contract number and the marking information into the text object according to the watermark correlation attribute, and generate a watermarked contract body.
The watermark correlation attribute and the insertion mode can refer to the description in the foregoing method embodiment of the present invention, and are not repeated here.
In another non-limiting embodiment, the apparatus 400 for co-watermarking may further comprise: and the storage module (not shown) is used for carrying out encryption setting on the watermark contract text to generate a watermark contract file.
By encrypting the watermark contract text, a watermark contract file is generated, editing processing of the text is effectively limited, and the security of the text is ensured.
In another non-limiting embodiment, the apparatus 400 for co-watermarking may further comprise: a preview module, and/or a download module (not shown). Wherein:
and the preview module is used for displaying the watermark version contract text when receiving an online preview contract request.
The downloading module is used for removing the watermark in the watermark version contract file when receiving the downloading contract request; and storing the contract text after the watermark is removed.
Therefore, the requirements of the user on previewing and downloading the contract can be better met, and the fact that the body of the contract cannot be tampered can be effectively guaranteed.
Referring to fig. 5, fig. 5 illustrates an example flow of processing a contract using an apparatus for watermarking a contract provided by an embodiment of the invention.
As shown in fig. 5, after the contract approval is finished, by means of Aspose plug-ins, on the one hand, the contract number is automatically generated according to rules, and on the other hand, the dotted circle is automatically generated according to a background algorithm.
And reading the contract text, automatically inserting the contract number and the dotted circular ring into the contract text, and generating the watermark version contract text.
And then, encrypting the watermark contract text, specifically, previewing the contract text by using an application platform text control, and storing the watermark contract text as a watermark contract file.
When a user needs to view the contract, browsing by using an application platform text control, and displaying the watermark-carrying contract to the user;
when the user needs to download the contract, the application platform text control is utilized to download the downloaded contract text, namely the text without the watermark, namely the anhydrous printing plate text. Accordingly, the user can edit the text, but the user cannot download the watermark, so that the watermark version contract file cannot be tampered, and the security of the contract file is ensured.
It is noted that the terms "comprises" and "comprising," and any variations thereof, in the description and claims of the present invention and in the foregoing figures, 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 or inherent to such process, method, article, or apparatus.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. Moreover, the system embodiments described above are illustrative only, and the modules and units illustrated as separate components may or may not be physically separate, i.e., may reside on one network element, or may be distributed across multiple network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
While the embodiments of the present invention have been described in detail, the detailed description of the invention is provided herein, and the description of the embodiments is provided merely to facilitate the understanding of the method and system of the present invention, which is provided by way of example only, and not by way of limitation. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention, and the present description should not be construed as limiting the present invention. It is therefore contemplated that any modifications, equivalents, improvements or modifications falling within the spirit and principles of the invention will fall within the scope of the invention.

Claims (10)

1. A method of co-watermarking, the method comprising:
Automatically generating contract numbers and marking information after the examination of the contract files is completed;
acquiring the contract file, reading the text of the contract file as a file stream, and writing the file stream into a text object;
Determining watermark correlation properties;
and inserting the contract number and the marking information into the text object according to the watermark correlation attribute to generate a watermark version contract text.
2. The method of claim 1, wherein the marking information is a setting box.
3. The method of claim 2, wherein the setting frame is one or more layers of rings.
4. A method according to claim 3, wherein the watermark-related properties include any one or more of: watermark size, color, edge line circle, inner line circle, main word, center word and head up; the main word comprises a contract number and any one or more of the following information: font size, gap, interval of the contract number.
5. The method of claim 4, wherein the center word and/or the heads-up are empty strings.
6. The method according to any one of claims 1 to 5, further comprising:
and carrying out encryption setting on the watermark contract text to generate a watermark contract file.
7. The method of claim 6, wherein the method further comprises:
When an online contract previewing request is received, displaying the watermark version contract text; and/or
And when receiving a contract downloading request, removing the watermark in the watermark version contract file, and storing the contract text after watermark removal.
8. An apparatus for co-watermarking, the apparatus comprising:
the information generation module is used for automatically generating contract numbers and marking information after the examination of the contract files is completed;
The file reading module is used for acquiring the contract file, reading the text of the contract file as a file stream and writing the file stream into a text object;
The watermark setting module is used for determining the related attribute of the watermark;
And the watermark insertion module is used for inserting the contract number and the marking information into the text object according to the watermark correlation attribute to generate a watermark version contract text.
9. The apparatus of claim 8, wherein the apparatus further comprises:
And the storage module is used for carrying out encryption setting on the watermark contract text to generate a watermark contract file.
10. The apparatus of claim 9, wherein the apparatus further comprises: a preview module, and/or a download module;
and the preview module is used for displaying the watermark version contract text when receiving the online preview contract request.
The downloading module is used for removing the watermark in the watermark version contract file when receiving the downloading contract request; and storing the contract text after the watermark is removed.
CN202410448368.8A 2024-04-15 2024-04-15 Method and device for adding watermark to contract Pending CN118940231A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410448368.8A CN118940231A (en) 2024-04-15 2024-04-15 Method and device for adding watermark to contract

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410448368.8A CN118940231A (en) 2024-04-15 2024-04-15 Method and device for adding watermark to contract

Publications (1)

Publication Number Publication Date
CN118940231A true CN118940231A (en) 2024-11-12

Family

ID=93350532

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410448368.8A Pending CN118940231A (en) 2024-04-15 2024-04-15 Method and device for adding watermark to contract

Country Status (1)

Country Link
CN (1) CN118940231A (en)

Similar Documents

Publication Publication Date Title
US7609848B2 (en) Multi-stage watermarking process and system
US7098931B2 (en) Image management system and methods using digital watermarks
US20130073942A1 (en) Method, System, and Computer-Readable Medium To Uniformly Render Document Annotation Across Different Comuter Platforms
US20080129758A1 (en) Method and system for utilizing a JPEG compatible image and icon
CN100363856C (en) Preservation system for digitally created and digitally signed documents
JP2007305104A (en) Document management method using barcode to store access history information
JP2006501754A (en) Method and apparatus for transmitting digital photographs containing text material
US7388606B2 (en) Method and apparatus for creating a digital picture with a watermark as well as removing the watermark from the digital picture
CN110489943B (en) Page watermark tamper-proofing method and system
JP5285188B2 (en) System for controlling the distribution and use of digital work
JP5100290B2 (en) Information processing system, information processing apparatus, and information processing method
US20050120290A1 (en) Page rendered electronic file processing
JP2006202295A (en) Digital photograph management device, digital photograph management method, and computer-readable recording medium storing computer program
US20050125722A1 (en) Unreferenced object in page rendered electronic file
US9682590B1 (en) Printed document security
CN118940231A (en) Method and device for adding watermark to contract
EP0733995A1 (en) Method, apparatus and medium for delivering a processing application linked to data to be processed
KR100900922B1 (en) Ad content providing system using model image
JP2008177666A (en) Information adding device and method, information extracting device and method, printing medium, and computer program
Xu Robust and imperceptible image watermarks in stable-diffusion image editing models
JP2008527844A (en) Method and apparatus for creating digital images with watermarks, removing watermarks from digital images, and using JPEG compatible images
KR20240162748A (en) Data management system and synthetic method for learning in the financial domain
JP4692398B2 (en) Image forming apparatus and copying method
JPH11170749A (en) Card, device for manufacture of card, and card authenticating device
JP2001265587A (en) Method and system for embedding software identification information, and recording medium with software identification information embedding program recorded thereon

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