CN116662453A - Blockchain-based digital asset storage method - Google Patents
Blockchain-based digital asset storage method Download PDFInfo
- Publication number
- CN116662453A CN116662453A CN202310959421.6A CN202310959421A CN116662453A CN 116662453 A CN116662453 A CN 116662453A CN 202310959421 A CN202310959421 A CN 202310959421A CN 116662453 A CN116662453 A CN 116662453A
- Authority
- CN
- China
- Prior art keywords
- data
- storage
- blockchain
- nodes
- difference
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 31
- 238000000605 extraction Methods 0.000 claims description 2
- 238000004806 packaging method and process Methods 0.000 claims 1
- 238000004590 computer program Methods 0.000 description 8
- 238000005516 engineering process Methods 0.000 description 8
- 238000010586 diagram Methods 0.000 description 3
- 238000007726 management method Methods 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0608—Saving storage space on storage systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0638—Organizing or formatting or addressing of data
- G06F3/064—Management of blocks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/067—Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Databases & Information Systems (AREA)
- Computing Systems (AREA)
- Data Mining & Analysis (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
技术领域technical field
本发明涉及计算机技术领域,特别是涉及基于区块链的数字资产存储方法。The invention relates to the field of computer technology, in particular to a blockchain-based digital asset storage method.
背景技术Background technique
区块链是一种去中心化的分布存储技术,利用网络共识算法实现信息的互认,利用分布式存储的方式解决数据集中带来的数据安全问题,可以解决现在中心化存储技术中的许多问题。Blockchain is a decentralized distributed storage technology. It uses network consensus algorithms to realize mutual recognition of information, and uses distributed storage to solve data security problems caused by data concentration. It can solve many of the current centralized storage technologies. question.
按形态的不同,资产可以划分为有形资产和无形资产,其中无形资产包括专利、特许经营权、商誉、商标、商号以及软件等多种类型,无形资产大多以数据信息的方式进行存储。为确保数字资产的安全,利用区块链技术对数字资产进行存储是当下的一个最优选项。According to different forms, assets can be divided into tangible assets and intangible assets. Intangible assets include patents, franchises, goodwill, trademarks, trade names, and software. Most intangible assets are stored in the form of data information. In order to ensure the security of digital assets, using blockchain technology to store digital assets is an optimal option at present.
但是,利用区块链技术对数字资产进行存储时,由于数字资产数据变动较为频繁,要上链的数据多且繁杂,对区块链网络的存储资源消耗很大。如何使用区块链技术存储数字资产同时减少对区块链网络的存储占用是需要解决的问题。However, when using blockchain technology to store digital assets, due to frequent changes in digital asset data, there are many and complicated data to be uploaded to the chain, which consumes a lot of storage resources on the blockchain network. How to use blockchain technology to store digital assets while reducing the storage occupation of the blockchain network is a problem that needs to be solved.
发明内容Contents of the invention
基于此,有必要针对上述的问题,提供一种基于区块链的数字资产存储方法。Based on this, it is necessary to provide a blockchain-based digital asset storage method for the above-mentioned problems.
本发明是这样实现的,基于区块链的数字资产存储方法,所述基于区块链的数字资产存储方法包括:The present invention is achieved in this way, a method for storing digital assets based on blockchain, the method for storing digital assets based on blockchain includes:
接收到上链数据,获取区块链网络上存储的与所述上链数据对应的最新数据块;Receive the uplink data, and obtain the latest data block corresponding to the uplink data stored on the blockchain network;
根据所述上链数据以及所述最新数据块确定差异数据;Determine difference data according to the uplink data and the latest data block;
计算所述差异数据的数据量,根据计算得到的数据量确定所需的节点数量n;Calculate the data volume of the difference data, and determine the required number of nodes n according to the calculated data volume;
获取上链数据的历史数据,根据所述历史数据确定历史存储节点;Obtain the historical data of the uplink data, and determine the historical storage node according to the historical data;
根据所述历史存储节点从区块链网络中选定n个存储节点;Selecting n storage nodes from the blockchain network according to the historical storage nodes;
将差异数据上传到选定的n个存储节点。Upload the difference data to the selected n storage nodes.
本发明相对于现有技术具有以下有益效果:通过确定差异数据,仅将差异数据进行更新存储,减少了区块占用;同时通过选取存储节点并分配存储量,进一步减少对整个区块网络的占用,优化了数字资产的存储。与一般区块链技术的全网存储方式不同,本发明在利用区块链网络的同时,每次对数据的存储更新在不同的存储节点组合上进行,实现了存储区块的分布,同时减少了节点需要的存储空间,优化的区块链网络的存储占用。Compared with the prior art, the present invention has the following beneficial effects: by determining the difference data, only the difference data is updated and stored, which reduces the block occupation; at the same time, by selecting storage nodes and allocating storage capacity, the occupation of the entire block network is further reduced , optimizing the storage of digital assets. Different from the whole network storage method of the general block chain technology, the present invention uses the block chain network at the same time, each time the storage update of the data is carried out on different storage node combinations, realizing the distribution of storage blocks, and at the same time reducing The storage space required by the node is reduced, and the storage occupancy of the optimized blockchain network is reduced.
附图说明Description of drawings
图1为一个实施例中提供的基于区块链的数字资产存储方法的流程图;Fig. 1 is a flowchart of a blockchain-based digital asset storage method provided in an embodiment;
图2为一个实施例中计算机设备的内部结构框图。Fig. 2 is a block diagram of the internal structure of a computer device in one embodiment.
具体实施方式Detailed ways
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.
可以理解,本发明所使用的术语“第一”、“第二”等可在本文中用于描述各种元件,但除非特别说明,这些元件不受这些术语限制。这些术语仅用于将第一个元件与另一个元件区分。举例来说,在不脱离本发明的范围的情况下,可以将第一xx脚本称为第二xx脚本,且类似地,可将第二xx脚本称为第一xx脚本。It can be understood that the terms "first", "second" and the like used in the present invention may be used to describe various elements herein, but unless otherwise specified, these elements are not limited by these terms. These terms are only used to distinguish one element from another element. For example, a first xx script could be termed a second xx script, and, similarly, a second xx script could be termed a first xx script, without departing from the scope of the present invention.
如图1所示,在一个实施例中,提出了一种基于区块链的数字资产存储方法,所述基于区块链的数字资产存储方法包括:As shown in Figure 1, in one embodiment, a blockchain-based digital asset storage method is proposed, and the blockchain-based digital asset storage method includes:
接收到上链数据,获取区块链网络上存储的与所述上链数据对应的最新数据块;Receive the uplink data, and obtain the latest data block corresponding to the uplink data stored on the blockchain network;
根据所述上链数据以及所述最新数据块确定差异数据;Determine difference data according to the uplink data and the latest data block;
计算所述差异数据的数据量,根据计算得到的数据量确定所需的节点数量n;Calculate the data volume of the difference data, and determine the required number of nodes n according to the calculated data volume;
获取上链数据的历史数据,根据所述历史数据确定历史存储节点;Obtain the historical data of the uplink data, and determine the historical storage node according to the historical data;
根据所述历史存储节点从区块链网络中选定n个存储节点;Selecting n storage nodes from the blockchain network according to the historical storage nodes;
将差异数据上传到选定的n个存储节点。Upload the difference data to the selected n storage nodes.
在本实施例中,对于数字资产,上链数据主要包括数字资产的名称、编号、状态、归属等信息,均是以数据化的形式存在。通常这些数据打包生成一个数据包,本地的上传节点接收到需要上链的数据包后,通过执行本发明提供的存储方法,优化数字资产的上链存储过程。In this embodiment, for digital assets, the on-chain data mainly includes information such as the name, number, status, and attribution of the digital assets, all of which exist in the form of digitization. Usually, these data are packaged to generate a data packet. After receiving the data packet that needs to be uploaded to the chain, the local upload node optimizes the chain storage process of digital assets by executing the storage method provided by the present invention.
在本实施例中,可以理解,区块链网络上存储的与上链数据对应的最新数据块是指,区块链网络上与要上链的数据同属于一份数据资产的数据块,在区块链网络中,数据以数据块的形式存储,这里的数据块本质上是数据包,仅因其在区域链网络上使用故称之为数据块。In this embodiment, it can be understood that the latest data block corresponding to the on-chain data stored on the blockchain network refers to a data block on the blockchain network that belongs to the same data asset as the data to be on-chain. In the blockchain network, data is stored in the form of data blocks. The data blocks here are essentially data packets, which are called data blocks only because they are used on the blockchain network.
在本实施例中,根据上链数据以及最新数据块确定差异数据,将确定的差异数据上传。这种方式减少了需要上传的数据的量,减少上传的数据对区块链网络的存储资源的占用。In this embodiment, the difference data is determined according to the uplink data and the latest data block, and the determined difference data is uploaded. This method reduces the amount of data that needs to be uploaded, and reduces the occupation of the storage resources of the blockchain network by the uploaded data.
在本实施例中,确定要上传的数据量后,根据数据量确定需要的节点数量,并从历史存储节点以及未使用过的节点中选择部分的存储节点存储差异数据。本发明利用区块链网络的基本原理,实现了在区块链网络上再进行局部区块存储方式,减少了同一份数据对区块链网络资源的占用。In this embodiment, after the amount of data to be uploaded is determined, the required number of nodes is determined according to the amount of data, and some storage nodes are selected from historical storage nodes and unused nodes to store difference data. The present invention utilizes the basic principle of the block chain network to realize the local block storage mode on the block chain network, which reduces the occupation of block chain network resources by the same piece of data.
本发明相对于现有技术具有以下有益效果:通过确定差异数据,仅将差异数据进行更新存储,减少了区块占用;同时通过选取存储节点并分配存储量,进一步减少对整个区块网络的占用,优化了数字资产的存储。与一般区块链技术的全网存储方式不同,本发明在利用区块链网络的同时,每次对数据的存储更新在不同的存储节点组合上进行,实现了存储区块的分布,同时减少了节点需要的存储空间,优化的区块链网络的存储占用。Compared with the prior art, the present invention has the following beneficial effects: by determining the difference data, only the difference data is updated and stored, which reduces the block occupation; at the same time, by selecting storage nodes and allocating storage capacity, the occupation of the entire block network is further reduced , optimizing the storage of digital assets. Different from the whole network storage method of the general block chain technology, the present invention uses the block chain network at the same time, each time the storage update of the data is carried out on different storage node combinations, realizing the distribution of storage blocks, and at the same time reducing The storage space required by the node is reduced, and the storage occupancy of the optimized blockchain network is reduced.
作为本发明的一个可选方案,所述根据所述上链数据以及所述最新数据块确定差异数据,包括:As an optional solution of the present invention, the determining difference data according to the uplink data and the latest data block includes:
根据上链数据对应的数字资产类型,调用相应的划分模板;According to the digital asset type corresponding to the uplink data, call the corresponding division template;
根据调用的模板分别将上链数据以及最新数据块进行内容划分;According to the called template, the contents of the uplink data and the latest data block are divided;
比较上链数据与最新数据内容划分的结果,确定差异项目以及各个差异项目的差异内容;Compare the results of the on-chain data and the latest data content division, and determine the difference items and the difference content of each difference item;
提取差异项目以及差异项目中的差异内容,将提取结果打包生成差异数据。Extract difference items and difference content in difference items, and pack the extraction results to generate difference data.
在本实施例中,对于每个数字资产类型,都预设了对应的划分模板,划分模板由若干个项目以及项目内容构成,具体的项目类型与数字资产的类型对应,例如对于专利类资产,项目可以包括专利名称、专利号、公开号等著录项。In this embodiment, for each type of digital asset, a corresponding division template is preset. The division template consists of several items and item content. The specific item type corresponds to the type of digital asset. For example, for patent assets, Items can include bibliographic items such as patent name, patent number, publication number, etc.
在本实施例中,根据调用的模板,将上链数据以及最新数据块分别填入划分模块内,得到两份填写有内容的模板,再将两份填写有内容的模板进行对比,找到差异的项目并确定差异项目的内容,忽略相同内容,减少需要存储的数据量。In this embodiment, according to the called template, the uplink data and the latest data block are respectively filled into the division module to obtain two templates filled with content, and then the two templates filled with content are compared to find the difference Items and determine the content of difference items, ignore the same content, and reduce the amount of data that needs to be stored.
作为本发明的一个可选方案,所述根据计算得到的数据量确定所需的节点数量n,包括:As an optional solution of the present invention, the determination of the required number of nodes n according to the calculated amount of data includes:
确定每个数据块的最小容量以及最大容量;Determine the minimum and maximum capacity of each data block;
根据确定出的最小容量以及最大容量选定一个中间值;Select an intermediate value based on the determined minimum capacity and maximum capacity;
由计算得到的差异数据的数据量与所述中间值的比值得到所需的节点数量n。The required number of nodes n is obtained from the ratio of the calculated data amount of the difference data to the intermediate value.
在本实施例中,每个数据块的最小容量以及最大容量属于区块链网络的基本参数,用于使数据块的存储标准化,此可以直接从区块链网络的管理节点或者本地的上传节点获取,本发明对此不作赘述。In this embodiment, the minimum capacity and maximum capacity of each data block belong to the basic parameters of the blockchain network, which are used to standardize the storage of data blocks, which can be directly obtained from the management node of the blockchain network or the local upload node acquisition, which is not described in detail in the present invention.
作为本发明的一个可选方案,所述获取上链数据的历史数据,根据所述历史数据确定历史存储节点,包括:As an optional solution of the present invention, the acquiring historical data of the uplink data, and determining the historical storage node according to the historical data include:
从所述上链数据中提取资产标识;Extract the asset identifier from the on-chain data;
根据所述资产标识从存储节点的目录项上查询上链记录;Query the on-chain record from the directory item of the storage node according to the asset identifier;
由所述上链记录确定存储有上链数据对应的数字资产的历史存储节点。The historical storage nodes storing the digital assets corresponding to the uplink data are determined from the uplink records.
在本实施例中,资产标识可以是资产名称、代号等可以唯一定位数字资产的信息。上链信息记录在管理节点中,本地节点(需要上传数据的节点)可以通过访问管理节点查询相应资产的上链记录,以及数据存储于哪些节点上等基本信息。In this embodiment, the asset identifier may be information such as asset name and code name that can uniquely locate the digital asset. The uplink information is recorded in the management node. Local nodes (nodes that need to upload data) can query the uplink record of the corresponding asset and the basic information on which nodes the data is stored by visiting the management node.
作为本发明的一个可选方案,所述根据所述历史存储节点从区块链网络中选定n个存储节点,包括:As an optional solution of the present invention, the selection of n storage nodes from the blockchain network according to the historical storage nodes includes:
根据设定的比例a从区块链网络中选取n1个历史存储节点;Select n1 historical storage nodes from the blockchain network according to the set ratio a;
根据设定的比例b从区域链网络中选取n2个未存储有与所述上链数据对应的资产数据的存储节点;According to the set ratio b, select n2 storage nodes from the area chain network that do not store the asset data corresponding to the on-chain data;
其中,a+b=1,n1+n2=n,且,/>为第i个历史存储节点所需要的存储量,/>为第j个未存储有与所述上链数据对应的资产数据的存储节点所需要的存储量,/>为差异数据的数据量。where a+b=1, n1+n2=n, and , /> The amount of storage required for the i-th historical storage node, /> is the storage capacity required by the jth storage node that does not store the asset data corresponding to the uplink data, /> is the amount of difference data.
在本实施例中,a、b是设定常数,通常a、b可以取0.4-0.6之间。可以理解,n1=n*a;n2=n*b。In this embodiment, a and b are set constants, usually a and b can be between 0.4-0.6. It can be understood that n1=n*a; n2=n*b.
作为本发明的一个可选方案,由设定的存储节点总量n及设定的比例a的乘积得到需要的历史存储节点的数量n1;As an optional solution of the present invention, the required number n1 of historical storage nodes is obtained by multiplying the total amount of storage nodes n and the set ratio a;
获取所有历史存储节点已存储的与所述上链数据对应的资产数据的数据量,根据获取的已存储的数据量从所有历史存储节点中选取n1个历史存储节点;Obtain the data volume of asset data corresponding to the uplink data stored by all historical storage nodes, and select n1 historical storage nodes from all historical storage nodes according to the acquired stored data volume;
为选取的历史存储节点分配存储比例。Allocate the storage ratio for the selected historical storage node.
在本实施例中,并非将数据全部存储于所有历史节点,而是从部分历史存储节点中选取部分历史存储节点进行数据的存储,从而实现在区块链网络内部的分布存储,不会让某个节点存储全部数据,而是利用整个网络进行分散存储,对于每个分散存储的部分,使用多个节点进行存储,利用了区块链网络的基本原理,又在此基础上进行了改进优化。In this embodiment, instead of storing all the data in all historical nodes, some historical storage nodes are selected from some historical storage nodes for data storage, so as to realize distributed storage within the blockchain network, without allowing certain Each node stores all the data, but uses the entire network for decentralized storage. For each part of the decentralized storage, multiple nodes are used for storage. The basic principle of the blockchain network is used, and improvements and optimizations are made on this basis.
作为本发明的一个可选方案,所述根据获取的已存储的数据量从所有历史存储节点中选取n1个历史存储节点,包括:As an optional solution of the present invention, the selection of n1 historical storage nodes from all historical storage nodes according to the acquired stored data volume includes:
根据已存储的数据量由高到低对各历史存储节点进行排序;Sort each historical storage node from high to low according to the amount of stored data;
将排序划分为n1分段,从每一段中随机选取一个历史存储节点得到n1个历史存储节点。The sorting is divided into n1 segments, and a historical storage node is randomly selected from each segment to obtain n1 historical storage nodes.
在本实施例中,划分时每个段内的节点数量尽可能保持一致,从而保证选取的随机性。In this embodiment, the number of nodes in each segment is kept as consistent as possible during division, so as to ensure the randomness of selection.
作为本发明的一个可选方案,所述为选取的历史存储节点分配存储比例,包括:As an optional solution of the present invention, the allocation of storage ratios for selected historical storage nodes includes:
计算每一个分段的平均存储量;Calculate the average storage capacity of each segment;
将选定的历史存储节点所在的分段的平均存储量作为分配系数得到各个历史存储节点的存储比例。The storage ratio of each historical storage node is obtained by using the average storage capacity of the segment where the selected historical storage node is located as the distribution coefficient.
在本实施例中,可以理解,将平均存储量归一化处理后可以得到各个历史存储节点的存储量比例,此属于常见的数据处理方法,本发明对此不再赘述。In this embodiment, it can be understood that the storage capacity ratio of each historical storage node can be obtained after the average storage capacity is normalized. This is a common data processing method, which will not be described in detail in the present invention.
作为本发明的一个可选方案,所述将差异数据上传到选定的n个存储节点,之前还包括:As an optional solution of the present invention, uploading the difference data to the selected n storage nodes also includes:
根据设定比例从差异数据中确定由历史存储节点存储的数据量。The amount of data stored by the historical storage node is determined from the difference data according to a set ratio.
在本实施例中,可以按各50%的比例将差异数据存储于历史存储节点以及新选定的节点,此比例的具体值并不会影响本发明的效果,本发明对此不作具体限定。In this embodiment, the difference data can be stored in the history storage node and the newly selected node according to the ratio of 50%, and the specific value of this ratio will not affect the effect of the present invention, which is not specifically limited in the present invention.
图2示出了一个实施例中计算机设备的内部结构图。如图2所示,该计算机设备包括该计算机设备包括通过系统总线连接的处理器、存储器、网络接口、输入装置和显示屏。其中,存储器包括非易失性存储介质和内存储器。该计算机设备的非易失性存储介质存储有操作系统,还可存储有计算机程序,该计算机程序被处理器执行时,可使得处理器实现本发明实施例提供的基于区块链的数字资产存储方法。该内存储器中也可储存有计算机程序,该计算机程序被处理器执行时,可使得处理器执行本发明实施例提供的基于区块链的数字资产存储方法。计算机设备的显示屏可以是液晶显示屏或者电子墨水显示屏,计算机设备的输入装置可以是显示屏上覆盖的触摸层,也可以是计算机设备外壳上设置的按键、轨迹球或触控板,还可以是外接的键盘、触控板或鼠标等。Figure 2 shows a diagram of the internal structure of a computer device in one embodiment. As shown in FIG. 2 , the computer equipment includes a processor, a memory, a network interface, an input device, and a display screen connected through a system bus. Wherein, the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system, and may also store a computer program. When the computer program is executed by the processor, the processor can realize the blockchain-based digital asset storage provided by the embodiment of the present invention. method. A computer program may also be stored in the internal memory, and when the computer program is executed by the processor, the processor may execute the blockchain-based digital asset storage method provided by the embodiment of the present invention. The display screen of the computer equipment may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment may be a touch layer covered on the display screen, or a button, a trackball or a touch pad provided on the casing of the computer equipment, or It can be an external keyboard, touchpad or mouse.
本领域技术人员可以理解,图2中示出的结构,仅仅是与本发明方案相关的部分结构的框图,并不构成对本发明方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in Figure 2 is only a block diagram of a partial structure related to the solution of the present invention, and does not constitute a limitation to the computer equipment on which the solution of the present invention is applied. The specific computer equipment can be More or fewer components than shown in the figures may be included, or some components may be combined, or have a different arrangement of components.
在一个实施例中,提出了一种计算机设备,所述计算机设备包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现以下步骤:In one embodiment, a computer device is provided, the computer device includes a memory, a processor and a computer program stored on the memory and executable on the processor, the processor executes the computer The following steps are implemented in the program:
接收到上链数据,获取区块链网络上存储的与所述上链数据对应的最新数据块;Receive the uplink data, and obtain the latest data block corresponding to the uplink data stored on the blockchain network;
根据所述上链数据以及所述最新数据块确定差异数据;determining difference data according to the uplink data and the latest data block;
计算所述差异数据的数据量,根据计算得到的数据量确定所需的节点数量n;Calculate the data volume of the difference data, and determine the required number of nodes n according to the calculated data volume;
获取上链数据的历史数据,根据所述历史数据确定历史存储节点;Obtain the historical data of the uplink data, and determine the historical storage node according to the historical data;
根据所述历史存储节点从区块链网络中选定n个存储节点;Selecting n storage nodes from the blockchain network according to the historical storage nodes;
将差异数据上传到选定的n个存储节点。Upload the difference data to the selected n storage nodes.
在一个实施例中,提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,计算机程序被处理器执行时,使得处理器执行以下步骤:In one embodiment, a computer-readable storage medium is provided. A computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, the processor is made to perform the following steps:
接收到上链数据,获取区块链网络上存储的与所述上链数据对应的最新数据块;Receive the uplink data, and obtain the latest data block corresponding to the uplink data stored on the blockchain network;
根据所述上链数据以及所述最新数据块确定差异数据;Determine difference data according to the uplink data and the latest data block;
计算所述差异数据的数据量,根据计算得到的数据量确定所需的节点数量n;Calculate the data volume of the difference data, and determine the required number of nodes n according to the calculated data volume;
获取上链数据的历史数据,根据所述历史数据确定历史存储节点;Obtain the historical data of the uplink data, and determine the historical storage node according to the historical data;
根据所述历史存储节点从区块链网络中选定n个存储节点;Selecting n storage nodes from the blockchain network according to the historical storage nodes;
将差异数据上传到选定的n个存储节点。Upload the difference data to the selected n storage nodes.
应该理解的是,虽然本发明各实施例的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,各实施例中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the various steps in the flow charts of the embodiments of the present invention are shown sequentially according to the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least some of the steps in each embodiment may include multiple sub-steps or multiple stages, these sub-steps or stages are not necessarily executed at the same time, but may be executed at different times, the sub-steps or stages The order of execution is not necessarily performed sequentially, but may be performed alternately or alternately with at least a part of other steps or sub-steps or stages of other steps.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一非易失性计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,本发明所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink) DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented through computer programs to instruct related hardware, and the programs can be stored in a non-volatile computer-readable storage medium When the program is executed, it may include the processes of the embodiments of the above-mentioned methods. Wherein, any reference to memory, storage, database or other media used in the various embodiments provided by the present invention may include non-volatile and/or volatile memory. Nonvolatile memory can include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Chain Synchlink DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above-mentioned embodiments can be combined arbitrarily. To make the description concise, all possible combinations of the technical features in the above-mentioned embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, should be considered as within the scope of this specification.
以上所述实施例仅表达了本发明的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干变形和改进,这些都属于本发明的保护范围。因此,本发明专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only express several implementation modes of the present invention, and the descriptions thereof are relatively specific and detailed, but should not be construed as limiting the patent scope of the present invention. It should be noted that, for those skilled in the art, several modifications and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent for the present invention should be based on the appended claims.
Claims (9)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310959421.6A CN116662453B (en) | 2023-08-01 | 2023-08-01 | Digital asset storage method based on block chain |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310959421.6A CN116662453B (en) | 2023-08-01 | 2023-08-01 | Digital asset storage method based on block chain |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116662453A true CN116662453A (en) | 2023-08-29 |
CN116662453B CN116662453B (en) | 2023-11-03 |
Family
ID=87724649
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310959421.6A Active CN116662453B (en) | 2023-08-01 | 2023-08-01 | Digital asset storage method based on block chain |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116662453B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118331515A (en) * | 2024-06-17 | 2024-07-12 | 北京国旺盛源智能终端科技有限公司 | Asset data management method based on digital marketing |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20190303853A1 (en) * | 2018-03-29 | 2019-10-03 | Walmart Apollo, Llc | System and method for supply chain verification using blockchain |
US20190372772A1 (en) * | 2018-05-30 | 2019-12-05 | International Business Machines Corporation | Blockchain implementing delta storage |
CN111026767A (en) * | 2020-01-04 | 2020-04-17 | 天津金农企业管理咨询合伙企业(有限合伙) | Data storage method and device of block chain and hardware equipment |
CN111639074A (en) * | 2020-05-06 | 2020-09-08 | 深圳前海微众银行股份有限公司 | Data storage method and device based on block chain |
US20210329070A1 (en) * | 2020-09-25 | 2021-10-21 | Alipay (Hangzhou) Information Technology Co., Ltd. | Block synchronization methods and apparatuses |
CN113900598A (en) * | 2021-12-10 | 2022-01-07 | 北京百度网讯科技有限公司 | Block chain based data storage method, device, equipment and storage medium |
CN114564446A (en) * | 2022-03-01 | 2022-05-31 | 清华大学 | File storage method, device, system and storage medium |
CN115422203A (en) * | 2022-09-30 | 2022-12-02 | 中国农业银行股份有限公司 | Data management method, device, equipment and medium for block chain distributed system |
CN115794945A (en) * | 2022-11-24 | 2023-03-14 | 江西农业大学 | Block chain data storage method and device, readable storage medium and computer equipment |
CN116055513A (en) * | 2023-01-18 | 2023-05-02 | 湖南智慧政务区块链科技有限公司 | Block chain storage compression method, system, equipment and storage medium |
-
2023
- 2023-08-01 CN CN202310959421.6A patent/CN116662453B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20190303853A1 (en) * | 2018-03-29 | 2019-10-03 | Walmart Apollo, Llc | System and method for supply chain verification using blockchain |
US20190372772A1 (en) * | 2018-05-30 | 2019-12-05 | International Business Machines Corporation | Blockchain implementing delta storage |
CN111026767A (en) * | 2020-01-04 | 2020-04-17 | 天津金农企业管理咨询合伙企业(有限合伙) | Data storage method and device of block chain and hardware equipment |
CN111639074A (en) * | 2020-05-06 | 2020-09-08 | 深圳前海微众银行股份有限公司 | Data storage method and device based on block chain |
US20210329070A1 (en) * | 2020-09-25 | 2021-10-21 | Alipay (Hangzhou) Information Technology Co., Ltd. | Block synchronization methods and apparatuses |
CN113900598A (en) * | 2021-12-10 | 2022-01-07 | 北京百度网讯科技有限公司 | Block chain based data storage method, device, equipment and storage medium |
CN114564446A (en) * | 2022-03-01 | 2022-05-31 | 清华大学 | File storage method, device, system and storage medium |
CN115422203A (en) * | 2022-09-30 | 2022-12-02 | 中国农业银行股份有限公司 | Data management method, device, equipment and medium for block chain distributed system |
CN115794945A (en) * | 2022-11-24 | 2023-03-14 | 江西农业大学 | Block chain data storage method and device, readable storage medium and computer equipment |
CN116055513A (en) * | 2023-01-18 | 2023-05-02 | 湖南智慧政务区块链科技有限公司 | Block chain storage compression method, system, equipment and storage medium |
Non-Patent Citations (1)
Title |
---|
江云超;何小卫;崔一举;: "区块链节点存储优化方案", 应用科学学报, no. 01 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118331515A (en) * | 2024-06-17 | 2024-07-12 | 北京国旺盛源智能终端科技有限公司 | Asset data management method based on digital marketing |
Also Published As
Publication number | Publication date |
---|---|
CN116662453B (en) | 2023-11-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102485652B1 (en) | Graph data processing method, method and device for disclosing graph data calculation tasks, storage medium and computer apparatus | |
KR101994021B1 (en) | File manipulation method and apparatus | |
CN110347651B (en) | Cloud storage-based data synchronization method, device, equipment and storage medium | |
US12216633B1 (en) | Memory-aware system and method for identifying matching portions of two sets of data in a multiprocessor system | |
CN116662453A (en) | Blockchain-based digital asset storage method | |
CN111241350A (en) | Graph data query method and device, computer equipment and storage medium | |
CN107111549B (en) | File system management method and device | |
CN113157600B (en) | A space allocation method for shingled hard disk, file storage system and server | |
US10198461B2 (en) | Data storage system | |
US20190289072A1 (en) | Multi-layer data storage system | |
WO2022141561A1 (en) | Data storage method and apparatus oriented to blockchain user node | |
CN112612605A (en) | Thread allocation method and device, computer equipment and readable storage medium | |
CN115526490B (en) | Material data distribution method, equipment and storage medium | |
CN114064603B (en) | Data verification method, device, electronic equipment and medium | |
CN113076318A (en) | User ID distribution method and device, computer equipment and storage medium | |
CN112860755A (en) | Service identifier generation method, device, computer equipment and medium | |
CN116579585B (en) | Resource allocation method, device, computer equipment and storage medium | |
CN114265556B (en) | Data storage method and device | |
CN114676675B (en) | Data processing method, device, computer equipment and storage medium | |
CN114595030B (en) | A method and system for allocating cloud container resources based on auction algorithm | |
CN112783440B (en) | Data storage method and device for user node of block chain | |
CN118503269A (en) | Data searching method, device, computer equipment and readable storage medium | |
KR101676181B1 (en) | Method and apparatus for collecting garbage | |
CN119576250A (en) | Data stream writing control method, system, device, equipment and readable storage medium | |
CN117076722A (en) | Service number generation method and device and computer equipment |
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 |