CN110990413A - Block chain data storage device and rapid storage method thereof - Google Patents

Block chain data storage device and rapid storage method thereof Download PDF

Info

Publication number
CN110990413A
CN110990413A CN202010117951.2A CN202010117951A CN110990413A CN 110990413 A CN110990413 A CN 110990413A CN 202010117951 A CN202010117951 A CN 202010117951A CN 110990413 A CN110990413 A CN 110990413A
Authority
CN
China
Prior art keywords
storage
data
module
node
logic
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
Application number
CN202010117951.2A
Other languages
Chinese (zh)
Other versions
CN110990413B (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.)
Hangzhou Dataport Technology Co ltd
Nanjing Lifeng Intellectual Property Agency Special General Partnership Suzhou Branch
Original Assignee
Taizhou Xiangwen Information 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 Taizhou Xiangwen Information Technology Co ltd filed Critical Taizhou Xiangwen Information Technology Co ltd
Priority to CN202010712925.4A priority Critical patent/CN111858599A/en
Priority to CN202010117951.2A priority patent/CN110990413B/en
Publication of CN110990413A publication Critical patent/CN110990413A/en
Application granted granted Critical
Publication of CN110990413B publication Critical patent/CN110990413B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/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
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9024Graphs; Linked lists
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The block chain data storage device comprises a block, a plurality of logic storage modules and a plurality of data storage modules, wherein the block is connected with an authentication module which is connected with a logic storage management module; all logical storage management modules in the system are capable of interacting with each logical storage module. The invention relates to a block chain data rapid storage method, which comprises the following processing steps: s1 initializing the block chain data storage device and generating a logic storage module; s2 dynamic management of logic storage module; s3, storing and processing the service data; and S4, reading the service data. The device and the method can compress the occupation of the traditional block chain system on the storage resource on the premise of ensuring the data safety and reliability, improve the service data confirmation efficiency, further greatly improve the timeliness, and promote the block chain technology to be widely applied to very stable environments such as a local area network or an internet of things.

Description

Block chain data storage device and rapid storage method thereof
Technical Field
The invention relates to the field of computers and data processing, in particular to a block chain data storage device and a fast storage method thereof.
Background
With the development of the block chain technology, the block chain technology is widely applied to the fields of finance, government affairs and civil consumption, and with the increase of the number of nodes, the block chain needs to occupy a large amount of storage space, and huge storage pressure is brought. When a new business process needs to be checked, each node needs to access a large number of history blocks; this makes the blockchain technique a significant obstacle in scene applications where the real-time and on-site are important.
Disclosure of Invention
The invention provides a block chain data storage device and a rapid storage method thereof, which are used for solving the problems of large storage pressure, low data confirmation efficiency, poor timeliness and the like of the existing block chain technology.
In order to achieve the purpose, the invention adopts the technical scheme that:
a blockchain data storage device, comprising:
the block is arranged in each node of the block chain system and used for storing block chain information data and business data or transaction data storage address pointers;
the authentication module is connected with the block in a data connection mode;
the logic storage management module is connected with the authentication module in a data connection mode;
the logic storage module is used for storing business data or transaction data in the blockchain system;
all the logic storage management modules in the block chain system can interact data with each logic storage module in a data connection mode;
the authentication module is used for verifying the information of the logic storage module.
Further, the service data or transaction data storage address pointer stored in the block includes: the IP address and the data address of the logic storage module where the related service data or the transaction data of the block are located and the data content Hash value of the logic storage module.
Further, the logical storage management module is used for managing processes of generating or eliminating logical storage in the blockchain system node and data storage processes.
Furthermore, the logic storage module is virtualized from the storage space of each node of the blockchain system.
A fast storage method of a block chain data storage device comprises the following steps:
s1 initializing the block chain data storage device and generating a logic storage module;
s2, the logic storage management module dynamically manages the logic storage module in the running process of the block chain system;
s3, storing and processing the service data;
and S4, reading the service data.
Further, the processing procedure of step S1 includes the following steps:
s101 the blockchain data storage device is initialized along with deployment of a blockchain system, where the initialization mainly includes: a storage space for ensuring the normal operation of the block, the authentication module and the logic storage management module 30 is arranged on each node;
s102, generating an initialization logic storage module;
after the initialization processing in step S101, the logical storage management modules of m nodes in the blockchain system set up independent physical storage records from the physical storage of each node, and the logical storage modules are partitioned during initialization and stored physically.
Further, in step S2, the logic storage management module performs dynamic management on the logic storage module according to a principle that a node with a busy service participates in less storage and a storage space is open in competition, and the specific processing procedure includes the following steps:
recording initialization logic storage corresponding to m nodes in the blockchain system, wherein a logic storage management module of each node counts the times of initiating storage requests of the node in a storage period, when a service data or transaction data storage request occurs in the system, the logic storage management modules of all the nodes broadcast the service data or transaction data storage times requested by the node to other logic storage management modules in the blockchain system, the logic storage management module of the node currently initiating the request obtains a sequence by sequencing according to the service data or transaction data storage times requested by each node in the storage period from less to more, and the node before ranking) is taken as a logic storage module, wherein c represents the total number of the nodes before ranking; the logic storage management module of the node which initiates the request currently broadcasts the selected logic storage module to other logic storage management modules in the system, and the block chain system is used as the logic storage module of the current node service data for storing the service data or the transaction data; then entering the dynamic management process of the logic storage module of the next storage period;
the storage period refers to a time period from the time when a node initiates a service data or transaction data storage request to the time when the next node initiates the service data storage request.
Further, the processing procedure of step S3 includes the following steps:
when a node j initiates a data storage request, a logic storage management module of the node j screens out a logic storage module which meets the condition according to the step S2 to form a preselected storage module set for storing service or transaction data of the node j, and sends an IP address, a data address and a data content Hash value in the logic storage module which meets the condition to an authentication module, on one hand, the authentication module verifies the information of the preselected storage module set according to the received data content Hash value in the logic storage module 4, and sends the IP address, the data address and the data content Hash value of the verified logic storage module to a block, and the block stores the received IP address, the data address and the data content Hash value of the data storage module in the block to be a pointer of the service data or the transaction data storage address, broadcasting the pointer information of the service data or transaction data storage address to blocks of all nodes in a block chain system for storage; on the other hand, the information of the logical storage modules passing the verification is sent to the logical storage management module, the logical storage management module stores the service or transaction data into all the logical storage modules passing the verification, and each logical storage module in the c logical storage modules in the block chain system has a copy of the service data requested to be stored by the node j, so that the storage of the service data is completed once.
Further, the processing procedure of step S4 includes the following steps:
when a node w of a block chain system initiates a data reading request, the requested data is called target data, the node w firstly broadcasts the target data reading request to all blocks of the block chain system, all the blocks inquire a self service data or transaction data storage address pointer recording table, and after the inquired service data or transaction data storage address pointer recording is judged by a consensus mechanism, a consensus storage address pointer of the target data is obtained; the node w sends the consensus storage address pointer to an authentication module of the node w, after the authentication module of the node w receives the consensus storage address pointer, whether a record of the consensus storage address pointer exists is determined from a historical record, if the record of the consensus storage address pointer is not inquired in the historical record, the authentication is regarded as failed, and the data reading request process is terminated; if the authentication is passed, forwarding the consensus storage address pointer information to the logic storage management module, reading the service and transaction information data from all authenticated logic storage modules by the logic storage management module according to the address pointer, sending the read data to the authentication module, carrying out consensus judgment on the received data by the authentication module, and sending the consensus result data to the node w initiating the request.
Compared with the prior art, the embodiment of the invention at least has the following beneficial effects:
1. the device and the method can greatly compress the occupation of the traditional block chain system on the storage resource on the premise of ensuring the data safety and reliability, improve the service data confirmation efficiency, further greatly improve the timeliness, and promote the block chain technology to be widely applied in the environment with normal non-stability, such as a local area network or an internet of things.
2. The block in the block chain system is used for storing the block chain information data and the service data or transaction data storage address pointer, and the block does not directly store the service data or transaction data but replaces the service data or transaction data storage address pointer, so that the occupation of redundant data records on the storage resources of the block chain system is greatly reduced, and the storage pressure of the block chain system is reduced.
3. The invention adopts a preselected storage module set and an authentication module to verify the preselected storage module, thereby ensuring that data is stored to a high-quality node in the whole block chain system on the premise of ensuring safety and greatly reducing the communication delay loss; more importantly, in the process of joint accounting, the pointer of the storage address of the business or transaction data is recorded, so that the storage efficiency of the blockchain system is greatly improved.
Drawings
FIG. 1 is a block chain data storage device according to the present invention;
FIG. 2 is a comparison of a block data structure of a block chain data storage device according to the present invention with the prior art;
fig. 3 is a flow chart of a storage method of the block chain data storage device according to the present invention.
Detailed Description
For a better understanding of the present invention, reference will now be made in detail to the embodiments illustrated in the accompanying drawings.
Referring to fig. 1, a block chain data storage device according to the present invention includes the following components:
block 10, authentication module 20, logical storage management module 30, and logical storage module 40.
The block chain system is provided with n nodes, each node is provided with one or more blocks 10, each block 10 is connected with an authentication module 20 in a data connection mode, and each authentication module 20 is connected with a logic storage management module 30 in a data connection mode; the block chain data storage device is also provided with a plurality of logic storage modules 40, and the logic storage modules 40 are virtualized from the storage space of each node of the block chain system; all logical storage management modules 30 in the system may interact with each logical storage module 40 via a data connection.
The block 10 is used for storing block chain information data and a service data or transaction data storage address pointer. Referring to fig. 2 (a), the prior art block needs to store blockchain information data and service data or transaction data records, and unlike the prior art block, referring to fig. 2 (b), the block 10 of the present invention does not directly store service data or transaction data, but instead stores service data or transaction data storage address pointers, thereby greatly reducing the occupation of redundant data records on system storage resources.
The block chain information data stored in the block 10 includes: hash pointer of previous block, block relative timestamp, Hash pointer of target block, other block header information. The service data or transaction data storage address pointer stored in the block 10 includes: the IP address and the data address of the logic storage module 40 where the relevant service data of the block is located and the data content Hash value of the logic storage module 40. The calculation method of the Hash value includes, but is not limited to, Hash algorithms such as MD5, SHA1, SHA2, SHA3 and the like.
The block 10 has a data connection with an authentication module 20, and can exchange data.
The authentication module 20 is used for verifying the information of the logic storage module 40. The authentication module 20 and the logic storage management module 30 have data connection therebetween, and can exchange data.
The logical storage management module 30 is configured to manage a process of generating or eliminating logical storage in the blockchain system node and a data storage process. The logic storage management module 30 is connected with a logic storage module 40 through data connection;
the logic storage module 40 is used for storing business or transaction data in the blockchain system.
Based on the block chain data storage device, the invention also provides a fast storage method, and with reference to fig. 3, the specific processing steps include:
s1 initializing the block chain data storage device and generating a logic storage module;
s101, initializing the block chain data storage device along with the deployment of the block chain system, wherein the initialization mainly comprises the following steps:
a memory space for ensuring the normal operation of the block 10, the authentication module 20, and the logical memory management module 30 is allocated to each node. The mode of dividing the storage space can be equal capacity division or unequal capacity division. Therefore, the storage space of each node can be optimally utilized, normal operation of the node can be ensured, and efficient data storage of a block chain system can be ensured in a local application scene.
As an embodiment of the present invention, each node is configured with 1M storage space for normal operation of the block 10, the authentication module 20 and the logical storage management module 30 of the node.
S102, generating an initialization logic storage module;
after the initialization process of step S101, the block chain system has m nodes, and the logical storage management module 30 of the m nodes marks out the independent physical storage from the physical storage of each node
Figure 554976DEST_PATH_IMAGE001
Blocking and physical storage of logical storage module 40 at initialization
Figure 160401DEST_PATH_IMAGE001
S2 dynamic management of logic storage module;
the logic storage management module 30 dynamically manages the logic storage module 40 in the system operation process, and the management adopts the principle that nodes with busy service participate in less storage and the storage space competition is open, and the specific processing process is as follows:
noting m nodes in the blockchain system
Figure 268428DEST_PATH_IMAGE002
The corresponding initialization logic is stored as
Figure 792950DEST_PATH_IMAGE001
The logic storage management module 30 of each node counts the number of times that the node initiates a storage request in a storage period, each time a service data or transaction data storage request occurs in the system, the logic storage management modules 30 of all nodes broadcast the service data or transaction data storage number of times requested by the node to other logic storage management modules 30 in the blockchain system, and the logic storage management module 30 of the node currently initiating the request is sorted according to the number of times that the service data or transaction data requested by each node in the storage period is stored from small to large to obtain a sequence
Figure 953804DEST_PATH_IMAGE003
Before the rank is taken
Figure 894078DEST_PATH_IMAGE004
) As a logical memory module
Figure 683042DEST_PATH_IMAGE005
Wherein c represents pre-ranking
Figure 519411DEST_PATH_IMAGE006
The total number of nodes of (c); the logical storage management module 30 of the node currently originating the request will select the logical storage module
Figure 197255DEST_PATH_IMAGE005
Broadcast to other logical storage management modules 30 in the system that will be the blockchain system
Figure 269116DEST_PATH_IMAGE005
Logic storage module 40 as current node service data for service numberAccording to or transaction data storage usage; then entering the dynamic management process of the logic storage module 40 of the next storage period; the storage period refers to a time period from the time when a node initiates a service data or transaction data storage request to the time when the next node initiates the service data storage request. Therefore, for the block chain system with larger service fluctuation, smooth data throughput can be ensured, and the scene adaptability and the response capability of the system are greatly improved.
As an embodiment of the invention, there are m nodes in the blockchain system
Figure 319112DEST_PATH_IMAGE002
According to step S1, the set of logical storage modules is initialized to
Figure 185437DEST_PATH_IMAGE001
(ii) a The logical storage management module 30 of each node counts the number of times that the node initiates a storage request in one storage period, in this embodiment, the logical storage management module 30 of the node i sets a counter
Figure 320883DEST_PATH_IMAGE007
Figure 930856DEST_PATH_IMAGE007
Counting the times of service data storage requests initiated by the node i in the current storage period, and recording m nodes
Figure 835358DEST_PATH_IMAGE002
The corresponding statistical number is
Figure 872584DEST_PATH_IMAGE008
Ordering the nodes in ascending order to obtain a sequence
Figure 731212DEST_PATH_IMAGE003
The top 60% (i.e. ranking) of the rank is taken
Figure 144876DEST_PATH_IMAGE009
) Section (A) ofThe point obtains a logic storage module corresponding to the point
Figure 700622DEST_PATH_IMAGE005
I.e. c = ⌈ 60% x m ⌉ (integer upward) or ⌊ 60% x m ⌋ (integer downward), c being the total number of nodes 60% before the rank, then
Figure 49695DEST_PATH_IMAGE005
Is the set of logical storage modules participating in storage in the current storage cycle of the system. After determining the set of logical storage modules currently participating in storage, the counter in the logical storage management module 30 of each node
Figure 18788DEST_PATH_IMAGE007
And clearing and restarting the counting of the next storage period.
And S3, storing the service data.
When the node j initiates a data storage request, the logic storage management module 30 of the node j screens out the logic storage modules 40 meeting the conditions according to the step S2 to form a pre-selected storage module set for storing the service or transaction data of the node j
Figure 580351DEST_PATH_IMAGE010
On one hand, the authentication module 20 verifies the information of the preselected storage module set according to the received data content Hash value in the logic storage module 40, and sends the IP address, the data address and the Hash value of the data content of the verified logic storage module 40 to the block 10, the block 10 stores the received IP address, the data address and the Hash value of the data content of the data storage module 40 into the block 10 to become a pointer of a service data or transaction data storage address, and broadcasts the pointer information of the service data or transaction data storage address into the blocks 10 of all nodes in the chain block system for storage; on the other hand, the information of the verified logic storage module 40 is sent to the logic storage tubeThe management module 30, the logic storage management module 30 stores the business or transaction data to all verified logic storage modules
Figure 584079DEST_PATH_IMAGE010
In the block chain system, each logic storage module 40 in the c logic storage modules 40 has one copy of service data requested to be stored by the node j, thereby completing the storage of the service data once.
The preselection storage module set and the authentication module 20 are adopted to verify the preselection storage module, so that the data are guaranteed to be stored to high-quality nodes in the whole block chain system on the premise of guaranteeing safety, and the communication delay loss is greatly reduced. More importantly, in the process of joint accounting, the pointer of the storage address of the business data or the transaction data is recorded, so that the storage efficiency of the blockchain system is greatly improved.
And S4, reading the service data.
When a node w of a block chain system initiates a data reading request, the requested data is called target data, the node w firstly broadcasts the target data reading request to all blocks 10 of the block chain system, all the blocks 10 inquire own service data or transaction data storage address pointer record tables, and after the inquired service data or transaction data storage address pointer record is judged by a consensus mechanism, a consensus storage address pointer of the target data is obtained; the node w sends the consensus storage address pointer to the authentication module 20 of the node w, after receiving the consensus storage address pointer, the authentication module 20 of the node w confirms whether the record of the consensus storage address pointer exists in the history record, if the record of the consensus storage address pointer is not inquired in the history record, the authentication is regarded as failed, and the data reading request process is terminated; if the authentication is passed, the consensus storage address pointer information is forwarded to the logic storage management module 30, the logic storage management module 30 reads the service and transaction information data from all the authenticated logic storage modules 40 according to the address pointer, and sends the read data to the authentication module 20, the authentication module 20 performs consensus judgment on the received data, and sends the consensus result data to the node w which initiates the request. In the process of consensus, after the consensus storage address pointer is added and is subjected to consensus, the data is authenticated by the authentication module 20, and the data security is further enhanced.
The working principle of the block chain data storage device and the rapid storage method thereof is as follows:
firstly, each node of the block chain is divided into a storage space, so that a logical storage space which is physically independent and can be managed and controlled together logically is obtained. The logic storage management module 30 divides the logic storage space into a plurality of dynamically changing logic storage modules 40 according to the fast storage method of the present invention, and dynamically manages the logic storage modules 40, and the logic storage module 30 in each node can detect the state from the node to all the logic storage modules 40 in real time, so as to store the information related to the blocks in the node into the logic storage modules 40 meeting the conditions, or read the related business or transaction data from the logic storage modules 40 meeting the conditions.
When a certain node generates new service or transaction data, the logic storage management module 30 of the node screens out the logic storage module 40 meeting the condition according to the fast storage method of the invention, forms a preselected storage module set for storing the service or transaction data of the node, and sends the IP address, the data address and the Hash value of the data content in the logic storage module 40 meeting the condition to the authentication module 20, the authentication module 20 verifies the information of the preselected storage module set according to the fast storage method of the invention on one hand, and sends the IP address, the data address and the Hash value of the data content of the verified logic storage module 40 to the block 10, the block 10 stores the received IP address, the data address and the Hash value of the data content of the data storage module 40 into the block to be a pointer of the service or transaction data storage address, broadcasting the pointer information of the service or transaction data storage address to all blocks 10 in the block chain system for storage; on the other hand, the information of the verified logical storage module 40 is sent to the logical storage management module 30, and the logical storage management module 30 stores the business or transaction data in all the verified logical storage modules 40, so that one-time data storage is completed.
When a certain node of the blockchain system initiates a data reading request, the node firstly broadcasts the data reading request to all the blocks 10 of the blockchain system, and after all the blocks 10 are judged by a consensus mechanism, a storage address pointer of target data is obtained, wherein the consensus mechanism is judged to be the prior art and is not described herein. The node initiating the data reading request sends the consensus storage address pointer to the authentication module 20, after receiving the consensus storage address pointer, the authentication module 20 confirms whether a record of the consensus storage address pointer exists in a history record, after authentication, the consensus storage address pointer information is forwarded to the logic storage management module 30, the logic storage management module 30 reads service and transaction information data from all authenticated logic storage modules 40 according to the address and sends the read data to the authentication module 20, the authentication module 20 performs consensus judgment on the received data, and sends consensus result data to the node initiating the request.
As an embodiment of the present invention, assuming that the whole blockchain system has n nodes, when node a of the blockchain system initiates a data read request, node a broadcasts the data read request to other (n-1) blocks, so that n nodes in the whole blockchain system all obtain a message that node a needs to read service data. All nodes find the storage address pointers of the target service data from the blocks of the nodes, then judge the storage address pointers through a consensus mechanism, for example, the invention adopts a 51% principle, namely n nodes vote the storage address pointers of the target service data, and when the storage address pointers of the target service data in more than 51% multiplied by n nodes are consistent, the storage address pointers of the target service data are considered as final storage address pointers of the target data and are recorded as the final storage address pointers of the target data
Figure 337009DEST_PATH_IMAGE011
. Node A will
Figure 793398DEST_PATH_IMAGE011
Sending to the authentication module 20 in the node a, the authentication module 20 first searches from its history whether there is any one
Figure 424231DEST_PATH_IMAGE011
If not, record(s)
Figure 282465DEST_PATH_IMAGE011
If so, terminating the data reading request; if it is confirmed that there is
Figure 973341DEST_PATH_IMAGE011
The record is authenticated and the authentication module 20 will authenticate the record
Figure 589130DEST_PATH_IMAGE011
Sending the data to a logic storage management module 30, reading service and transaction information data from all authenticated logic storage modules 40 by the logic storage management module 30 according to addresses, if the number of the authenticated logic storage modules 40 is m, reading m service and transaction information data by the logic storage management module 30, sending the m data to an authentication module 20, and performing consensus confirmation on the m data by the authentication module 20, which is taken as an example, a principle of 51% is still used here, that is, when 51% x m data are consistent, the obtained consistent data is considered to be the consensus service and transaction information data, and sending the consensus service and transaction information data to a node initiating a request by the authentication module 20, so that the node initiating the request can obtain the requested data.
In conclusion, the device and the method for storing the block chain data can greatly compress the occupation of the traditional block chain system on the storage resources and improve the service data confirmation efficiency on the premise of ensuring the data safety and reliability, thereby greatly improving the timeliness and promoting the block chain technology to be widely applied to very stable environments such as a local area network or an internet of things.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (9)

1. A blockchain data storage device, comprising:
the block (10) is arranged in each node of the block chain system, and the block (10) is used for storing block chain information data and business data or transaction data storage address pointers;
an authentication module (20) connected to the block (10) in a data connection manner;
the logic storage management module (30) is connected with the authentication module (20) in a data connection mode;
a logic storage module (40) for storing business data or transaction data in the blockchain system;
all the logic storage management modules (30) in the blockchain system can interact data with each logic storage module (40) in a data connection mode;
the authentication module (20) is used for verifying the information of the logic storage module (40).
2. The blockchain data storage device of claim 1, wherein: the service data or transaction data storage address pointer stored in the block (10) comprises: the IP address and the data address of the logic storage module (40) where the related service data or transaction data of the block are located and the data content Hash value of the logic storage module (40).
3. The blockchain data storage device according to claim 1, wherein the logical storage management module (30) is configured to manage a process of generating or eliminating logical storage in a blockchain system node and a data storage process.
4. A blockchain data storage device according to claim 1, wherein the logical storage module (40) is virtualized out of the storage space of each node of the blockchain system.
5. A fast storage method of the blockchain data storage device according to claim 1, comprising the steps of:
s1 initializing the block chain data storage device and generating a logic storage module (40);
s2, the logic storage management module (30) dynamically manages the logic storage module (40) in the operation process of the blockchain system;
s3, storing and processing the service data;
and S4, reading the service data.
6. The method for fast storing of a blockchain data storage device according to claim 5, wherein the processing procedure of the step S1 includes the steps of:
s101 the blockchain data storage device is initialized along with deployment of a blockchain system, where the initialization mainly includes: a storage space for ensuring the normal operation of the block (10), the authentication module (20) and the logic storage management module (30) is arranged on each node;
s102, generating an initialization logic storage module;
after the initialization process of step S101, the logical storage management module (30) of m nodes in the blockchain system divides the physical storage of each node into independent physical storage records
Figure 922894DEST_PATH_IMAGE001
Block-by-block physical storage of logical memory modules (40) at initialization
Figure 685707DEST_PATH_IMAGE001
7. The method for fast storing of a blockchain data storage device according to claim 6, wherein the logic storage management module (30) in step S2 adopts a principle that nodes with heavy traffic participate in less storage and storage space competition is open for dynamic management of the logic storage module (40), and the specific processing procedure includes the following steps:
noting m nodes in the blockchain system
Figure 793340DEST_PATH_IMAGE002
The corresponding initialization logic is stored as
Figure 657391DEST_PATH_IMAGE001
The logic storage management module (30) of each node counts the number of times that the node initiates a storage request in a storage period, when a service data or transaction data storage request occurs in the system, the logic storage management modules (30) of all the nodes broadcast the service data or transaction data storage number of times requested by the node to other logic storage management modules (30) in the blockchain system, and the logic storage management modules (30) of the node currently initiating the request are sequenced according to the service data or transaction data storage number of times requested by each node in the storage period from small to large to obtain a sequence
Figure 550392DEST_PATH_IMAGE003
Before the rank is taken
Figure 700750DEST_PATH_IMAGE004
) As a logical memory module
Figure 436625DEST_PATH_IMAGE005
Wherein c represents pre-ranking
Figure 478268DEST_PATH_IMAGE006
The total number of nodes of (c); the logical storage management module (30) of the node currently originating the request will select the logical storage module
Figure 615988DEST_PATH_IMAGE005
Broadcast to other logical storage management modules (30) in the system that will be in the blockchain system
Figure 937248DEST_PATH_IMAGE005
A logic storage module (40) used as the current node service data for storing the service data or the transaction data; then entering the dynamic management process of the logic storage module (40) of the next storage period;
the storage period refers to a time period from the time when a node initiates a service data or transaction data storage request to the time when the next node initiates the service data storage request.
8. The method for fast storing of a blockchain data storage device according to claim 7, wherein the processing procedure of the step S3 includes the steps of:
when the node j initiates a data storage request, the logic storage management module (30) of the node j screens out the logic storage modules (40) meeting the conditions according to the step S2 to form a pre-selected storage module set for storing the service or transaction data of the node j
Figure 160419DEST_PATH_IMAGE005
And the IP address and the data address of the logical storage module (40) meeting the conditions and the data content Hash value in the logical storage module (40) are sent to an authentication module (20), on one hand, the authentication module (20) verifies the information of the preselected storage module set according to the received data content Hash value in the logical storage module (40), and sends the IP address and the data address of the logical storage module (40) passing the verification and the Hash value of the data content to a block (10), and the block (10) stores the received data to a block (10)The IP address, the data address and the Hash value of the data content of the storage module (40) are stored in a block (10) to be used as a pointer of a service data or transaction data storage address, and the pointer information of the service data or transaction data storage address is broadcasted to the blocks (10) of all nodes in the block chain system for storage; on the other hand, the information of the verified logic storage module (40) is sent to the logic storage management module (30), and the logic storage management module (30) stores the business or transaction data to all the verified logic storage modules
Figure 241639DEST_PATH_IMAGE005
In the method, each logic storage module (40) in c logic storage modules (40) in the block chain system has one copy of service data requested to be stored by a node j, so that one-time service data storage is completed.
9. The method for fast storing of a blockchain data storage device according to claim 8, wherein the processing procedure of the step S4 includes the steps of:
when a node w of a block chain system initiates a data reading request, the requested data is called target data, the node w firstly broadcasts the target data reading request to all blocks (10) of the block chain system, all the blocks (10) inquire self service data or a transaction data storage address pointer recording table, and after the inquired service data or transaction data storage address pointer recording is judged by a consensus mechanism, a consensus storage address pointer of the target data is obtained; the node w sends the consensus storage address pointer to an authentication module (20) of the node w, after receiving the consensus storage address pointer, the authentication module (20) of the node w confirms whether a record of the consensus storage address pointer exists in a historical record, if the record of the consensus storage address pointer is not inquired in the historical record, the authentication is regarded as failed, and the data reading request process is terminated; if the authentication is passed, the consensus storage address pointer information is forwarded to the logic storage management module (30), the logic storage management module (30) reads service and transaction information data from all authenticated logic storage modules (40) according to the address pointer, the read data is sent to the authentication module (20), the authentication module (20) performs consensus judgment on the received data, and sends consensus result data to the node w which initiates the request.
CN202010117951.2A 2020-02-26 2020-02-26 Block chain data storage device and rapid storage method thereof Active CN110990413B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010712925.4A CN111858599A (en) 2020-02-26 2020-02-26 Block chain data storage device and rapid storage method thereof
CN202010117951.2A CN110990413B (en) 2020-02-26 2020-02-26 Block chain data storage device and rapid storage method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010117951.2A CN110990413B (en) 2020-02-26 2020-02-26 Block chain data storage device and rapid storage method thereof

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202010712925.4A Division CN111858599A (en) 2020-02-26 2020-02-26 Block chain data storage device and rapid storage method thereof

Publications (2)

Publication Number Publication Date
CN110990413A true CN110990413A (en) 2020-04-10
CN110990413B CN110990413B (en) 2020-08-18

Family

ID=70081415

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202010117951.2A Active CN110990413B (en) 2020-02-26 2020-02-26 Block chain data storage device and rapid storage method thereof
CN202010712925.4A Pending CN111858599A (en) 2020-02-26 2020-02-26 Block chain data storage device and rapid storage method thereof

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN202010712925.4A Pending CN111858599A (en) 2020-02-26 2020-02-26 Block chain data storage device and rapid storage method thereof

Country Status (1)

Country Link
CN (2) CN110990413B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112904734A (en) * 2020-12-23 2021-06-04 上海上实龙创智能科技股份有限公司 Intelligent household appliance control system and method based on Internet of things and block chain double gateways
WO2022222568A1 (en) * 2021-04-23 2022-10-27 华为技术有限公司 Blockchain data management method and apparatus

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108462568A (en) * 2018-02-11 2018-08-28 西安电子科技大学 A kind of secure file storage and sharing method based on block chain
US20190190696A1 (en) * 2017-12-18 2019-06-20 International Business Machines Corporation Protecting sensitive data in a distributed ledger system using blockchain hierarchies
CN110062034A (en) * 2019-04-01 2019-07-26 中科天御(苏州)科技有限公司 A kind of big file safety storage method of block chain and system
CN110365766A (en) * 2019-07-12 2019-10-22 全链通有限公司 Cloud storage method, equipment and computer readable storage medium based on block chain

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190190696A1 (en) * 2017-12-18 2019-06-20 International Business Machines Corporation Protecting sensitive data in a distributed ledger system using blockchain hierarchies
CN108462568A (en) * 2018-02-11 2018-08-28 西安电子科技大学 A kind of secure file storage and sharing method based on block chain
CN110062034A (en) * 2019-04-01 2019-07-26 中科天御(苏州)科技有限公司 A kind of big file safety storage method of block chain and system
CN110365766A (en) * 2019-07-12 2019-10-22 全链通有限公司 Cloud storage method, equipment and computer readable storage medium based on block chain

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112904734A (en) * 2020-12-23 2021-06-04 上海上实龙创智能科技股份有限公司 Intelligent household appliance control system and method based on Internet of things and block chain double gateways
WO2022222568A1 (en) * 2021-04-23 2022-10-27 华为技术有限公司 Blockchain data management method and apparatus

Also Published As

Publication number Publication date
CN111858599A (en) 2020-10-30
CN110990413B (en) 2020-08-18

Similar Documents

Publication Publication Date Title
CN108737375B (en) Block chain consensus method and system
CN108616596B (en) Block chain self-adaptive consensus method based on dynamic authorization and network environment perception
JP7154234B2 (en) Methods and specialized network nodes for fast propagation in blockchain networks
CN110990413B (en) Block chain data storage device and rapid storage method thereof
JP2003228533A (en) Method, video server and video server management controller for transmitting content to a plurality of clients
US10275400B1 (en) Systems and methods for forming a fault-tolerant federated distributed database
US10476701B2 (en) Method for high-security data transmission of blockchain
CN110598060A (en) Block chain rapid consensus method and device, computer equipment and storage medium
CN106130960A (en) Judgement system, load dispatching method and the device of steal-number behavior
CN114726517A (en) Method, system and consensus node for generating random number seeds on block chain
CN108206839A (en) One kind is based on majority's date storage method, apparatus and system
CN112307501A (en) Big data system based on block chain technology, storage method and using method
CN113037824B (en) Cloud computing-oriented high-performance block chain construction method
CN115514608A (en) Block consensus method, device, equipment and storage medium
CN109525645A (en) A kind of method and system for collecting the log of distributed storage cluster
CN110071966B (en) Block chain networking and data processing method based on cloud platform
CN113064553A (en) Data storage method, device, equipment and medium
Ozdayi et al. Instachain: Breaking the sharding limits via adjustable quorums
Liu et al. OverlapShard: Overlap-based sharding mechanism
CN112398934B (en) Trusting broadcasting method based on block chain
Sun et al. A Scalable Sharding Protocol Based on Cross-Shard Dynamic Transaction Confirmation for Alliance Chain in Intelligent Systems
CN114461730A (en) Adaptive block data compression method based on remainder system
CN116846888A (en) Consensus processing method, device, equipment and storage medium of block chain network
CN114140115A (en) Block chain transaction pool fragmentation method, system, storage medium and computer system
CN112104521A (en) Request timeout monitoring 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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220513

Address after: 215000 2a1-a2, phase III, international science and Technology Park, 1355 Jinjihu Avenue, Suzhou Industrial Park, Jiangsu Province

Patentee after: Nanjing Lifeng Intellectual Property Agency (special general partnership) Suzhou Branch

Address before: 318000 room 1215, building 1, peninsula garden, Tengda Road, Lubei street, Luqiao District, Taizhou City, Zhejiang Province

Patentee before: Taizhou Xiangwen Information Technology Co.,Ltd.

Effective date of registration: 20220513

Address after: 311100 Room 303, 3 / F, building 5, No.9 Guifeng Road, Renhe street, Yuhang District, Hangzhou City, Zhejiang Province

Patentee after: Hangzhou dataport Technology Co.,Ltd.

Address before: 215000 2a1-a2, phase III, international science and Technology Park, 1355 Jinjihu Avenue, Suzhou Industrial Park, Jiangsu Province

Patentee before: Nanjing Lifeng Intellectual Property Agency (special general partnership) Suzhou Branch