CN110874456B - Watermark embedding method, watermark extracting method, watermark embedding device, watermark extracting device and data processing method - Google Patents
Watermark embedding method, watermark extracting method, watermark embedding device, watermark extracting device and data processing method Download PDFInfo
- Publication number
- CN110874456B CN110874456B CN201811011176.1A CN201811011176A CN110874456B CN 110874456 B CN110874456 B CN 110874456B CN 201811011176 A CN201811011176 A CN 201811011176A CN 110874456 B CN110874456 B CN 110874456B
- Authority
- CN
- China
- Prior art keywords
- watermark information
- carrier
- embedding
- carrier sub
- sub
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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 OR CALCULATING; 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/106—Enforcing content protection by specific content processing
- G06F21/1063—Personalisation
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Technology Law (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Editing Of Facsimile Originals (AREA)
- Image Processing (AREA)
Abstract
Description
技术领域technical field
本申请涉及数字水印嵌入技术,具体涉及一种水印嵌入方法、装置、电子设备及存储设备。本发明同时涉及一种水印提取方法、装置、电子设备及存储设备。本发明同时涉及一种数据处理方法。The present application relates to digital watermark embedding technology, in particular to a watermark embedding method, device, electronic device and storage device. The invention also relates to a watermark extraction method, device, electronic device and storage device. The invention also relates to a data processing method.
背景技术Background technique
当今时代是信息时代,办公信息化变得越来越普遍。Today is the information age, and office informatization is becoming more and more common.
例如,Office作为微软公司开发的办公软件套装,几乎已经成为全球通用的办公软件处理方案。Office系列软件使用方便,易上手、易使用,有着极为庞大的用户群体,每天产生的Office文档数量数不胜数。Office办公套件主要由Word、PowerPoint、Excel三种软件组成,企业内部的文档数据可能包含具有很高价值的信息。这些重要信息的版权保护和追踪溯源就变得非常有意义。数字水印技术是实现文件版权保护的一种有效技术。通过在Office文档中嵌入有意义的水印信息,可以实现文档的版权保护,防止被非法盗用,如果发现文档被泄露,可以实现追踪溯源,达到追责的目的。For example, Office, as an office software suite developed by Microsoft Corporation, has almost become a universal office software processing solution. The Office series software is easy to use, easy to use and easy to use. It has a very large user group, and the number of Office documents generated every day is countless. The Office suite is mainly composed of Word, PowerPoint, and Excel. The document data within the enterprise may contain highly valuable information. The copyright protection and traceability of these important information become very meaningful. Digital watermarking technology is an effective technology to realize file copyright protection. By embedding meaningful watermark information in Office documents, the copyright protection of documents can be achieved to prevent illegal misappropriation.
现有技术中,存在一些在文档中嵌入水印的方案,但是大部分无法抵御截取攻击,即如果截取文档中的部分片段则无法提取水印信息,不能保证水印的安全性。In the prior art, there are some solutions for embedding watermarks in documents, but most of them cannot resist interception attacks, that is, if part of the document is intercepted, the watermark information cannot be extracted, and the security of the watermark cannot be guaranteed.
因此,为保证水印的安全性,需要提高水印的抗截取攻击能力。Therefore, in order to ensure the security of the watermark, it is necessary to improve the anti-intercept attack capability of the watermark.
发明内容SUMMARY OF THE INVENTION
本申请提供一种水印嵌入方法、装置、电子设备及存储设备,以解决现有水印无法抵御截取攻击的问题。The present application provides a watermark embedding method, device, electronic device and storage device to solve the problem that the existing watermark cannot resist interception attacks.
本申请提供一种水印嵌入方法,包括:The present application provides a watermark embedding method, including:
获得需要嵌入到载体对象中的水印信息;Obtain the watermark information that needs to be embedded in the carrier object;
确定所述载体对象中至少一个待嵌入水印信息的载体子对象;determining at least one carrier sub-object to be embedded with watermark information in the carrier object;
将所述水印信息嵌入到所述载体子对象。Embed the watermark information into the carrier sub-object.
可选的,所述将所述水印信息嵌入到所述载体对象,包括:Optionally, the embedding of the watermark information into the carrier object includes:
采用调用COM接口的方式将所述水印信息嵌入到所述载体子对象;和/或Embed the watermark information into the carrier sub-object by invoking the COM interface; and/or
采用修改载体对象记载的内容的方式将所述水印信息嵌入到所述载体子对象。The watermark information is embedded in the carrier sub-object in a manner of modifying the content recorded in the carrier object.
可选的,所述采用调用COM接口的方式将所述水印信息嵌入到所述载体子对象,包括:Optionally, the method of invoking the COM interface to embed the watermark information into the carrier sub-object includes:
通过COM接口在所述载体对象中的显示区域新建一个文本框,将所述文本框作为载体子对象;Create a new text box in the display area of the carrier object through the COM interface, and use the text box as a carrier sub-object;
将所述水印信息插入到所述文本框中;inserting the watermark information into the text box;
对插入所述水印信息的文本框进行隐藏。The text box in which the watermark information is inserted is hidden.
可选的,通过COM接口在所述载体对象中的显示区域的显示区域新建一个文本框,将所述文本框作为载体子对象,包括:Optionally, create a new text box in the display area of the display area in the carrier object through the COM interface, and use the text box as a carrier sub-object, including:
通过COM接口在所述载体对象中的显示区域边缘新建一个文本框;Create a new text box at the edge of the display area in the carrier object through the COM interface;
将新建的文本框大小设置为最小,将得到的文本框作为载体子对象。Set the size of the newly created text box to the smallest, and use the resulting text box as a carrier sub-object.
可选的,所述采用修改载体对象记载的内容的方式将所述水印信息嵌入到所述载体子对象,包括:Optionally, embedding the watermark information into the carrier sub-object by modifying the content recorded in the carrier object includes:
使用解压程序将所述载体对象解压,得到解压的文件;Use a decompression program to decompress the carrier object to obtain a decompressed file;
从所述解压的文件中获得载体子对象对应的文件,将水印信息嵌入到所述载体子对象对应的文件中;Obtain the file corresponding to the carrier sub-object from the decompressed file, and embed the watermark information in the file corresponding to the carrier sub-object;
所述方法还包括:The method also includes:
将嵌入水印信息的解压的文件进行压缩,得到嵌入水印信息的载体对象。The decompressed file with embedded watermark information is compressed to obtain a carrier object with embedded watermark information.
可选的,所述采用修改载体对象记载的内容的方式将所述水印信息嵌入到所述载体子对象,包括:Optionally, embedding the watermark information into the carrier sub-object by modifying the content recorded in the carrier object includes:
将所述水印信息作为文本属性信息嵌入到所述载体对象;或者,Embedding the watermark information into the carrier object as text attribute information; or,
根据所述水印信息替换掉所述载体对象中的同义词。The synonyms in the carrier object are replaced according to the watermark information.
可选的,所述文本属性,包括以下至少一种:Optionally, the text attribute includes at least one of the following:
文字的字号;文字的间隔;文字注音对齐方式。The font size of the text; the spacing of the text; the phonetic alignment of the text.
可选的,所述载体对象为表格;Optionally, the carrier object is a table;
所述采用修改载体对象记载的内容的方式将所述水印信息嵌入到所述载体子对象,包括:将单元格的特定属性当成嵌入对象,将所述水印信息嵌入到所述表格中的单元格的属性信息中。The embedding of the watermark information into the carrier sub-object by modifying the content recorded in the carrier object includes: taking a specific attribute of a cell as an embedded object, and embedding the watermark information into the cell in the table in the attribute information.
可选的,还包括:采用置乱密码的方式将所述水印信息转换为第二水印信息;Optionally, it also includes: converting the watermark information into second watermark information by scrambling a password;
所述将所述水印信息嵌入到所述载体子对象,包括:将所述第二水印信息嵌入到所述载体子对象。The embedding of the watermark information into the carrier sub-object includes: embedding the second watermark information into the carrier sub-object.
本申请还提供一种水印提取方法,包括:The application also provides a watermark extraction method, comprising:
获得待提取水印信息的载体对象;Obtain the carrier object of the watermark information to be extracted;
确定所述载体对象中至少一个嵌入水印信息的载体子对象;determining at least one carrier sub-object embedded with watermark information in the carrier object;
从所述载体子对象中提取出水印信息。The watermark information is extracted from the carrier sub-object.
可选的,当采用采用调用COM接口的方式将所述水印信息嵌入到所述载体子对象时,所述从所述载体子对象中提取出水印信息,包括:Optionally, when the watermark information is embedded into the carrier sub-object by calling a COM interface, the extracting the watermark information from the carrier sub-object includes:
从隐藏的文本框中提取出水印信息。Extract the watermark information from the hidden text box.
可选的,所述从所述载体子对象中提取出水印信息,包括:Optionally, the extracting watermark information from the carrier sub-object includes:
使用解压程序将待提取水印信息的载体对象解压,得到解压的文件;Use the decompression program to decompress the carrier object of the watermark information to be extracted to obtain the decompressed file;
从所述解压的文件中找到嵌入水印信息的载体子对象对应的文件,从所述载体子对象对应的文件中提取出所述水印信息。The file corresponding to the carrier sub-object in which the watermark information is embedded is found from the decompressed file, and the watermark information is extracted from the file corresponding to the carrier sub-object.
可选的,所述从所述载体子对象中提取出水印信息,包括:Optionally, the extracting watermark information from the carrier sub-object includes:
从载体子对象的文本属性中提取所述水印信息;或者,Extract the watermark information from the text attribute of the carrier sub-object; or,
从同义词中提取出所述水印信息。The watermark information is extracted from the synonyms.
可选的,所述文本属性,包括以下至少一种:Optionally, the text attribute includes at least one of the following:
文字的字号;文字的间隔;文字注音对齐方式。The font size of the text; the spacing of the text; the phonetic alignment of the text.
可选的,所述载体子对象为表格;Optionally, the carrier sub-object is a table;
所述从所述载体子对象中提取出水印信息,包括:从单元格的属性中提取出水印信息。The extracting the watermark information from the carrier sub-object includes: extracting the watermark information from the attribute of the cell.
可选的,所述从所述载体子对象中提取出水印信息,包括:从所述载体子对象中提取出第一水印信息;采用置乱密码将所述第一水印信息转换为水印信息。Optionally, the extracting the watermark information from the carrier sub-object includes: extracting first watermark information from the carrier sub-object; and converting the first watermark information into watermark information by using a scrambled password.
本申请还提供一种水印嵌入装置,包括:The present application also provides a watermark embedding device, comprising:
水印信息获得单元,用于获得需要嵌入到载体对象中的水印信息;a watermark information obtaining unit, used to obtain the watermark information that needs to be embedded in the carrier object;
载体子对象确定单元,用于确定所述载体对象中至少一个待嵌入水印信息的载体子对象;a carrier sub-object determining unit, configured to determine at least one carrier sub-object to be embedded with watermark information in the carrier object;
水印信息嵌入单元,用于将所述水印信息嵌入到所述载体子对象。A watermark information embedding unit, used for embedding the watermark information into the carrier sub-object.
本申请还提供一种电子设备,包括:The application also provides an electronic device, comprising:
处理器;以及processor; and
存储器,用于存储水印嵌入方法的程序,该设备通电并通过所述处理器运行该水印嵌入方法的程序后,执行下述步骤:The memory is used to store the program of the watermark embedding method. After the device is powered on and the program of the watermark embedding method is run through the processor, the following steps are performed:
获得需要嵌入到载体对象中的水印信息;Obtain the watermark information that needs to be embedded in the carrier object;
确定所述载体对象中至少一个待嵌入水印信息的载体子对象;determining at least one carrier sub-object to be embedded with watermark information in the carrier object;
将所述水印信息嵌入到所述载体子对象。Embed the watermark information into the carrier sub-object.
本申请还提供一种存储设备,存储有水印嵌入方法的程序,该程序被处理器运行,执行下述步骤:The present application also provides a storage device that stores a program of the watermark embedding method, and the program is executed by the processor to perform the following steps:
获得需要嵌入到载体对象中的水印信息;Obtain the watermark information that needs to be embedded in the carrier object;
确定所述载体对象中至少一个待嵌入水印信息的载体子对象;determining at least one carrier sub-object to be embedded with watermark information in the carrier object;
将所述水印信息嵌入到所述载体子对象。Embed the watermark information into the carrier sub-object.
本申请还提供一种水印提取装置,包括:The application also provides a watermark extraction device, comprising:
载体对象获得单元,用于获得待提取水印信息的载体对象;a carrier object obtaining unit, used for obtaining the carrier object of the watermark information to be extracted;
载体子对象确定单元,用于确定所述载体对象中至少一个嵌入水印信息的载体子对象;a carrier sub-object determining unit, configured to determine at least one carrier sub-object embedded with watermark information in the carrier object;
水印信息提取单元,用于从所述载体子对象中提取出水印信息。The watermark information extraction unit is used for extracting the watermark information from the carrier sub-object.
本申请还提供一种电子设备,包括:The application also provides an electronic device, comprising:
处理器;以及processor; and
存储器,用于存储水印提取方法的程序,该设备通电并通过所述处理器运行该水印嵌入方法的程序后,执行下述步骤:The memory is used to store the program of the watermark extraction method. After the device is powered on and runs the program of the watermark embedding method through the processor, the following steps are performed:
获得待提取水印信息的载体对象;Obtain the carrier object of the watermark information to be extracted;
确定所述载体对象中至少一个嵌入水印信息的载体子对象;determining at least one carrier sub-object embedded with watermark information in the carrier object;
从所述载体子对象中提取出水印信息。The watermark information is extracted from the carrier sub-object.
本申请还提供一种存储设备,存储有水印提取方法的程序,该程序被处理器运行,执行下述步骤:The present application also provides a storage device that stores a program of the watermark extraction method, and the program is run by a processor and performs the following steps:
获得待提取水印信息的载体对象;Obtain the carrier object of the watermark information to be extracted;
确定所述载体对象中至少一个嵌入水印信息的载体子对象;determining at least one carrier sub-object embedded with watermark information in the carrier object;
从所述载体子对象中提取出水印信息。The watermark information is extracted from the carrier sub-object.
本申请还提供一种数据处理方法,包括:The application also provides a data processing method, comprising:
获取载体对象,其中,所述载体对象包括待嵌入水印信息的数据对象;obtaining a carrier object, wherein the carrier object includes a data object to be embedded with watermark information;
获取水印信息,其中,所述水印信息包括待嵌入到所述载体对象的标识;obtaining watermark information, wherein the watermark information includes an identifier to be embedded in the carrier object;
确定所述载体对象中至少一个载体子对象,其中所述载体子对象包括所述载体对象的组成部分,所述组成部分包括字符数据、格式数据、多媒体数据和/或控件数据;determining at least one carrier sub-object in the carrier object, wherein the carrier sub-object includes components of the carrier object, and the components include character data, format data, multimedia data and/or widget data;
将所述水印信息嵌入到所述载体子对象。Embed the watermark information into the carrier sub-object.
与现有技术相比,本发明具有以下优点:Compared with the prior art, the present invention has the following advantages:
本申请提供一种水印嵌入方法、装置、电子设备及存储设备,将水印信息嵌入到载体对象中多个待嵌入水印信息的载体子对象,在载体对象受到截取攻击时,由于水印信息嵌入到了多个载体子对象中,截取出的部分文档很大程度上能够保留水印信息,因此可以提高水印的抗截取攻击能力。The present application provides a watermark embedding method, device, electronic device and storage device, which embed watermark information into a plurality of carrier sub-objects to be embedded with watermark information in a carrier object. In each carrier sub-object, the intercepted part of the document can retain the watermark information to a large extent, so the anti interception attack capability of the watermark can be improved.
附图说明Description of drawings
图1是本申请第一实施例提供的一种水印嵌入方法的流程图。FIG. 1 is a flowchart of a watermark embedding method provided by the first embodiment of the present application.
图2是本申请第一实施例提供的一种通过COM接口在word文档中的显示区域边缘新建一个文本框的示意图。FIG. 2 is a schematic diagram of creating a new text box at the edge of a display area in a word document through a COM interface provided by the first embodiment of the present application.
图3是本申请第一实施例提供的将新建文本框设置为最小的示意图。FIG. 3 is a schematic diagram of setting a newly created text box to the smallest size provided by the first embodiment of the present application.
图4是本申请第一实施例提供的将水印信息插入到文本框中的示意图。FIG. 4 is a schematic diagram of inserting watermark information into a text box provided by the first embodiment of the present application.
图5是本申请第一实施例提供的将文本框隐藏的示意图。FIG. 5 is a schematic diagram of hiding a text box provided by the first embodiment of the present application.
图6是本申请第一实施例提供的嵌入水印信息前的文字显示效果的示意图。FIG. 6 is a schematic diagram of a text display effect before embedding watermark information provided by the first embodiment of the present application.
图7是本申请第一实施例提供的嵌入水印信息后的文字显示效果的示意图。FIG. 7 is a schematic diagram of a text display effect after embedding watermark information provided by the first embodiment of the present application.
图8是本申请第一实施例提供的将水印信息采用多种方式嵌入到载体对象的多个子对象中的示意图。FIG. 8 is a schematic diagram of embedding watermark information into multiple sub-objects of a carrier object in various ways according to the first embodiment of the present application.
图9是本申请第二实施例提供的一种水印提取方法的流程图。FIG. 9 is a flowchart of a watermark extraction method provided by the second embodiment of the present application.
图10是本申请第三实施例提供的一种水印嵌入装置的示意图。FIG. 10 is a schematic diagram of a watermark embedding apparatus provided by the third embodiment of the present application.
图11是本申请第四实施例提供的一种电子设备的示意图。FIG. 11 is a schematic diagram of an electronic device according to a fourth embodiment of the present application.
图12是本申请第六实施例提供的一种水印提取装置的示意图。FIG. 12 is a schematic diagram of a watermark extraction apparatus provided by the sixth embodiment of the present application.
图13是本申请第七实施例提供的一种电子设备的示意图。FIG. 13 is a schematic diagram of an electronic device according to a seventh embodiment of the present application.
图14是本申请第九实施例提供的一种数据处理方法的流程图。FIG. 14 is a flowchart of a data processing method provided by the ninth embodiment of the present application.
具体实施方式Detailed ways
在下面的描述中阐述了很多具体细节以便于充分理解本发明。但是本发明能够以很多不同于在此描述的其它方式来实施,本领域技术人员可以在不违背本发明内涵的情况下做类似推广,因此本发明不受下面公开的具体实施的限制。In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar promotions without departing from the connotation of the present invention. Therefore, the present invention is not limited by the specific implementation disclosed below.
本申请第一实施例提供一种水印嵌入方法,以下结合图1、进行说明。The first embodiment of the present application provides a watermark embedding method, which will be described below with reference to FIG. 1 .
如图1所示,在步骤S101中,获得需要嵌入到载体对象中的水印信息。As shown in FIG. 1, in step S101, the watermark information that needs to be embedded in the carrier object is obtained.
所述载体对象,指需要嵌入水印信息的数据对象。所述载体对象,指数字载体,例如微软公司产品Office文档,网页数据等;其中,Office文档包括Word、PowerPoint、Excel等。根据本发明至少一个实施例,数字载体包括各种类型文档,本申请提供的方法不限于具体文档种类/文件种类。The carrier object refers to a data object that needs to be embedded with watermark information. The carrier object refers to a digital carrier, such as Microsoft Office documents, web page data, etc.; wherein, the Office documents include Word, PowerPoint, Excel, and the like. According to at least one embodiment of the present invention, the digital carrier includes various types of documents, and the methods provided in this application are not limited to specific document types/file types.
所述水印信息,指待嵌入到载体对象中的标识。例如,水印信息可以是可见的,提醒用户相关的保密和权限注意;又例如,水印信息可以隐藏嵌入到载体对象中,不会影响原载体对象的使用价值,也不易被探知和再次修改。但水印信息可以被生产方识别和辨认。通过这些隐藏在载体中的水印信息,可以达到确认内容创建者、购买者、传送隐秘信息或者判断载体对象是否被篡改等目的。水印信息可以为某个公司的公司名,也可以为某个员工的员工编号或其他标识信息。The watermark information refers to the identifier to be embedded in the carrier object. For example, the watermark information can be visible, reminding users to pay attention to confidentiality and rights; for another example, the watermark information can be hidden and embedded in the carrier object, which will not affect the use value of the original carrier object, and is not easy to be detected and modified again. But the watermark information can be identified and recognized by the producer. Through these watermark information hidden in the carrier, the purpose of confirming the content creator, purchaser, transmitting secret information or judging whether the carrier object has been tampered can be achieved. The watermark information can be the company name of a company, the employee number or other identification information of an employee.
如图1所示,在步骤S102中,确定所述载体对象中至少一个待嵌入水印信息的载体子对象。As shown in FIG. 1, in step S102, at least one carrier sub-object to be embedded with watermark information in the carrier object is determined.
所述载体子对象,指载体对象的组成部分。载体子对象的类型包括:字符数据,文本框、表格等格式数据,图片、音频、视频等多媒体数据,按钮、菜单等控件数据。例如,word文档,载体子对象包括:word文档中的图片、字符数据、文本框等。The carrier sub-object refers to a component of the carrier object. The types of carrier sub-objects include: character data, format data such as text boxes and tables, multimedia data such as pictures, audios, and videos, and control data such as buttons and menus. For example, in a word document, the carrier sub-objects include: pictures, character data, text boxes, etc. in the word document.
为了使载体对象抗截取攻击,可以确定载体对象中多个待嵌入水印信息的载体子对象,例如,载体对象为word文档,可以选择word文档中的多个图片、字符数据、文本框作为载体子对象。In order to make the carrier object resistant to interception attacks, multiple carrier sub-objects to be embedded with watermark information in the carrier object can be determined. For example, if the carrier object is a word document, multiple pictures, character data, and text boxes in the word document can be selected as the carrier sub-objects. object.
如图1所示,在步骤S103中,将所述水印信息嵌入到所述载体子对象。As shown in FIG. 1, in step S103, the watermark information is embedded into the carrier sub-object.
所述将所述水印信息嵌入到所述载体对象,包括:The embedding of the watermark information into the carrier object includes:
采用调用COM接口的方式将所述水印信息嵌入到所述载体子对象;和/或Embed the watermark information into the carrier sub-object by invoking the COM interface; and/or
采用修改载体对象记载的内容的方式将所述水印信息嵌入到所述载体子对象。The watermark information is embedded in the carrier sub-object in a manner of modifying the content recorded in the carrier object.
所述采用调用COM接口的方式将所述水印信息嵌入到所述载体子对象,包括:The method of invoking the COM interface to embed the watermark information into the carrier sub-object includes:
通过COM接口在所述载体对象中的显示区域新建一个文本框,将所述文本框作为载体子对象;Create a new text box in the display area of the carrier object through the COM interface, and use the text box as a carrier sub-object;
将所述水印信息插入到所述文本框中;inserting the watermark information into the text box;
对插入所述水印信息的文本框进行隐藏。The text box in which the watermark information is inserted is hidden.
所述通过COM接口在所述载体对象中的显示区域的显示区域新建一个文本框,将所述文本框作为载体子对象,包括:Said creating a new text box in the display area of the display area in the carrier object through the COM interface, and using the text box as a carrier sub-object, including:
通过COM接口在所述载体对象中的显示区域边缘新建一个文本框;Create a new text box at the edge of the display area in the carrier object through the COM interface;
将新建的文本框大小设置为最小,将得到的文本框作为载体子对象。Set the size of the newly created text box to the smallest, and use the resulting text box as a carrier sub-object.
例如,载体对象为一个word文档,通过COM接口在word文档中的显示区域左上角新建一个文本框(如图2所示),并将其设置为最小(如图3所示),将水印信息插入到此文本框中(如图4所示),然后使用“选择->隐藏”功能将该文本框隐藏(如图5所示)。For example, if the carrier object is a word document, create a new text box in the upper left corner of the display area in the word document through the COM interface (as shown in Figure 2), and set it to the minimum value (as shown in Figure 3), and set the watermark information Insert into this text box (as shown in Figure 4), and then use the "Select->Hide" function to hide the text box (as shown in Figure 5).
采用调用COM接口的方式将所述水印信息嵌入到所述载体子对象,载体对象可以抵抗全选复制、部分删除的攻击。The watermark information is embedded in the carrier sub-object by invoking the COM interface, and the carrier object can resist the attack of copy-all and partial deletion.
所述采用修改载体对象记载的内容的方式将所述水印信息嵌入到所述载体子对象,包括:The embedding of the watermark information into the carrier sub-object by modifying the content recorded in the carrier object includes:
使用解压程序将所述载体对象解压,得到解压的文件;Use a decompression program to decompress the carrier object to obtain a decompressed file;
从所述解压的文件中获得载体子对象对应的文件,将水印信息嵌入到所述载体子对象对应的文件中;Obtain the file corresponding to the carrier sub-object from the decompressed file, and embed the watermark information in the file corresponding to the carrier sub-object;
所述方法还包括:The method also includes:
将嵌入水印信息的解压的文件进行压缩,得到嵌入水印信息的载体对象。The decompressed file with embedded watermark information is compressed to obtain a carrier object with embedded watermark information.
载体子对象的类型为图片、音频或视频时可以采用上述方法。The above method can be used when the type of the carrier sub-object is picture, audio or video.
例如,载体子对象为office文件中的图片,采用修改载体对象记载的内容的方式将所述水印信息嵌入到载体子对象,其具体步骤如下:首先使用解压程序将原始文件解压(如果是03版office文件,则需要先将其转化为07版以上的文件),然后找到office文件中的图片对应的图像文件,再使用数字图像水印的嵌入方法将水印信息嵌入进图像文件中。嵌入完成后将解压出的文件进行压缩,生成Office文件格式(如果是03版office文件则需要将07版的文件转回03版)。本例可以抵抗对图片复制的攻击。For example, the carrier sub-object is a picture in an office file, and the watermark information is embedded in the carrier sub-object by modifying the content recorded in the carrier object. Office file, you need to convert it into a file above version 07), then find the image file corresponding to the picture in the office file, and then use the embedding method of digital image watermark to embed the watermark information into the image file. After the embedding is completed, compress the decompressed files to generate the Office file format (if it is an office file of version 03, you need to convert the file of version 07 back to version 03). This example is resistant to attacks on image copying.
针对载体子对象的类型为视频和音频的水印嵌入例子与载体子对象的类型为图片的水印嵌入例子类似。采用上述采用修改载体对象记载的内容的方式将水印信息嵌入到载体子对象的水印嵌入方法,可以对视频和音频复制的情况进行水印提取。将水印信息嵌入到多媒体文件(视频、音频等)中,不仅可以保护多媒体文件本身的版权,同时也可以为包含多媒体文件的文档提供版权保护。The watermark embedding example for bearer sub-objects of type video and audio is similar to the watermark embedding example for bearer sub-objects of type picture. By adopting the above watermark embedding method in which the watermark information is embedded in the carrier sub-object by modifying the content recorded in the carrier object, the watermark extraction can be performed in the case of video and audio duplication. Embedding watermark information into a multimedia file (video, audio, etc.) can not only protect the copyright of the multimedia file itself, but also provide copyright protection for the document containing the multimedia file.
所述采用修改载体对象记载的内容的方式将所述水印信息嵌入到所述载体子对象,包括:The embedding of the watermark information into the carrier sub-object by modifying the content recorded in the carrier object includes:
将所述水印信息作为文本属性信息嵌入到所述载体子对象;或者,Embedding the watermark information into the carrier sub-object as text attribute information; or,
根据所述水印信息替换掉所述载体子对象中的同义词。The synonyms in the carrier sub-object are replaced according to the watermark information.
载体子对象的类型为字符数据、文本框或表格时可以采用上述方法。The above method can be used when the type of the carrier sub-object is character data, text box or table.
将所述水印信息作为文本属性信息嵌入到所述载体子对象,指将水印信息转化为文字某种不易察觉的属性嵌入到载体子对象。文本属性包括:文字的字号;文字的间隔;文字注音对齐方式等。例如,文本属性为文字的字号,5号字和5.5号字在肉眼上不易察觉,可以将5号字表示为嵌入信息为0,5.5号字表示为嵌入信息为1。如图6所示,嵌入前的“这是一行示例文字”,每个字的大小相同,图7为嵌入信息“101010101”后的示意图,5.5号字表示嵌入的信息为1,5号字表示嵌入的信息为0。诸如此类的方法非常多,不再一一赘述。Embedding the watermark information into the carrier sub-object as text attribute information refers to converting the watermark information into a text with a certain imperceptible attribute and embedding it into the carrier sub-object. The text attributes include: the font size of the text; the spacing of the text; the phonetic alignment of the text, etc. For example, if the text attribute is the font size of the text, and the 5 and 5.5 characters are not easily perceptible to the naked eye, the 5-size character can be represented as 0 for embedded information, and the 5.5-size character as 1 for embedded information. As shown in Figure 6, before embedding "This is a line of example text", each word has the same size, Figure 7 is a schematic diagram after embedding information "101010101", the 5.5-size word indicates that the embedded information is 1, and the 5-size word indicates The embedded information is 0. There are many such methods, so I won't repeat them one by one.
根据所述水印信息替换掉所述载体子对象中的同义词,此种方式可以抵抗对载体对象的复制粘贴,拍照等侵权手段。The synonyms in the carrier sub-object are replaced according to the watermark information, and this method can resist tortious means such as copying and pasting of the carrier object, and taking pictures.
使用根据水印信息替换掉载体子对象中的同义词的方式,属于基于内容的信息嵌入方式,可以通过使用一个对照的同义词词典进行编码和解码。例如,同义词对“早上——早晨”,其中“早上”代表嵌入信息0,“早晨”代表嵌入信息1,通过检索和替换文字中出现的“早上”和“早晨”,将水印信息嵌入至载体子对象中。The method of replacing the synonyms in the carrier sub-object according to the watermark information belongs to the content-based information embedding method, which can be encoded and decoded by using a contrasting synonym dictionary. For example, the synonym pair "morning-morning", where "morning" represents embedded information 0 and "morning" represents embedded information 1, by retrieving and replacing occurrences of "morning" and "morning" in the text, the watermark information is embedded into the carrier in child objects.
可见,在将水印信息嵌入到所述载体对象中相同类型的载体子对象中时,可以采用不同的嵌入方式,例如,对于字符数据载体子对象,可以采用将水印信息作为文本属性信息嵌入到所述载体子对象的方式或者采用根据水印信息替换掉载体子对象中的同义词的方式。It can be seen that when the watermark information is embedded in the same type of carrier sub-object in the carrier object, different embedding methods can be adopted. For example, for character data carrier sub-objects, the watermark information can be embedded as text attribute information into all sub-objects The method of describing the carrier sub-object or the method of replacing the synonym in the carrier sub-object according to the watermark information is adopted.
当载体对象为表格时;所述采用修改载体对象记载的内容的方式将所述水印信息嵌入到所述载体子对象,包括:将单元格的属性作为载体子对象,将所述水印信息嵌入到所述表格中的单元格的属性信息中。When the carrier object is a table; the method of modifying the content recorded in the carrier object to embed the watermark information into the carrier sub-object includes: taking the attribute of the cell as the carrier sub-object, and embedding the watermark information in the carrier sub-object. In the attribute information of the cells in the table.
当载体对象为表格(例如Excel表格)时,除了通过采用将水印信息作为文本属性信息嵌入到表格的方式之外,还可以将每个单元格的某些属性当成嵌入对象,例如,注音方式。一般情况下单元格的注音很少被使用,注音可以提供三个选项:左对齐,居中,右对齐,在嵌入水印信息时,可以将左对齐作为嵌入信息0,右对齐作为嵌入信息1。When the carrier object is a table (for example, an Excel table), in addition to embedding the watermark information as text attribute information into the table, some attributes of each cell can also be used as embedded objects, for example, the phonetic method. In general, cell phonetics are rarely used, and phonetics can provide three options: left-aligned, centered, and right-aligned. When embedding watermark information, left-aligned can be used as embedded information 0, and right-aligned as embedded information 1.
将所述水印信息嵌入到所述表格中的单元格的属性信息的方式可以抵抗表格的截取攻击及部分删除攻击。The method of embedding the watermark information into the attribute information of the cells in the table can resist the interception attack and partial deletion attack of the table.
在将水印信息嵌入到载体子对象之前,可以采用置乱密码的方式将所述水印信息转换为第二水印信息;再将第二水印信息嵌入到载体子对象。Before embedding the watermark information into the carrier sub-object, the watermark information can be converted into the second watermark information by means of scrambled password; and then the second watermark information is embedded in the carrier sub-object.
例如,假设要嵌入的水印信息为“ABCD”,首先将字符串S转化为十六进制ASCII码字符串S1,“ABCD”就变成了字符串“41424344”;然后将S1通过混沌序列打乱顺序得到新的字符串S2,假设置乱密码为“123”,生成的混沌序列的顺序为“76345218”,那么新的序列S2就变成了“43424144”。则要嵌入的信息S2为第二水印信息,即“43424144”,最后将“123”当作密钥信息保留下来,提供给水印提取端。For example, assuming that the watermark information to be embedded is "ABCD", first convert the string S to the hexadecimal ASCII code string S1, and "ABCD" becomes the string "41424344"; A new string S2 is obtained in random order. Suppose the random password is set to "123", and the order of the generated chaotic sequence is "76345218", then the new sequence S2 becomes "43424144". Then the information S2 to be embedded is the second watermark information, namely "43424144", and finally "123" is reserved as the key information and provided to the watermark extraction end.
将置乱密码提供给水印信息提取端,可以采用两种方式:一种方式是:将所述将置乱密码以单独消息的形式发送至水印信息提取端;另一种方式是:以水印信息提取端和水印信息嵌入端预先约定的方式确定置乱密码。There are two ways to provide the scrambled password to the watermark information extraction end: one way is: send the scrambled password to the watermark information extraction end in the form of a separate message; the other way is: use the watermark information The extraction end and the watermark information embedding end determine the scrambled password in a pre-agreed manner.
至此,对本申请第一实施例提供的水印嵌入方法的实施方式进行了详细说明。本申请通过将水印信息采用多种方式嵌入到载体对象的多个子对象中(如图8所示)可以抗击截图、复制和部分删除攻击,从而解决了嵌入到载体对象中的水印的安全问题。So far, the implementation of the watermark embedding method provided by the first embodiment of the present application has been described in detail. The present application can resist screenshot, copy and partial deletion attacks by embedding watermark information into multiple sub-objects of the carrier object in various ways (as shown in FIG. 8 ), thereby solving the security problem of the watermark embedded in the carrier object.
与本申请第一实施例提供的水印嵌入方法对应的,本申请第二实施例提供一种水印提取方法,以下结合图9进行说明。Corresponding to the watermark embedding method provided by the first embodiment of the present application, the second embodiment of the present application provides a watermark extraction method, which is described below with reference to FIG. 9 .
如图9所示,在步骤S901中,获得待提取水印信息的载体对象。As shown in FIG. 9 , in step S901, a carrier object whose watermark information is to be extracted is obtained.
所述待提取水印信息的载体对象,指经过本申请第一实施例提供的水印嵌入方法嵌入水印信息的数据对象。所述载体对象包括:微软公司产品Office文档,网页数据等;其中,Office文档包括Word、PowerPoint、Excel等。待提取水印信息的载体对象可以是完整的嵌入水印的载体对象,也可以是嵌入水印的载体对象的一部分(对载体对象进行截取操作后获得的),例如,完整的嵌入水印的载体对象为word文档1,通过复制word文档1的部分内容,生成word文档2,则文档2可以为待提取水印信息的载体对象,其为嵌入水印的载体对象的一部分。The carrier object of the watermark information to be extracted refers to the data object in which the watermark information is embedded by the watermark embedding method provided in the first embodiment of the present application. The carrier object includes: Microsoft product Office documents, web page data, etc.; wherein, the Office documents include Word, PowerPoint, Excel, and the like. The carrier object of the watermark information to be extracted can be the complete carrier object embedded with the watermark, or a part of the carrier object embedded with the watermark (obtained after the carrier object is intercepted). For example, the complete carrier object embedded with the watermark is word. For document 1, word document 2 is generated by copying part of the content of word document 1, then document 2 can be a carrier object of the watermark information to be extracted, which is a part of the carrier object in which the watermark is embedded.
如图9所示,在步骤S902中,确定所述载体对象中至少一个嵌入水印信息的载体子对象。As shown in FIG. 9, in step S902, at least one carrier sub-object in which watermark information is embedded in the carrier object is determined.
所述载体子对象,指载体对象的组成部分。载体子对象的类型包括:字符数据,文本框、表格等格式数据,图片、音频、视频等多媒体数据,按钮、菜单等控件数据。例如,word文档,载体子对象包括:word文档中的图片、字符数据、文本框等。The carrier sub-object refers to a component of the carrier object. The types of carrier sub-objects include: character data, format data such as text boxes and tables, multimedia data such as pictures, audios, and videos, and control data such as buttons and menus. For example, in a word document, the carrier sub-objects include: pictures, character data, text boxes, etc. in the word document.
如图9所示,在步骤S903中,从所述载体子对象中提取出水印信息。As shown in FIG. 9, in step S903, watermark information is extracted from the carrier sub-object.
当采用采用调用COM接口的方式将所述水印信息嵌入到所述载体子对象时,所述从所述载体子对象中提取出水印信息,包括:When the watermark information is embedded in the carrier sub-object by calling the COM interface, the extracting the watermark information from the carrier sub-object includes:
从隐藏的文本框中提取出水印信息。Extract the watermark information from the hidden text box.
所述从所述载体子对象中提取出水印信息,包括:The extracting watermark information from the carrier sub-object includes:
使用解压程序将待提取水印信息的载体对象解压,得到解压的文件;Use the decompression program to decompress the carrier object of the watermark information to be extracted to obtain the decompressed file;
从所述解压的文件中找到嵌入水印信息的载体子对象对应的文件,从所述载体子对象对应的文件中提取出所述水印信息。The file corresponding to the carrier sub-object in which the watermark information is embedded is found from the decompressed file, and the watermark information is extracted from the file corresponding to the carrier sub-object.
载体子对象的类型为图片、音频或视频时可以采用上述方法。The above method can be used when the type of the carrier sub-object is picture, audio or video.
所述从所述载体子对象中提取出水印信息,包括:The extracting watermark information from the carrier sub-object includes:
从载体子对象的文本属性中提取所述水印信息;或者,Extract the watermark information from the text attribute of the carrier sub-object; or,
从同义词中提取出所述水印信息。The watermark information is extracted from the synonyms.
所述文本属性,包括以下至少一种:The text attribute includes at least one of the following:
文字的字号;文字的间隔;文字注音对齐方式。The font size of the text; the spacing of the text; the phonetic alignment of the text.
例如,文本属性为文字的字号,5号字和5.5号字在肉眼上不易察觉,5号字表示为嵌入信息为0,5.5号字表示为嵌入信息为1;则提取时,5号字表示提取的信息为0,5.5号字表示提取的信息为1。For example, if the text attribute is the font size of the text, the 5 and 5.5 characters are not easily perceptible to the naked eye, the 5-size character represents the embedded information as 0, and the 5.5-size character represents the embedded information as 1; when extracting, the 5-size character represents The extracted information is 0, and the word 5.5 indicates that the extracted information is 1.
例如,同义词对“早上——早晨”,其中“早上”代表嵌入信息0,“早晨”代表嵌入信息1,如果提取出的同义词为“早上”,则代表提取的信息为“0”,提取出的同义词为“早晨”,则代表提取的信息为“1”。For example, the synonym pair "morning-morning", where "morning" represents embedded information 0, "morning" represents embedded information 1, if the extracted synonym is "morning", it means the extracted information is "0", and the extracted The synonym of is "morning", which means the extracted information is "1".
当载体子对象为表格时;所述从所述载体子对象中提取出水印信息,包括:从单元格的属性中提取出水印信息。When the carrier sub-object is a table; the extracting the watermark information from the carrier sub-object includes: extracting the watermark information from the attribute of the cell.
所述从所述载体子对象中提取出水印信息,包括:从所述载体子对象中提取出第一水印信息;采用置乱密码将所述第一水印信息转换为水印信息。The extracting watermark information from the carrier sub-object includes: extracting first watermark information from the carrier sub-object; and converting the first watermark information into watermark information by using a scrambled password.
沿用本申请第一实施例的例子,从载体子对象中提取出第一水印信息“43424144”,采用置乱密码“123”,生成混沌序列的顺序为“76345218”,将第一水印信息通过沌序列打乱顺序得到字符串“41424344”,最后将其转换为水印信息“ABCD”。Following the example of the first embodiment of the present application, the first watermark information "43424144" is extracted from the carrier sub-object, the scrambled password "123" is used, and the order of generating the chaotic sequence is "76345218", and the first watermark information is passed through the chaotic sequence. The sequence is shuffled to get the string "41424344", which is finally converted into the watermark information "ABCD".
与上述提供的一种水印嵌入方法相对应的,本申请第三实施例还提供了一种水印嵌入装置。Corresponding to the watermark embedding method provided above, the third embodiment of the present application further provides a watermark embedding apparatus.
如图10所示,所述水印嵌入装置包括:As shown in Figure 10, the watermark embedding device includes:
水印信息获得单元1001,用于获得需要嵌入到载体对象中的水印信息;A watermark
载体子对象确定单元1002,用于确定所述载体对象中至少一个待嵌入水印信息的载体子对象;a carrier
水印信息嵌入单元1003,用于将所述水印信息嵌入到所述载体子对象。A watermark
可选的,所述水印信息嵌入单元,包括:Optionally, the watermark information embedding unit includes:
COM接口嵌入子单元,用于采用调用COM接口的方式将所述水印信息嵌入到所述载体子对象;和/或The COM interface embedding sub-unit is used to embed the watermark information into the carrier sub-object by invoking the COM interface; and/or
修改内容嵌入子单元,用于采用修改载体对象记载的内容的方式将所述水印信息嵌入到所述载体子对象。The modified content embedding subunit is used to embed the watermark information into the carrier sub-object in a manner of modifying the content recorded in the carrier object.
可选的,所述COM接口嵌入子单元,包括:Optionally, the COM interface is embedded in a subunit, including:
文本框新建子单元,用于通过COM接口在所述载体对象中的显示区域新建一个文本框,将所述文本框作为载体子对象;A new subunit of the text box is used to create a new text box in the display area in the carrier object through the COM interface, and the text box is used as the carrier sub-object;
插入水印信息子单元,用于将所述水印信息插入到所述文本框中;inserting a watermark information subunit for inserting the watermark information into the text box;
文本框隐藏子单元,用于对插入所述水印信息的文本框进行隐藏。The text box hiding subunit is used to hide the text box into which the watermark information is inserted.
可选的,所述文本框新建子单元,具体用于:Optionally, the text box creates a new subunit, which is specifically used for:
通过COM接口在所述载体对象中的显示区域边缘新建一个文本框;Create a new text box at the edge of the display area in the carrier object through the COM interface;
将新建的文本框大小设置为最小,将得到的文本框作为载体子对象。Set the size of the newly created text box to the smallest, and use the resulting text box as a carrier sub-object.
可选的,所述修改内容嵌入子单元,具体用于:Optionally, the modified content is embedded in a subunit, and is specifically used for:
使用解压程序将所述载体对象解压,得到解压的文件;Use a decompression program to decompress the carrier object to obtain a decompressed file;
从所述解压的文件中获得载体子对象对应的文件,将水印信息嵌入到所述载体子对象对应的文件中;Obtain the file corresponding to the carrier sub-object from the decompressed file, and embed the watermark information in the file corresponding to the carrier sub-object;
所述装置还包括:The device also includes:
文件压缩单元,用于将嵌入水印信息的解压的文件进行压缩,得到嵌入水印信息的载体对象。The file compressing unit is used for compressing the decompressed file with embedded watermark information to obtain a carrier object with embedded watermark information.
可选的,所述修改内容嵌入子单元,具体用于:Optionally, the modified content is embedded in a subunit, and is specifically used for:
将所述水印信息作为文本属性信息嵌入到所述载体子对象;或者,Embedding the watermark information into the carrier sub-object as text attribute information; or,
根据所述水印信息替换掉所述载体子对象中的同义词。The synonyms in the carrier sub-object are replaced according to the watermark information.
可选的,所述文本属性,包括以下至少一种:Optionally, the text attribute includes at least one of the following:
文字的字号;文字的间隔;文字注音对齐方式。The font size of the text; the spacing of the text; the phonetic alignment of the text.
可选的,所述载体对象为表格;Optionally, the carrier object is a table;
所述采用修改载体对象记载的内容的方式将所述水印信息嵌入到所述载体子对象,包括:将单元格的属性作为载体子对象,将所述水印信息嵌入到所述表格中的单元格的属性信息中。The method of modifying the content recorded in the carrier object to embed the watermark information into the carrier sub-object includes: using the attribute of the cell as the carrier sub-object, and embedding the watermark information into the cell in the table in the attribute information.
可选的,所述装置还包括:第二水印信息转换单元,用于采用置乱密码的方式将所述水印信息转换为第二水印信息;Optionally, the apparatus further includes: a second watermark information conversion unit, configured to convert the watermark information into the second watermark information by means of a scrambled password;
所述水印信息嵌入单元,具体用于:将所述第二水印信息嵌入到所述载体子对象。The watermark information embedding unit is specifically configured to: embed the second watermark information into the carrier sub-object.
需要说明的是,对于本申请第三实施例提供的水印嵌入装置的详细描述可以参考对本申请第一实施例的相关描述,这里不再赘述。It should be noted that, for the detailed description of the watermark embedding apparatus provided by the third embodiment of the present application, reference may be made to the relevant description of the first embodiment of the present application, and details are not repeated here.
与上述提供的一种水印嵌入方法相对应的,本申请第四实施例还提供了一种电子设备。Corresponding to the watermark embedding method provided above, the fourth embodiment of the present application further provides an electronic device.
如图11所示,电子设备包括:As shown in Figure 11, the electronic equipment includes:
处理器1101;以及
存储器1102,用于存储水印嵌入方法的程序,该设备通电并通过所述处理器运行该水印嵌入方法的程序后,执行下述步骤:The
获得需要嵌入到载体对象中的水印信息;Obtain the watermark information that needs to be embedded in the carrier object;
确定所述载体对象中至少一个待嵌入水印信息的载体子对象;determining at least one carrier sub-object to be embedded with watermark information in the carrier object;
将所述水印信息嵌入到所述载体子对象。Embed the watermark information into the carrier sub-object.
可选的,所述将所述水印信息嵌入到所述载体对象,包括:Optionally, the embedding of the watermark information into the carrier object includes:
采用调用COM接口的方式将所述水印信息嵌入到所述载体子对象;和/或Embed the watermark information into the carrier sub-object by invoking the COM interface; and/or
采用修改载体对象记载的内容的方式将所述水印信息嵌入到所述载体子对象。The watermark information is embedded in the carrier sub-object in a manner of modifying the content recorded in the carrier object.
可选的,所述采用调用COM接口的方式将所述水印信息嵌入到所述载体子对象,包括:Optionally, the method of invoking the COM interface to embed the watermark information into the carrier sub-object includes:
通过COM接口在所述载体对象中的显示区域新建一个文本框,将所述文本框作为载体子对象;Create a new text box in the display area of the carrier object through the COM interface, and use the text box as a carrier sub-object;
将所述水印信息插入到所述文本框中;inserting the watermark information into the text box;
对插入所述水印信息的文本框进行隐藏。The text box in which the watermark information is inserted is hidden.
可选的,通过COM接口在所述载体对象中的显示区域的显示区域新建一个文本框,将所述文本框作为载体子对象,包括:Optionally, create a new text box in the display area of the display area in the carrier object through the COM interface, and use the text box as a carrier sub-object, including:
通过COM接口在所述载体对象中的显示区域边缘新建一个文本框;Create a new text box at the edge of the display area in the carrier object through the COM interface;
将新建的文本框大小设置为最小,将得到的文本框作为载体子对象。Set the size of the newly created text box to the smallest, and use the resulting text box as a carrier sub-object.
可选的,所述采用修改载体对象记载的内容的方式将所述水印信息嵌入到所述载体子对象,包括:Optionally, embedding the watermark information into the carrier sub-object by modifying the content recorded in the carrier object includes:
使用解压程序将所述载体对象解压,得到解压的文件;Use a decompression program to decompress the carrier object to obtain the decompressed file;
从所述解压的文件中获得载体子对象对应的文件,将水印信息嵌入到所述载体子对象对应的文件中;Obtain the file corresponding to the carrier sub-object from the decompressed file, and embed the watermark information in the file corresponding to the carrier sub-object;
所述电子设备还执行下述步骤:The electronic device also performs the following steps:
将嵌入水印信息的解压的文件进行压缩,得到嵌入水印信息的载体对象。The decompressed file with embedded watermark information is compressed to obtain a carrier object with embedded watermark information.
可选的,所述采用修改载体对象记载的内容的方式将所述水印信息嵌入到所述载体子对象,包括:Optionally, embedding the watermark information into the carrier sub-object by modifying the content recorded in the carrier object includes:
将所述水印信息作为文本属性信息嵌入到所述载体子对象;或者,Embedding the watermark information into the carrier sub-object as text attribute information; or,
根据所述水印信息替换掉所述载体子对象中的同义词。The synonyms in the carrier sub-object are replaced according to the watermark information.
可选的,所述文本属性,包括以下至少一种:Optionally, the text attribute includes at least one of the following:
文字的字号;文字的间隔;文字注音对齐方式。The font size of the text; the spacing of the text; the phonetic alignment of the text.
可选的,所述载体对象为表格;Optionally, the carrier object is a table;
所述采用修改载体对象记载的内容的方式将所述水印信息嵌入到所述载体子对象,包括:将单元格的属性作为载体子对象,将所述水印信息嵌入到所述表格中的单元格的属性信息中。The method of modifying the content recorded in the carrier object to embed the watermark information into the carrier sub-object includes: using the attribute of the cell as the carrier sub-object, and embedding the watermark information into the cell in the table in the attribute information.
可选的,所述电子设备还执行下述步骤:采用置乱密码的方式将所述水印信息转换为第二水印信息;Optionally, the electronic device also performs the following steps: converting the watermark information into the second watermark information by scrambling a password;
所述将所述水印信息嵌入到所述载体子对象,包括:将所述第二水印信息嵌入到所述载体子对象。The embedding of the watermark information into the carrier sub-object includes: embedding the second watermark information into the carrier sub-object.
需要说明的是,对于本申请第四实施例提供的电子设备的详细描述可以参考对本申请第一实施例的相关描述,这里不再赘述。It should be noted that, for the detailed description of the electronic device provided by the fourth embodiment of the present application, reference may be made to the relevant description of the first embodiment of the present application, and details are not repeated here.
与上述提供的一种水印嵌入方法相对应的,本申请第五实施例还提供了一种存储设备,Corresponding to the watermark embedding method provided above, the fifth embodiment of the present application further provides a storage device,
存储有水印嵌入方法的程序,该程序被处理器运行,执行下述步骤:A program that stores a watermark embedding method, the program is executed by a processor, and performs the following steps:
获得需要嵌入到载体对象中的水印信息;Obtain the watermark information that needs to be embedded in the carrier object;
确定所述载体对象中至少一个待嵌入水印信息的载体子对象;determining at least one carrier sub-object to be embedded with watermark information in the carrier object;
将所述水印信息嵌入到所述载体子对象。Embed the watermark information into the carrier sub-object.
需要说明的是,对于本申请第五实施例提供的存储设备的详细描述可以参考对本申请第一实施例的相关描述,这里不再赘述。It should be noted that, for a detailed description of the storage device provided by the fifth embodiment of the present application, reference may be made to the relevant description of the first embodiment of the present application, and details are not repeated here.
与上述提供的一种水印提取方法相对应的,本申请第六实施例还提供了一种水印提取装置。Corresponding to the watermark extraction method provided above, the sixth embodiment of the present application further provides a watermark extraction apparatus.
如图12所示,所述水印提取装置包括:As shown in Figure 12, the watermark extraction device includes:
载体对象获得单元1201,用于获得待提取水印信息的载体对象;A carrier
载体子对象确定单元1202,用于确定所述载体对象中至少一个嵌入水印信息的载体子对象;a carrier
水印信息提取单元1203,用于从所述载体子对象中提取出水印信息。The watermark
可选的,所述水印信息提取单元,具体用于:Optionally, the watermark information extraction unit is specifically used for:
当采用调用COM接口的方式将所述水印信息嵌入到所述载体子对象时,从隐藏的文本框中提取出水印信息。When the watermark information is embedded in the carrier sub-object by invoking the COM interface, the watermark information is extracted from the hidden text box.
可选的,所述水印信息提取单元,具体用于:Optionally, the watermark information extraction unit is specifically used for:
使用解压程序将待提取水印信息的载体对象解压,得到解压的文件;Use the decompression program to decompress the carrier object of the watermark information to be extracted to obtain the decompressed file;
从所述解压的文件中找到嵌入水印信息的载体子对象对应的文件,从所述载体子对象对应的文件中提取出所述水印信息。The file corresponding to the carrier sub-object in which the watermark information is embedded is found from the decompressed file, and the watermark information is extracted from the file corresponding to the carrier sub-object.
可选的,所述水印信息提取单元,具体用于:Optionally, the watermark information extraction unit is specifically used for:
从载体子对象的文本属性中提取所述水印信息;或者,Extract the watermark information from the text attribute of the carrier sub-object; or,
从同义词中提取出所述水印信息。The watermark information is extracted from the synonyms.
可选的,所述文本属性,包括以下至少一种:Optionally, the text attribute includes at least one of the following:
文字的字号;文字的间隔;文字注音对齐方式。The font size of the text; the spacing of the text; the phonetic alignment of the text.
可选的,所述载体子对象为表格;Optionally, the carrier sub-object is a table;
所述水印信息提取单元,具体用于:从单元格的属性中提取出水印信息。The watermark information extraction unit is specifically used for: extracting the watermark information from the attributes of the cells.
可选的,所述水印信息提取单元,具体用于:从所述载体子对象中提取出第一水印信息;采用置乱密码将所述第一水印信息转换为水印信息。Optionally, the watermark information extraction unit is specifically configured to: extract the first watermark information from the carrier sub-object; and convert the first watermark information into watermark information by using a scrambled password.
需要说明的是,对于本申请第六实施例提供的水印提取装置的详细描述可以参考对本申请第二实施例的相关描述,这里不再赘述。It should be noted that, for the detailed description of the watermark extraction apparatus provided by the sixth embodiment of the present application, reference may be made to the relevant description of the second embodiment of the present application, and details are not repeated here.
与上述提供的一种水印提取方法相对应的,本申请第七实施例还提供了一种电子设备。Corresponding to the watermark extraction method provided above, the seventh embodiment of the present application further provides an electronic device.
如图13所示,电子设备包括:As shown in Figure 13, the electronic equipment includes:
处理器1301;以及
存储器1302,用于存储水印提取方法的程序,该设备通电并通过所述处理器运行该水印嵌入方法的程序后,执行下述步骤:The
获得待提取水印信息的载体对象;Obtain the carrier object of the watermark information to be extracted;
确定所述载体对象中至少一个嵌入水印信息的载体子对象;determining at least one carrier sub-object embedded with watermark information in the carrier object;
从所述载体子对象中提取出水印信息。The watermark information is extracted from the carrier sub-object.
可选的,当采用采用调用COM接口的方式将所述水印信息嵌入到所述载体子对象时,所述从所述载体子对象中提取出水印信息,包括:Optionally, when the watermark information is embedded in the carrier sub-object by calling a COM interface, the extracting the watermark information from the carrier sub-object includes:
从隐藏的文本框中提取出水印信息。Extract the watermark information from the hidden text box.
可选的,所述从所述载体子对象中提取出水印信息,包括:Optionally, the extracting watermark information from the carrier sub-object includes:
使用解压程序将待提取水印信息的载体对象解压,得到解压的文件;Use the decompression program to decompress the carrier object of the watermark information to be extracted to obtain the decompressed file;
从所述解压的文件中找到嵌入水印信息的载体子对象对应的文件,从所述载体子对象对应的文件中提取出所述水印信息。The file corresponding to the carrier sub-object in which the watermark information is embedded is found from the decompressed file, and the watermark information is extracted from the file corresponding to the carrier sub-object.
可选的,所述从所述载体子对象中提取出水印信息,包括:Optionally, the extracting watermark information from the carrier sub-object includes:
从载体子对象的文本属性中提取所述水印信息;或者,Extract the watermark information from the text attribute of the carrier sub-object; or,
从同义词中提取出所述水印信息。The watermark information is extracted from the synonyms.
可选的,所述文本属性,包括以下至少一种:Optionally, the text attribute includes at least one of the following:
文字的字号;文字的间隔;文字注音对齐方式。The font size of the text; the spacing of the text; the phonetic alignment of the text.
可选的,所述载体子对象为表格;Optionally, the carrier sub-object is a table;
所述从所述载体子对象中提取出水印信息,包括:从单元格的属性中提取出水印信息。The extracting the watermark information from the carrier sub-object includes: extracting the watermark information from the attribute of the cell.
可选的,所述从所述载体子对象中提取出水印信息,包括:从所述载体子对象中提取出第一水印信息;采用置乱密码将所述第一水印信息转换为水印信息。Optionally, the extracting the watermark information from the carrier sub-object includes: extracting first watermark information from the carrier sub-object; and converting the first watermark information into watermark information by using a scrambled password.
需要说明的是,对于本申请第七实施例提供的电子设备的详细描述可以参考对本申请第二实施例的相关描述,这里不再赘述。It should be noted that, for the detailed description of the electronic device provided by the seventh embodiment of the present application, reference may be made to the related description of the second embodiment of the present application, and details are not repeated here.
与上述提供的一种水印提取方法相对应的,本申请第八实施例还提供了一种存储设备,Corresponding to the watermark extraction method provided above, the eighth embodiment of the present application further provides a storage device,
存储有水印提取方法的程序,该程序被处理器运行,执行下述步骤:A program containing a watermark extraction method is stored, and the program is executed by a processor to perform the following steps:
获得待提取水印信息的载体对象;Obtain the carrier object of the watermark information to be extracted;
确定所述载体对象中至少一个嵌入水印信息的载体子对象;determining at least one carrier sub-object embedded with watermark information in the carrier object;
从所述载体子对象中提取出水印信息。The watermark information is extracted from the carrier sub-object.
需要说明的是,对于本申请第八实施例提供的存储设备的详细描述可以参考对本申请第二实施例的相关描述,这里不再赘述。It should be noted that, for the detailed description of the storage device provided by the eighth embodiment of the present application, reference may be made to the related description of the second embodiment of the present application, and details are not repeated here.
本申请第九实施例提供一种数据处理方法,以下结合图14进行说明。The ninth embodiment of the present application provides a data processing method, which will be described below with reference to FIG. 14 .
如图14所示,在步骤1401中,获取载体对象,其中,所述载体对象包括待嵌入水印信息的数据对象。As shown in FIG. 14, in step 1401, a carrier object is obtained, wherein the carrier object includes a data object to be embedded with watermark information.
如图14所示,在步骤1402中,获取水印信息,其中,所述水印信息包括待嵌入到所述载体对象的标识。As shown in FIG. 14, in step 1402, watermark information is obtained, wherein the watermark information includes an identifier to be embedded in the carrier object.
如图14所示,在步骤1403中,确定所述载体对象中至少一个载体子对象,其中所述载体子对象包括所述载体对象的组成部分,所述组成部分包括字符数据、格式数据、多媒体数据和/或控件数据。As shown in FIG. 14, in step 1403, at least one carrier sub-object in the carrier object is determined, wherein the carrier sub-object includes components of the carrier object, and the components include character data, format data, multimedia data and/or control data.
如图14所示,在步骤1404中,将所述水印信息嵌入到所述载体子对象。As shown in FIG. 14, in step 1404, the watermark information is embedded into the carrier sub-object.
本申请虽然以较佳实施例公开如上,但其并不是用来限定本本申请,任何本领域技术人员在不脱离本发明的精神和范围内,都可以做出可能的变动和修改,因此本本申请的保护范围应当以本本申请权利要求所界定的范围为准。Although the present application is disclosed above with preferred embodiments, it is not intended to limit the present application. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of the present invention. Therefore, the present application The scope of protection shall be subject to the scope defined by the claims of this application.
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。Memory may include non-persistent memory in computer readable media, random access memory (RAM) and/or non-volatile memory in the form of, for example, read only memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括非暂存电脑可读媒体(transitory media),如调制的数据信号和载波。Computer-readable media includes both persistent and non-permanent, removable and non-removable media, and storage of information may be implemented by any method or technology. Information may be computer readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), Flash Memory or other memory technology, Compact Disc Read Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage, Magnetic tape cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, excludes non-transitory computer-readable media, such as modulated data signals and carrier waves.
本领域技术人员应明白,本申请的实施例可提供为方法、系统或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。It will be appreciated by those skilled in the art that the embodiments of the present application may be provided as a method, a system or a computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application 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, etc.) having computer-usable program code embodied therein.
Claims (19)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811011176.1A CN110874456B (en) | 2018-08-31 | 2018-08-31 | Watermark embedding method, watermark extracting method, watermark embedding device, watermark extracting device and data processing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811011176.1A CN110874456B (en) | 2018-08-31 | 2018-08-31 | Watermark embedding method, watermark extracting method, watermark embedding device, watermark extracting device and data processing method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110874456A CN110874456A (en) | 2020-03-10 |
CN110874456B true CN110874456B (en) | 2022-04-26 |
Family
ID=69715275
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811011176.1A Active CN110874456B (en) | 2018-08-31 | 2018-08-31 | Watermark embedding method, watermark extracting method, watermark embedding device, watermark extracting device and data processing method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110874456B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112069468B (en) * | 2020-08-26 | 2023-05-30 | 上海上讯信息技术股份有限公司 | Page dynamic watermark method and device |
US11669601B2 (en) * | 2020-09-18 | 2023-06-06 | Huawei Cloud Computing Technologies Co., Ltd. | Digital watermarking for textual data |
CN113806696A (en) * | 2021-09-18 | 2021-12-17 | 上海观安信息技术股份有限公司 | A watermark generation and traceability method, device, equipment and storage medium |
CN114817201A (en) * | 2022-04-15 | 2022-07-29 | 北京凝思软件股份有限公司 | Virtualization environment file traceability method, device, device and readable storage medium |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1344462A (en) * | 2000-01-19 | 2002-04-10 | 皇家菲利浦电子有限公司 | Invisible encoding of meta information |
CN1601956A (en) * | 2004-10-18 | 2005-03-30 | 刘�东 | Text digital Watermark tech using character's features for carrying watermark information |
CN102194205A (en) * | 2010-03-18 | 2011-09-21 | 湖南大学 | Method and device for text recoverable watermark based on synonym replacement |
CN102254126A (en) * | 2011-07-29 | 2011-11-23 | 西安交通大学 | Robust-based natural language Hash domain spread spectrum watermarking coding algorithm for |
CN103500296A (en) * | 2013-09-29 | 2014-01-08 | 北京溯源鸿业科技有限公司 | Inlaying method and device of digital watermarks in text documents |
CN103761459A (en) * | 2014-01-24 | 2014-04-30 | 中国科学院信息工程研究所 | Document multiple digital watermarking insertion method and device, and document multiple digital watermarking extraction method and device |
CN106454368A (en) * | 2016-10-21 | 2017-02-22 | 浙江宇视科技有限公司 | Method for superposing watermark in video image and device thereof |
CN106485645A (en) * | 2016-10-31 | 2017-03-08 | 珠海赛纳打印科技股份有限公司 | A kind of method and device of watermark adjustment |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8589148B2 (en) * | 2006-04-14 | 2013-11-19 | At&T Intellectual Property Ii, L.P. | Natural language watermarking |
CN103310130B (en) * | 2013-06-25 | 2016-03-30 | 西安科技大学 | Text document embedding algorithm and extracting method |
-
2018
- 2018-08-31 CN CN201811011176.1A patent/CN110874456B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1344462A (en) * | 2000-01-19 | 2002-04-10 | 皇家菲利浦电子有限公司 | Invisible encoding of meta information |
CN1601956A (en) * | 2004-10-18 | 2005-03-30 | 刘�东 | Text digital Watermark tech using character's features for carrying watermark information |
CN102194205A (en) * | 2010-03-18 | 2011-09-21 | 湖南大学 | Method and device for text recoverable watermark based on synonym replacement |
CN102254126A (en) * | 2011-07-29 | 2011-11-23 | 西安交通大学 | Robust-based natural language Hash domain spread spectrum watermarking coding algorithm for |
CN103500296A (en) * | 2013-09-29 | 2014-01-08 | 北京溯源鸿业科技有限公司 | Inlaying method and device of digital watermarks in text documents |
CN103761459A (en) * | 2014-01-24 | 2014-04-30 | 中国科学院信息工程研究所 | Document multiple digital watermarking insertion method and device, and document multiple digital watermarking extraction method and device |
CN106454368A (en) * | 2016-10-21 | 2017-02-22 | 浙江宇视科技有限公司 | Method for superposing watermark in video image and device thereof |
CN106485645A (en) * | 2016-10-31 | 2017-03-08 | 珠海赛纳打印科技股份有限公司 | A kind of method and device of watermark adjustment |
Non-Patent Citations (4)
Title |
---|
《An Anti-attack Watermarking Based on Synonym Substitution for Chinese Text》;H. Lu等;《2009 Fifth International Conference on Information Assurance and Security》;20091009;第356-359页 * |
《Secure watermark detection schemes》;Liu Yongliang等;《 APCC/MDMC "04. The 2004 Joint Conference of the 10th Asia-Pacific Conference on Communications and the 5th International Symposium on Multi-Dimensional Mobile Communications Proceeding》;20050214;第2卷;第631-633页 * |
《Techniques for data hiding》;W. Bender等;《IBM Systems Journal》;19961231;第35卷(第3.4期);第313-336页 * |
《基于Logistic混沌映射和IWT-SVD量化的盲鲁棒水印算法》;范航宇等;《传感器与微系统》;20180228;第37卷(第2期);第131-135页 * |
Also Published As
Publication number | Publication date |
---|---|
CN110874456A (en) | 2020-03-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110874456B (en) | Watermark embedding method, watermark extracting method, watermark embedding device, watermark extracting device and data processing method | |
JP4602769B2 (en) | Navigate the content space of a document set | |
US7925609B2 (en) | Information processing apparatus, information processing system, information processing method, and computer readable storage medium | |
Roy et al. | A novel approach to format based text steganography | |
CN103761459B (en) | A kind of document multiple digital watermarking embedding, extracting method and device | |
KR102108192B1 (en) | Method, Apparatus and System for Inserting Watermark | |
Castiglione et al. | New steganographic techniques for the OOXML file format | |
CN102968596A (en) | Delete marker-based office open xml (OOX) document digital watermarking method | |
CN111340676A (en) | Image watermark embedding method, image watermark identification method, image watermark embedding device, image watermark identification device and electronic equipment | |
US8976003B2 (en) | Large-scale document authentication and identification system | |
CN104517045A (en) | Method for creating protected digital file | |
CN115982675A (en) | Document processing method, device, electronic device, and storage medium | |
CN120012055A (en) | Document tracing method, device, computer equipment and medium based on dark watermark | |
CN119254743A (en) | Methods for preventing mail leakage and methods for tracing mail leakage, and electronic devices | |
CN103559251A (en) | Data security protection method based on data hiding | |
CN119323015A (en) | Data generation method, text generation method and electronic equipment | |
CN110866858B (en) | Watermark embedding and query data providing method, device and data processing method | |
Sharma et al. | A study of steganography based data hiding techniques | |
CN114091081B (en) | Subtitle file encryption and decryption method, system, storage medium and electronic device | |
CN114547562B (en) | Method and device for adding and applying text watermark | |
Fu et al. | Text split‐based steganography in OOXML format documents for covert communication | |
Qi et al. | Cloud model based zero-watermarking algorithm for authentication of text document | |
CN111445375A (en) | Watermark embedding scheme and data processing method, device and equipment | |
CN114091080A (en) | A subtitle file encryption and decryption method, system, storage medium and electronic device | |
CN109344941B (en) | Big data secure sharing method and device |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |