Blockchain-based non-fungible token image query method and system

By optimizing the NFT image query process using a stake relationship table and Merkle tree, the system enables image combination and centralized storage, solving the problems of low query efficiency and privacy leakage, meeting the needs of combined creation and protecting privacy information.

CN116541353BActive Publication Date: 2026-02-10INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310504651.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-06
Publication Date
2026-02-10
Estimated Expiration
2043-05-06

AI Technical Summary

Technical Problem

Existing technologies for NFT image retrieval are inefficient, cannot meet the needs of combined creation, and suffer from scattered storage and the risk of privacy information leakage.

Method used

By designing a rights and interests table and a Merkle tree, the image search process is optimized, enabling the combination and centralized storage of non-fungible token images. Hash operations are used to protect privacy information, and asymmetric encryption algorithms are employed for data communication.

Benefits of technology

It improves the efficiency of non-fungible token image queries, supports secondary image recombination and creation, and protects the privacy information of creators and owners.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116541353B_ABST
    Figure CN116541353B_ABST
Patent Text Reader

Abstract

The application provides a blockchain-based non-fungible token image query method and system, which can be used in the technical field of blockchain. The method comprises the following steps: receiving an image query request sent by a client of a target user; obtaining a right relationship table corresponding to the image query request from a blockchain; querying a target image file corresponding to the right relationship table from an interstellar file system; the target image file comprises a combined image file obtained by combining non-fungible token image files in a plurality of storage nodes of the interstellar file system, and the combined image file is stored in a unique corresponding main storage node and a backup storage node, wherein the main storage node and the backup storage node are storage nodes in the interstellar file system. The application can realize the combination and centralized storage of a plurality of non-fungible token images, thereby improving the efficiency of non-fungible token image query.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of blockchains, and in particular to a non-fungible token image query method and system based on a blockchain. BACKGROUND

[0002] The field of digital art is one of the main application scenarios of non-fungible token (NFT) technology, such as NFT images. Through NFT, the copyright of digital art can be proved, and the owner is allowed to use their tokens in various online social spaces.

[0003] Currently, the NFT images displayed on the front end of digital asset trading platforms such as OpenSea are all original images created by the creators. NFT images rely on manual creation and cannot meet the needs of combined creation. Moreover, the NFT images stored in multiple storage nodes of the Inter Planetary File System (IPFS) are too dispersed, which affects the efficiency of image queries. SUMMARY

[0004] To solve at least one problem in the prior art, the present application provides a non-fungible token image query method and system based on a blockchain, which can realize the combination and centralized storage of multiple non-fungible token images, thereby improving the efficiency of non-fungible token image queries.

[0005] To solve the above technical problems, the present application provides the following technical solutions:

[0006] In a first aspect, the present application provides a non-fungible token image query method based on a blockchain, comprising:

[0007] receiving an image query request sent by a client of a target user;

[0008] obtaining a rights relationship table corresponding to the image query request from a blockchain;

[0009] querying a target image file corresponding to the rights relationship table from an Inter Planetary File System (IPFS);

[0010] The target image file includes a combined image file obtained by combining non-fungible token image files in multiple storage nodes of the IPFS. The combined image file is stored in a unique primary storage node and a backup storage node, and the primary storage node and the backup storage node are storage nodes in the IPFS.

[0011] In one embodiment, before obtaining the rights relationship table corresponding to the image query request from the blockchain, the method further comprises:

[0012] receiving an image combination request corresponding to the combined image file, the image combination request comprising: image hashes of each of the non-fungible token image files;

[0013] obtaining each of the non-fungible token image files from a plurality of storage nodes of the interstellar file system according to the image combination request;

[0014] combining non-fungible token images in each of the non-fungible token image files to obtain a combined image;

[0015] applying the image hashes of each of the non-fungible token image files as leaf nodes respectively to construct a Merkle tree, and determining a root node of the Merkle tree as a combined image hash and storing the combined image hash in the equity relationship table;

[0016] storing the combined image file composed of the combined image and the combined image hash in the main storage node and the backup storage node.

[0017] In one embodiment, the image hashes in the image combination request are obtained by performing a hash message authentication code process on the original image hashes, user unique identifiers, and random numbers corresponding to the image hashes as keys in the client of the target user;

[0018] Before receiving the image combination request corresponding to the combined image file, the method further comprises:

[0019] performing a hash message authentication code process on the original image hashes, user unique identifiers, and random numbers corresponding to each of the non-fungible token image files as keys to obtain respective image hashes and store the image hashes in the equity relationship table;

[0020] The obtaining each of the non-fungible token image files from a plurality of storage nodes of the interstellar file system according to the image combination request comprises:

[0021] determining whether each of the image hashes in the image combination request exists in the equity relationship table, and if so, determining that the user authentication of the image combination request is passed, and obtaining each of the non-fungible token image files from the plurality of storage nodes of the interstellar file system.

[0022] In one embodiment, the non-fungible token image query method based on the blockchain further comprises:

[0023] receiving an image update request corresponding to the combined image file;

[0024] querying the interstellar file system to obtain a new image file corresponding to the image update request;

[0025] combining the non-fungible token images in each of the non-fungible token image files and the new image file to obtain an updated combined image;

[0026] applying image hashes of each of the non-fungible token image files and the new image file as leaf nodes to construct an updated Merkle tree, determining a root node of the updated Merkle tree as an updated combined image hash and replacing the combined image hash in the interest relationship table;

[0027] storing an updated combined image file composed of the updated combined image and the updated combined image hash in the primary storage node and the backup storage node.

[0028] In one embodiment, the blockchain-based non-fungible token image query method further comprises:

[0029] determining the primary storage node and the backup storage node according to the number of non-fungible token image files in each storage node and the node distance.

[0030] In one embodiment, the client and the blockchain node and the blockchain node and the storage node both apply an asymmetric encryption algorithm that takes address information of both parties as a generation factor for data communication.

[0031] In one embodiment, the interest relationship table includes original image information and / or combined image information corresponding to the target user, the original image information includes image hashes of non-fungible token images and storage node information, and the combined image information includes a combined image hash corresponding to a combined image, primary storage node information, and backup storage node information.

[0032] In a second aspect, the present application provides a blockchain-based non-fungible token image query system, comprising:

[0033] receiving query request means for receiving an image query request sent by a client of a target user;

[0034] obtaining means for obtaining an interest relationship table corresponding to the image query request from a blockchain;

[0035] querying means for querying a target image file corresponding to the interest relationship table from an interstellar file system;

[0036] The target image file includes a combined image file composed of non-fungible token image files in a plurality of storage nodes of the interstellar file system, the combined image file being stored in a unique primary storage node and a backup storage node, and the primary storage node and the backup storage node being storage nodes in the interstellar file system.

[0037] In one embodiment, the blockchain-based non-fungible token image query system further comprises:

[0038] A receiving combination request device receives an image combination request corresponding to the combined image file, and the image combination request includes image hashes of each non-fungible token image file.

[0039] An image file obtaining device is configured to obtain each non-fungible token image file from a plurality of storage nodes of the interstellar file system according to the image combination request.

[0040] A combination device is configured to combine non-fungible token images in each non-fungible token image file to obtain a combined image.

[0041] A construction device is configured to apply image hashes of each non-fungible token image file as leaf nodes respectively, to construct a Merkle tree, and to determine a root node of the Merkle tree as a combined image hash and store the combined image hash in the interest relationship table.

[0042] A storage device is configured to store the combined image file composed of the combined image and the combined image hash in the main storage node and the backup storage node.

[0043] In one embodiment, the image hashes in the image combination request are obtained by performing a hash operation message authentication code process on the original image hashes, user unique identifiers, and random numbers corresponding to the image hashes as keys in the client of the target user.

[0044] Correspondingly, the blockchain-based non-fungible token image query system further comprises:

[0045] A processing device is configured to perform a hash operation message authentication code process on the original image hashes, user unique identifiers, and random numbers corresponding to each non-fungible token image file as keys to obtain respective image hashes and store the image hashes in the interest relationship table.

[0046] Correspondingly, the image file obtaining device comprises:

[0047] A judgment module is configured to determine whether each image hash in the image combination request exists in the interest relationship table, and if so, to determine that the user authentication of the image combination request is passed, and to obtain each non-fungible token image file from the plurality of storage nodes of the interstellar file system.

[0048] In one embodiment, the blockchain-based non-fungible token image query system further comprises:

[0049] The receiving module is configured to receive an image update request corresponding to the combined image file.

[0050] The querying module is configured to query an added image file corresponding to the image update request from the interstellar file system.

[0051] The updating module is configured to combine each non-fungible token image file and a non-fungible token image in the added image file to obtain an updated combined image.

[0052] The replacing module is configured to apply image hashes of each non-fungible token image file and the added image file as leaf nodes respectively, construct an updated Merkle tree, determine a root node of the updated Merkle tree as an updated combined image hash, and replace the combined image hash in the interest relationship table.

[0053] The storage module is configured to store an updated combined image file composed of the updated combined image and the updated combined image hash in the main storage node and the backup storage node.

[0054] In an embodiment, the blockchain-based non-fungible token image query system further comprises:

[0055] The determining device is configured to determine the main storage node and the backup storage node according to the number of non-fungible token image files in each storage node and the node distance.

[0056] In an embodiment, the asymmetric encryption algorithm using address information of both parties as a generation factor is applied for data communication between the client and the blockchain node and between the blockchain node and the storage node.

[0057] In an embodiment, the interest relationship table includes original image information and / or combined image information corresponding to the target user, the original image information includes image hashes of non-fungible token images and storage node information, and the combined image information includes a combined image hash corresponding to a combined image, main storage node information, and backup storage node information.

[0058] In a third aspect, the present application provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the program to implement the blockchain-based non-fungible token image query method.

[0059] In a fourth aspect, the present application provides a computer-readable storage medium having computer instructions stored thereon, and the instructions are executed by a processor to implement the blockchain-based non-fungible token image query method.

[0060] From the above technical solutions, the application provides a non-fungible token image query method and system based on a blockchain. The method includes receiving an image query request sent by a client of a target user, obtaining a right relationship table corresponding to the image query request from the blockchain, and querying a target image file corresponding to the right relationship table from an interstellar file system. The target image file includes a combined image file composed of non-fungible token image files in a plurality of storage nodes of the interstellar file system. The combined image file is stored in a unique main storage node and a backup storage node. The main storage node and the backup storage node are storage nodes in the interstellar file system, which can realize the combination and centralized storage of a plurality of non-fungible token images, thereby improving the efficiency of non-fungible token image query. BRIEF DESCRIPTION OF DRAWINGS

[0061] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the drawings needed in the embodiment or prior art description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative labor.

[0062] Figure 1 is a layered architecture diagram of a combinable NFT blockchain node provided by the embodiment of the application;

[0063] Figure 2 is a NFT ticket combination style diagram adopted by the embodiment of the application;

[0064] Figure 3 is a first flow diagram of the non-fungible token image query method based on a blockchain in the embodiment of the application;

[0065] Figure 4 is a second flow diagram of the non-fungible token image query method based on a blockchain in the embodiment of the application;

[0066] Figure 5 is a third flow diagram of the non-fungible token image query method based on a blockchain in the embodiment of the application;

[0067] Figure 6 is a logic diagram of the update combined image process in an example of the application;

[0068] Figure 7 is a flow diagram of the NFT image file combination storage process in an application example of the application;

[0069] Figure 8is a comparison diagram of a node ring graph in the prior art and a node ring graph in an application example of the present application;

[0070] Figure 9 is a logic diagram of a batch query process of an NFT image file in an example of the present application;

[0071] Figure 10 is a flow diagram of an image information authentication process in an application example of the present application;

[0072] Figure 11 is a structure diagram of a non-fungible token image query system based on a blockchain in an embodiment of the present application;

[0073] Figure 12 is a system structure schematic block diagram of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION

[0074] In order for those skilled in the art to better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.

[0075] In order to facilitate understanding of the technical solutions provided by the present application, the related contents of the technical solutions of the present application will be described first.

[0076] Blockchain can provide proof of ownership of various digital assets such as digital content in the form of non-fungible tokens (NFT) as a credential type, and store and distribute in a distributed manner, while ensuring its uniqueness and being tamper-proof. Due to this feature, NFT is widely used in the field of digital assets. Digital art is one of the main application scenarios of NFT technology. Through NFT, the copyright of digital art can be proved, and the owner is allowed to use their tokens in various online social spaces.

[0077] Distributed Hash Table (DHT): a class of decentralized distributed systems, in which each node maintains a part of the storage content and the routing and address of other nodes, so that the impact on the entire network is minimal when any participant in the network changes (enters / exits). DHT can be used to build more complex applications, including distributed file systems, peer-to-peer file sharing systems, cooperative web cache, domain name system, and real-time communication. Kademlia algorithm is a kind of DHT.

[0078] Most of the circulating NFT images on the current public blockchain are single NFT images. For transactions involving multiple NFT images, the common practice is to aggregate the NFT hashes corresponding to each NFT image, record the set relationship on the chain, and the underlying distributed storage remains unchanged.

[0079] In the current public blockchain NFT full life cycle, NFT hash information and NFT images are one-to-one corresponding, and NFT image and right relationship are stored in different systems.

[0080] In the current public blockchain NFT full life cycle, NFT images involved in packaging and selling are recorded on the blockchain, and the front end queries NFT images in batches according to the right relationship table.

[0081] The NFT images of the current public blockchain are stored in the Interstellar File System, and the general image query method is the Kademlia algorithm query mechanism, which ensures that for any n storage nodes, at most log2(n) queries are required to obtain the NFT image on the target storage node.

[0082] The existing technology also has the following disadvantages:

[0083] 1. The NFT images displayed on the front end of the current digital asset trading platform such as OpenSea are all original images created by the creator. NFT images rely on manual creation and cannot meet the secondary combination creation demand, that is, NFT images cannot be combined arbitrarily.

[0084] 2. In the current public blockchain NFT full life cycle, NFTs involved in packaging and selling mainly record the NFT hash set corresponding to the packaged NFT image on the chain. The corresponding value is the whole, and the NFT hash set cannot be packaged and then split, that is, it does not support arbitrary combination in the full life cycle, and lacks flexibility.

[0085] 3. The NFT images of the current public blockchain are queried through the Kademlia algorithm, and batch image queries need to rely on loop queries, which is low in efficiency and redundant in transmission messages.

[0086] 4. The NFT right information is stored on the current public blockchain. On the one hand, it is searchable on the entire network, and the privacy information of the creator and the owner is not protected.

[0087] 5. Once the key attack obtains the right relationship information on the chain, the corresponding NFT rights and images can be stolen.

[0088] Therefore, the embodiments of the present application provide a non-fungible token image query method and system, which mainly solves at least one problem in the prior art by the following technical means:

[0089] 1. The application provides a new image combination method by designing a ticket combination image storage structure, optimizes the image search process, optimizes the transmission space, and improves the batch query efficiency through the equity relationship table; the image storage efficiency is improved by optimizing the consistency hash table and IPFS storage process; the combination image relationship is maintained by the Merkle tree, the NFT package can be randomly added or deleted elements, and the demand of secondary combination creation is met.

[0090] 2. The application designs a Merkle tree NFT combination processing flow, records the image equity information and the hash of each combination image by using the Merkle leaf node, and the root node represents the hash generated by the whole combination image, solves the problem that the current NFT package lacks hash association, and the NFT hash packaged cannot be verified.

[0091] 3. The application designs an equity relationship table processing flow, directly records the storage node information of the file corresponding to the combination image through the equity relationship table, realizes the batch quick query of the image, and can solve the problem of low query efficiency of the DHT Kademlia algorithm.

[0092] 4. The application protects the ownership information by transmitting the element image through hash derivation, protects the creation information through ring signature, provides a combination service with security and privacy, and can solve the problem that the current NFT system is prone to information leakage.

[0093] 5. The application designs a hash HMAC processing flow, uses the HMAC verification principle, supports the derivation of a combination hash from the NFT hash corresponding to the combination image as the leaf node of the Merkle tree, realizes the privacy protection of the equity information of each combination original image while realizing the image combination configuration, and solves the problem that the current on-chain NFT information lacks protection.

[0094] That is, the non-fungible token image query method and system based on the blockchain provided by the application embodiment can realize the NFT image combination scheme by designing the NFT image combination scheme, including optimizing the DHT batch query process by adding the equity relationship table, optimizing the IPFS file storage process and the like, wherein the equity relationship table is added to optimize the image search process, optimize the DHT batch query process, and improve the batch query efficiency; the NFT image files are concentrated to the logical storage node and the backup node by performing virtual relocation logic processing on the IPFS storage node corresponding to the combination image, and the IPFS storage process is optimized; the uniqueness of the NFT combination hash is realized by adding the Merkle tree, recording the image equity information and the hash of each combination image by using the Merkle leaf node, and the root node represents the hash generated by the whole combination image; the original image privacy information is protected by using the Hmac verification algorithm to realize the derivation of the NFT original hash.

[0095] Figure 1A schematic diagram of a layered architecture for composable NFT blockchain nodes provided in an embodiment of the present invention.

[0096] like Figure 1 As shown, the image processing layer consists of an image parsing module and an image combination and synthesis module.

[0097] The layer parsing module is responsible for separating and parsing different elements in the combined image according to a specified structure, and obtaining the rights information and the corresponding original NFT hash information of each image.

[0098] The image combination and synthesis module is responsible for merging different elements into the same ticket image according to a specified structure.

[0099] like Figure 1 As shown, the logical processing layer includes: a storage node management module, a Merkle tree module, an image hash management module, and a signature processing module.

[0100] The storage node management module includes functions such as selecting logical storage master nodes and backup storage nodes, detecting storage node availability, and connecting storage nodes. During the combined image processing, it is responsible for synchronizing combined image files on different storage nodes to the logical storage master node and logical storage backup node, ensuring that the logical nodes selected for combined image processing meet the requirements of availability and short link distance.

[0101] The Merkle tree module is responsible for performing verification operations on the combined image. Through continuous node merging, the root node of the Merkle tree is obtained as the final hash of the combined image.

[0102] The image hash management and processing module is responsible for managing the hashes of different combinations of images, maintaining several sets of image hashes, and supporting batch image queries.

[0103] The signature processing module includes a signature generation and signature verification module responsible for verifying the signatures of transaction messages during the NFT combination process. If the verification fails, it proves that the message is invalid and is discarded. If the verification succeeds, it proves that the message is a blockchain network combination processing transaction. The signature generation module is responsible for performing ring signatures on the transaction messages during the NFT combination process to protect the privacy information of the transaction initiator.

[0104] like Figure 1 As shown, the kernel layer includes: a consensus management module, a block broadcasting module, and a transaction broadcasting module. The consensus management module is mainly responsible for providing standard consensus services and sorting and packaging transactions within a standard time period into blocks. The block broadcasting module is responsible for broadcasting and distributing the sorted blocks. The transaction broadcasting module is responsible for broadcasting and distributing the received transaction messages to the sorting nodes for block production.

[0105] The data layer includes a block data management module and a state data management module. The block management module is mainly responsible for parsing on-chain blocks, parsing specific transaction messages, and obtaining NFT image information, etc. The state data management module is responsible for managing combined image hashes, image state information, etc., and providing information query operations.

[0106] Figure 2 This is a schematic diagram of the NFT ticket combination style used in an embodiment of the present invention.

[0107] like Figure 2 As shown, the images are display images created by different users. They are stored off-chain via IPFS and registered on-chain through a standard NFT process. Each image has a corresponding image hash that is bound to it, representing the image's equity value.

[0108] like Figure 2 As shown, the combined image set is the combined image display diagram in this embodiment. Unlike the current combined image display diagram, it references the stamp set model. The combined image is both a single NFT and an NFT image aggregation. It can be circulated individually, traded as a whole, or split and circulated or recombined. The NFT hash corresponding to the combined image set is the root hash of the combined hash tree, which is the hash value obtained by performing binary tree operations on all the image NFT hashes in the set. The different base combined images, i.e., NFT images, corresponding to the combined image are recorded through the image Merkle tree. Then, the information of each base combined image is obtained according to the relationship chain of the leaf node-image hash-image details of the Merkle tree.

[0109] It should be noted that the blockchain-based non-fungible token image query method and system disclosed in this application can be used in the field of financial technology, as well as in any other field. The application areas of the blockchain-based non-fungible token image query method and system disclosed in this application are not limited. The acquisition, storage, use, and processing of data in the technical solutions of each embodiment of this application all comply with relevant laws and regulations.

[0110] The following examples illustrate this in detail.

[0111] To achieve the combination and centralized storage of multiple non-fungible token (NFG) images, thereby improving the efficiency of NFG image retrieval, this embodiment provides a blockchain-based NFG image retrieval method, whose execution entity is a blockchain-based NFG image retrieval system. This blockchain-based NFG image retrieval system includes, but is not limited to, a server, such as... Figure 3 As shown, this method specifically includes the following:

[0112] Step 100: Receive the image query request sent by the target user's client.

[0113] Specifically, the image query request may include: a unique identifier for the target user, used to distinguish different users, which can be a string composed of numbers and / or letters, such as an ID card number. The non-fungible token image query system can be at least one of the blockchain nodes, and the blockchain node can be a server.

[0114] Step 200: Obtain the equity relationship table corresponding to the image query request from the blockchain.

[0115] Specifically, the rights and interests table may include: the original image information and / or combined image information corresponding to the target user. The original image information may include: the image hash and storage node information of the non-fungible token image. The combined image information may include: the combined image hash, primary storage node information and backup storage node information corresponding to the combined image.

[0116] Step 300: Query the target image file corresponding to the stake relationship table from the InterPlanetary File System; the target image file includes: a combined image file obtained by combining non-fungible token image files from multiple storage nodes of the InterPlanetary File System, the combined image file is stored in a unique primary storage node and a backup storage node, the primary storage node and the backup storage node are storage nodes in the InterPlanetary File System.

[0117] Specifically, the blockchain nodes in the blockchain can communicate and connect with various storage nodes in the InterPlanetary File System (IPS), and these storage nodes can be servers. The non-fungible token image files corresponding to each image hash in the stake relationship table and the combined image files corresponding to the combined image hashes can be retrieved from the IPS.

[0118] To enable the combination of non-fungible token image files and meet the needs of combined creation, such as... Figure 4 As shown, in one embodiment, the method further includes the following step before step 200:

[0119] Step 021: Receive the image combination request corresponding to the combined image file. The image combination request includes: the image hash of each of the non-fungible token image files.

[0120] Step 022: Based on the image combination request, obtain each of the non-fungible token image files from multiple storage nodes of the InterPlanetary File System.

[0121] Step 023: Combine the non-fungible token images from each of the non-fungible token image files to obtain a combined image.

[0122] Step 024: Using the image hashes of each of the non-fungible token image files as leaf nodes, a Merkle tree is constructed. The root node of the Merkle tree is determined as the combined image hash and stored in the equity relationship table.

[0123] Step 025: Store the combined image file, which consists of the combined image and the combined image hash, in the primary storage node and the backup storage node.

[0124] Furthermore, in order to quickly verify whether the combined image contains a certain image and solve the problem that the packaged NFT hash cannot be verified, after receiving the image verification request, it can also be determined whether the image hash in the image verification request exists in each node of the Merkle tree. If so, it is determined that the combined image corresponding to the Merkle tree contains the non-fungible token image corresponding to the image verification request.

[0125] To achieve privacy protection for the image hash of non-fungible token images, in one embodiment, the image hash in the image combination request is obtained by performing a hash operation message authentication code processing on the target user's client using its corresponding original image hash, user unique identifier, and random number as a key mirror; correspondingly, before step 021, the method further includes:

[0126] Based on the original image hash, user unique identifier, and random number corresponding to each of the non-fungible token image files, a hash operation message authentication code is performed using the key mirror to obtain the respective image hash and store it in the rights and interests table.

[0127] Correspondingly, step 022 includes: determining whether each image hash in the image combination request exists in the rights and interests table; if so, determining that the user authentication of the image combination request is successful, and obtaining each of the non-fungible token image files from multiple storage nodes of the InterPlanetary File System.

[0128] Specifically, the user unique identifier is used to distinguish different users and can be a string composed of numbers and letters.

[0129] To improve the efficiency and flexibility of combined image updates, such as Figure 5 As shown, in one embodiment, the blockchain-based non-fungible token image query method further includes:

[0130] Step 400: Receive the image update request corresponding to the combined image file.

[0131] Step 500: Query the InterPlanetary File System to obtain the newly added image file corresponding to the image update request.

[0132] Specifically, the image update request may include: the image hash corresponding to the new image file, which can be obtained from the equity relationship table corresponding to each user stored locally in the non-fungible token image query system, the storage node corresponding to the image hash, and the non-fungible token image file corresponding to the image update request can be obtained from the storage node as the new image file.

[0133] Step 600: Combine the non-fungible token image files and the non-fungible token images in the newly added image file to obtain the updated combined image.

[0134] Step 700: Using the image hashes of each of the non-fungible token image files and the newly added image file as leaf nodes, an updated Merkle tree is constructed. The root node of the updated Merkle tree is determined as the updated combined image hash and replaced with the combined image hash in the equity relationship table.

[0135] Step 800: Store the updated combined image file, which consists of the updated combined image and the updated combined image hash, in the primary storage node and the backup storage node.

[0136] To improve the reliability of the primary and backup storage nodes, in one embodiment, the method further includes the following step before step 025:

[0137] The primary storage node and the backup storage node are determined based on the number of non-fungible token image files in each storage node and the node distance.

[0138] Specifically, the storage node that stores the most non-fungible token image files can be determined as the primary storage node, and the storage node that is closest to the primary storage node can be determined as the backup storage node.

[0139] To increase the complexity of the key, reduce the probability of the key being cracked, and improve the reliability of data transmission, in one embodiment, the client and the blockchain node, as well as the blockchain node and the storage node, use an asymmetric encryption algorithm that uses the address information of both communicating parties as a generation factor for data communication.

[0140] Specifically, receiving the image query request sent by the client of the target user may include: receiving an image query request sent by the client containing a first public key and ciphertext, wherein the ciphertext is obtained by encrypting the target user's unique identifier using a first secret key, and the first secret key is generated using the address information of the first private key, the second public key, the client, and the blockchain node; decrypting the ciphertext using a second secret key to obtain the target user's unique identifier, wherein the second secret key is generated using the address information of the second private key, the first public key, the client, and the blockchain node; the client includes: an asymmetric key pair of the first public key and the first private key, and the blockchain node includes: an asymmetric key pair of the second public key and the second private key.

[0141] The step of retrieving the target image file corresponding to the image query request from the InterPlanetary File System based on the image hash list may include: encrypting the image hash list using a second secret key, wherein the second secret key is generated using the second private key, a third public key, and the address information of the blockchain node and the storage node; sending the encrypted image hash list to the storage node, so that the storage node decrypts the image hash list using the third secret key, and retrieves the target image file corresponding to the image query request, wherein the third secret key is generated using the third private key, the second public key, and the address information of the blockchain node and the storage node, and the storage node may include: an asymmetric key pair of a third public key and a third private key.

[0142] To further illustrate this solution, this application provides an application example of a blockchain-based non-fungible token image query method, specifically including:

[0143] I. Perform the NFT combined hash tree transformation process, which includes:

[0144] Step S301: The unique identifier hash value of each NFT image is a leaf node. From bottom to top, the combined hash of adjacent leaf nodes is used as the new hash value. The new hash value becomes the tree node of the Merkle tree and continues to be combined with adjacent tree nodes to form a new hash value. A combined image corresponds to a Merkle tree root node. The value of each node in the tree is not stored on the chain.

[0145] Step S302: The rights information corresponding to the NFT image includes: image title Tilte, storage node information IPFS corresponding to the image, issuance quantity Amount, price Price, node name Node and other metadata information. Each NFT image stores its own rights information and hash according to the standard structure. The entire rights information structure corresponds to a hash as the unique identifier of the NFT image, and also as the leaf node hash in step S301.

[0146] Step S303: After repeating step S301 a certain number of times, a root node is formed. The root node corresponds to a hash as a unique identifier for the combined image. The chain can store an unlimited number of Merkle tree root node structures. In one example, such as... Figure 6 As shown, the hashes of multiple NFT images can be used to form a Merkle tree, and the hash of the root node of the Merkle tree is NFTHash 1.

[0147] Step S304: After the Merkle tree transformation, the hash of the newly added merged image is used as a leaf node of the tree, and the root node hash is recalculated. The value of the node and its associated path can be used to quickly verify whether the newly added node belongs to the Merkle tree, thus quickly verifying whether the combined image contains a certain image. In one example, such as... Figure 6 As shown, if it is necessary to apply the newly added merged image to update the combined image, the Merkle tree corresponding to the updated combined image can be obtained. The hash corresponding to the root node of the Merkle tree is NFT Hash 2.

[0148] II. Figure 7 As shown, the NFT image file combination storage procedure is executed, which includes:

[0149] Step S401: Image combination, constructing a Merkle tree; that is, the blockchain node receives an image combination request, which includes: a list of images to be combined, which includes: hashes of multiple NFT images; a Merkle tree structure is generated based on the list of images to be combined, and at the same time, it is determined whether image combination is needed according to user needs. If so, the file of each image is pulled according to the rights information of each image.

[0150] Step S402: Storage node availability detection; that is, establish a connection with the corresponding storage node based on the IPFS storage node information corresponding to the NFT image, monitor whether the corresponding node is alive and whether it stores the corresponding image file. If it does not exist, query and obtain the last stored node information according to the original DHT process.

[0151] Step S403: Return the actual storage node and record the actual node; that is, the blockchain node will record the IP information of the returned actual storage node for subsequent processing.

[0152] Step S404: Node distribution analysis, selecting logical master nodes and logical backup nodes; that is, based on the equity relationship table, the master storage node and backup storage node corresponding to this combined image are selected according to conditions such as the number of node files and node distance. Generally, the master storage node is the closest and has the most files, while the backup storage node is relatively next and closest to the master storage node. The distribution of master and backup storage nodes conforms to a relatively consistent hash distribution within the combined image. The logical master node is the master storage node, and the logical backup node is the backup storage node.

[0153] Step S405: Node message broadcasting; that is, after the blockchain nodes elect the primary storage node and the backup storage node, they broadcast the relevant information to the corresponding storage nodes for subsequent file synchronization.

[0154] Step S406: Retrieve files based on the list of images to be combined; that is, the primary storage node and the backup storage node retrieve files from different storage nodes to their local machines based on the list of images to be combined, and modify the corresponding file hashes to the combined image hashes, thereby achieving centralized management of combined image files.

[0155] Step S407: Update the equity relationship table; that is, after several primary storage nodes and backup storage nodes have completed the file synchronization process, the blockchain nodes record the corresponding storage node-hash information for subsequent batch queries.

[0156] Step S408: On-chain association; that is, the blockchain node stores the equity relationship table on the chain, and subsequent operations on combining images can be obtained based on the association relationship in the equity relationship table and the Merkle tree operation.

[0157] Figure 8 This diagram illustrates a comparison between node loop diagrams in existing technologies and the node loop diagram in this application example. Figure 8 In this context, Node 1 to Node 8 represent storage nodes 1 to 8; A.photo to F.photo represent NFT images A to F; and Hash 1 to Hash 7 represent the hashes of each NFT image. Figure 8 The upper part is a node ring diagram that conforms to the consistent hash distribution in the existing technology: all storage nodes on IPFS form a consistent hash ring. The file hash is calculated according to the rules, and the nearest node is selected to store the specific file information according to the hash distribution rules. The corresponding consistent hash table is shown in Table 1. The hash and the node have a 1:1 relationship. One hash can uniquely find a storage node on the node ring.

[0158] Table 1

[0159] Storage node Node Hash of image Hash node1 Hash1 node3 Hash3 node5 Hash2 node6 Hash4 ... ...

[0160] like Figure 8The lower half is the node ring diagram of the weakly consistent hash distribution designed in this case: some nodes in the node combination corresponding to the combined image (i.e., the primary storage node) form a logically consistent hash ring, and the remaining nodes serve as logical backup nodes according to the rules, backing up each other with the primary storage node. When the primary storage node fails, the backup storage node joins the logically consistent hash ring as a substitute node to meet the hash distribution requirements; the file calculates the file hash according to the rules, and selects the nearest primary storage node and backup storage node to store the specific file information according to the hash distribution rules; as shown in Table 2, the hash and storage node have a 1:N relationship, one hash corresponds to a primary storage node and a backup storage node on the node ring, and each storage node can also store multiple hashes.

[0161] Table 2

[0162]

[0163] III. Perform the batch query process for NFT image files. This process includes:

[0164] Step S601: Query NFT image information on the blockchain, obtain the corresponding user's equity relationship table from the blockchain world state, and obtain the corresponding storage information based on the equity relationship table.

[0165] Step S602: Based on the storage information obtained in step S601, the IPFS protocol locates the specific storage node according to the DHT distributed hash table design. For any network with [2(n-1), 2n] nodes, the target node can be found in at most n search steps.

[0166] Step S603: Query NFT image information on the blockchain, obtain the corresponding user's stake relationship table from the blockchain world state, obtain the combined NFT image hash based on the stake relationship table, and obtain the list of combined images stored by the corresponding node. Change the current mode of finding specific storage nodes to obtain file content based on file hash to obtain the detailed file content of combined images in batches based on the stake relationship table, which greatly improves the query efficiency of combined images. Figure 9 This is a logical diagram illustrating an example of a batch query process for NFT image files in this application. Figure 9 In this context, Block 1 to Block N represent blockchain nodes 1 to N, and Node 1 to Node 4 represent storage nodes.

[0167] In existing query processes, multiple NFT image files corresponding to a single NFT image set may be stored on different storage nodes. Assuming a combined image set corresponds to 100 NFT images, it would require 100 iterations to retrieve all the image files. Compared to existing technologies, this solution's NFT image query process utilizes a stake relationship table to obtain Node information; it then queries image files in batches based on node routing, returning an image list. In other words, it allows on-chain querying of NFT image information and retrieval of the corresponding user's stake relationship table from the blockchain world state. Unlike existing technologies, the stake relationship table designed in this application follows a logical correspondence between storage nodes and image sets. Through this table, the full set of storage nodes corresponding to the combined image set can be determined, further enabling the retrieval of image file sets on different storage nodes. For example, a batch query of an image file set, assuming a list of 100 NFT images distributed across 5 storage nodes, would only require 5 iterations to retrieve all the image files, significantly improving query efficiency compared to the current process.

[0168] IV. Perform the image information authentication process, such as Figure 10 As shown, the process specifically includes:

[0169] Step S801: The blockchain node generates a random value; that is, the blockchain node randomly generates several random numbers, and each image to be combined corresponds to a random number, which facilitates the subsequent calculation of the hash of the Merkle leaf node required.

[0170] Step S802: The client uses the random value as a key and selects user characteristic information according to the rules to perform HMAC operation; the blockchain node reads the user information rule information on the chain and uses the random value key to perform the same HMAC operation as the client; that is, the block node selects a user characteristic information and the original NFT hash according to the rules, uses the random number as a key to perform a mirror HMAC operation to obtain a hash value, and the client obtains a hash value in the same way.

[0171] Step S803: Image user authentication successful; The blockchain node compares the HMAC hash generated by the client with the HMAC hash generated on the chain. If they match, the image is considered to belong to the user and has been authenticated. The combination can be used, and all subsequent operations on the chain will be performed around this HMAC hash, without exposing the original NFT's hash value, thus protecting the information of the original hash.

[0172] In this application example, the DH key exchange algorithm, which uses the address information of both communicating parties as the generation factor, is used to realize data communication between the client and the blockchain node, and between the blockchain node and the storage node. Specifically, in step S901: Node 1 defines a large prime number p and a base g, and calculates A = g^a mod p. It then sends p, g, and A to Node 2. After step S902 is completed, it calculates the secret key K1 by combining the IP addresses of Node 1 and Node 2 as follows: K1 = IP1 * IP2 * B * a mod p, where IP1 can represent the IP address of Node 1, and IP2 can represent the IP address of Node 2.

[0173] Step S902: Node 2 selects a secret integer b, calculates B = g^b mod p, and sends B to Node 1. Combining the IPs of Node 1 and Node 2, the secret key K2 is calculated as follows: K2 = IP1 * IP2 * A * b mod p. If K1 and K2 are equal, the key exchange is completed and communication encryption / decryption is achieved. Node 1 can be one of the following: a blockchain node, a storage node, or a client. Node 2 can also be one of these three types of nodes.

[0174] From a software perspective, in order to achieve the combination and centralized storage of multiple non-fungible token (NFG) images, thereby improving the efficiency of NFG image querying, this application provides an embodiment of a blockchain-based NFG image query system for implementing all or part of the aforementioned blockchain-based NFG image query method. See [link to embodiment]. Figure 11 The blockchain-based non-fungible token image query system specifically includes the following:

[0175] The query request receiving device 01 is used to receive image query requests sent by the target user's client.

[0176] The obtaining device 02 is used to obtain the rights and interests table corresponding to the image query request from the blockchain;

[0177] The query device 03 is used to query the target image file corresponding to the equity relationship table from the InterPlanetary File System; the target image file includes: a combined image file obtained by combining non-fungible token image files from multiple storage nodes of the InterPlanetary File System, the combined image file is stored in a uniquely corresponding primary storage node and backup storage node, the primary storage node and backup storage node are storage nodes in the InterPlanetary File System.

[0178] In one embodiment, the blockchain-based non-fungible token image query system further includes:

[0179] A receiving combination request device receives an image combination request corresponding to the combined image file, the image combination request including: the image hash of each of the non-fungible token image files;

[0180] An image file acquisition device is configured to acquire each of the non-fungible token image files from multiple storage nodes of the InterPlanetary File System in accordance with the image combination request.

[0181] A combining device is used to combine the non-fungible token images from the various non-fungible token image files to obtain a combined image;

[0182] A construction device is used to construct a Merkle tree by applying the image hashes of each of the non-fungible token image files as leaf nodes, and to determine the root node of the Merkle tree as the combined image hash and store it in the equity relationship table.

[0183] A storage device for storing the combined image file, which consists of the combined image and the combined image hash, in the primary storage node and the backup storage node.

[0184] In one embodiment, the image hash in the image combination request is obtained by performing a hash operation message authentication code processing on the target user's client using its corresponding original image hash, user unique identifier, and random number as a key mirror;

[0185] Correspondingly, the blockchain-based non-fungible token image query system also includes:

[0186] The processing device is used to perform hash operation message authentication code processing based on the original image hash, user unique identifier and random number corresponding to each of the non-fungible token image files as key mirrors, to obtain their respective image hashes and store them in the rights and interests table;

[0187] Correspondingly, the device for obtaining image files includes:

[0188] The judgment module is used to determine whether each image hash in the image combination request exists in the equity relationship table. If so, it determines that the user authentication of the image combination request is successful and obtains each non-fungible token image file from multiple storage nodes of the InterPlanetary File System.

[0189] In one embodiment, the blockchain-based non-fungible token image query system further includes:

[0190] The update request receiving module is used to receive the image update request corresponding to the combined image file;

[0191] The file query module is used to query the Interplanetary File System to obtain the newly added image file corresponding to the image update request;

[0192] The update module is used to combine the non-fungible token image files and the non-fungible token images in the newly added image files to obtain an updated combined image;

[0193] The replacement module is used to construct an updated Merkle tree by applying the image hashes of each of the non-fungible token image files and the newly added image file as leaf nodes, and to determine the root node of the updated Merkle tree as the updated combined image hash and replace the combined image hash in the equity relationship table.

[0194] The storage file module is used to store the updated combined image file, which consists of the updated combined image and the updated combined image hash, in the primary storage node and the backup storage node.

[0195] In one embodiment, the blockchain-based non-fungible token image query system further includes:

[0196] The determining device determines the primary storage node and the backup storage node based on the number of non-fungible token image files in each storage node and the node distance.

[0197] In one embodiment, the client and the blockchain node, as well as the blockchain node and the storage node, use an asymmetric encryption algorithm that uses the address information of both communicating parties as a generation factor for data communication.

[0198] In one embodiment, the rights and interests table includes: original image information and / or combined image information corresponding to the target user. The original image information includes: image hash and storage node information of the non-fungible token image. The combined image information includes: combined image hash, primary storage node information and backup storage node information corresponding to the combined image.

[0199] The embodiments of the blockchain-based non-fungible token image query system provided in this specification can be used to execute the processing flow of the embodiments of the blockchain-based non-fungible token image query method described above. Its functions will not be repeated here, but can be referred to the detailed description of the embodiments of the blockchain-based non-fungible token image query method described above.

[0200] From a hardware perspective, in order to achieve the combination and centralized storage of multiple non-fungible token images, thereby improving the efficiency of non-fungible token image query, this application provides an embodiment of an electronic device for implementing all or part of the aforementioned blockchain-based non-fungible token image query method. The electronic device specifically includes the following components:

[0201] The system comprises a processor, memory, a communications interface, and a bus; wherein the processor, memory, and communications interface communicate with each other via the bus; the communications interface is used to realize information transmission between the blockchain-based non-fungible token image query system and related devices such as user terminals; the electronic device can be a desktop computer, tablet computer, or mobile terminal, etc., and this embodiment is not limited to these. In this embodiment, the electronic device can be implemented with reference to the embodiments for implementing the blockchain-based non-fungible token image query method and the embodiments for implementing the blockchain-based non-fungible token image query system, the content of which is incorporated herein, and repeated details will not be described again.

[0202] Figure 12 This is a schematic block diagram illustrating the system configuration of the electronic device 9600 according to an embodiment of this application. Figure 12 As shown, the electronic device 9600 may include a central processing unit 9100 and a memory 9140; the memory 9140 is coupled to the central processing unit 9100. It is worth noting that... Figure 12 This is an example; other types of structures can also be used to supplement or replace this structure to achieve telecommunications functions or other functions.

[0203] In one or more embodiments of this application, a blockchain-based non-fungible token image query function can be integrated into a central processing unit 9100. The central processing unit 9100 can be configured to perform the following control:

[0204] Step 100: Receive the image query request sent by the target user's client.

[0205] Step 200: Obtain the equity relationship table corresponding to the image query request from the blockchain.

[0206] Step 300: Query the InterPlanetary File System to obtain the target image file corresponding to the equity relationship table.

[0207] Step 400: The target image file includes a combined image file obtained by combining non-fungible token image files from multiple storage nodes of the InterPlanetary File System. The combined image file is stored in a uniquely corresponding primary storage node and a backup storage node, which are storage nodes in the InterPlanetary File System.

[0208] As can be seen from the above description, the electronic device provided in the embodiments of this application can realize the combination and centralized storage of multiple non-fungible token images, thereby improving the efficiency of non-fungible token image query.

[0209] In another implementation, the blockchain-based non-fungible token image query system can be configured separately from the central processing unit 9100. For example, the blockchain-based non-fungible token image query system can be configured as a chip connected to the central processing unit 9100, and the blockchain-based non-fungible token image query function can be realized through the control of the central processing unit.

[0210] like Figure 12 As shown, the electronic device 9600 may further include: a communication module 9110, an input unit 9120, an audio processor 9130, a display 9160, and a power supply 9170. It is worth noting that the electronic device 9600 does not necessarily need to include these components. Figure 12 All components shown; in addition, the electronic device 9600 may also include Figure 12 For components not shown, please refer to existing technologies.

[0211] like Figure 12 As shown, the central processing unit 9100, sometimes also referred to as a controller or operating control, may include a microprocessor or other processor device and / or logic device, which receives inputs and controls the operation of various components of the electronic device 9600.

[0212] The memory 9140 may be, for example, one or more of a cache, flash memory, hard drive, removable media, volatile memory, non-volatile memory, or other suitable devices. It may store the aforementioned failure-related information, and also store a program for executing that information. The central processing unit 9100 may execute the program stored in the memory 9140 to perform information storage or processing, etc.

[0213] Input unit 9120 provides input to central processing unit 9100. Input unit 9120 may be, for example, a keypad or touch input device. Power supply 9170 provides power to electronic device 9600. Display 9160 displays images and text. Display may be, for example, an LCD display, but is not limited thereto.

[0214] The memory 9140 can be a solid-state memory, such as a read-only memory (ROM), random access memory (RAM), a SIM card, etc. It can also be a memory that retains information even when power is off, can be selectively erased, and contains more data; examples of this type of memory are sometimes referred to as EPROMs. The memory 9140 can also be some other type of device. The memory 9140 includes a buffer memory 9141 (sometimes referred to as a buffer). The memory 9140 may include an application / function storage unit 9142 for storing application programs and function programs or processes for executing the operation of the electronic device 9600 via the central processing unit 9100.

[0215] The memory 9140 may also include a data storage unit 9143 for storing data, such as contacts, digital data, images, sounds, and / or any other data used by the electronic device. The driver storage unit 9144 of the memory 9140 may include various drivers for the electronic device's communication functions and / or for performing other functions of the electronic device (such as messaging applications, address book applications, etc.).

[0216] The communication module 9110 is a transmitter / receiver 9110 that transmits and receives signals via the antenna 9111. The communication module (transmitter / receiver) 9110 is coupled to the central processing unit 9100 to provide input signals and receive output signals, which can be the same as in a conventional mobile communication terminal.

[0217] Based on different communication technologies, multiple communication modules 9110 can be configured in the same electronic device, such as cellular network modules, Bluetooth modules, and / or wireless LAN modules. The communication module (transmitter / receiver) 9110 is also coupled to a speaker 9131 and a microphone 9132 via an audio processor 9130 to provide audio output via the speaker 9131 and receive audio input from the microphone 9132, thereby realizing typical telecommunications functions. The audio processor 9130 may include any suitable buffer, decoder, amplifier, etc. Additionally, the audio processor 9130 is coupled to a central processing unit 9100, enabling on-device recording via the microphone 9132 and on-device playback of stored sound via the speaker 9131.

[0218] As described above, the electronic device provided in the embodiments of this application can realize the combination and centralized storage of multiple non-fungible token images, thereby improving the efficiency of non-fungible token image query.

[0219] Embodiments of this application also provide a computer-readable storage medium capable of implementing all steps of the blockchain-based non-fungible token image query method in the above embodiments. The computer-readable storage medium stores a computer program that, when executed by a processor, implements all steps of the blockchain-based non-fungible token image query method in the above embodiments. For example, when the processor executes the computer program, it implements the following steps:

[0220] Step 100: Receive the image query request sent by the target user's client.

[0221] Step 200: Obtain the equity relationship table corresponding to the image query request from the blockchain.

[0222] Step 300: Query the InterPlanetary File System to obtain the target image file corresponding to the equity relationship table.

[0223] Step 400: The target image file includes a combined image file obtained by combining non-fungible token image files from multiple storage nodes of the InterPlanetary File System. The combined image file is stored in a uniquely corresponding primary storage node and a backup storage node, which are storage nodes in the InterPlanetary File System.

[0224] As can be seen from the above description, the computer-readable storage medium provided in the embodiments of this application can realize the combination and centralized storage of multiple non-fungible token images, thereby improving the efficiency of non-fungible token image query.

[0225] The various embodiments of the methods described in this application are presented in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on explaining the differences from other embodiments. Relevant details can be found in the descriptions of the method embodiments.

[0226] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied 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.

[0227] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0228] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0229] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0230] This application uses specific embodiments to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A blockchain-based method for querying non-fungible token images, characterized in that, include: Receive image query requests sent by the target user's client; Obtain the equity relationship table corresponding to the image query request from the blockchain; The target image file corresponding to the equity relationship table is obtained by querying the InterPlanetary File System; The target image file includes: a combined image file obtained by combining non-fungible token image files from multiple storage nodes of the InterPlanetary File System, which is stored in a uniquely corresponding primary storage node and a backup storage node, wherein the primary storage node and the backup storage node are storage nodes in the InterPlanetary File System; Before obtaining the equity relationship table corresponding to the image query request from the blockchain, the method further includes: Receive an image combination request corresponding to the combined image files, the image combination request including: the image hashes of each of the non-fungible token image files; Based on the image combination request, each of the non-fungible token image files is obtained from multiple storage nodes of the InterPlanetary File System; The non-fungible token images from each of the non-fungible token image files are combined to obtain a combined image; A Merkle tree is constructed by using the image hashes of each of the non-fungible token image files as leaf nodes. The root node of the Merkle tree is determined as the combined image hash and stored in the equity relationship table. The combined image file, consisting of the combined image and the combined image hash, is stored on the primary storage node and the backup storage node.

2. The blockchain-based non-fungible token image query method according to claim 1, characterized in that, The image hash in the image combination request is obtained by performing a hash operation and message authentication code processing on the target user's client using its corresponding original image hash, user unique identifier, and random number as a key mirror; Before receiving the image combination request corresponding to the combined image file, the method further includes: Based on the original image hash, user unique identifier, and random number corresponding to each of the non-fungible token image files, a hash operation message authentication code is performed using the key mirror to obtain their respective image hashes and store them in the rights and interests table; The step of obtaining each of the non-fungible token image files from multiple storage nodes of the InterPlanetary File System according to the image combination request includes: Determine whether the hashes of each image in the image combination request exist in the rights and interests table. If so, determine that the user authentication of the image combination request is successful, and obtain each of the non-fungible token image files from multiple storage nodes of the InterPlanetary File System.

3. The blockchain-based non-fungible token image query method according to claim 1, characterized in that, Also includes: Receive the image update request corresponding to the combined image file; The newly added image file corresponding to the image update request is retrieved from the Interplanetary File System. The updated combined image is obtained by combining each of the non-fungible token image files and the non-fungible token images in the newly added image file; The image hashes of each of the non-fungible token image files and the newly added image file are used as leaf nodes to construct an updated Merkle tree. The root node of the updated Merkle tree is determined as the updated combined image hash and replaces the combined image hash in the equity relationship table. The updated combined image file, consisting of the updated combined image and the updated combined image hash, is stored in the primary storage node and the backup storage node.

4. The blockchain-based non-fungible token image query method according to claim 1, characterized in that, Also includes: The primary storage node and the backup storage node are determined based on the number of non-fungible token image files in each storage node and the node distance.

5. The blockchain-based non-fungible token image query method according to claim 1, characterized in that, The client and the blockchain node, as well as the blockchain node and the storage node, use an asymmetric encryption algorithm that uses the address information of both parties as a generation factor for data communication.

6. The blockchain-based non-fungible token image query method according to claim 1, characterized in that, The rights and interests table includes: the original image information and / or combined image information corresponding to the target user. The original image information includes: the image hash and storage node information of the non-fungible token image. The combined image information includes: the combined image hash, primary storage node information and backup storage node information corresponding to the combined image.

7. A blockchain-based non-fungible token image query system, characterized in that, The non-fungible token image query system is used to execute the blockchain-based non-fungible token image query method according to any one of claims 1 to 6, wherein the non-fungible token image query system comprises: A query request receiving device is used to receive image query requests sent by the target user's client; A device for obtaining a table of interests corresponding to the image query request from the blockchain; A query device is used to retrieve the target image file corresponding to the equity relationship table from the InterPlanetary File System; The target image file includes a combined image file obtained by combining non-fungible token image files from multiple storage nodes of the InterPlanetary File System. The combined image file is stored in a unique primary storage node and a backup storage node, which are storage nodes in the InterPlanetary File System.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the blockchain-based non-fungible token image query method according to any one of claims 1 to 6.

9. A computer-readable storage medium storing computer instructions thereon, characterized in that, When the instruction is executed by the processor, it implements the blockchain-based non-fungible token image query method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Government affair data storage and query method and system based on block chain double-chain structure

    CN110109930A

  • Medical data sharing method and device based on block chain and interstellar file system

    CN114153811A