Image copyright information processing method and device, equipment and storage medium
The image copyright information is encrypted and embedded in the wavelet coefficient matrix through smart contracts, which solves the problem that image copyright protection methods in the prior art affect visual quality or easily lead to information loss, and realizes the integrity of copyright information after image processing operation and readability improves the credibility of copyright information.
Patent Information
- Application Number
- CN202411278034.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-11
- Publication Date
- 2025-02-14
AI Technical Summary
In the prior art, in image copyright protection, the watermark method affects the visual quality of the image, while the steganography method easily leads to the loss or damage of copyright information during image processing operations, resulting in unsatisfactory protection effect.
The copyright information is encrypted through a smart contract, an encrypted vector is generated, and the encrypted vector is encrypted using a key to obtain a ciphertext matrix. The ciphertext matrix is embedded in the first wavelet coefficient matrix of the proof-keeping image, and an proof-keeping image matrix with copyright information steganated, and stored in the blockchain network.
After image compression, cropping and other operations, copyright information can still maintain integrity and readability, ensuring the credibility of copyright information, and improving the verification efficiency of copyright information credible evidence storage.
Smart Images

Figure CN119449963A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of blockchain network technology, and in particular to a method, device, equipment and storage medium for processing image copyright information. Background Art
[0002] With the rapid development of the Internet, social media, e-commerce and other fields, massive image data has been widely used in various fields of society, and the issue of image copyright protection has become increasingly severe.
[0003] In the prior art, copyright information is generally written into the image to improve the copyright protection of the image, thereby preventing others from misappropriating it at will. However, the existing image copyright information writing method usually embeds the image in the form of watermark or steganography. Although the watermark embedded in the image has a strong deterrent effect, it will affect the visual quality of the image; and the method of steganographic copyright information in the image does not affect the visual effect of the image, but when dealing with image compression, cropping, format conversion and other operations, the copyright information is easily lost or damaged, resulting in unsatisfactory copyright protection of the image. Summary of the invention
[0004] The present application provides an image copyright information processing method, apparatus, device and storage medium, which can ensure that after the compression, cropping and other operations on the evidence image are completed, the copyright information carried by the evidence image matrix stored in the blockchain network can still maintain integrity and readability, thereby ensuring the credibility of the copyright information corresponding to the evidence image.
[0005] In a first aspect, a method for processing image copyright information is provided, which is applied to a smart contract in a blockchain network, and the method comprises: In response to a request for inputting copyright information of a stored image, encrypting the copyright information to obtain an encryption vector corresponding to the copyright information; Use the key to encrypt the encryption vector to obtain the ciphertext matrix, and store the key in the blockchain network; The ciphertext matrix is embedded into the first wavelet coefficient matrix corresponding to the evidence image to obtain the evidence image matrix with hidden copyright information, and the evidence image matrix is stored in the blockchain network.
[0006] In a second aspect, an image copyright information processing device is provided, which is applied to a smart contract in a blockchain network, and the device includes: An encryption vector generation module, for responding to a request for inputting copyright information of a stored image, encrypting the copyright information to obtain an encryption vector corresponding to the copyright information; The vector encryption module is used to encrypt the encryption vector using the key to obtain the ciphertext matrix and store the key in the blockchain network; The embedding module is used to embed the ciphertext matrix into the first wavelet coefficient matrix corresponding to the evidence image, obtain the evidence image matrix with hidden copyright information, and store the evidence image matrix in the blockchain network.
[0007] In a third aspect, an image copyright information processing device is provided, comprising: a processor and a memory, the memory being used to store a computer program, the processor being used to call and run the computer program stored in the memory to execute the method in the first aspect or its various implementations.
[0008] According to a fourth aspect, a computer-readable storage medium is provided for storing a computer program, wherein the computer program enables a computer to execute the method according to the first aspect or its various implementations.
[0009] Through the technical solution provided by the present application, the copyright information is first encrypted through a smart contract to obtain an encrypted vector corresponding to the copyright information; the encrypted vector is then encrypted using a key to obtain a ciphertext matrix, and the key is stored in the blockchain network; finally, the ciphertext matrix is embedded in the first wavelet coefficient matrix corresponding to the evidence image to obtain an evidence image matrix with steganographic copyright information, and the evidence image matrix is stored in the blockchain network. The present invention can not only effectively protect the copyright information of the evidence image, but also because the evidence image matrix carrying copyright information is stored in the blockchain network instead of the evidence image, after the evidence image is compressed, cropped and other common operations are completed, the copyright information carried by the evidence image matrix stored in the blockchain network can still maintain integrity and readability, thereby ensuring the credibility of the copyright information corresponding to the evidence image, and thereby improving the verification efficiency of the credible evidence of the copyright information of the evidence image.
[0010] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0012] Figure 1 A flowchart of a method for processing image copyright information provided by an embodiment of the present application; Figure 2 A flowchart of another method for processing image copyright information provided by an embodiment of the present application; Figure 3 A schematic diagram of an image copyright information processing device provided in an embodiment of the present application; Figure 4 It is a schematic block diagram of an image copyright information processing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0013] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0014] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0015] As mentioned above, the importance of image copyright is closely related to the development of the digital economy. With the continuous advancement of digital technology, the application of images in the fields of the Internet, social media, e-commerce, etc. has become increasingly popular, becoming an indispensable and important part of the digital economy. However, the widespread use of images has also brought about problems such as piracy and infringement, which seriously threatens the legitimate rights and interests of creators and their creative enthusiasm, and hinders the healthy development of the digital economy.
[0016] Although existing methods for writing copyright information into images include watermarking technology and steganography, watermarking technology embeds copyright information into images in the form of visible watermarks or invisible watermarks. Although visible watermarks have a strong deterrent effect, they will affect the visual quality of the image; and although invisible watermarks do not affect the visual effect, they are easily destroyed by image processing operations; and although steganography achieves information hiding by embedding invisible information in image data, information is easily lost or damaged when dealing with operations such as image compression, cropping, and format conversion, resulting in unsatisfactory copyright protection effects. At the same time, due to the limited storage capacity of images, the hidden information written by steganography is also difficult to preserve.
[0017] In order to solve the above technical problems, the inventive concept of the present application is: the smart contract responds to the request for inputting copyright information of the evidence image, encrypts the copyright information, and obtains the encrypted vector corresponding to the copyright information; the smart contract encrypts the encrypted vector with the key to obtain the ciphertext matrix, and stores the key in the blockchain network; the smart contract embeds the ciphertext matrix into the first wavelet coefficient matrix corresponding to the evidence image, obtains the evidence image matrix with the copyright information hidden, and stores the evidence image matrix in the blockchain network. The present application can not only realize the effective protection of the copyright information of the evidence image, but also because the evidence image matrix carrying the copyright information is stored in the blockchain network instead of the evidence image, after the common operations such as compression and cropping of the evidence image are completed, the copyright information in the evidence image matrix can still maintain integrity and readability, so as to ensure the credibility of the copyright information corresponding to the evidence image, and improve the verification efficiency of the credible evidence of the copyright information of the evidence image.
[0018] To this end, an embodiment of the present disclosure provides an image copyright information processing method, which is applied to a smart contract in a blockchain network, wherein the smart contract is deployed in a node in the blockchain network. Figure 1 is a flowchart of a method for processing image copyright information shown in an exemplary embodiment of the present disclosure, referring to Figure 1 , the method comprising: S101. In response to a request for inputting copyright information of a stored image, encrypt the copyright information to obtain an encryption vector corresponding to the copyright information.
[0019] Here, the stored image may be a genuine image to be stored; the copyright information may include the creator information and creation time information of the stored image.
[0020] In this step, after the user inputs the evidence image and copyright information into any node in the blockchain network, a request for inputting the copyright information of the evidence image can be generated in the node, so that the smart contract deployed in the node responds to the request for inputting the copyright information of the evidence image and completes the encryption processing of the copyright information, so that the obtained encryption vector has stronger information security, thereby reducing the risk of the ciphertext matrix obtained based on the encryption vector being identified or tampered with in subsequent steps.
[0021] S102. Encrypt the encryption vector using the key to obtain a ciphertext matrix, and store the key in the blockchain network.
[0022] Smart contracts use keys to encrypt encryption vectors, which can prevent the elements in the encryption vector from being identified and causing copyright information to be tampered with, thereby making copyright information more secure during data transmission and improving the security of data in the blockchain network.
[0023] Here, after the smart contract encrypts the encryption vector with the key, the key is stored in the user's private space in the blockchain network so that the user can extract the key from the user's private space when performing copyright verification on the image to be verified.
[0024] S103, embed the ciphertext matrix into the first wavelet coefficient matrix corresponding to the evidence image, obtain the evidence image matrix with hidden copyright information, and store the evidence image matrix in the blockchain network.
[0025] Here, the smart contract is embedded into the first wavelet coefficient matrix corresponding to the evidence image through the ciphertext matrix, so that even under common operations such as compression and cropping, the copyright information carried by the ciphertext matrix embedded in the first wavelet coefficient matrix can still maintain integrity and readability.
[0026] Among them, the wavelet coefficient matrix generated after the image is transformed by wavelet can not only fully reflect the content information of the original image, but also can judge whether the content information corresponding to each wavelet coefficient is important through the size of the wavelet coefficients in the wavelet coefficient matrix. For example: when the wavelet coefficient A is large, the content information in the image reflected by the wavelet coefficient A is less, that is, the content information corresponding to the wavelet coefficient A is not important. Therefore, the image position corresponding to the wavelet coefficient A is suitable as a carrier for embedding copyright information; therefore, in this step, by embedding the ciphertext matrix into the first wavelet coefficient matrix corresponding to the stored image, it is convenient to embed the ciphertext matrix into the position of the stored image suitable for embedding copyright information, so that the copyright information carried in the final stored image matrix does not affect the visual effect of the stored image.
[0027] In this step, the copyright information of the evidence image can be encrypted to form an evidence image matrix that is mapped and encrypted with the evidence image without significantly increasing the data burden of the evidence image, and the evidence image matrix is stored in the blockchain network. This can not only prevent the copyright information of the evidence image from being identified or tampered with, but also does not affect the visual quality and use effect of the evidence image because the evidence image matrix carrying the copyright information is stored in the blockchain network instead of the evidence image.
[0028] The above method can not only effectively protect the copyright information of the evidence image, but also because the evidence image matrix carrying the copyright information is stored in the blockchain network instead of the evidence image, after the evidence image is compressed, cropped and other common operations are completed, the copyright information in the evidence image matrix can still maintain integrity and readability, so as to ensure the credibility of the copyright information corresponding to the evidence image and improve the verification efficiency of the credible evidence of the copyright information of the evidence image.
[0029] In some possible embodiments, embedding the ciphertext matrix into the first wavelet coefficient matrix corresponding to the evidence image to obtain the evidence image matrix with the copyright information hidden may include the following steps: S201, performing wavelet transform calculation on the stored image to obtain a first wavelet coefficient matrix.
[0030] Here, the smart contract processes the evidence image through wavelet transform calculation, which can separate the high-frequency coefficient information and low-frequency coefficient information of the evidence image, realize multi-layer decomposition of the evidence image, and then facilitate the determination of the area suitable for embedding copyright information through the first wavelet coefficient matrix corresponding to the evidence image.
[0031] S202: Determine an embedding submatrix suitable for embedding the ciphertext matrix in the first wavelet coefficient matrix.
[0032] Since the first wavelet coefficient matrix corresponding to the stored image can also be divided into multiple sub-matrices according to the high-frequency coefficient information and low-frequency coefficient information of the stored image, and since each wavelet coefficient in the wavelet coefficient matrix can reflect whether the content information in the image is important, it is possible to determine whether the content information at the position corresponding to the stored image and each sub-matrix is important by judging the wavelet coefficients in each sub-matrix respectively; if the judgment result is that the content information at the position corresponding to the stored image and each sub-matrix is not important, then the sub-matrix is determined as an embedded sub-matrix suitable for embedding the ciphertext matrix.
[0033] S203, embed the ciphertext matrix into the embedding sub-matrix to obtain the evidence image matrix.
[0034] Here, the number of rows and the number of columns of the embedding submatrix are not less than the number of rows and the number of columns of the ciphertext matrix, so that the ciphertext matrix can be completely embedded in the embedding submatrix.
[0035] By adopting the above method, it is possible to embed the ciphertext matrix into the first wavelet coefficient matrix corresponding to the stored image without affecting the content information in the stored image, so that the copyright information embedded in the stored image matrix can still remain complete and readable under common operations such as compression and cropping of the stored image, while improving the robustness of copyright information against attacks such as cropping and compression, thereby solving the problems of copyright protection and infringement certification during the dissemination and use of stored images to a certain extent.
[0036] Furthermore, determining an embedding submatrix suitable for embedding the ciphertext matrix in the first wavelet coefficient matrix may include the following steps: S301 : Compare each wavelet coefficient in the first wavelet coefficient matrix and the sub-coefficient corresponding to each wavelet coefficient with a preset judgment threshold to determine whether each wavelet coefficient is a zero tree root.
[0037] Here, the preset judgment threshold may be set according to the actual application scenario, for example, may be set to 0.
[0038] Taking the wavelet coefficient A in the first wavelet coefficient matrix as an example, when judging whether the wavelet coefficient A is a zero tree root, the value corresponding to the wavelet coefficient A is compared with the preset judgment threshold 0. If the value corresponding to the wavelet coefficient A is 0, the values corresponding to each sub-coefficient of the wavelet coefficient A are respectively compared with the preset judgment threshold 0. If the values corresponding to each sub-coefficient of the wavelet coefficient A are all 0, the wavelet coefficient A is regarded as a zero tree root.
[0039] S302: Use the wavelet coefficient corresponding to the zero tree root as the target zero tree root, and determine the target zero tree of the target zero tree root in the first wavelet coefficient matrix.
[0040] Here, there may be multiple target zero trees in the first wavelet coefficient matrix, so as to determine multiple embedding sub-matrices in the subsequent step S303, and then embed multiple ciphertext matrices into the first wavelet coefficient matrix.
[0041] S303, determining the submatrix of the target zero tree in the first wavelet coefficient matrix as an embedded submatrix. Since in the first wavelet coefficient matrix, the elements in the target zero tree can be considered as unimportant elements, and the elements in the target zero tree are positions corresponding to unimportant content information of the stored image, therefore, the submatrix of the target zero tree in the first wavelet coefficient matrix is determined as the embedded submatrix of the embedded ciphertext matrix.
[0042] By adopting the above method, the submatrix of the target zero tree in the first wavelet coefficient matrix can be determined as an embedding submatrix suitable for embedding the ciphertext matrix, and the ciphertext matrix can be embedded into the first wavelet coefficient matrix corresponding to the stored image without affecting the content information in the stored image.
[0043] In some possible embodiments, in response to a request for inputting copyright information of a stored image, encrypting the copyright information and generating an encryption vector corresponding to the copyright information may include the following steps: S401. Obtain copyright information and encryption parameter vector sent by the client.
[0044] Here, users can send copyright information to any node on the blockchain network through the client.
[0045] It should be noted that each element in the encryption parameter vector is a positive integer and is mutually prime. For example, the encryption parameter vector for , then the encryption parameter vector Elements in are all positive integers and are mutually prime.
[0046] S402: Perform steganographic processing on the copyright information using a preset steganographic method to generate steganographic information corresponding to the copyright information.
[0047] In this step, the smart contract uses a preset steganographic method to perform steganographic processing on the copyright information to generate steganographic information corresponding to the copyright information, which may include: the smart contract amplifies the copyright information by a preset multiple, and then adds random noise to the amplified copyright information to obtain the amplified and random-noised steganographic information; the steganographic information can be calculated by the following formula: ; in, To steganographic information, For copyright information, is the preset multiple, is random number noise.
[0048] Here, the smart contract can improve the information security of copyright information by using a preset steganographic method to steganographically process the copyright information, effectively prevent the identification and tampering of copyright information, and provide security for the copyright information processing in subsequent steps.
[0049] S403: encrypt the stego information using the encryption parameter vector to obtain an encryption vector corresponding to the copyright information.
[0050] It should be noted that the encryption parameter vector here can be set by a smart contract, and the smart contract can also send the encryption parameter vector to the client, so that in the process of encrypting the copyright information, the user can use the encryption parameter vector through the client to encrypt and calculate the steganographic information.
[0051] It is understandable that the encryption vector It can be seen as composed of elements The vector composed of the encrypted vector Each element in can be used to encrypt and calculate the steganographic information through the following formula: ; in, is the first elements, To steganographic information, is the first elements.
[0052] The above method can improve the information security of copyright information, making the ciphertext matrix generated by the encryption vector obtained by the above method impossible to be identified and tampered with, thereby improving the security and credibility of the final evidence image matrix.
[0053] Furthermore, encrypting the encryption vector using the key to obtain a ciphertext matrix may include the following steps: S501. Construct an initial confusion matrix based on randomly generated data.
[0054] Here, the initial confusion matrix is a matrix with N rows and N columns, where N is the number of elements in the encrypted vector.
[0055] In this step, by constructing an initial confusion matrix based on randomly generated data, the randomness of the initial confusion matrix can be increased, so that the encrypted confusion matrix obtained based on the initial confusion matrix in the subsequent steps has better encryption security.
[0056] S502: Performing steganographic processing on each element in the initial confusion matrix based on a preset steganographic method to obtain a steganographic confusion matrix.
[0057] S503: Utilize the encryption parameter vector to perform encryption calculation on each element in the steganalysis confusion matrix to obtain an encrypted confusion matrix.
[0058] Here, the smart contract uses the preset steganography method used in step S402 to perform steganography on each element in the initial confusion matrix. After obtaining the steganographic confusion matrix after the steganographic processing of each element, the smart contract then uses the encryption parameter vector in step S403 to encrypt each element in the steganographic confusion matrix, so that the values of each element in the encrypted confusion matrix finally obtained are close to those of the elements in the encrypted vector, thereby improving the concealment of each element in the encrypted vector in the subsequent steps in the ciphertext matrix, so as to prevent the elements in the ciphertext matrix corresponding to the encrypted vector from being identified or tampered with.
[0059] Take the initial confusion matrix As an example, this initial confusion matrix It can be regarded as the vectors The matrix formed by The elements in the corresponding vectors are randomly generated; the formula used to process each element in the initial confusion matrix using the preset steganographic method in step S402 and the encryption parameter vector in step S403 is: ,in, is the first Line The elements corresponding to the columns, is the initial confusion matrix The Elements in a column vector, is the first elements.
[0060] S504: Using the key to perform obfuscation encryption on the encrypted vector based on the encryption confusion matrix to obtain a ciphertext matrix corresponding to the encrypted vector.
[0061] Here, the key may include the rules for covering each element in the encrypted vector to each specified element position in the encrypted confusion matrix; For example, here Cover the position information of each specified element in the encrypted confusion matrix for each element in the encrypted vector, such as When the value of is 5, the first element in the encrypted vector is overwritten to the element position of the first row and fifth column in the encrypted confusion matrix; When the value of is 7, the second element in the encrypted vector is overwritten to the element position of the 2nd row and 7th column in the encrypted confusion matrix.
[0062] By adopting the above method, deep obfuscation encryption of the encryption vector based on the encryption confusion matrix can be realized, thereby achieving the purpose of increasing the encryption concealment and realizing the technical effect of improving the encryption security of the encryption vector, thereby avoiding the problem of copyright information in the ciphertext matrix being identified, as well as targeted removal or tampering.
[0063] In some possible implementations, see Figure 2 , the image copyright information processing method further includes: S601. In response to a copyright information verification request of an image to be verified, determine a second wavelet coefficient matrix of the image to be verified, and obtain a stored image matrix of any stored image in a blockchain network.
[0064] Here, the image to be verified may be an image to be verified as authentic.
[0065] Since the evidence image matrix with hidden copyright information obtained in step S103 is stored on the chain, the evidence image is stored in any node in the blockchain network. Therefore, after the smart contract responds to the copyright information verification request of the image to be verified, the evidence image matrix of the evidence image can be obtained from any node in the blockchain network.
[0066] In this step, after the user inputs the image to be verified into any node in the blockchain network, a request for copyright information verification of the image to be verified can be generated in the node, so that the smart contract deployed in the node responds to the request for copyright information verification of the image to be verified, completes the second wavelet transform calculation of the image to be verified, and obtains the second wavelet coefficient matrix of the image to be verified.
[0067] S602: Determine whether the image to be verified infringes the copyright of the stored image based on the XOR calculation result of the second wavelet coefficient matrix and the stored image matrix.
[0068] It should be noted that, since there may be multiple evidence image matrices stored in the blockchain network, before the XOR calculation result based on the second wavelet coefficient matrix and the evidence image matrix, it may also include: comparing the image to be verified with the content information in each evidence image respectively to determine the evidence image with the same content information as the image to be verified, and performing XOR calculation on the evidence image matrix corresponding to the evidence image and the second wavelet coefficient matrix.
[0069] Although the content information in the image to be verified is consistent with that in the evidence image, if the image to be verified is a pirated image, after the XOR calculation of the second wavelet coefficient matrix of the image to be verified and the evidence image matrix, the XOR operation result is a matrix whose elements are all 0. Therefore, here, according to the XOR calculation result of the second wavelet coefficient matrix and the evidence image matrix, it can be determined whether the image to be verified infringes the copyright of the evidence image; specifically: if the XOR operation result is a matrix whose elements are all 0, then the image to be verified infringes the copyright of the evidence image; if the XOR operation result is a matrix whose elements are not all 0, then the image to be verified does not infringe the copyright of the evidence image.
[0070] S603: If it is determined that the image to be verified does not infringe the copyright of the stored image, the ciphertext matrix to be verified is obtained according to the XOR calculation result.
[0071] The ciphertext matrix to be verified contains the copyright information of the image to be verified.
[0072] S604: Use the key extracted from the blockchain network to decrypt the ciphertext matrix to be verified, and obtain the vector to be verified corresponding to the image to be verified.
[0073] In this step, the smart contract uses a key extracted from the user's private space in the blockchain network. The key may carry encryption processing rules corresponding to the copyright information of the stored image. Therefore, when decrypting the ciphertext matrix to be verified, the ciphertext to be verified may be decrypted according to the encryption processing rules carried by the key to obtain the vector to be verified corresponding to the image to be verified. For example, if the copyright information of the stored image is encrypted by the encryption parameter vector B in step S101, the vector to be verified D corresponding to the image to be verified is obtained according to the calculation between the encryption parameter vector B and the ciphertext matrix to be verified, wherein the formula used to calculate each element in the vector D to be verified using the encryption parameter vector B and the ciphertext matrix to be verified is: ; is the first elements, is the first vectors, is the first elements.
[0074] Wherein, each element in the vector to be verified is obtained after encryption processing of the copyright information of the image to be verified.
[0075] S605: Determine copyright information corresponding to the image to be verified based on the vector to be verified.
[0076] Since each element in the vector to be verified is obtained by encrypting the copyright information of the image to be verified, the copyright information corresponding to the image to be verified can be obtained by performing decryption calculation on the vector to be verified.
[0077] By adopting the above method, it is possible to determine whether the image to be verified infringes the copyright of the stored image based on the XOR calculation result of the second wavelet coefficient matrix of the image to be verified on the blockchain network and the matrix of the stored image through a smart contract, and after determining that the image to be verified does not infringe the copyright of the stored image, determine the copyright information corresponding to the image to be verified in the blockchain network, thereby realizing the infringement verification of the image to be verified on the blockchain network. In addition, the copyright information of the image to be verified obtained by the above method is complete and accurate, and the verification of the copyright information of the image to be verified can be completed without affecting the visual quality of the image to be verified, which provides a powerful means for protecting the copyright information of the stored image.
[0078] Furthermore, determining the copyright information corresponding to the image to be verified based on the vector to be verified may include the following steps: S701. Obtain an encryption parameter vector sent by a client.
[0079] It should be noted that the encryption parameter vector here is the same as the encryption parameter vector in step S401. Therefore, after the encryption parameter vector here is generated by the smart contract, the smart contract can send the encryption parameter vector to the client for storage, so that the user can send the encryption parameter vector to the smart contract through the client when performing copyright verification on the image to be verified.
[0080] S702: Calculate copyright information corresponding to the image to be verified based on the vector to be verified and the encryption parameter vector.
[0081] Here, when calculating the copyright information corresponding to the image to be verified based on the vector to be verified and the encryption parameter vector, the following steps may be included: S7021. Perform a first operation on the verification vector and the encryption parameter vector using the following calculation formula to obtain an intermediate calculation result: ; ; in, and These are all intermediate calculation results. is the first elements, is the first elements.
[0082] S7022, decrypt the intermediate operation result of the verification vector and the encryption parameter vector using the following calculation formula to determine the steganographic copyright information corresponding to the image to be verified: ; in, is the steganographic copyright information corresponding to the image to be verified, for The multiplicative inverse of .
[0083] S7023. Decrypt the steganographic copyright information corresponding to the image to be verified to obtain the copyright information corresponding to the image to be verified.
[0084] Here, the steganographic method used when the copyright information of the image to be verified is steganographically the same as the preset steganographic method in step S402. Therefore, when the steganographic copyright information corresponding to the image to be verified is steganographically decrypted, the decryption formula used is: ; is the copyright information corresponding to the image to be verified, is the steganographic copyright information corresponding to the image to be verified, is the preset multiple, is random number noise.
[0085] By adopting the above method, the vector to be verified can be calculated based on the encrypted parameter vector sent by the client to ensure that only the user who owns the encrypted parameter vector can determine the copyright information of the image to be verified, thereby limiting the user's authority to obtain the copyright information of the image to be verified.
[0086] Figure 3 FIG. 8 is a schematic diagram of an image copyright information processing device 800 according to an embodiment of the present invention. Figure 3 As shown, the device is applied to a smart contract in a blockchain network, and the device 800 includes: The encryption vector generation module 801 is used to respond to a request for inputting copyright information of a stored image, encrypt the copyright information, and obtain an encryption vector corresponding to the copyright information; The vector encryption module 802 is used to encrypt the encryption vector using the key to obtain a ciphertext matrix, and store the key in the blockchain network; The embedding module 803 is used to embed the ciphertext matrix into the first wavelet coefficient matrix corresponding to the evidence image, obtain the evidence image matrix with hidden copyright information, and store the evidence image matrix in the blockchain network.
[0087] In some implementations, the embedding module 803 includes: A first wavelet transform calculation unit, used for performing wavelet transform calculation on the stored image to obtain a first wavelet coefficient matrix; An embedding submatrix determination unit, used to determine an embedding submatrix suitable for embedding the ciphertext matrix in the first wavelet coefficient matrix; The ciphertext matrix embedding unit is used to embed the ciphertext matrix into the embedding sub-matrix to obtain the evidence image matrix.
[0088] In some implementations, the embedded sub-matrix determining unit includes: A zero tree root determination subunit, used to compare each wavelet coefficient in the first wavelet coefficient matrix and the sub-coefficient corresponding to each wavelet coefficient with a preset determination threshold value to determine whether each wavelet coefficient is a zero tree root; A target zerotree determination subunit is used to use the wavelet coefficient corresponding to the zerotree root as the target zerotree root, and determine the target zerotree with the target zerotree root in the first wavelet coefficient matrix; The embedded submatrix determination subunit is used to determine the submatrix of the target zero tree in the first wavelet coefficient matrix as the embedded submatrix.
[0089] In some implementations, the encryption vector generation module 801 includes: A first acquisition unit, used to acquire copyright information and an encryption parameter vector sent by a client; A stego information generating unit, used to perform stego processing on the copyright information using a preset stego method, and generate stego information corresponding to the copyright information; The encryption vector determination unit is used to perform encryption calculation on the stego information using the encryption parameter vector to obtain the encryption vector corresponding to the copyright information.
[0090] In some implementations, the vector encryption module 802 includes: An initial confusion matrix construction unit, used to construct an initial confusion matrix based on randomly generated data; the initial confusion matrix is a matrix with N rows and N columns, where N is the number of elements in the encrypted vector; A confusion matrix steganographic unit, used for performing steganographic processing on each element in the initial confusion matrix based on a preset steganographic method to obtain a steganographic confusion matrix; A confusion matrix encryption unit is used to perform encryption calculation on each element in the steganalysis confusion matrix using the encryption parameter vector to obtain an encrypted confusion matrix; The ciphertext matrix generating unit is used to encrypt the encrypted vector by using a key based on the encryption confusion matrix to obtain the ciphertext matrix corresponding to the encrypted vector.
[0091] In some possible implementations, the apparatus 800 further includes: A matrix determination module, configured to determine a second wavelet coefficient matrix of the image to be verified in response to a copyright information verification request of the image to be verified, and to obtain a stored image matrix of any stored image in the blockchain network; The infringement judgment module is used to determine whether the image to be verified infringes the copyright of the evidence image based on the XOR calculation result of the second wavelet coefficient matrix and the evidence image matrix; A ciphertext matrix generation module to be verified is used to obtain the ciphertext matrix to be verified according to the XOR calculation result if it is determined that the image to be verified does not infringe the copyright of the evidence image; A decryption module is used to decrypt the ciphertext matrix to be verified using a key extracted from the blockchain network to obtain a vector to be verified corresponding to the image to be verified; The copyright information determination module is used to determine the copyright information corresponding to the image to be verified based on the vector to be verified.
[0092] In some possible implementations, the copyright information determination module includes: A second acquisition unit, used to acquire the encryption parameter vector sent by the client; The copyright information determination unit is used to calculate the copyright information corresponding to the image to be verified based on the vector to be verified and the encryption parameter vector.
[0093] It should be understood that the embodiment of the image copyright information processing device and the embodiment of the image copyright information processing method may correspond to each other, and similar descriptions may refer to the embodiment of the image copyright information processing method. To avoid repetition, they will not be described here. Specifically, Figure 3 The device 800 shown can execute the above-mentioned image copyright information processing method embodiment, and the above-mentioned and other operations and / or functions of each module in the device 800 are respectively for realizing the corresponding processes in the above-mentioned image copyright information processing method, which will not be repeated here for the sake of brevity.
[0094] In the above text, the device 800 of the embodiment of the present invention is described from the perspective of functional modules in conjunction with the accompanying drawings. It should be understood that the functional module can be implemented in the form of hardware, can be implemented by instructions in the form of software, and can also be implemented by a combination of hardware and software modules. Specifically, the steps of the image copyright information processing method and the detection method embodiment in the embodiment of the present invention can be completed by the hardware integrated logic circuit and / or software instructions in the processor, and the steps of the image copyright information processing method and the detection method disclosed in the embodiment of the present invention can be directly embodied as a hardware decoding processor to execute, or a combination of hardware and software modules in the decoding processor to execute. Optionally, the software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps in the above-mentioned image copyright information processing method and the detection method embodiment in conjunction with its hardware.
[0095] Figure 4 It is a schematic block diagram of an image copyright information processing device 900 according to an embodiment of the present invention.
[0096] like Figure 4 As shown, the image copyright information processing device 900 may include: The memory 910 and the processor 920, the memory 910 is used to store the computer program and transmit the program code to the processor 920. In other words, the processor 920 can call and run the computer program from the memory 910 to implement the method in the embodiment of the present invention.
[0097] For example, the processor 920 may be configured to execute the above method embodiments according to instructions in the computer program.
[0098] In some embodiments of the present invention, the image copyright information processing device 900 may include but is not limited to: General-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0099] In some embodiments of the present invention, the memory 910 includes but is not limited to: Volatile memory and / or non-volatile memory. Among them, the non-volatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM) or flash memory. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct memory bus random access memory (Direct Rambus RAM, DR RAM).
[0100] In some embodiments of the present invention, the computer program may be divided into one or more modules, which are stored in the memory 910 and executed by the processor 920 to complete the method provided by the present invention. The one or more modules may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the controller.
[0101] like Figure 4 As shown, the image copyright information processing device 900 may also include: The transceiver 930 may be connected to the processor 920 or the memory 910 .
[0102] The processor 920 may control the transceiver 930 to communicate with other devices, specifically, to send information or data to other devices, or to receive information or data sent by other devices. The transceiver 930 may include a transmitter and a receiver. The transceiver 930 may further include an antenna, and the number of antennas may be one or more.
[0103] It should be understood that the various components in the image copyright information processing device are connected via a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus and a status signal bus.
[0104] The present invention also provides a computer storage medium having a computer program stored thereon, which, when executed by a computer, enables the computer to perform the method of the above method embodiment. In other words, an embodiment of the present invention also provides a computer program product containing instructions, which, when executed by a computer, enables the computer to perform the method of the above method embodiment.
[0105] When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (Digital Subscriber Line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integration. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (Digital Video Disc, DVD)), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.
[0106] Those skilled in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0107] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the module is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0108] The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. For example, each functional module in each embodiment of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0109] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in this application, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method for processing image copyright information, characterized in that: Applied to a smart contract in a blockchain network, the method comprises: In response to a request for inputting copyright information of a stored image, encrypting the copyright information to obtain an encryption vector corresponding to the copyright information; Encrypting the encryption vector using a key to obtain a ciphertext matrix, and storing the key in a blockchain network; The ciphertext matrix is embedded into the first wavelet coefficient matrix corresponding to the evidence image to obtain an evidence image matrix that steganographically records the copyright information, and the evidence image matrix is stored in the blockchain network.
2. The method according to claim 1, characterized in that The step of embedding the ciphertext matrix into the first wavelet coefficient matrix corresponding to the stored image to obtain a stored image matrix containing the copyright information steganographically includes: Performing wavelet transform calculation on the stored evidence image to obtain a first wavelet coefficient matrix; Determining an embedding submatrix suitable for embedding the ciphertext matrix in the first wavelet coefficient matrix; The ciphertext matrix is embedded in the embedding sub-matrix to obtain the evidence image matrix.
3. The method according to claim 2, characterized in that The step of determining an embedding submatrix suitable for embedding the ciphertext matrix in the first wavelet coefficient matrix comprises: Comparing each wavelet coefficient in the first wavelet coefficient matrix and the sub-coefficient corresponding to each wavelet coefficient with a preset judgment threshold, to judge whether each wavelet coefficient is a zero tree root; Taking the wavelet coefficient corresponding to the zerotree root as the target zerotree root, and determining the target zerotree of the target zerotree root in the first wavelet coefficient matrix; A submatrix of the target zero tree in the first wavelet coefficient matrix is determined as the embedded submatrix.
4. The method according to claim 1, characterized in that: In response to the request for inputting copyright information of the stored image, encrypting the copyright information to generate an encryption vector corresponding to the copyright information includes: Obtain the copyright information and encryption parameter vector sent by the client; Performing steganographic processing on the copyright information using a preset steganographic method to generate steganographic information corresponding to the copyright information; The steganographic information is encrypted and calculated using the encryption parameter vector to obtain an encryption vector corresponding to the copyright information.
5. The method according to claim 4, characterized in that The step of encrypting the encryption vector using a key to obtain a ciphertext matrix includes: Based on the randomly generated data, construct an initial confusion matrix; the initial confusion matrix is a matrix with N rows and N columns, where N is the number of elements in the encrypted vector; Performing steganographic processing on each element in the initial confusion matrix based on the preset steganographic method to obtain a steganographic confusion matrix; Using the encryption parameter vector to perform encryption calculation on each element in the steganalysis confusion matrix to obtain an encrypted confusion matrix; The encryption vector is obfuscated and encrypted using the key based on the encryption confusion matrix to obtain a ciphertext matrix corresponding to the encryption vector.
6. The method according to claim 1, characterized in that The method further comprises: In response to a copyright information verification request of an image to be verified, determining a second wavelet coefficient matrix of the image to be verified, and obtaining a stored image matrix of any stored image in the blockchain network; Determining whether the image to be verified infringes the copyright of the stored image according to an XOR calculation result of the second wavelet coefficient matrix and the stored image matrix; If it is determined that the image to be verified does not infringe the copyright of the stored image, then the ciphertext matrix to be verified is obtained according to the XOR calculation result; Decrypt the ciphertext matrix to be verified using the key extracted from the blockchain network to obtain the vector to be verified corresponding to the image to be verified; The copyright information corresponding to the image to be verified is determined based on the vector to be verified.
7. The method according to claim 6, characterized in that The determining the copyright information corresponding to the image to be verified based on the vector to be verified includes: Get the encryption parameter vector sent by the client; The copyright information corresponding to the image to be verified is calculated based on the vector to be verified and the encryption parameter vector.
8. An image copyright information processing device, characterized in that: Applied to a smart contract in a blockchain network, the device comprises: An encryption vector generation module, configured to respond to a request for inputting copyright information of a stored image, encrypt the copyright information, and obtain an encryption vector corresponding to the copyright information; A vector encryption module, used to encrypt the encryption vector using a key to obtain a ciphertext matrix, and store the key in the blockchain network; The embedding module is used to embed the ciphertext matrix into the first wavelet coefficient matrix corresponding to the evidence image, obtain the evidence image matrix with the copyright information hidden, and store the evidence image matrix in the blockchain network.
9. An image copyright information processing device, characterized in that: include: A processor and a memory, the memory being used to store a computer program, and the processor being used to call and run the computer program stored in the memory to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein the computer program enables a computer to execute the method according to any one of claims 1 to 7.