CN113159952B - Method, system, device and storage medium for storing digital assets based on blockchain - Google Patents

Method, system, device and storage medium for storing digital assets based on blockchain Download PDF

Info

Publication number
CN113159952B
CN113159952B CN202110450292.9A CN202110450292A CN113159952B CN 113159952 B CN113159952 B CN 113159952B CN 202110450292 A CN202110450292 A CN 202110450292A CN 113159952 B CN113159952 B CN 113159952B
Authority
CN
China
Prior art keywords
asset
blockchain
hash value
hash
storing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110450292.9A
Other languages
Chinese (zh)
Other versions
CN113159952A (en
Inventor
李雷来
王健宗
瞿晓阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN202110450292.9A priority Critical patent/CN113159952B/en
Publication of CN113159952A publication Critical patent/CN113159952A/en
Application granted granted Critical
Publication of CN113159952B publication Critical patent/CN113159952B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computing Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Technology Law (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method for storing digital assets based on a blockchain, which comprises the following steps: acquiring a plurality of first assets and asset attributes corresponding to each first asset; generating a first hash value corresponding to each first asset according to the asset attribute of each first asset; storing a first transaction entry corresponding to each first asset to the first hash value, the asset attribute and the first asset for transaction in a first blockchain; acquiring the first assets to form at least one second asset group according to a first preset rule, acquiring a first hash value of the first assets in each second asset group, and acquiring a first hash value group so as to generate a second hash value corresponding to each second asset group according to the first hash value group; and storing a second transaction entry of each second asset group for transactions in a second blockchain. The invention can effectively protect the data in the block chain from leakage.

Description

Method, system, device and storage medium for storing digital assets based on blockchain
Technical Field
The embodiment of the invention relates to the technical field of blockchains, in particular to a method, a system, equipment and a storage medium for storing digital assets based on blockchains.
Background
Currently, blockchain technology supports storing multiple transaction entries in a single block of a blockchain. The transaction entries in the block may correspond to different assets. However, each transaction entry is only for a single asset, and difficulties can arise when operating with a group of bundled assets. For example, if multiple assets are bundled for a transaction, M transaction entries are generated, where M is the number of assets in the bundle. Also, because the blockchain requires that the asset group be treated as a single asset, if an adjustment or query is made to the attributes of a single asset in a group of assets, it is difficult to record this change in the blockchain, which knows only the asset group itself and not the single asset contained therein, and the corresponding record or query cannot be made.
Disclosure of Invention
Accordingly, an objective of the embodiments of the present invention is to provide a method, system, device and storage medium for storing digital assets based on blockchain, which are used for solving the storage and tracing problems between individual assets and asset groups.
To achieve the above object, an embodiment of the present invention provides a method for storing digital assets based on blockchain, including:
acquiring a plurality of first assets and asset attributes corresponding to each first asset;
generating a first hash value corresponding to each first asset according to the asset attribute of each first asset;
storing a first transaction entry corresponding to each first asset to the first hash value, the asset attribute and the first asset for transaction in a first blockchain;
combining the first assets according to a first preset rule to form at least one second asset group, and obtaining first hash values of the first assets in each second asset group to obtain a first hash value group, so as to carry out hash calculation on a plurality of first hash values in the first hash value group according to a preset hash algorithm to generate second hash values corresponding to each second asset group;
and storing a second transaction entry of each second asset group for transactions in a second blockchain.
Further, storing the first hash value, the asset attribute, and the first transaction entry for the transaction for each of the first assets in a first blockchain includes:
storing the first hash value corresponding to each first asset in a first block of the first blockchain, wherein the first block of the first blockchain is used for storing the first hash value;
and storing the asset attribute and the first transaction entry corresponding to each first asset in a second block of the first blockchain, wherein the second block of the first blockchain is used for storing the asset attribute and the first transaction entry.
Further, the storing, in a second blockchain, the second hash value for each of the second asset groups and a second transaction entry for the second asset group to transact includes:
storing a second hash value corresponding to each second asset group in a first block of the second blockchain, wherein the first block of the second blockchain is used for storing the second hash value;
and storing the second transaction entries corresponding to each second asset group in a second block of the second blockchain, wherein the second block of the second blockchain is used for storing the second transaction entries.
Further, there are a plurality of the second asset groups, the method further comprising:
combining the second asset group according to a second preset rule to form at least one third asset group;
obtaining a second hash value of a second asset group in each third asset group to obtain a second hash value group, so as to carry out hash calculation on a plurality of second hash values in the second hash value group according to a preset hash algorithm, and generate a third hash value of each third asset group;
and storing a third hash value of each third asset group and a third transaction entry of the third asset group for transaction in a third blockchain.
Further, storing a third transaction entry for each of the third asset groups for transactions in a third blockchain includes:
storing a third hash value corresponding to each third asset group in a first block of the third blockchain, wherein the first block of the third blockchain is used for storing the third hash value;
and storing third transaction entries corresponding to each third asset group in a second block of the third blockchain, wherein the second block of the third blockchain is used for storing the third transaction entries.
Further, the method further comprises:
receiving an attribute query instruction of a target asset, the attribute query instruction comprising a hash value of the target asset, the target asset comprising a plurality of first assets;
decrypting the hash value of the target asset to obtain a decrypted hash value;
and inquiring the first block chain according to the decrypted hash value to obtain the asset attribute of each first asset contained in the target asset.
Further, decrypting the hash value of the target asset, and obtaining the decrypted hash value includes:
performing first decryption on the hash value of the target asset by adopting a preset decryption algorithm to obtain a hash value after the first decryption;
judging whether a hash value matched with the hash value after the first decryption exists in the first block chain or not;
if the matched hash value does not exist, continuing to decrypt the hash value after the first decryption for the second time to obtain the hash value after the second decryption.
To achieve the above object, an embodiment of the present invention further provides a system for storing digital assets based on a blockchain, including:
the acquisition module is used for acquiring a plurality of first assets and asset attributes corresponding to each first asset;
the first generation module is used for generating a first hash value corresponding to each first asset according to the asset attribute of each first asset;
the first storage module is used for storing the first hash value, the asset attribute and a first transaction entry corresponding to each first asset for transaction in a first blockchain;
the second generation module is used for combining the first assets according to a first preset rule to generate at least one second asset group, obtaining first hash values of the first assets in each second asset group to obtain a first hash value group, carrying out hash calculation on a plurality of first hash values in the first hash value group according to a preset hash algorithm, and generating a second hash value corresponding to each second asset group;
and the second storage module is used for storing the second hash value of each second asset group and a second transaction entry for carrying out transaction on the second asset group in a second blockchain.
To achieve the above object, an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored on the memory, where the computer program is executable on the processor to implement the steps of the method for storing digital assets based on blockchain as described above.
To achieve the above object, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored therein, the computer program being executable by at least one processor to cause the at least one processor to perform the steps of a method for storing digital assets based on blockchain as described above.
The method, the system, the equipment and the storage medium for storing the digital assets based on the blockchain provided by the embodiment of the invention carry out hash operation on the asset attributes of each first asset to generate a first hash value, and store the first hash value of the first asset and a first transaction item for recording the transaction of the first asset in the first blockchain; combining the first assets according to a first preset rule to obtain a second asset group, generating a second hash value of the second asset group according to the first hash value of the first asset, and storing the second hash value and a second transaction item for recording the transaction of the second asset group in a second blockchain; the second blockchain contains the hash value of the first asset in the previous first blockchain, so that any unauthorized modification of the attribute data in the blockchain will cause the hash value stored in each blockchain to change, which can be traced back to the individual asset stored in the different blockchain by decrypting the hash value of the second asset group. In addition, the storage mode of the plurality of blockchains can reduce the dependence on a single blockchain, so that the safety of data stored in each blockchain is enhanced, and the risk of leakage of the data stored in each blockchain is effectively reduced.
Drawings
FIG. 1 is a flow chart of a first embodiment of a method of storing digital assets based on blockchain in accordance with the present invention.
FIG. 2 is a flowchart of step S104 in a first embodiment of a method for storing digital assets based on blockchain.
FIG. 3 is a flowchart of step S108 in a first embodiment of a method for storing digital assets based on blockchain.
FIG. 4 is a flowchart of steps S110-S114 in a first embodiment of a method for storing digital assets based on blockchain.
FIG. 5 is a flowchart of a method for storing digital assets based on blockchain in accordance with an embodiment of the present invention, step S114.
FIG. 6 is a flowchart of steps S120-S124 in a first embodiment of a method for storing digital assets based on blockchain.
FIG. 7 is a flowchart of step S122 in a first embodiment of a method for storing digital assets based on blockchain.
FIG. 8 is a block chain based program module diagram illustrating a second embodiment of a system for storing digital assets.
Fig. 9 is a schematic diagram of a hardware structure of a third embodiment of the computer device of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Example 1
Referring to FIG. 1, a flowchart of the steps of a method for blockchain-based storage of digital assets in accordance with an embodiment of the present invention is shown. It will be appreciated that the flow charts in the method embodiments are not intended to limit the order in which the steps are performed. An exemplary description will be made below with the computer device 2 as an execution subject. Specifically, the following is described.
Step S100, a plurality of first assets and asset attributes corresponding to each first asset are obtained.
In particular, the first asset refers to a resource, including various properties, bonds, etc., that is owned or controlled by the business and is expected to bring economic benefits to the business, formed by past transactions or matters of the business. The property of the first asset is the property of the interior of the asset, such as the price of the asset, the transaction time of the asset, etc. The plurality of first assets and the asset attributes corresponding to each first asset are obtained through enterprise records.
Step S102, generating a first hash value corresponding to each first asset according to the asset attribute of each first asset.
Specifically, the property of the asset is calculated through a hash algorithm to obtain a first hash value, and the hash algorithm is not limited to MD5 hash, RIPEMD hash and the like. The first hash value is used to identify a first asset, and the asset attributes of the first asset may be viewed by decrypting the first hash value.
Step S104, storing the first hash value, the asset attribute and the first transaction entry corresponding to each first asset for transaction in a first blockchain.
Specifically, the first transaction entry records data of transactions or transaction changes, such as sales, mortgages, etc., of the first asset. The first asset is transacted, namely a first transaction entry is generated, the first hash value, the asset attribute and the first transaction entry of the first asset are stored in the same first block chain, and the hash value is stored as digital data, so that the first asset can be managed and checked conveniently.
Illustratively, referring to fig. 2, the step S104 includes:
step S104A, storing the first hash value corresponding to each first asset in a first block of the first blockchain, where the first block of the first blockchain is used to store the first hash value. Step S104B, storing the asset attribute and the first transaction entry corresponding to each first asset in a second block of the first blockchain, where the second block of the first blockchain is used to store the asset attribute and the first transaction entry.
Specifically, a first hash value and a first transaction entry of a first asset are stored in a first blockchain, and if the asset attribute is tampered, security verification can be performed through the first hash value. The first hash value is stored in a first block of the first blockchain, and the first transaction entry is stored in a second block of the first blockchain, so that the blocks are mutually isolated in the first blockchain, and the safety and the integrity of attribute data are enhanced.
Step S106, combining the first assets according to a first preset rule to form at least one second asset group, obtaining first hash values of the first assets in each second asset group, obtaining a first hash value group, carrying out hash calculation on a plurality of first hash values in the first hash value group according to a preset hash algorithm, and generating second hash values corresponding to each second asset group.
Specifically, the first preset rule is to set an asset project including a plurality of first assets, and combine the first assets corresponding to the asset project to obtain a second asset group. It is understood that a plurality of first assets are sold in bundles. The second hash value of the second asset group is obtained by performing hash operation on the first hash value of the first asset included in the second asset group, and a hash algorithm adopted by the hash operation on the first hash value of the first hash value group can be consistent with a hash algorithm adopted by the hash operation on the first asset, so that the hash value can be decrypted conveniently. The second blockchain contains the hash value of the first asset in the previous first blockchain, so any unauthorized modification of the attribute data in the blockchain will result in a change in the hash value stored in each blockchain. Thus, unauthorized modification of attribute data can be detected by using hash value verification in the blockchain. In addition, all changes to the attribute data in the blockchain are first approved by the computer consensus network, which can protect the integrity of the blockchain data.
Step S108, storing the second hash value of each of the second asset groups and a second transaction entry of the transaction performed by the second asset group in a second blockchain.
In particular, the second transaction entry is for recording a transaction change for the second asset group. The second hash value and the second transaction entry of the second asset group are stored in a second blockchain, the first blockchain and the second blockchain are isolated from each other, and if one blockchain is destroyed, the other blockchains maintain data integrity. This separation provides enhanced security by reducing reliance on a single blockchain and effectively reduces the risk of data leakage.
Illustratively, referring to fig. 3, the step S108 includes:
step S108A, storing the second hash value corresponding to each of the second asset groups in a first block of the second blockchain, where the first block of the second blockchain is used to store the second hash value. Step S108B, storing the second transaction entry corresponding to each of the second asset groups in a second block of the second blockchain, where the second block of the second blockchain is used to store the second transaction entry.
Specifically, the second hash value and the second transaction entry of the second asset group are stored in the second blockchain, and if the asset attribute is tampered, the second hash value and the first hash value can be decrypted for security verification. The second hash value is stored in a first block of the second blockchain, and the second transaction entry is stored in a second block of the second blockchain, so that the blocks are mutually isolated in the second blockchain, and the safety and the integrity of attribute data are enhanced.
Illustratively, there are a plurality of the second asset groups, referring to fig. 4, the method further includes steps S110 to S114:
step S110, combining the second asset group according to a second preset rule to form and generate at least one third asset group.
Specifically, the second preset rule is to aggregate two or more second asset groups to obtain a third asset group, and any two second asset groups can be combined or combined according to the asset projects.
Step S112, obtaining second hash values of the second asset groups in each third asset group to obtain a second hash value group, so as to perform hash calculation on a plurality of second hash values in the second hash value group according to a preset hash algorithm, and generate third hash values of each third asset group.
Specifically, a second hash value of the second asset group is obtained, the second hash value group at least comprises two second hash values, the second hash values are subjected to hash operation according to a hash algorithm to generate a third hash value, and the hash algorithm for generating the first hash value, the second hash value and the third hash value can be set to be the same, so that decryption processing is conveniently carried out on the first hash value, the second hash value and the third hash value.
Step S114, storing a third hash value of each of the third asset groups and a third transaction entry of the transaction performed by the third asset groups in a third blockchain.
In particular, the third transaction entry is for recording a transaction change for the third asset group. And storing a third hash value and a third transaction entry of a third asset group in a third blockchain, wherein the first blockchain, the second blockchain and the third blockchain are isolated from each other, and if one blockchain is destroyed, the other blockchains can maintain data integrity. This separation provides enhanced security by reducing reliance on a single blockchain and effectively reduces the risk of data leakage.
Illustratively, referring to fig. 5, the step S114 includes:
step S114A, storing a third hash value corresponding to each of the third asset groups in a first block of the third blockchain, where the first block of the third blockchain is used to store the third hash value. Step S114B stores a third transaction entry corresponding to each of the third asset groups in a second block of the third blockchain, where the second block of the third blockchain is used to store the third transaction entry.
Specifically, the third hash value and the third transaction entry of the third asset group are stored in the third blockchain, and if the asset attribute is tampered, the third hash value, the second hash value and the first hash value can be sequentially decrypted for security verification. The third hash value is stored in a first block of a third blockchain, and the third transaction entry is stored in a second block of the third blockchain, so that the blocks are mutually isolated in the third blockchain, and the safety and the integrity of attribute data are enhanced.
Illustratively, referring to FIG. 6, the method further includes steps S120-S124:
step S120, receiving an attribute query instruction of a target asset, where the attribute query instruction includes a hash value of the target asset, and the target asset includes a plurality of first assets. Step S122, decrypting the hash value of the target asset, to obtain a decrypted hash value. And step S124, inquiring the first blockchain according to the decrypted hash value to obtain the asset attribute of each first asset contained in the target asset.
Specifically, when whether the target asset is tampered or not needs to be inquired, decrypting according to the obtained hash value of the target asset, and inquiring the asset attribute of each first asset contained in the target asset according to the decrypted hash value. Performing hash calculation on the inquired asset attributes to obtain inquiry hash values, comparing the inquiry hash values with decrypted hash values, and if the inquiry hash values are inconsistent with the decrypted hash values, indicating that the asset attributes are tampered; if the query hash value is consistent with the decrypted hash value, the property attribute of the asset is not tampered.
Illustratively, referring to fig. 7, the step S122 includes:
step S122A, performing a first decryption on the hash value of the target asset by using a preset decryption algorithm, to obtain a hash value after the first decryption. Step S122B, determining whether a hash value matching the hash value after the first decryption exists in the first blockchain. Step S122C, if the matched hash value does not exist, continuing to decrypt the hash value after the first decryption for the second time to obtain the hash value after the second decryption.
Specifically, the preset decryption algorithm corresponds to the encrypted hash algorithm, so that the first asset is conveniently subjected to hash encryption and decryption processing. Multiple decryption processes may be performed depending on the level of the asset group. When the hash value of the target asset is the second hash value of the second asset group, the hash value in the first block chain can be queried through the decrypted hash value only by performing decryption once. When the hash value of the target asset is the third hash value of the third asset group, the hash value of the target asset is decrypted for the first time, the hash value of the second asset group is obtained, at the moment, whether the hash value matched with the hash value after the first decryption exists in the first block chain is judged to be absent, the hash value after the first decryption needs to be decrypted for the second time, the hash value after the second decryption is obtained, and the hash value in the first block chain can be queried through the hash value after the second decryption.
Illustratively, the multi-layered blockchain allows individual assets, groups of assets to be securely tracked while providing functionality to trace the groups back to individual assets and their associated attributes in the group. The asset groups stored in the different blockchains may be traced back by decrypting the hash values of the groups of asset groups and the individual assets stored in the different blockchains may be traced back by decrypting the hash values of the groups of asset groups. The mechanism of using multiple blockchains and multi-layer hashes ensures that the attribute data in the asset is not tampered with.
Example two
With continued reference to FIG. 8, a program module diagram of a second embodiment of the system for blockchain-based storage of digital assets of the present invention is shown. In this embodiment, the blockchain-based storage system 20 may include or be partitioned into one or more program modules that are stored in a storage medium and executed by one or more processors to perform the present invention and to implement the blockchain-based storage method described above. Program modules depicted in the embodiments of the present invention are directed to a series of computer program instruction segments capable of performing particular functions, and are more suitable than programs themselves for describing the execution of the system 20 for storing digital assets based on blockchain in a storage medium. The following description will specifically describe functions of each program module of the present embodiment:
the acquiring module 200 is configured to acquire a plurality of first assets and asset attributes corresponding to each first asset.
In particular, the first asset refers to a resource, including various properties, bonds, etc., that is owned or controlled by the business and is expected to bring economic benefits to the business, formed by past transactions or matters of the business. The property of the first asset is the property of the interior of the asset, such as the price of the asset, the transaction time of the asset, etc. The plurality of first assets and the asset attributes corresponding to each first asset are obtained through enterprise records.
A first generation module 202, configured to generate a first hash value corresponding to each first asset according to an asset attribute of each first asset.
Specifically, the property of the asset is calculated through a hash algorithm to obtain a first hash value, and the hash algorithm is not limited to MD5 hash, RIPEMD hash and the like. The first hash value is used to identify a first asset, and the asset attributes of the first asset may be viewed by decrypting the first hash value.
The first storage module 204 is configured to store, in a first blockchain, the first hash value corresponding to each first asset, the asset attribute, and a first transaction entry for performing a transaction on the first asset.
Specifically, the first transaction entry records data of transactions or transaction changes, such as sales, mortgages, etc., of the first asset. The first asset is transacted, namely a first transaction entry is generated, and the first hash value, the asset attribute and the first transaction entry of the first asset are stored in the same first blockchain, so that the management and the viewing of the first asset are facilitated.
Illustratively, the first storage module 204 is further configured to:
storing the first hash value corresponding to each first asset in a first block of the first blockchain, wherein the first block of the first blockchain is used for storing the first hash value. And storing the asset attribute and the first transaction entry corresponding to each first asset in a second block of the first blockchain, wherein the second block of the first blockchain is used for storing the asset attribute and the first transaction entry.
Specifically, a first hash value and a first transaction entry of a first asset are stored in a first blockchain, and if the asset attribute is tampered, security verification can be performed through the first hash value. The first hash value is stored in a first block of the first blockchain, and the first transaction entry is stored in a second block of the first blockchain, so that the blocks are mutually isolated in the first blockchain, and the safety and the integrity of attribute data are enhanced.
The second generating module 206 is configured to combine the first assets according to a first preset rule to form and generate at least one second asset group, obtain a first hash value set of the first assets in each second asset group, and perform hash computation on a plurality of first hash values in the first hash value set according to a preset hash algorithm to generate a second hash value corresponding to each second asset group.
Specifically, the first preset rule is to set an asset project including a plurality of first assets, and combine the first assets corresponding to the asset project to obtain a second asset group. It is understood that a plurality of first assets are sold in bundles. The second hash value of the second asset group is obtained by performing hash operation on the first hash value of the first asset included in the second asset group, and a hash algorithm adopted by the hash operation on the first hash value of the first hash value group can be consistent with a hash algorithm adopted by the hash operation on the first asset, so that the hash value can be decrypted conveniently. The second blockchain contains the hash value of the first asset in the previous first blockchain, so any unauthorized modification of the attribute data in the blockchain will result in a change in the hash value stored in each blockchain. Thus, unauthorized modification of attribute data can be detected by using hash value verification in the blockchain. In addition, all changes to the attribute data in the blockchain are first approved by the computer consensus network, which can protect the integrity of the blockchain data.
A second storage module 208 is configured to store the second hash value of each of the second asset groups and a second transaction entry for performing transactions for the second asset groups in a second blockchain.
In particular, the second transaction entry is for recording a transaction change for the second asset group. The second hash value and the second transaction entry of the second asset group are stored in a second blockchain, the first blockchain and the second blockchain are isolated from each other, and if one blockchain is destroyed, the other blockchains maintain data integrity. This separation provides enhanced security by reducing reliance on a single blockchain and effectively reduces the risk of data leakage.
Illustratively, the second storage module 208 is further configured to:
and storing a second hash value corresponding to each second asset group in a first block of the second blockchain, wherein the first block of the second blockchain is used for storing the second hash value. And storing the second transaction entries corresponding to each second asset group in a second block of the second blockchain, wherein the second block of the second blockchain is used for storing the second transaction entries.
Specifically, the second hash value and the second transaction entry of the second asset group are stored in the second blockchain, and if the asset attribute is tampered, the second hash value and the first hash value can be decrypted for security verification. The second hash value is stored in a first block of the second blockchain, and the second transaction entry is stored in a second block of the second blockchain, so that the blocks are mutually isolated in the second blockchain, and the safety and the integrity of attribute data are enhanced.
Example III
Referring to fig. 9, a hardware architecture diagram of a computer device according to a third embodiment of the invention is shown. In this embodiment, the computer device 2 is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction. The computer device 2 may be a rack server, a blade server, a tower server, or a rack server (including a stand-alone server, or a server cluster made up of multiple servers), or the like. As shown in fig. 9, the computer device 2 includes, but is not limited to, at least a memory 21, a processor 22, a network interface 23, and a system 20 for storing digital assets based on a blockchain, which are communicatively coupled to each other via a system bus. Wherein:
in this embodiment, the memory 21 includes at least one type of computer-readable storage medium including flash memory, a hard disk, a multimedia card, a card memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the memory 21 may be an internal storage unit of the computer device 2, such as a hard disk or a memory of the computer device 2. In other embodiments, the memory 21 may also be an external storage device of the computer device 2, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the computer device 2. Of course, the memory 21 may also include both internal storage units of the computer device 2 and external storage devices. In this embodiment, the memory 21 is typically used to store an operating system and various types of application software installed on the computer device 2, such as program code for the blockchain-based digital asset storage system 20 of embodiment two. Further, the memory 21 may be used to temporarily store various types of data that have been output or are to be output.
The processor 22 may be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments. The processor 22 is typically used to control the overall operation of the computer device 2. In this embodiment, the processor 22 is configured to execute the program code stored in the memory 21 or process data, such as running the system 20 for storing digital assets based on a blockchain to implement the method for storing digital assets based on a blockchain of embodiment one.
The network interface 23 may comprise a wireless network interface or a wired network interface, which network interface 23 is typically used for establishing a communication connection between the server 2 and other electronic devices. For example, the network interface 23 is used to connect the server 2 to an external terminal through a network, establish a data transmission channel and a communication connection between the server 2 and the external terminal, and the like. The network may be an Intranet (Intranet), the Internet (Internet), a global system for mobile communications (Global System of Mobile communication, GSM), wideband code division multiple access (Wideband Code Division Multiple Access, WCDMA), a 4G network, a 5G network, bluetooth (Bluetooth), wi-Fi, or other wireless or wired network. It is noted that fig. 9 only shows a computer device 2 having components 20-23, but it is understood that not all of the illustrated components are required to be implemented, and that more or fewer components may alternatively be implemented. In this embodiment, the blockchain-based storage digital asset system 20 stored in the memory 21 may also be partitioned into one or more program modules that are stored in the memory 21 and executed by one or more processors (processor 22 in this embodiment) to complete the present invention.
For example, FIG. 8 illustrates a program module schematic diagram of a second embodiment of the system 20 for implementing blockchain-based storage of digital assets, in which the system 20 for blockchain-based storage of digital assets may be divided into the acquisition module 200, the first generation module 202, the first storage module 204, the second generation module 206, and the second storage module 208. Program modules depicted herein, being indicative of a sequence of computer program instruction segments capable of performing the specified functions, are preferably adapted to describe the execution of the blockchain-based storage digital asset system 20 in the computer device 2. The specific functions of the program modules 200-208 are described in detail in the second embodiment, and are not described herein.
Example IV
The present embodiment also provides a computer-readable storage medium such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, an App application store, etc., on which a computer program is stored, which when executed by a processor, performs the corresponding functions. The computer readable storage medium of the present embodiment is used for a computer program which when executed by a processor implements the method of the first embodiment for storing digital assets based on blockchain.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (10)

1. A method of storing digital assets based on blockchain, comprising:
acquiring a plurality of first assets and asset attributes corresponding to each first asset;
generating a first hash value corresponding to each first asset according to the asset attribute of each first asset;
storing a first transaction entry corresponding to each first asset to the first hash value, the asset attribute and the first asset for transaction in a first blockchain;
combining the first assets according to a first preset rule to generate at least one second asset group, obtaining first hash values of the first assets in each second asset group to obtain first hash value groups, carrying out hash calculation on a plurality of first hash values in the first hash value groups according to a preset hash algorithm to generate second hash values corresponding to each second asset group, wherein the first preset rule is that asset items comprising the plurality of first assets are set, and the hash algorithm adopted by the hash operation of the first hash values of the first hash value groups is consistent with the hash algorithm adopted by the hash calculation of the first assets;
and storing a second transaction entry of each second asset group for transactions in a second blockchain.
2. The method of blockchain-based storage of digital assets of claim 1, wherein the storing in a first blockchain the first transaction entry for each of the first hash value, the asset attribute, and the first asset for the transaction comprises:
storing the first hash value corresponding to each first asset in a first block of the first blockchain, wherein the first block of the first blockchain is used for storing the first hash value;
and storing the asset attribute and the first transaction entry corresponding to each first asset in a second block of the first blockchain, wherein the second block of the first blockchain is used for storing the asset attribute and the first transaction entry.
3. The blockchain-based storage method of claim 1 or 2, wherein the storing the second hash value for each of the second asset groups and a second transaction entry for the second asset group to transact in a second blockchain comprises:
storing a second hash value corresponding to each second asset group in a first block of the second blockchain, wherein the first block of the second blockchain is used for storing the second hash value;
and storing the second transaction entries corresponding to each second asset group in a second block of the second blockchain, wherein the second block of the second blockchain is used for storing the second transaction entries.
4. The blockchain-based storage digital asset method of claim 1, wherein the second asset group is present in a plurality, the method further comprising:
combining the second asset group according to a second preset rule to generate at least one third asset group;
obtaining a second hash value of a second asset group in each third asset group to obtain a second hash value group, so as to carry out hash calculation on a plurality of second hash values in the second hash value group according to a preset hash algorithm, and generate a third hash value of each third asset group;
and storing a third hash value of each third asset group and a third transaction entry of the third asset group for transaction in a third blockchain.
5. The method of blockchain-based storage of digital assets of claim 4, wherein storing in a third blockchain third hash values for each of the third asset groups and third transaction entries for transactions by the third asset groups comprises:
storing a third hash value corresponding to each third asset group in a first block of the third blockchain, wherein the first block of the third blockchain is used for storing the third hash value;
and storing third transaction entries corresponding to each third asset group in a second block of the third blockchain, wherein the second block of the third blockchain is used for storing the third transaction entries.
6. The blockchain-based storage digital asset method of claim 1, further comprising:
receiving an attribute query instruction of a target asset, the attribute query instruction comprising a hash value of the target asset, the target asset comprising a plurality of first assets;
decrypting the hash value of the target asset to obtain a decrypted hash value;
and inquiring the first block chain according to the decrypted hash value to obtain the asset attribute of each first asset contained in the target asset.
7. The method of blockchain-based storage of digital assets of claim 6, wherein decrypting the hash value of the target asset to obtain a decrypted hash value includes:
performing first decryption on the hash value of the target asset by adopting a preset decryption algorithm to obtain a hash value after the first decryption;
judging whether a hash value matched with the hash value after the first decryption exists in the first block chain or not;
if the matched hash value does not exist, continuing to decrypt the hash value after the first decryption for the second time to obtain the hash value after the second decryption.
8. A system for storing digital assets based on blockchain, comprising:
the acquisition module is used for acquiring a plurality of first assets and asset attributes corresponding to each first asset;
the first generation module is used for generating a first hash value corresponding to each first asset according to the asset attribute of each first asset;
the first storage module is used for storing the first hash value, the asset attribute and a first transaction entry corresponding to each first asset for transaction in a first blockchain;
the second generation module is used for combining the first assets according to a first preset rule to form at least one second asset group, obtaining first hash values of the first assets in each second asset group to obtain a first hash value group, carrying out hash calculation on a plurality of first hash values in the first hash value group according to a preset hash algorithm to generate second hash values corresponding to each second asset group, wherein the first preset rule is that asset items comprising the plurality of first assets are set, and the hash algorithm adopted by the hash operation of the first hash values of the first hash value group is consistent with the hash algorithm adopted by the hash calculation of the first assets;
and the second storage module is used for storing the second hash value of each second asset group and a second transaction entry for carrying out transaction on the second asset group in a second blockchain.
9. A computer device comprising a memory, a processor, the memory having stored thereon a computer program executable on the processor, the computer program implementing the steps of the blockchain-based method of storing digital assets as in any of claims 1-7 when executed by the processor.
10. A computer-readable storage medium having stored therein a computer program executable by at least one processor to cause the at least one processor to perform the steps of the blockchain-based method of storing digital assets as recited in any of claims 1-7.
CN202110450292.9A 2021-04-25 2021-04-25 Method, system, device and storage medium for storing digital assets based on blockchain Active CN113159952B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110450292.9A CN113159952B (en) 2021-04-25 2021-04-25 Method, system, device and storage medium for storing digital assets based on blockchain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110450292.9A CN113159952B (en) 2021-04-25 2021-04-25 Method, system, device and storage medium for storing digital assets based on blockchain

Publications (2)

Publication Number Publication Date
CN113159952A CN113159952A (en) 2021-07-23
CN113159952B true CN113159952B (en) 2024-03-29

Family

ID=76870565

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110450292.9A Active CN113159952B (en) 2021-04-25 2021-04-25 Method, system, device and storage medium for storing digital assets based on blockchain

Country Status (1)

Country Link
CN (1) CN113159952B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114298699B (en) * 2021-12-28 2024-05-07 北京有竹居网络技术有限公司 Method for generating and acquiring non-homogeneous general evidence and device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112541775A (en) * 2020-12-16 2021-03-23 宁波金狮科技有限公司 Transaction tracing method based on block chain, electronic device and computer storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11121860B2 (en) * 2018-12-27 2021-09-14 Lendingclub Corporation Multi-layered blockchain for digital assets

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112541775A (en) * 2020-12-16 2021-03-23 宁波金狮科技有限公司 Transaction tracing method based on block chain, electronic device and computer storage medium

Also Published As

Publication number Publication date
CN113159952A (en) 2021-07-23

Similar Documents

Publication Publication Date Title
CN107948152B (en) Information storage method, information acquisition method, information storage device, information acquisition device and information acquisition equipment
CN110457945B (en) List query method, query party device, service party device and storage medium
CN117278224A (en) Method and system for verifying identity attribute information
US8131999B2 (en) Distance-preserving anonymization of data
CN110555779A (en) data processing method, data processing device, computer equipment and storage medium
CN111292041A (en) Electronic contract generating method, device, equipment and storage medium
US10778643B2 (en) Data processing method, apparatus, system, and storage medium
EP3804218B1 (en) Blockchain based access control using time-dependent obfuscation of access tokens
CN111865691B (en) Alarm file distribution method, device, equipment and medium based on artificial intelligence
CN113420049B (en) Data circulation method, device, electronic equipment and storage medium
CN110635898A (en) Encryption method and encryption system
CN111984725A (en) Validation of measurement data sets in a distributed database
CN111984724A (en) Operating strategy and distributed database for industrial field devices
CN113821810A (en) Data processing method and system, storage medium and electronic device
CN113159952B (en) Method, system, device and storage medium for storing digital assets based on blockchain
CN113886883A (en) Internet of things data management method and device
CN114386058A (en) Model file encryption and decryption method and device
US20200372008A1 (en) Method for Determining Information Integrity and Computer System Using the Same
CN112685077A (en) Data modification method, system, computer device and computer readable storage medium
CN116455677A (en) Power regulation and control data leakage tracking method and device, electronic equipment and storage medium
CN111277601B (en) Website security monitoring method and system
CN105631310A (en) Efficient trusted process authentication scheme
CN114745173A (en) Login verification method, login verification device, computer equipment, storage medium and program product
CN117349867B (en) Intelligent contract deployment method, system, equipment and medium
CN115758475A (en) Resource data aggregation method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant