CN114357395A - Method and system for previewing document and adding watermark on line by browser - Google Patents
Method and system for previewing document and adding watermark on line by browser Download PDFInfo
- Publication number
- CN114357395A CN114357395A CN202111652791.2A CN202111652791A CN114357395A CN 114357395 A CN114357395 A CN 114357395A CN 202111652791 A CN202111652791 A CN 202111652791A CN 114357395 A CN114357395 A CN 114357395A
- Authority
- CN
- China
- Prior art keywords
- document
- watermark
- browser
- identification code
- unique identification
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 38
- 230000008569 process Effects 0.000 claims abstract description 12
- 238000002513 implantation Methods 0.000 claims description 4
- 238000006243 chemical reaction Methods 0.000 claims description 3
- 239000007943 implant Substances 0.000 claims description 3
- 238000010586 diagram Methods 0.000 description 9
- 238000004590 computer program Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 5
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/10—Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
- G06F21/16—Program or content traceability, e.g. by watermarking
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T1/00—General purpose image data processing
- G06T1/0021—Image watermarking
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Technology Law (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- General Engineering & Computer Science (AREA)
- Editing Of Facsimile Originals (AREA)
- Image Processing (AREA)
Abstract
The invention provides a method and a system for previewing a document and adding a watermark on line by a browser, which are characterized by acquiring a calling request of a requester, reading a source file according to the calling request, acquiring watermark information in the calling request and generating a unique identification code; adding the unique identification code as a watermark into a document, and implanting the blind watermark; replacing the Euler number of the character of the unique identification code, and adding a plain watermark of the document according to basic information of the watermark; converting the document added with the blind and clear watermarks into a set format, wherein characters in the document are stored in a label, and pictures in the document are converted into character strings which are spliced into the document in the set format; performing authentication of the call request; the invention can realize the online preview process of the document to add the watermark, and enhance the security of the confidential document.
Description
Technical Field
The invention belongs to the technical field of data access management, and particularly relates to a method and a system for previewing a document and adding a watermark on line by a browser.
Background
The statements in this section merely provide background information related to the present disclosure and may not necessarily constitute prior art.
In the existing domestic system, when a document is read from a browser, the document (or the file) is mostly called, after a watermark is added to the document, the document is transmitted to a client, the whole process is long, and the real-time property of online preview of the document cannot be met.
Disclosure of Invention
The invention aims to solve the problems and provides a method and a system for previewing a document and adding a watermark on line by a browser, the invention can realize the addition of the watermark in the online previewing process of the document, enhances the security of a confidential document, and can form effective deterrence to personnel who contact the document whether the document or a printed and photographed picture carries the watermark; powerful support is provided for the traceability of the document.
According to some embodiments, the invention adopts the following technical scheme:
a method for previewing a document and adding a watermark on line by a browser comprises the following steps:
acquiring a calling request of a requester, reading a source file according to the calling request, acquiring watermark information in the calling request, and generating a unique identification code;
adding the unique identification code as a watermark into a document, and implanting the blind watermark;
replacing the Euler number of the character of the unique identification code, and adding a plain watermark of the document according to basic information of the watermark;
converting the document added with the blind and clear watermarks into a set format, wherein characters in the document are stored in a label, and pictures in the document are converted into character strings which are spliced into the document in the set format;
performing authentication of the call request;
and displaying the document with the set format to the authenticated requester online through the browser.
As an alternative embodiment, the specific process of generating the unique identification code is to generate the unique identification code according to several information in the MAC address, the internet protocol address, the preview time and the user name of the requester.
As an alternative embodiment, in the process of adding the unique identification code as a watermark to the document, the unique identification code is added as a watermark to the document by using inverse fourier transform.
As an alternative embodiment, the watermark information includes watermark content and an address.
As an alternative embodiment, the basic information of the watermark includes watermark position, size, tilt angle, color, X-axis and Y-axis distance.
As an alternative embodiment, the blind, clear watermarked document is converted to an HTML file for online preview by the browser.
As an alternative embodiment, the document with the blind and clear watermark added is converted into an OFD file and stored locally.
As an alternative embodiment, the specific process of performing the authentication of the invocation request is as follows: and when the internet protocol address of the requester is consistent with the address in the watermark information in the calling request and the document is in the calling authority of the requester, the authentication is passed.
A system for a browser to preview a document and add a watermark online, comprising:
the calling request acquisition module is configured to acquire a calling request of a requester, read a source file according to the calling request, acquire watermark information in the calling request and generate a unique identification code;
the blind watermark implantation module is configured to add the unique identification code as a watermark into a document to implant the blind watermark;
the plain watermark implanting module is configured to replace the Euler number of the character for the unique identification code, and add the plain watermark of the document according to the basic information of the watermark;
the conversion module is configured to convert the document added with the blind and clear watermarks into a set format, wherein characters in the document are stored in a label, and pictures in the document are converted into character strings which are spliced into the document in the set format;
an authentication module configured to perform authentication of the invocation request;
and the online presentation module is configured to display the document with the set format to the authenticated requester online through the browser.
An electronic device comprising a memory and a processor and computer instructions stored on the memory and executed on the processor, the computer instructions, when executed by the processor, performing the steps of the above method.
A computer readable storage medium storing computer instructions which, when executed by a processor, perform the steps of the above method.
Compared with the prior art, the invention has the beneficial effects that:
the method is simple and easy to use, lowers the threshold of employees, saves the labor input, can avoid the problem of unavailable transcoding caused by the problem of font library in a domestic environment, and improves the development efficiency.
The invention can realize two functions of adding watermarks and previewing on line, can be suitable for adding watermarks in various files, and has wide application.
The invention can effectively protect the confidential documents through the light watermark and the dark watermark.
The invention contains a safety authentication mechanism, so that other terminals cannot access the previewed document even if the URL is copied, and the safety of the document is ensured.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, are included to provide a further understanding of the invention, and are incorporated in and constitute a part of this specification, illustrate exemplary embodiments of the invention and together with the description serve to explain the invention and not to limit the invention.
Fig. 1 is a system architecture diagram of the present embodiment.
The specific implementation mode is as follows:
the invention is further described with reference to the following figures and examples.
It is to be understood that the following detailed description is exemplary and is intended to provide further explanation of the invention as claimed. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
It is noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of exemplary embodiments according to the invention. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, and it should be understood that when the terms "comprises" and/or "comprising" are used in this specification, they specify the presence of stated features, steps, operations, devices, components, and/or combinations thereof, unless the context clearly indicates otherwise.
As shown in fig. 1, the two information transmission parties involved in the present invention are a server side and a user side, which communicate with each other through the internet.
And the user side sends a calling request to the server side, wherein the calling request comprises document information to be called, watermark information to be added and basic information of the user side.
The watermark information comprises watermark content, addresses and basic information (the position, the size, the inclination angle, the color, the X-axis distance and the Y-axis distance of the watermark in the document);
the basic information of the user side includes a MAC address, an IP address, preview time, a user name, and the like.
The server side reads a corresponding source file according to the calling request, stores the source file into a database according to the transmitted watermark information, and returns a unique identification code UUID;
and adding the unique identification code UUID as a watermark into the document through inverse Fourier transform to complete the implantation of the blind watermark, and simultaneously calling a built-in font library to complete the replacement of Euler number of the character of the unique identification code UUID. And according to the position, size, inclination angle, color, X-axis and Y-axis distances of the watermark in the calling request, using the converted Euler number of the character as a clear watermark, and adding clear watermark information of the document at the specified position of the document in the basic information.
And the server converts the document added with the watermark into an OFD file for local storage.
And the server end converts the document added with the watermark into an HTML file, wherein the characters of the document are stored by SPAN labels, and the pictures in the document are converted into BASE64 character strings which are spliced into the HTML document.
Authenticating the calling authority of the HTML document, and allowing the terminal to access only when the IP address of the accessed user end is consistent with the address in the watermark information or the address in the calling request;
and after the authentication is passed, the user side opens the returned HTML file through the browser.
At this point, the preview of the document and the addition of the watermark are completed.
The invention also provides the following product examples:
a system for a browser to preview a document and add a watermark online, comprising:
the calling request acquisition module is configured to acquire a calling request of a requester, read a source file according to the calling request, acquire watermark information in the calling request and generate a unique identification code;
the blind watermark implantation module is configured to add the unique identification code as a watermark into a document to implant the blind watermark;
the plain watermark implanting module is configured to replace the Euler number of the character for the unique identification code, and add the plain watermark of the document according to the basic information of the watermark;
the conversion module is configured to convert the document added with the blind and clear watermarks into a set format, wherein characters in the document are stored in a label, and pictures in the document are converted into character strings which are spliced into the document in the set format;
an authentication module configured to perform authentication of the invocation request;
and the online presentation module is configured to display the document with the set format to the authenticated requester online through the browser.
An electronic device comprising a memory and a processor and computer instructions stored on the memory and executed on the processor, the computer instructions, when executed by the processor, performing the steps of the above method.
A computer readable storage medium storing computer instructions which, when executed by a processor, perform the steps of the above method.
The invention can realize the online preview of files with various formats and the method for increasing watermarks in one step, and ensures the uniqueness and reliability of each file by converting the electronic file into a domestic OFD format file.
And the user side needing to add the watermark uploads the access addresses of the files in PDF, OFD, DOC, XLS, PPT and other formats by sending a request and calling URL.
When the URL is called, the file flow of a calling end is obtained, the file is converted into the file in the OFD format, and then redundant information (watermark) is added into the OFD file and the Euler number of the character is converted by using a built-in font library to realize the addition of the watermark. After the watermark is added, the OFD format file is converted into HTML to be returned to the user side, so that online preview and watermark adding are realized.
And the tool service is configured through the interface to realize the online preview and the watermark adding of the document.
Compared with the traditional initial document preview and watermark adding process, the method solves the problems of inconsistent document preview format display, low watermark quality and the like under domestic machines and operating systems. By providing the online service, the security of the confidential documents and the consistency of preview under the domestic environment are enhanced. The pictures printed and photographed in the previewing process carry the dark watermark information, and therefore effective deterrence can be formed for the contact document personnel. Powerful support is provided for the traceability of the document.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Although the embodiments of the present invention have been described with reference to the accompanying drawings, it is not intended to limit the scope of the present invention, and it should be understood by those skilled in the art that various modifications and variations can be made without inventive efforts by those skilled in the art based on the technical solution of the present invention.
Claims (10)
1. A method for previewing a document and adding a watermark on line by a browser is characterized in that: the method comprises the following steps:
acquiring a calling request of a requester, reading a source file according to the calling request, acquiring watermark information in the calling request, and generating a unique identification code;
adding the unique identification code as a watermark into a document, and implanting the blind watermark;
replacing the Euler number of the character of the unique identification code, and adding a plain watermark of the document according to basic information of the watermark;
converting the document added with the blind and clear watermarks into a set format, wherein characters in the document are stored in a label, and pictures in the document are converted into character strings which are spliced into the document in the set format;
performing authentication of the call request;
and displaying the document with the set format to the authenticated requester online through the browser.
2. The method for browser to preview document and add watermark in claim 1, wherein: the specific process of generating the unique identification code is to generate the unique identification code according to a plurality of information in the MAC address, the Internet protocol address, the preview time and the user name of the requester.
3. The method for browser to preview document and add watermark in claim 1, wherein: and in the process of adding the unique identification code as a watermark into the document, adding the unique identification code as the watermark into the document by utilizing inverse Fourier transform.
4. The method for browser to preview document and add watermark in claim 1, wherein: the watermark information comprises watermark content and an address;
the basic information of the watermark comprises the position, the size, the inclination angle, the color, the X-axis distance and the Y-axis distance of the watermark.
5. The method for browser to preview document and add watermark in claim 1, wherein: and converting the document with the blind and clear watermarks into an HTML file for online preview by a browser.
6. The method for browser to preview document and add watermark in claim 1, wherein: and converting the document with the blind and clear watermarks into an OFD file and storing the OFD file locally.
7. The method for browser to preview document and add watermark in claim 1, wherein: the specific process of performing the authentication of the call request is as follows: and when the internet protocol address of the requester is consistent with the address in the watermark information in the calling request and the document is in the calling authority of the requester, the authentication is passed.
8. A system for previewing a document and adding a watermark on line by a browser is characterized in that: the method comprises the following steps:
the calling request acquisition module is configured to acquire a calling request of a requester, read a source file according to the calling request, acquire watermark information in the calling request and generate a unique identification code;
the blind watermark implantation module is configured to add the unique identification code as a watermark into a document to implant the blind watermark;
the plain watermark implanting module is configured to replace the Euler number of the character for the unique identification code, and add the plain watermark of the document according to the basic information of the watermark;
the conversion module is configured to convert the document added with the blind and clear watermarks into a set format, wherein characters in the document are stored in a label, and pictures in the document are converted into character strings which are spliced into the document in the set format;
an authentication module configured to perform authentication of the invocation request;
and the online presentation module is configured to display the document with the set format to the authenticated requester online through the browser.
9. An electronic device, characterized by: comprising a memory and a processor and computer instructions stored on the memory and executed on the processor, which when executed by the processor, perform the steps of the method of any one of claims 1 to 7.
10. A computer-readable storage medium characterized by: for storing computer instructions which, when executed by a processor, perform the steps of the method of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111652791.2A CN114357395A (en) | 2021-12-30 | 2021-12-30 | Method and system for previewing document and adding watermark on line by browser |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111652791.2A CN114357395A (en) | 2021-12-30 | 2021-12-30 | Method and system for previewing document and adding watermark on line by browser |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114357395A true CN114357395A (en) | 2022-04-15 |
Family
ID=81103033
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111652791.2A Pending CN114357395A (en) | 2021-12-30 | 2021-12-30 | Method and system for previewing document and adding watermark on line by browser |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114357395A (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112258376A (en) * | 2020-10-20 | 2021-01-22 | 中国农业银行股份有限公司 | Encrypted document processing method and system |
CN113704708A (en) * | 2021-08-27 | 2021-11-26 | 海看网络科技(山东)股份有限公司 | Method and system for watermarking online preview of document based on browser |
-
2021
- 2021-12-30 CN CN202111652791.2A patent/CN114357395A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112258376A (en) * | 2020-10-20 | 2021-01-22 | 中国农业银行股份有限公司 | Encrypted document processing method and system |
CN113704708A (en) * | 2021-08-27 | 2021-11-26 | 海看网络科技(山东)股份有限公司 | Method and system for watermarking online preview of document based on browser |
Non-Patent Citations (1)
Title |
---|
拾年之璐: "文档隐写溯源技术分析", pages 1 - 4, Retrieved from the Internet <URL:https://blog.csdn.net/cxh_1231/article/details/120479482> * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR100620836B1 (en) | A method for generation and assembly of web page content | |
TWI277882B (en) | Method and systems for hyperlinking files | |
US8688992B2 (en) | System and method for generating agreements | |
CN107992759B (en) | Apparatus, method and computer readable storage medium for implementing electronic seal | |
CN104660635B (en) | Message synchronization method, device and system | |
US9223528B2 (en) | Electronic content management workflow | |
CN115114598B (en) | Watermark generation method and device and watermark file tracing method and device | |
CN111309312A (en) | Editing method and device of rich text object, terminal equipment and computer storage medium | |
CN114547564B (en) | Document processing method, device and equipment | |
CN111679826A (en) | Method, device and equipment for previewing webpage editing content in real time and storage medium | |
CN112579958A (en) | Webpage conversion method and device, computer equipment and readable storage medium | |
CN113111281A (en) | DWG drawing preview service method, system and storage medium | |
CN116827637B (en) | Canvas-based data encryption transmission method, system, equipment and medium | |
CN107967412B (en) | Method for controlling limited access of PDF file | |
JPH1115723A (en) | Multimedia data supplying method and multimedia data server | |
CN115495694B (en) | Webpage data processing method and device | |
CN114357395A (en) | Method and system for previewing document and adding watermark on line by browser | |
TW201719487A (en) | Device for generating or verifying authenticate electronic document with electronic and paper certification and method thereof | |
CN110768892B (en) | Digital intelligent business card management system and implementation method thereof | |
CN110189115B (en) | Transaction channel access method and device and electronic equipment | |
CN115658838B (en) | Map set data generation method and device, electronic equipment and storage medium | |
JP2009211601A (en) | Network distribution type document browsing system, document distribution server, document distribution method, and document distribution program | |
CN116166736B (en) | Block chain data uplink method, device and medium based on application program interface | |
CN111191418B (en) | Online document processing method and device, electronic equipment and computer storage medium | |
WO2024122602A1 (en) | Image processing device and 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 |