Block chain-based power grid digital image copyright protection method, system and device, and storage medium
By embedding copyright identifiers into power grid images through discrete cosine transform and singular value decomposition, and combining hash value comparison and frequency domain feature similarity, the problems of high ownership confirmation costs, difficulty in tracing infringement, and low transaction transparency in power grid image copyright protection are solved, achieving efficient copyright protection and transparent transactions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGXI POWER GRID CORP
- Filing Date
- 2025-12-17
- Publication Date
- 2026-05-01
AI Technical Summary
The existing copyright protection of power grid images faces problems such as high costs of establishing rights, difficulty in tracing infringements, and low transparency in transactions.
By performing discrete cosine transform and singular value decomposition on power grid images, copyright identifiers are embedded in intermediate frequency coefficients, generating hash values and writing them into the consortium blockchain smart contract. Infringement detection is then performed by combining hash value comparison and frequency domain feature similarity, thereby achieving automation and transparency in copyright transactions.
This technology enables the inclusion of verifiable copyright information in power grid images during the transfer process, reducing the cost of rights confirmation, improving the efficiency and accuracy of infringement detection, and avoiding rights disputes.
Smart Images

Figure CN121959522A_ABST
Abstract
Description
A blockchain-based method, system, device, and storage medium for protecting digital image copyrights of power grids. Technical Field
[0001] This invention relates to the field of blockchain digital copyright protection technology, and in particular to a blockchain-based method, system, device, and storage medium for protecting the copyright of digital images of power grids. Background Technology
[0002] The digital transformation of the power industry has generated a large number of commercially valuable and technically confidential digital image assets, including on-site images of power grid equipment, substation layout diagrams, transmission line routing diagrams, and single-line diagrams of the power system. These power grid images contain technical information on critical infrastructure, involving power grid topology, equipment parameters, and operational data.
[0003] Traditional power grid image management relies primarily on centralized document management systems, which suffer from high costs for copyright confirmation and difficulties in proving ownership. Furthermore, existing power grid companies frequently encounter image copyright disputes during technical data sharing and collaborative development, lacking effective means of confirming and preserving ownership. Existing digital rights management technologies are mainly designed for internet content protection and are insufficiently adapted to the specialized needs of the power industry. Digital watermarking technology, relying solely on watermark protection, is easily attacked and compromised. Access control technologies have limited protection capabilities against internal leaks and external system attacks. Centralized copyright registration systems face risks of data tampering and opaque transfer, and difficulties in allocating rights among multiple parties and tracing historical facts during copyright transactions.
[0004] Blockchain technology, with its decentralized, immutable, and traceable characteristics, offers new ideas for the protection of power grid image copyrights. However, existing blockchain copyright protection solutions lack customized designs for the power industry and have issues in terms of technical solution completeness, application scenario applicability, and compatibility with enterprise information systems. Power grid image copyright protection needs to combine digital watermarking technology to embed copyright identifiers, use hash algorithms to generate unique feature fingerprints, and use smart contracts to automate rights confirmation and transactions to build a protection system.
[0005] Existing technologies cannot simultaneously solve the problems of copyright confirmation, infringement detection, and rights trading for power grid images; the copyright confirmation process lacks reliable timestamps and tamper-proof evidence, infringement detection relies on manual comparison which is inefficient and inaccurate, and the lack of transparency in the copyright trading process leads to disputes over the distribution of rights. Summary of the Invention
[0006] In view of the problems existing in the prior art, the present invention is proposed.
[0007] Therefore, the problem that this invention aims to solve is how to address the issues of high cost of establishing copyright, difficulty in tracing infringement, and low transparency in the existing protection of power grid images.
[0008] To address the aforementioned technical problems, the present invention provides the following technical solution: Firstly, embodiments of the present invention provide a blockchain-based method for protecting the copyright of digital images of power grids. This method includes: acquiring images of power grid equipment, power system drawings, or power grid topology diagrams, and performing format verification; performing discrete cosine transform and singular value decomposition on the power grid image; embedding the copyright identifier into the transformed coefficient matrix to generate a power grid image containing the copyright identifier; calculating the hash value of the power grid image; extracting the copyright owner's public key address and timestamp to form copyright metadata; writing the copyright metadata into a smart contract on a consortium blockchain to generate a copyright notarization record; extracting the hash value of the power grid image to be detected and comparing it with the copyright metadata in the consortium blockchain to filter similar images; calculating the frequency domain feature similarity between the power grid image to be detected and similar images; when the similarity reaches a threshold, extracting the copyright identifier from the image to be detected; comparing the consistency of the copyright identifier to determine infringement and generate evidence; receiving a copyright transaction request; verifying the digital signature of the transacting party; querying the consortium blockchain to confirm copyright ownership; executing the copyright transfer; and updating the copyright ownership record in the consortium blockchain.
[0009] As a preferred embodiment of the blockchain-based digital image copyright protection method for power grids described in this invention, the step of performing discrete cosine transform and singular value decomposition on the power grid image and embedding the copyright identifier into the transformed coefficient matrix includes: dividing the power grid image into image blocks of a preset size; performing discrete cosine transform on each image block to obtain a frequency domain coefficient matrix; performing singular value decomposition on the frequency domain coefficient matrix to obtain a left singular vector matrix, a singular value diagonal matrix, and a right singular vector matrix; embedding the copyright identifier into the mid-frequency coefficients of the singular value diagonal matrix; and performing inverse singular value decomposition and inverse discrete cosine transform on the modified matrix to reconstruct the image blocks and synthesize a complete power grid image containing the copyright identifier.
[0010] The beneficial effects of this preferred technical solution are as follows: by dividing the power grid image into image blocks of a preset size and performing discrete cosine transform on each image block, the image is transformed from the spatial domain to the frequency domain, which facilitates the embedding of copyright information without affecting the visual quality of the image; by performing singular value decomposition on the frequency domain coefficient matrix to obtain a singular value diagonal matrix, the copyright mark is encoded and embedded in the mid-frequency coefficients of the singular value diagonal matrix; by performing inverse singular value decomposition and inverse discrete cosine transform on the modified matrix to reconstruct the image blocks, the copyright mark is hiddenly embedded, so that the power grid image containing the copyright mark is visually consistent with the original image.
[0011] As a preferred embodiment of the blockchain-based digital image copyright protection method for power grids described in this invention, the step of calculating the hash value of the power grid image, extracting the copyright owner's public key address and timestamp, and forming copyright metadata includes: calculating a first hash value of the power grid image; calculating a second hash value by performing operations on the first hash value and image metadata, which serves as the image feature fingerprint; obtaining the copyright owner's public key address, current timestamp, watermark embedding strength, and image size parameters; and organizing the image feature fingerprint, public key address, timestamp, watermark embedding strength, and image size parameters into structured data to form copyright metadata.
[0012] As a preferred embodiment of the blockchain-based digital image copyright protection method for power grids described in this invention, the step of writing copyright metadata into a smart contract of the consortium blockchain to generate a copyright certificate record includes: calling the copyright registration smart contract and passing in the copyright metadata; verifying the format and integrity of the copyright metadata; persistently storing the copyright metadata in the blocks of the consortium blockchain; generating a copyright certificate identifier code, recording the block height and transaction hash value, and returning the copyright certificate record.
[0013] As a preferred embodiment of the blockchain-based digital image copyright protection method for power grids described in this invention, the step of extracting the hash value of the power grid image to be detected and comparing it with the copyright metadata in the consortium blockchain to calculate the frequency domain feature similarity between the power grid image to be detected and similar images includes: calculating the hash value of the power grid image to be detected; traversing the copyright metadata stored in the consortium blockchain, calculating the difference between the hash value of the image to be detected and the hash value of each copyright image, and filtering similar images with differences less than a preset threshold; performing discrete cosine transform on the power grid image to be detected and similar images respectively, extracting the intermediate frequency coefficients as feature vectors; and calculating the cosine similarity between the feature vectors.
[0014] As a preferred embodiment of the blockchain-based digital image copyright protection method for power grids described in this invention, the step of extracting the copyright identifier from the image to be detected when the similarity reaches a threshold, comparing the consistency of the copyright identifiers, determining infringement, and generating evidence includes: when the cosine similarity exceeds a preset threshold, performing discrete cosine transform and singular value decomposition on the power grid image to be detected; extracting the copyright identifier from the intermediate frequency coefficients of the singular value diagonal matrix; calculating the bit error rate and correlation coefficient between the extracted copyright identifier and the original copyright identifier; when the bit error rate is lower than the bit error threshold and the correlation coefficient is higher than the correlation threshold, determining infringement; and recording the hash comparison result, feature similarity, extracted copyright identifier, and comparison data to form evidence of infringement.
[0015] The beneficial effects of this preferred technical solution are as follows: When the cosine similarity exceeds a preset threshold, a deep verification process is triggered. Discrete cosine transform and singular value decomposition are performed on the power grid image to be detected, and the embedded copyright identifier is extracted from the intermediate frequency coefficients of the singular value diagonal matrix. By calculating the bit error rate and correlation coefficient between the extracted copyright identifier and the original copyright identifier, the matching degree of the copyright identifier is quantified. When the bit error rate is lower than the bit error threshold and the correlation coefficient is higher than the correlation threshold, the consistency of the copyright identifier is confirmed, and it is determined to be an infringement. A complete chain of evidence of infringement is formed by recording the hash comparison results, feature similarity, extracted copyright identifier and comparison data.
[0016] As a preferred embodiment of the blockchain-based digital image copyright protection method for power grids described in this invention, the steps of receiving a copyright transaction request, verifying the digital signature of the transacting party, querying the consortium blockchain to confirm copyright ownership, executing the copyright transfer, and updating the copyright ownership record in the consortium blockchain include: receiving a copyright transaction request; parsing the digital signature of the transacting party and verifying the digital signature of the transacting party; querying the copyright registration record in the consortium blockchain to confirm the current copyright ownership and transaction status; invoking the transaction execution smart contract to transfer funds and change the copyright ownership; generating a new copyright certificate identifier code; and writing the transaction record and the updated copyright ownership into the consortium blockchain.
[0017] Secondly, embodiments of the present invention provide a blockchain-based digital image copyright protection system for power grids, comprising: an image processing module for acquiring power grid images and embedding copyright identifiers using a digital watermarking algorithm; a copyright certificate generation module for calculating image feature fingerprints and constructing a copyright certificate containing copyright owner information, a timestamp, and watermark parameters; a blockchain evidence storage module for storing the copyright certificate to a consortium blockchain network via a smart contract; an infringement detection module for establishing a multi-dimensional matching strategy to identify infringement in the power grid images to be detected and generating an infringement evidence chain; a copyright transaction module for constructing copyright transaction rules and automatically executing copyright transfer or authorization operations via a smart contract; and a permission management module for allocating system access permissions according to user identity types.
[0018] Thirdly, embodiments of the present invention provide a computer device, including a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program instructions are executed by the processor, they implement the steps of the blockchain-based power grid digital image copyright protection method as described in the first aspect of the present invention.
[0019] Fourthly, embodiments of the present invention provide a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program instructions are executed by a processor, they implement the steps of the blockchain-based power grid digital image copyright protection method as described in the first aspect of the present invention.
[0020] The beneficial effects of this invention are as follows: This invention embeds the copyright identifier into the intermediate frequency coefficients by performing discrete cosine transform and singular value decomposition on the power grid image, achieving concealed carrying of copyright information. This ensures that the power grid image always contains a verifiable copyright identifier during its circulation process, while maintaining image visual quality to meet engineering application requirements. By calculating the dual hash value of the power grid image to form a unique feature fingerprint, and combining it with the copyright owner's public key address and timestamp to construct copyright metadata and write it into the consortium blockchain smart contract, the immutability of the blockchain provides a reliable time proof for copyright ownership, solving the problems of easy data tampering and high cost of rights confirmation in traditional centralized registration. By extracting the hash value of the image to be detected and comparing it with the consortium blockchain copyright database to screen similar images, then calculating the frequency domain feature similarity and extracting the copyright identifier for multi-dimensional verification, a gradient detection process from rapid screening to accurate judgment is established, reducing reliance on manual comparison and the false judgment rate. Through smart contract verification of the digital signatures of the transacting parties and automatic execution of copyright transfer and on-chain record updates, the invention achieves disintermediation and transparency in copyright transactions, avoiding rights disputes in traditional transactions. Attached Figure Description
[0021] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 is a flowchart of the blockchain-based digital image copyright protection method for power grids; Figure 2 is a diagram of the computer equipment used in the blockchain-based digital image copyright protection method for power grids; Figure 3 is a flowchart of the power grid image copyright watermark generation process; Figure 4 is a diagram of the overall architecture of the power grid image copyright protection system; Figure 5 is a flowchart of the DCT+SVD digital watermark embedding process in the blockchain-based digital image copyright protection method for power grids. Detailed Implementation
[0023] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0024] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0025] Secondly, the term "an embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places throughout this specification does not necessarily refer to the same embodiment, nor is it a single embodiment or an embodiment selectively excluded from other embodiments.
[0026] Example 1 refers to Figures 1-2, which is the first embodiment of the present invention. This embodiment provides a blockchain-based digital image copyright protection method for power grids, including: S100: acquiring images of power grid equipment, power system drawings or power grid topology diagrams, and performing format verification; performing discrete cosine transform and singular value decomposition on the power grid images; embedding the copyright identifier into the transformed coefficient matrix; and generating a power grid image containing the copyright identifier.
[0027] S200: Calculate the hash value of the power grid image, extract the copyright owner's public key address and timestamp, form copyright metadata, write the copyright metadata into the smart contract of the consortium blockchain, and generate copyright evidence records.
[0028] S300: Extract the hash value of the power grid image to be detected and compare it with the copyright metadata in the consortium blockchain. Filter similar images, calculate the frequency domain feature similarity between the power grid image to be detected and similar images. When the similarity reaches the threshold, extract the copyright identifier in the image to be detected, compare the consistency of the copyright identifier, determine infringement, and generate evidence.
[0029] S400: Receives copyright transaction requests, verifies the digital signatures of the transacting parties, queries the consortium blockchain to confirm copyright ownership, executes the copyright transfer, and updates the copyright ownership record in the consortium blockchain.
[0030] It should be noted that power grid companies have accumulated a large number of commercially valuable digital image assets during their digital transformation, including images of substation equipment, transmission line inspection images, single-line diagrams of the power system, and power grid topology diagrams. These images not only contain important technical parameters and operational data, but also involve safety information of power grid infrastructure. Power grid images are frequently transferred during technical exchanges, equipment procurement, and engineering cooperation between companies, making them easy to be illegally copied and disseminated. Once an infringement occurs, it is difficult to obtain evidence and the cost of protecting rights is high.
[0031] Therefore, by embedding the copyright identifier into the power grid image through S100, the copyright information is carried during the normal circulation and use of the image; by storing the copyright metadata in the consortium blockchain through S200, the immutability of the blockchain is used to achieve low-cost copyright confirmation, while the timestamp on the blockchain provides a reliable time proof of copyright ownership; by establishing a multi-layered infringement detection process through S300, suspected infringing images are quickly screened through hash comparison, and then the infringement is confirmed through feature similarity calculation and copyright identifier extraction, generating a complete chain of evidence; by using smart contracts through S400, copyright transactions are automatically executed, and the copyright ownership record on the consortium blockchain is directly changed after verifying the identities of both parties to the transaction, realizing the transparency and automation of copyright transactions and avoiding intermediate links and human intervention in traditional transactions.
[0032] Example 2 refers to Figures 1-5, and is the second embodiment of the present invention.
[0033] In this embodiment, step S100 involves performing discrete cosine transform and singular value decomposition on the power grid image and embedding the copyright identifier into the transformed coefficient matrix. This includes the following steps A1: A1: Dividing the power grid image into image blocks of a preset size; performing discrete cosine transform on each image block to obtain a frequency domain coefficient matrix; performing singular value decomposition on the frequency domain coefficient matrix to obtain a left singular vector matrix, a singular value diagonal matrix, and a right singular vector matrix; embedding the copyright identifier into the mid-frequency coefficients of the singular value diagonal matrix; performing inverse singular value decomposition and inverse discrete cosine transform on the modified matrix to reconstruct the image blocks and synthesize a complete power grid image containing the copyright identifier.
[0034] First, the acquired power grid images undergo preprocessing and image block segmentation. Power grid images are typically RGB three-channel color images, including different types such as on-site images of power grid equipment, substation layout diagrams, and transmission line routing diagrams. In the preprocessing stage, the color images are converted to grayscale images using a weighted average method. The weight for the red channel is 0.299, the green channel is 0.587, and the blue channel is 0.114. This weight allocation aligns with the human eye's sensitivity to different colors. The converted grayscale image is recorded as M×N pixels, where M is the image height and N is the image width.
[0035] Image block segmentation employs a fixed-size block method, dividing the grayscale image into 8×8 pixel blocks. The 8×8 block size is chosen as the standard processing unit based on the discrete cosine transform, striking a balance between computational efficiency and transformation quality. The segmentation process proceeds from left to right and from top to bottom. For image sizes not divisible by 8, edge padding is applied to the right and bottom edges by copying edge pixel values. After segmentation, the total number of image blocks is (M / 8)×(N / 8), each denoted as B(i, j), where i represents the row index and j represents the column index.
[0036] Next, a two-dimensional discrete cosine transform (DCT) is performed on each image patch. The DCT transforms the image patch from the spatial domain to the frequency domain, and the transformed coefficient matrix reflects the energy distribution of the image patch at different frequency components. For image patch B(i,j), the two-dimensional DCT is performed to obtain the frequency domain coefficient matrix DCT(i,j). During the transformation, the upper left corner of the image patch corresponds to low-frequency coefficients, containing the main energy and visual information of the image; the lower right corner corresponds to high-frequency coefficients, containing the details and edge information of the image; and the middle region corresponds to mid-frequency coefficients, containing the texture information of the image.
[0037] Specifically, the formula for calculating the two-dimensional discrete cosine transform is as follows: in, B(x, y) represents the coefficient value at position (u, v) in the frequency domain coefficient matrix, where u and v range from 0 to 7; B(x, y) represents the pixel value at position (x, y) in the image patch. and The normalization coefficient takes the value of 1 / √8 when u or v equals 0, and 1 / 2 otherwise. This transformation formula converts pixel values in the spatial domain into coefficient values in the frequency domain, realizing the frequency domain representation of image information.
[0038] After the transformation, singular value decomposition is performed on the frequency domain coefficient matrix. Singular value decomposition transforms the frequency domain coefficient matrix... It can be decomposed into the product of three matrices, which are the transposes of the left singular vector matrix U, the singular value diagonal matrix S, and the right singular vector matrix V. The decomposition relation is expressed as: Where U is an 8×8 orthogonal matrix, and the column vectors are called left singular vectors; S is an 8×8 diagonal matrix, and the elements on the diagonal are called singular values, arranged in descending order, i.e. S(0,0)≥S(1,1)≥...≥S(7,7); V is an 8×8 orthogonal matrix, and the column vectors are called right singular vectors; This represents the transpose of matrix V. The magnitude of the singular values reflects the degree of contribution of the corresponding singular vector to the image patch; larger singular values correspond to the main features of the image, while smaller singular values correspond to the secondary features of the image.
[0039] Next, prepare and encode the copyright identification information. This information includes the copyright owner's corporate identifier, copyright registration number, and creation time, organized as a binary bitstream. The length of the copyright identifier is determined by the amount of information to be embedded, typically 64 bits or 128 bits. The copyright identifier is then encrypted using the AES symmetric encryption algorithm with a 128-bit key. The encrypted copyright identifier bitstream is denoted as W(k), where k is the bit index, ranging from 0 to the copyright identifier length minus 1.
[0040] Then, the encoded copyright identifier is embedded into the intermediate frequency coefficients of the singular value diagonal matrix S. The embedding positions are selected from singular values S(2,2) to S(5,5), which correspond to the intermediate frequency coefficients. This ensures that the image's visual quality is not excessively affected while also resisting conventional image processing attacks. The embedding method employs quantization modulation, modifying the size of the singular values according to the bit value of the copyright identifier.
[0041] Specifically, for the copyright identifier bit, it is embedded into the singular value. The process is as follows: First, the quantization step size Δ of the singular values is calculated. The quantization step size is adaptively adjusted according to the characteristics of the image patch. For image patches containing more texture information, the quantization step size can be set larger, resulting in stronger embedding strength; for image patches containing smooth regions, the quantization step size is set smaller to ensure image quality. The formula for calculating the quantization step size is: in, This is a globally embedded intensity factor, ranging from 0.05 to 0.15, set according to the type and quality requirements of the power grid image. For high-quality single-line power grid images, Take the smaller value, 0.05; for field equipment images with relatively low quality requirements, Take the larger value, 0.15. and The two largest singular values are denoted by , and their average value reflects the energy level of the image patch.
[0042] Then, the singular value is modified according to the copyright identifier bit value. When the copyright identifier bit is equal to 1, the singular value is modified as follows: When the copyright identifier bit is equal to 0, the singular value is modified as follows: in, This indicates the floor function; This represents the modified singular value.
[0043] The embedding process is repeated for each image block that needs to have its copyright identifier embedded. Since power grid images are typically large while the copyright identifier is relatively short, it is not necessary to embed the copyright identifier in all image blocks. Image blocks with high energy and rich texture are selected for embedding, as these blocks are more resistant to image processing attacks. The energy of an image block is evaluated by calculating the sum of squares of all elements in the DCT coefficient matrix. The top P energy blocks are selected for embedding, where the value of P is determined based on the copyright identifier length and redundancy requirements.
[0044] Finally, inverse singular value decomposition and inverse discrete cosine transform are performed on the modified matrix to reconstruct the image patch. Inverse singular value decomposition multiplies the modified singular value diagonal matrix S' with the transposes of the left singular vector matrix U and the right singular vector matrix V to obtain the modified frequency domain coefficient matrix: Then to Performing the inverse discrete cosine transform converts the frequency domain coefficient matrix back to the spatial domain image block B'(i,j). The formula for calculating the inverse discrete cosine transform is: The reconstructed image block B'(i,j) is visually consistent with the original image block B(i,j), with the main difference being in the mid-frequency coefficient region where the copyright identifier is embedded. After reconstructing all image blocks, a complete power grid image containing the copyright identifier is synthesized according to the original block position order. During the synthesis process, the edge padding added in the preprocessing stage is removed to restore the original image size.
[0045] To evaluate the image quality after embedding the copyright notice, the Peak Signal-to-Noise Ratio (PSNR) between the image with the copyright notice and the original image is calculated. The formula for calculating PSNR is: MSE stands for Mean Squared Error, calculated as the sum of squares of the differences between corresponding pixel values in the original image and the image containing the copyright label, divided by the total number of pixels. For power grid images, the PSNR value is typically required to be greater than 35dB to ensure image quality meets the requirements of power engineering applications. Experimental results show that, using the above embedding method, the PSNR values for power grid equipment images are between 38dB and 42dB, the PSNR values for single-line power grid diagrams are between 40dB and 45dB, and the PSNR values for power grid topology diagrams are between 39dB and 43dB, all meeting the quality requirements.
[0046] Images of power grids containing copyright notices are stored in the lossless PNG compression format to avoid the damage to copyright notices caused by lossy compression formats such as JPEG. The PNG format uses the Deflate compression algorithm to perform lossless compression of the image data, with a compression ratio typically ranging from 30% to 50% of the original data size.
[0047] In this embodiment, step S200 involves calculating the hash value of the power grid image and constructing copyright metadata, which is then written into the consortium blockchain smart contract. This includes the following steps B1-B2: B1: Calculating the hash value of the power grid image, extracting the copyright owner's public key address and timestamp to form copyright metadata, including: calculating the first hash value of the power grid image; calculating the second hash value by performing operations on the first hash value and image metadata, which serves as the image feature fingerprint; obtaining the copyright owner's public key address, current timestamp, watermark embedding strength, and image size parameters; and organizing the image feature fingerprint, public key address, timestamp, watermark embedding strength, and image size parameters into structured data to form copyright metadata.
[0048] First, a hash value is calculated for the power grid image containing the copyright notice. The hash calculation employs a double hashing method. The first layer uses the MD5 algorithm, with the binary data stream of the power grid image as input and a 128-bit hash value as output. The MD5 algorithm maps input data of arbitrary length to a fixed-length hash value, featuring fast computation speed and low collision probability. For the power grid image, the image file is first read as a byte stream, then divided into blocks and input into the MD5 algorithm for calculation, with each block being 64KB in size.
[0049] The MD5 algorithm's computation process involves four rounds of iterative computation, each containing 16 basic operations. The algorithm maintains four 32-bit registers A, B, C, and D, with initial values of 0x67452301, 0xEFCDAB89, 0x98BADCFE, and 0x10325476, respectively. Each basic operation takes a 32-bit word from the input data, performs a non-linear function operation and a circular shift operation with the current value of the register, and updates the register value. After four rounds of iteration, the final values of the four registers are concatenated to form a 128-bit MD5 hash value, denoted as Hash. MD5 .
[0050] Secondly, the image's metadata is extracted. Metadata includes attributes such as file format, dimensions, color space, and creation time. For PNG format power grid images, information such as image width, height, color depth, and color type is extracted from the IHDR data block in the file header.
[0051] The SHA-256 algorithm is based on the Merkle-Damgård structure. Input data is padded to multiples of 512 bits and then divided into multiple 512-bit message blocks. The algorithm maintains eight 32-bit working variables H0 to H7, with initial values taken from the fractional part of the square roots of the first eight prime numbers. For each message block, 64 rounds of compression function operations are performed. In each round, a 32-bit word is extracted from the message block and logically and additively performed with the working variables. After 64 rounds of operations, the values of the working variables are accumulated into H0-H7. After all message blocks have been processed, the final values of H0-H7 are concatenated to form a 256-bit SHA-256 hash value, denoted as Hash. SHA256 This value serves as the feature fingerprint of the power grid image.
[0052] Next, obtain the copyright owner's public key address. When the copyright owner registers an account on the consortium blockchain, an asymmetric key pair is generated for them, including a private key and a public key. The private key is kept by the copyright owner and used for digitally signing transactions and data; the public key is publicly released, and other users verify the authenticity of the signature using the public key. The public key is generated using an elliptic curve cryptography algorithm, with the curve type being the recommended curve of the national cryptographic algorithm SM2, and the parameters of the curve equation conforming to the standards of the State Cryptography Administration. The public key is a point on the elliptic curve, with coordinates (x, y), each coordinate being a 256-bit integer.
[0053] The public key address is the hash value of the public key. It is generated by concatenating the coordinates of the public key, calculating the SM3 hash value, and then using the first 160 bits of the hash value as the address. The public key address is represented using Base58 encoding, and the encoded string is approximately 34 characters long, with a format similar to "1A2B3C4D5E6F7G8H9I0J1K2L3M4N5O6P7Q8R". After obtaining the copyright owner's public key address, it is recorded as Owner. Address .
[0054] Next, obtain the current timestamp. The timestamp records the exact time of copyright registration, providing time proof of copyright ownership. The timestamp uses Unix time format, representing the number of seconds elapsed from 00:00:00 UTC on January 1, 1970 to the current time. The watermark embedding parameters are organized as a JSON object with the format {"alpha": 0.10, "delta";} avg ": 15.3, "positions": [(2, 3), (5, 8), ...,], "length": 128}.
[0055] Next, extract the image size parameters. These parameters include image width, height, and resolution. Image width and height are expressed in pixels, denoted as Width and Height; resolution is expressed in pixels per inch (DPI), denoted as Resolution.
[0056] Finally, all the above information is organized into structured copyright metadata. The copyright metadata is represented in JSON format and includes the following fields: image_fingerprint (hexadecimal string of image feature fingerprint Hash_SHA256); owner_address (Owner_Address, the public key address of the copyright owner); timestamp (Copyright registration timestamp); watermark_params (JSON object of watermark embedding parameters); image_width and image_height (image width and height); image_resolution (image resolution); image_format (image file format); and description (copyright description information, including text information such as image name, content description, and purpose).
[0057] A complete example of the copyright metadata structure is: json{"image_fingerprint":"a1b2c3d4e5f6...","owner_address":"1A2B3C4D5E6F...","timestamp":1698765432,"watermark_params":{"alpha":0.10,"delta_avg":15.3,"positions":[[2,3],[5,8]],"length":128},"image_width":1920,"image_height":1080,"image_resolution":300,"image_format":"PNG","description":"Image of main transformer equipment in a substation"} The JSON string length of the copyright metadata is usually 500 to 1000 bytes, and after compression it is about 300 to 600 bytes.
[0058] B2: Write copyright metadata into the smart contract of the consortium blockchain to generate a copyright certificate record. This includes calling the copyright registration smart contract and passing in the copyright metadata; verifying the format and integrity of the copyright metadata; persistently storing the copyright metadata in the block of the consortium blockchain; generating a copyright certificate identifier code, recording the block height and transaction hash value, and returning the copyright certificate record.
[0059] First, it connects to the consortium blockchain network. The consortium blockchain is built using the FISCO-BCOS framework, with a multi-institutional consortium architecture. Participating institutions include power grid companies, equipment manufacturers, engineering design institutes, and other power industry-related entities. The consortium blockchain uses PBFT consensus, with 4 to 16 consensus nodes distributed across different institutions. PBFT consensus can achieve agreement under the Byzantine fault-tolerant model, tolerating no more than 1 / 3 of the nodes failing or acting maliciously.
[0060] The client connects to the consortium blockchain by establishing communication with on-chain nodes through the SDK. The SDK encapsulates the underlying protocol for interacting with the consortium blockchain, providing functions such as contract invocation, transaction sending, and event listening. When establishing a connection, the client configures the node's IP address and port number, typically the RPC interface port such as 8545.
[0061] Next, we prepare to call the copyright registration smart contract. The copyright registration smart contract is a program written in Solidity deployed on the consortium blockchain. The contract address is determined during deployment and is a 40-digit hexadecimal string. The contract provides the copyright registration function `registerCopyright`, whose parameter is a JSON string containing copyright metadata. The function signature is: `Solidityfunction-registerCopyright(string-memory-metadata)-public-returns-(bytes32)`. The `public` modifier indicates that any consortium blockchain account can call this function; the return value is of type `bytes32`, representing the generated copyright certificate identifier.
[0062] Before invoking the contract, the JSON string containing the copyright metadata is passed as a function parameter. Since transaction data in the consortium blockchain is stored in blocks, data size needs to be controlled to prevent excessively large single transactions from impacting network performance. If the copyright metadata string exceeds 2KB, it is compressed using the gzip compression algorithm. The compressed data is then Base64 encoded before being passed as a function parameter. Internally, upon receiving the parameter, the contract first performs Base64 decoding and gzip decompression to restore the original copyright metadata.
[0063] Next, a transaction object is constructed. The transaction object contains the following attributes: the `from` field is the sender's public key address, i.e., the copyright owner's `Owner_Address`; the `to` field is the contract address; the `data` field contains the encoded data of the contract functions, including the function selector and parameter encoding; the `gas` field is the transaction's gas limit, set to 3 million; the `gasPrice` field is the gas price, typically set to 0 in consortium blockchains because they do not charge transaction fees; and the `nonce` field is the transaction sequence number, obtained from the account's current nonce value and incremented.
[0064] The encoding method for the data field of the transaction object is as follows: First, the function selector is calculated by taking the Keccak-256 hash value of the function signature string "registerCopyright(string)" and using the first 4 bytes as the function selector. Then, the function parameters are ABI encoded, with the string parameters encoded as a concatenation of offset, length, and content. The encoded data field is a hexadecimal string, and its length depends on the parameter content.
[0065] Next, the transaction object is digitally signed. The digital signature uses the copyright holder's private key to sign the transaction's hash value, employing the SM2 algorithm (a national cryptographic standard in China). The signing process includes calculating the RLP encoding of the transaction, calculating the SM3 hash value of the RLP-encoded data, and performing an elliptic curve signature on the hash value using the private key. The signature result includes an r value and a s value, both 256-bit integers, and a recovery identifier v, which takes the value 0 or 1. The three values of r, s, and v are appended to the transaction object to form a complete signed transaction.
[0066] Then, the signed transaction is sent to the consortium blockchain nodes via the SDK. Upon receiving the transaction, the nodes first verify the transaction signature to confirm the sender's identity and the integrity of the transaction data. After successful verification, the nodes place the transaction in the transaction pool to await consensus. The PBFT consensus process consists of three phases: the pre-preparation phase, the preparation phase, and the commit phase. The master node selects transactions from the transaction pool, packages them into blocks, and sends pre-preparation messages to other nodes; after verifying the block's authenticity, other nodes send preparation messages to all nodes; when nodes receive more than 2 / 3 of the preparation messages, they enter the commit phase and send commit messages to all nodes; when nodes receive more than 2 / 3 of the commit messages, they write the block to their local ledger, completing the consensus.
[0067] Once consensus is reached, the transactions are packaged into a block, which is then added to the blockchain. A block contains multiple transactions, and the execution result of each transaction is recorded in a transaction receipt. The execution of a copyright registration transaction calls the `registerCopyright` function of the smart contract. Internally, this function performs the following operations: First, it verifies the format and completeness of the copyright metadata. It parses the JSON string, checking if necessary fields exist and if the type and range of field values are correct. For the `image_fingerprint` field, it verifies that it is a 64-bit hexadecimal string corresponding to a 256-bit hash value; for the `owner_address` field, it verifies that it is in the format of a consortium blockchain address; for the `timestamp` field, it verifies that it is a reasonable timestamp value, no earlier than the blockchain's genesis time and no later than the current time; for the `watermark_params` field, it verifies that it is a JSON object containing the necessary parameters.
[0068] Secondly, it checks whether the copyright has already been registered. The smart contract maintains a mapping table where the key is the image fingerprint (image_fingerprint) and the value is a copyright information structure. The mapping table is queried; if the fingerprint already exists, it means the image has already been copyrighted, and duplicate registration is rejected, with the function returning an error code. If the fingerprint does not exist, the registration process continues.
[0069] Then, a copyright certificate identifier is generated. The copyright certificate identifier is a unique 32-byte hash value that identifies the copyright record. It is generated by concatenating the image feature fingerprint, the copyright owner's address, and the timestamp, and then calculating the SM3 hash value. The calculation formula is: Here, || represents a string concatenation operation; CertificateID is the generated copyright certificate identifier, 32 bytes (256 bits). This identifier serves as a unique reference for copyright records during copyright inquiries and transactions.
[0070] Next, the copyright information structure is constructed. The structure contains the following fields: certificateID is the copyright certificate identifier; imageFingerprint is the image feature fingerprint; ownerAddress is the copyright owner's address; timestamp is the copyright registration timestamp; watermarkParams is the string of watermark embedding parameters; imageWidth and imageHeight are the image dimensions; metadata is the complete copyright metadata string; and isActive is the copyright status flag, with an initial value of true indicating copyright.
[0071] Finally, the copyright information structure is stored in the contract's state variables. A mapping table is used to map image feature fingerprints to the copyright information structure, enabling quick copyright information retrieval via feature fingerprints. Simultaneously, another mapping table is used to map copyright credential identifiers to image feature fingerprints, enabling copyright information retrieval via credential identifiers. The storage operation persistently writes the data to the consortium blockchain's state database. The data is organized using a Merkle-Patricia-Tree, and the root hash value is recorded in the block header.
[0072] After storage is complete, a copyright registration event is triggered. The event is defined as: `Solidityevent-CopyrightRegistered(bytes32-indexed-certificateID, String-imageFingerprint, Address-indexed-owner, uint256-timestamp)`; event parameters include the copyright certificate identifier, image fingerprint, copyright owner address, and timestamp. After the event is triggered, it is logged in the transaction receipt and can be monitored and queried by off-chain applications. The `indexed` modifier indicates that this parameter can be used as an index for filtering queries, improving event query efficiency.
[0073] After the transaction is executed, the smart contract function returns a CertificateID, a copyright certificate identifier. The client retrieves the function return value and event log from the transaction receipt to confirm successful copyright registration. The transaction receipt also contains the block height and transaction hash value. The block height represents the block number where the transaction is located, and the transaction hash value is the Keccak-256 hash value of the transaction data. These two values uniquely identify the transaction's position on the blockchain.
[0074] The client organizes the copyright certificate identifier, block height, and transaction hash value into a copyright certificate record and returns it to the copyright owner. The format of the copyright certificate record is: json{"certificate_id":"3f5a8b9c1d2e...","block_number":12345,"transaction_hash":"0x7e8f9a0b1c2d..."} The copyright owner saves this certificate record as proof of copyright ownership.
[0075] In this embodiment, step S300, which involves extracting features from the power grid image to be detected and determining infringement, includes the following steps C1-C2: C1: Extracting the hash value of the power grid image to be detected and comparing it with the copyright metadata in the consortium blockchain, and calculating the frequency domain feature similarity between the power grid image to be detected and similar images, including: calculating the hash value of the power grid image to be detected; traversing the copyright metadata stored in the consortium blockchain, calculating the difference between the hash value of the image to be detected and the hash value of each copyright image, and filtering out similar images with differences less than a preset threshold; performing discrete cosine transform on the power grid image to be detected and similar images respectively, and extracting the intermediate frequency coefficients as feature vectors; and calculating the cosine similarity between the feature vectors.
[0076] First, acquire the power grid image to be detected. This image may originate from internet distribution, third-party use, or other channels, and the image format may be PNG, JPEG, or other common formats. Preprocess the image to be detected, following the same workflow as for copyrighted images, converting the color image to grayscale using the same weighting coefficients.
[0077] Secondly, the hash value of the image to be detected is calculated. Using the same double hashing method as for copyrighted images, the MD5 hash value is first calculated, and then the image metadata is concatenated to calculate the SHA-256 hash value, resulting in the feature fingerprint Hash_Test of the image to be detected. The calculation process for the feature fingerprint is completely consistent with the description in step B1, ensuring the comparability of the hash values.
[0078] Next, the system connects to the consortium blockchain network and queries the copyright database. The `getAllCopyrights` function, provided by the smart contract, retrieves a list of image feature fingerprints for all registered copyrights. The query function returns an array where each element is a string representing the image feature fingerprint. For large amounts of copyright data, the query function supports pagination, returning a maximum of 100 records at a time, allowing multiple queries to iterate through all copyright records.
[0079] Intermediate frequency (IF) coefficients are extracted from the frequency domain coefficient matrix as feature vectors. The IF coefficients are selected from the (2,2) to (5,5) region of the DCT coefficient matrix. This region corresponds to the main texture information of the image, is sensitive to changes in image content, and has strong resistance to noise and compression. For each image patch, 16 coefficient values are extracted from the IF region to form a feature vector. For the entire image, feature vectors are extracted from the top N image patches with higher energy. The value of N is determined based on the image size, typically between 50 and 200. All extracted feature vectors are concatenated to form the complete frequency domain feature vector Feature_Test of the image to be detected, with a length of N×16.
[0080] For each copyrighted image in the list of similar images, its copyright metadata is queried from the consortium blockchain to obtain the image feature fingerprint and watermark embedding parameters. Based on the copyright certificate identifier or image feature fingerprint, the smart contract's query function `getCopyrightInfo` is called, returning a complete copyright information structure. The `watermarkParams` field is extracted from the structure, and the embedding position index `positions` is obtained through parsing.
[0081] Based on the embedding location index, the frequency domain feature vector Feature_DB for the corresponding location is extracted from the original data or stored feature vector of the copyright image. If the feature vector is pre-calculated and stored during copyright registration, it is read directly from storage; otherwise, it needs to be calculated in real time from the original copyright image. The calculation process is consistent with the feature extraction of the image to be detected.
[0082] Then, the feature vector of the image to be detected is calculated. Feature vectors of copyrighted images The cosine similarity between two vectors. Cosine similarity measures the degree of directional similarity between two vectors, with values ranging from -1 to 1. A value closer to 1 indicates a higher similarity. The formula is: Where n is the length of the feature vector, [i] and [i] represents the i-th component of each of the two eigenvectors. The numerator is the inner product of the two vectors, and the denominator is the product of the magnitudes of the two vectors.
[0083] The calculated cosine similarity score (Similarity) is recorded as the similarity score of the current copyrighted image. The above process is repeated for all copyrighted images in the similar image list, calculating the similarity score between each copyrighted image and the image to be detected. The similarity scores are sorted from highest to lowest, and the top 3 copyrighted images with the highest scores are selected for the next stage of watermark verification.
[0084] Set similarity threshold The typical value is between 0.85 and 0.95. When the similarity score is higher than this threshold, the image to be detected is considered highly similar to the copyrighted image at the feature level, indicating potential infringement, and further verification via watermarking is required. If the similarity scores of all similar images are lower than the threshold, it indicates that the image to be detected and the copyrighted image differ significantly in content, the detection process ends, and a "no infringement found" result is returned.
[0085] C2: When the similarity reaches a threshold, extract the copyright mark from the image to be detected, compare the consistency of the copyright marks, determine infringement, and generate evidence. This includes: when the cosine similarity exceeds a preset threshold, performing discrete cosine transform and singular value decomposition on the power grid image to be detected; extracting the copyright mark from the intermediate frequency coefficients of the singular value diagonal matrix; calculating the bit error rate and correlation coefficient between the extracted copyright mark and the original copyright mark; when the bit error rate is lower than the bit error threshold and the correlation coefficient is higher than the correlation threshold, determining infringement; recording the hash comparison results, feature similarity, extracted copyright mark, and comparison data to form evidence of infringement.
[0086] First, for copyrighted images with similarity scores exceeding a threshold, watermark embedding parameters are obtained from their copyright metadata. These parameters include the embedding strength factor α, the average quantization step size delta_avg, the embedding position index positions, and the copyright identifier length. These parameters need to precisely match the settings used during copyright registration when extracting the copyright identifier.
[0087] Secondly, the same image block segmentation and discrete cosine transform as in step A1 are performed on the image to be detected. Based on the embedded position indices, the image blocks from which the copyright identifier needs to be extracted are located. For each target image block, a two-dimensional discrete cosine transform is performed to obtain the frequency domain coefficient matrix. Then, singular value decomposition is performed on the frequency domain coefficient matrix to obtain the singular value diagonal matrix. .
[0088] Then, from the singular value diagonal matrix The copyright identifier bit is extracted from the intermediate frequency position. The extraction process is the reverse of quantization modulation, and the embedded bit value is determined based on the magnitude of the singular value. For singular values... (m, m), calculate its position in the quantization interval: Here, Δ represents the quantization step size, which is obtained from the copyright metadata as a reference value or dynamically calculated based on the singular values of the image patch. mod represents the modulo operation. The value of Position ranges from 0 to 1; when Position is greater than 0.5, the decision bit is 1, and when Position is less than 0.5, the decision bit is 0. This decision rule corresponds to the embedding rule in step A1.
[0089] The extraction operation is repeated for all target image blocks to obtain the complete copyright identifier bitstream Extract_W_enc. The length of the extracted bitstream is consistent with the length recorded in the copyright metadata. If the extraction result of an image block is abnormal, such as a negative or excessively small singular value, that image block is skipped, and the extraction results of other image blocks are used.
[0090] Next, the extracted copyright identifier bitstream undergoes error-correcting decoding. The decoding employs a BCH code error-correcting decoding algorithm, capable of correcting bit errors during transmission. The BCH decoder calculates the synod, locates the error position, flips the erroneous bits, and recovers the original information bitstream Extract_W. If the number of erroneous bits exceeds the error-correcting capability of the BCH code, decoding fails, and the extracted copyright identifier becomes invalid.
[0091] Next, the decoded copyright identifier is decrypted. Decryption uses the AES symmetric decryption algorithm, with the same key used for encryption. This key is obtained from the copyright owner or from a secure channel containing copyright metadata. The decrypted result is the original copyright identifier information, including the copyright owner's corporate identifier, copyright registration number, and generation time.
[0092] Simultaneously, the original copyright identifier information of the copyrighted image is retrieved from the consortium blockchain. Copyright identifier information can be selectively stored on the consortium blockchain during copyright registration, or it can be provided by the copyright owner. The extracted copyright identifier is then compared with the original copyright identifier.
[0093] The comparison process calculates the bit error rate (BER) and normalized correlation coefficient (NC) for the two copyright identifiers. The BER is calculated by dividing the number of distinct bits by the total number of bits, using the following formula: The bit error rate ranges from 0 to 1; a smaller value indicates that the extracted copyright identifier is closer to the original copyright identifier. The normalized correlation coefficient measures the correlation between two bit sequences, and its calculation formula is: Where L is the bit length of the copyright identifier. [i] and These represent the i-th bit of the extracted copyright identifier and the original copyright identifier, respectively, with bit values mapped to 1 and -1 for calculation. The normalized correlation coefficient ranges from -1 to 1, with values closer to 1 indicating a stronger correlation.
[0094] Set the bit error rate threshold. BER and correlation coefficient threshold Threshold NC The typical value is Threshold. BER =0.05 and Threshold NC =0.95. When BER is less than Threshold BER And NC is greater than Threshold NC If the extracted copyright identifier matches the original copyright identifier, it is confirmed that the image to be detected contains the copyright identifier of the copyrighted image.
[0095] If the copyright identifiers of multiple copyrighted images match successfully, the copyrighted image with the highest matching degree is selected as the basis for infringement determination. The matching degree comprehensively considers hash distance, feature similarity, bit error rate, and correlation coefficient to calculate a comprehensive score.
[0096] Finally, infringement is determined and evidence is generated. When a copyright mark is successfully matched, the image under test is determined to infringe on the copyrighted image. The complete detection process and result data are recorded to form an infringement evidence chain. The infringement evidence chain includes the following: the characteristic fingerprint Hash of the image under test. Test Image metadata; copyright certificate identifier, image feature fingerprint, and copyright owner information for copyrighted images; hash comparison results, including the distance to be determined and a list of similar images selected; feature similarity calculation results, including cosine similarity score and ranking; copyright identifier extraction results, including the extracted bitstream and decoded copyright identifier information; copyright identifier comparison results, including bit error rate (BER) and normalized correlation coefficient (NC); infringement determination conclusion and confidence score; detection timestamp and detection personnel information.
[0097] The infringement evidence chain is organized as structured data records, represented in JSON format. These records can be selectively stored on the consortium blockchain. By calling the `recordInfringement` function of the smart contract, the evidence hash value and key information are written to the consortium blockchain, forming immutable infringement evidence. The data stored on the consortium blockchain includes the infringing image feature fingerprint, copyright certificate identifier code, infringement determination time, and evidence hash value. Complete evidence data is stored in an off-chain database and linked through the evidence hash value.
[0098] Once infringement evidence is generated, it is returned to the initiating party via an interface or API. The initiating party can be the copyright owner, a third-party monitoring agency, or a judicial authority. The evidence data is presented in report form, including a description of the infringement facts, the technical detection process, data comparison results, and legal recommendations.
[0099] For cases where a match fails—that is, when the error rate is too high or the correlation coefficient is too low—it indicates that although the image being detected is visually or feature-wise similar to the copyrighted image, it does not contain copyright markings. It may be an independently created similar image or an image that has undergone significant modification. In this case, the result "Suspected infringement but cannot be confirmed" is returned, and manual review is recommended. Manual review involves professionals comparing the image content, analyzing the reasons for the similarity, and making a final determination based on other evidence.
[0100] In this embodiment, step S400, which processes the copyright transaction request and updates the on-chain record, includes the following steps D1: D1: Receiving the copyright transaction request, verifying the digital signature of the transacting party, querying the consortium blockchain to confirm the copyright ownership, executing the copyright transfer, and updating the copyright ownership record in the consortium blockchain. This includes receiving the copyright transaction request, parsing the digital signature of the transacting party and verifying the digital signature of the transacting party; querying the copyright registration record in the consortium blockchain to confirm the current copyright ownership and transaction status; calling the transaction execution smart contract to transfer funds and change the copyright ownership; generating a new copyright certificate identifier code, and writing the transaction record and the updated copyright ownership into the consortium blockchain.
[0101] First, a copyright transaction request is received. The transaction request is submitted by the initiator via a web interface or API. The request includes the following information: transaction type (permanent transfer, limited-term license, or per-transaction license); CertificateID, the credential identifier for the target copyright; the public key address of the counterparty; the transaction amount; and additional terms. The transaction request is organized in JSON format, with an example format: json{"transaction_type":"transfer","certificate_id":"3f5a8b9c1d2e...","buyer_address":"1B3C4D5E6F7G...","amount":5000,"terms":"Permanent transfer of all copyrights"}. After the transaction request is submitted, a transaction application form is generated. The application form number is a unique UUID, recording the submission time and initiator information. The initial status of the application form is "Pending Verification".
[0102] Secondly, the digital signature in the transaction request is parsed and the initiator's identity is verified. The digital signature is appended to the signature field of the transaction request, and the signature object is the hash value of other fields in the transaction request. The verification process includes: obtaining the initiator's public key from the address, using the public key to verify the signature's authenticity, and using the Chinese national cryptographic algorithm SM2. The verification process calls the signature verification function of the cryptographic library, taking the message hash value, the r and s values of the signature, and the public key coordinates as inputs, and outputting a boolean value indicating whether the verification passed or failed.
[0103] If signature verification fails, it indicates that the transaction request may have been tampered with or the initiator's identity may have been forged. The transaction request is rejected, and the error message "Signature verification failed" is returned. If signature verification succeeds, proceed to the next steps.
[0104] Then, connect to the consortium blockchain network to query the copyright registration record of the target. Call the smart contract's query function getCopyrightInfo, passing in the copyright certificate identifier code CertificateID, and the function returns a copyright information structure. Extract the current copyright owner address currentOwner and the copyright status flag isActive from the structure.
[0105] Verify the permissions of the transaction initiator. For permanent transfer transactions, the initiator must be the current copyright owner, i.e., the initiator's address equals currentOwner; for licensed transactions, the initiator can be the copyright owner or an authorized agent. If the initiator does not have the necessary permissions, reject the transaction request and return the error message "Insufficient permissions".
[0106] Check the copyright transaction status. If the copyright status flag isActive is false, it means the copyright has been revoked or frozen, and the transaction is not allowed. Reject the transaction request and return the error message "Copyright status abnormal". If the copyright is locked in another transaction, a new transaction is also not allowed, and return the error message "Copyright locked".
[0107] Verify the counterparty's identity. Query the counterparty's public key address (buyerAddress) on the consortium blockchain to confirm that the address is registered and the account is in good standing. For transactions involving funds, check if the buyer's account balance is sufficient to cover the transaction amount. Account balance queries are implemented through the consortium blockchain's account management contract, which maintains a balance mapping table for each account.
[0108] Next, the smart contract for the copyright transaction is constructed. The corresponding contract function is selected based on the transaction type: permanent transfer calls the `transferCopyright` function, time-limited authorization calls the `authorizeCopyright` function, and one-time authorization calls the `licensecopyright` function. Taking permanent transfer as an example, the function signature is: `solidity function transferCopyright(bytes32 certificateID, address newOwner, uint256 amount) public return (bool)`. Function parameters include the copyright certificate identifier, the new copyright owner's address, and the transaction amount. The function modifier is `public`, and the return value is a boolean indicating whether the transaction was successful.
[0109] Construct a transaction object containing various transaction attributes. The `from` field is the current copyright owner's address (`currentOwner`); the `to` field is the smart contract address; the `data` field contains the encoded data of the function call; other fields include `gas`, `gasPrice`, and `nonce`. The transaction object is digitally signed by the current copyright owner using their private key.
[0110] If the transaction initiator is not the copyright owner but an authorized agent, proof of authorization must be attached to the transaction. This proof of authorization is a digital signature from the copyright owner authorizing the agent, and includes information such as the agent's address, authorization type, and authorization period. The smart contract verifies the authenticity of the proof of authorization before executing the transaction.
[0111] Then, the signed transaction is sent to the consortium blockchain node, triggering the consensus process. After passing PBFT consensus, the transaction is packaged into a block, which is added to the blockchain. The smart contract's `transferCopyright` function is called and executed. Internally, the function performs the following operations: First, it re-verifies the validity of the transaction parameters, including whether the copyright certificate identifier exists, whether the current copyright owner is the transaction initiator, and whether the new copyright owner's address is valid. If the verification passes, the funds transfer operation is executed. If the transaction amount is greater than zero, the fund management contract's transfer function is called to deduct the transaction amount from the buyer's account and transfer it to the seller's account. The transfer process is executed atomically; either all transactions succeed, or all transactions fail and a rollback occurs.
[0112] Secondly, the copyright ownership information is changed. The `ownerAddress` field in the copyright information structure is updated to the new copyright owner's address, `newOwner`. The copyright transfer history is recorded, including the original owner's address, the new owner's address, the transfer time, and the transaction amount. The history is stored in an array variable within the contract, with each array element being a transfer record structure.
[0113] Next, a new copyright credential identifier is generated. Although the content and feature fingerprint of the copyright remain unchanged, the copyright owner has changed, and a new credential identifier is generated to distinguish different stages of copyright ownership. The generation method of the new credential identifier is consistent with that described in step B2, where the image feature fingerprint, the new copyright owner's address, and the current timestamp are concatenated to calculate the SM3 hash value. The new credential identifier is recorded in the copyright information structure, and the original credential identifier is marked as a historical credential and retained in the history record.
[0114] Then, a copyright transfer event is triggered. The event is defined as: `solidityeventCopyrightTransferred(bytes32indexedoldCertificateID, bytes32indexednewCertificateID, addressindexedoldOwner, addressnewOwner, uint256amount, uint256timestamp)`; the event parameters include the original certificate identifier, the new certificate identifier, the original owner's address, the new owner's address, the transaction amount, and the transfer time. The event is logged in the transaction receipt and can be monitored and queried by off-chain applications.
[0115] Finally, the smart contract function returns true to indicate that the transaction was successfully executed. The client retrieves the function return value and event log from the transaction receipt to confirm the copyright transfer is complete. The transaction record and new copyright certificate are then updated in the local database to synchronize copyright ownership information.
[0116] The execution logic of smart contracts differs for time-limited licenses and per-transaction licenses. Time-limited licenses do not change copyright ownership; instead, they record the licensing relationship in the contract, including the licensee's address, license type (e.g., usage right, copying right, distribution right), license period, and licensing fee. The license record is stored in a mapping table within the contract, with the key being a combination of the copyright certificate identifier and the licensee's address, and the value being a license information structure. Upon license expiration, the smart contract automatically marks the license status as invalid.
[0117] In summary, by segmenting the power grid image into 8×8 pixel blocks and performing a discrete cosine transform on each block, the image is transformed from the spatial domain to the frequency domain, providing a suitable transform domain for embedding the copyright identifier. By performing singular value decomposition on the frequency domain coefficient matrix to obtain a singular value diagonal matrix, and selecting mid-frequency coefficient positions to embed the copyright identifier, which is encrypted with AES and encoded with BCH, the invisibility and attack robustness of the copyright identifier are achieved while ensuring a peak signal-to-noise ratio greater than 35dB. The image feature fingerprint is calculated using a dual hashing mechanism of MD5 and SHA-256, and the copyright metadata is written into the block through the PBFT consensus of the FISCO-BCOS consortium blockchain, utilizing Merk... The le-Patricia-Tree organization status data is stored in the block header with the root hash value to achieve persistent storage and tamper-proof protection of copyright information. A three-layer progressive infringement detection system is established by first calculating Hamming distance to quickly filter similar images, then extracting DCT intermediate frequency coefficients to calculate cosine similarity, and finally extracting the copyright identifier from the singular value diagonal matrix and calculating the bit error rate and normalized correlation coefficient. This reduces computational load while improving detection accuracy. Through smart contracts, the system verifies the digital signatures of both parties in a transaction, queries copyright ownership status, executes fund transfers and copyright changes, generates new copyright certificate identifiers, and triggers on-chain events, achieving automated execution of copyright transactions and complete traceability of historical records.
[0118] Example 3 is an illustrative scheme of a blockchain-based digital image copyright protection method for power grids. It should be noted that the technical solution of this blockchain-based digital image copyright protection system for power grids belongs to the same concept as the technical solution of the aforementioned blockchain-based digital image copyright protection method for power grids. Details not described in detail in the technical solution of the blockchain-based digital image copyright protection system for power grids in this embodiment can be found in the description of the technical solution of the aforementioned blockchain-based digital image copyright protection method for power grids.
[0119] This embodiment also provides a blockchain-based digital image copyright protection system for power grids, comprising: an image processing module for acquiring power grid images and embedding copyright identifiers using a digital watermarking algorithm; a copyright certificate generation module for calculating image feature fingerprints and constructing copyright certificates containing copyright owner information, timestamps, and watermark parameters; a blockchain evidence storage module for storing the copyright certificates on a consortium blockchain network via smart contracts; an infringement detection module for establishing a multi-dimensional matching strategy to identify infringement in the power grid images to be detected and generating an infringement evidence chain; a copyright transaction module for constructing copyright transaction rules and automatically executing copyright transfer or authorization operations via smart contracts; and an access control module for allocating system access permissions based on user identity types.
[0120] This embodiment also provides an electronic device applicable to blockchain-based digital image copyright protection for power grids, comprising: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the blockchain-based digital image copyright protection method for power grids as proposed in the above embodiment.
[0121] This embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, it implements the blockchain-based digital image copyright protection method for power grids as proposed in the above embodiments.
[0122] The storage medium proposed in this embodiment and the blockchain-based digital image copyright protection method for power grids proposed in the above embodiments belong to the same inventive concept. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.
[0123] Based on the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.
[0124] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A blockchain-based method for protecting the copyright of digital images of power grids, characterized in that: This includes acquiring images of power grid equipment, power system drawings, or power grid topology diagrams and verifying their formats; performing discrete cosine transform and singular value decomposition on the power grid images; embedding the copyright identifier into the transformed coefficient matrix to generate a power grid image containing the copyright identifier; calculating the hash value of the power grid image; extracting the copyright owner's public key address and timestamp to form copyright metadata; writing the copyright metadata into the smart contract of the consortium blockchain to generate a copyright certificate record. The algorithm extracts the hash value of the power grid image to be detected and compares it with the copyright metadata in the consortium blockchain. It then filters similar images, calculates the frequency domain feature similarity between the power grid image to be detected and similar images, and extracts the copyright identifier in the image to be detected when the similarity reaches a threshold. It compares the consistency of the copyright identifier, determines infringement, and generates evidence. The algorithm also receives copyright transaction requests, verifies the digital signature of the transacting parties, queries the consortium blockchain to confirm copyright ownership, executes the copyright transfer, and updates the copyright ownership record in the consortium blockchain.
2. The blockchain-based digital image copyright protection method for power grids as described in claim 1, characterized in that: The process of performing discrete cosine transform and singular value decomposition on the power grid image and embedding the copyright identifier into the transformed coefficient matrix includes: dividing the power grid image into image blocks of a preset size; performing discrete cosine transform on each image block to obtain a frequency domain coefficient matrix; performing singular value decomposition on the frequency domain coefficient matrix to obtain a left singular vector matrix, a singular value diagonal matrix, and a right singular vector matrix; embedding the copyright identifier into the mid-frequency coefficients of the singular value diagonal matrix; and performing inverse singular value decomposition and inverse discrete cosine transform on the modified matrix to reconstruct the image blocks and synthesize a complete power grid image containing the copyright identifier.
3. The blockchain-based digital image copyright protection method for power grids as described in claim 2, characterized in that: The process of calculating the hash value of the power grid image, extracting the copyright owner's public key address and timestamp, and forming copyright metadata includes: calculating a first hash value of the power grid image; calculating a second hash value by performing operations on the first hash value and image metadata, which serves as the image feature fingerprint; obtaining the copyright owner's public key address, current timestamp, watermark embedding strength, and image size parameters; and organizing the image feature fingerprint, public key address, timestamp, watermark embedding strength, and image size parameters into structured data to form copyright metadata.
4. The blockchain-based digital image copyright protection method for power grids as described in claim 3, characterized in that: The process of writing copyright metadata into a smart contract on the consortium blockchain to generate a copyright registration record includes: calling the copyright registration smart contract and passing in the copyright metadata; verifying the format and integrity of the copyright metadata; Persistently store copyright metadata in the blockchain's blocks; Generate a copyright certificate identifier code, record the block height and transaction hash value, and return the copyright certificate record.
5. The blockchain-based digital image copyright protection method for power grids as described in claim 4, characterized in that: The step of extracting the hash value of the power grid image to be detected and comparing it with the copyright metadata in the consortium blockchain, and calculating the frequency domain feature similarity between the power grid image to be detected and similar images, includes calculating the hash value of the power grid image to be detected. Traverse the copyright metadata stored in the consortium blockchain, calculate the difference between the hash value of the image to be detected and the hash value of each copyright image, and filter similar images whose difference is less than a preset threshold; perform discrete cosine transform on the power grid image to be detected and the similar images respectively, and extract the intermediate frequency coefficients as feature vectors; Calculate the cosine similarity between feature vectors.
6. The blockchain-based digital image copyright protection method for power grids as described in claim 5, characterized in that: When the similarity reaches a threshold, the copyright identifier in the image to be detected is extracted. The consistency of the copyright identifier is compared to determine infringement and generate evidence. This includes performing discrete cosine transform and singular value decomposition on the power grid image to be detected when the cosine similarity exceeds a preset threshold; extracting the copyright identifier from the intermediate frequency coefficients of the singular value diagonal matrix; calculating the bit error rate and correlation coefficient between the extracted copyright identifier and the original copyright identifier; determining infringement when the bit error rate is lower than the bit error threshold and the correlation coefficient is higher than the correlation threshold; and recording the hash comparison results, feature similarity, extracted copyright identifier, and comparison data to form evidence of infringement.
7. The blockchain-based digital image copyright protection method for power grids as described in claim 6, characterized in that: The process of receiving copyright transaction requests, verifying the digital signatures of the transacting parties, querying the consortium blockchain to confirm copyright ownership, executing copyright transfers, and updating copyright ownership records in the consortium blockchain includes: receiving copyright transaction requests; parsing the digital signatures of the transacting parties and verifying the digital signatures of the transacting initiator; querying copyright registration records in the consortium blockchain to confirm the current copyright ownership and transaction status; invoking the transaction execution smart contract to transfer funds and change copyright ownership; generating a new copyright certificate identifier code; and writing the transaction record and the updated copyright ownership into the consortium blockchain.
8. A blockchain-based digital image copyright protection system for power grids, based on the blockchain-based digital image copyright protection method for power grids according to any one of claims 1 to 7, characterized in that: It also includes: an image processing module for acquiring power grid images and embedding copyright identifiers using a digital watermarking algorithm; a copyright certificate generation module for calculating image feature fingerprints and constructing copyright certificates containing copyright owner information, timestamps, and watermark parameters; a blockchain evidence storage module for storing copyright certificates on a consortium blockchain network via smart contracts; an infringement detection module for establishing a multi-dimensional matching strategy to identify infringement in the power grid images to be detected and generating an infringement evidence chain; and a copyright transaction module for constructing copyright transaction rules and automatically executing copyright transfer or licensing operations via smart contracts. The access control module is used to assign system access permissions based on user identity type.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the blockchain-based digital image copyright protection method for power grids as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the blockchain-based digital image copyright protection method for power grids as described in any one of claims 1 to 7.