Watermark embedding method and device, electronic equipment and storage medium
By decrypting the digital rights management system and obtaining the watermark identifier from the license file, and embedding it into the metadata of video and other data, the problem of long watermark embedding time and easy discarding caused by the large amount of video data is solved. This achieves hidden and non-discardable watermark embedding, and improves the copyright protection effect of video data.
Patent Information
- Application Number
- CN202511077535.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-01
- Publication Date
- 2025-11-18
AI Technical Summary
In existing technologies, the large volume of video data makes watermark information embedding time-consuming and easily identified and discarded, resulting in poor digital rights protection.
After digital rights management decryption, the watermark identifier is obtained from the license file and embedded into the metadata of data such as videos. The initial metadata is processed by a preset decryption algorithm and artificial intelligence model to achieve a concealed and non-discardable watermark embedding.
It improves the efficiency and security of watermark embedding, ensuring that the watermark is hidden and cannot be discarded after decryption and before the data is displayed, thus enhancing the practicality of digital rights protection.
Smart Images

Figure CN120976002A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of multimedia processing, and particularly relates to a watermark embedding method and device, electronic equipment and storage medium. BACKGROUND
[0002] With the development of multimedia technology, more and more multimedia application scenarios need to be protected in the field of digital copyright, such as embedding watermark information in a video file, so as to subsequently extract the embedded watermark information by a specific method to confirm the copyright owner and other information, and then protect the legitimate rights and interests of the copyright owner.
[0003] In the related art, watermark information is first embedded in a video frame, and then the video frame after embedding the watermark information is video encoded, or the watermark information is embedded in the video frame data during video encoding. The foregoing method takes a long time due to the large amount of video data, and the watermark information added in the video data is easily identified and discarded, resulting in poor digital copyright protection effect. SUMMARY
[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a watermark embedding method and device, electronic equipment and storage medium.
[0005] The embodiment of the present disclosure provides a watermark embedding method applied to a terminal, the method comprising: receiving a data stream and a license file sent by a server; performing decryption processing on the data stream based on a preset decryption algorithm to obtain encoded data and initial meta information; determining a watermark identifier based on the license file and embedding the watermark identifier in the initial meta information to obtain target meta information; and performing rendering and playing based on the target meta information and the encoded data.
[0006] Optionally, the determining of the watermark identifier based on the license file comprises: parsing the license file to obtain authorization information; obtaining an authorized user identifier based on the authorization information, and taking the authorized user identifier as the watermark identifier.
[0007] Optionally, the embedding of the watermark identifier in the initial meta information to obtain target meta information comprises: encoding the initial meta information to obtain an encoded feature; encoding the watermark identifier to obtain an encoded watermark; and fusing the encoded feature and the encoded watermark to obtain the target meta information.
[0008] Optionally, the method further comprises: when the initial meta-information is preset information, processing the initial meta-information and the watermark identifier based on a preset artificial intelligence model to obtain the target meta-information; wherein, an information sample of the initial meta-information is obtained, each information sample has a corresponding encoding label, the information sample is processed based on a pre-constructed artificial intelligence model to be trained to obtain a training encoding feature, and a loss value is determined based on a similarity between the training encoding feature and the encoding label and a pre-set loss function to adjust the model parameters to obtain the artificial intelligence model.
[0009] Optionally, the initial meta-information includes specific feature information corresponding to each data in the encoding data and / or common feature information corresponding to all data; wherein, the specific feature information includes one or more of data type, data size, data enhancement information and data expansion information; and the common feature information includes one or more of color information, sequence parameters, data structure, language, label and duration.
[0010] Optionally, the encoding of the initial meta-information to obtain the encoding feature includes: analyzing the specific feature information and / or the common feature information to obtain matching information corresponding to a target data display parameter; wherein, the target data display parameter is used to determine the displayed data page information; and encoding the matching information to obtain the encoding feature.
[0011] Optionally, before the server sends the data stream and the license file, the method further comprises: sending a data display request to the server; wherein, the server obtains an authorized user identifier based on the data display request, generates the license file based on the authorized user identifier, and delivers the data stream and the license file to the terminal.
[0012] The embodiments of the present disclosure further provide a watermark embedding device applied to a terminal, the device comprising: a receiving module configured to receive a data stream and a license file sent by a server; a decryption module configured to perform decryption processing on the data stream based on a preset decryption algorithm to obtain encoding data and initial meta-information; a determination module configured to determine a watermark identifier based on the license file; an embedding module configured to embed the watermark identifier into the initial meta-information to obtain target meta-information; and a playing module configured to perform display based on the target meta-information and the encoding data.
[0013] The embodiments of the present disclosure further provide an electronic device, which comprises: a processor; a memory for storing executable instructions of the processor; and the processor is configured to read the executable instructions from the memory and execute the instructions to implement the watermark embedding method provided by the embodiments of the present disclosure.
[0014] The embodiment of the present disclosure further provides a computer readable storage medium, which stores a computer program for executing the watermark embedding method provided by the embodiment of the present disclosure.
[0015] The embodiment of the present disclosure further provides a computer program product, comprising a computer program, wherein the computer program, when executed by a processor, performs the watermark embedding method provided by the embodiment of the present disclosure.
[0016] The above technical solution provided by the embodiment of the present disclosure, after the digital rights management decryption, the watermark identifier is obtained from the license file and embedded into the meta information of the video data, so that the watermark embedding is performed before the decrypted data is displayed, thereby improving the practicability, and the watermark identifier is embedded into the meta information to realize the covert and non- discardable watermark embedding, thereby improving the video data watermark embedding efficiency while ensuring the security of the video data watermark.
[0017] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0018] The accompanying drawings incorporated in and forming a part of the specification, illustrate embodiments consistent with the present disclosure and serve to explain the principles of the present disclosure together with the description herein.
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced as follows. Obviously, for those skilled in the art, other drawings can also be obtained from these drawings without creative labor.
[0020] Figure 1 A flowchart of a watermark embedding method provided by the embodiment of the present disclosure is shown in the figure.
[0021] Figure 2 A flowchart of a watermark embedding method provided by the embodiment of the present disclosure is shown in the figure.
[0022] Figure 3 A schematic diagram of a video stream container provided by the embodiment of the present disclosure is shown in the figure.
[0023] Figure 4 A schematic diagram of terminal side watermark embedding provided by the embodiment of the present disclosure is shown in the figure.
[0024] Figure 5 A schematic diagram of terminal side watermark embedding provided by the embodiment of the present disclosure is shown in the figure.
[0025] Figure 6 A structural schematic diagram of a watermark embedding device provided by an embodiment of the present disclosure is shown in FIG. 1.
[0026] Figure 7 A structural schematic diagram of an electronic device provided by an embodiment of the present disclosure is shown in FIG. 2. DETAILED DESCRIPTION
[0027] In order to more clearly understand the above-mentioned purposes, features and advantages of the present disclosure, the solutions of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0028] In the following description, a large number of specific details are set forth in order to facilitate a thorough understanding of the present disclosure, but the present disclosure can also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some of the embodiments of the present disclosure, not all the embodiments.
[0029] In the existing multimedia application scenarios, the user can select the corresponding picture on the picture application page of the client or select the corresponding live program or video content on the video application page for viewing according to the actual application needs, for example, in the case of a certain TV series, after the user selects the target episode, the client sends a play request for viewing the target episode to the server, and the server sends the video content corresponding to the target episode to the client for playing after determining the viewing authority of the client.
[0030] In the above video playing scenario, the video content sent by the server to the client is only authorized to be played by the client, however, after the server sends the video content to the client for playing, the client side can download the video and send it to other clients for playing, thereby the digital rights management (DRM) of the video content is needed, that is, the watermark information is embedded in the video, and the embedded watermark information can be extracted in the future to confirm the information of the copyright owner, and thus the legal rights and interests of the copyright owner are protected.
[0031] In the related art, some watermark information is usually embedded in the video data in advance, however, due to the large data volume of the video data, the time consumption is relatively long, and in addition, the watermark information added in the video data is easy to be identified and discarded, resulting in the technical problem that the digital rights protection effect is relatively poor.
[0032] To solve the above problems, the embodiment of the present disclosure provides a watermark embedding method. The watermark embedding method receives a data stream and a license file sent by a server, decrypts the data stream based on a preset decryption algorithm, obtains encoded data and initial meta information, obtains a watermark identification from the license file, embeds the initial meta information into the target meta information, and finally displays the target meta information based on the target meta information and the encoded data. Thus, after the digital rights management decryption, the watermark identification is obtained from the license file and embedded into the meta information of the video data, so that the watermark embedding is performed before the decrypted data is displayed, the practicability is improved, the watermark identification is embedded into the meta information to achieve the hidden and non-erasable watermark embedding, the video data watermark embedding efficiency is improved, and the security of the video data watermark is ensured. The following will be explained and described in detail.
[0033] Figure 1 A flowchart of a watermark embedding method provided by the embodiment of the present disclosure is shown in the figure. The method can be applied to a terminal, such as a computer, a mobile phone, a tablet computer, a television, etc., which is not limited here. As shown in the figure, the method mainly includes the following steps S102-S108: Figure 1
[0034] Step S102, receiving a data stream and a license file sent by a server.
[0035] In the embodiment of the present disclosure, a user can select a live program or data such as a video, a picture, or a document to watch according to actual viewing needs. When the user selects, the terminal sends a data display request to the server, so that the server can obtain a user identification, determine whether the user has the right to watch the data according to the user identification, determine authorization information, generate a license file according to the authorization information, and send the license file and the data stream to the client. The data stream can be a video stream, a picture stream, or an electronic document stream, etc. The specific selection is based on the actual application scenario.
[0036] The data stream refers to the data flow used by the data file in a unit of time. For example, the data stream is the data flow used by a video file in a unit of time, which is the most important part of the picture quality control in video encoding. Under the same resolution, the larger the code stream of the video file, the smaller the compression ratio, and the better the picture quality. For another example, the data stream is the data flow used by a picture file in a unit of time, which is the most important part of the picture quality control in picture encoding. Under the same resolution, the larger the code stream of the picture file, the smaller the compression ratio, and the better the picture quality.
[0037] The license file includes an encryption key, authorization information, etc. The authorization information includes an authorized user identification, an authorized time, etc.
[0038] Step S104, based on the preset decryption algorithm to the data stream decryption processing, obtain the encoding data and initial meta information.
[0039] In the embodiment of the present disclosure, after receiving the data stream sent by the server, the code stream needs to be decrypted by the preset decryption algorithm to obtain the encoding data and the initial meta information. The encryption algorithm can be selected and set according to actual application, such as white box cryptographic algorithm, which is an algorithm for protecting encryption keys through confusion and key hiding technology. The encoding data after decryption of different data streams is different, that is, the video code stream obtains encoding video frame data, the picture code stream obtains encoding picture data, and the electronic document code stream obtains encoding document data.
[0040] The encoding video frame data refers to the encoding data corresponding to the video frame and the video frame, such as pixel information compressed by a video encoding algorithm, etc. The encoding picture data refers to the encoding data corresponding to the picture, such as pixel information compressed by a picture encoding algorithm, etc. The encoding document data refers to the encoding data corresponding to the electronic document, such as text information compressed by a document encoding algorithm, etc.
[0041] The initial meta information includes specific feature information corresponding to each data in the encoding data and / or common feature information corresponding to all data. The specific feature information includes one or more of data type, data size, data enhancement information, and data extension information. The common feature information includes one or more of color information, sequence parameters, data structure, language, label, and duration.
[0042] Taking data as video as an example, the specific feature information corresponding to each video frame refers to the unique meta information of each video frame, including one or more of frame type, frame size, supplemental enhancement information, and intra-frame extension information. The common feature information corresponding to the encoding video frame data refers to the meta information common to all video frames, including one or more of color space, HDR (High Dynamic Range Imaging) static metadata, sequence parameter set, video frame parameter set, GOP (Group of Pictures) structure, language, label, and duration.
[0043] Taking picture as an example, when it is a single picture, the initial meta information refers to the unique meta information of the picture, including one or more of picture type, picture size, picture enhancement information, and picture extension information. When it is multiple pictures, it can include the unique meta information of the picture as mentioned above, and can also include common meta information of multiple pictures, including one or more of color space, sequence parameter set, picture parameter set, picture structure, language, label, and duration.
[0044] Specifically, the data stream and the license file sent by the server are received, the data stream is decrypted by a decryption algorithm, and encoded data and initial meta information are obtained.
[0045] In step S106, a watermark identifier is determined based on the license file, and the watermark identifier is embedded in the initial meta information to obtain target meta information.
[0046] In the embodiments of the present disclosure, there are many ways to determine the watermark identifier based on the license file. In some embodiments, the license file is parsed to obtain authorization information, an authorized user identifier is obtained based on the authorization information, and the authorized user identifier is used as the watermark identifier. In other embodiments, the license file is parsed to obtain authorization information, an authorized user identifier and an authorized time are obtained based on the authorization information, and the authorized user identifier and the authorized time are used as the watermark identifier. The authorized user identifier is used to uniquely identify an authorized user, and can be a user account, a terminal number, etc. as the authorized user identifier, which is selected and set according to actual application.
[0047] Further, the watermark identifier is embedded in the initial meta information to obtain target meta information. Different initial meta information has different ways of embedding the watermark identifier in the initial meta information, and the embedding processing mode can be selected according to the data amount of the initial meta information.
[0048] In some embodiments, the initial meta information is video bit data or other scenes with small calculation amount, and the watermark identifier is directly encoded and fused into the encoded feature of the initial meta information after encoding to obtain target meta information. In other embodiments, the initial meta information is color information or other scenes with small calculation amount, and the initial meta information and the watermark identifier are processed by a pre-set artificial intelligence model of the terminal to obtain target meta information.
[0049] It should be noted that, in order to further ensure the hidden and non- discardable watermark embedding, the initial meta information can be screened, and some information related to the video playback quality such as color information is selected as the initial meta information, so that the meta information is encoded and joined with the watermark identifier at the same time to adjust the color to change the naked eye, thereby further ensuring the hidden and non- discardable embedding.
[0050] In step S108, the target meta information and the encoded data are rendered and played.
[0051] Specifically, the target meta information includes, in addition to the embedded watermark identifier, a timestamp, key frame information, decoded image size, encoding format and the like, and the encoded data is decoded by using a hardware or software decoder, and the decoded data is displayed, and the use of the target meta information is ensured in the display process to realize the display, that is, the content corresponding to the data stream is played on the terminal interface; taking a video as an example, the encoded video frame data is decoded, and the decoded video frame data is rendered, and the use of the target meta information is ensured in the rendering process to realize the playing, that is, the video content corresponding to the data stream is played on the terminal interface.
[0052] In summary, the watermark embedding method of the embodiment of the present disclosure receives the data stream and the license file sent by the server; decrypts the data stream based on a preset decryption algorithm to obtain encoded data and initial meta information; determines a watermark identifier based on the license file, and embeds the watermark identifier into the initial meta information to obtain target meta information; and renders and plays based on the target meta information and the encoded data. Thus, after the digital rights management decryption, the watermark identifier is obtained from the license file and embedded into the meta information of the video data, so that the watermark embedding for protection is performed before the display of the decrypted data, the practicability is improved, the watermark identifier is embedded into the meta information to realize the hidden and non-discarded watermark embedding, the video data watermark embedding efficiency is improved, and the security of the video data watermark is ensured.
[0053] In some embodiments, determining the watermark identifier based on the license file comprises: parsing the license file to obtain authorization information; obtaining an authorized user identifier based on the authorization information, and taking the authorized user identifier as the watermark identifier.
[0054] Specifically, after receiving the license file, the license file is parsed to obtain authorization information, and the authorization information includes an encryption key, an authorized user identifier, an authorized time and an authorized device, and then the authorized user identifier is obtained from the authorization information as the watermark identifier, wherein the authorized user identifier can uniquely identify an authorized user.
[0055] In the above manner, the authorized user identifier is embedded into the meta information as the watermark identifier to realize hidden and non-discarded embedding, so that when the video is extracted for the watermark identifier in the subsequent copyright management process, the video content corresponding to which authorized user identifier can be determined through the watermark identifier, and the effectiveness of the video copyright management is further improved.
[0056] In some embodiments, embedding the watermark identifier into the initial meta information to obtain the target meta information comprises: encoding the initial meta information to obtain an encoded feature, encoding the watermark identifier to obtain an encoded watermark, and fusing the encoded feature and the encoded watermark to obtain the target meta information.
[0057] Specifically, after the watermark identifier is determined, the watermark identifier is embedded into the initial meta-information to obtain target meta-information. In some embodiments, the initial meta-information is encoded to obtain an encoded feature, the watermark identifier is encoded to obtain an encoded watermark, and the encoded feature and the encoded watermark are fused to obtain the target meta-information. In other embodiments, the initial meta-information and the watermark identifier are processed based on a preset artificial intelligence model to obtain the target meta-information.
[0058] To improve processing efficiency, different processing methods can be selected according to different initial meta-information. Specifically, for some initial meta-information with relatively small calculation amount, direct encoding and fusion can be performed, and for some initial meta-information with relatively large calculation amount, an artificial intelligence module can be called for processing to ensure processing efficiency and effect.
[0059] In the embodiments of the present disclosure, when the initial meta-information is preset information, the preset information and the watermark identifier are processed based on a preset artificial intelligence model to obtain the target meta-information. Some meta-information with relatively large data amount is set as preset information in advance, and the preset information and the watermark identifier are processed based on the artificial intelligence model to obtain the target meta-information when the initial meta-information is the preset information.
[0060] The artificial intelligence model is pre-stored in the terminal, and information samples of the initial meta-information can be obtained. Each information sample has a corresponding encoding label. The information samples are processed based on a pre-constructed artificial intelligence model to be trained to obtain training encoding features. The similarity between the training encoding features and the encoding labels is determined based on a pre-set loss function to adjust the model parameters to obtain the artificial intelligence model.
[0061] Specifically, the information samples can be input into the pre-constructed artificial intelligence model to be trained for processing to obtain training encoding features. The training encoding features and the encoding labels are processed by point multiplication or the like to obtain the similarity between the training encoding features and the encoding labels. The similarity is input into the pre-set loss function for calculation to obtain a loss value. It can be understood that when the loss value is less than a certain threshold, the training can be stopped. If the loss value is greater than or equal to the threshold, the model parameters of the artificial intelligence model to be trained need to be adjusted, and then the model is continuously trained until the loss value is less than the threshold to obtain the artificial intelligence model. In this way, the artificial intelligence model can be accurately and quickly obtained, thereby improving the efficiency and effect of subsequent watermark embedding and extraction.
[0062] In the embodiments of the present disclosure, the initial meta-information includes specific feature information corresponding to each data in the encoded data and / or common feature information corresponding to all data; wherein the specific feature information includes one or more of data type, data size, data enhancement information and data extension information; and the common feature information includes one or more of color information, sequence parameters, data structure, language, label and duration.
[0063] Specifically, the initial meta-information includes specific feature information corresponding to each data in the encoded data and / or common feature information corresponding to all data. Taking a video as an example, the specific feature information corresponding to each video frame includes one or more of frame type, frame size, supplemental enhancement information and intra-frame extension information; and the common feature information corresponding to the encoded video frame data includes one or more of color space, HDR static metadata, sequence parameter set, video frame parameter set, GOP structure, language, label and duration.
[0064] Further, the initial meta-information is encoded to obtain encoded features, including: analyzing the specific feature information and / or the common feature information to obtain matching information corresponding to a target data display parameter; wherein the target data display parameter is used to determine the displayed data page information; and encoding the matching information to obtain the encoded features.
[0065] The target data display parameter determines the displayed data page information, such as target video playback parameters that affect the video page information playback quality.
[0066] Specifically, information affecting the displayed data page information, i.e. information related to the data display parameter such as color information, is obtained from the specific feature information and / or the common feature information as matching information, so that the matching information is encoded to obtain the encoded features.
[0067] For example, in a complex watermark embedding meta-information scenario, the color information is encoded and debugged to cause a change that cannot be checked by the naked eye; for another example, a hidden watermark identifier is added in the video bit data in the encoded field, for example, an authorized user identifier is encoded and placed in it.
[0068] Therefore, by using an artificial intelligence model for intelligent watermark embedding, compared with the previous watermark embedding method, the embodiments of the present disclosure embed watermark information in meta-information affecting the playback quality, so it cannot be discarded at will; the soft solution DRM is used to protect the watermark embedding process, which breaks through the limitation of hardware DRM, improves the practicability, realizes the hidden and non-discarded watermark embedding, improves the video watermark embedding efficiency while ensuring the security of the video watermark.
[0069] Figure 2This is a flowchart illustrating a watermark embedding method provided in an embodiment of the present disclosure. The method mainly includes the following steps S202 to S210:
[0070] Step S202: Send a data display request to the server; wherein, the server obtains the authorized user identifier based on the data display request, generates a license file based on the authorized user identifier, and sends the data stream and license file to the terminal.
[0071] Step S204: Receive the data stream and license file sent by the server, decrypt the data stream based on a preset decryption algorithm, and obtain the encoded data and initial metadata.
[0072] Step S206: Parse the license file to obtain authorization information, obtain the authorized user identifier based on the authorization information, and use the authorized user identifier as a watermark identifier.
[0073] Step S208: Encode the initial metadata to obtain encoded features, encode the watermark identifier to obtain encoded watermark, and fuse the encoded features and encoded watermark to obtain target metadata.
[0074] When the initial metadata is preset information, the initial metadata and watermark identifier are processed based on a preset artificial intelligence model to obtain the target metadata.
[0075] The initial metadata includes specific feature information corresponding to each data point in the encoded data and / or common feature information corresponding to all data points. Therefore, the specific feature information and / or common feature information are analyzed to obtain matching information corresponding to the target data display parameters. The target data display parameters determine the data page information to be displayed. The matching information is encoded to obtain the encoded features.
[0076] Step S210: Display based on target metadata and encoded data.
[0077] Understandably, embedding the watermark identifier into metadata, rather than directly processing data such as videos, images, and electronic documents, is more efficient than directly processing the large volume of encoded data like videos and images. Specifically, embedding the watermark identifier into metadata that affects playback quality enhances its non-discardability; and embedding the watermark identifier after data stream decryption and before data display further improves its practicality.
[0078] For example, such as Figure 3 As shown, taking the data stream as a video bitstream as an example, the terminal's video bitstream container is used to store bitstream information, which includes encoded video frame data and metadata.
[0079] Specifically, the server issues a code stream and a license file (including an encryption key and authorization information), and the DRM decrypts the encrypted meta information and encoded video frame data, and determines the watermark identification embedded in the meta information affecting the playback quality by using the artificial intelligence of the terminal and the authorization information in the license file.
[0080] As shown in the example, Figure 4 The terminal includes an artificial intelligence module, which can perform watermark embedding processing through an artificial intelligence model, and the DRM includes a decryption module and a watermark embedding module. The decryption module can use a white-box cryptographic algorithm to decrypt the code stream to obtain encoded video frame data and initial meta information, determine a watermark identification based on the license file, and embed the watermark identification in the initial meta information to obtain target meta information.
[0081] As shown in the example, Figure 5 The terminal includes an artificial intelligence module, which can perform watermark embedding processing through an artificial intelligence model, and the DRM includes a decryption module and a watermark embedding module. The decryption module can use a white-box cryptographic algorithm to decrypt the code stream to obtain encoded video frame data and initial meta information, determine a watermark identification based on the license file, and embed the watermark identification in the initial meta information to obtain target meta information.
[0082] Thus, in combination with the current code stream characteristics and the improvement of the terminal artificial intelligence processing capability, and in addition to the flexibility of the DRM, a terminal secret watermark embedding method is proposed. The playback of high-quality code streams not only depends on the encoded information, but also relies on meta information containing a large amount of color information. By combining these meta information with part of the authorization information in the license file, the watermark information is embedded in the meta information. This method is easy to calculate and can take advantage of the artificial intelligence capability, without affecting the playback experience, and realizes the embedding of hidden and non-erasable watermarks.
[0083] In summary, the data display request is sent to the server; the server obtains the authorized user identifier based on the data display request, generates a license file based on the authorized user identifier, and distributes the data stream and the license file to the terminal, receives the data stream and the license file sent by the server, decrypts the code stream based on a preset decryption algorithm, obtains the encoded data and the initial meta information, parses the license file to obtain the authorization information, obtains the authorized user identifier based on the authorization information, and encodes the initial meta information as a watermark identifier to obtain an encoded feature, encodes the watermark identifier to obtain an encoded watermark, fuses the encoded feature and the encoded watermark to obtain target meta information, and renders and plays based on the target meta information and the encoded video frame data. Thus, the terminal artificial intelligence is used for intelligent watermark embedding, the watermark is embedded in the meta information affecting the playback quality, and therefore cannot be discarded at will. The DRM is used to protect the watermark embedding process, the practicability is improved, and the hidden and non-discarded watermark embedding is achieved.
[0084] Corresponding to the foregoing watermark embedding method, the embodiment of the disclosure further provides a watermark embedding device, Figure 6 A structural diagram of a watermark embedding device provided by the embodiment of the disclosure is shown in the figure. The device can be realized by software and / or hardware, and is applied to a terminal. The device comprises:
[0085] The receiving module 602 is configured to receive the data stream and the license file sent by the server.
[0086] The decryption module 604 is configured to decrypt the data stream based on a preset decryption algorithm to obtain encoded data and initial meta information.
[0087] The determination module 606 is configured to determine a watermark identifier based on the license file.
[0088] The embedding module 608 is configured to embed the watermark identifier in the initial meta information to obtain target meta information.
[0089] The playing module 610 is configured to render and play based on the target meta information and the encoded data.
[0090] The above device provided by the embodiment of the disclosure is used to obtain the watermark identifier embedded in the meta information of the video data from the license file after the digital rights management decryption, so as to protect the watermark embedding before decryption and display, improve the practicability, embed the watermark identifier in the meta information to achieve the hidden and non-discarded watermark embedding, improve the video data watermark embedding efficiency, and ensure the security of the video data watermark.
[0091] In some embodiments, the determining module 606 is specifically configured to: parse the license file to obtain authorization information; obtain an authorized user identifier based on the authorization information, and use the authorized user identifier as the watermark identifier.
[0092] In some embodiments, the embedding module 608 includes: a first encoding unit configured to encode the initial meta-information to obtain an encoded feature; a second encoding unit configured to encode the watermark identifier to obtain an encoded watermark; and a fusion unit configured to fuse the encoded feature and the encoded watermark to obtain the target meta-information.
[0093] In some embodiments, the apparatus further includes a processing module configured to, when the initial meta-information is preset information, process the initial meta-information and the watermark identifier based on a preset artificial intelligence model to obtain the target meta-information; wherein the initial meta-information is obtained based on information samples, each of the information samples has a corresponding encoding label, the information samples are processed based on a pre-constructed artificial intelligence model to be trained to obtain training encoded features, and a loss value is determined based on a similarity between the training encoded features and the encoding label and a pre-set loss function to adjust model parameters to obtain the artificial intelligence model.
[0094] In some embodiments, the initial meta-information includes specific feature information corresponding to each data in the encoded data and / or common feature information corresponding to all data; wherein the specific feature information includes one or more of a data type, a data size, data enhancement information, and data expansion information; and the common feature information includes one or more of color information, sequence parameters, data structure, language, labels, and duration.
[0095] In some embodiments, the first encoding unit is specifically configured to: analyze the specific feature information and / or the common feature information to obtain matching information corresponding to a target data display parameter; wherein the target data display parameter is used to determine displayed data page information; and encode the matching information to obtain the encoded feature.
[0096] In some embodiments, the apparatus further includes a sending module configured to send a data display request to the server; wherein the server obtains an authorized user identifier based on the data display request, generates the license file based on the authorized user identifier, and delivers the data stream and the license file to the terminal.
[0097] The watermark embedding apparatus provided in the embodiments of the present disclosure can perform the watermark embedding method provided in any of the embodiments of the present disclosure, and has the corresponding function modules and beneficial effects of performing the method.
[0098] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the apparatus embodiments described above can refer to the corresponding process in the method embodiments, which will not be repeated here.
[0099] The electronic device provided by the embodiments of the present disclosure includes a storage device having a computer program stored thereon, and a processing device configured to execute the computer program in the storage device to implement the steps of any of the methods of the present disclosure.
[0100] Reference is made below to Figure 7 , which shows a structural diagram of an electronic device 700 suitable for implementing the embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure can include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (Personal Digital Assistant), a PAD (Tablet Personal Computer), a PMP (Portable Multimedia Player), a vehicle terminal (e.g., a car navigation terminal), and the like, as well as a fixed terminal such as a digital TV, a desktop computer, and the like. Figure 7 The electronic device shown is merely an example and should not impose any limitation on the functions and use range of the embodiments of the present disclosure.
[0101] As shown in Figure 7 , the electronic device 700 can include a processing device 701 (e.g., a central processing unit, a graphics processing unit, etc.) that can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 702 or programs loaded from a storage device 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 are also stored. The processing device 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0102] Generally, the following devices can be connected to the I / O interface 705: an input device 706 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, and the like; an output device 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, and the like; a storage device 708 including, for example, a magnetic tape, a hard disk, and the like; and a communication device 709. The communication device 709 can allow the electronic device 700 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 7 The electronic device 700 is shown with various devices, but it should be understood that all of the devices shown are not required, and more or fewer devices can alternatively be implemented.
[0103] In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for executing the methods illustrated by the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via the communication device 709, or installed from the storage device 708, or installed from the ROM 702. When the computer program is executed by the processing device 701, the above-mentioned functions defined in the methods of the embodiments of the present disclosure are performed.
[0104] In addition to the above-mentioned methods and devices, embodiments of the present disclosure can also be a computer program product comprising computer program instructions which, when executed by a processor, cause the processor to perform the image processing method provided by the embodiments of the present disclosure. The computer program product can be written in any combination of one or more programming languages to perform the operations of the embodiments of the present disclosure, including an object-oriented programming language, such as Java, C++, etc., and a conventional procedural programming language, such as the "C" language or similar programming languages. The program code can be executed entirely on a user computing device, partially on a user device, as a separate software package, partially on a user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0105] In addition, embodiments of the present disclosure can also be a computer-readable storage medium having stored thereon computer program instructions which, when executed by a processor, cause the processor to perform the watermark embedding method provided by the embodiments of the present disclosure.
[0106] The computer-readable storage medium can employ any combination of one or more of readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium, for example, can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or apparatus, or any suitable combination of the above. More specific examples (a non-exhaustive list) of the readable storage medium include an electrical connection having one or more wires, a portable disc, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0107] Embodiments of the present disclosure also provide a computer program product comprising computer programs / instructions which, when executed by a processor, implement the watermark embedding method in the embodiments of the present disclosure.
[0108] It can be understood that, before using the technical solutions disclosed in the embodiments of the present disclosure, the type of personal information involved in the present disclosure, the use range, the use scenario, etc. should be informed to the user and the authorization of the user should be obtained through appropriate means according to relevant laws and regulations.
[0109] For example, in response to receiving an active request of a user, prompt information is sent to the user to explicitly prompt the user that the operation requested to be performed will require obtaining and using personal information of the user. Thus, the user can voluntarily choose whether to provide personal information to the software or hardware such as an electronic device, an application program, a server or a storage medium, etc. performing the operation of the technical solutions of the present disclosure according to the prompt information.
[0110] As an optional but non-limiting implementation manner, in response to receiving an active request of a user, the manner of sending prompt information to the user may, for example, be a pop-up window manner, and the prompt information may be presented in the form of text in the pop-up window. In addition, the pop-up window may also carry selection controls for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0111] It can be understood that the above notification and obtaining of user authorization process is only illustrative, and does not limit the implementation manners of the present disclosure, and other manners meeting relevant laws and regulations can also be applied to the implementation manners of the present disclosure.
[0112] It should be noted that, in the present document, relational terms such as "first" and "second", and the like can be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises a... " does not, without more constraints, exclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.
[0113] The above description is merely one specific implementation of the present disclosure, enabling those skilled in the art to understand or implement the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure is not to be limited to the embodiments described herein, but is to accord with the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A watermark embedding method characterized by, The method is applied to a terminal and includes the following steps: receiving a data stream and a license file sent by a server; decrypting the data stream based on a preset decryption algorithm to obtain encoded data and initial metadata; determining a watermark identifier based on the license file and embedding the watermark identifier into the initial metadata to obtain target metadata; displaying based on the target metadata and the encoded data.
2. The method of claim 1, wherein, The step of determining the watermark identifier based on the license file includes the following steps: parsing the license file to obtain authorization information; obtaining an authorized user identifier based on the authorization information and taking the authorized user identifier as the watermark identifier.
3. The method of claim 1, wherein, The step of embedding the watermark identifier into the initial metadata to obtain target metadata includes the following steps: encoding the initial metadata to obtain an encoded feature; encoding the watermark identifier to obtain an encoded watermark; fusing the encoded feature and the encoded watermark to obtain the target metadata.
4. The method of claim 3, wherein, The method further includes the following steps: when the initial metadata is preset information, processing the initial metadata and the watermark identifier based on a preset artificial intelligence model to obtain the target metadata; wherein, information samples of the initial metadata are obtained, each information sample has a corresponding encoded label, the information samples are processed based on a pre-constructed artificial intelligence model to be trained to obtain training encoded features, and a loss value is determined based on the similarity between the training encoded features and the encoded label and a pre-set loss function to adjust model parameters to obtain the artificial intelligence model.
5. The method of claim 3, wherein: the initial metadata includes specific feature information corresponding to each data in the encoded data and / or common feature information corresponding to all data; wherein the specific feature information includes one or more of data type, data size, data enhancement information, and data expansion information; and the common feature information includes one or more of color information, sequence parameters, data structure, language, label, and duration.
6. The method of claim 5, wherein, The step of encoding the initial metadata to obtain an encoded feature includes the following steps: analyzing the specific feature information and / or the common feature information to obtain matching information corresponding to target data display parameters; wherein the target data display parameters are used to determine displayed data page information; encoding the matching information to obtain the encoded feature.
7. The method of claim 1, wherein, Before the server sends the data stream and the license file, the method further includes the following steps: sending a data display request to the server; wherein the server obtains an authorized user identifier based on the data display request, generates the license file based on the authorized user identifier, and delivers the data stream and the license file to the terminal.
8. A watermark embedding apparatus characterized by comprising: The device is applied to a terminal and includes the following steps: a receiving module configured to receive a data stream and a license file sent by a server; a decryption module configured to decrypt the data stream based on a preset decryption algorithm to obtain encoded data and initial metadata; a determination module configured to determine a watermark identifier based on the license file; An embedding module is configured to embed the watermark identifier into the initial meta-information to obtain target meta-information. A playing module is configured to perform display based on the target meta-information and the encoded data.
9. An electronic device, comprising: The electronic device comprises: a storage device having a computer program stored thereon; a processing device configured to execute the computer program in the storage device to implement the steps of the watermark embedding method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, and the computer program is configured to execute the watermark embedding method according to any one of claims 1-7.