CN111309731A - Block storage and query method, equipment and storage medium - Google Patents

Block storage and query method, equipment and storage medium Download PDF

Info

Publication number
CN111309731A
CN111309731A CN202010099020.4A CN202010099020A CN111309731A CN 111309731 A CN111309731 A CN 111309731A CN 202010099020 A CN202010099020 A CN 202010099020A CN 111309731 A CN111309731 A CN 111309731A
Authority
CN
China
Prior art keywords
block
storage
node
storage node
stored
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.)
Pending
Application number
CN202010099020.4A
Other languages
Chinese (zh)
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.)
Hangzhou Fuzamei Technology Co Ltd
Original Assignee
Hangzhou Fuzamei Technology 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 Hangzhou Fuzamei Technology Co Ltd filed Critical Hangzhou Fuzamei Technology Co Ltd
Priority to CN202010099020.4A priority Critical patent/CN111309731A/en
Publication of CN111309731A publication Critical patent/CN111309731A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2255Hash tables
    • 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/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2471Distributed queries
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Computational Linguistics (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a block storage and query method, equipment and a storage medium, and belongs to the technical field of block chains. The method comprises the following steps: the newest block HiStored on each storage node and compute node; deleting block H stored on computing nodei‑H0-1; block H is divided by DHT algorithmi‑H0-1 mapping to storage node, deleting unmapped chunks Hi‑H0-1 block H stored on a storage nodei‑H0-1; wherein, the block Hi‑H0-2, mapping the blocks before and after the block by adopting a DHT algorithm, and storing the blocks to a storage node; a block H is stored on each storage node and each computing nodei-1 to block Hi‑H0‑1;Hi>H0>1,HiAnd H0Are all integers, H0Is larger than the block rollback interval. The storage cost of the whole network can be reduced, and distributed storage, elastic storage and capacity expansion of the account book are realized.

Description

Block storage and query method, equipment and storage medium
Technical Field
The present invention relates to the field of block chain technologies, and in particular, to a block storage and query method, device, and storage medium.
Background
In the existing block chain system, with the continuous increase of blocks, the account book storage space is bound to be larger and larger, however, the storage space is always limited, which is bound to cause the problem of insufficient space; in addition, the method of binding storage and calculation is not favorable for the full utilization of resources.
Disclosure of Invention
1. Technical problem to be solved by the invention
In order to overcome the technical problem, the invention provides a block storage and query method, equipment and a storage medium. The storage cost of the whole network can be reduced, and distributed storage, elastic storage and capacity expansion of the account book are realized.
2. Technical scheme
In order to solve the problems, the technical scheme provided by the invention is as follows:
a block storage method, comprising: the newest block HiStored on each storage node and compute node; deleting block H stored on computing nodei-H0-1; block H is divided by DHT algorithmi-H0-1 mapping to storage node, deleting unmapped chunks Hi-H0-1 block H stored on a storage nodei-H0-1; wherein, the block Hi-H0-2, mapping the blocks before and after the block by adopting a DHT algorithm, and storing the blocks to a storage node; a block H is stored on each storage node and each computing nodei-1 to block Hi-H0-1;Hi>H0>1,HiAnd H0Are all integers, H0Is larger than the block rollback interval.
Optionally, the DHT algorithm is a KAD algorithm.
Optionally, a KAD routing table is maintained on each storage node and compute node.
Optionally, the block H is divided by using DHT algorithmi-H0-1 maps to a storage node, further: calculating block H using a hash algorithmi-H0-1 hash value and storage node ID hash value; find and block Hi-H0-1 establishing a block H with N storage nodes corresponding to the N storage node ID hash values with the closest hash valuei-H0-1 with storage nodesMapping relation; and N is block redundancy.
Optionally, the block Hi-H0-2 and the previous blocks are mapped by DHT algorithm and stored in the storage node, further: calculating a block i hash value and a storage node ID hash value by adopting a hash algorithm; finding N storage nodes corresponding to the N storage node ID hash values closest to the hash value of the block i, and establishing a mapping relation between the block i and the storage nodes; storing the block i to a corresponding storage node; repeating the steps until i is H +1i-H0-2, and; i is an integer with a value range of [1, Hi-H0-2](ii) a And N is block redundancy.
Optionally, when there is a departure of the storage node, a KAD algorithm is employed to store the blocks stored on the departure node.
Optionally, when there is the increase of the storage node, the KAD routing table of the newly added storage node is updated according to the seed node of the storage node, and the block information adjacent to the newly added storage node is redistributed by adopting a KAD algorithm.
A block searching method, according to the above block storing method, comprising: calculating the ID hash value of the storage node and the ID hash value of the calculation node by adopting a hash algorithm; establishing a routing table by buckets; requesting a nearest computing node for obtaining a block; hashing all storage nodes and computing nodes and then dividing the storage nodes and the computing nodes into buckets to establish a routing table; finding a computing node corresponding to the ID hash value of the computing node closest to the hash value of the block Hn, requesting the computing node to acquire the block Hn, and if the block Hn exists on the closest computing node, returning to the block Hn; if the block Hn does not exist on the nearest computing node, iteratively finding the storage node of the nearest storage block Hn through the KAD routing table, and requesting to acquire the block Hn.
An apparatus, the apparatus comprising: one or more processors; memory for storing one or more programs that, when executed by the one or more processors, cause the one or more processors to perform a method as described above.
A storage medium storing a computer program which, when executed by a processor, implements a method as claimed in any one of the preceding claims.
3. Advantageous effects
Compared with the prior art, the technical scheme provided by the invention has the following beneficial effects:
the single node does not need to store the data of the full account book any more, and the technical problem of infinite expansion of the account book is solved; the separation of storage and calculation nodes is realized, the utilization of resources is maximized, the storage cost of the whole network is reduced, the distributed storage of the account book is really realized, and the elastic storage and the capacity expansion become possible.
Drawings
Fig. 1 is a flowchart of a block storage method according to the present invention.
FIG. 2 is a block storage situation diagram of the method shown in FIG. 1.
Fig. 3 is a flow chart of a further development of the method of fig. 1.
FIG. 4 is a second flow chart of a further method of the improvement of FIG. 1.
Fig. 5 is a flowchart of a block searching method according to the present invention.
FIG. 6 is a schematic diagram of an apparatus according to the present invention.
FIG. 7 is a block storage situation in embodiment 3.
Detailed Description
For a further understanding of the present invention, reference will now be made in detail to the embodiments illustrated in the drawings.
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings.
The terms first, second, and the like in the present invention are provided for convenience of describing the technical solution of the present invention, and have no specific limiting effect, but are all generic terms, and do not limit the technical solution of the present invention.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Example 1
A block storage method, as shown in fig. 1, includes:
s101, the newest block HiStored on each storage node and compute node;
s102, deleting block H stored on computing nodei-H0-1;
S103, adopting a DHT algorithm to divide the block Hi-H0-1 mapping to storage node, deleting unmapped chunks Hi-H0-1 block H stored on a storage nodei-H0-1;
Wherein, the block Hi-H0-2, mapping the blocks before and after the block by adopting a DHT algorithm, and storing the blocks to a storage node; a block H is stored on each storage node and each computing nodei-1 to block Hi-H0-1;
Hi>H0>1,HiAnd H0Are all integers, H0And if the data is larger than the block rollback interval, dividing the block data into two types by limiting the block rollback interval: historical data which cannot be changed and non-historical data which can be rolled back are stored on the storage nodes in a distributed storage mode, so that the redundancy of block data is improved, and the data storage space can be saved on the premise of ensuring the safety of the block data; the non-historical data is used for high-frequency reading and writing and calculation.
The single node does not need to store the data of the full account book any more, and the technical problem of infinite expansion of the account book is solved; the separation of storage and calculation nodes is realized, the utilization of resources is maximized, the storage cost of the whole network is reduced, the distributed storage of the account book is really realized, and the elastic storage and the capacity expansion become possible.
After the block storage method is adopted, the block storage situation is schematically shown as the block 1 to the block H shown in FIG. 2i-H0-1 mapping to a storage node by using a DHT algorithm and storing to the corresponding storage node; block Hi-H0To block HiStored on each storage node and compute node. Both the storage node and the compute node may have the function of block consensus.
The DHT algorithm mainly includes: CAN, CHORD, Tapestry, prostry, Kademlia (KAD for short) and Viceroy, etc., and the Kademlia protocol is one of the most widely applied and practical and concise principles and implementations. In this embodiment, the DHT algorithm is KAD algorithm, such as P2P file exchange system like eMule, BitTorrent, etc.
A KAD routing table is stored on each storage node and each computing node, and Key words Key of blocks stored on the nodes and block Hash values Hash are stored on the KAD routing table.
In step S103, the block H is divided by using DHT algorithmi-H0-1 maps to a storage node, as shown in fig. 3, further:
s201, calculating a block H by adopting a Hash algorithmi-H0-1 hash value and storage node ID hash value;
s202, find and block Hi-H0-1 establishing a block H with N storage nodes corresponding to the N storage node ID hash values with the closest hash valuei-H0-1 a mapping relation with storage nodes; and N is block redundancy. And by setting the redundancy, the redundant data of the block is saved as fault-tolerant redundant data.
The hash algorithm includes MD4, MD5, SHA-1, SHA-224, SHA-256, SHA-384, SHA-512, etc., and in a specific application, a suitable hash algorithm may be selected.
The block Hi-H0-2 and the previous blocks are mapped by DHT algorithm and stored in the storage node, as shown in fig. 4, further:
s301, calculating a block i hash value and a storage node ID hash value by adopting a hash algorithm;
s302, finding N storage nodes corresponding to the N storage node ID hash values closest to the hash value of the block i, and establishing a mapping relation between the block i and the storage nodes;
s303, storing the block i to a corresponding storage node; repeating the steps until i is H +1i-H0-2, and; i is an integer with a value range of [1, Hi-H0-2](ii) a And N is block redundancy.
When there is a departure of the storage node, the block to be stored on the departure storage node is stored using the KAD algorithm. The storage node M is about to leave, a plurality of blocks including the block Hm are stored on the storage node M, the storage node M is stored according to the KAD algorithm, the storage node of the block Hm which is not stored and is closest to the hash value of the block Hm of the storage node ID hash value is found, the block Hm is stored on the storage node, meanwhile, the KAD routing table of the storage node is updated, and the key word of the block Hm and the hash value of the block Hm are stored in the KAD routing table. Other block heights on storage node M are as small as Hi-H0The block storage process of-1 is similar. And the value range is: [ H ]i-H0,Hi]The block(s) of (1) need not be stored because each storage node and compute node are stored.
And when the storage nodes are increased, updating the KAD routing table of the added storage nodes according to the seed nodes of the storage nodes, and redistributing the block information adjacent to the added storage nodes by adopting a KAD algorithm. Newly-increased storage node N, newly-increased storage node N divides the storage range of taking a value: [ H ]i-H0,Hi]In addition to the block, the block with the hash value closer to the ID hash value of the newly added storage node N is also stored, that is, the data of the block adjacent to the storage node is stored; the amount of the storage data of the newly added storage node N is determined according to the storage condition of the adjacent storage node, for example, if the newly added storage node N is a supercomputer, and if the information of a storage block of a certain storage node is excessive in the left and right adjacent storage nodes, part of the block information can be properly pulled from the storage node to share more storage content.
Example 2
A block searching method, according to the block storing method of embodiment 1, as shown in fig. 5, comprising:
s401, calculating a hash value of the ID of the storage node and a hash value of the ID of the calculation node by adopting a hash algorithm; establishing a routing table by buckets;
s402, finding a computing node corresponding to the ID hash value of the computing node closest to the Hn hash value of the block;
s403, requesting the calculation node to acquire a block Hn, and if the block Hn exists on the nearest calculation node, returning to the block Hn; if the block Hn does not exist on the nearest computing node, iteratively finding the storage node of the nearest storage block Hn through the KAD routing table, and requesting to acquire the block Hn.
Example 3
As shown in FIG. 7, S1-S4 represent storage nodes, C1-C4 represent compute nodes, (Key, Hash) represent block Hash needed to be stored; the storage in fig. 7 to the node closest to the node itself means that the block is stored to N storage nodes (redundancy is 2, that is, N is 2) whose storage node ID hash values and block hash values are closest to each other.
The storage nodes, the computing nodes and the block Hash are mapped to a DHT network; each storage node or compute node maintains a KAD routing table and partial tile information. Assuming that the block height is 10 in the current state, the storage structure is described as follows, and in this embodiment, for convenience of description, the block rollback interval H is described0Set to 2, in the actual blockchain system H0Can be determined according to actual needs.
The assumed height of the stable (fixed) historical account book block is (1-8), the block is mapped to 4 storage nodes according to a KAD algorithm (hash, block), and non-historical account book data, namely the latest block height (9-10), is stored at the same time, and the block height condition stored by each storage node is as follows:
node S1: 2,3,5,7,9,10
Node S2: 1,3,5,6,9,10
Node S3: 1,4,6,8,9,10
Node S4: 2,4,7,8,9,10
The latest block height hypothesis is (9-10), stored on each node according to the conventional KAD algorithm, and the block height conditions stored by the nodes C1, C2, C3 and C4 are calculated as follows: 9,10.
In the prior art, each node is full-account book storage, that is, each node stores data of a block 1-10, and the capacity occupied by the block 1-10 is 10 × 8 ═ 80; after the technical scheme of the embodiment is adopted, the capacity occupied by the storage blocks 1 to 10 is 6x4+2x 4-32; the storage is reduced to the original 32/80-40%. In summary, redundant data is also stored among the four storage nodes as fault-tolerant redundant data.
The newly added block 11 is stored according to the method of the embodiment, the block 11 is stored on the storage nodes S1, S2, S3 and S4, and the computing nodes C1, C2, C3 and C4, all the computing nodes delete the block 9, the block 9 is mapped on the storage nodes, and the storage nodes which are not mapped to the block 9 delete the block 9. The block storage on the compute nodes and storage nodes is as follows:
node S1: 2,3,5,7,10, 11;
node S2: 1,3,5,6,9,10, 11;
node S3: 1,4,6,8,9,10, 11;
node S4: 2,4,7,8,10, 11;
the block height condition stored by the calculation nodes C1, C2, C3 and C4 is: 10,11. And updating KAD routing tables of all nodes simultaneously.
The block search adopts the query method described in embodiment 2, and assuming that the Client currently needs to request a block with a height of 3, the steps are as follows:
1) after ID hash operation of nodes S1, S2, S3, S4, C1, C2, C3 and C4, establishing a routing table in buckets;
2) the Client firstly requests a block with key equal to hash3 (or height equal to 3) from a computing node C3, the computing node C3 has no block 3, and iteratively finds a storage node with a storage node ID hash value closest to the hash value hash3 of the block 3 through a routing table;
3) chunk 3 hash3 is closest to storage node S1 and storage node S2, the resource located to chunk 3 is on storage node S2 or storage node S1;
4) returning to the node information of the storage node S2 or the storage node S1, the Client initiates the block information of obtaining the hash value hash3 of the block 3 to the storage node S1 (or the storage node S2, in case the storage node S1 is not online) again, and completes the data request.
When there is a storage node departure situation, updating all relevant node KAD routing tables, and updating storage information of neighboring storage nodes, such as storage node S4 (storing blocks with heights of 4,8, 2,7, 10, 11) in fig. 7, out-of-line, storage node S1 and storage node S3 need to synchronize data of storage node S4, storage node S1 pulls and stores blocks with heights of 4,8 from storage node S3, and storage node S1 pulls and stores blocks with heights of 2,7 from storage node S3.
When the storage nodes are added, the KAD routing table is updated through the seed node (the storage nodes which already store a plurality of blocks and exist at the beginning of the corresponding storage system created by the block chain network adopting the technical scheme of the embodiment), block information of adjacent storage nodes is redistributed and stored, and after the storage node S5 is added, the block 7 Hash value Hash7 originally stored on the storage node S4 and the block 2 Hash value Hash2 stored on the storage node S1 are not stored any more and are put on the storage node S5.
The embodiment fully utilizes DHT and KAD algorithms, combines the characteristics of the block chain, realizes block chain distributed storage in the true sense, and solves the technical problem of infinite expansion of the account book in the true sense; the separation of the storage node and the computing node is realized, and the utilization of resources is maximized; the storage cost of the whole network is reduced through the improvement of the block storage structure; distributed storage of the account book is realized, and elastic storage (block data stored on each node is determined according to the capacity of the node) and capacity expansion become possible.
Example 4
An apparatus, the apparatus comprising: one or more processors; memory for storing one or more programs that, when executed by the one or more processors, cause the one or more processors to perform a method as described above.
A storage medium storing a computer program which, when executed by a processor, implements the method as described in embodiment 1 above.
Fig. 6 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
As shown in fig. 6, as another aspect, the present application also provides an apparatus 500 including one or more Central Processing Units (CPUs) 501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM503, various programs and data necessary for the operation of the apparatus 500 are also stored. The CPU501, ROM502, and RAM503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
In particular, according to embodiments disclosed herein, the method described in any of the above embodiments may be implemented as a computer software program. For example, embodiments disclosed herein include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for performing the method described in any of the embodiments above. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511.
As yet another aspect, the present application also provides a computer-readable storage medium, which may be the computer-readable storage medium included in the apparatus of the above-described embodiment; or it may be a separate computer readable storage medium not incorporated into the device. The computer readable storage medium stores one or more programs for use by one or more processors in performing the methods described herein.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present application may be implemented by software or hardware. The described units or modules may also be provided in a processor, for example, each of the described units may be a software program provided in a computer or a mobile intelligent device, or may be a separately configured hardware device. Wherein the designation of a unit or module does not in some way constitute a limitation of the unit or module itself.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the present application. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (10)

1. A method for block storage, comprising:
the newest block HiStored on each storage node and compute node;
deleting block H stored on computing nodei-H0-1;
Block H is divided by DHT algorithmi-H0-1 mapping to storage node, deleting unmapped chunks Hi-H0-1 block H stored on a storage nodei-H0-1;
Wherein, the block Hi-H0-2, mapping the blocks before and after the block by adopting a DHT algorithm, and storing the blocks to a storage node; a block H is stored on each storage node and each computing nodei-1 to block Hi-H0-1;
Hi>H0>1,HiAnd H0Are all integers, H0Is larger than the block rollback interval.
2. The method of claim 1, wherein the DHT algorithm is a KAD algorithm.
3. The method of claim 2, wherein each of the storage nodes and the compute nodes maintain a KAD routing table.
4. The method of claim 2, wherein the block H is divided by DHT algorithmi-H0-1 maps to a storage node, further:
calculating block H using a hash algorithmi-H0-1 hash value and storage node ID hash value; find and block Hi-H01 nearest N hash valuesEstablishing a block H by N storage nodes corresponding to the ID hash value of the storage nodei-H0-1 a mapping relation with storage nodes; and N is block redundancy.
5. The method of claim 2, wherein the block H is a block Hi-H0-2 and the previous blocks are mapped by DHT algorithm and stored in the storage node, further:
calculating a block i hash value and a storage node ID hash value by adopting a hash algorithm; finding N storage nodes corresponding to the N storage node ID hash values closest to the hash value of the block i, and establishing a mapping relation between the block i and the storage nodes; storing the block i to a corresponding storage node; repeating the steps until i is H +1i-H0-2, and; i is an integer with a value range of [1, Hi-H0-2](ii) a And N is block redundancy.
6. The method of claim 2, wherein when there is a departure of the storage node, using a KAD algorithm to store blocks stored on the departure node.
7. The method of claim 2, wherein when there is an addition of the storage node, updating the KAD routing table of the added storage node according to the seed node of the storage node, and re-distributing the block information adjacent to the added storage node using KAD algorithm.
8. A block search method according to claim 1, wherein the block storage method comprises:
calculating the ID hash value of the storage node and the ID hash value of the calculation node by adopting a hash algorithm;
hashing all storage nodes and computing nodes and then dividing the storage nodes and the computing nodes into buckets to establish a routing table;
finding a computing node corresponding to the ID hash value of the computing node closest to the hash value of the block Hn, requesting the computing node to acquire the block Hn, and if the block Hn exists on the closest computing node, returning to the block Hn; if the block Hn does not exist on the nearest computing node, iteratively finding the storage node of the nearest storage block Hn through the KAD routing table, and requesting to acquire the block Hn.
9. An apparatus, characterized in that the apparatus comprises:
one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method recited in any of claims 1-8.
10. A storage medium storing a computer program, characterized in that the program, when executed by a processor, implements the method according to any one of claims 1-8.
CN202010099020.4A 2020-02-18 2020-02-18 Block storage and query method, equipment and storage medium Pending CN111309731A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010099020.4A CN111309731A (en) 2020-02-18 2020-02-18 Block storage and query method, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010099020.4A CN111309731A (en) 2020-02-18 2020-02-18 Block storage and query method, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111309731A true CN111309731A (en) 2020-06-19

Family

ID=71145125

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010099020.4A Pending CN111309731A (en) 2020-02-18 2020-02-18 Block storage and query method, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111309731A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112988852A (en) * 2021-05-11 2021-06-18 腾讯科技(深圳)有限公司 Block chain-based data management method, device and medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180189312A1 (en) * 2016-12-30 2018-07-05 Guardtime Ip Holdings Limited Event Verification Receipt System and Methods
CN108846133A (en) * 2018-07-04 2018-11-20 东北大学 Block chain storage organization based on B-M tree, B-M tree establish algorithm and lookup algorithm
CN109191124A (en) * 2018-08-16 2019-01-11 北京京东尚科信息技术有限公司 Block chain network, dispositions method and storage medium
CN109272316A (en) * 2018-09-25 2019-01-25 广州智慧城市发展研究院 A kind of block realization method and system under the chain network based on block
CN109933592A (en) * 2019-03-22 2019-06-25 杭州复杂美科技有限公司 Date storage method, data rewind method, equipment and storage medium
CN110264207A (en) * 2019-08-15 2019-09-20 广州蚁比特区块链科技有限公司 Block chain separation processing method and system
CN110442577A (en) * 2019-07-15 2019-11-12 杭州复杂美科技有限公司 A kind of storage of status data, inquiry and management method, equipment and storage medium
CN110471795A (en) * 2019-07-31 2019-11-19 阿里巴巴集团控股有限公司 Block chain state data reconstruction method and device, electronic equipment
CN110958303A (en) * 2019-11-14 2020-04-03 杭州复杂美科技有限公司 Block storage and query method, equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180189312A1 (en) * 2016-12-30 2018-07-05 Guardtime Ip Holdings Limited Event Verification Receipt System and Methods
CN108846133A (en) * 2018-07-04 2018-11-20 东北大学 Block chain storage organization based on B-M tree, B-M tree establish algorithm and lookup algorithm
CN109191124A (en) * 2018-08-16 2019-01-11 北京京东尚科信息技术有限公司 Block chain network, dispositions method and storage medium
CN109272316A (en) * 2018-09-25 2019-01-25 广州智慧城市发展研究院 A kind of block realization method and system under the chain network based on block
CN109933592A (en) * 2019-03-22 2019-06-25 杭州复杂美科技有限公司 Date storage method, data rewind method, equipment and storage medium
CN110442577A (en) * 2019-07-15 2019-11-12 杭州复杂美科技有限公司 A kind of storage of status data, inquiry and management method, equipment and storage medium
CN110471795A (en) * 2019-07-31 2019-11-19 阿里巴巴集团控股有限公司 Block chain state data reconstruction method and device, electronic equipment
CN110264207A (en) * 2019-08-15 2019-09-20 广州蚁比特区块链科技有限公司 Block chain separation processing method and system
CN110958303A (en) * 2019-11-14 2020-04-03 杭州复杂美科技有限公司 Block storage and query method, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
江云超等: "区块链节点存储优化方案" *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112988852A (en) * 2021-05-11 2021-06-18 腾讯科技(深圳)有限公司 Block chain-based data management method, device and medium
CN112988852B (en) * 2021-05-11 2021-08-03 腾讯科技(深圳)有限公司 Block chain-based data management method, device and medium

Similar Documents

Publication Publication Date Title
CN110958303B (en) Block storage and query method, equipment and storage medium
CN110175188B (en) Block chain state data caching and querying method, equipment and storage medium
CN102521297B (en) The method of achieving system dynamic expansion in shared-nothing database cluster
US10423641B2 (en) Hierarchical coherency log for managing a distributed data storage system
US20140351636A1 (en) Method, device, and system for data reconstruction
CN113535656B (en) Data access method, device, equipment and storage medium
US20090113412A1 (en) Method and apparatus for enhanced synchronization protocol
CN113168404B (en) System and method for replicating data in a distributed database system
EP3163446B1 (en) Data storage method and data storage management server
US9471586B2 (en) Intelligent selection of replication node for file data blocks in GPFS-SNC
WO2021248876A1 (en) Distributed data storage method, device, and storage medium
CN112948178A (en) Data processing method, device, system, equipment and medium
CN111651424B (en) Data processing method, device, data node and storage medium
JP2018049653A (en) Cache management
CN108881379B (en) Method and device for data synchronization between server clusters
WO2014177085A1 (en) Distributed multicopy data storage method and device
CN111309731A (en) Block storage and query method, equipment and storage medium
CN113238996A (en) Block chain data archiving method based on DHT, electronic equipment and storage medium
CN112182029B (en) Data query method, device and storage medium
CN111708835B (en) Block chain data storage method and device
CN106933882B (en) Big data increment calculation method and device
CN116775712A (en) Method, device, electronic equipment, distributed system and storage medium for inquiring linked list
US20220286498A1 (en) Service request message sending method, distributed database architecture and computer readable storage medium
CN109857719B (en) Distributed file processing method, device, computer equipment and storage medium
CN117931829B (en) Database updating method and device, electronic 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
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20200619

WD01 Invention patent application deemed withdrawn after publication