Blockchain-based file storage method, device, equipment, and storage medium

By generating and writing the NFT's link address and user permission list on the blockchain, the problem of incoordination between NFT ownership and off-chain digital asset data transfer is solved, and the protection of NFT digital assets and the security and reliability of data access are achieved.

CN114398686BActive Publication Date: 2025-09-12SOUTHERN UNIVERSITY OF SCIENCE AND TECHNOLOGY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111455313.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-01
Publication Date
2025-09-12
Estimated Expiration
2041-12-01

AI Technical Summary

Technical Problem

In existing technologies, the ownership of NFTs on the blockchain and the data of off-chain digital assets cannot be transferred in a coordinated manner, resulting in the NFT owner still owning the off-chain data when losing on-chain ownership, and failing to effectively protect NFT digital assets.

Method used

By generating a link address for the storage file on the blockchain and writing it into the NFT, storing it on the data hosting platform, and establishing a user permission list on the NFT, the permission list is sent to the hosting platform through the blockchain, and user permissions are set to achieve the coordinated transfer of NFT ownership and off-chain digital assets.

Benefits of technology

It achieves improved protection of NFT digital assets, ensures synchronous changes of off-chain data when NFT ownership changes, and improves the security and reliability of data access.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114398686B_ABST
    Figure CN114398686B_ABST
Patent Text Reader

Abstract

The present invention discloses a blockchain-based file storage method, apparatus, terminal device, and storage medium. The method generates a corresponding link address based on a stored file, writes the link address into an NFT for storage in a blockchain metadata domain, stores the stored file in a data hosting platform, generates a user rights list based on the NFT, establishes a connection between the user rights list and the ownership of the NFT, and transmits the user rights list to the data hosting platform via the blockchain. Thus, the blockchain-based file storage method provided by the present invention can set user rights for off-chain digital asset data based on NFT ownership on the blockchain, thereby achieving a coordinated transfer of NFT ownership on the blockchain and off-chain digital asset data, thereby improving the protection of NFT digital assets.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of blockchain technology, and in particular to a blockchain-based file storage method, device, equipment, and computer storage medium. Background Art

[0002] NFTs are non-fungible tokens on the blockchain, unique and indivisible. The digital assets represented by NFTs can be stored in two ways: on the blockchain and off the blockchain. For on-chain data, storing NFT data directly on the blockchain is the optimal option due to its inherent tamper-proof and permanent nature. However, due to the limited capacity of the blockchain, only very small data can be stored on the blockchain, such as a piece of text or a string of numbers. For data that cannot be stored on the blockchain, NFTs typically provide a link to an external data storage location.

[0003] When the digital assets represented by NFTs are stored off-chain, if the ownership of the NFT changes, the off-chain data of the previous owner should remain invalid and the off-chain data of the current owner must be provably valid. In existing solutions, after the NFT ownership is transferred, each previous owner of the NFT still owns all the data, and the data between each owner is completely consistent. It can be seen that when the NFT owner loses the on-chain ownership, it does not mean that he has lost the ownership of the off-chain data, which makes it impossible to transfer the NFT ownership on the blockchain and the data of the off-chain digital assets in a coordinated manner.

[0004] It can be seen that how to achieve coordinated transfer of NFT ownership on the blockchain and data of off-chain digital assets, thereby improving the protection of NFT digital assets, is a difficult problem that needs to be urgently solved in the field of blockchain technology. Summary of the Invention

[0005] The main purpose of the present invention is to provide a blockchain-based file storage method, device, equipment and computer storage medium, which aims to set user permissions for the data of off-chain digital assets based on NFT ownership on the blockchain, thereby realizing the coordinated transfer of NFT ownership on the blockchain and the data of off-chain digital assets, and improving the protection effect of NFT digital assets.

[0006] To achieve the above objectives, the present invention provides a blockchain-based file storage method, which includes the following steps:

[0007] Generate a corresponding link address based on the storage file, and write the link address into the NFT to be stored in the blockchain metadata domain;

[0008] Storing the stored files on a data hosting platform;

[0009] A user rights list is generated based on the NFT, a connection is established between the user rights list and the ownership of the NFT, and the user rights list is sent to the data hosting platform via the blockchain.

[0010] Furthermore, after the step of generating a user rights list based on the NFT and establishing a connection relationship between the user rights list and the ownership of the NFT, the method further includes:

[0011] Obtaining a file request based on the link address;

[0012] Comparing the user identity corresponding to the file request with the user authority list to confirm whether the user identity is consistent with the user authority list;

[0013] If so, respond to the file request.

[0014] Furthermore, after the step of establishing a connection relationship between the user permission list and the ownership of the NFT, the method further includes:

[0015] generating a plurality of mutually independent file watermarks based on the user authority list;

[0016] After the step of responding to the file request, the method further includes:

[0017] Embedding the file watermark into the stored file to obtain a target file;

[0018] The target file is sent to the initiator of the file request via the link address.

[0019] Furthermore, after the step of establishing a connection relationship between the user permission list and the ownership of the NFT, the method further includes:

[0020] Receiving a request to change ownership of the NFT;

[0021] Modify the user permission list based on the change request; and / or,

[0022] A corresponding file watermark is generated based on the change request.

[0023] Furthermore, the blockchain-based file storage method further includes:

[0024] Establish a data hosting platform based on a private distributed storage network.

[0025] Furthermore, the blockchain-based file storage method further includes:

[0026] Generate a corresponding hash value according to the storage file;

[0027] The hash value is written into the NFT and the storage file respectively, so that the integrity of the storage file can be verified based on the hash value when responding to a file request.

[0028] Furthermore, after the step of writing the link address into the NFT, the method further includes:

[0029] The alliance chain is used as the blockchain carrier of the NFT, wherein the alliance chain is used to allow institutions whose credibility reaches a preset threshold to keep accounts.

[0030] In addition, to achieve the above-mentioned purpose, the present invention further provides a blockchain-based file storage device, the blockchain-based file storage device comprising:

[0031] A first storage module is used to generate a corresponding link address based on the storage file, and write the link address into the NFT for storage in the blockchain metadata domain;

[0032] A second storage module is used to store the storage file in a data hosting platform;

[0033] A permission generation module is used to generate a user permission list based on the NFT, establish a connection between the user permission list and the ownership of the NFT, and send the user permission list to the data hosting platform through the blockchain.

[0034] Each functional module of the blockchain-based file storage device of the present invention implements the steps of the blockchain-based file storage method described above during operation.

[0035] In addition, to achieve the above-mentioned purpose, the present invention also provides a terminal device, which includes: a memory, a processor, and a blockchain-based file storage program stored on the memory and runnable on the processor. When the blockchain-based file storage program is executed by the processor, the steps of the blockchain-based file storage method as described above are implemented.

[0036] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the blockchain-based file storage method as described above are implemented.

[0037] In addition, an embodiment of the present invention also proposes a computer program product, which includes a blockchain-based file storage program. When the blockchain-based file storage program is executed by a processor, it implements the steps of the blockchain-based file storage method described above.

[0038] Among them, the steps implemented when the blockchain-based file storage program running on the processor is executed can refer to the various embodiments of the blockchain-based file storage method of the present invention, and will not be repeated here.

[0039] The blockchain-based file storage method, device, equipment and computer storage medium proposed in the present invention generate a corresponding link address based on the stored file, and write the link address into the NFT for storage in the blockchain metadata domain; store the stored file in a data hosting platform; generate a user permission list based on the NFT, establish a connection relationship between the user permission list and the ownership of the NFT, and send the user permission list to the data hosting platform through the blockchain.

[0040] The present invention writes the link address corresponding to the storage file into the NFT, thereby storing it on the blockchain, and then stores the storage file on the data hosting platform under the blockchain, and stores and updates the user permission list on the NFT. Since the user permission list is associated with the ownership of the NFT, the user permission list can be used to set the access rights of the storage file according to the ownership of the NFT, so that users who do not have the NFT ownership cannot access the storage file corresponding to the NFT stored on the data hosting platform, thereby realizing the coordinated transfer of NFT ownership on the blockchain and the data of digital assets under the chain.

[0041] In this way, the blockchain-based file storage method provided by the present invention can set user permissions for the data of off-chain digital assets based on the NFT ownership on the blockchain, thereby realizing the coordinated transfer of NFT ownership on the blockchain and the data of off-chain digital assets, and improving the protection effect of NFT digital assets. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 Schematic diagram of the hardware operating environment of a terminal device involved in an embodiment of the present invention;

[0043] Figure 2 This is a flowchart of an embodiment of a blockchain-based file storage method of the present invention;

[0044] Figure 3 This is a schematic diagram of the structure of a related smart contract involved in one embodiment of the present invention;

[0045] Figure 4 This is a flowchart of the registration of NFT property rights information involved in one embodiment of the present invention;

[0046] Figure 5 This is an application flow chart of file storage according to an embodiment of the present invention;

[0047] Figure 6 This is an application flow chart for changing NFT ownership according to an embodiment of the present invention;

[0048] Figure 7 This is a schematic diagram of the module structure of a blockchain-based file storage device of the present invention.

[0049] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION

[0050] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0051] like Figure 1 As shown, Figure 1 It is a structural diagram of the hardware operating environment of the terminal device involved in the embodiment of the present invention.

[0052] It should be noted that Figure 1 This is a schematic diagram of the hardware operating environment of the terminal device. The terminal device in the embodiment of the present invention can be an electronic terminal, PC, portable computer, or other terminal device used to implement blockchain file storage.

[0053] like Figure 1 As shown, the terminal device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may optionally be a storage device independent of the aforementioned processor 1001.

[0054] Those skilled in the art will understand that Figure 1 The terminal device structure shown in the figure does not constitute a limitation on the terminal device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0055] like Figure 1As shown, the memory 1005, which is a computer storage medium, may include an operating system, a network communication module, a user interface module, and a distributed task processing program. The operating system is a program that manages and controls the hardware and software resources of the sample terminal device and supports the operation of the distributed task processing program and other software or programs.

[0056] exist Figure 1 In the terminal device shown, the user interface 1003 is mainly used to communicate data with various terminals; the network interface 1004 is mainly used to connect to the backend server and communicate data with the backend server; and the processor 1001 can be used to call the blockchain-based file storage program stored in the memory 1005 and perform the following operations:

[0057] Generate a corresponding link address based on the storage file, and write the link address into the NFT to be stored in the blockchain metadata domain;

[0058] Storing the stored files on a data hosting platform;

[0059] A user rights list is generated based on the NFT, a connection is established between the user rights list and the ownership of the NFT, and the user rights list is sent to the data hosting platform via the blockchain.

[0060] Furthermore, after the steps of generating a user rights list based on the NFT and establishing a connection between the user rights list and the ownership of the NFT, the processor 1001 may call a blockchain-based file storage program stored in the memory 1005 and further perform the following operations:

[0061] Obtaining a file request based on the link address;

[0062] Comparing the user identity corresponding to the file request with the user authority list to confirm whether the user identity is consistent with the user authority list;

[0063] If so, respond to the file request.

[0064] Furthermore, after the step of establishing a connection between the user permission list and the ownership of the NFT, the processor 1001 may call a blockchain-based file storage program stored in the memory 1005 and further perform the following operations:

[0065] generating a plurality of mutually independent file watermarks based on the user authority list;

[0066] After the step of responding to the file request, the method further includes:

[0067] Embedding the file watermark into the stored file to obtain a target file;

[0068] The target file is sent to the initiator of the file request via the link address.

[0069] Furthermore, after the step of establishing a connection between the user permission list and the ownership of the NFT, the processor 1001 may call a blockchain-based file storage program stored in the memory 1005 and further perform the following operations:

[0070] Receiving a request to change ownership of the NFT;

[0071] Modify the user permission list based on the change request; and / or,

[0072] A corresponding file watermark is generated based on the change request.

[0073] Furthermore, the processor 1001 may call a blockchain-based file storage program stored in the memory 1005 and further perform the following operations:

[0074] Establish a data hosting platform based on a private distributed storage network.

[0075] Furthermore, the processor 1001 may call a blockchain-based file storage program stored in the memory 1005 and further perform the following operations:

[0076] Generate a corresponding hash value according to the storage file;

[0077] The hash value is written into the NFT and the storage file respectively, so that the integrity of the storage file can be verified based on the hash value when responding to a file request.

[0078] Furthermore, after the step of writing the link address into the NFT, the processor 1001 may call the blockchain-based file storage program stored in the memory 1005 and perform the following operations:

[0079] The alliance chain is used as the blockchain carrier of the NFT, wherein the alliance chain is used to allow institutions whose credibility reaches a preset threshold to keep accounts.

[0080] Based on the above structure, various embodiments of the blockchain-based file storage method of the present invention are proposed.

[0081] It should be noted that when the digital assets represented by NFTs are stored off-chain, if the ownership of the NFT changes, the off-chain data of the previous owner should remain invalid and the off-chain data of the current owner must be provably valid. In existing solutions, after the NFT ownership is transferred, each previous owner of the NFT still owns all the data, and the data between each owner is completely consistent. It can be seen that when the NFT owner loses the on-chain ownership, it does not mean that he has lost the ownership of the off-chain data, which makes it impossible to transfer the NFT ownership on the blockchain and the data of the off-chain digital assets in a coordinated manner.

[0082] It can be seen that how to achieve coordinated transfer of NFT ownership on the blockchain and data of off-chain digital assets, thereby improving the protection of NFT digital assets, is a difficult problem that needs to be urgently solved in the field of blockchain technology.

[0083] Based on the above phenomenon, various embodiments of the blockchain-based file storage method of the present invention are proposed. It should be noted that although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than here.

[0084] First embodiment: Please refer to Figure 2 , Figure 2 This is a flowchart of the first embodiment of the blockchain-based file storage method of the present invention. The blockchain-based file storage method provided by the present invention includes the following steps:

[0085] Step S100, generate a corresponding link address based on the storage file, and write the link address into the NFT to be stored in the blockchain metadata domain.

[0086] like Figure 3 and Figure 4 As shown in the figure, since larger storage files cannot be directly stored on a blockchain with limited capacity, a corresponding link address is generated for such storage files through the terminal, and then the link address is written into an NFT (non-fungible token). The link address is then stored in the blockchain metadata domain through a smart contract, so that users can access and download the corresponding storage file through the link address on the blockchain. Among them, since NFTs are unique and indivisible, and the blockchain itself is tamper-proof and permanent, storing the link address in the blockchain metadata domain through NFTs can effectively ensure the reliability of the link address.

[0087] Step S200: storing the storage file in a data hosting platform.

[0088] After the terminal stores the link address corresponding to the storage file in the blockchain metadata domain through the storage platform, it stores the storage file itself on a data hosting platform with a larger capacity under the blockchain, so that users can jump to the data hosting platform through the link address on the blockchain to access and download the corresponding storage file.

[0089] Step S300: Generate a user permission list based on the NFT, establish a connection between the user permission list and the ownership of the NFT, and send the user permission list to the data hosting platform through the blockchain.

[0090] The terminal stores and updates the user permission list on the NFT. Since the user permission list is associated with the ownership of the NFT, the data hosting platform obtains the user permission list through the blockchain. Only users who own the NFT meet the standards of the user permission list and thus have the authority to access or download the corresponding storage files stored on the data hosting platform.

[0091] In this embodiment, a corresponding link address is generated for the storage file through the terminal, and then the link address is written into the NFT (non-fungible token), and then the link address is stored in the blockchain metadata domain through the smart contract, so that the user can access and download the corresponding storage file through the link address on the blockchain; after the terminal stores the link address corresponding to the storage file in the blockchain metadata domain through the storage platform, the storage file itself is stored on a data hosting platform with a larger capacity under the blockchain; the terminal stores and updates the user permission list on the NFT. Since the user permission list is associated with the ownership of the NFT, the data hosting platform obtains the user permission list through the blockchain, and only the user who owns the NFT meets the standards of the user permission list, thereby having the authority to access or download the corresponding storage file stored on the data hosting platform.

[0092] In this way, this embodiment can set user permissions for the data of off-chain digital assets based on the NFT ownership on the blockchain, thereby realizing the coordinated transfer of the NFT ownership on the blockchain and the data of off-chain digital assets, and improving the protection effect of NFT digital assets.

[0093] Furthermore, based on the first embodiment of the blockchain-based file storage method described above, a second embodiment of the blockchain-based file storage method of the present invention is proposed.

[0094] In the second embodiment of the blockchain-based file storage method of the present invention, after the above step S300, the method further includes:

[0095] Step A1, obtaining a file request issued based on the link address;

[0096] Step A2: comparing the user identity corresponding to the file request with the user authority list to confirm whether the user identity is consistent with the user authority list;

[0097] Step A3: If yes, respond to the file request.

[0098] like Figure 5 As shown, the user accesses the NFT link address stored on the blockchain, jumps to the data hosting platform where the file is stored through the link address, and issues a file access request / download request. The terminal compares the user identity corresponding to the file access request / download request with the user permission list. If the user has ownership of the NFT, the user identity is consistent with the user permission list. At this time, the terminal responds to the file access request / download request issued by the user and allows the user to perform the file access / file download operation.

[0099] Similarly, if the user does not own the NFT, the user identity does not match the user permission list. At this time, the terminal does not respond to or directly rejects the file access request / download request issued by the user, so that the user cannot continue to perform file access / file download operations.

[0100] In this way, this embodiment defines the specific steps of associating NFT ownership on the blockchain with digital assets off the blockchain based on the user permission list of the data hosting platform, and restricting the user's permission to perform related operations on off-chain digital assets, thereby improving the practicality of the blockchain-based file storage method of the present invention.

[0101] Furthermore, based on the first embodiment of the blockchain-based file storage method described above, a third embodiment of the blockchain-based file storage method of the present invention is proposed.

[0102] In the third embodiment of the blockchain-based file storage method of the present invention, after the above step S300, the method further includes:

[0103] Step B1: Generate multiple independent file watermarks based on the user authority list.

[0104] In this embodiment, after the above step A3, the following steps are further included:

[0105] Step B2, embedding the file watermark into the stored file to obtain a target file;

[0106] Step B3: Send the target file to the initiator of the file request via the link address.

[0107] In the field of blockchain technology, how to effectively and verifiably transfer the original data of digital assets under the blockchain is a difficult problem faced by the circulation of NFTs. The blockchain can permanently record the change of NFT ownership, but it cannot effectively constrain the behavior of the corresponding off-chain files.

[0108] If the recipient of the NFT ownership purchases the work from the provider, and the provider still owns exactly the same data as the recipient, the NFT ownership will have no distinction, making it difficult to confirm data ownership.

[0109] In order to solve this problem, in this embodiment, Figure 5 As shown, the terminal generates a unique file watermark for each NFT owner based on the user permission list. When a user with permission requests to access a file / download a file, the file watermark is embedded in the file through the data hosting platform and then sent to the initiator of the file access / download request to distinguish the original files of different NFT owners.

[0110] If file data is leaked, the file watermark contained in the leaked file data can be extracted, and then the file watermark can be compared with the NFT ownership information recorded on the blockchain to confirm whether the file data is within the validity period and which NFT ownership owner the leak originated from.

[0111] In this way, based on the fact that existing technologies cannot prevent the copying and dissemination of digital assets, this embodiment can effectively track and prevent the leakage of file data corresponding to digital assets under the blockchain through file watermarks, thereby further improving the protection effect of NFT digital assets.

[0112] Furthermore, based on the first embodiment of the blockchain-based file storage method described above, a fourth embodiment of the blockchain-based file storage method of the present invention is proposed.

[0113] In the fourth embodiment of the blockchain-based file storage method of the present invention, after the above step S300, the method further includes:

[0114] Step C1, receiving a request to change ownership of the NFT;

[0115] Step C2: modifying the user authority list based on the change request;

[0116] Step C3: Generate a corresponding file watermark based on the change request.

[0117] like Figure 6As shown, when the buyer of the NFT ownership completes the transaction with the provider, the terminal will receive a request to change the ownership of the NFT, and then modify the user permission list corresponding to the NFT on the data hosting platform according to the change request, cancel the permission of the provider of the NFT ownership, and add the permission of the buyer of the NFT ownership, so that the provider of the NFT ownership will no longer have the right to access / download the corresponding file data after the transaction is completed, while the buyer of the NFT ownership will obtain the permission to access / download the corresponding file data after the transaction is completed.

[0118] In another feasible embodiment, after the terminal modifies the user permission list based on the above-mentioned change request, it will also generate a unique file watermark corresponding to the purchaser of the NFT ownership, and embed the file watermark into the corresponding file data when the purchaser of the NFT ownership requests to access / download the file.

[0119] In this embodiment, a request for changing ownership of the NFT is received through the terminal, and then the corresponding user permission list is modified according to the change request, so that the provider of the NFT ownership has no right to access / download the corresponding file data after the transaction is completed, while the purchaser of the NFT ownership obtains the permission to access / download the corresponding file data after the transaction is completed, and a unique file watermark corresponding to the purchaser of the NFT ownership is generated, and when the purchaser of the NFT ownership requests to access / download the file, the file watermark is embedded in the corresponding file data.

[0120] In this way, this embodiment realizes that when the ownership of the NFT changes, the user permissions are synchronously changed for the data of the off-chain digital assets according to the change of the NFT ownership on the blockchain, thereby realizing the coordinated transfer of the NFT ownership on the blockchain and the data of the off-chain digital assets, thereby improving the practicality of the blockchain-based file storage method of the present invention.

[0121] Furthermore, based on the first embodiment of the blockchain-based file storage method described above, a fifth embodiment of the blockchain-based file storage method of the present invention is proposed.

[0122] In a fifth embodiment of the blockchain-based file storage method of the present invention, the blockchain-based file storage method further includes:

[0123] Step S400: establishing a data hosting platform based on a privatized distributed storage network.

[0124] Generally speaking, data hosting platforms used to store files can be centralized servers or built on private distributed storage networks. However, when using centralized servers, such as project servers or other cloud servers (Google Cloud, AWS, etc.), as data hosting platforms, since ownership of NFTs does not mean actual access control over the data on these centralized servers, users have to face the risk of digital assets being tampered with or lost, and centralized servers are vulnerable to external attacks, resulting in lower security.

[0125] In this embodiment, the terminal establishes a data hosting platform based on a private distributed storage network, which can effectively protect the user's data security and complete the complex work of data transfer under the blockchain when copyright is transferred on behalf of the user; at the same time, the data hosting platform established based on the private distributed storage network is constrained by the distributed storage network, has the ability to resist downtime and deletion and modification, and can achieve the effect of resisting single point failure by splitting file data into multiple groups of small data and copying them to multiple nodes for storage separately, thereby achieving higher security and reliability, thereby improving the protection effect of digital assets.

[0126] In this way, this embodiment establishes a data hosting platform based on a privatized distributed storage network, which can achieve higher security and reliability, improve the protection effect for digital assets, and thus improve the practicality of the blockchain-based file storage method of the present invention.

[0127] Furthermore, based on the first embodiment of the blockchain-based file storage method described above, a sixth embodiment of the blockchain-based file storage method of the present invention is proposed.

[0128] In a sixth embodiment of the blockchain-based file storage method of the present invention, the blockchain-based file storage method further includes:

[0129] Step S501, generating a corresponding hash value according to the stored file;

[0130] Step S502: Write the hash value into the NFT and the storage file respectively, so as to verify the integrity of the storage file based on the hash value when responding to a file request.

[0131] like Figure 5As shown, since the data hosting platform adopts distributed storage, there are multiple nodes participating in the storage. When users request data from multiple nodes, they can compare whether the data sent by different nodes are the same, and compare the hash value of the received data with the hash value of the original on the blockchain. If the two values ​​are the same, the data of the received file is considered complete and correct; if the values ​​are different, the user continues to request files from other nodes of the data hosting platform to ensure the integrity of the received file data.

[0132] It should be noted that in another feasible embodiment, if a file watermark is embedded in the file data sent by the node, the perceived hash value is used to verify the integrity of the file data. This is because the calculation process of the hash algorithm is one-way, irreversible, and collision-resistant. Therefore, the data content cannot be deduced from the hash value recorded on the blockchain, and even the slightest change in the data content will generate a completely different hash value, resulting in anomalies in the verification results of the file data integrity.

[0133] The perceptual hash algorithm is a type of hash algorithm used to compare data similarity. Since the data of a file embedded with a file watermark must be different from that of the original file, ordinary hash calculations cannot achieve the purpose of verifying data integrity. The perceptual hash algorithm has a certain tolerance and can be used to compare the similarity of file data embedded with a file watermark with the original file, thereby avoiding abnormal verification results due to file watermarks.

[0134] In this way, this embodiment verifies the integrity of file data sent by multiple nodes of the data hosting platform based on distributed storage through a hash algorithm, thereby ensuring that the file data received by the user is complete and correct, thereby improving the practicality of the blockchain-based file storage method of the present invention.

[0135] Furthermore, based on the first embodiment of the blockchain-based file storage method described above, a seventh embodiment of the blockchain-based file storage method of the present invention is proposed.

[0136] In the seventh embodiment of the blockchain-based file storage method of the present invention, after the above step S100, the method further includes:

[0137] In step S600, the alliance chain is used as the blockchain carrier of the NFT, wherein the alliance chain is used to allow institutions whose credibility reaches a preset threshold to keep accounts.

[0138] It should be noted that in this embodiment, the consortium chain is also called a permissioned chain, and nodes in this chain must obtain permission before participating in bookkeeping. Taking the Ethereum NFT contract standard as a reference, there are three existing NFT contract standards on Ethereum: ERC-721, ERC-1155, and ERC-998. The standard interfaces of NFT contracts, such as minting and transfer functions, must meet the requirements of these standards; otherwise, NFTs will not be compatible with each other. Furthermore, institutions with a credibility threshold that meets the administrator's preset credibility standards or institutions designated by the administrator as highly credible are referred to as institutions.

[0139] The terminal uses the alliance chain as the blockchain carrier of NFT, so that the blockchain where the NFT is located can only be recorded by institutions whose credibility meets the preset standards of the administrator, or by highly credible institutions designated by the administrator.

[0140] In this way, this embodiment uses the alliance chain as the blockchain carrier of NFT through the terminal, which improves the security and reliability of storing the link address of the storage file corresponding to the NFT and the NFT ownership change information in the blockchain, and improves the practicality of the blockchain-based file storage method of the present invention.

[0141] In addition, please refer to Figure 3 The embodiment of the present invention further provides a file storage device based on blockchain. The file storage device based on blockchain of the present invention includes:

[0142] A first storage module is used to generate a corresponding link address based on the storage file and write the link address into the NFT for storage in the blockchain metadata domain;

[0143] A second storage module is used to store the storage file in a data hosting platform;

[0144] A permission generation module is used to generate a user permission list based on the NFT, establish a connection between the user permission list and the ownership of the NFT, and send the user permission list to the data hosting platform through the blockchain.

[0145] Preferably, the blockchain-based file storage device further includes:

[0146] A comparison module is used to obtain a file request issued based on the link address; compare the user identity corresponding to the file request with the user permission list to confirm whether the user identity is consistent with the user permission list; if so, respond to the file request.

[0147] Preferably, the blockchain-based file storage device further includes:

[0148] The watermark generation module is used to generate multiple independent file watermarks based on the user permission list; embed the file watermarks into the storage file to obtain a target file; and send the target file to the initiator of the file request through the link address.

[0149] Preferably, the blockchain-based file storage device further includes:

[0150] A modification module is used to receive a request to change the ownership of the NFT; modify the user permission list based on the change request; and generate a corresponding file watermark based on the change request.

[0151] Preferably, the blockchain-based file storage device further includes:

[0152] Establish a module for building a data hosting platform based on a private distributed storage network.

[0153] Preferably, the blockchain-based file storage device further includes:

[0154] A data verification module is used to generate a corresponding hash value based on the stored file; write the hash value into the NFT and the stored file respectively, so as to verify the integrity of the stored file based on the hash value when responding to a file request.

[0155] Preferably, the blockchain-based file storage device further includes:

[0156] An accounting module is used to use the consortium chain as the blockchain carrier of the NFT, wherein the consortium chain is used to allow institutions whose credibility reaches a preset threshold to perform accounting.

[0157] In addition, an embodiment of the present invention also proposes a terminal device, which includes: a memory, a processor, and a blockchain-based file storage program stored on the memory and runnable on the processor. When the blockchain-based file storage program is executed by the processor, the steps of the blockchain-based file storage method described above are implemented.

[0158] Among them, the steps implemented when the blockchain-based file storage program running on the processor is executed can refer to the various embodiments of the blockchain-based file storage method of the present invention, and will not be repeated here.

[0159] In addition, an embodiment of the present invention further proposes a storage medium, which is applied to a computer. The storage medium may be a non-volatile computer-readable storage medium, which stores a blockchain-based file storage program. When the blockchain-based file storage program is executed by a processor, the steps of the blockchain-based file storage method described above are implemented.

[0160] Among them, the steps implemented when the blockchain-based file storage program running on the processor is executed can refer to the various embodiments of the blockchain-based file storage method of the present invention, and will not be repeated here.

[0161] In addition, an embodiment of the present invention also proposes a computer program product, which includes a blockchain-based file storage program. When the blockchain-based file storage program is executed by a processor, it implements the steps of the blockchain-based file storage method described above.

[0162] Among them, the steps implemented when the blockchain-based file storage program running on the processor is executed can refer to the various embodiments of the blockchain-based file storage method of the present invention, and will not be repeated here.

[0163] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or system comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or system. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or system comprising the element.

[0164] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.

[0165] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus the necessary general hardware platform, or of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions for enabling a terminal device for implementing blockchain-based file storage to execute the methods described in various embodiments of the present invention.

[0166] The above are only preferred embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention description and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A file storage method based on blockchain, characterized in that: The blockchain-based file storage method includes: Generate a corresponding link address based on the storage file, and write the link address into the NFT to be stored in the blockchain metadata domain; Storing the stored files on a data hosting platform; A user rights list is generated based on the NFT, a connection is established between the user rights list and the ownership of the NFT, and the user rights list is sent to the data hosting platform via the blockchain.

2. The blockchain-based file storage method according to claim 1, wherein: After the steps of generating a user rights list based on the NFT and establishing a connection between the user rights list and the ownership of the NFT, the method further includes: Obtaining a file request based on the link address; Comparing the user identity corresponding to the file request with the user authority list to confirm whether the user identity is consistent with the user authority list; If so, respond to the file request.

3. The blockchain-based file storage method according to claim 2, wherein: After the step of establishing a connection relationship between the user rights list and the ownership of the NFT, the method further includes: generating a plurality of mutually independent file watermarks based on the user authority list; After the step of responding to the file request, the method further includes: Embedding the file watermark into the stored file to obtain a target file; The target file is sent to the initiator of the file request via the link address.

4. The blockchain-based file storage method according to any one of claims 1 to 3, characterized in that: After the step of establishing a connection relationship between the user rights list and the ownership of the NFT, the method further includes: Receiving a request to change ownership of the NFT; Modify the user permission list based on the change request; and / or, A corresponding file watermark is generated based on the change request.

5. The file storage method based on blockchain according to claim 1, characterized in that: The blockchain-based file storage method further includes: Establish a data hosting platform based on a private distributed storage network.

6. The blockchain-based file storage method according to claim 5, wherein: The blockchain-based file storage method further includes: Generate a corresponding hash value according to the storage file; The hash value is written into the NFT and the storage file respectively, so that the integrity of the storage file can be verified based on the hash value when responding to a file request.

7. The blockchain-based file storage method according to claim 1, wherein: After the step of writing the link address into the NFT, it also includes: The alliance chain is used as the blockchain carrier of the NFT, wherein the alliance chain is used to allow institutions whose credibility reaches a preset threshold to keep accounts.

8. A file storage device based on blockchain, characterized in that: The blockchain-based file storage device includes: A first storage module is used to generate a corresponding link address based on the storage file and write the link address into the NFT for storage in the blockchain metadata domain; A second storage module is used to store the storage file in a data hosting platform; A permission generation module is used to generate a user permission list based on the NFT, establish a connection between the user permission list and the ownership of the NFT, and send the user permission list to the data hosting platform through the blockchain.

9. A terminal device, characterized in that: The terminal device includes: a memory, a processor, and a blockchain-based file storage program stored in the memory and executable on the processor. When the blockchain-based file storage program is executed by the processor, the steps of the blockchain-based file storage method according to any one of claims 1 to 7 are implemented.

10. A computer storage medium, characterized in that The computer storage medium stores a computer program, which, when executed by a processor, implements the steps of the blockchain-based file storage method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Distributed data access method and device based on block chain and storage node

    CN112148797A

  • Digital service method, device and apparatus based on distributed storage and storage medium

    CN113094334A