A fast access and storage solution system and device for data ledger
By setting checkpoints on blockchain nodes and using lightweight nodes for fast access verification, the problems of slow access speed and low storage efficiency caused by blockchain data bloat are solved, and fast access and efficient storage are achieved.
Patent Information
- Application Number
- CN202111501565.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-09
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2041-12-09
Smart Images

Figure CN114185989B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data ledgers, and in particular to a fast access and storage solution system and device for data ledgers. Background Art
[0002] Blockchain is a database with a data "hash verification" function. A block is a data block. Data blocks are combined into a chain structure in chronological order, and cryptographic algorithms are used to collectively maintain the reliability of the database in a distributed accounting manner. All data blocks are connected in chronological order to form a blockchain.
[0003] With the rise of blockchain technology, its application scenarios are constantly enriching and expanding. From transaction transfer to product traceability, a development trend of "everything can be on the chain" has basically been formed. With the continuous growth of on-chain data, the data expansion problem of blockchain has become an inevitable phenomenon. In this context, the data ledger is becoming more and more expanded. New nodes need to be verified by all nodes before they can be added to the blockchain. Based on the increasing expansion of the data ledger, the node access speed becomes slower, that is, the blockchain data ledger cannot be quickly accessed. For this reason, a fast access and storage solution system and device for data ledgers are proposed. By functionally defining the blockchain nodes and setting checkpoints after the credibility reaches a consensus, the new nodes can be verified nearby. While the access speed is improved, the effective storage of the data ledger is guaranteed, thereby alleviating the acute problem of the increasing expansion of the data ledger. Summary of the invention
[0004] In view of the deficiencies in the prior art, the present invention provides a system and device for fast access and storage of data ledgers, which solves the above-mentioned problems.
[0005] To achieve the above-mentioned purpose, the present invention provides the following technical solutions: a fast access and storage solution system for data ledgers, including an access storage platform, wherein the access storage platform includes a node access unit, a synchronization verification unit, a link verification unit and a data storage unit, wherein the node access unit is used to independently verify all transactions, subordinately integrate part of the ledger data, and classify the subordinate part of the ledger data, verify the same type of data, and add it as a subchain, wherein the node access unit is respectively connected to the synchronization verification unit and the link verification unit, wherein the synchronization verification unit is used to synchronize and verify the transaction generation status data online, and perform verification on the transaction generation status data. Storage verification, the synchronization verification unit is connected to the link verification unit and the data storage unit respectively, wherein the link verification unit is used to set checkpoints on the blockchain, select the account status data corresponding to the most recent checkpoint at the member node for recovery, and directly rebuild the account data after the block corresponding to the checkpoint, and classify valid transactions and invalid transactions at the same time. The link verification unit is connected to the data storage unit, wherein the data storage unit is used to store transaction generation status data, to replay transaction generation status data, and to classify and store valid transactions and invalid transaction data, and to delete invalid data at a scheduled time after exceeding the set time.
[0006] By adopting the above technical solution, by dividing the node's belonging type, the fast access and addition of nodes of the same type can be achieved, the blockchain node is functionally defined, and checkpoints are set after the credibility reaches a consensus, so that new nodes can be verified nearby. While the access speed is improved, the effective storage of the data ledger is guaranteed, thereby alleviating the acute problem of the increasingly bloated data ledger.
[0007] The present invention is further configured as follows: the node access unit includes a node summarization module, a lightweight setting module and a fixed link module, the node summarization module is connected to the lightweight setting module, and the lightweight setting module is connected to the fixed link module.
[0008] The present invention is further configured as follows: the node summarization module is used to set the blockchain full node for independently verifying all transactions;
[0009] The lightweight setting module is used to set a lightweight node belonging to a full node, to store part of the ledger data, and to classify the part of the ledger data;
[0010] The fixed link module is used to connect with the corresponding type of lightweight node, and after passing the verification, it is added to the full node to become a blockchain sub-chain.
[0011] By adopting the above technical solution, lightweight nodes are used as full-core nodes to link to transit nodes on full nodes, thereby achieving rapid access to new nodes.
[0012] The present invention is further configured as follows: the synchronization verification unit includes a network synchronization module and a synchronization verification module, and the network synchronization module is connected to the synchronization verification module.
[0013] The present invention is further configured as follows: the network synchronization module is used for synchronously transmitting transaction generation status data over the network;
[0014] The synchronization verification module is used to receive the transaction generation status data synchronized by the network synchronization module, and store and verify the transaction generation status data.
[0015] By adopting the above technical solution, the transaction generation status data is directly transmitted synchronously through the network without replaying the transaction generation status data, which further saves the time required for access verification.
[0016] The present invention is further configured as follows: the link verification unit includes a periodic synchronization module, a checkpoint setting module, an account book reconstruction module and a valid classification module;
[0017] The periodic synchronization module is used to periodically reach consensus on the block ledger data and status data, thereby generating several checkpoints;
[0018] The checkpoint setting module is used to select checkpoints with set intervals from the checkpoints selected on the periodic synchronization module as authorized checkpoints on the blockchain;
[0019] The ledger reconstruction module is used to select the ledger status data corresponding to the most recent checkpoint in the member node for recovery, and directly reconstruct the ledger data after the block corresponding to the checkpoint;
[0020] The valid classification module is used to classify valid transactions and invalid transactions in the blockchain.
[0021] By adopting the above technical solution, after the invalid transactions in the blockchain are screened, valid transactions are obtained. After reaching consensus on the valid transaction data regularly, a large number of checkpoints are generated, and a large number of checkpoints are screened according to the set intervals to ensure the effectiveness of the intervals between checkpoints. While being flexible in use, when a new member node is added to the blockchain, the ledger data after the block corresponding to the checkpoint is directly rebuilt, thereby saving node storage space and accelerating the node chain speed.
[0022] The present invention is further configured as follows: the data storage unit includes a link storage module, a valid storage module and a setting backup deletion module;
[0023] The link storage module is used to store the transaction generation status data and to replay the transaction generation status data;
[0024] The effective storage module is used to classify and store effective transaction data and invalid transaction data;
[0025] The setting backup deletion module is used to regularly delete invalid data after exceeding a set time.
[0026] By adopting the above technical solution, invalid transaction data is stored for a limited time, further ensuring the efficient use of storage space.
[0027] The present invention also discloses a fast access and storage device for data ledgers, including a storage medium, wherein program data is stored in the storage medium, and when the program data is executed by a processor, it is used to implement the above-mentioned fast access and storage solution system for data ledgers.
[0028] The present invention provides a system and device for fast access and storage of data ledgers. It has the following beneficial effects:
[0029] (1) This fast access and storage solution system for data ledgers can quickly access and add nodes of the same type by classifying the node types, functionally define blockchain nodes, and set checkpoints after reaching a consensus on credibility, so that new nodes can be verified nearby. While improving access speed, it ensures the effective storage of data ledgers, thereby alleviating the acute problem of the increasing expansion of data ledgers.
[0030] (2) This fast access and storage solution system for data ledgers uses lightweight nodes as full-core nodes to link to transit nodes on full nodes, thereby achieving rapid access to new nodes.
[0031] (3) This fast access and storage solution system for data ledgers directly transmits transaction-generated status data synchronously over the Internet without replaying transaction-generated status data, further saving the time required for access verification.
[0032] (4) This fast access and storage solution system for data ledgers screens invalid transactions in the blockchain and obtains valid transactions. After reaching consensus on valid transaction data at regular intervals, it generates a large number of checkpoints and screens a large number of checkpoints according to the set interval to ensure the effectiveness of the intervals between checkpoints. While being flexible in use, when a new member node joins the blockchain, it directly reconstructs the ledger data after the block corresponding to the checkpoint, thereby saving node storage space and accelerating the node chain formation speed.
[0033] (5) This fast access and storage solution system for data ledgers further ensures the efficient use of storage space by storing invalid transaction data for a limited time. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 It is the principle block diagram of the system cabinet of the present invention;
[0035] Figure 2 It is a principle block diagram of a system cabinet of a node access unit of the present invention;
[0036] Figure 3 It is a principle block diagram of a system cabinet of a synchronous verification unit of the present invention;
[0037] Figure 4 It is a principle block diagram of a system cabinet of a link verification unit of the present invention;
[0038] Figure 5 This is a principle block diagram of a system cabinet of a data storage unit of the present invention.
[0039] In the figure, 1. Access storage platform; 2. Node access unit; 3. Synchronization verification unit; 4. Link verification unit; 5. Data storage unit; 6. Node summarization module; 7. Lightweight setting module; 8. Fixed link module; 9. Network synchronization module; 10. Synchronization verification module; 11. Periodic synchronization module; 12. Checkpoint setting module; 13. Ledger reconstruction module; 14. Valid classification module; 15. Link storage module; 16. Valid storage module; 17. Setting backup deletion module. DETAILED DESCRIPTION
[0040] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0041] See also Figure 1-5 The embodiment of the present invention provides a technical solution: a fast access and storage solution system for data ledgers, including an access storage platform 1, as shown in the attached Figure 1 As shown, the access storage platform 1 includes a node access unit 2, a synchronization verification unit 3, a link verification unit 4 and a data storage unit 5, wherein the node access unit 2 is used to independently verify all transactions, integrate part of the ledger data, and classify the subordinate part of the ledger data, verify the same type of data, and add it as a sub-chain. For details, as shown in the attached Figure 2 As shown, the node access unit 2 includes a node summarization module 6, a lightweight setting module 7 and a fixed link module 8. The node summarization module 6 is connected to the lightweight setting module 7, and the lightweight setting module 7 is connected to the fixed link module 8. The node summarization module 6 is used to set the full node of the blockchain for independently verifying all transactions.
[0042] The lightweight setting module 7 is used to set a lightweight node belonging to a full node, to store part of the ledger data, and to classify part of the ledger data;
[0043] The fixed link module 8 is used to connect with the corresponding type of lightweight node. After passing the verification, it is added to the full node to become a blockchain sub-chain.
[0044] As a preferred solution, the node access unit 2 is connected to the synchronization verification unit 3 and the link verification unit 4 respectively, wherein the synchronization verification unit 3 is used to synchronize and verify the transaction generation status data online, and store and verify the transaction generation status data. Specifically, as shown in the attached Figure 3 As shown, the synchronization verification unit 3 includes a network synchronization module 9 and a synchronization verification module 10, the network synchronization module 9 is connected to the synchronization verification module 10, and the network synchronization module 9 is used for synchronously transmitting transaction generation status data over the Internet;
[0045] The synchronization verification module 10 is used to receive the transaction generation status data synchronized by the network synchronization module 9, and store and verify the transaction generation status data.
[0046] As a preferred solution, the synchronization verification unit 3 is connected to the link verification unit 4 and the data storage unit 5 respectively, wherein the link verification unit 4 is used to set a checkpoint on the blockchain, select the account state data corresponding to the nearest checkpoint in the member node for recovery, and directly rebuild the account data after the block corresponding to the checkpoint, and classify valid transactions and invalid transactions at the same time. Specifically, as shown in the attached Figure 4 As shown, the link verification unit 4 includes a periodic synchronization module 11, a checkpoint setting module 12, an account reconstruction module 13 and a valid classification module 14;
[0047] The regular synchronization module 11 is used to regularly reach consensus on the block ledger data and status data, thereby generating several checkpoints;
[0048] The checkpoint setting module 12 is used to select checkpoints with set intervals from the checkpoints selected on the periodic synchronization module 11 as authorized checkpoints on the blockchain;
[0049] The ledger reconstruction module 13 is used to select the ledger state data corresponding to the most recent checkpoint in the member node for recovery, and directly reconstruct the ledger data after the block corresponding to the checkpoint;
[0050] The valid classification module 14 is used to classify valid transactions and invalid transactions in the blockchain.
[0051] As a preferred solution, the link verification unit 4 is connected to the data storage unit 5, wherein the data storage unit 5 is used to store the transaction generation status data, to replay the transaction generation status data, and to classify and store the valid transaction and invalid transaction data, and to delete the invalid data regularly after exceeding the set time. Specifically, as shown in the attached Figure 5 As shown, the data storage unit 5 includes a link storage module 15, a valid storage module 16 and a setting backup deletion module 17;
[0052] The link storage module 15 is used to store the transaction generation status data and to replay the transaction generation status data;
[0053] The valid storage module 16 is used to classify and store valid transaction data and invalid transaction data;
[0054] The backup deletion module 17 is configured to perform timed deletion of invalid data after a set time has passed.
[0055] The above-mentioned fast access and storage device for data ledgers includes a storage medium, in which program data is stored. When the program data is executed by a processor, it is used to implement the above-mentioned fast access and storage solution system for data ledgers.
[0056] When working, the node summary module 6 sets the blockchain full node to independently verify all transactions. The lightweight setting module 7 sets the lightweight node belonging to the full node to store part of the ledger data and classify part of the ledger data. When a new node is on the chain, the belonging link module 8 is connected to the lightweight node corresponding to the new node type. After passing the verification, it is added to the full node to become a blockchain subchain. During the process, the network synchronization module 9 is connected to the network to synchronously transmit the transaction generation status data to the synchronization verification module 10, and the transaction generation status data is stored and verified. After the verification is passed, it is added as a subchain. During the data ledger backup process, it is regularly The synchronization module 11 regularly reaches consensus on the block ledger data and status data, thereby generating a number of checkpoints that can be checked. The checkpoint setting module 12 selects checkpoints with set intervals from the checkpoints selected on the regular synchronization module 11 as authorized checkpoints on the blockchain. The member node selects the ledger status data corresponding to the nearest checkpoint through the ledger reconstruction module 13 for recovery, and directly reconstructs the ledger data after the block corresponding to the checkpoint. During the process, the valid transactions and invalid transaction data in the blockchain are classified, and the backup deletion module 17 is set to perform scheduled deletion of invalid data after exceeding the set time.
[0057] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A fast access and storage solution system for data ledgers, comprising an access storage platform (1), characterized in that: The access storage platform (1) comprises a node access unit (2), a synchronization verification unit (3), a link verification unit (4) and a data storage unit (5), wherein the node access unit (2) is used to independently verify all transactions, integrate partial ledger data, classify the subordinate partial ledger data, verify the same type of data, and add it as a subchain. The node access unit (2) is respectively connected to the synchronization verification unit (3) and the link verification unit (4), wherein the synchronization verification unit (3) is used to synchronize and verify transaction generation status data online, and store and verify the transaction generation status data. The synchronization verification unit (3) is respectively connected to the link verification unit (4). The verification unit (4) is connected to the data storage unit (5), wherein the link verification unit (4) is used to set a checkpoint on the blockchain, select the account state data corresponding to the most recent checkpoint at the member node for recovery, directly reconstruct the account data after the block corresponding to the checkpoint, and classify valid transactions and invalid transactions at the same time. The link verification unit (4) is connected to the data storage unit (5), wherein the data storage unit (5) is used to store transaction generation state data, to replay transaction generation state data, and to classify and store valid transaction and invalid transaction data, and to delete invalid data at a scheduled time after exceeding a set time; The link verification unit (4) comprises a periodic synchronization module (11), a checkpoint setting module (12), an account book reconstruction module (13) and a valid classification module (14); The periodic synchronization module (11) is used to periodically reach consensus on the block ledger data and status data, thereby generating a number of checkpoints; The checkpoint setting module (12) is used to select checkpoints with a set interval from the checkpoints selected on the periodic synchronization module (11) as authorized checkpoints on the blockchain; The ledger reconstruction module (13) is used to select the ledger status data corresponding to the most recent checkpoint in the member node for recovery, and directly reconstruct the ledger data after the block corresponding to the checkpoint; The valid classification module (14) is used to classify valid transactions and invalid transactions in the blockchain.
2. A fast access and storage solution system for data ledgers according to claim 1, characterized in that: The node access unit (2) comprises a node summarization module (6), a lightweight setting module (7) and a fixed link module (8); the node summarization module (6) is connected to the lightweight setting module (7), and the lightweight setting module (7) is connected to the fixed link module (8).
3. A fast access and storage solution system for data ledgers according to claim 2, characterized in that: The node summarization module (6) is used to set up a full blockchain node for independently verifying all transactions; The lightweight setting module (7) is used to set a lightweight node belonging to a full node, to store part of the ledger data, and to classify the part of the ledger data; The fixed link module (8) is used to connect with the corresponding type of lightweight node, and after passing the verification, it is added to the full node to become a blockchain sub-chain.
4. The fast access and storage solution system for data ledger according to claim 1, characterized in that: The synchronization verification unit (3) comprises a network synchronization module (9) and a synchronization verification module (10), and the network synchronization module (9) is connected to the synchronization verification module (10).
5. A fast access and storage solution system for data ledgers according to claim 4, characterized in that: The network synchronization module (9) is used for synchronously transmitting transaction generation status data via the network; The synchronization verification module (10) is used to receive the transaction generation status data synchronized by the network synchronization module (9), and to store and verify the transaction generation status data.
6. A fast access and storage solution system for data ledgers according to claim 1, characterized in that: The data storage unit (5) comprises a link storage module (15), a valid storage module (16) and a setting backup deletion module (17); The link storage module (15) is used to store the transaction generation status data and to replay the transaction generation status data; The valid storage module (16) is used to classify and store valid transaction data and invalid transaction data; The set backup deletion module (17) is used to regularly delete invalid data after a set time has passed.
7. A fast access and storage device for a data ledger, comprising a storage medium, characterized in that: The storage medium stores program data, and when the program data is executed by the processor, it is used to implement the fast access and storage solution system for data ledgers as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Data partition storage and query method and system based on block chain
CN109271805A
Block chain account book storage system, storage query method and deletion method
CN110399373A
