Method and system for adding implicit secure watermark

By adding implicit security watermarks to Excel files, traditional security measures are solved inadequate protection in the face of complex network attacks and data leakage risks, and efficient security protection and traceability of sensitive data are achieved without affecting the aesthetics of the file.

CN119557856APending Publication Date: 2025-03-04INSPUR ZHUOSHU BIG DATA IND DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411490415.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

Traditional data encryption and access control measures show limitations in the face of complex and changing risks of cyber attacks and data leakage, especially in the generation, sharing and storage of Excel files, the security and integrity of data face severe challenges.

Method used

By adding implicit security watermarks to Excel files, dynamically create Excel workbooks and worksheets with the Apache POI library, fill and format data, preprocess and add transparency-adjusted watermark images, and finally export and free resources.

Benefits of technology

It significantly improves the security of sensitive data in Excel files, provides traceability and traceability capabilities, helps enterprises quickly locate leak sources, reduces the losses caused by data leakage, and enhances data protection without affecting the aesthetics of files.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119557856A_ABST
    Figure CN119557856A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, and particularly provides a method and system for adding an implicit secure watermark, and the method comprises the following steps: S1, constructing an Excel workbook and a worksheet; s2, data filling and formatting; s3, preprocessing and adding a watermark picture; and S4, exporting the Excel file and releasing resources. Compared with the prior art, the method has the advantage that the protection of sensitive data in the Excel file can be enhanced by adding the implicit secure watermark.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and specifically provides a method and system for adding implicit security watermarks. Background Art

[0002] With the rapid development of big data and cloud computing technologies, the processing and transmission of sensitive data has become increasingly frequent and important. However, traditional security measures such as data encryption and access control have gradually shown their limitations in the face of complex and ever-changing network attacks and data leakage risks.

[0003] Especially in the process of generating, sharing and storing Excel files, the security and integrity of data face severe challenges. Summary of the invention

[0004] The present invention aims at solving the above-mentioned deficiencies of the prior art and provides a method for adding implicit security watermark with strong practicability.

[0005] A further technical task of the present invention is to provide a system for adding implicit security watermarks that is reasonably designed, safe and applicable.

[0006] The technical solution adopted by the present invention to solve its technical problem is:

[0007] A method for adding an implicit security watermark comprises the following steps:

[0008] S1. Construction of Excel workbooks and worksheets;

[0009] S2, data filling and formatting;

[0010] S3, preprocessing and adding of watermark images;

[0011] S4. Export of Excel files and release of resources.

[0012] Furthermore, in step S1, an Excel workbook and its internal worksheet are dynamically created and initialized using the Workbook and Sheet interfaces in the Apache POI library. The Workbook interface provides an operation interface for the entire Excel file, while the Sheet interface represents a worksheet.

[0013] Furthermore, in step S2, the sensitive data to be exported is filled in the worksheet, including the table header, data rows and necessary format settings. The data filling is implemented through the Row and Cell interfaces, while the format settings are completed through the CellStyle interface.

[0014] Furthermore, in step S3, it includes:

[0015] Use the addPicture method of the Workbook interface to add the watermark image to the picture collection of the workbook;

[0016] Use the Drawing interface and ClientAnchor class to draw the image to the specified position of the worksheet;

[0017] Adjust the transparency and size of the image without affecting the reading of the data, and still serve as a marker;

[0018] Before adding the watermark image, pre-process the image through the image processing library and set its transparency.

[0019] Furthermore, in step S4, the Excel file with the watermark added is exported to a specified location, and related resources are released. The file export operation is implemented through the FileOutputStream class, and the workbook is closed after the operation is completed to release resources.

[0020] A system for adding implicit security watermarks. First, Excel workbooks and worksheets are constructed, then data is filled and formatted, watermark images are preprocessed and added, and finally Excel files are exported and resources are released.

[0021] Furthermore, when constructing an Excel workbook and worksheet, the Workbook and Sheet interfaces in the Apache POI library are used to dynamically create and initialize an Excel workbook and its internal worksheet. The Workbook interface provides an operation interface for the entire Excel file, while the Sheet interface represents a worksheet.

[0022] Furthermore, when filling and formatting data, the sensitive data to be exported is filled in the worksheet, including the table header, data rows and necessary format settings. The data filling is implemented through the Row and Cell interfaces, and the format settings are completed through the CellStyle interface.

[0023] Furthermore, when preprocessing and adding watermark images, use the addPicture method of the Workbook interface to add the watermark image to the picture collection of the workbook;

[0024] Use the Drawing interface and ClientAnchor class to draw the image to the specified position of the worksheet;

[0025] Adjust the transparency and size of the image without affecting the reading of the data, and still serve as a marker;

[0026] Before adding the watermark image, pre-process the image through the image processing library and set its transparency.

[0027] Furthermore, when exporting the Excel file and releasing resources, the Excel file with the watermark added is exported to the specified location, and the related resources are released. The file export operation is implemented through the FileOutputStream class, and the workbook is closed after the operation is completed to release the resources.

[0028] Compared with the prior art, the method and system for adding implicit security watermarks of the present invention have the following outstanding beneficial effects:

[0029] (1) Enhanced data security;

[0030] By adding an implicit security watermark, the present invention significantly improves the security of sensitive data in Excel files. The watermark can be used as an internal tracking method to help enterprises quickly locate the source of data leakage after a data leakage incident occurs, and reduce the losses caused by data leakage. At the same time, the existence of the watermark itself also serves as a deterrent to potential leakers, reminding them to respect intellectual property rights and data security regulations.

[0031] (2) Improved tracking and tracing capabilities;

[0032] Hidden watermarks can contain key data such as the file's creation time, modification records, and visitor information. When a file is leaked or circulated, the company can analyze the hidden watermark information to track the file's circulation path, find the source of the leak, and hold the relevant responsible persons accountable. This helps strengthen internal management and control and prevent similar incidents from happening again.

[0033] (3) User experience optimization;

[0034] The design of the hidden security watermark ensures its invisibility and aesthetics. Ordinary users can hardly detect its existence when using Excel files normally, so it does not affect normal operations such as reading, editing and sharing of files. At the same time, compared with visible watermarks added directly to the surface of files, hidden watermarks do not destroy the aesthetics of files, allowing files to maintain professionalism while maintaining beauty. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0036] Attached Figure 1A flowchart of a method for adding an implicit security watermark is shown. DETAILED DESCRIPTION

[0037] In order to enable those skilled in the art to better understand the solution of the present invention, the present invention is further described in detail below in conjunction with specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0038] A best embodiment is given below:

[0039] like Figure 1 As shown, a method for adding an implicit security watermark in this embodiment has the following steps:

[0040] S1. Construction of Excel workbooks and worksheets;

[0041] Using the Workbook and Sheet interfaces in the Apache POI library, we can dynamically create and initialize an Excel workbook and its internal worksheets. This step is the basis for data export, where the Workbook interface provides an operation interface for the entire Excel file, and the Sheet interface represents a worksheet.

[0042] S2, data filling and formatting;

[0043] In the worksheet, we need to fill in the sensitive data to be exported, including the table header, data rows, and necessary format settings. Data filling can be achieved through the Row and Cell interfaces, while format settings can be completed through the CellStyle interface.

[0044] S3, preprocessing and adding of watermark images;

[0045] In order to implement an implicit security watermark, we first need to create a PNG format watermark image with a transparent background and ensure that it is visually hidden enough but can be verified through specific methods (such as zooming in or using professional software).

[0046] The process of adding a watermark image involves the following steps:

[0047] Use the addPicture method of the Workbook interface to add the watermark image to the picture collection of the workbook.

[0048] Use the Drawing interface and ClientAnchor class to draw the image to the specified location of the worksheet.

[0049] Adjust the transparency, size and other properties of the image to ensure that it does not affect the reading of the data but can also serve as an identification.

[0050] Since the Apache POI library itself does not provide an API for directly setting the transparency of an image, it is necessary to pre-process the image through an image processing library (such as Java's BufferedImage class) and set its transparency before adding a watermark to the image.

[0051] S4. Export of Excel files and release of resources;

[0052] Finally, we need to export the Excel file with the watermark added to the specified location and release the related resources. This can be achieved through the FileOutputStream class to implement the file export operation, and close the workbook to release the resources after the operation is completed.

[0053] The present invention can automatically identify sensitive information during the data export process, and automatically select and generate implicit watermarks according to the data type and level. The watermark generates an image with a specific font, size and color, and blurs it to ensure that it is not easily noticeable. When the data is exported to an Excel file, the system adds the watermark image to a specific location of the file, such as the header, footer or background, to achieve implicit protection of sensitive data.

[0054] Based on the above method, a system for adding implicit security watermarks in this embodiment first constructs Excel workbooks and worksheets, then fills and formats data, preprocesses and adds watermark images, and finally exports Excel files and releases resources.

[0055] When constructing an Excel workbook and worksheet, the Workbook and Sheet interfaces in the Apache POI library are used to dynamically create and initialize an Excel workbook and its internal worksheet. The Workbook interface provides an operation interface for the entire Excel file, while the Sheet interface represents a worksheet.

[0056] When filling and formatting data, fill in the sensitive data to be exported in the worksheet, including the table header, data rows, and necessary format settings. Data filling is achieved through the Row and Cell interfaces, while format settings are completed through the CellStyle interface.

[0057] When preprocessing and adding watermark images, use the addPicture method of the Workbook interface to add the watermark image to the picture collection of the workbook;

[0058] Use the Drawing interface and ClientAnchor class to draw the image to the specified position of the worksheet;

[0059] Adjust the transparency and size of the image without affecting the reading of the data, and still serve as a marker;

[0060] Before adding the watermark image, pre-process the image through the image processing library and set its transparency.

[0061] When exporting an Excel file and releasing resources, the Excel file with a watermark is exported to the specified location and related resources are released. The file export operation is implemented through the FileOutputStream class, and the workbook is closed after the operation is completed to release resources.

[0062] The above-mentioned specific implementations are only specific cases of the present invention. The patent protection scope of the present invention includes but is not limited to the above-mentioned specific implementations. Any technical solutions that conform to the above-mentioned specific implementations of the present invention and any appropriate changes or substitutions made by ordinary technicians in the relevant technical field shall fall within the patent protection scope of the present invention.

[0063] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for adding an implicit security watermark, characterized in that: The steps are as follows: S1. Construction of Excel workbooks and worksheets; S2, data filling and formatting; S3, preprocessing and adding of watermark images; S4. Export of Excel files and release of resources.

2. A method for adding an implicit security watermark according to claim 1, characterized in that: In step S1, an Excel workbook and its internal worksheet are dynamically created and initialized using the Workbook and Sheet interfaces in the Apache POI library. The Workbook interface provides an operation interface for the entire Excel file, while the Sheet interface represents a worksheet.

3. A method for adding an implicit security watermark according to claim 2, characterized in that: In step S2, the sensitive data to be exported is filled in the worksheet, including the table header, data rows and necessary format settings. The data filling is implemented through the Row and Cell interfaces, while the format settings are completed through the CellStyle interface.

4. A method for adding an implicit security watermark according to claim 3, characterized in that: In step S3, it includes: Use the addPicture method of the Workbook interface to add the watermark image to the picture collection of the workbook; Use the Drawing interface and ClientAnchor class to draw the image to the specified position of the worksheet; Adjust the transparency and size of the image without affecting the reading of the data, and still serve as a marker; Before adding the watermark image, pre-process the image through the image processing library and set its transparency.

5. A method for adding an implicit security watermark according to claim 4, characterized in that: In step S4, the Excel file with the watermark added is exported to the specified location, and the related resources are released. The file export operation is implemented through the FileOutputStream class, and the workbook is closed after the operation is completed to release the resources.

6. A system for adding an implicit security watermark, characterized in that: First, construct the Excel workbook and worksheet, then fill and format the data, pre-process and add the watermark image, and finally export the Excel file and release the resources.

7. A system for adding an implicit security watermark according to claim 6, characterized in that: When constructing an Excel workbook and worksheet, the Workbook and Sheet interfaces in the Apache POI library are used to dynamically create and initialize an Excel workbook and its internal worksheet. The Workbook interface provides an operation interface for the entire Excel file, while the Sheet interface represents a worksheet.

8. A system for adding implicit security watermark according to claim 7, characterized in that: When filling and formatting data, fill in the sensitive data to be exported in the worksheet, including the table header, data rows, and necessary format settings. Data filling is achieved through the Row and Cell interfaces, while format settings are completed through the CellStyle interface.

9. A system for adding an implicit security watermark according to claim 8, characterized in that: When preprocessing and adding watermark images, use the addPicture method of the Workbook interface to add the watermark image to the picture collection of the workbook; Use the Drawing interface and ClientAnchor class to draw the image to the specified position of the worksheet; Adjust the transparency and size of the image without affecting the reading of the data, and still serve as a marker; Before adding the watermark image, pre-process the image through the image processing library and set its transparency.

10. A system for adding implicit security watermark according to claim 9, characterized in that: When exporting an Excel file and releasing resources, the Excel file with a watermark is exported to the specified location and related resources are released. The file export operation is implemented through the FileOutputStream class, and the workbook is closed after the operation is completed to release resources.