A data distribution method and device based on blockchain
By performing frequency domain obfuscation on non-standard data credentials and storing hash values, the problem of data recipient distribution tracking and credibility is solved, and the traceability of the data recipient and the security of non-standard data credentials are achieved.
Patent Information
- Application Number
- CN202011391183.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-02
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2040-12-02
AI Technical Summary
Existing technology cannot effectively track and control the distribution of non-standard data certificates by data recipients, resulting in the inability to ensure the credibility and integrity of non-standard data certificates.
By performing frequency domain obfuscation on non-standard data certificates, high-frequency noise images and noise images are generated, and their hash values are stored on the blockchain to ensure that the noise images of different data recipients are different, and then tracked through hash values The data receiver prevents secondary distribution.
It realizes the traceability and credibility of the non-standard data certificate distribution to the data recipient, ensuring the integrity and security of the data.
Smart Images

Figure CN112634307B
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of financial technology (Fintech), and in particular, to a data distribution method and device based on blockchain. Background Art
[0002] With the development of computer technology, more and more technologies are being applied in the financial field. Traditional finance is gradually transforming into financial technology. However, due to the security and real-time requirements of the financial industry, higher requirements are also placed on technology.
[0003] At present, the trusted distribution of non-standard data certificates is mainly achieved by generating a binary byte stream from the file, performing necessary encoding / decoding / encryption, and then using a hash algorithm to generate a certificate. If a blockchain network is used, the certificate will be stored on the blockchain; if a blockchain is not used, the hash will be stored publicly on the website. The file is then sent to the recipient, who assembles and restores the contents of the file and generates a hash based on the assembled and restored content. The hash is then compared with the publicly announced hash value. If they are consistent, it means that the correct non-standard data certificate has been obtained. However, although this processing method can ensure the integrity of the non-standard data certificate during the transmission process, it cannot control the distribution of the issued non-standard data certificate by the data recipient. Therefore, it is necessary to provide a method for tracking the distribution of the data recipient.
[0004] In summary, there is an urgent need for a blockchain-based data distribution method to track the distribution of non-standard data certificates to data recipients and ensure the credibility of non-standard data certificates. Summary of the invention
[0005] The embodiments of the present invention provide a blockchain-based data distribution method and device, which are used to track the distribution of non-standard data certificates by data recipients and ensure the credibility of non-standard data certificates.
[0006] In a first aspect, an embodiment of the present invention provides a data distribution method based on blockchain, comprising:
[0007] The data sender generates a first image of the non-standard data voucher;
[0008] The data sender performs hole punching processing on the first image based on a hole punching rule to obtain a second image; the content loss between the first image and the second image is less than a set threshold;
[0009] The data sender processes the second image based on a hole filling rule to obtain a first noise image of the data receiver; the first noise images of different data receivers are different;
[0010] The data sender generates a high-frequency noise image of the data receiver according to the second image and the first noise image;
[0011] The data sender sends the high-frequency noise image and the first noise image to the data receiver, and stores the first hash value of the high-frequency noise image and the identifier of the data receiver in correspondence on the blockchain.
[0012] In the above technical solution, the first image is processed by digging holes based on the hole digging rule to obtain the second image. Then, the second image is processed based on the hole filling rule to obtain the first noise image of the data recipient, and the second image and the first noise image of the data recipient are overlapped to generate a high-frequency noise image. Then, the high-frequency noise image and the first noise image are sent to the data recipient, and the first hash value of the high-frequency noise image is stored on the blockchain in correspondence with the identifier of the data recipient. Since the non-standard data voucher is subjected to frequency domain obfuscation processing to generate the first noise image and the high-frequency noise image, and the data recipient verifies the high-frequency noise image based on the first hash value of the high-frequency noise image, the data recipient can be prevented from distributing the non-standard data voucher twice as much as possible, and the credibility of the non-standard data voucher can be ensured. In addition, since the first noise images of different data recipients are different, the data recipient who distributes the non-standard data voucher can be traced based on the first hash value of the high-frequency noise image, so that the data recipient can be tracked for distributing the non-standard data voucher.
[0013] Optionally, the data sender processes the second image based on a hole filling rule to obtain a first noise image of the data receiver, including:
[0014] The data sender processes M holes among the N holes of the first image in a random manner to obtain a first noise image of the data receiver; the number M is determined in a random manner.
[0015] In the above technical solution, by processing M holes out of N holes of the first image in a random manner, a first noise image of the data recipient is obtained, which can ensure that different first noise images are generated for different data recipients. This can provide support for subsequently determining the data recipient for distributing non-standard data vouchers based on the first hash value of the high-frequency noise image.
[0016] Optionally, the data sender performs hole digging processing on the first image based on a hole digging rule to obtain a second image, including:
[0017] The data sender performs Fourier transform processing on the first image to determine a first frequency spectrum diagram;
[0018] The data sender determines, from the first spectrum diagram, a plurality of regions whose amplitudes satisfy the hole-digging rule;
[0019] The data sender sets the amplitudes of the multiple regions to zero to obtain the first frequency spectrum after hole digging;
[0020] The data sender performs inverse Fourier transform processing on the first spectrum image after the puncturing to obtain the second image.
[0021] In the above technical solution, by determining multiple areas whose amplitudes meet the hole-digging rule from the first spectrum graph and setting the amplitudes of the multiple areas to zero, holes can be dug quickly and accurately, and as many holes as possible and as large as possible can be dug. This can avoid the data recipient from redistributing the non-standard data voucher as much as possible, and provide support for the subsequent determination of the data recipient for distributing the non-standard data voucher based on the first hash value of the high-frequency noise image.
[0022] Optionally, the data sender processes M holes of the N holes of the first image in a random manner to obtain a first noise image of the data receiver, including:
[0023] The data sender processes M holes among the N holes of the first image in a random manner to generate a second frequency spectrum with a non-zero amplitude;
[0024] The data sender performs inverse Fourier transform processing on the second spectrum graph to obtain a first noise image of the data receiver.
[0025] In the above technical solution, M holes out of N holes of the first image are processed in a random manner to generate a second frequency spectrum diagram with non-zero amplitude. In this way, a frequency spectrum diagram for filling the holes of the second image can be generated quickly and accurately, and different first noise images can be generated for different data recipients, so as to provide support for the subsequent determination of the data recipient for distributing non-standard data vouchers based on the first hash value of the high-frequency noise image.
[0026] Optionally, the data sender generates a high-frequency noise image of the data receiver according to the second image and the first noise image, including:
[0027] The data sender performs overlapping processing on the second spectrum graph corresponding to the first noise image and the first spectrum graph after punching corresponding to the second image to obtain an overlapped spectrum graph;
[0028] The data sender performs inverse Fourier transform processing on the overlapped spectrum graph to obtain the high-frequency noise image.
[0029] In the above technical solution, a high-frequency noise image can be generated quickly and accurately by performing hole-filling processing on the first spectrum graph after hole-digging corresponding to the second image based on the second spectrum graph corresponding to the first noise image.
[0030] Optionally, storing the hash value of the high-frequency noise image and the identifier of the data recipient on the blockchain in correspondence includes:
[0031] The data sender processes the high-frequency noise image based on a preset hash algorithm to obtain a first hash value of the high-frequency noise image;
[0032] The data sender uploads the first hash value of the high-frequency noise image to the smart contract of the blockchain, and records the correspondence between the identifier of the data receiver and the first hash value of the high-frequency noise image in the smart contract.
[0033] In the above technical solution, by uploading the first hash value of the high-frequency noise image to the smart contract of the blockchain, and recording the correspondence between the identifier of the data recipient and the first hash value of the high-frequency noise image in the smart contract, support can be provided for subsequent data recipients to verify the received high-frequency noise image based on the first hash value, and support can be provided for subsequent tracking of the data recipient who distributes the non-standard data certificate based on the first hash value.
[0034] Optionally, the data sender sends the high-frequency noise image and the first noise image to the data receiver, including:
[0035] The data sender obtains the public key of the data recipient from the blockchain based on the identifier of the data recipient; the public key is generated by the data recipient and uploaded to the blockchain;
[0036] The data sender uses the public key to encrypt the high-frequency noise image and the first noise image respectively to obtain an encrypted high-frequency noise image and an encrypted first noise image;
[0037] The data sender sends the encrypted high-frequency noise image and the encrypted first noise image to the data receiver.
[0038] In the above technical solution, the privacy security of the high-frequency noise image and the first noise image can be ensured by using the public key of the data receiver to encrypt the high-frequency noise image and the first noise image respectively.
[0039] Optionally, after the hash value of the high-frequency noise image and the identifier of the data recipient are stored in the blockchain in correspondence, the method further includes:
[0040] The data sender receives a verification request sent by the data verifier; the verification request includes the second image;
[0041] The data sender determines that the second image has not been sent to the data verifier, and then rejects the verification request.
[0042] In the above technical solution, by judging whether the second image has been sent to the data verifier based on the verification request sent by the data verifier, it is possible to determine whether to send the verification result to the data verifier. In this way, the data recipient of the non-standard data voucher can be determined in a timely and accurate manner.
[0043] Optionally, after the hash value of the high-frequency noise image and the identifier of the data recipient are stored in the blockchain in correspondence, the method further includes:
[0044] The data sender receives a verification request sent by the data verifier; the verification request includes the high-frequency noise image;
[0045] The data sender determines the data recipient corresponding to the high-frequency noise image from the blockchain, thereby determining whether the data verifier obtained the high-frequency noise image from the data recipient.
[0046] In the above technical solution, the data recipient corresponding to the high-frequency noise image is determined from the blockchain based on the verification request sent by the data verifier, thereby determining whether the data verifier obtained the high-frequency noise image from the data recipient. In this way, the data recipient of the distributed non-standard data certificate can be determined in a timely and accurate manner.
[0047] In a second aspect, an embodiment of the present invention provides a data distribution method based on blockchain, comprising:
[0048] The data receiving party receives the high-frequency noise image and the first noise image sent by the data sending party; the high-frequency noise image is generated by the data sending party according to the second image and the first noise image; the first noise image is obtained by the data sending party processing the second image based on the hole filling rule; the second image is obtained by the data sending party performing hole digging processing on the first image based on the hole digging rule; the first image is generated by the data sending party based on the non-standard data voucher;
[0049] The data recipient verifies the high-frequency noise image based on the first hash value of the high-frequency noise image, and after successful verification, performs time-domain convolution processing on the high-frequency noise image and the first noise image to obtain the second image; the first hash value of the high-frequency noise image is obtained by the data recipient from the blockchain to which it belongs based on the identifier of the data recipient.
[0050] In the above technical solution, the high-frequency noise image is verified based on the first hash value of the high-frequency noise image, and after the verification is successful, the high-frequency noise image and the first noise image are subjected to time domain convolution processing to obtain a second image. Since the data sender performs frequency domain obfuscation processing on the non-standard data voucher to generate a first noise image and a high-frequency noise image, and the data receiver verifies the high-frequency noise image based on the first hash value of the high-frequency noise image, the data receiver can be prevented from performing secondary distribution of the non-standard data voucher as much as possible, and the credibility of the non-standard data voucher can be ensured. In addition, since the first noise images of different data receivers are different, the data receiver that distributes the non-standard data voucher can be traced based on the first hash value of the high-frequency noise image, so that the data receiver who distributes the non-standard data voucher can be tracked.
[0051] Optionally, the data receiving party receives the high-frequency noise image and the first noise image sent by the data sending party, including:
[0052] The data receiving party receives the encrypted high-frequency noise image and the encrypted first noise image sent by the data sending party; the encrypted high-frequency noise image and the encrypted first noise image are determined by the data sending party encrypting the high-frequency noise image and the first noise image using a public key; the public key is generated by the data receiving party and uploaded to the blockchain;
[0053] The data receiving party uses a private key to decrypt the encrypted high-frequency noise image and the encrypted first noise image respectively to obtain a decrypted high-frequency noise image and a decrypted first noise image; the private key is generated by the data receiving party.
[0054] In the above technical solution, since the data sender encrypts the high-frequency noise image and the first noise image respectively by using the public key of the data receiver, the privacy security of the high-frequency noise image and the first noise image can be ensured.
[0055] Optionally, the data receiving party verifies the high-frequency noise image based on the first hash value of the high-frequency noise image, including:
[0056] The data receiving party processes the decrypted high-frequency noise image based on a preset hash algorithm to obtain a second hash value of the high-frequency noise image;
[0057] The data receiving party verifies whether the second hash value of the high-frequency noise image is consistent with the first hash value of the high-frequency noise image;
[0058] If so, the data receiving party determines that the high-frequency noise image verification is successful.
[0059] In the above technical solution, by verifying whether the second hash value of the high-frequency noise image is consistent with the first hash value of the high-frequency noise image, it is possible to timely and accurately determine whether the high-frequency noise image has been tampered with, thereby ensuring the credibility of the non-standard data certificate.
[0060] Optionally, performing time-domain convolution processing on the high-frequency noise image and the first noise image to obtain the second image includes:
[0061] The data receiving party processes the decrypted first noise image to generate a second noise image; the second noise image has the same frequency and opposite phase as the first noise image;
[0062] The data receiving party performs time-domain convolution processing on the high-frequency noise image and the second noise image to obtain the second image.
[0063] In the above technical solution, since the second noise image has the same frequency and opposite phase as the first noise image in the high-frequency noise image, the high-frequency noise image and the second noise image are subjected to time domain convolution processing, that is, the first noise image in the high-frequency noise image can be removed by using the second noise image, so that the second image can be accurately obtained.
[0064] In a third aspect, an embodiment of the present invention provides a data distribution device based on blockchain, comprising:
[0065] A generating unit, configured to generate a first image of a non-standard data voucher;
[0066] The first processing unit is used to perform hole digging processing on the first image based on a hole digging rule to obtain a second image; the content loss between the first image and the second image is less than a set threshold; based on a hole filling rule, the second image is processed to obtain a first noise image of a data recipient; the first noise images of different data recipients are different; based on the second image and the first noise image, a high-frequency noise image of the data recipient is generated; the high-frequency noise image and the first noise image are sent to the data recipient, and the first hash value of the high-frequency noise image is stored in the blockchain in correspondence with the identifier of the data recipient.
[0067] Optionally, the first processing unit is specifically configured to:
[0068] M holes among the N holes of the first image are processed in a random manner to obtain a first noise image of the data receiver; the number M is determined in a random manner.
[0069] Optionally, the first processing unit is specifically configured to:
[0070] Performing Fourier transform processing on the first image to determine a first frequency spectrum;
[0071] Determining, from the first spectrum graph, a plurality of regions whose amplitudes satisfy the hole-digging rule;
[0072] Setting the amplitudes of the multiple regions to zero to obtain the first frequency spectrum after hole digging;
[0073] Perform inverse Fourier transform processing on the first spectrum image after the hole is dug to obtain the second image.
[0074] Optionally, the first processing unit is specifically configured to:
[0075] Processing M holes of the N holes of the first image in a random manner to generate a second frequency spectrum with a non-zero amplitude;
[0076] Perform inverse Fourier transform processing on the second spectrum graph to obtain a first noise image of the data receiver.
[0077] Optionally, the first processing unit is specifically configured to:
[0078] Overlapping the second spectrum graph corresponding to the first noise image and the first spectrum graph after punching corresponding to the second image to obtain an overlapped spectrum graph;
[0079] The overlapped spectrum graph is subjected to inverse Fourier transform processing to obtain the high-frequency noise image.
[0080] Optionally, the first processing unit is specifically configured to:
[0081] Processing the high-frequency noise image based on a preset hash algorithm to obtain a first hash value of the high-frequency noise image;
[0082] The first hash value of the high-frequency noise image is uploaded to the smart contract of the blockchain, and the correspondence between the identifier of the data recipient and the first hash value of the high-frequency noise image is recorded in the smart contract.
[0083] Optionally, the first processing unit is specifically configured to:
[0084] Based on the identifier of the data recipient, obtain the public key of the data recipient from the blockchain to which it belongs; the public key is generated by the data recipient and uploaded to the blockchain;
[0085] Using the public key to encrypt the high-frequency noise image and the first noise image respectively, to obtain an encrypted high-frequency noise image and an encrypted first noise image;
[0086] The encrypted high-frequency noise image and the encrypted first noise image are sent to the data receiver.
[0087] Optionally, the first processing unit is further configured to:
[0088] After the hash value of the high-frequency noise image and the identifier of the data recipient are stored in the blockchain in correspondence, a verification request sent by a data verifier is received; the verification request includes the second image;
[0089] If it is determined that the second image has not been sent to the data verification party, the verification request is rejected.
[0090] Optionally, the first processing unit is further configured to:
[0091] After the hash value of the high-frequency noise image and the identifier of the data recipient are stored in the blockchain in correspondence, a verification request sent by a data verifier is received; the verification request includes the high-frequency noise image;
[0092] The data recipient corresponding to the high-frequency noise image is determined from the blockchain, thereby determining whether the data verifier obtained the high-frequency noise image from the data recipient.
[0093] In a fourth aspect, an embodiment of the present invention provides a data distribution device based on blockchain, comprising:
[0094] A receiving unit, configured to receive a high-frequency noise image and a first noise image sent by a data sender; the high-frequency noise image is generated by the data sender according to a second image and the first noise image; the first noise image is obtained by the data sender processing the second image based on a hole filling rule; the second image is obtained by the data sender performing hole digging processing on the first image based on a hole digging rule; the first image is generated by the data sender based on a non-standard data voucher;
[0095] The second processing unit is used to verify the high-frequency noise image based on the first hash value of the high-frequency noise image, and after successful verification, perform time-domain convolution processing on the high-frequency noise image and the first noise image to obtain the second image; the first hash value of the high-frequency noise image is obtained by the data recipient from the blockchain to which it belongs based on the identifier of the data recipient.
[0096] Optionally, the receiving unit is specifically configured to:
[0097] Receive the encrypted high-frequency noise image and the encrypted first noise image sent by the data sender; the encrypted high-frequency noise image and the encrypted first noise image are determined by the data sender encrypting the high-frequency noise image and the first noise image using a public key; the public key is generated by the data receiver and uploaded to the blockchain;
[0098] The encrypted high-frequency noise image and the encrypted first noise image are respectively decrypted using a private key to obtain a decrypted high-frequency noise image and a decrypted first noise image; the private key is generated by the data receiver.
[0099] Optionally, the second processing unit is specifically configured to:
[0100] Processing the decrypted high-frequency noise image based on a preset hash algorithm to obtain a second hash value of the high-frequency noise image;
[0101] Verifying whether the second hash value of the high-frequency noise image is consistent with the first hash value of the high-frequency noise image;
[0102] If so, it is determined that the high-frequency noise image verification is successful.
[0103] Optionally, the second processing unit is specifically configured to:
[0104] Processing the decrypted first noise image to generate a second noise image; the second noise image has the same frequency and opposite phase as the first noise image;
[0105] The high-frequency noise image and the second noise image are subjected to time-domain convolution processing to obtain the second image.
[0106] In a fifth aspect, an embodiment of the present invention provides a computing device, including:
[0107] Memory for storing computer programs;
[0108] The processor is used to call the computer program stored in the memory and execute the blockchain-based data distribution method according to the obtained program.
[0109] In a sixth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer-executable program, and the computer-executable program is used to enable a computer to execute a blockchain-based data distribution method. BRIEF DESCRIPTION OF THE DRAWINGS
[0110] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0111] Figure 1 A schematic diagram of a system architecture for distributing non-standard data vouchers provided by an embodiment of the present invention;
[0112] Figure 2 A flowchart of a data distribution method based on blockchain provided by an embodiment of the present invention;
[0113] Figure 3a A schematic diagram of an avatar bitmap provided by an embodiment of the present invention;
[0114] Figure 3b A schematic diagram of a two-dimensional spectrum diagram of an avatar bitmap provided by an embodiment of the present invention;
[0115] Figure 3c A schematic diagram of a two-dimensional spectrum diagram of an avatar bitmap after hole digging provided by an embodiment of the present invention;
[0116] Figure 3d A schematic diagram of an embodiment of the present invention providing a method of performing inverse Fourier transform processing on a two-dimensional spectrum diagram after hole digging;
[0117] Figure 3e A schematic diagram of a noise two-dimensional spectrum diagram for a two-dimensional spectrum diagram after hole digging provided by an embodiment of the present invention;
[0118] Figure 3f A schematic diagram of a two-dimensional spectrum diagram after hole filling provided by an embodiment of the present invention;
[0119] Figure 4 A schematic diagram of the structure of a data distribution device based on blockchain provided by an embodiment of the present invention;
[0120] Figure 5 A schematic diagram of the structure of another blockchain-based data distribution device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0121] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0122] First, some terms involved in the embodiments of the present invention are explained below to facilitate understanding by those skilled in the art.
[0123] (1) Non-standard data vouchers: refers to a series of data vouchers that have not been digitized or cannot be digitized to generate structured data, such as scanned copies, image-based electronic seals, interactive PDF documents, etc.
[0124] (2) Hash: A type of hash algorithm used to generate a string-formatted summary for longer data. It can generally be represented by a 64-character HEX (hexadecimal) string. For example, it can be implemented using algorithms such as sha3 and md5.
[0125] (3) Smart contract: A computer protocol designed to communicate, verify or execute contracts in an information-based manner. The overall goal of smart contract design is to meet common contract conditions (such as payment terms, liens, confidentiality, and execution, etc.), minimize malicious and accidental anomalies, and minimize reliance on trusted intermediaries.
[0126] (4) Blockchain: Blockchain is a chain consisting of a series of blocks. In addition to recording the data of the current block, each block also records the hash value of the previous block, forming a chain in this way. In addition, there are two core concepts of blockchain: one is cryptography technology, and the other is decentralization. Based on these two concepts, the historical information on the blockchain cannot be tampered with. A block in the blockchain consists of a block header and a block body. Among them, the block header mainly includes the block height h, the hash of the previous block, etc., while the block body mainly stores transaction data.
[0127] (5) Alliance chain: In blockchain technology, blockchain can be divided into public chain, private chain and alliance chain according to the different access control permissions of blockchain network. Among them, the nodes of public chain are a kind of blockchain structure that anyone can participate in and access; private chain is a blockchain structure that is only open to a single individual (such as within a company, school, etc.); alliance chain is a very widely used and common blockchain structure. In this structure, the blockchain is maintained by certain specific organizations, open to certain individuals, and regulatory nodes can be introduced to make the blockchain tamper-proof while meeting the corresponding regulatory requirements.
[0128] As mentioned above, some terms involved in the embodiments of the present invention are introduced. Now, the technical features involved in the embodiments of the present invention are introduced.
[0129] In the prior art, watermarking technology is usually used to process non-standard data vouchers to prevent the data recipient from redistributing the non-standard data vouchers. That is, the data sender puts a watermark on the non-standard data voucher to be sent, and processes the watermarked non-standard data voucher based on the hash algorithm to obtain the hash value of the watermarked non-standard data voucher, and then sends the watermarked non-standard data voucher to the data recipient. However, if the data recipient simply smears the watermarked non-standard data voucher, the non-standard data voucher can be redistributed, and because the hash algorithm needs to be calculated for the binary byte stream of each source file, and small modifications to the image usually do not affect the overall naked eye recognition effect, the possibility of tracking by using hash values is very low, so it can evade the tracking of the data sender. Based on this, an embodiment of the present invention provides a method for achieving traceability of the distribution of data recipients.
[0130] In order to facilitate understanding of the embodiments of the present invention, first Figure 1 The system architecture shown in the example is used to illustrate the non-standard data voucher distribution system architecture applicable to the embodiment of the present invention. The non-standard data voucher distribution system architecture can be applied to the distribution of non-standard data vouchers between users of the blockchain, etc. In actual application scenarios, the present invention does not limit this. Figure 1 As shown, the system architecture may include at least one data sender (such as data sender 1, data sender 2, and data sender 3, etc.), a blockchain, and at least one data receiver (such as data receiver 1, data receiver 2, and data receiver 3, etc.). Each data sender is connected to the blockchain, each data receiver is connected to the blockchain, and the data receiver can be connected to the data receiver, such as by wired connection or wireless connection, which is not specifically limited. It should be noted that the data sender can be the data receiver, and the data receiver can also be the data sender, which is not limited in the embodiment of the present invention.
[0131] Exemplarily, the process of distributing non-standard data certificates is described by taking the data sender 1 sending the non-standard data certificate to the data receiver 1 as an example. Before distributing the non-standard data certificate, the data sender 1 and the data receiver 1 have applied for registration to join the alliance chain and become members of the alliance chain after successful authentication. The data sender 1 generates a pair of public and private keys locally, and uploads the public key to the blockchain for storage so that each alliance chain member can see the public keys of other members. After the data sender 1 processes the non-standard data certificate, it obtains the processed non-standard data certificate, and processes the processed non-standard data certificate based on the hash algorithm to obtain the hash value of the processed non-standard data certificate, and uploads the hash value of the processed non-standard data certificate to the blockchain for storage, so that the data receiver 1 can verify the processed non-standard data certificate based on the hash value of the processed non-standard data certificate. The processed non-standard data certificate is then sent to data recipient 1, so that data recipient 1 processes the processed non-standard data certificate based on the Hash algorithm to obtain a new hash value of the processed non-standard data certificate, and compares the hash value of the processed non-standard data certificate on the blockchain with the new hash value of the processed non-standard data certificate. After the comparison is successful, the processed non-standard data certificate is processed again to obtain a non-standard data certificate.
[0132] It should be noted that the above Figure 1 The structure shown is only an example and is not limited to this embodiment of the present invention.
[0133] Based on the above description, Figure 2 The present invention exemplarily illustrates a process of a blockchain-based data distribution method provided by an embodiment of the present invention, which process can be executed by a blockchain-based data distribution device.
[0134] like Figure 2 As shown in the figure, the process specifically includes:
[0135] Step 201: A data sender generates a first image of a non-standard data voucher.
[0136] Step 202: The data sender performs hole digging processing on the first image based on a hole digging rule to obtain a second image.
[0137] Step 203: the data sender processes the second image based on a hole filling rule to obtain a first noise image of the data receiver.
[0138] Step 204: The data sender generates a high-frequency noise image of the data receiver according to the second image and the first noise image.
[0139] Step 205: The data sender sends the high-frequency noise image and the first noise image to the data receiver.
[0140] Step 206: The data receiving party verifies the high-frequency noise image based on the first hash value of the high-frequency noise image, and after successful verification, performs time-domain convolution processing on the high-frequency noise image and the first noise image to obtain the second image.
[0141] In the above steps 201 and 202, the data sender generates a first image of a non-standard data voucher. For example, the data sender can use image processing software (such as Ps software, etc.) or other processing methods to process the non-standard data voucher to generate a first image of the non-standard data voucher. Then, based on the hole digging rule, the first image is subjected to hole digging processing to obtain a second image. That is, the data sender performs Fourier transform processing on the first image to determine the first spectrum graph, and determines multiple regions whose amplitudes meet the hole digging rule from the first spectrum graph. Then, the amplitudes of multiple regions are set to zero to obtain the first spectrum graph after hole digging, and the first spectrum graph after hole digging is subjected to Fourier transform inverse transform processing to obtain the second image. In this way, holes can be dug quickly and accurately, and as many holes as possible and as large as possible can be dug. Thereby, the data recipient can be prevented from performing secondary distribution of the non-standard data voucher as much as possible, and support can be provided for the subsequent determination of the data recipient for distributing the non-standard data voucher based on the first hash value of the high-frequency noise image. The content loss between the first image and the second image is less than a set threshold; the set threshold may be set based on experience or may be set based on a degree of content loss between the first image and the second image that is acceptable to the data sender.
[0142] In the above step 203, the data sender processes the second image based on the hole filling rule to obtain the first noise image of the data receiver. That is, the data sender processes M holes of the N holes of the first image in a random manner to generate a second spectrum with a non-zero amplitude, and performs Fourier transform inverse transformation on the second spectrum to obtain the first noise image of the data receiver. In this way, a spectrum for hole filling for the second image can be generated quickly and accurately, and different first noise images can be generated for different data receivers, so as to provide support for the subsequent determination of the data receiver for distributing non-standard data vouchers based on the first hash value of the high-frequency noise image. Among them, the first noise images of different data receivers are different; the number of M is determined by a random method. Among them, N and M are both positive integers. It should be noted that in order to ensure that the first noise images of different data receivers are different, for each data receiver, when generating the first noise image for hole filling, the number of holes to be filled selected from the N holes of the first image can be the same, but the filled holes are different. Alternatively, for each data receiver, when generating the first noise image for hole filling, the number of holes to be filled selected from the N holes of the first image is different, and the filled holes are also different.
[0143] In the above steps 204 and 205, the data sender generates a high-frequency noise image of the data receiver based on the second image and the first noise image. Then the high-frequency noise image and the first noise image are sent to the data receiver, and the first hash value of the high-frequency noise image is stored in the blockchain in correspondence with the identifier of the data receiver. That is, the data sender overlaps the second spectrum map corresponding to the first noise image and the first spectrum map after punching corresponding to the second image to obtain the overlapped spectrum map, and performs Fourier transform inverse transformation on the overlapped spectrum map to obtain the high-frequency noise image. Then, based on the identifier of the data receiver, the public key of the data receiver is obtained from the blockchain to which it belongs, and the high-frequency noise image and the first noise image are encrypted using the public key to obtain the encrypted high-frequency noise image and the encrypted first noise image. By filling the holes of the first spectrum map after punching corresponding to the second image based on the second spectrum map corresponding to the first noise image, the high-frequency noise image can be generated quickly and accurately. After that, the encrypted high-frequency noise image and the encrypted first noise image are sent to the data receiver, which can ensure the privacy security of the high-frequency noise image and the first noise image. In addition, the high-frequency noise image is processed based on a preset hash algorithm to obtain a first hash value of the high-frequency noise image, and the first hash value of the high-frequency noise image is uploaded to the smart contract of the blockchain, and the corresponding relationship between the identifier of the data recipient and the first hash value of the high-frequency noise image is recorded in the smart contract, which can provide support for subsequent data recipients to verify the received high-frequency noise image based on the first hash value, and can provide support for subsequent tracking of the data recipient who distributes the non-standard data voucher based on the first hash value. Among them, the public key is generated by the data recipient and uploaded to the blockchain.
[0144] It should be noted that after the hash value of the high-frequency noise image is stored in correspondence with the identifier of the data recipient on the blockchain, if the data recipient distributes the non-standard data certificate without authorization, the data recipient who distributes the non-standard data certificate without authorization can be tracked down through two tracking methods. One tracking method is that the data sender receives a verification request sent by the data verifier, and the verification request includes a second image. It can be determined based on the second image whether the second image has been sent to the data verifier. If it is determined that the second image has not been sent to the data verifier, the verification request of the data verifier is rejected. Another tracking method is that the data sender receives a verification request sent by the data verifier, and the verification request includes a high-frequency noise image. The data recipient corresponding to the high-frequency noise image can be determined from the blockchain, thereby determining whether the data verifier obtained the high-frequency noise image from the data recipient. In this way, the data recipient who distributes the non-standard data certificate can be determined in a timely and accurate manner.
[0145] In the above step 206, the data receiving party receives the high-frequency noise image and the first noise image sent by the data sending party. That is, the data receiving party receives the encrypted high-frequency noise image and the encrypted first noise image sent by the data sending party, and uses the private key to decrypt the encrypted high-frequency noise image and the encrypted first noise image respectively to obtain the decrypted high-frequency noise image and the decrypted first noise image, so as to ensure the privacy security of the high-frequency noise image and the first noise image. Then, the decrypted high-frequency noise image is processed based on the preset hash algorithm to obtain the second hash value of the high-frequency noise image, and verify whether the second hash value of the high-frequency noise image is consistent with the first hash value of the high-frequency noise image. If so, it is determined that the high-frequency noise image verification is successful, and it can be timely and accurately determined whether the high-frequency noise image has been tampered with, so as to ensure the credibility of the non-standard data certificate. After the verification is successful, the high-frequency noise image and the first noise image are subjected to time domain convolution processing to obtain the second image. That is, the decrypted first noise image is processed to generate the second noise image, and the high-frequency noise image and the second noise image are subjected to time domain convolution processing to obtain the second image. Since the second noise image has the same frequency and opposite phase as the first noise image in the high-frequency noise image, the second noise image can be used to remove the first noise image in the high-frequency noise image, so that the second image can be accurately obtained. Among them, the first hash value of the high-frequency noise image is obtained by the data recipient from the blockchain based on the data recipient's identity; the second noise image has the same frequency and opposite phase as the first noise image; the private key is generated by the data recipient.
[0146] In view of this, the implementation process of distributing non-standard data vouchers in an embodiment of the present invention is described in detail below.
[0147] Step 1: Registration and authentication.
[0148] Before participating in data interaction, the data sender and the data receiver need to register and authenticate to become members of the alliance chain. That is, each participant in the data interaction joins the alliance chain after registration and authentication, generates a pair of public and private keys locally, and uploads the public key to the alliance chain so that the members of the alliance chain can see the public key. Exemplarily, the registration and authentication process is described by taking data sender 1 and data receiver 1 as an example. Before data sender 1 interacts with data receiver 1, data sender 1 and data receiver 1 reach a consensus to form an alliance chain so that data interaction can be carried out within the alliance chain system and the interactive data can be recorded together. Alternatively, the alliance chain has been formed, and data sender 1 and data receiver 1 want to join the alliance chain for data interaction. Based on this, data sender 1 and data receiver 1 both need to initiate a registration request to the alliance chain. After the alliance chain authenticates the registration request of data sender 1 and data receiver 1, data sender 1 and data receiver 1 successfully join the alliance chain. After that, data interaction is carried out within the alliance chain system, so that the immutability and accuracy of the interactive data can be ensured.
[0149] Step 2: Data sending.
[0150] The data sender performs frequency domain obfuscation processing on the non-standard data voucher to generate a high-frequency noise image and a noise image. The high-frequency noise image is processed based on the hash algorithm, and the hash value of the high-frequency noise image is uploaded to the alliance chain. The high-frequency noise image and the noise image are then encrypted, and the encrypted high-frequency noise image and the noise image are sent to the data receiver. The specific process of processing the non-standard data voucher is as follows:
[0151] a. The data sender converts the non-standard data voucher into a bitmap image (M1).
[0152] For example, the data sender can use Ps software (Photoshop) to convert the non-standard data voucher into a bitmap image, or use Ai software (Adobe illustrator) to convert the non-standard data voucher into a bitmap image. Of course, other tools or image processing methods can also be used to convert the non-standard data voucher into a bitmap image (M1). For example, taking the non-standard data voucher as an avatar as an example, Figure 3a The figure is a schematic diagram of an avatar bitmap provided by an embodiment of the present invention, and the embodiment of the present invention does not limit this. It should be noted that the specific conversion tool or image processing method used is determined by the data sender, as long as the data sender can accept that the converted bitmap image does not have excessive quality loss.
[0153] b. The data sender performs a two-dimensional discrete Fourier transform on M1 to generate a two-dimensional spectrum graph MF1 of M1.
[0154] For example, the data sender will Figure 3a The avatar bitmap shown in FIG. 1 is processed by two-dimensional discrete Fourier transform to generate the following Figure 3b The two-dimensional spectrum diagram MF1 of the avatar bitmap is shown.
[0155] c. The data sender performs a puncturing process on MF1 based on the spectrum value in MF1 to obtain a punctured MF1.
[0156] The data sender analyzes the spectrum value in MF1, determines multiple discontinuous two-dimensional regions with amplitudes less than a preset threshold (such as 0.2), and sets the amplitude of the two-dimensional region to 0 (i.e., performs a hole-digging process on a specific region in MF1), and obtains the MF1 after the hole-digging. Then, after a single hole-digging process is completed, the MF1 after the hole-digging needs to be subjected to a two-dimensional discrete Fourier transform inverse transform process to obtain the image M1. ′ , and M1 ′ Compare with M1, check the picture after hole digging M1 ′ Is there too much loss in content quality? ′ If there is too much loss, it is necessary to adjust the preset threshold or adjust the hole-digging processing method of MF1 to avoid excessive loss of content quality of the image after the hole-digging. ′ If there is no excessive loss, the subsequent steps can be processed. Based on this, the data sender needs to repeat this operation many times, and dig as many and as large holes as possible while ensuring that the content quality of the picture after digging the holes is not excessively lost. After repeated digging operations, a two-dimensional spectrum graph MF2 is obtained, and MF2 is subjected to a two-dimensional discrete Fourier transform inverse transform process to obtain a picture M2. Without loss of generality, it is assumed that N holes have been dug in the picture M2. Among them, the center of the image in the two-dimensional spectrum graph MF1 is the average brightness of the image, and the frequency is 0. From the center of the image to the outside, the frequency gradually increases. Generally speaking, areas with high frequencies correspond to low amplitudes, and areas with low frequencies correspond to high amplitudes. Exemplarily, the data sender is based on the following Figure 3b The spectrum value of the two-dimensional spectrum diagram of the avatar bitmap shown in Figure 3b The two-dimensional spectrum diagram of the avatar bitmap shown in FIG. 1 is subjected to hole digging processing to obtain the following Figure 3c The two-dimensional spectrum diagram MF2 shown in the figure is shown in the figure. Figure 3c The two-dimensional spectrum diagram MF2 shown in FIG. 1 is subjected to two-dimensional discrete Fourier transform inverse transform processing to generate the following Figure 3d Picture M2 shown.
[0157] It should be noted that other hole-digging methods may also be used to perform hole-digging processing on MF1. For example, the spectrum value (amplitude) in MF1 is multiplied by a very small value (a number greater than or equal to 0) to achieve the purpose of digging holes in MF1, so that a hole-digging image can be obtained. Then, the amplitude of the hole-digging image is multiplied by a larger value (a number greater than 0) to achieve the purpose of filling holes in the hole-digging image, so that a hole-filled image can be obtained.
[0158] d. The data sender randomly generates a two-dimensional spectrum graph OF2 with a non-zero amplitude and a random phase based on the two-dimensional spectrum graph MF2 of M2 with N holes dug in it. OF2 is subjected to a two-dimensional discrete Fourier transform inverse transform process to generate a noise image O2. Then, MF2 and OF2 are overlapped (i.e., MF2 is subjected to hole-filling process) to obtain a two-dimensional spectrum graph after hole-filling, and a two-dimensional discrete Fourier transform inverse transform process is performed on the two-dimensional spectrum graph after hole-filling to generate a high-frequency noise image MO2. Exemplarily, the data sender generates a two-dimensional spectrum graph of M2 with a non-zero amplitude and a random phase based on the two-dimensional spectrum graph MF2 after hole-filling. Figure 3c The two-dimensional spectrum diagram MF2 shown in the figure generates Figure 3e The two-dimensional spectrum diagram OF2 is shown, and the Figure 3c The two-dimensional spectrum diagram MF2 shown in FIG. Figure 3e The two-dimensional spectrum diagram OF2 shown in FIG. Figure 3f The two-dimensional spectrum after hole filling is shown.
[0159] e. The data sender converts MO2 and O2 into binary byte streams respectively, and processes the binary byte stream of MO2 based on the hash algorithm to obtain the hash value of MO2, and then writes the hash value of MO2 into the smart contract of the alliance chain. At the same time, it is also necessary to record the relationship mapping between the hash value of MO2 and the corresponding recipient's ID on the alliance chain, or record the relationship mapping between the hash value of MO2 and the ID of the non-standard data voucher and the corresponding recipient's ID. For O2, O2 can be processed based on the hash algorithm to obtain the hash value of O2, and the relationship mapping between the hash value of O2 and the corresponding recipient's ID is stored locally, but no on-chain operation is performed; or, O2 is not hashed and no on-chain operation is performed.
[0160] f. The data sender uses the public key corresponding to the ID of the data receiver to encrypt MO2 and O2 to obtain encrypted MO2 and O2. The encrypted MO2 and O2 are sent to the data receiver corresponding to the ID. The data sender can send the encrypted MO2 and O2 to the data receiver corresponding to the ID in an on-chain or off-chain manner, which is not limited in the embodiment of the present invention.
[0161] It should be noted that in addition to the above-mentioned method of processing non-standard data vouchers, the data sender may also use other processing methods to process non-standard data vouchers. For example, under the premise of ensuring that the non-standard data voucher does not have excessive quality loss, the non-standard data voucher is directly punched based on a certain punching method; or for the non-critical content of the non-standard data voucher, the non-standard data voucher is directly punched based on a certain punching method; and the punched non-standard data voucher is sent to the data receiver, so that the data receiver fills the holes of the punched non-standard data voucher based on a filling method corresponding to a certain punching method, and obtains a non-standard data voucher without excessive quality loss. Alternatively, for the non-critical contents in multiple locations in the non-standard data voucher, the non-critical contents in several locations (such as one location, two locations, or more than two locations) are randomly selected from the non-critical contents in the multiple locations, and the non-critical contents in the randomly selected locations are fuzzified, and the non-standard data voucher after fuzzification is processed based on the hash algorithm to obtain the hash value of the non-standard data voucher after fuzzification, and the hash value of the non-standard data voucher after fuzzification is uploaded to the blockchain, and the corresponding relationship between the hash value of the non-standard data voucher after fuzzification and the ID of the data recipient is recorded on the blockchain. After that, the non-standard data voucher after fuzzification is sent to the data recipient, so that the data recipient processes the non-standard data voucher after fuzzification based on the hash algorithm to obtain a new hash value of the non-standard data voucher after fuzzification, and verifies whether the hash value after fuzzification on the blockchain is consistent with the new hash value of the non-standard data voucher after fuzzification, and after verifying the consistency, it is determined that the non-standard data voucher is credible. This can also avoid the data recipient from redistributing the non-standard data certificate as much as possible, and ensure the credibility and traceability of the non-standard data certificate.
[0162] Step 3: Data analysis and verification.
[0163] The data receiver parses the encrypted MO2 and O2 to obtain M2. The specific process of parsing the encrypted MO2 and O2 is as follows:
[0164] a. The data receiver uses its own private key to decrypt the encrypted MO2 and O2 received to obtain the decrypted MO2 and O2. The decrypted MO2 is processed based on the hash algorithm to generate a new hash value of MO2. Then, the data receiver obtains the hash value of MO2 corresponding to the ID from the alliance chain according to its own ID, and compares the new hash value of MO2 with the hash value of MO2 recorded on the alliance chain to determine whether they are equal. If they are equal, it is determined that the received MO2 is complete and has not been tampered with; if they are not equal, it is determined that the received MO2 has been tampered with.
[0165] b. The data receiver performs a two-dimensional discrete Fourier transform on the decrypted O2 to generate a two-dimensional spectrum OF2 of the decrypted O2, and generates a two-dimensional spectrum of O2 with the same frequency and opposite phase based on the decrypted O2. ′ , and O2 ′ Perform two-dimensional discrete Fourier transform processing to generate a two-dimensional spectrum graph OF2 ′ .
[0166] c. The data receiver will decrypt MO2 and O2 ′ Perform time domain convolution processing (i.e., perform time domain convolution on the two-dimensional spectrum OF2 ′ That is, the decrypted MO2 is subjected to a two-dimensional discrete Fourier transform to generate a two-dimensional spectrum diagram of the decrypted MO2, and the two-dimensional spectrum diagram OF2 is multiplied in the frequency domain. ′ The two-dimensional spectrum of MO2 after decryption is multiplied in the frequency domain to generate a two-dimensional spectrum without noise (due to the two-dimensional spectrum OF2 ′ The phase of the two-dimensional spectrum graph OF2 is opposite to that of the two-dimensional spectrum graph, so OF2 in MO2 can be removed. Then, the two-dimensional discrete Fourier transform inverse transform is performed on the two-dimensional spectrum graph after noise removal to generate a picture consistent with M2, that is, a picture after noise removal. It can be seen that the picture is a non-standard data voucher picture after hole digging without excessive quality loss.
[0167] Step 4: Data tracing.
[0168] (1) For the image that has been de-noised, since there is no hash value or signature on the alliance chain that can prove that the non-standard data certificate has been successfully converted and has not been tampered with, that is, the hash value or signature of the de-noised image is not recorded on the alliance chain, the verification of the de-noised image on the alliance chain will never pass, and the de-noised image is unreliable. If the data recipient of the secondary distribution or more than secondary distribution directly sends the de-noised image to the data sender for verification, the data sender can directly refuse to give the verification result. At the same time, the data sender can track which data recipient distributed the de-noised image based on which data recipient the de-noised image was initially sent to. For example, data sender 1 sends the processed non-standard data certificate to data recipient 1, and data recipient 1 processes the processed non-standard data certificate to obtain the de-noised image. Data receiver 1 distributes the de-noised picture to data receiver 2, or distributes the de-noised picture to data receiver 2 and data receiver 3, or data receiver 1 distributes the de-noised picture to data receiver 2, and data receiver 2 distributes the de-noised picture to data receiver 3. Since the hash value or signature of the de-noised picture is not recorded on the alliance chain, the de-noised picture cannot be verified on the alliance chain. Based on this, if data receiver 2 does not believe the authenticity of the de-noised picture, data receiver 2 will send the de-noised picture to data sender 1 for verification, and data sender 1 can directly refuse to give the verification result. At the same time, data sender 1 can determine that data receiver 1 is unauthorized to distribute. Or, if data receiver 3 does not believe the authenticity of the de-noised picture, data receiver 3 will send the de-noised picture to data sender 1 for verification, and data sender 1 can directly refuse to give the verification result. At the same time, data sender 1 can determine that data receiver 1 is unauthorized to distribute.
[0169] (2) If the data recipient of the secondary distribution or more than secondary distribution receives MO2 and O2, it can only verify MO2 based on the hash value of MO2 recorded on the alliance chain, but cannot bypass the data sender to verify the authenticity of O2. In this way, when the data recipient of the secondary distribution or more than secondary distribution sends MO2 and O2 to the data sender for verification at the same time, the data sender can determine which data recipient has made the unauthorized distribution based on the hash value of MO2 (because the relationship mapping between the hash value of MO2 and the corresponding recipient's ID is recorded on the alliance chain, the data recipient who distributed MO2 and O2 can be quickly and accurately determined based on the hash value of MO2). For example, data sender 1 sends MO2 and O2 to data recipient 1, and data recipient 1 distributes MO2 and O2 to data recipient 2, or distributes MO2 and O2 to data recipient 2 and data recipient 3, or data recipient 1 distributes MO2 and O2 to data recipient 2, and data recipient 2 distributes MO2 and O2 to data recipient 3. Since MO2 can only be verified based on the hash value of MO2 recorded on the alliance chain, but the authenticity of O2 cannot be verified without the data sender. Based on this, if data receiver 2 does not trust the authenticity of MO2 and O2, data receiver 2 will send MO2 and O2 to data sender 1 for verification. Data sender 1 processes MO2 based on the hash algorithm to obtain the hash value of MO2, and according to the relationship mapping between the hash value of MO2 recorded on the alliance chain and the corresponding receiver's ID, it can quickly and accurately determine that data receiver 1 is distributing without authorization. Alternatively, if data receiver 3 does not trust the authenticity of MO2 and O2, data receiver 3 will send MO2 and O2 to data sender 1 for verification. Data sender 1 processes MO2 based on the hash algorithm to obtain the hash value of MO2, and according to the relationship mapping between the hash value of MO2 recorded on the alliance chain and the corresponding receiver's ID, it can quickly and accurately determine that data receiver 1 is distributing without authorization.
[0170] The above embodiment shows that the second image is obtained by performing hole digging processing on the first image based on the hole digging rule. Then, based on the hole filling rule, the second image is processed to obtain the first noise image of the data recipient, and the second image and the first noise image of the data recipient are overlapped to generate a high-frequency noise image. After that, the high-frequency noise image and the first noise image are sent to the data recipient, and the first hash value of the high-frequency noise image is stored on the blockchain corresponding to the identifier of the data recipient. Since the non-standard data voucher is subjected to frequency domain obfuscation processing to generate a first noise image and a high-frequency noise image, and the data recipient verifies the high-frequency noise image based on the first hash value of the high-frequency noise image, the data recipient can be prevented from performing secondary distribution of the non-standard data voucher as much as possible, and the credibility of the non-standard data voucher can be ensured. In addition, since the first noise images of different data recipients are different, the data recipient who distributes the non-standard data voucher can be traced based on the first hash value of the high-frequency noise image, so that the data recipient can be tracked to distribute the non-standard data voucher.
[0171] Based on the same technical concept, Figure 4 A blockchain-based data distribution device provided by an embodiment of the present invention is exemplarily shown, and the device can execute the process of the blockchain-based data distribution method.
[0172] like Figure 4 As shown, the device comprises:
[0173] A generating unit 401, configured to generate a first image of a non-standard data voucher;
[0174] The first processing unit 402 is used to perform hole digging processing on the first image based on the hole digging rule to obtain a second image; the content loss between the first image and the second image is less than a set threshold; based on the hole filling rule, the second image is processed to obtain a first noise image of the data recipient; the first noise images of different data recipients are different; based on the second image and the first noise image, a high-frequency noise image of the data recipient is generated; the high-frequency noise image and the first noise image are sent to the data recipient, and the first hash value of the high-frequency noise image is stored in the blockchain in correspondence with the identifier of the data recipient.
[0175] Optionally, the first processing unit 402 is specifically configured to:
[0176] M holes among the N holes of the first image are processed in a random manner to obtain a first noise image of the data receiver; the number M is determined in a random manner.
[0177] Optionally, the first processing unit 402 is specifically configured to:
[0178] Performing Fourier transform processing on the first image to determine a first frequency spectrum;
[0179] Determining, from the first spectrum graph, a plurality of regions whose amplitudes satisfy the hole-digging rule;
[0180] Setting the amplitudes of the multiple regions to zero to obtain the first frequency spectrum after hole digging;
[0181] Perform inverse Fourier transform processing on the first spectrum image after the hole is dug to obtain the second image.
[0182] Optionally, the first processing unit 402 is specifically configured to:
[0183] Processing M holes of the N holes of the first image in a random manner to generate a second frequency spectrum with a non-zero amplitude;
[0184] Perform inverse Fourier transform processing on the second spectrum graph to obtain a first noise image of the data receiver.
[0185] Optionally, the first processing unit 402 is specifically configured to:
[0186] Overlapping the second spectrum graph corresponding to the first noise image and the first spectrum graph after punching corresponding to the second image to obtain an overlapped spectrum graph;
[0187] The overlapped spectrum graph is subjected to inverse Fourier transform processing to obtain the high-frequency noise image.
[0188] Optionally, the first processing unit 402 is specifically configured to:
[0189] Processing the high-frequency noise image based on a preset hash algorithm to obtain a first hash value of the high-frequency noise image;
[0190] The first hash value of the high-frequency noise image is uploaded to the smart contract of the blockchain, and the correspondence between the identifier of the data recipient and the first hash value of the high-frequency noise image is recorded in the smart contract.
[0191] Optionally, the first processing unit 402 is specifically configured to:
[0192] Based on the identifier of the data recipient, obtain the public key of the data recipient from the blockchain to which it belongs; the public key is generated by the data recipient and uploaded to the blockchain;
[0193] Using the public key to encrypt the high-frequency noise image and the first noise image respectively, to obtain an encrypted high-frequency noise image and an encrypted first noise image;
[0194] The encrypted high-frequency noise image and the encrypted first noise image are sent to the data receiver.
[0195] Optionally, the first processing unit 402 is further configured to:
[0196] After the hash value of the high-frequency noise image and the identifier of the data recipient are stored in the blockchain in correspondence, a verification request sent by a data verifier is received; the verification request includes the second image;
[0197] If it is determined that the second image has not been sent to the data verification party, the verification request is rejected.
[0198] Optionally, the first processing unit 402 is further configured to:
[0199] After the hash value of the high-frequency noise image and the identifier of the data recipient are stored in the blockchain in correspondence, a verification request sent by a data verifier is received; the verification request includes the high-frequency noise image;
[0200] The data recipient corresponding to the high-frequency noise image is determined from the blockchain, thereby determining whether the data verifier obtained the high-frequency noise image from the data recipient.
[0201] Based on the same technical concept, Figure 5 A blockchain-based data distribution device provided by an embodiment of the present invention is exemplarily shown, and the device can execute the process of the blockchain-based data distribution method.
[0202] like Figure 5 As shown, the device comprises:
[0203] The receiving unit 501 is used to receive a high-frequency noise image and a first noise image sent by a data sender; the high-frequency noise image is generated by the data sender according to the second image and the first noise image; the first noise image is obtained by the data sender processing the second image based on a hole filling rule; the second image is obtained by the data sender performing hole digging processing on the first image based on a hole digging rule; the first image is generated by the data sender based on a non-standard data voucher;
[0204] The second processing unit 502 is used to verify the high-frequency noise image based on the first hash value of the high-frequency noise image, and after successful verification, perform time-domain convolution processing on the high-frequency noise image and the first noise image to obtain the second image; the first hash value of the high-frequency noise image is obtained by the data recipient from the blockchain to which it belongs based on the identifier of the data recipient.
[0205] Optionally, the receiving unit 501 is specifically configured to:
[0206] Receive the encrypted high-frequency noise image and the encrypted first noise image sent by the data sender; the encrypted high-frequency noise image and the encrypted first noise image are determined by the data sender encrypting the high-frequency noise image and the first noise image using a public key; the public key is generated by the data receiver and uploaded to the blockchain;
[0207] The encrypted high-frequency noise image and the encrypted first noise image are respectively decrypted using a private key to obtain a decrypted high-frequency noise image and a decrypted first noise image; the private key is generated by the data receiver.
[0208] Optionally, the second processing unit 502 is specifically configured to:
[0209] Processing the decrypted high-frequency noise image based on a preset hash algorithm to obtain a second hash value of the high-frequency noise image;
[0210] Verifying whether the second hash value of the high-frequency noise image is consistent with the first hash value of the high-frequency noise image;
[0211] If so, it is determined that the high-frequency noise image verification is successful.
[0212] Optionally, the second processing unit 502 is specifically configured to:
[0213] Processing the decrypted first noise image to generate a second noise image; the second noise image has the same frequency and opposite phase as the first noise image;
[0214] The high-frequency noise image and the second noise image are subjected to time-domain convolution processing to obtain the second image.
[0215] Based on the same technical concept, an embodiment of the present invention provides a computing device, including:
[0216] Memory for storing computer programs;
[0217] The processor is used to call the computer program stored in the memory and execute the blockchain-based data distribution method according to the obtained program.
[0218] Based on the same technical concept, an embodiment of the present invention provides a computer-readable storage medium, which stores a computer-executable program, and the computer-executable program is used to enable a computer to execute a blockchain-based data distribution method.
[0219] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0220] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0221] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0222] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0223] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0224] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of this application and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A data distribution method based on blockchain, characterized in that: include: The data sender generates a first image of the non-standard data voucher; The data sender performs hole digging processing on the first image based on a hole digging rule to obtain a second image; The content loss between the first image and the second image is less than a set threshold; The data sender processes the second image based on a hole filling rule to obtain a first noise image of the data receiver; the first noise images of different data receivers are different; The data sender generates a high-frequency noise image of the data receiver according to the second image and the first noise image; The data sender sends the high-frequency noise image and the first noise image to the data receiver, and stores the first hash value of the high-frequency noise image and the identifier of the data receiver in the blockchain in correspondence; The data sender performs hole digging processing on the first image based on a hole digging rule to obtain a second image, including: The data sender performs Fourier transform processing on the first image to determine a first frequency spectrum diagram; The data sender determines, from the first spectrum diagram, a plurality of regions whose amplitudes satisfy the hole-digging rule; The data sender sets the amplitudes of the multiple regions to zero to obtain the first frequency spectrum after hole digging; The data sender performs inverse Fourier transform processing on the first spectrum image after the puncturing to obtain the second image; The data sender processes the second image based on the hole filling rule to obtain a first noise image of the data receiver, including: The data sender processes M holes among the N holes of the second image in a random manner to generate a second frequency spectrum with a non-zero amplitude; the number M is determined in a random manner; The data sender performs inverse Fourier transform processing on the second spectrum graph to obtain a first noise image of the data receiver.
2. The method according to claim 1, characterized in that The data sender generates a high-frequency noise image of the data receiver according to the second image and the first noise image, including: The data sender performs overlapping processing on the second spectrum graph corresponding to the first noise image and the first spectrum graph after punching corresponding to the second image to obtain an overlapped spectrum graph; The data sender performs inverse Fourier transform processing on the overlapped spectrum graph to obtain the high-frequency noise image.
3. The method according to claim 1, characterized in that The storing the hash value of the high-frequency noise image and the identifier of the data recipient on the blockchain in correspondence includes: The data sender processes the high-frequency noise image based on a preset hash algorithm to obtain a first hash value of the high-frequency noise image; The data sender uploads the first hash value of the high-frequency noise image to the smart contract of the blockchain, and records the correspondence between the identifier of the data receiver and the first hash value of the high-frequency noise image in the smart contract.
4. The method according to claim 1, characterized in that The data sender sends the high-frequency noise image and the first noise image to the data receiver, including: The data sender obtains the public key of the data recipient from the blockchain based on the identifier of the data recipient; the public key is generated by the data recipient and uploaded to the blockchain; The data sender uses the public key to encrypt the high-frequency noise image and the first noise image respectively to obtain an encrypted high-frequency noise image and an encrypted first noise image; The data sender sends the encrypted high-frequency noise image and the encrypted first noise image to the data receiver.
5. The method according to any one of claims 1 to 4, characterized in that: After the hash value of the high-frequency noise image and the identifier of the data recipient are stored in the blockchain in correspondence, the method further includes: The data sender receives a verification request sent by the data verifier; the verification request includes the second image; The data sender determines that the second image has not been sent to the data verifier, and then rejects the verification request.
6. The method according to any one of claims 1 to 4, characterized in that: After the hash value of the high-frequency noise image and the identifier of the data recipient are stored in the blockchain in correspondence, the method further includes: The data sender receives a verification request sent by the data verifier; the verification request includes the high-frequency noise image; The data sender determines the data receiver corresponding to the high-frequency noise image from the blockchain, thereby determining whether the data verifier obtains the high-frequency noise image from the data receiver.
7. A data distribution method based on blockchain, characterized in that: include: The data receiver receives the high-frequency noise image and the first noise image sent by the data sender; The high-frequency noise image is generated by the data sender according to the second image and the first noise image; the first noise image is obtained by the data sender processing the second image based on the hole filling rule; The second image is obtained by the data sender performing hole punching processing on the first image based on a hole punching rule; The first image is generated by the data sender based on the non-standard data voucher; The data recipient verifies the high-frequency noise image based on the first hash value of the high-frequency noise image, and after successful verification, performs time-domain convolution processing on the high-frequency noise image and the first noise image to obtain the second image; the first hash value of the high-frequency noise image is obtained by the data recipient from the blockchain to which it belongs based on the identifier of the data recipient; The first noise image is obtained by the data sender processing the second image based on a hole filling rule, including: The data sender processes M holes among the N holes of the second image in a random manner to generate a second frequency spectrum with a non-zero amplitude; the number M is determined in a random manner; The data sender performs Fourier transform inverse transformation on the second spectrum graph to obtain a first noise image of the data receiver; The second image is obtained by the data sender performing hole punching processing on the first image based on a hole punching rule, including: The data sender performs Fourier transform processing on the first image to determine a first frequency spectrum diagram; The data sender determines, from the first spectrum diagram, a plurality of regions whose amplitudes satisfy the hole-digging rule; The data sender sets the amplitudes of the multiple regions to zero to obtain the first frequency spectrum after hole digging; The data sender performs inverse Fourier transform processing on the first spectrum image after the puncturing to obtain the second image.
8. The method according to claim 7, characterized in that The data receiving party receives the high-frequency noise image and the first noise image sent by the data sending party, including: The data receiving party receives the encrypted high-frequency noise image and the encrypted first noise image sent by the data sending party; the encrypted high-frequency noise image and the encrypted first noise image are determined by the data sending party encrypting the high-frequency noise image and the first noise image using a public key; the public key is generated by the data receiving party and uploaded to the blockchain; The data receiving party uses a private key to decrypt the encrypted high-frequency noise image and the encrypted first noise image respectively to obtain a decrypted high-frequency noise image and a decrypted first noise image; the private key is generated by the data receiving party.
9. The method according to claim 7, characterized in that The data receiving party verifies the high-frequency noise image based on the first hash value of the high-frequency noise image, including: The data receiving party processes the decrypted high-frequency noise image based on a preset hash algorithm to obtain a second hash value of the high-frequency noise image; The data receiving party verifies whether the second hash value of the high-frequency noise image is consistent with the first hash value of the high-frequency noise image; If so, the data receiving party determines that the high-frequency noise image verification is successful.
10. The method according to claim 7, characterized in that The step of performing time domain convolution processing on the high-frequency noise image and the first noise image to obtain the second image includes: The data receiving party processes the decrypted first noise image to generate a second noise image; the second noise image has the same frequency and opposite phase as the first noise image; The data receiving party performs time-domain convolution processing on the high-frequency noise image and the second noise image to obtain the second image.
11. A data distribution device based on blockchain, characterized in that: include: A generating unit, configured to generate a first image of a non-standard data voucher; A first processing unit, configured to perform hole digging processing on the first image based on a hole digging rule to obtain a second image; The content loss between the first image and the second image is less than a set threshold; Based on the hole filling rule, the second image is processed to obtain a first noise image of the data receiver; The first noise images of different data receivers are different; generating a high-frequency noise image of the data receiver according to the second image and the first noise image; Sending the high-frequency noise image and the first noise image to the data recipient, and storing the first hash value of the high-frequency noise image and the identifier of the data recipient in correspondence on the blockchain; The first processing unit is further specifically configured to perform Fourier transform processing on the first image to determine a first spectrum graph; determine multiple regions whose amplitudes satisfy the hole-digging rule from the first spectrum graph; and set the amplitudes of the multiple regions to zero to obtain the first spectrum graph after hole digging; Performing inverse Fourier transform processing on the first spectrum image after the hole is dug to obtain the second image; Processing M holes among the N holes of the second image in a random manner to generate a second frequency spectrum with a non-zero amplitude; Perform inverse Fourier transform processing on the second spectrum graph to obtain a first noise image of the data receiver.
12. A data distribution device based on blockchain, characterized in that: include: A receiving unit, configured to receive the high-frequency noise image and the first noise image sent by a data sender; The high-frequency noise image is generated by the data sender according to the second image and the first noise image; the first noise image is obtained by the data sender processing the second image based on the hole filling rule; The second image is obtained by the data sender performing hole punching processing on the first image based on a hole punching rule; The first image is generated by the data sender based on the non-standard data voucher; And specifically used to process M holes among the N holes of the second image in a random manner to generate a second frequency spectrum with a non-zero amplitude; perform inverse Fourier transform processing on the second frequency spectrum to obtain a first noise image of the data receiver; Performing Fourier transform processing on the first image to determine a first spectrum graph; determining multiple regions whose amplitudes satisfy the hole-digging rule from the first spectrum graph; setting the amplitudes of the multiple regions to zero to obtain the first spectrum graph after hole digging; Performing inverse Fourier transform processing on the first spectrum image after the hole is dug to obtain the second image; The second processing unit is used to verify the high-frequency noise image based on the first hash value of the high-frequency noise image, and after successful verification, perform time-domain convolution processing on the high-frequency noise image and the first noise image to obtain the second image; the first hash value of the high-frequency noise image is obtained by the data recipient from the blockchain to which it belongs based on the identifier of the data recipient.
13. A computing device, characterized in that: include: Memory for storing computer programs; A processor, configured to call a computer program stored in the memory, and execute the method according to any one of claims 1 to 10 according to the obtained program.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer-executable program, and the computer-executable program is used to enable a computer to execute the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Image characteristic extracting method and device
CN101493892A
Anti-fake method, anti-fake label and label manufacture method
CN103093173A
Secure digital image propagation method based on reversible watermark and mosaic technology
CN105405092A
Steel coil end face defect sample generation method, model training method and system and electronic device
CN110349142A
Voucher verification method, management method and signing and issuing method for block chain
CN111680324A
