A method, apparatus, electronic device and storage medium for embedding image watermarks
By decrypting and embedding watermarks into the metadata or image data of the target image using DRM software, the problem of watermarks being easily removed in existing technologies is solved, achieving a traceability effect that is difficult to remove and reducing the risk of image leakage.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING QIYI CENTURY SCI & TECH CO LTD
- Filing Date
- 2026-02-12
- Publication Date
- 2026-05-26
AI Technical Summary
In existing technologies, image watermarks are easy to remove and difficult to trace, leading to frequent image leaks.
By decrypting the encrypted data of the target image using digital rights management (DRM) software, the original image and metadata are obtained, and watermark information is embedded into the original metadata or image data to ensure that the watermark is difficult to remove.
It enables the tracing of the source of leaked images through watermarks that are difficult to remove, thereby reducing the possibility of image leakage and improving the practicality and security of watermark embedding.
Smart Images

Figure CN122089550A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of display security technology, and in particular to a method, apparatus, electronic device, and storage medium for embedding image watermarks. Background Technology
[0002] Currently, when personnel obtain confidential images, they can embed watermarks to identify the individuals who leaked the images. This allows for tracing the source of leaked images by identifying the individual who leaked them. Common methods for embedding watermarks include: embedding during the encoding stage, embedding during the packaging stage, dynamically stitching watermark fragments during the distribution stage, and triggering synthesis after license delivery. However, watermarks embedded in these ways are easily removed, for example, by cropping or removing the watermark itself. This makes it difficult to determine who leaked the images, hindering tracing the source and increasing the likelihood of image leaks. Therefore, how to embed watermarks reasonably to reduce the possibility of image leaks has become a pressing issue. Summary of the Invention
[0003] The purpose of this invention is to provide a method, apparatus, electronic device, and storage medium for embedding image watermarks, so as to achieve reasonable watermark embedding and reduce the possibility of image leakage. The specific technical solution is as follows:
[0004] In a first aspect of this invention, an image watermark embedding method is provided, applied to an electronic device, the method comprising:
[0005] Obtain the encrypted data and license information of the target image; wherein the license information includes a decryption key;
[0006] The encrypted data is decrypted using the decryption key through digital rights management (DRM) software to obtain the original image data and original metadata of the target image; wherein, the original metadata contains the color information of the target image;
[0007] The watermark information is embedded into the original metadata using the DRM software to obtain embedded metadata; the watermark information is used to identify the electronic device and / or the person to whom the electronic device belongs;
[0008] The DRM software outputs the watermark embedding data of the target image; the watermark embedding data includes the embedding metadata.
[0009] In one possible embodiment, the method further includes:
[0010] The watermark information is embedded into the original image data using the DRM software to obtain embedded image data;
[0011] The step of outputting the watermark embedding data of the target image through the DRM software includes:
[0012] The DRM software outputs the watermark embedding data of the target image; the watermark embedding data includes the embedding metadata and the embedded image data.
[0013] In one possible embodiment, the license information also includes an embedding method;
[0014] The process of embedding the watermark information into the original image data using the DRM software to obtain embedded image data includes:
[0015] When the embedding method is used to instruct the DRM software to embed the watermark information into the original metadata and the original image data, the watermark information is embedded into the original image data by the DRM software to obtain embedded image data.
[0016] In one possible embodiment, the license information further includes first watermark information, and the DRM software includes second watermark information; wherein, the first watermark information is used to represent the personnel information of the person, and the second watermark information is used to represent the operating environment of the DRM software;
[0017] The process of embedding watermark information into the original metadata using the DRM software to obtain embedded metadata includes:
[0018] The first watermark information and / or the second watermark information are embedded into the original metadata using the DRM software to obtain embedded metadata.
[0019] In one possible embodiment, the license information further includes a watermark identifier; the watermark identifier is used to indicate the first watermark information, or to indicate the second watermark information, or to indicate both the first watermark information and the second watermark information.
[0020] The step of embedding the first watermark information and / or the second watermark information into the original metadata using the DRM software to obtain embedded metadata includes:
[0021] The DRM software embeds the watermark information indicated by the watermark identifier into the original metadata to obtain embedded metadata.
[0022] In a second aspect of the invention, an image watermark embedding device is also provided, applied to an electronic device, the device comprising:
[0023] The data acquisition module is used to acquire encrypted data and license information of the target image; wherein, the license information includes a decryption key;
[0024] The data decryption module is used to decrypt the encrypted data using the decryption key through digital rights management (DRM) software to obtain the original image data and original metadata of the target image; wherein, the original metadata contains the color information of the target image;
[0025] The first embedding module is used to embed watermark information into the original metadata through the DRM software to obtain embedded metadata; the watermark information is used to identify the electronic device and / or the person to whom the electronic device belongs;
[0026] The data output module is used to output the watermark embedding data of the target image through the DRM software; the watermark embedding data includes the embedding metadata.
[0027] In one possible embodiment, the device further includes:
[0028] The second embedding module is used to embed the watermark information into the original image data through the DRM software to obtain embedded image data;
[0029] The step of outputting the watermark embedding data of the target image through the DRM software includes:
[0030] The DRM software outputs the watermark embedding data of the target image; the watermark embedding data includes the embedding metadata and the embedded image data.
[0031] In one possible embodiment, the license information also includes an embedding method;
[0032] The process of embedding the watermark information into the original image data using the DRM software to obtain embedded image data includes:
[0033] When the embedding method is used to instruct the DRM software to embed the watermark information into the original metadata and the original image data, the watermark information is embedded into the original image data by the DRM software to obtain embedded image data.
[0034] In one possible embodiment, the license information further includes first watermark information, and the DRM software includes second watermark information; wherein, the first watermark information is used to represent the personnel information of the person, and the second watermark information is used to represent the operating environment of the DRM software;
[0035] The process of embedding watermark information into the original metadata using the DRM software to obtain embedded metadata includes:
[0036] The first watermark information and / or the second watermark information are embedded into the original metadata using the DRM software to obtain embedded metadata.
[0037] In one possible embodiment, the license information further includes a watermark identifier; the watermark identifier is used to indicate the first watermark information, or to indicate the second watermark information, or to indicate both the first watermark information and the second watermark information.
[0038] The step of embedding the first watermark information and / or the second watermark information into the original metadata using the DRM software to obtain embedded metadata includes:
[0039] The DRM software embeds the watermark information indicated by the watermark identifier into the original metadata to obtain embedded metadata.
[0040] In a third aspect of the present invention, an electronic device is also provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus.
[0041] Memory, used to store computer programs;
[0042] When a processor executes a program stored in memory, it implements any of the image watermark embedding methods described above.
[0043] In another aspect of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, and when the computer program is executed by a processor, it implements any of the above-described image watermark embedding methods.
[0044] In another aspect of the present invention, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the above-described image watermark embedding methods.
[0045] This invention provides an image watermark embedding method, apparatus, electronic device, and storage medium. The method involves acquiring encrypted data of a target image and license information including a decryption key; decrypting the encrypted data using the decryption key with Digital Rights Management (DRM) software to obtain the original image data and original metadata of the target image; embedding watermark information into the original metadata using DRM software to obtain embedded metadata; and outputting the watermark embedding data of the target image using DRM software. The watermark embedding data includes the embedded metadata. Through the above process, the watermark is embedded into the target image, and the watermark embedding data is the data of the target image after watermark embedding. Since the original metadata contains the color information of the target image, the normal presentation of the target image is affected by the original metadata. Furthermore, because this invention embeds watermark information into the original metadata that can affect the normal presentation of the target image, removing the embedded metadata containing the watermark information will also remove the original metadata containing the color information of the target image, causing the target image to fail to present correctly. Therefore, the watermark information embedded in this invention cannot be arbitrarily removed, making it difficult to remove the watermark from the target image. Furthermore, since the watermark information is used to identify the device that acquired the target image and / or the personnel to whom the device belongs, the person who acquired the target image can be identified through the watermark that is difficult to remove from the target image. Thus, when the target image is leaked, the person who leaked the leaked target image can be identified through the watermark that is difficult to remove from the leaked target image, thereby tracing the source of the leaked target image and reducing the possibility of the target image being leaked. Attached Figure Description
[0046] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.
[0047] Figure 1 This is a flowchart illustrating an image watermark embedding method in an embodiment of the present invention.
[0048] Figure 2 This is a schematic diagram of the data structure of the target image in an embodiment of the present invention;
[0049] Figure 3 This is a schematic diagram of another process for the image watermark embedding method in an embodiment of the present invention;
[0050] Figure 4 This is a schematic diagram of another process for the image watermark embedding method in an embodiment of the present invention;
[0051] Figure 5 This is a schematic diagram of another process for the image watermark embedding method in an embodiment of the present invention;
[0052] Figure 6 This is a schematic diagram of another process for the image watermark embedding method in an embodiment of the present invention;
[0053] Figure 7 This is a schematic diagram of another process for the image watermark embedding method in an embodiment of the present invention;
[0054] Figure 8 This is a schematic diagram of another process for the image watermark embedding method in an embodiment of the present invention;
[0055] Figure 9 This is a schematic diagram of a structure of an image watermark embedding device in an embodiment of the present invention;
[0056] Figure 10 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0057] The technical solutions of the present invention will now be described with reference to the accompanying drawings in the embodiments of the present invention.
[0058] Currently, when personnel obtain confidential images, they can embed watermarks that identify the person who leaked the image. This allows for tracing the source of the leaked image by identifying the individual in the event of a data breach. Common methods for embedding watermarks include: embedding during the encoding stage, embedding during the packaging stage, dynamically stitching watermark fragments during the distribution stage, and triggering watermark creation after license delivery. The attacks that images need to resist primarily include lossy compression, cropping, and rotation / flipping. While triggering watermark creation after license delivery offers the advantage of strong identification after decryption by Digital Rights Management (DRM), its practicality is limited due to high latency, implementation complexity, and difficulties in low-level integration.
[0059] Furthermore, watermarks embedded in images using the aforementioned methods are relatively easy to remove. For example, they can be removed by cropping or removing the watermark, making it difficult to determine who leaked the image and thus hindering the tracing of its source, which can easily lead to image leaks.
[0060] Therefore, in order to achieve reasonable watermark embedding to reduce the possibility of image leakage and improve the practicality of image watermark embedding methods, this invention provides an image watermark embedding method, see [link to relevant documentation]. Figure 1 The methods include:
[0061] S101, Obtain the encrypted data and license information of the target image, wherein the license information includes the decryption key.
[0062] S102, using the digital rights management (DRM) software, the encrypted data is decrypted using the decryption key to obtain the original image data and original metadata of the target image.
[0063] The original metadata contains the color information of the target image.
[0064] S103, the watermark information is embedded into the original metadata using DRM software to obtain the embedded metadata.
[0065] The watermark information is used to identify the electronic device and / or the person to whom the electronic device belongs.
[0066] S104, output the watermark embedding data of the target image through DRM software. The watermark embedding data includes embedding metadata.
[0067] In this embodiment of the invention, on one hand, encrypted data of the target image and license information including a decryption key are obtained; the encrypted data is decrypted using the decryption key through Digital Rights Management (DRM) software to obtain the original image data and original metadata of the target image; watermark information is embedded into the original metadata through DRM software to obtain embedded metadata; and the watermark embedded data of the target image is output through DRM software. The watermark embedded data includes embedded metadata. Through the above process, the watermark is embedded into the target image, and the watermark embedded data is the data of the target image after watermark embedding. Since the original metadata contains the color information of the target image, the normal presentation of the target image will be affected by the original metadata. Furthermore, since this embodiment of the invention embeds watermark information into the original metadata that can affect the normal presentation of the target image to obtain embedded metadata, if the embedded metadata containing watermark information is removed, the original metadata containing the color information of the target image will also be removed, causing the target image to fail to present normally. Therefore, the watermark information embedded in this embodiment of the invention cannot be arbitrarily removed, making it difficult to remove the watermark from the target image. Furthermore, since the watermark information is used to identify the device that acquired the target image and / or the personnel to whom the device belongs, the person who acquired the target image can be identified through the watermark that is difficult to remove from the target image. Thus, when the target image is leaked, the person who leaked the leaked target image can be identified through the watermark that is difficult to remove from the leaked target image, thereby tracing the source of the leaked target image and reducing the possibility of the target image being leaked.
[0068] On the other hand, image watermarking can be implemented using DRM software. Compared to hardware DRM, DRM software is not limited by hardware device architecture, thus avoiding high latency, implementation complexity, and difficulties in low-level access. This allows DRM software to be applied to various devices, thereby making the image watermarking embedding method provided by this invention applicable to various devices and improving its practicality. Furthermore, DRM software can protect the image watermarking embedding process, further ensuring that the watermark information embedded in the target image cannot be arbitrarily removed. This makes the watermark difficult to remove, allowing for the identification of the leaked image's source by examining the difficult-to-remove watermark when the target image is leaked. This enables traceability of the leaked image and further reduces the likelihood of image leaks.
[0069] The following will provide exemplary descriptions of S101-S104 respectively:
[0070] In steps S101-S102, a user inputs an instruction to obtain a target image by clicking on an image on an electronic device; the target image is the image clicked by the user. There can be multiple target images or just one. If there are multiple target images, the image watermark embedding method provided by this invention is executed for each target image to obtain its own watermark embedding data, thus achieving watermark embedding for each target image.
[0071] After receiving an instruction to retrieve a target image, the electronic device sends a retrieval request, including the image identifier, to the server to request the target image. Upon receiving the retrieval request, the server sends the encrypted data of the target image and license information, including the decryption key, to the electronic device. The electronic device receives the encrypted data and license information from the server. This process enables the retrieval of the encrypted data and license information of the target image.
[0072] The electronic device can be any device capable of implementing the image watermark embedding method provided by this invention, such as a laptop computer, a tablet computer, etc.
[0073] The encrypted data of the target image refers to the data obtained after encrypting the target image data. The decryption key included in the license information is used to decrypt the encrypted data. The encrypted data can be obtained by encrypting the target image data using any encryption algorithm, and then the decryption key used to decrypt the encrypted data can be calculated. For example, the encryption algorithm can be a white-box cryptographic algorithm, Advanced Encryption Standard (AES), Data Encryption Standard (DES), etc.
[0074] The target image data consists of two parts: the original image data and the original metadata. For example... Figure 2 As shown, Figure 2 The image container in the image is the target image, the image data is the original image data, and the metadata is the original metadata. The original metadata contains the color information of the target image. Specifically, the original metadata can be image orientation information (EXIFOrientation, Exchangeable Image File Orientation), or it can be the International Color Consortium Profile (ICC Profile), etc.
[0075] Furthermore, as explained above, encrypted data refers to the data obtained after encrypting the data of the target image. Therefore, after the electronic device decrypts the encrypted data using the decryption key through DRM software, it can obtain the data of the target image, that is, obtain the original image data and the original metadata of the target image.
[0076] In S103, the person owning the electronic device is the person who acquires the target image through the electronic device, that is, the person who inputs the instruction to acquire the target image. Specifically, the watermark information may include one or more of the following: the device name of the electronic device, the person's name, the login account used by the person when logging into the electronic device, etc. In the technical solution of this invention, the acquisition, storage, use, processing, transmission, provision, and disclosure of personal information of the personnel involved are all carried out with the authorization of the personnel.
[0077] Electronic devices can use DRM software to embed watermark information into the original metadata using any image watermark embedding algorithm, thus obtaining embedded metadata. The image watermark embedding algorithm can be the least significant bit (LSB), Discrete Cosine Transform (DCT), etc.
[0078] The image watermarking embedding algorithms described above are all implemented using a Central Processing Unit (CPU). When dealing with a large number of target images, these algorithms require processing a significant amount of data, resulting in high CPU resource consumption and a long time required to obtain the embedded metadata. Therefore, to conserve CPU resources and reduce the time required to obtain the embedded metadata, in one possible embodiment, the electronic device can also use a deep learning network model via DRM software to embed the watermark information into the original metadata, thus obtaining the embedded metadata. The deep learning network model can be any network model capable of embedding watermark information into the original metadata to obtain the embedded metadata.
[0079] In this embodiment, the DRM software can use a deep learning network model to embed watermark information. The artificial intelligence (AI) computing power of the deep learning network model is used in this process, which can reduce the use of CPU computing resources, save CPU computing resources, and can embed watermark information in batches through the deep learning network model, thereby reducing the time required to obtain embedded metadata.
[0080] Specifically, the schematic diagram of this embodiment can be as follows: Figure 3 As shown. In Figure 3 In this embodiment, the decryption key is calculated using a white-box cryptographic algorithm. The electronic device uses the decryption module in the DRM software to decrypt the encrypted data using the decryption key, obtaining the original image data and original metadata of the target image. A deep learning network model is then used to embed the watermark information into the original metadata, resulting in embedded metadata (i.e.,...). Figure 3 With the support of AI computing power, watermark embedding can be achieved.
[0081] In S104, the watermark embedding data of the target image is the data of the target image after the watermark is embedded. If the watermark information is only embedded into the original metadata, then the watermark embedding data includes: the original image data and the embedded metadata. If the watermark information is embedded into both the original metadata and the original image data, and the data obtained after embedding the watermark information into the original image data is called embedded image data, then the watermark embedding data includes: embedded image data and embedded metadata.
[0082] In embodiments where watermark information is embedded into the original metadata and original image data, the image watermark embedding method provided by the present invention is as follows: Figure 4 As shown, it includes:
[0083] S101, Obtain the encrypted data and license information of the target image, wherein the license information includes the decryption key.
[0084] S102, using the digital rights management (DRM) software, the encrypted data is decrypted using the decryption key to obtain the original image data and original metadata of the target image.
[0085] The original metadata contains the color information of the target image.
[0086] S103, the watermark information is embedded into the original metadata using DRM software to obtain the embedded metadata.
[0087] S101-S103 have been described by example above, so they will not be repeated here.
[0088] S105, the watermark information is embedded into the original image data using DRM software to obtain the embedded image data.
[0089] Electronic devices can use DRM software to embed watermark information into the original image data using any image watermark embedding algorithm, resulting in embedded image data. These algorithms can include LSB, DCT, and others.
[0090] The aforementioned image watermark embedding algorithms are all implemented using CPU computation. When there are a large number of target images, the amount of data processed by these algorithms is substantial, resulting in high CPU resource consumption and a long processing time to obtain the embedded image data. Therefore, to conserve CPU resources and reduce the time required to obtain the embedded image data, in one possible embodiment, the electronic device can also use a deep learning network model via DRM software to embed the watermark information into the original image data, thus obtaining the embedded image data. The deep learning network model can be any network model capable of embedding watermark information into the original image data to obtain the embedded image data.
[0091] In this embodiment, the DRM software can use a deep learning network model to embed watermark information. The AI computing power of the deep learning network model is used in this process, which can reduce the use of CPU computing resources and save CPU computing resources. Furthermore, the watermark information can be embedded in batches through the deep learning network model, thereby reducing the time required to obtain the embedded image data.
[0092] DRM software can embed watermark information into the original image data in the same way it embeds it into the original metadata. For example, DRM software can use a neural learning network model to embed watermark information into the original image data, and also use a neural learning network model to embed watermark information into the original metadata.
[0093] The way DRM software embeds watermark information into the original image data can differ from the way it embeds it into the original metadata. For example, DRM software can use a neural learning network model to embed watermark information into the original image data and use an image watermark embedding algorithm to embed the watermark information into the original metadata. Alternatively, DRM software can use an LSB image watermark embedding algorithm to embed the watermark information into the original image data and a DCT image watermark embedding algorithm to embed the watermark information into the original metadata.
[0094] S1041, output the watermark embedding data of the target image through DRM software. The watermark embedding data includes embedding metadata and embedding image data.
[0095] S1041 corresponds to the aforementioned: if watermark information is embedded into the original metadata and the original image data, then the watermark embedded data includes: embedded image data and embedded metadata.
[0096] By using this embodiment, watermark information can be embedded into the original image data and the original metadata to obtain watermark embedded data that includes the embedded image data and the embedded original metadata. This further ensures that the embedded watermark information cannot be arbitrarily removed, making the watermark on the target image difficult to remove. Thus, when the target image is leaked, the person who leaked the leaked target image can be identified by the difficult-to-remove watermark in the leaked target image, thereby achieving source tracing of the leaked target image and reducing the possibility of the target image being leaked.
[0097] The foregoing has provided an exemplary embodiment of embedding watermark information into the original metadata and original image data. Referring to the above embodiments, it is evident that DRM software can embed watermark information only into the original metadata, or it can embed watermark information into both the original metadata and the original image data. For both embedding methods, in one possible embodiment, the DRM software can arbitrarily choose either embedding method to implement watermark embedding.
[0098] In another possible embodiment, the DRM software can select one of the two embedding methods described above to embed the watermark, based on the actual needs of the authorized administrator (hereinafter referred to as the administrator) using the server. In this embodiment, see [link to relevant documentation]. Figure 5 The image watermark embedding method provided by this invention includes:
[0099] S1011, Obtain the encrypted data and license information of the target image, wherein the license information includes the decryption key and the embedding method.
[0100] Users input a command to retrieve a target image by clicking on an image on an electronic device; the target image is the image clicked. Upon receiving the command, the electronic device sends a retrieval request, including the image identifier of the target image, to the server to request the image. The administrator, based on the retrieval request received from the server, selects the watermark embedding method and sends the encrypted data of the target image and license information to the electronic device. This license information includes the decryption key and the administrator-selected embedding method. The embedding method can be either embedding the watermark information into the original metadata or embedding the watermark information into both the original image data and the original metadata. The electronic device receives the encrypted data of the target image and the license information from the server. This process enables the retrieval of the encrypted data and license information of the target image.
[0101] S102, using the digital rights management (DRM) software, the encrypted data is decrypted using the decryption key to obtain the original image data and original metadata of the target image.
[0102] The original metadata contains the color information of the target image.
[0103] S103, the watermark information is embedded into the original metadata using DRM software to obtain the embedded metadata.
[0104] S102-S103 have been described by example above, so they will not be repeated here.
[0105] S1051, In the case where the embedding method is used to instruct the DRM software to embed the watermark information into the original metadata and the original image data, the watermark information is embedded into the original image data by the DRM software to obtain the embedded image data.
[0106] As explained above, the embedding method can be either embedding the watermark information into the original metadata, or embedding the watermark information into both the original image data and the original metadata. Embedding the watermark information into the original metadata is equivalent to instructing the DRM software to embed the watermark information into the original metadata; embedding the watermark information into both the original image data and the original metadata is equivalent to instructing the DRM software to embed the watermark information into both the original metadata and the original image data.
[0107] Regardless of whether the embedding method is used to instruct the DRM software to embed the watermark information into the original metadata, or to instruct the DRM software to embed the watermark information into both the original metadata and the original image data, the aforementioned S103 must be executed. The step of embedding the watermark information into the original image data using the DRM software to obtain embedded image data will only be executed if the embedding method is used to instruct the DRM software to embed the watermark information into both the original metadata and the original image data. The method for obtaining the embedded image data has already been exemplarily described in the description of S105 above, so it will not be repeated here.
[0108] S1041, output the watermark embedding data of the target image through DRM software. The watermark embedding data includes embedding metadata and embedding image data.
[0109] S1041 has been described by example above, so it will not be repeated here.
[0110] By using this embodiment, the DRM software can be instructed through the embedding method included in the license information to embed the watermark information into the original metadata or into both the original metadata and the original image data. The embedding method is selected by the administrator according to actual needs, so that the DRM software can implement watermark embedding according to actual needs, thereby improving the flexibility of the image watermark embedding method provided by the present invention.
[0111] The selection of the two embedding methods has been exemplarily described above. It is understood that the implementation of the image watermark embedding method provided by this invention depends on watermark information; therefore, the method for obtaining watermark information will be exemplarily described below. See [link to documentation]. Figure 6 The image watermark embedding method provided by this invention includes:
[0112] S101a, Obtain the encrypted data and license information of the target image, wherein the license information includes the decryption key and the first watermark information.
[0113] The first watermark information is used to represent personnel information.
[0114] The personnel refers to the individuals to whom the aforementioned electronic devices belong. Personnel information refers to information that can identify the personnel. For example, personnel information may include one or more of the following: personnel name, login account used by the personnel when logging into the electronic devices, personnel contact information, etc.
[0115] Users input a command to retrieve a target image by clicking on an image on an electronic device; the target image is the image clicked. Upon receiving this command, the electronic device sends a retrieval request to the server. This request includes the image identifier of the target image and the user's information, thus requesting the target image from the server.
[0116] Upon receiving a request, the server generates a first watermark based on the personnel information included in the request and sends encrypted data of the target image and license information, including the decryption key and the first watermark, to the electronic device. The electronic device receives the encrypted data of the target image and the license information sent by the server. This process enables the acquisition of the encrypted data and license information of the target image.
[0117] S102, using the digital rights management (DRM) software, the encrypted data is decrypted using the decryption key to obtain the original image data and original metadata of the target image.
[0118] The original metadata contains the color information of the target image.
[0119] S102 has been described by example above, so it will not be repeated here.
[0120] S1031, The first watermark information and / or the second watermark information are embedded into the original metadata using DRM software to obtain embedded metadata.
[0121] The DRM software includes a second watermark; the second watermark is used to indicate the operating environment of the DRM software.
[0122] Since DRM software runs on electronic devices, the operating environment of DRM software refers to information capable of identifying the electronic device. For example, the operating environment of DRM software can be at least one of the following: the device name of the electronic device, the current geographical location of the electronic device, the weather at the current geographical location of the electronic device, etc. The method of obtaining embedded metadata has already been exemplarily described in the description of S103 above, and therefore will not be repeated here.
[0123] S104, output the watermark embedding data of the target image through DRM software. The watermark embedding data includes embedding metadata.
[0124] By using this embodiment, the first watermark information representing personnel information and / or the second watermark information representing the operating environment of the DRM software can be embedded into the original metadata. This makes the watermark information in the resulting watermark-embedded data more able to reflect the electronic device and / or the personnel to whom the electronic device belongs. As a result, when the target image is leaked, it is possible to more accurately determine which person leaked the leaked target image by means of the watermark that is difficult to remove from the leaked target image, thereby further reducing the possibility of image leakage.
[0125] The method for obtaining watermark information has been described above as an example. Regarding the selection of the first watermark information and / or the second watermark information in S1031, in one possible embodiment, the DRM software can arbitrarily select one of the three watermark information, namely the first watermark information, the second watermark information, or the first watermark information and the second watermark information, and embed the selected watermark information into the original metadata to obtain embedded metadata.
[0126] In another possible embodiment, the DRM software can select one watermark from three types of watermark information—first watermark information, second watermark information, and a combination of first watermark information and second watermark information—based on the administrator's actual needs, and embed the selected watermark information into the original metadata to obtain embedded metadata. In this embodiment, see [link to documentation]. Figure 7 The image watermark embedding method provided by this invention includes:
[0127] S101b, Obtain the encrypted data and license information of the target image, wherein the license information includes the decryption key, the first watermark information, and the watermark identifier.
[0128] The first watermark information is used to represent personnel information. The watermark identifier is used to indicate the first watermark information, or to indicate the second watermark information, or to indicate both the first and second watermark information.
[0129] Users input a command to retrieve a target image by clicking on an image on an electronic device; the target image is the image clicked. Upon receiving this command, the electronic device sends a retrieval request to the server. This request includes the image identifier of the target image and the user's information, thus requesting the target image from the server.
[0130] The administrator receives an acquisition request from the server, generates a first watermark based on the personnel information included in the request, selects a watermark identifier for the desired embedded watermark, and sends encrypted data of the target image and license information to the electronic device. The license information includes a decryption key, the first watermark, and the watermark identifier selected by the administrator. If the administrator selects the first watermark, the watermark identifier indicates the first watermark; if the administrator selects the second watermark, the watermark identifier indicates the second watermark; and if the administrator selects both the first and second watermarks, the watermark identifier indicates both.
[0131] The electronic device receives encrypted data and license information of the target image sent by the server. This process enables the acquisition of the encrypted data and license information of the target image.
[0132] In other possible embodiments, if the server determines that the watermark identifier selected by the administrator is used to indicate the second watermark information, it sends encrypted data of the target image and license information to the electronic device, and the sent license information includes only the decryption key and the watermark identifier. If the server determines that the watermark identifier selected by the administrator is used to indicate the first watermark information, or to indicate both the first and second watermark information, it sends encrypted data of the target image and license information to the electronic device, and the sent license information includes the decryption key, the first watermark information, and the watermark identifier.
[0133] S102, using the digital rights management (DRM) software, the encrypted data is decrypted using the decryption key to obtain the original image data and original metadata of the target image.
[0134] The original metadata contains the color information of the target image.
[0135] S102 has been described by example above, so it will not be repeated here.
[0136] S10311, The watermark information indicated by the watermark identifier is embedded into the original metadata through DRM software to obtain embedded metadata.
[0137] The DRM software includes a second watermark; the second watermark is used to indicate the operating environment of the DRM software.
[0138] If the watermark identifier is used to indicate the first watermark information, the first watermark information is embedded into the original metadata using DRM software to obtain embedded metadata. If the watermark identifier is used to indicate the second watermark information, the second watermark information is embedded into the original metadata using DRM software to obtain embedded metadata. If the watermark identifier is used to indicate both the first and second watermark information, the first and second watermark information are embedded into the original metadata using DRM software to obtain embedded metadata. The method of obtaining embedded metadata has been exemplarily described in the relevant description of S103 above, so it will not be repeated here.
[0139] S104, output the watermark embedding data of the target image through DRM software. The watermark embedding data includes embedding metadata.
[0140] By using this embodiment, the watermark identifier included in the license information can instruct the DRM software to embed the watermark information that the administrator needs to embed into the original metadata. This allows the DRM software to embed the watermark according to the actual needs of the administrator, thereby improving the flexibility of the image watermark embedding method provided by this invention.
[0141] In one possible embodiment, the license information includes a decryption key, an embedding method, and a watermark identifier; and when the watermark identifier is used to indicate first watermark information, or to indicate first watermark information and second watermark information, the license information also includes first watermark information.
[0142] In this embodiment, a user inputs a command to retrieve a target image by clicking on an image on an electronic device; the target image is the image clicked by the user. Upon receiving the command to retrieve the target image, the electronic device sends a retrieval request to the server. This request includes the image identifier of the target image and the user's information, thus requesting the target image from the server.
[0143] The administrator, upon receiving a request from the server, generates a first watermark based on the personnel information included in the request. They then select the watermark identifier to be embedded and the embedding method, and send encrypted data of the target image and license information to the electronic device. This license information includes a decryption key, the embedding method selected by the administrator, and the watermark identifier selected by the administrator. If the watermark identifier is used to indicate the first watermark, or to indicate both the first and second watermarks, the license information also includes the first watermark. The electronic device receives the encrypted data of the target image and the license information sent by the server.
[0144] When the embedding method is used to instruct DRM software to embed watermark information into the original metadata and original image data, the electronic device uses the DRM software to embed the watermark information indicated by the watermark identifier into the original metadata to obtain embedded metadata, and then uses the DRM software to embed the watermark information indicated by the watermark identifier into the original image data to obtain embedded image data. Afterwards, the DRM software outputs the watermark embedding data of the target image, which includes the embedded metadata and the embedded image data.
[0145] When the embedding method is used to instruct the DRM software to embed the watermark information into the original metadata, the electronic device uses the DRM software to embed the watermark information indicated by the watermark identifier into the original metadata, obtaining embedded metadata. Then, the DRM software outputs the watermark embedding data of the target image, which includes the embedded metadata.
[0146] In another possible embodiment, the license information includes a decryption key, embedding method, watermark identifier, and first watermark information. In this embodiment, a person inputs an instruction to obtain a target image by clicking on an image on an electronic device; the target image is the image clicked by the person. After receiving the instruction to obtain the target image, the electronic device sends an acquisition request to the server. The acquisition request includes the image identifier of the target image and the person's information, thereby requesting the target image from the server.
[0147] The administrator, upon receiving the retrieval request from the server, generates first watermark information based on the personnel information included in the request. They then select the watermark identifier and embedding method for the desired watermark information and send encrypted data of the target image and license information to the electronic device. This license information includes a decryption key, the embedding method selected by the administrator, the watermark identifier selected by the administrator, and the first watermark information. The electronic device receives the encrypted data of the target image and the license information sent by the server. The method for obtaining the watermark embedding data in this embodiment is the same as that in the previous embodiments, and therefore will not be repeated here.
[0148] In one possible embodiment, a schematic diagram of the image watermark embedding method provided by the present invention can be shown as follows: Figure 8 As shown. In this embodiment, the DRM software uses a deep learning network model (i.e., Figure 8 The device's AI computing power support), will include license information (i.e. Figure 8 The first watermark information included in the license is embedded into the original metadata (i.e., Figure 8 From the meta information in the data, we can obtain the embedded metadata (i.e. Figure 8 Adding watermark meta information), and embedding the first watermark information into the original image data (i.e. Figure 8 From the image data, we obtain the embedded image data (i.e. Figure 8 The image data with watermark added is used to output watermarked embedding data, which includes embedded metadata and embedded image data.
[0149] By rendering the embedded metadata and image data, the target image with the embedded watermark can be displayed. For ease of description, the target image with the embedded watermark will be referred to as the watermarked image below. The watermark information in this invention can be explicitly embedded, meaning that the watermark information can be seen in the displayed watermarked image. The watermark information in this invention can also be implicitly embedded, meaning that the watermark information cannot be seen in the displayed watermarked image. Compared to explicitly embedded watermark information, implicitly embedded watermark information is more concealed.
[0150] Corresponding to the aforementioned image watermark embedding method, this embodiment of the invention also provides an image watermark embedding device, applied to electronic devices, see [link to related documentation]. Figure 9 The device includes:
[0151] The data acquisition module 901 is used to acquire the encrypted data and license information of the target image; the license information includes the decryption key.
[0152] The data decryption module 902 is used to decrypt encrypted data using a decryption key through digital rights management (DRM) software to obtain the original image data and original metadata of the target image; wherein, the original metadata contains the color information of the target image;
[0153] The first embedding module 903 is used to embed watermark information into the original metadata through DRM software to obtain embedded metadata; the watermark information is used to identify electronic devices and / or the personnel to whom the electronic devices belong;
[0154] The data output module 904 is used to output watermark embedding data of the target image through DRM software; the watermark embedding data includes embedding metadata.
[0155] In one possible embodiment, the device further includes:
[0156] The second embedding module is used to embed watermark information into the original image data using DRM software to obtain embedded image data;
[0157] The watermark embedding data for the target image is output through DRM software, including:
[0158] The DRM software outputs the watermark embedding data of the target image; the watermark embedding data includes embedding metadata and embedding image data.
[0159] In one possible embodiment, the license information also includes an embedding method;
[0160] The watermark information is embedded into the original image data using DRM software, resulting in embedded image data, including:
[0161] When the embedding method is used to instruct the DRM software to embed the watermark information into the original metadata and the original image data, the watermark information is embedded into the original image data by the DRM software to obtain the embedded image data.
[0162] In one possible embodiment, the license information further includes a first watermark, and the DRM software includes a second watermark; wherein the first watermark is used to represent personnel information, and the second watermark is used to represent the operating environment of the DRM software.
[0163] The watermark information is embedded into the original metadata using DRM software, resulting in embedded metadata, including:
[0164] The first watermark information and / or the second watermark information are embedded into the original metadata using DRM software to obtain embedded metadata.
[0165] In one possible embodiment, the license information further includes a watermark identifier; the watermark identifier is used to indicate first watermark information, or to indicate second watermark information, or to indicate both first and second watermark information.
[0166] The first watermark information and / or the second watermark information are embedded into the original metadata using DRM software to obtain the embedded metadata, including:
[0167] The embedded metadata is obtained by embedding the watermark information indicated by the watermark identifier into the original metadata using DRM software.
[0168] This invention also provides an electronic device, such as... Figure 10 As shown, it includes a processor 1001, a communication interface 1002, a memory 1003 and a communication bus 1004, wherein the processor 1001, the communication interface 1002 and the memory 1003 communicate with each other through the communication bus 1004.
[0169] Memory 1003 is used to store computer programs;
[0170] When processor 1001 executes a program stored in memory 1003, it performs the following steps:
[0171] Obtain the encrypted data and license information of the target image; the license information includes the decryption key.
[0172] The encrypted data is decrypted using a decryption key through digital rights management (DRM) software to obtain the original image data and original metadata of the target image; the original metadata contains the color information of the target image.
[0173] The watermark information is embedded into the original metadata using DRM software to obtain the embedded metadata;
[0174] The watermark embedding data of the target image is output through DRM software; the watermark embedding data includes embedding metadata.
[0175] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.
[0176] The communication interface is used for communication between the aforementioned terminal and other devices.
[0177] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0178] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0179] In another embodiment of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, and when the computer program is executed by a processor, it implements the image watermark embedding method described in any of the above embodiments.
[0180] In another embodiment of the present invention, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the image watermark embedding methods described in the above embodiments.
[0181] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).
[0182] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0183] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments of apparatus, electronic devices, computer-readable storage media, and computer program products containing instructions are basically similar to the method embodiments, and therefore the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0184] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.
Claims
1. A method for embedding image watermarks, characterized in that, Applied to electronic devices, the method includes: Obtain the encrypted data and license information of the target image; wherein the license information includes a decryption key; The encrypted data is decrypted using the decryption key through digital rights management (DRM) software to obtain the original image data and original metadata of the target image; wherein, the original metadata contains the color information of the target image; The watermark information is embedded into the original metadata using the DRM software to obtain embedded metadata; the watermark information is used to identify the electronic device and / or the person to whom the electronic device belongs; The DRM software outputs the watermark embedding data of the target image; the watermark embedding data includes the embedding metadata.
2. The method according to claim 1, characterized in that, The method further includes: The watermark information is embedded into the original image data using the DRM software to obtain embedded image data; The step of outputting the watermark embedding data of the target image through the DRM software includes: The DRM software outputs the watermark embedding data of the target image; the watermark embedding data includes the embedding metadata and the embedded image data.
3. The method according to claim 2, characterized in that, The license information also includes the embedding method; The process of embedding the watermark information into the original image data using the DRM software to obtain embedded image data includes: When the embedding method is used to instruct the DRM software to embed the watermark information into the original metadata and the original image data, the watermark information is embedded into the original image data by the DRM software to obtain embedded image data.
4. The method according to claim 1, characterized in that, The license information also includes a first watermark, and the DRM software includes a second watermark; wherein the first watermark is used to represent the personnel information of the person, and the second watermark is used to represent the operating environment of the DRM software. The process of embedding watermark information into the original metadata using the DRM software to obtain embedded metadata includes: The first watermark information and / or the second watermark information are embedded into the original metadata using the DRM software to obtain embedded metadata.
5. The method according to claim 4, characterized in that, The license information also includes a watermark identifier; the watermark identifier is used to indicate the first watermark information, or to indicate the second watermark information, or to indicate both the first watermark information and the second watermark information. The step of embedding the first watermark information and / or the second watermark information into the original metadata using the DRM software to obtain embedded metadata includes: The DRM software embeds the watermark information indicated by the watermark identifier into the original metadata to obtain embedded metadata.
6. A device for embedding image watermarks, characterized in that, Applied to electronic devices, the device includes: The data acquisition module is used to acquire encrypted data and license information of the target image; wherein, the license information includes a decryption key; The data decryption module is used to decrypt the encrypted data using the decryption key through digital rights management (DRM) software to obtain the original image data and original metadata of the target image; wherein, the original metadata contains the color information of the target image; The first embedding module is used to embed watermark information into the original metadata through the DRM software to obtain embedded metadata; the watermark information is used to identify the electronic device and / or the person to whom the electronic device belongs; The data output module is used to output the watermark embedding data of the target image through the DRM software; the watermark embedding data includes the embedding metadata.
7. The apparatus according to claim 6, characterized in that, The device further includes: The second embedding module is used to embed the watermark information into the original image data through the DRM software to obtain embedded image data; The step of outputting the watermark embedding data of the target image through the DRM software includes: The DRM software outputs the watermark embedding data of the target image; the watermark embedding data includes the embedding metadata and the embedded image data.
8. The apparatus according to claim 7, characterized in that, The license information also includes the embedding method; The process of embedding the watermark information into the original image data using the DRM software to obtain embedded image data includes: When the embedding method is used to instruct the DRM software to embed the watermark information into the original metadata and the original image data, the watermark information is embedded into the original image data by the DRM software to obtain embedded image data.
9. The apparatus according to claim 7, characterized in that, The license information also includes a first watermark, and the DRM software includes a second watermark; wherein the first watermark is used to represent the personnel information of the person, and the second watermark is used to represent the operating environment of the DRM software. The process of embedding watermark information into the original metadata using the DRM software to obtain embedded metadata includes: The first watermark information and / or the second watermark information are embedded into the original metadata using the DRM software to obtain embedded metadata.
10. The apparatus according to claim 9, characterized in that, The license information also includes a watermark identifier; the watermark identifier is used to indicate the first watermark information, or to indicate the second watermark information, or to indicate both the first watermark information and the second watermark information. The step of embedding the first watermark information and / or the second watermark information into the original metadata using the DRM software to obtain embedded metadata includes: The DRM software embeds the watermark information indicated by the watermark identifier into the original metadata to obtain embedded metadata.
11. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the steps of the method described in any one of claims 1-5.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method described in any one of claims 1-5.