CN111858599A - 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
CN111858599A
CN111858599A CN202010712925.4A CN202010712925A CN111858599A CN 111858599 A CN111858599 A CN 111858599A CN 202010712925 A CN202010712925 A CN 202010712925A CN 111858599 A CN111858599 A CN 111858599A
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.)
Pending
Application number
CN202010712925.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.)
Taizhou Xiangwen Information Technology Co ltd
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
Publication of CN111858599A publication Critical patent/CN111858599A/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/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)
  • Computing Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software 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 and the rapid storage method thereof comprise that a block is connected with an authentication module, the authentication module is connected with a logic storage management module, and the block chain data storage device also comprises a plurality of logic storage modules, and the logic storage modules are virtualized from each node storage space of a block chain system; 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
The invention relates to a block chain data storage device and a rapid storage method thereof, which are filed as divisional applications of the invention patent with the application number of '2020101179512'.
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;
the service data or transaction data storage address pointer stored in the block comprises: IP address and data address of the logic storage module where the related service data or transaction data of the block are located and data content Hash value of the logic storage module;
the logic storage management module is used for managing the process of generating or eliminating logic storage in the blockchain system node and the data storage process.
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 divides the physical storage of each node into independent physical storage { D }1,D2...,DmBlock-by-block physical storage of the logical storage module 40 at initialization { D }1,D2...,Dm}。
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 the m nodes { N ] in the blockchain system1,N2,...,NmThe corresponding initialization logic is stored as { D }1,D2...,DmThe logical storage management module 30 of each node counts the number of times that the node initiates a storage request in a storage period, whenever a business data or transaction data storage request occurs in the system, the logical storage management modules 30 of all the nodes broadcast the business data or transaction data storage number requested by the node to other logical storage management modules 30 in the blockchain system, and the logical storage management module 30 of the node currently initiating the request is sorted according to the business data or transaction data storage number requested by each node in the storage period from a small number to a large number to obtain a sequence { N'1,N′2...N′mTaking the node before the rank (0 < 1) as a logic storage module { D'1,D′2...D′cWhere c represents the total number of nodes before ranking; logical storage management module 30 of the node currently originating the request will select logical storage module { D'1,D′2...D′cIs broadcast to other logical storage management modules 30 in the system, the blockchain system will { D'1,D′2...D′cA logic storage module 40 as the current node service data for storing service data or 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. 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 N in the blockchain system1,N2,...,NmAccording to step S1, initialize the logic storage module set to { D }1,D2...Dm}; 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 Counti,CountiCounting the times of service data storage requests initiated by a node i in the current storage period, and recording m nodes { N }1,N2,...,NmThe corresponding statistical times are { T }1,T2...TmAnd sequencing the nodes according to ascending order of times to obtain a sequence (N)1′,N2′...N′mGet the top 60% (i.e. ═ 60%) nodes to get the logic storage module { D corresponding to the nodes1′,D2′...Dc', i.e., c is 60% × m (integer upward) or 60% × m (integer downward), c is the total number of nodes 60% before the rank, then { D }1′,D2′...Dc' is the set of logical storage modules participating in storage in the current storage period of the system. After determining the set of logic storage modules currently participating in storage, the counter Count in the logic storage management module 30 of each nodeiAnd 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 preselected storage module set { D) for storing the service or transaction data of the node j1′,D2′...Dc' }, and sends the IP address and the data address of the logic storage module 40 meeting the conditions and the data content Hash value in the logic storage module 40 to the 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 logic storage module 40,the IP address, the data address and the Hash value of the data content of the logical storage module 40 passing the verification are sent 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 logical storage module 40 into the block 10 to become 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 to be stored; 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 saves the business or transaction data to all verified logical storage modules { D }1′,D2′...Dc' in the block chain system, each logic storage module 40 in the c logic storage modules 40 has a 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 pointer of the target service data from the block of the nodes, and then judge the storage address pointer through a consensus mechanism, for example, the invention adopts a 51% principle that n nodes are used for storing the storage address of the target service dataVoting the pointers, and if the target service data storage address pointers in the nodes exceeding 51% multiplied by n are consistent, considering the target service data storage address pointers as final target data storage address pointers, and recording the final target service data storage address pointers as Adr*. Node A will Adr*Sending to the authentication module 20 in the node a, the authentication module 20 first searches from its history whether there is Adr*If there is no Adr*If so, terminating the data reading request; if Adr is confirmed*If the record is authenticated, the authentication module 20 will add*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 (2)

1. A fast storage method of a block chain data storage device is provided, wherein the block chain data storage device comprises:
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), and the logic storage module (40) is virtualized from the storage space of each node of the block chain system;
the quick storage method based on the block chain data storage device comprises the following steps:
s1 initializing the blockchain data storage device and generating a logical storage module (40), the process comprising 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 defines independent physical storage as { D } from the physical storage of each node1,D2...,DmAnd the block of the logic storage module (40) and the physical storage during initialization { D }1,D2...,Dm};
S2, the logic storage management module (30) dynamically manages the logic storage module (40) in the operation process of the blockchain system; in step S2, the logic storage management module (30) performs dynamic management on the logic storage module (40) by using a principle that nodes with heavy traffic participate in less storage and storage space contention is open, and the specific processing procedure includes the following steps:
noting the m nodes { N ] in the blockchain system1,N2,...,NmThe corresponding initialization logic is stored as { D }1,D2,...,DmAnd 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 number of times that the node requests the service data or transaction data storage to other logic storage management modules (30) in the block chain system, and the logic storage management modules (30) of the node currently initiating the request are sorted from small to large according to the number of times that the node requests the service data or transaction data storage in the storage period at this time to obtain a sequence { N'1,N′2,...,N′mTaking the node before the rank (0 < 1) as a logic storage module { D'1,D′2,...,D′cWhere c represents the total number of nodes before ranking; the logical storage management module (30) of the node currently originating the request selects logical storage module { D'1,D′2,...,D′cIs broadcast to other logical storage management modules (30) in the system, the blockchain system will { D'1,D′2,...,D′cA 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;
s3, storing and processing the service data, wherein the processing process comprises the following steps:
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 { D'1,D′2,...,D′cSending 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) 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 the IP address, the data address and the Hash value of the data content of the logical storage module (40) passing the verification are sent 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 logical storage module (40) into the block (10) to be used as a pointer of a business data or transaction data storage address, broadcasting the pointer information of the service data or transaction data storage address to blocks (10) of all nodes in a 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) saves business or transaction data to all the verified logical storage modules { D'1,D′2,...,D′cIn the method, each logic storage module (40) in c logic storage modules (40) in a block chain system is provided with a service data requested to be stored by a node j, so that the storage of the service data is completed for one time;
s4, reading the service data;
the processing procedure of 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, forwarding the consensus storage address pointer information to the logic storage management module (30), wherein the logic storage management module (30) reads service and transaction information data from all authenticated logic storage modules (40) according to the address pointer and sends the read data to the authentication module (20), and 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;
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).
2. The method of claim 1, wherein the logical storage management module (30) is configured to manage a process of generating or eliminating logical storage and a data storage process in the blockchain system node.
CN202010712925.4A 2020-02-26 2020-02-26 Block chain data storage device and rapid storage method thereof Pending CN111858599A (en)

Priority Applications (1)

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

Applications Claiming Priority (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

Related Parent Applications (1)

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

Publications (1)

Publication Number Publication Date
CN111858599A true CN111858599A (en) 2020-10-30

Family

ID=70081415

Family Applications (2)

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
CN202010117951.2A Active CN110990413B (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
CN202010117951.2A Active CN110990413B (en) 2020-02-26 2020-02-26 Block chain data storage device and rapid storage method thereof

Country Status (1)

Country Link
CN (2) CN111858599A (en)

Families Citing this family (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
CN115237997A (en) * 2021-04-23 2022-10-25 华为技术有限公司 Block chain data management method and device

Family Cites Families (4)

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

Also Published As

Publication number Publication date
CN110990413A (en) 2020-04-10
CN110990413B (en) 2020-08-18

Similar Documents

Publication Publication Date Title
US7743208B2 (en) Storage apparatus and area allocation method
CN1093660C (en) System method for efficiently transferring datastreams in multimedia system
CN110990413B (en) Block chain data storage device and rapid storage method thereof
CN101588287B (en) Method, device and system for scheduling and downloading peer-to-peer network data
WO2023040453A1 (en) Transaction information processing method and apparatus
CN115514608A (en) Block consensus method, device, equipment and storage medium
CN113064553B (en) Data storage method, device, equipment and medium
US20020112030A1 (en) Guaranteed data access speed of a storage system
CN108206839A (en) One kind is based on majority&#39;s date storage method, apparatus and system
CN113037824A (en) High-performance block chain architecture method for cloud computing
CN110071966B (en) Block chain networking and data processing method based on cloud platform
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
CN113672161A (en) Storage system and establishing method thereof
CN117376352B (en) Block chain-based Internet of things system
Peng et al. Petrichor: An Efficient Consensus Protocol Leveraging DAG and Sharding for Asynchronous BFT
CN113542439B (en) Distributed data storage access method and device
WO2024066974A1 (en) Blockchain-based data processing method, device, and readable storage medium
CN114244855B (en) Fingerprint file storage method, device, equipment and readable storage medium
CN113596182B (en) Distributed multi-terminal service method and device
RU2794969C1 (en) Method, device and electronic device for task processing
CN113949711B (en) Distributed process data processing method and device
Song et al. Replica striping for multi-resolution video servers
CN116546033A (en) Cross-link service processing method, device, equipment and storage medium based on relay link

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