Blockchain-based watermark processing method, device, equipment and storage medium
By recording transaction and copyright information on the blockchain, embedding watermarks using the target color brightness spatial component algorithm, and generating recovery keys, the problems of poor watermark visibility and unreliability are solved, and real-time protection and trusted verification of image copyrights are achieved.
Patent Information
- Application Number
- CN202311543482.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-17
- Publication Date
- 2025-10-14
- Estimated Expiration
- 2043-11-17
AI Technical Summary
Existing watermarking technology has poor visibility after multiple embedding operations, and the watermark information is unreliable, which cannot effectively resolve image copyright disputes.
A blockchain-based watermark processing method is adopted to embed watermarks through the target color brightness spatial component algorithm, generate a recovery key, record transactions and copyright information in real time, and combine the tamper-proof characteristics of blockchain to ensure the credibility and visibility of watermark information.
It improves the real-time and credibility of watermarks, enhances the copyright protection capabilities of images throughout their life cycle, solves the invisibility and unreliability problems of traditional watermarking methods, and achieves accurate copyright verification and transaction records.
Smart Images

Figure CN117494083B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of blockchain, in particular to a watermark processing method and device based on blockchain, equipment and storage medium. BACKGROUND
[0002] As an effective picture protection method, digital watermark can embed the copyright information and unique signature of the copyright owner into the carrier more covertly. The common operation (transmission, copy, etc.) will not affect the extraction of watermark, so digital watermark has the ability of copyright authentication in the survival period of digital media. However, whether the original watermark information of digital watermark is reliable and the copyright ownership after picture transaction is still controversial.
[0003] In recent years, blockchain has many applications in various fields due to its decentralization and tamper-proof characteristics. The present application saves watermark information to the blockchain, which can accurately record transaction information and signature information of the copyright owner during the transaction process, effectively solving the problem of destruction of original watermark information and copyright risk of digital watermark. Therefore, the combination of blockchain and digital watermark will have a broad application prospect in the field of digital copyright protection. Since the existing watermark technology is to embed watermark information by modifying the frequency domain or time domain coefficients of the picture, after multiple embedding operations, the difference between the current coefficients and the original coefficients will be large, resulting in the visibility of watermark getting worse and worse.
[0004] The above content is only used to assist in understanding the technical solutions of the present application and does not represent the acknowledgement of the above content as prior art. SUMMARY
[0005] The main purpose of the present application is to provide a watermark processing method, device, equipment and storage medium based on blockchain, which aims to solve the poor visibility of the watermark in the prior art.
[0006] To achieve the above purpose, the present application provides a watermark processing method based on blockchain, which comprises the following steps:
[0007] Obtain the transaction information and copyright information of the object to be processed;
[0008] Generate the watermark to be embedded according to the transaction information and the copyright information;
[0009] Embed the watermark to be embedded into the object to be processed through the target color brightness space component algorithm to obtain the carrier object and the recovery key;
[0010] Upload the carrier object and the recovery key to the target blockchain.
[0011] Optionally, the generating the to-be-embedded watermark according to the transaction information and the copyright information comprises:
[0012] determining a transaction identification code according to the transaction information, and determining a copyright signature identification code according to the copyright information;
[0013] generating a binary sequence according to the transaction identification code and the copyright signature identification code;
[0014] performing a rewriting and scrambling operation on the binary sequence to obtain the to-be-embedded watermark.
[0015] Optionally, the embedding the to-be-embedded watermark into the to-be-processed object through a target color luminance space component algorithm to obtain a carrier object and a recovery key comprises:
[0016] determining an inverse transform luminance component corresponding to the to-be-processed object and a recovery key according to a target color luminance space component algorithm;
[0017] obtaining a carrier object according to the to-be-processed object, the inverse transform luminance component and the to-be-embedded watermark.
[0018] Optionally, the determining an inverse transform luminance component corresponding to the to-be-processed object and a recovery key according to a target color luminance space component algorithm comprises:
[0019] when the to-be-processed object is a first upload, performing a domain conversion on the to-be-processed object, and extracting a luminance component;
[0020] performing a target transform on the luminance component to obtain a transform coefficient;
[0021] grouping the transform coefficient, and modifying a target coefficient of each group to obtain a modified transform coefficient and a recovery key;
[0022] performing an inverse transform on the modified transform coefficient to obtain an inverse transform luminance component.
[0023] Optionally, the determining an inverse transform luminance component corresponding to the to-be-processed object and a recovery key according to a target color luminance space component algorithm comprises:
[0024] when the to-be-processed object is not a first upload, performing a domain conversion on the to-be-processed object, and extracting a luminance component;
[0025] performing a target transform on the luminance component to obtain a transform coefficient;
[0026] grouping the transform coefficient, and modifying a target coefficient of each group to obtain a modified transform coefficient and a recovery key;
[0027] Perform coefficient recovery on the modified transformation coefficient according to the recovery key to obtain a recovery transformation coefficient;
[0028] An inverse transformation is performed on the restoration transformation coefficients to obtain an inverse transformation luminance component, and a new restoration key is generated.
[0029] Optionally, after uploading the carrier object and the recovery key to the target blockchain, the method further includes:
[0030] Upon receiving a watermark extraction instruction, performing a color gamut conversion on the carrier object to obtain an extracted brightness component;
[0031] Performing target transformation on the extracted brightness components to obtain extraction coefficients and grouping them;
[0032] Calculate each group of extraction coefficients to obtain watermark information;
[0033] Perform an inverse rewriting operation and a scrambling recovery operation on the watermark information to obtain plaintext information.
[0034] Optionally, after performing the inverse rewriting operation and the scrambling recovery operation on the watermark information to obtain plaintext information, the method further includes:
[0035] Upon receiving the copyright verification instruction, determining the object identification code according to the plaintext information;
[0036] Acquire the embedded watermark information actually embedded, and compare the embedded watermark information with the plaintext information;
[0037] querying historical transaction information based on the object identification code;
[0038] Determine the copyright verification result based on the historical transaction information and the comparison result. In addition, to achieve the above purpose, the present invention also proposes a watermark processing device based on blockchain, and the watermark processing device based on blockchain includes:
[0039] An information acquisition module is used to obtain transaction information and copyright information of the object to be processed;
[0040] A watermark generation module, configured to generate a watermark to be embedded based on the transaction information and the copyright information;
[0041] A watermark embedding module, configured to embed the watermark to be embedded into the object to be processed by using a target color brightness spatial component algorithm to obtain a carrier object and a recovery key;
[0042] The object uploading module is used to upload the carrier object and the recovery key to the target blockchain.
[0043] In addition, to achieve the above object, the application further provides a watermark processing device based on a block chain, which comprises a memory, a processor and a watermark processing program based on a block chain stored on the memory and running on the processor, and the watermark processing program based on a block chain is configured to implement the watermark processing method based on a block chain as described above.
[0044] In addition, to achieve the above object, the application further provides a storage medium, which stores a watermark processing program based on a block chain, and the watermark processing program based on a block chain implements the watermark processing method based on a block chain as described above when executed by a processor.
[0045] The application acquires transaction information and copyright information of a to-be-processed object, generates a to-be-embedded watermark according to the transaction information and the copyright information, embeds the to-be-embedded watermark into the to-be-processed object through a target color brightness space component algorithm to obtain a carrier object and a recovery key, and uploads the carrier object and the recovery key to the target block chain. In this way, the recovery key, the transaction information and the copyright information are added in the process of embedding the watermark, the picture transaction information is recorded and processed in real time, the real-time performance and the credibility of the original watermark information are improved, and the to-be-processed object can be recovered through the recovery key each time the watermark is added, so that the poor visibility of the original coefficients of the watermark is prevented. BRIEF DESCRIPTION OF DRAWINGS
[0046] Figure 1 is a structural schematic diagram of a watermark processing device based on a block chain of a hardware running environment related to an embodiment scheme of the application;
[0047] Figure 2 is a flowchart of a first embodiment of the watermark processing method based on a block chain of the application;
[0048] Figure 3 is a schematic diagram of a processing node in an embodiment of the watermark processing method based on a block chain of the application;
[0049] Figure 4 is a schematic diagram of a rewriting operation in an embodiment of the watermark processing method based on a block chain of the application;
[0050] Figure 5 is a schematic diagram of a watermark embedding flowchart of picture creation in an embodiment of the watermark processing method based on a block chain of the application;
[0051] Figure 6 is a schematic diagram of picture recovery and watermark embedding in an embodiment of the watermark processing method based on a block chain of the application;
[0052] Figure 7The information on the drawing is shown in the embodiment of the blockchain-based watermark processing method of the present application;
[0053] Figure 8 The flowchart of the second embodiment of the blockchain-based watermark processing method of the present application is shown in the embodiment of the blockchain-based watermark processing method of the present application;
[0054] Figure 9 The watermark extraction flowchart in the embodiment of the blockchain-based watermark processing method of the present application is shown in the embodiment of the blockchain-based watermark processing method of the present application;
[0055] Figure 10 The structure block diagram of the first embodiment of the blockchain-based watermark processing device of the present application is shown in the embodiment of the blockchain-based watermark processing device of the present application.
[0056] The implementation, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION
[0057] It should be understood that the specific embodiments described herein are intended to explain the present application, but not to limit the present application.
[0058] Reference Figure 1 , Figure 1 The structure diagram of the blockchain-based watermark processing device related to the hardware running environment of the embodiment of the present application is shown in the embodiment of the present application.
[0059] As Figure 1 shown, the blockchain-based watermark processing device can include a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to realize the connection and communication between the components. The user interface 1003 can include a display, an input unit such as a keyboard, and can also include a standard wired interface, a wireless interface. The network interface 1004 can optionally include a standard wired interface, a wireless interface (such as a wireless fidelity (Wi-Fi) interface). The memory 1005 can be a high-speed random access memory (RAM) memory, or a stable non-volatile memory (NVM), such as a magnetic disk memory. The memory 1005 can also be a storage device independent of the aforementioned processor 1001.
[0060] Those skilled in the art can understand that Figure 1The structure shown in the figure does not constitute a limitation on the blockchain-based watermark processing device, and can include more or fewer components than the illustration, or combine certain components, or different component arrangements.
[0061] As shown in Figure 1 The memory 1005 as a storage medium can include an operating system, a network communication module, a user interface module, and a blockchain-based watermark processing program.
[0062] In the blockchain-based watermark processing device shown in Figure 1 The network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the blockchain-based watermark processing device of the present application can be arranged in the blockchain-based watermark processing device, and the blockchain-based watermark processing device calls the blockchain-based watermark processing program stored in the memory 1005 through the processor 1001, and executes the blockchain-based watermark processing method provided by the embodiments of the present application.
[0063] The embodiment of the present application provides a blockchain-based watermark processing method, referring to Figure 2 , Figure 2 is a flowchart of a first embodiment of a blockchain-based watermark processing method of the present application.
[0064] In this embodiment, the blockchain-based watermark processing method includes the following steps:
[0065] Step S10: Obtain the transaction information and copyright information of the object to be processed.
[0066] In this embodiment, the execution subject of the embodiment can be the blockchain-based watermark processing device, which has functions of data processing, data communication and program running, etc. The blockchain-based watermark processing device can be a computer, a server or other intelligent terminal. Of course, it can also be other devices with similar functions, and the present application does not limit it. For the sake of convenience, the blockchain-based watermark processing device is taken as an example for illustration.
[0067] It needs to be explained that with the continuous development of media technology, the visual material market is booming unprecedentedly. However, the status of picture copyright is not optimistic and needs to be solved urgently. As an effective means of picture protection, digital watermarking can embed the copyright information and unique signature of the copyright owner into the carrier more covertly. Common operations (transmission, copying, etc.) will not affect the extraction of watermark, so digital watermarking has the ability of copyright authentication in the survival period of digital media. However, whether the original watermark information of digital watermarking is reliable and the copyright ownership after picture transaction is still controversial. In recent years, blockchain has many applications in various fields due to its decentralization and tamper-proof characteristics. This proposal saves the watermark information on the blockchain and accurately records the transaction information and signature information of the copyright owner during the transaction process, effectively solving the problems of original watermark information destruction and copyright risk. Therefore, the combination of blockchain and digital watermarking will have a broad application prospect in the field of digital copyright protection. At present, there are many schemes related to picture watermark processing, for example, a first watermark element is hashed and encrypted using a hash encryption algorithm to obtain a first hash value corresponding to the first watermark element. A watermark encryption processing is performed on the picture to be processed using a watermark picture corresponding to the first hash value to obtain a target picture. Verification information of the picture associated content of the target picture is determined and uploaded to the blockchain. For another example, the prior art includes a secure image watermark generation method based on blockchain and discrete wavelet transform. The discrete wavelet transform domain of the image is obtained by using discrete wavelet transform, and the difference between the edge coefficient of the LL wavelet coefficient and the expansion component is used as the watermark to realize the digital watermark embedding based on edge detection. The image with embedded watermark is reconstructed by inverse discrete wavelet transform, and the reconstructed image is encrypted by algorithm. The image is transmitted as blockchain data. The image is decrypted, and the watermark of the decrypted image is calculated by using discrete wavelet transform and edge detection, and compared with the original watermark to judge whether the image or watermark is tampered.
[0068] It should be understood that the existing technology can extract and verify the picture watermark information, but cannot be used to solve the copyright dispute of the picture, because the picture watermark information cannot prove the copyright owner, and the credibility of the picture watermark cannot be guaranteed, that is, whether the picture watermark belongs to the copyright owner and whether it is tampered with cannot be proved. In addition, since the existing watermark technology is to embed watermark information by modifying the frequency domain or time domain coefficients of the picture, after multiple embedding operations, the difference between the current coefficients and the original coefficients will be large, resulting in poor invisibility of the watermark. The scheme of the embodiment adds a watermark processing node and a copyright verification node to embed watermark information in the picture in real time, so that the picture has copyright protection ability throughout its life cycle, and also effectively solves the problem that the traditional watermarking method cannot update the watermark information in real time. With the characteristics of the blockchain, the transaction information and the copyright information are recorded, solving the problems of untrusted original watermark information and difficult to trace transaction records in the traditional watermarking method. A new watermark information structure is proposed, which improves the accuracy compared with the traditional watermark algorithm. A new watermark embedding algorithm is proposed, which restores the picture before each embedding of the watermark, solving the problem of poor invisibility after multiple embedding of the existing watermark algorithm.
[0069] In a specific implementation, the scheme of the embodiment proposes a watermark processing method based on blockchain, as shown in Figure 3 A new blockchain front-end node is designed, including a watermark processing node and a copyright verification node, which improves the real-time and accuracy of watermark processing and copyright verification. A new watermark information structure and watermark embedding algorithm are proposed, which improves the accuracy of watermark extraction and the invisibility of multiple embedded watermarks, greatly enhancing the quality of the picture and the ability of picture copyright protection. A group of watermark processing nodes are added between the application and the blockchain, and the main functions of the watermark processing node include extracting picture information, restoring watermark, generating new watermark information, embedding watermark, and information chaining.
[0070] It should be noted that the object to be processed can be of any data type, and the embodiment is described in the form of a picture. The transaction information refers to the relevant information of the buyer and seller and the transaction time when the object to be processed is traded, and the copyright information refers to the relevant information of the corresponding copyright signature in the object to be processed.
[0071] Step S20: generating a watermark to be embedded according to the transaction information and the copyright information.
[0072] It should be understood that the generation of the watermark to be embedded according to the transaction information and the copyright information relies on the watermark structure designed by the scheme of the embodiment, and then the transaction information and the copyright information are rewritten and spliced to obtain the watermark to be embedded.
[0073] Furthermore, in order to generate the watermark to be embedded, step S20 includes: determining a transaction identification code based on the transaction information, and determining a copyright signature identification code based on the copyright information; generating a binary sequence based on the transaction identification code and the copyright signature identification code; and rewriting and scrambling the binary sequence to obtain the watermark to be embedded.
[0074] In the specific implementation, the watermark information contains two parts: transaction information and copyright information. The image transaction information includes the user ID and transaction ID of both parties in the transaction, and the copyright information includes the copyright signature. Specifically, the transaction information and copyright information are represented by binary sequences, such as Figure 4 Before the rewriting shown in the figure, the user IDs of both parties in the transaction are 32 bits, the transaction ID is 64 bits, and the copyright signature is 128 bits. In other words, the image watermark information can be determined based on the transaction information and copyright information of the image. Furthermore, when generating the image watermark, each bit of the binary sequence included in it is rewritten three times. For example, after the rewriting operation, 1010 becomes 111000111000. Figure 4 After rewriting shown.
[0075] It should be noted that if Figure 4 As shown, the first segment is the ID of the seller of this transaction; the second segment is the ID of this transaction; the third segment is the ID of the buyer of this transaction (the current copyright owner); and the fourth segment is the copyright signature, which consists of a 64-bit unique identification code of the copyright holder, which is composed of a 64-bit random binary sequence, and a 64-bit image ID. The main process of generating a watermark is as follows: 1) Obtain the current transaction information, image information, and copyright information; 2) Generate binary sequences of user, transaction, and copyright signatures according to the above rules. If the image watermark is created for the first time, that is, it means that the image has not been traded before, then the first and second segments of the sequence are all set to 0; 3) Rewrite the binary sequence in step 2, rewriting each bit three times; 4) Use the Arnold scrambling algorithm to scramble the above rewritten sequence to obtain the watermark information Win. The obfuscated Win is a meaningless sequence that can effectively prevent the watermark from being brute-force cracked, resulting in the leakage of the original watermark information.
[0076] Step S30: embedding the watermark to be embedded into the object to be processed through a target color brightness space component algorithm to obtain a carrier object and a recovery key.
[0077] It should be understood that after obtaining the watermark to be embedded, it is processed using a pre-set target color luminance spatial component algorithm, thereby embedding the watermark into the object to be processed, obtaining the carrier object, and generating a recovery key for this watermark embedding. The target color luminance spatial component algorithm is a quantized modulation watermark algorithm with recoverability.
[0078] Furthermore, in order to embed the watermark, step S30 includes: determining the inverse transformed brightness component and the recovery key corresponding to the object to be processed according to the target color brightness space component algorithm; and obtaining the carrier object according to the object to be processed, the inverse transformed brightness component and the watermark to be embedded.
[0079] In the specific implementation, since the image will inevitably be changed during the watermark embedding process, especially the frequent embedding of image watermarks in this proposal, it will have a great impact on the image quality. Therefore, this proposal proposes a new quantized modulation watermarking algorithm with recoverability. The algorithm embeds the watermark information by modifying the last coefficient of each group after the luminance component of the YCbCr color space is transformed by DCT and grouped by 4*4. The algorithm is recoverable and can completely recover the DCT coefficients modified when embedding the watermark based on the embedded watermark information and the recovery key. The specific process is as follows: Figure 5 shown.
[0080] Furthermore, in order to generate a carrier object and a recovery key when the object to be processed is uploaded for the first time, the steps of determining the inverse transformation brightness component and the recovery key corresponding to the object to be processed according to the target color brightness space component algorithm include: when the object to be processed is uploaded for the first time, performing domain conversion on the object to be processed and extracting the brightness component; performing target transformation on the brightness component to obtain transformation coefficients; grouping the transformation coefficients and modifying the target coefficients of each group to obtain modified transformation coefficients and the recovery key; performing inverse transformation on the modified transformation coefficients to obtain inverse transformation brightness components.
[0081] It should be noted that when a picture is created and uploaded for the first time, the main process is as follows:
[0082] 1) Generate image I a According to the target color brightness spatial component algorithm, since there is no transaction information, the first and second segments are set to 0, and the watermark information is generated based on the creator's user ID, unique identification code and image ID.
[0083] 2) Image I a Convert from RGB domain to YC b C r domain, and extract the brightness component Y;
[0084] 3) Perform 2D-DCT transformation on the brightness component Y to obtain the DCT coefficient D Y , D Y Carry out 4*4 grouping;
[0085] Read the current watermark to be embedded w in The i-th value w in(i), and embed the watermark by modifying the last coefficient d of the i-th group in step 3), while generating the recovery key a:
[0086]
[0087] where d'(i) is the modified coefficient; Δ is the quantization step, taking the value of 10; floor is the floor function; mod is the modulus function.
[0088] 5) Convert the modified coefficient D Y to the YC n C n domain, and then to the RGB domain, and then according to the watermark information w b to obtain the carrier image I r after embedding the watermark w in .
[0089] 6) Convert Y in to the YC b C in domain, and then to the RGB domain, and then according to the watermark information w b to obtain the carrier image I b after embedding the watermark w r .
[0090] Further, in order to embed the watermark when the to-be-processed object is not the first upload, the step of determining the inverse transform luminance component corresponding to the to-be-processed object and the recovery key according to the target color luminance space component algorithm comprises: when the to-be-processed object is not the first upload, performing domain conversion on the to-be-processed object and extracting a luminance component; performing target transformation on the luminance component to obtain a transformation coefficient; grouping the transformation coefficient and modifying the target coefficient of each group to obtain a modified transformation coefficient and a recovery key; performing coefficient recovery on the modified transformation coefficient according to the recovery key to obtain a recovered transformation coefficient; performing inverse transformation on the recovered transformation coefficient to obtain an inverse transform luminance component, and generating a new recovery key.
[0091] It should be noted that, as Figure 6 shown in FIG. 6 is a picture recovery and watermark embedding process when the to-be-processed object is not the first upload, and the difference between the watermark embedding process during picture transaction and the first creation of the picture is that: 1, the input picture is the carrier picture after embedding the watermark last time; 2, the step of coefficient recovery is added.
[0092] It should be understood that the original DCT coefficient recovery process is first performed: 1) convert the picture I in after embedding the watermark w b from the RGB domain to the YC b C r domain, and extract the luminance component Y; 2) perform 2D-DCT transformation on the luminance component Y to obtain the coefficient D Y , and D YA 4*4 grouping is performed; the original picture luminance component Y is recovered from the last coefficient d(i) of the first group after 2D-DCT transformation according to the following formula:
[0093]
[0094] wherein w in (i) is the i-th value of the last watermark information; d'(i) is the i-th value of the watermark recovery key generated when the watermark is embedded last time, corresponding to w in (i); a(i) is the i-th value of the recovery key generated when the watermark is embedded last time, corresponding to w in (i); and Δ is the quantization step, taking a value of 10.
[0095] In a specific implementation, the watermark embedding step is the same as the first embedding step when the picture is created. After the watermark is embedded, the embedded watermark picture, the watermark information and the watermark recovery key of the current transaction are obtained.
[0096] It should be noted that for pictures that are not embedded with the watermark for the first time, such as picture I b , the watermark information needs to be updated according to the relevant information of the current picture transaction to obtain new watermark information, and the original DCT coefficient is recovered according to the recovery key a obtained in the above watermark embedding process, and then the watermark embedding operation is performed according to the original DCT coefficient and the new watermark information to obtain the picture I c , i.e., the carrier object. In the process of re-embedding the watermark, a new recovery key a' can be obtained.
[0097] Step S40: uploading the carrier object and the recovery key to the target blockchain.
[0098] It should be understood that, as Figure 7 shown, after the watermark embedding is completed, the transaction information, the owner signature and the recovery key on the blockchain are updated, and the picture is sent to the new copyright party.
[0099] The embodiment obtains the transaction information and the copyright information of the object to be processed; generates a watermark to be embedded according to the transaction information and the copyright information; embeds the watermark to be embedded into the object to be processed through a target color luminance space component algorithm to obtain a carrier object and a recovery key; and uploads the carrier object and the recovery key to the target blockchain. In this way, the recovery key, the transaction information and the copyright information are added in the process of embedding the watermark, the picture transaction information is recorded and processed in real time, the real-time performance and the credibility of the original watermark information are improved, and the object to be processed can be recovered through the recovery key each time the watermark is added, thereby preventing poor visibility of the original coefficients of the watermark.
[0100] ReferenceFigure 8 , Figure 8 Figure 2 is a flowchart of a second embodiment of a blockchain-based watermark processing method according to the present application.
[0101] Based on the first embodiment described above, the blockchain-based watermark processing method according to the present application further comprises, after step S40:
[0102] Step S401: Upon receiving the watermark extraction instruction, perform gamut conversion on the carrier object to obtain an extracted luminance component.
[0103] It should be noted that the carrier picture containing the watermark is converted from the RGB domain to the YCbCr domain to obtain the extracted luminance component Y.
[0104] Step S402: Perform target transformation on the extracted luminance component to obtain extracted coefficients and group them.
[0105] It should be understood that the 2D-DCT transformation is performed on Y to obtain coefficients DY, and DY is grouped into 4*4 groups.
[0106] Step S403: Calculate each group of extracted coefficients to obtain watermark information.
[0107] In a specific implementation, the i-th watermark information w out (i):
[0108]
[0109] Step S404: Perform inverse rewriting and Arnold scrambling recovery operations on the watermark information to obtain plaintext information.
[0110] It should be noted that after all watermark extraction is completed, the watermark information obtained will be subjected to inverse rewriting and then Arnold scrambling recovery operation to obtain plaintext information containing transaction information and copyright signature. The watermark extraction process is as shown in Figure 9 .
[0111] It should be understood that the inverse rewriting is a grouping operation on the extracted watermark information with a length of 3. In a 3-bit binary number, the number of 0s and 1s is more, which is determined as the watermark before rewriting. This operation is based on the statistical characteristics and effectively improves the accuracy of watermark extraction.
[0112] Further, in order to perform copyright verification after watermark extraction, after step S404, the method further comprises: upon receiving a copyright verification instruction, determining an object identification code according to the plaintext information; obtaining the actually embedded embedded watermark information, and comparing the embedded watermark information with the plaintext information; querying historical transaction information according to the object identification code; and determining a copyright verification result according to the historical transaction information and the comparison result.
[0113] It should be understood that the copyright ownership can be verified by comparing the md5 value of the picture with the picture to be verified, but in general scenarios, the user changes the picture through cropping, editing and other operations, and it is difficult to verify it through this method. In this proposal, the copyright verification is performed by extracting the picture watermark information, which can effectively identify the picture copyright information in most scenarios, greatly improving the copyright protection capability. The main functions include watermark extraction and copyright verification.
[0114] In a specific implementation, when the similarity between the extracted watermark and the actually embedded watermark reaches 95% or more, it can be determined that the copyright of the picture belongs to the copyright party represented by the current unique identification code. In addition, the picture ID in the watermark information can be extracted to query all historical transaction information associated with the picture. Therefore, the embedded watermark information in the actual embedding is compared with the watermark related information in the plaintext information, and then the historical transaction information is combined for traceability discrimination, and finally the copyright verification result is obtained.
[0115] The embodiment converts the carrier object into a color gamut to obtain an extracted luminance component when receiving a watermark extraction instruction; performs target transformation on the extracted luminance component to obtain extracted coefficients and grouping; calculates each group of extracted coefficients to obtain watermark information; and performs inverse rewriting operation and permutation recovery operation on the watermark information to obtain plaintext information. In this way, a new picture copyright protection structure based on a block chain is realized, which includes a watermark embedding node and a copyright verification node, improves the efficiency of watermark processing and copyright verification, and realizes double guarantee of picture copyright.
[0116] In addition, the embodiment of the application also proposes a storage medium, wherein the storage medium stores a watermark processing program based on a block chain, and the watermark processing program based on the block chain is executed by a processor to realize the steps of the watermark processing method based on the block chain as described above.
[0117] Since the storage medium adopts all the technical solutions of the above-mentioned embodiments, it at least has all the beneficial effects brought by the technical solutions of the above-mentioned embodiments, which will not be repeated here.
[0118] Reference Figure 10 , Figure 10 is a structural block diagram of the first embodiment of the watermark processing device based on the block chain of the application.
[0119] As Figure 10 shown, the watermark processing device based on the block chain of the embodiment of the application comprises:
[0120] The information acquisition module 10 is configured to acquire transaction information and copyright information of a to-be-processed object.
[0121] The watermark generation module 20 is configured to generate a to-be-embedded watermark according to the transaction information and the copyright information.
[0122] The watermark embedding module 30 is configured to embed the to-be-embedded watermark into the to-be-processed object through a target color luminance space component algorithm to obtain a carrier object and a recovery key.
[0123] The object uploading module 40 is configured to upload the carrier object and the recovery key to the target blockchain.
[0124] In this embodiment, the transaction information and the copyright information of the to-be-processed object are obtained, the to-be-embedded watermark is generated according to the transaction information and the copyright information, the to-be-embedded watermark is embedded into the to-be-processed object through a target color luminance space component algorithm to obtain a carrier object and a recovery key, and the carrier object and the recovery key are uploaded to the target blockchain. In this way, the recovery key, the transaction information and the copyright information are added in the process of embedding the watermark, the picture transaction information is recorded and processed in real time, the real-time performance and the credibility of the original watermark information are improved, and the to-be-processed object can be recovered through the recovery key each time the watermark is added, so that the poor visibility of the original coefficients of the watermark is prevented.
[0125] In an embodiment, the watermark generation module 20 is further configured to determine a transaction identification code according to the transaction information and determine a copyright signature identification code according to the copyright information, generate a binary sequence according to the transaction identification code and the copyright signature identification code, and perform rewriting and scrambling operations on the binary sequence to obtain the to-be-embedded watermark.
[0126] In an embodiment, the watermark embedding module 30 is further configured to determine an inverse transform luminance component and a recovery key corresponding to the to-be-processed object according to a target color luminance space component algorithm, and obtain the carrier object according to the to-be-processed object, the inverse transform luminance component and the to-be-embedded watermark.
[0127] In an embodiment, the watermark embedding module 30 is further configured to, when the to-be-processed object is uploaded for the first time, perform domain conversion on the to-be-processed object and extract a luminance component, perform target transformation on the luminance component to obtain a transform coefficient, group the transform coefficient and modify target coefficients of each group to obtain a modified transform coefficient and a recovery key, and perform inverse transformation on the modified transform coefficient to obtain an inverse transform luminance component.
[0128] In an embodiment, the watermark embedding module 30 is further configured to, when the to-be-processed object is not a first upload, perform gamut conversion on the to-be-processed object and extract a luminance component; perform target transformation on the luminance component to obtain a transform coefficient; group the transform coefficient and modify target coefficients of each group to obtain a modified transform coefficient and a recovery key; perform coefficient recovery on the modified transform coefficient according to the recovery key to obtain a recovered transform coefficient; perform inverse transformation on the recovered transform coefficient to obtain an inverse-transformed luminance component, and generate a new recovery key.
[0129] In an embodiment, the object chaining module 40 is further configured to, when receiving a watermark extraction instruction, perform gamut conversion on the carrier object to obtain an extracted luminance component; perform target transformation on the extracted luminance component to obtain an extracted coefficient and grouping; perform calculation on each group of extracted coefficients to obtain watermark information; perform inverse rewriting operation and permutation recovery operation on the watermark information to obtain plaintext information.
[0130] In an embodiment, the object chaining module 40 is further configured to, when receiving a copyright verification instruction, determine an object identification code according to the plaintext information; obtain actually embedded embedded watermark information, and compare the embedded watermark information with the plaintext information; query historical transaction information according to the object identification code; and determine a copyright verification result according to the historical transaction information and the comparison result.
[0131] It should be understood that the above is only an example, and does not constitute any limitation on the technical solutions of the present application. In specific applications, those skilled in the art can set up according to the needs, and the present application does not limit this.
[0132] It should be noted that the above-described workflow is only illustrative and does not limit the scope of protection of the present application. In actual applications, those skilled in the art can select part or all of them to achieve the purpose of the present embodiment, and this is not limited here.
[0133] In addition, technical details not described in detail in the present embodiment can be referred to the watermark processing method based on block chain provided by any embodiment of the present application, which will not be repeated here.
[0134] Moreover, it is to be understood that the phraseology and terminology used herein is for the purpose of description and should not be regarded as limiting. The use of "including" "comprising" or "having" and variations thereof herein is intended to encompass the presence of one or more recited elements or steps and not the exclusion of any other integers or steps. The use of "including", "comprising", "having" and "with" and variations thereof herein is intended to encompass the presence of one or more recited elements or steps and not the exclusion of any other integers or steps.
[0135] The above-mentioned embodiment numbers of the present application are only for description, and do not represent the advantages or disadvantages of the embodiments.
[0136] Those skilled in the art can clearly understand the above-mentioned embodiment methods from the description of the above embodiments, which can be realized by software and necessary general hardware platforms, of course, can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as a read only memory (ROM) / RAM, a magnetic disk, an optical disk), and includes a plurality of instructions for making a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) execute the methods described in various embodiments of the present application.
[0137] The above is only the preferred embodiment of the present application, and does not limit the patent scope of the present application, and any equivalent structure or equivalent process transformation, or direct or indirect application in other related technical fields, is also included in the patent protection scope of the present application.
Claims
1. A watermark processing method based on blockchain, characterized in that: The watermark processing method based on blockchain includes: Obtain transaction information and copyright information of the object to be processed; generating a watermark to be embedded according to the transaction information and the copyright information; Embed the watermark to be embedded into the object to be processed using a target color luminance space component algorithm to obtain a carrier object and a recovery key, wherein the target color luminance space component algorithm embeds watermark information by modifying the last coefficient of each group of luminance components in the YCbCr color space after DCT transformation and 4*4 grouping, and completely recovers the DCT coefficients modified when embedding the watermark based on the embedded watermark information and the recovery key; Uploading the carrier object and the recovery key to the target blockchain; The step of embedding the watermark to be embedded into the object to be processed by using a target color brightness spatial component algorithm to obtain a carrier object and a recovery key comprises: determining an inverse transformed brightness component and a recovery key corresponding to the object to be processed according to the target color brightness spatial component algorithm; obtaining a carrier object according to the object to be processed, the inverse transformed brightness component, and the watermark to be embedded; Among them, the method of determining the inverse transformation brightness component and recovery key corresponding to the object to be processed according to the target color brightness space component algorithm includes: when the object to be processed is not uploaded for the first time, performing domain conversion on the object to be processed and extracting the brightness component; performing target transformation on the brightness component to obtain transformation coefficients; grouping the transformation coefficients and modifying the target coefficients of each group to obtain modified transformation coefficients and recovery key; performing coefficient recovery on the modified transformation coefficients according to the recovery key to obtain restored transformation coefficients; performing inverse transformation on the restored transformation coefficients to obtain inverse transformation brightness components, and generating a new recovery key.
2. The watermark processing method based on blockchain according to claim 1, characterized in that: The step of generating a watermark to be embedded according to the transaction information and the copyright information includes: Determining a transaction identification code based on the transaction information, and determining a copyright signature identification code based on the copyright information; generating a binary sequence according to the transaction identification code and the copyright signature identification code; Rewriting and scrambling operations are performed on the binary sequence to obtain a watermark to be embedded.
3. The watermark processing method based on blockchain according to claim 1, characterized in that: The step of determining the inverse transformation brightness component and the recovery key corresponding to the object to be processed according to the target color brightness space component algorithm includes: When the object to be processed is uploaded for the first time, performing domain conversion on the object to be processed and extracting a brightness component; Performing a target transformation on the luminance component to obtain a transformation coefficient; Grouping the transform coefficients and modifying target coefficients of each group to obtain modified transform coefficients and a recovery key; An inverse transform is performed on the modified transform coefficient to obtain an inverse transformed luminance component.
4. The watermark processing method based on blockchain according to claim 1, characterized in that: After uploading the carrier object and the recovery key to the target blockchain, the method further includes: Upon receiving a watermark extraction instruction, performing a color gamut conversion on the carrier object to obtain an extracted brightness component; Performing target transformation on the extracted brightness components to obtain extraction coefficients and grouping them; Calculate each group of extraction coefficients to obtain watermark information; Perform an inverse rewriting operation and a scrambling recovery operation on the watermark information to obtain plaintext information.
5. The watermark processing method based on blockchain according to claim 4, characterized in that: After performing the inverse rewriting operation and the scrambling recovery operation on the watermark information to obtain the plaintext information, the method further includes: Upon receiving the copyright verification instruction, determining the object identification code according to the plaintext information; Acquire the embedded watermark information actually embedded, and compare the embedded watermark information with the plaintext information; querying historical transaction information based on the object identification code; The copyright verification result is determined based on the historical transaction information and the comparison result.
6. A watermark processing device based on blockchain, characterized in that: The watermark processing device based on blockchain includes: An information acquisition module is used to obtain transaction information and copyright information of the object to be processed; A watermark generation module, configured to generate a watermark to be embedded based on the transaction information and the copyright information; A watermark embedding module is configured to embed the watermark to be embedded into the object to be processed using a target color luminance spatial component algorithm, thereby obtaining a carrier object and a recovery key. The target color luminance spatial component algorithm embeds the watermark information by modifying the last coefficient of each group of luminance components in the YCbCr color space after DCT transformation and 4*4 grouping, and completely recovering the DCT coefficients modified during watermark embedding based on the embedded watermark information and the recovery key. The watermark embedding module is further configured to determine the inverse transformed luminance component and the recovery key corresponding to the object to be processed according to the target color luminance spatial component algorithm; and obtain the carrier object according to the object to be processed, the inverse transformed luminance component and the watermark to be embedded; The watermark embedding module is further configured to, when the object to be processed is not uploaded for the first time, perform domain conversion on the object to be processed and extract a luminance component; perform target transformation on the luminance component to obtain transformation coefficients; group the transformation coefficients and modify the target coefficients of each group to obtain modified transformation coefficients and a recovery key; perform coefficient recovery on the modified transformation coefficients according to the recovery key to obtain restored transformation coefficients; perform inverse transformation on the restored transformation coefficients to obtain an inverse transformed luminance component, and generate a new recovery key; The object uploading module is used to upload the carrier object and the recovery key to the target blockchain.
7. A watermark processing device based on blockchain, characterized in that: The blockchain-based watermark processing device includes: a memory, a processor, and a blockchain-based watermark processing program stored on the memory and running on the processor, wherein the blockchain-based watermark processing program is configured to implement the blockchain-based watermark processing method according to any one of claims 1 to 5.
8. A storage medium, characterized in that: The storage medium stores a blockchain-based watermark processing program, which, when executed by a processor, implements the blockchain-based watermark processing method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Geometric attack resisting real-time video watermarking method
CN101489133A
Digital watermarking image generation method based on graphic code and apparatus thereof
CN105701758A
Digital cultural relic evidence storage and infringement tracing method and system based on block chain digital watermark
CN115795415A