Watermark deletion method, electronic device and computer-readable storage medium

By acquiring and comparing the content of the target file, identifying and deleting the watermarks in the target file, the problem of difficulty in deleting watermarks without watermark labels in the prior art is solved, and the watermark coverage rate is improved.

CN114862644BActive Publication Date: 2025-04-29SHENZHEN ZHANGYUE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210451572.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-26
Publication Date
2025-04-29
Estimated Expiration
2042-04-26

AI Technical Summary

Technical Problem

The prior art is difficult to effectively delete watermarks without watermark labels, resulting in a low coverage rate of deleted watermarks.

Method used

By obtaining at least one type of content and attribute information on each page of the target file, comparing the same type of content in any two pages of the target file, obtaining the preset file, eliminating the content that the preset file does not appear in the target page, and identifying and deleting the watermark in the target file.

Benefits of technology

By comparing the content of all pages, the coverage of deleted watermarks is improved and all watermarks are effectively deleted.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114862644B_ABST
    Figure CN114862644B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a watermark deletion method, an electronic device and a computer-readable storage medium. The present disclosure clarifies the type and attribute of the content of the target file by obtaining at least one type of content in each page of the target file and the attribute information of each type of content; obtains a preset file by comparing the same type of content in any two pages of the target file, and the preset file includes the same content in the any two pages; for each target page of the target file except the any two pages, compares the content in the target page with the content in the preset file, removes the content that does not appear in the target page, obtains the remaining content in the preset file, and provides a data basis for subsequent watermark identification; identifies the watermark in the target file according to the remaining content and the removed content in the preset file, and deletes the watermark; identifies the watermark by comparing the content of all pages, and improves the coverage of the deleted watermark.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, and in particular to a watermark deletion method, an electronic device, and a computer-readable storage medium. Background Art

[0002] When users currently write files through various file processing software, they usually add watermarks to the files to protect the copyright of the files. However, in actual applications, the existence of watermarks will cause inconvenience to the use of files, so it is necessary to delete the watermarks in the files.

[0003] In the prior art, the watermark tag contained in the file is generally identified first, and then the watermark corresponding to the identified watermark tag is deleted. However, for watermarks without watermark tags, the above method cannot be deleted, resulting in a low coverage rate of the deleted watermark.

[0004] Therefore, how to delete all watermarks becomes an urgent problem to be solved. Summary of the invention

[0005] In order to solve the above technical problems, the present disclosure provides a watermark deletion method, an electronic device and a computer-readable storage medium.

[0006] In a first aspect, the present disclosure provides a watermark deletion method, comprising:

[0007] Acquire at least one type of content in each page of the target file, and attribute information of each type of content;

[0008] By comparing the same type of contents in any two pages of the target file, a preset file is obtained, wherein the preset file includes the same contents in the any two pages;

[0009] For each target page in the target file except the arbitrary two pages, compare the content in the target page with the content in the preset file, remove the content in the preset file that does not appear in the target page, and obtain the remaining content in the preset file;

[0010] According to the remaining content and the discarded content in the preset file, the watermark in the target file is identified and deleted.

[0011] In a second aspect, the present disclosure provides an electronic device, including a processor and a memory, wherein the memory is used to store executable instructions, and the executable instructions enable the processor to perform the following operations:

[0012] Acquire at least one type of content in each page of the target file, and attribute information of each type of content;

[0013] By comparing the same type of contents in any two pages of the target file, a preset file is obtained, wherein the preset file includes the same contents in the any two pages;

[0014] For each target page in the target file except the arbitrary two pages, compare the content in the target page with the content in the preset file, remove the content in the preset file that does not appear in the target page, and obtain the remaining content in the preset file;

[0015] According to the remaining content and the discarded content in the preset file, the watermark in the target file is identified and deleted.

[0016] In a third aspect, the present disclosure provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor implements the watermark deletion method of the first aspect.

[0017] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:

[0018] The watermark deletion method, electronic device and computer-readable storage medium of the embodiments of the present disclosure clarify the type and attribute of the target file content by obtaining at least one type of content in each page of the target file and attribute information of each type of content; obtain a preset file by comparing the same type of content in any two pages of the target file, and the preset file includes the same content in the any two pages; for each target page of the target file except the any two pages, compare the content in the target page with the content in the preset file, eliminate the content in the preset file that does not appear in the target page, and obtain the remaining content in the preset file, providing a data basis for subsequent watermark identification; identify the watermark in the target file based on the remaining content and the eliminated content in the preset file, and delete the watermark; identify the watermark by comparing the content of all pages, and improve the coverage of the deleted watermark. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0020] Figure 1 A schematic diagram of a flow chart of a watermark deletion method provided in an embodiment of the present disclosure;

[0021] Figure 2 A schematic diagram of a watermark recognition method provided by an embodiment of the present disclosure;

[0022] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0023] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0024] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0025] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0026] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0027] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0028] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0029] The embodiments of the present disclosure provide a watermark deletion method, an electronic device, and a computer-readable storage medium.

[0030] Let's first combine Figure 1 The watermark deletion method provided by the embodiment of the present disclosure is described.

[0031] The watermark deletion method provided in the embodiments of the present disclosure may be executed by an electronic device capable of displaying a page, wherein the electronic device may include but is not limited to mobile terminals such as smart phones, laptops, tablet computers, etc., and fixed terminals such as desktop computers, smart home devices, etc.

[0032] Figure 1 A schematic flow chart of a watermark deletion method provided by an embodiment of the present disclosure is shown.

[0033] like Figure 1 As shown, the watermark deletion method may include the following steps.

[0034] S101: Acquire at least one type of content in each page of a target file and attribute information of each type of content.

[0035] In an embodiment of the present disclosure, at least one type of content in each page of a target file and attribute information of each type of content are acquired on an electronic device.

[0036] Optionally, at least one type of content includes: text content, image content, wherein the image content includes geometric figures such as line segments, arcs, circles, sectors, triangles, rectangles, polygons, and geometric pictures obtained by combining these geometric figures, and also includes picture information obtained by shooting with shooting devices such as mobile phones and cameras, or picture information downloaded from the Internet. It is understandable that the type of the target file is not limited to text type and image type, but can also be other types, which is not specifically limited in this embodiment.

[0037] Optionally, the attribute information of the text content includes at least the following: font, font shape, font size, font color. Specifically, the font is the external form feature of the text, that is, the style of the text, which can be Songti, Fangsong, Lishu, Kaishu, Microsoft Yahei, etc.; the font shape can be regular, italic, bold; the font size is the size of the text, which can be Chuhao, Xiaochu, No. 1, Xiaoyi, No. 2, Xiaoer, etc.; the font color can be black, blue, red, yellow, etc. It can be understood that the attribute information of the text content also includes other attributes such as text effect, layout, underline, etc., which are not limited in this embodiment.

[0038] Optionally, the attribute information of the image content includes at least the following: image size, image color, image format. Specifically, the length and width of the image size are measured in pixels or centimeters. Specifically, digital pictures are generally measured in resolution and pixels. Generally, the higher the image resolution, the more pixels are required. For example, a picture with a resolution of 640×480 requires approximately 310,000 pixels, and a picture with a resolution of 2048×1536 requires approximately 3.14 million pixels. The image resolution is related to the image size and magnification ratio at output. The higher the resolution, the larger the image size and the higher the magnification ratio. Geometric figures are generally measured in centimeters; image colors include color, black and white, transparent color, grayscale, etc.; image format is the format in which the image file is stored on the memory card, usually including JPEG format, TIFF format, RAW format, etc.

[0039] S102: Obtain a preset file by comparing the same type of contents in any two pages of the target file, wherein the preset file includes the same contents in the any two pages.

[0040] In the disclosed embodiment, by comparing the same type of content in any two pages of the target file, a preset file is obtained, and the preset file includes the same content in the any two pages. For example, when the target file has four pages, the text content of the first page and the second page are compared, and it is assumed that the same text content is A, B, C, D, and E, and the same text content A, B, C, D, and E are saved in the preset file. The image content of the first page and the second page is compared, and it is assumed that the same image content is M and N, and the same image content M and N are saved in the preset file. Then, the same content in the preset file includes text content A, B, C, D, E and image content M and N. It can be understood that the first page and the second page can also be other two pages in the target file, wherein the other two pages can be adjacent or non-adjacent. For example, it can be two adjacent pages of the second page and the third page, or the third page and the fourth page, or it can be two non-adjacent pages of the first page and the third page, the first page and the fourth page, or the second page and the fourth page. In other embodiments, it can also be that the text content of the second page and the first page are compared, and the image content of the second page and the first page are compared. Similarly, the other two pages in the target file are the same, and this embodiment does not make any specific limitation.

[0041] It is understandable that any page of the target file may contain all text content without image content, or may contain both text content and image content, or may contain only image content. However, no matter what type of content any page of the target file contains, the target file will have the same content.

[0042] S103: for each target page in the target file except the arbitrary two pages, compare the content in the target page with the content in the preset file, remove the content of the preset file that does not appear in the target page, and obtain the remaining content in the preset file.

[0043] In the embodiment of the present disclosure, for each target page in the target file except for any two pages mentioned above, the contents in these target pages are compared with the contents in the above preset files, and the contents of the preset files that do not appear in the target pages are eliminated to obtain the remaining contents in the preset files. For example, when the target file has four pages, the contents in the preset files obtained after comparing the first and second pages are A, B, C, D, E, M, and N. When the contents of the third page are compared with the contents in the preset files, the contents D and M in the preset files do not appear in the third page, and D and M are eliminated from the preset files. It can be understood that the contents of the third page include A, B, C, E, and N. When the contents of the fourth page are compared with the preset contents, the contents D, E, and N in the preset files do not appear in the fourth page, and D, E, and N are eliminated from the preset files. Because D has been eliminated by comparing the contents of the third page with the contents in the preset files in the previous step, there is no need to eliminate them again, and the remaining contents A, B, and C in the preset files are obtained. That is to say, the text contents to be removed are D and E, and the image contents to be removed are M and N. It is understandable that in other embodiments, other contents may be removed, and this solution does not limit this.

[0044] Optionally, to eliminate the content that does not appear in the target page in the preset file, each target page other than the above-mentioned arbitrary two pages may be compared with the preset file separately, and the contents are eliminated after being combined. For example, when the target file has four pages, the contents in the preset file obtained after comparing the first page with the second page are A, B, C, D, E, M, and N. The third page content is compared with the content in the preset file, and the contents D and M in the preset file do not appear in the third page. The fourth page content is compared with the content in the preset file, and the contents D, E, and N in the preset file do not appear in the fourth page. Then D, M, E, and N are eliminated from the preset file to obtain the remaining contents A, B, and C in the preset file. Alternatively, one target page other than the above-mentioned arbitrary two pages may be compared with the preset file for elimination, and then another target page other than the above-mentioned arbitrary two pages may be compared with the first target page for elimination. The preset file after elimination is compared, and so on, to avoid duplication of work and improve elimination efficiency. For example, when the target file has four pages, the contents of the preset file obtained after comparing the first page with the second page are A, B, C, D, E, M, N. The content of the third page is compared with the content in the preset file. The contents D and M of the preset file do not appear in the third page, then D and M are eliminated from the preset file. It can be understood that the content of the third page contains A, B, C, E, N, that is, the content of the preset file after the first elimination is A, B, C, E, N. The content of the fourth page is compared with the content in the preset file after the first elimination. The contents E and N of the preset file after the first elimination do not appear in the fourth page, then E and N are eliminated from the preset file after the first elimination to obtain the remaining contents A, B, C in the preset file.

[0045] It is understandable that the remaining content in the preset file may be text content or image content. When the remaining content in the preset file is only image content, the image content is the watermark content.

[0046] S104: Identify the watermark in the target file according to the remaining content and the discarded content in the preset file, and delete the watermark.

[0047] A watermark is a semi-transparent logo or icon added to an image to prevent others from stealing it. Usually, banknotes, certificates, securities, food stamps, etc. all use watermarks to prevent counterfeiting.

[0048] In the embodiment of the present disclosure, the watermark in the target file is identified and deleted according to the remaining content and the deleted content in the preset file. For example, the watermark in the target file is identified according to the remaining content A, B, C and the deleted content D, E, M, N in the preset file.

[0049] Therefore, in the disclosed embodiment, by acquiring at least one type of content in each page of the target file and the attribute information of each type of content, the type and attribute of the content of the target file are clarified; by comparing the same type of content in any two pages of the target file, a preset file is obtained, and the preset file includes the same content in the any two pages; for each target page in the target file except the any two pages, the content in the target page is compared with the content in the preset file, and the content in the preset file that does not appear in the target page is eliminated to obtain the remaining content in the preset file, thereby providing a data basis for subsequent identification of watermarks; based on the remaining content and the eliminated content in the preset file, the watermark in the target file is identified and deleted, and the watermark is identified by comparing the content of all pages to improve the coverage of the deleted watermark.

[0050] In addition, since the embodiment of the present disclosure compares and matches all the contents of the target file, thereby filtering out identical content and identifying watermarks, the recognition range is wider than that of identifying marked watermarks in the prior art. Therefore, when deleting a watermark, the coverage of the deleted watermark can be improved.

[0051] Figure 2 FIG. 1 is a flow chart of a watermark recognition method provided by an embodiment of the present disclosure. Figure 2 As shown, the method includes the following steps:

[0052] S201: Acquire at least one type of content in each page of a target file, and attribute information of each type of content.

[0053] The implementation principle and specific method of S201 are consistent with those of the above-mentioned S101, and will not be repeated here.

[0054] S202: Obtain a preset file by comparing the same type of contents in any two pages of the target file, wherein the preset file includes the same contents in the any two pages.

[0055] The implementation principle and specific method of S202 are consistent with those of the above-mentioned S102, and will not be repeated here.

[0056] S203: for each target page in the target file except the arbitrary two pages, compare the content in the target page with the content in the preset file, remove the content of the preset file that does not appear in the target page, and obtain the remaining content in the preset file.

[0057] The implementation principle and specific method of S203 are consistent with those of the above-mentioned S103, and will not be repeated here.

[0058] S204, determining whether the attribute information of the remaining content in the preset file and the same type of content in the removed content is the same; if so, executing step S205; if not, executing step S206.

[0059] S205: Remove the contents with the same attribute information from the remaining contents in the preset file to obtain a watermark in the target file.

[0060] When the attribute information of the same type of content in the remaining content of the preset file and the content to be removed is the same, the content with the same attribute information is removed from the remaining content of the preset file to obtain the watermark in the target file. For example, among the remaining text contents A, B, and C in the preset file, the attribute of A is Songti, Regular, Size 4, and Black; the attribute of B is Blackti, Bold, Size 4, and Black; the attribute of C is Running Script, Italic, Size 3, and Gray. Among the text contents D and E in the removed content, the attribute of D is Songti, Regular, Size 4, and Black; the attribute of E is Blackti, Bold, Size 4, and Black, then A and B are removed from the remaining content of the preset file to obtain the watermark C in the target file.

[0061] S206. The remaining content in the preset file is the watermark in the target file.

[0062] When the attribute information of the remaining content in the preset file and the same type of content in the removed content is different, the remaining content in the preset file is the watermark in the target file.

[0063] Therefore, in the embodiment of the present disclosure, the watermark information in the target file is determined by judging the attribute information of the same type of content in the remaining content and the eliminated content in the preset file, thereby improving the accuracy of watermark recognition.

[0064] In particular, when the present invention is used on an ink screen reader, in some embodiments, after identifying the watermark in the target file based on the remaining content and the discarded content in the preset file, a local screen clearing grayscale refresh strategy is adopted to highlight the watermark and delete the watermark.

[0065] Microcapsules, also known as microcapsules, are small particles containing active ingredients or core materials surrounded by a covering layer or shell. Sometimes each microcapsule can contain several core materials (either the same component or different components).

[0066] This embodiment preferably adopts a local screen clearing grayscale refresh strategy to highlight the watermark, for example, using the local processing method of GC16, that is, the ink screen drive controller drives the black ink screen particles to move to the top of the microcapsule and the white particles to the bottom to highlight the watermark area.

[0067] The disclosed embodiment highlights the watermark, making the effect of deleting the watermark more conspicuous, leaving a deep impression on the user.

[0068] On the basis of the above-mentioned highlighting, the above-mentioned partial screen clearing grayscale refresh strategy is used to drive the black and white ink particles to display the final clean text that meets the target grayscale after removing the watermark. In the case of no change in the main text, the target file and the target file after deleting the watermark form a sharp contrast visually. It more intuitively reflects the coverage of the deleted watermark and improves the user experience.

[0069] Figure 3 A schematic structural diagram of an electronic device provided by an embodiment of the present disclosure is shown.

[0070] The electronic devices provided by the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as smart phones, laptop computers, tablet computers, etc., and fixed terminals such as desktop computers, smart home devices, etc.

[0071] It should be noted that Figure 3 The electronic device 300 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0072] The electronic device 300 conventionally includes a processor 310 and a computer program product or computer-readable medium in the form of a memory 320. The memory 320 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk or a ROM. The memory 320 has a storage space 321 for executable instructions (or program code) 3211 for executing any method steps in the above-mentioned watermark removal method. For example, the storage space 321 for executable instructions may include individual executable instructions 3211 for respectively implementing various steps in the above-mentioned watermark removal method. These executable instructions may be read from or written to one or more computer program products. These computer program products include program code carriers such as a hard disk, a compact disk (CD), a memory card or a floppy disk. Such a computer program product is typically a portable or fixed storage unit. The storage unit may have a storage device 3211 having a plurality of computer program products. Figure 3 The memory 320 in the electronic device 300 is similarly arranged as a storage segment or storage space. The executable instructions can be compressed, for example, in an appropriate form. Generally, the storage unit includes executable instructions for executing the steps of the watermark removal method according to the present disclosure, that is, codes that can be read by a processor such as the processor 310, and when these codes are executed by the electronic device 300, the electronic device 300 executes the various steps in the watermark removal method described above.

[0073] Of course, to simplify, Figure 3 Only some of the components related to the present disclosure in the electronic device 300 are shown, and components such as a bus, an input / output interface, an input device, an output device, etc. are omitted. In addition, according to specific application situations, the electronic device 300 may also include any other appropriate components.

[0074] The embodiments of the present disclosure further provide a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the watermark deletion method provided by each embodiment of the present disclosure.

[0075] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical link with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0076] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0077] In the disclosed embodiments, program codes for performing the operations of the disclosed embodiments may be written in one or more programming languages ​​or combinations thereof, including but not limited to object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be linked to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be linked to an external computer (e.g., via the Internet using an Internet service provider).

[0078] This application discloses:

[0079] A1. A watermark removal method, comprising:

[0080] Acquire at least one type of content in each page of the target file, and attribute information of each type of content;

[0081] By comparing the same type of contents in any two pages of the target file, a preset file is obtained, wherein the preset file includes the same contents in the any two pages;

[0082] For each target page in the target file except the arbitrary two pages, compare the content in the target page with the content in the preset file, remove the content in the preset file that does not appear in the target page, and obtain the remaining content in the preset file;

[0083] According to the remaining content and the discarded content in the preset file, the watermark in the target file is identified and deleted.

[0084] A2. The method according to claim A1, wherein at least one type of content comprises:

[0085] Text content, image content.

[0086] A3. According to the method of claim A2, the attribute information of the text content includes at least the following: font, font shape, font size, font color;

[0087] The attribute information of the image content includes at least the following: image size, image color, and image format.

[0088] A4. The method according to claim A1, wherein identifying the watermark in the target file based on the remaining content and the removed content in the preset file comprises:

[0089] Determining whether the remaining content in the preset file and the attribute information of the same type of content in the removed content are the same;

[0090] If they are the same, the content with the same attribute information is removed from the remaining content of the preset file to obtain the watermark in the target file;

[0091] If they are not the same, the remaining content in the preset file is the watermark in the target file.

[0092] A5. The method according to claim A1, wherein after identifying the watermark in the target file based on the remaining content and the removed content in the preset file, the method further comprises:

[0093] The watermark is highlighted.

[0094] A6. The method according to claim A5, wherein highlighting the watermark comprises:

[0095] A local grayscale refresh strategy is adopted to highlight the watermark.

[0096] A7. The method according to claim A1, wherein the method further comprises:

[0097] Compare the target file with the target file after the watermark is removed.

[0098] B8. An electronic device, comprising a processor and a memory, wherein the memory is used to store executable instructions, and the executable instructions enable the processor to perform the following operations:

[0099] Acquire at least one type of content in each page of the target file, and attribute information of each type of content;

[0100] By comparing the same type of contents in any two pages of the target file, a preset file is obtained, wherein the preset file includes the same contents in the any two pages;

[0101] For each target page in the target file except the arbitrary two pages, compare the content in the target page with the content in the preset file, remove the content in the preset file that does not appear in the target page, and obtain the remaining content in the preset file;

[0102] According to the remaining content and the discarded content in the preset file, the watermark in the target file is identified and deleted.

[0103] B9. An electronic device according to claim A8, wherein at least one type of content comprises:

[0104] Text content, image content.

[0105] B10. The electronic device according to claim A9, wherein the attribute information of the text content includes at least the following: font, font shape, font size, font color;

[0106] The attribute information of the image content includes at least the following: image size, image color, and image format.

[0107] B11. The electronic device according to claim A8, wherein when identifying the watermark in the target file based on the remaining content and the removed content in the preset file, the executable instruction specifically causes the processor to execute:

[0108] Determining whether the remaining content in the preset file and the attribute information of the same type of content in the removed content are the same;

[0109] If they are the same, the content with the same attribute information is removed from the remaining content of the preset file to obtain the watermark in the target file;

[0110] If they are not the same, the remaining content in the preset file is the watermark in the target file.

[0111] B12. The electronic device according to claim A8, wherein after identifying the watermark in the target file based on the remaining content and the removed content in the preset file, the executable instructions further cause the processor to execute:

[0112] The watermark is highlighted.

[0113] B13. The electronic device according to claim A8, wherein the watermark is highlighted, and the executable instructions specifically cause the processor to execute:

[0114] A local grayscale refresh strategy is adopted to highlight the watermark.

[0115] B14. An electronic device according to claim A8, wherein the executable instructions further cause the processor to execute:

[0116] Compare the target file with the target file after the watermark is removed.

[0117] C15 A computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the watermark removal method described in any one of claims A1 to A7.

[0118] The various component embodiments of the present disclosure can be implemented in hardware in all or part of the steps, or implemented in software modules running on one or more processors, or implemented in a combination thereof. It should be understood by those skilled in the art that a microprocessor or a digital signal processor (DSP) can be used in practice to implement some or all functions of some or all components in the electronic device according to the embodiments of the present disclosure. The present disclosure can also be implemented as a device or apparatus program (e.g., a computer program and a computer program product) for executing part or all of the methods described herein. Such a program implementing the present disclosure can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0119] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0120] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0121] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A watermark removal method, characterized in that: include: Acquire at least one type of content in each page of the target file, and attribute information of each type of content; By comparing the same type of contents in any two pages of the target file, a preset file is obtained, wherein the preset file includes the same contents in the any two pages; For each target page in the target file except the arbitrary two pages, compare the content in the target page with the content in the preset file, remove the content in the preset file that does not appear in the target page, and obtain the remaining content in the preset file; According to the remaining content and the discarded content in the preset file, the watermark in the target file is identified and the watermark is deleted; Identifying the watermark in the target file according to the remaining content and the discarded content in the preset file includes: Determining whether the remaining content in the preset file and the attribute information of the same type of content in the removed content are the same; If they are the same, the content with the same attribute information is removed from the remaining content of the preset file to obtain the watermark in the target file; If they are not the same, the remaining content in the preset file is the watermark in the target file.

2. The method according to claim 1, characterized in that The at least one type of content includes: Text content, image content.

3. The method according to claim 2, characterized in that The attribute information of the text content includes at least the following: font, font shape, font size, font color; The attribute information of the image content includes at least the following: image size, image color, and image format.

4. The method according to claim 1, characterized in that: After identifying the watermark in the target file according to the remaining content and the removed content in the preset file, the method further includes: The watermark is highlighted.

5. The method according to claim 4, characterized in that The watermark is highlighted, comprising: A local grayscale refresh strategy is adopted to highlight the watermark.

6. The method according to claim 1, characterized in that The method further comprises: Compare the target file with the target file after the watermark is removed.

7. An electronic device, characterized in that: The invention comprises a processor and a memory, wherein the memory is used to store executable instructions, and the executable instructions enable the processor to perform the following operations: Acquire at least one type of content in each page of the target file, and attribute information of each type of content; By comparing the same type of contents in any two pages of the target file, a preset file is obtained, wherein the preset file includes the same contents in the any two pages; For each target page in the target file except the arbitrary two pages, compare the content in the target page with the content in the preset file, remove the content in the preset file that does not appear in the target page, and obtain the remaining content in the preset file; According to the remaining content and the discarded content in the preset file, the watermark in the target file is identified and the watermark is deleted; When identifying the watermark in the target file according to the remaining content and the removed content in the preset file, the executable instruction specifically causes the processor to execute: Determining whether the remaining content in the preset file and the attribute information of the same type of content in the removed content are the same; If they are the same, the content with the same attribute information is removed from the remaining content of the preset file to obtain the watermark in the target file; If they are not the same, the remaining content in the preset file is the watermark in the target file.

8. The electronic device according to claim 7, characterized in that: The at least one type of content includes: Text content, image content.

9. The electronic device according to claim 8, characterized in that: The attribute information of the text content includes at least the following: font, font shape, font size, font color; The attribute information of the image content includes at least the following: image size, image color, and image format.

10. The electronic device according to claim 7, characterized in that: After identifying the watermark in the target file according to the remaining content and the removed content in the preset file, the executable instruction further causes the processor to execute: The watermark is highlighted.

11. The electronic device according to claim 10, characterized in that: The watermark is highlighted, and the executable instruction specifically causes the processor to execute: A local grayscale refresh strategy is adopted to highlight the watermark.

12. The electronic device according to claim 7, characterized in that: The executable instructions further cause the processor to execute: Compare the target file with the target file after the watermark is removed.

13. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the watermark removal method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Watermark removing method and device and server

    CN109903210A

  • Watermark identification method and device for PDF (Portable Document Format) file

    CN113378528A