Blockchain data structure, ledger data structure, management method and device
By adopting the hierarchical structure of the partitioned ledger and the main ledger in the blockchain ledger, the partition isolation and privacy protection of transaction data are realized, the problem of privacy leakage of transaction data in the existing technology is solved, and the privacy and security of the ledger are ensured. .
Patent Information
- Application Number
- CN202011589302.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-28
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2040-12-28
AI Technical Summary
The existing blockchain ledger data structure lacks privacy protection for transaction data due to its openness, resulting in the risk of privacy leakage for traders.
Adopting the hierarchical structure of the partitioned ledger and the main ledger, the business characteristics transaction data is recorded through the partitioned ledger, and the hash value and access permission data of the partitioned ledger are recorded in the main ledger to achieve partition isolation and privacy protection of transaction data.
It effectively realizes the privacy protection of transaction data at the ledger level, avoids the leakage of transaction data, and ensures the privacy of nodes.
Smart Images

Figure CN112581136B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain transaction technology, and in particular to a blockchain ledger data structure, a ledger management method and a device. Background Art
[0002] Blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism and encryption algorithm. It is a tamper-proof, shared digital ledger used to record transactions in public or private peer-to-peer networks.
[0003] The existing blockchain ledger data structure adopts a linked list structure. The ledger is distributed to all member nodes in the network. In the sequential chain of blocks linked by a hash cryptographic algorithm, the historical records of asset transactions between peer nodes in the network are permanently recorded; its sequential chain is a linked list structure composed of blocks connected in series through hash (also called hash). Each block consists of two parts: a block header and a block body. The block header is the hash value of the parent block, and the block body contains a list of all transactions in the current block (i.e., account page information).
[0004] This linked list ledger data structure of the blockchain lacks effective privacy protection for transactions because the global ledger that records transaction data is public on the network. Any attacker can obtain all transaction information, which puts the trader's privacy at risk of being leaked.
[0005] In view of this, the present disclosure is proposed. Summary of the invention
[0006] The disclosed embodiments provide a block data structure, an account book data structure, a management method, an apparatus and a device of a blockchain, which can effectively protect the privacy of transactions at the account book level.
[0007] In a first aspect, the present disclosure provides a block data structure of a blockchain, including
[0008] Partitioned ledger, used to record transaction page data corresponding to business characteristics;
[0009] The main ledger is used to record the hash value of each partition ledger and the access permission data of the partition ledger;
[0010] There is a hierarchical structure with branch relationships between the partition ledger and the main ledger, and the partition ledger is a child of the main ledger.
[0011] In some embodiments, the master ledger is also used to generate block header data of a block, where the block is a linked list block in a blockchain ledger; the block header data is used to record the hash value of the parent block master ledger and the parent block header.
[0012] In some embodiments, the master ledger is also provided with a lifecycle management mechanism for partitioned ledgers;
[0013] The lifecycle management mechanism is used to record the status of each partition ledger, and control the corresponding partition ledger to generate page data normally, suspend page data generation, and / or terminate page data generation according to the status of the partition ledger.
[0014] In some embodiments, the state of a partitioned ledger includes
[0015] Normal state: indicates the state in which page data can be generated normally;
[0016] Pause state: indicates the state of pausing the generation of page data;
[0017] Termination status: indicates the status of terminating the generation of page data.
[0018] In a second aspect, the embodiments of the present disclosure provide a blockchain ledger data structure, which is a linked list structure. The linked list structure includes blocks, and the blocks include a block header and a block body. The block body includes:
[0019] Partitioned ledger, used to record transaction page data corresponding to business characteristics;
[0020] The main ledger is used to record the hash value of each partition ledger and the access permission data of the partition ledger;
[0021] There is a hierarchical structure with branch relationships between the partition ledger and the main ledger, and the partition ledger is a child of the main ledger;
[0022] The block header is used to record the hash value of the parent block header and the parent block main ledger.
[0023] In some embodiments, the master ledger is also provided with a lifecycle management mechanism for partitioned ledgers;
[0024] The lifecycle management mechanism is used to record the status of each partition ledger, and control the corresponding partition ledger to generate page data normally, suspend page data generation, and / or terminate page data generation according to the status of the partition ledger.
[0025] In a third aspect, the present disclosure further provides a method for managing a blockchain ledger, the method comprising the steps of:
[0026] Record the hash value of the current transaction page data in the partitioned ledger to the main ledger; the partitioned ledger is used to record the transaction page data corresponding to the business characteristics;
[0027] The main ledger and each current partition ledger as its child generate the block body of the block in a hierarchical structure with a branch relationship; the block header of the block records the hash value of the parent block header and the parent block main ledger;
[0028] The blocks that pass the consensus are written into the blockchain ledger.
[0029] In some embodiments, the method further comprises
[0030] Broadcast the main ledger data of the block to read-only nodes;
[0031] Get the partition ledger synchronization request of the read-only node; the partition ledger synchronization request is initiated by the read-only node after receiving the main ledger data, based on the partition ledger access permission data of the read-only node recorded in the main ledger.
[0032] In some embodiments, before obtaining the hash value of the current transaction page data in the partitioned ledger and recording it in the main ledger, the method further includes:
[0033] Get the transaction data and put it into the transaction pool of the corresponding partition according to the partition number of the transaction data; the partition is the data storage area divided according to the business characteristics of the transaction, and the partition number is the unique identifier of the corresponding partition.
[0034] In some embodiments, after obtaining the partition ledger synchronization request of the read-only node, the management method further includes:
[0035] Get the partition ledger synchronization request of the read-only node and obtain the node private key signature in the partition ledger synchronization request;
[0036] From the block's main ledger, obtain a list of public keys with access rights to the corresponding partition ledgers;
[0037] Use the public key list to decrypt and verify the node private key signature;
[0038] For read-only nodes that have passed decryption verification, the page data of the corresponding partition ledger is sent.
[0039] In some embodiments, after sending the page data of the corresponding partitioned ledger to the read-only node that has passed the decryption verification, the management method further includes:
[0040] Read-only nodes receive page data from partitioned ledgers;
[0041] The read-only node processes the received page data and obtains the page hash value of the corresponding partition;
[0042] Compare the page hash value generated by the read-only node with the page data hash value corresponding to the block main ledger received through broadcast;
[0043] When the comparison results are consistent, the read-only node writes the page data of the received partition ledger into the node ledger.
[0044] In some embodiments, the method further comprises:
[0045] A lifecycle management mechanism for partitioned ledgers is set in the master ledger; the lifecycle management mechanism is used to record the status of each partitioned ledger, and control the corresponding partitioned ledger to generate page data normally, suspend page data generation, and / or terminate page data generation according to the status of the partitioned ledger.
[0046] In some embodiments, the state of the child partition ledger includes
[0047] Normal state: indicates the state in which page data can be generated normally;
[0048] Pause state: indicates the state of pausing the generation of page data;
[0049] Termination status: indicates the status of terminating the generation of page data.
[0050] In some embodiments, the method further comprises:
[0051] Get the transaction data containing the state of the target partition ledger and send it to the main ledger;
[0052] According to the transaction data of the target partition ledger status, set the corresponding partition ledger status in the main ledger;
[0053] Remove the partition ledger data that is set to the terminated state.
[0054] In some embodiments, after removing the partition ledger data set to the terminated state, the method further includes:
[0055] Archive the removed partition ledger data.
[0056] In a fourth aspect, the present disclosure also provides a blockchain ledger management device, the device comprising:
[0057] Data acquisition module: used to record the hash value of the current transaction page data in the partitioned ledger to the main ledger; the partitioned ledger is used to record the transaction page data corresponding to the business characteristics;
[0058] Block generation module: used to generate the block body of the block by combining the main ledger and each current partition ledger as its child with a hierarchical structure with a branch relationship; the block header of the block records the hash value of the parent block header and the parent block main ledger;
[0059] Block processing module: used to write the blocks that pass the consensus into the blockchain ledger.
[0060] In some embodiments, the device further comprises
[0061] Data broadcast module, used to broadcast the main ledger data of the block to read-only nodes;
[0062] Information receiving module: used to obtain the partition ledger synchronization request of the read-only node; the partition ledger synchronization request is initiated by the read-only node after receiving the main ledger data, based on the partition ledger access permission data of the main ledger to the read-only node.
[0063] In some embodiments, the apparatus further comprises a data processing module, the module being configured to:
[0064] Obtain transaction data and put it into the transaction pool of the corresponding partition according to the partition number of the transaction data; the partition is the data storage area divided according to the business characteristics of the transaction, and the partition number is the unique identifier of the corresponding partition.
[0065] In some embodiments, the device further comprises a permission verification module, which is used to:
[0066] Get the partition ledger synchronization request of the read-only node and obtain the node private key signature in the partition ledger synchronization request;
[0067] Get the list of public keys with access rights to the corresponding partitioned ledgers stored in the block master ledger;
[0068] Use the public key list to decrypt and verify the node private key signature;
[0069] For the read-only nodes that have passed the verification, the page data of the corresponding partition ledger is sent.
[0070] In some embodiments, the apparatus further comprises:
[0071] A lifecycle management mechanism for partitioned ledgers is set in the master ledger; the lifecycle management mechanism is used to record the status of each partitioned ledger, and control the corresponding partitioned ledger to generate page data normally, suspend page data generation, and / or terminate page data generation according to the status of the partitioned ledger.
[0072] In some embodiments, the device further includes a data clipping module, the module being configured to:
[0073] Get the transaction data containing the state of the target partition ledger and send it to the main ledger;
[0074] According to the transaction data of the target partition ledger status, set the corresponding partition ledger status in the main ledger;
[0075] Remove the partition ledger data that is set to the terminated state.
[0076] In a fifth aspect, an embodiment of the present disclosure further provides a blockchain ledger management device, the device comprising: a processor, and a memory storing computer program instructions; the processor reads and executes the computer program instructions to implement the blockchain ledger management method in any of the above embodiments.
[0077] In a sixth aspect, the present disclosure further provides a computer storage medium having computer program instructions stored thereon, which, when executed by a processor, implements the method for managing a blockchain ledger in any of the above-mentioned embodiments.
[0078] The block data structure, ledger data structure, management method and device of the blockchain of the disclosed embodiment, by setting up a partitioned ledger and a main ledger, writes transactions on the blockchain into different partitioned ledgers according to different business characteristics, and facilitates the authorization management of transaction data through partitioned isolation of data, and can perform privacy protection through different zones at the ledger level. BRIEF DESCRIPTION OF THE DRAWINGS
[0079] In order to more clearly illustrate the technical solution of the embodiment of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiment of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0080] Figure 1 It is a structural diagram of a block data structure of a blockchain provided by an embodiment of the present disclosure;
[0081] Figure 2 yes Figure 1 A schematic diagram of the structure of the block data structure of the blockchain in a specific embodiment;
[0082] Figure 3 yes Figure 2 A schematic diagram of a block data structure generating a block;
[0083] Figure 4 It is a structural diagram of a blockchain ledger data structure provided by an embodiment of the present disclosure;
[0084] Figure 5 It is a flowchart of a method for managing a blockchain account book provided by an embodiment of the present disclosure;
[0085] Figure 6 It is a flowchart of a method for managing a blockchain account book provided by a specific embodiment of the present disclosure;
[0086] Figure 7 It is a flowchart of a method for managing a blockchain account book provided by another specific embodiment of the present disclosure;
[0087] Figure 8 It is a structural diagram of a blockchain ledger management device provided by an embodiment of the present disclosure;
[0088] Fig. 9 It is a structural schematic diagram of a blockchain ledger management device provided by another specific embodiment of the present disclosure;
[0089] Fig.10 It is a structural diagram of a blockchain ledger management device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0090] The features and exemplary embodiments of various aspects of the present disclosure will be described in detail below. In order to make the purpose, technical solutions and advantages of the present disclosure clearer, the present disclosure will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present disclosure, rather than to limit the present disclosure. For those skilled in the art, the present disclosure can be implemented without the need for some of these specific details. The following description of the embodiments is only intended to provide a better understanding of the present disclosure by illustrating examples of the present disclosure.
[0091] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "includes..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0092] Blockchain is a decentralized distributed ledger system that can be used to register and issue digital assets, property certificates, points, etc., and to transfer and pay in a point-to-point manner. Consensus nodes (also called "accounting nodes") are the main bodies of blockchain transaction processing and ledger maintenance, and are mainly responsible for participating in the consensus process and reading and writing operations on the ledger. Consensus nodes broadcast the blocks (referred to as "blocks") generated by the transaction to all other consensus nodes for consensus, and write the consensus blocks into the linked list blockchain ledger. In this way, the data on the blockchain is stored in all nodes, achieving the advantages of global sharing and non-tamperability. However, because all transactions are shared and synchronized on one ledger, there is a hidden danger of transaction data privacy leakage.
[0093] In order to solve the problems of the prior art, the embodiments of the present disclosure provide a block data structure of a blockchain, a blockchain ledger data structure, and a ledger management method, device, equipment, and computer storage medium to achieve effective privacy protection for transactions at the ledger level.
[0094] The following first introduces the block data structure of the blockchain provided by the embodiment of the present disclosure.
[0095] Figure 1The block data structure diagram of the blockchain provided by one embodiment of the present disclosure is shown. Figure 1 As shown, the data structure may include:
[0096] Partition ledger 110, used to record transaction page data corresponding to business characteristics;
[0097] The main ledger 120 is used to record the hash value of each partition ledger and the access permission data of the partition ledger;
[0098] There is a hierarchical structure with a branching relationship between the partition ledger 110 and the main ledger 120 , and the partition ledger 110 is a child of the main ledger 120 .
[0099] Business characteristics can be set according to the business type or nature involved in the transaction. For example, transactions of ticket type can be divided into "movie tickets", "attraction tickets", "train tickets" and the like according to their nature. Therefore, in this embodiment, from the data structure of the block, according to the different business characteristics involved in the transaction, the partition ledger is divided, so that the transactions on the blockchain are written into different partition ledgers according to different business characteristics. The partition ledger only records the transaction page data of the corresponding business characteristics, which is conducive to isolation between different partitions through access rights management means, and privacy protection can be performed through different zones at the ledger level.
[0100] The main ledger 120 and each partition ledger 110 may be a hierarchical structure with a branching relationship. The partition ledger 110 is a child of the main ledger 120, and forms a tree structure with a two-layer data structure with the main ledger 120; thus, each partition ledger 110 records the page data of all transactions in the partition, while the main ledger 120 records the hash value of each partition ledger 110 and the permission data for accessing each partition ledger. For example, Figure 2 As shown, for partition 1, partition 2 and partition 3, there are corresponding partition ledgers 211, partition ledgers 212 and partition ledgers 213; the main ledger 220 divides the recording area of each partition, marks the number and description information; then receives the latest hash value of each partition ledger for recording, and records the access permission list of each partition ledger (that is, the above-mentioned permission data).
[0101] In this way, when a block is generated and written into the blockchain ledger through consensus, at the ledger level, only the hash values of each partition ledger can be seen in the surface main ledger. If the node needs to synchronize the page data in the block, it needs to verify the permission data of each partition ledger recorded on the main ledger to verify that the node initiating the request has the authority to access and obtain the partition ledger page data requested by the node; then privacy protection is achieved through different zones at the ledger level.
[0102] Exemplarily, the permission data of the master ledger can be a node public key list, which records the access rights of the corresponding nodes. When a node that needs to synchronize data initiates a request, the node private key signature in the request is verified through the node public key list to verify the permission and ensure the privacy and security of partitioned ledger data synchronization.
[0103] And, in some embodiments, as Figure 3 As shown, each partition ledger 310 and the main ledger 320 are recorded in the block body 330 of the block 300. The main ledger 320 is also used to generate the block header data 340 of the block 300 in the blockchain ledger list; the block header data 340 records the hash value of the parent block main ledger and the parent block header.
[0104] When a block is written into the blockchain account book after consensus, the block body records a tree-shaped two-layer account book structure, and the block header position records the main account book of the previous block and the block header hash value of the previous block. Therefore, compared with the traditional blockchain account book, after the block data of this embodiment is written into the blockchain, the consistency of the entire blockchain account book can still be verified by verifying the last block; and compared with the data structure of the traditional blockchain account book that records the entire block page data in the block body and the hash value of the previous block in the block header, the block data structure in the disclosed embodiment can also protect the user's transaction data privacy to a large extent.
[0105] In some other embodiments, the master ledger is further provided with a lifecycle management mechanism for the partitioned ledger; the lifecycle management mechanism is used to record the status of each sub-level partitioned ledger, the partitioned ledger status is the status of the transaction partition, and the status of the sub-level partitioned ledger includes:
[0106] Normal state: indicates the state in which page data can be generated normally;
[0107] Pause state: indicates the state of pausing the generation of page data, which can be restored to the normal state again;
[0108] Termination state: indicates the state of terminating the generation of page data. This state cannot be restored to the normal state or the paused state.
[0109] The node can control the corresponding partition ledger to generate page data normally, suspend page data generation, and / or terminate page data generation according to the status of the sub-partition ledger recorded in the main ledger.
[0110] Among them, for a partitioned ledger in a terminated state, even if transaction data with corresponding business characteristics is subsequently submitted to the consensus node, no new page data will be generated in the partitioned ledger; these transaction data can also be processed by opening another partitioned ledger.
[0111] The state setting of the partitioned ledger can adapt to different transaction data situations. For example, if the transaction data is normal, the state of the partitioned ledger is normal. If the blockchain operator finds suspected abnormal or illegal transaction data, it can suspend the partitioned ledger from processing transactions and generating page data. If the doubt is resolved, the suspended state can be changed to normal state. If the doubt is confirmed, the suspended state is changed to terminated state, and the partitioned ledger is completely stopped from processing transactions and generating page data. In this way, when a transaction abnormality occurs in a partition during the blockchain transaction processing and maintenance process, the stability and normal operation of other partitions of the blockchain ledger can be guaranteed.
[0112] Figure 4 A schematic diagram of the structure of a blockchain ledger data structure provided by an embodiment of the present disclosure is shown. Figure 4 As shown, the blockchain ledger data structure is a linked list structure, which includes blocks. The blocks include a block header and a block body. The block body includes:
[0113] Partition ledger 410, used to record transaction page data corresponding to business characteristics;
[0114] The main ledger 420 is used to record the hash value of each partition ledger and the access permission data of the partition ledger;
[0115] There is a hierarchical structure with a branch relationship between the partition ledger 410 and the main ledger 420, and the partition ledger 410 is a child of the main ledger 420;
[0116] The block header 440 of block 400 in the linked list structure records the hash value of the parent block header and the parent block main ledger.
[0117] In the blockchain ledger data structure, the block body 430 of the block 400 forming the linked list has Figure 1 The block data structure shown in the figure records the block header of the previous block (i.e., the parent block) and the hash value of its main ledger in the block header part of block 400 (except for the first block on the chain, i.e., the genesis block). In this way, each block is connected to its parent block to form a blockchain ledger. From the ledger level, the privacy of transaction data is protected through partition management.
[0118] In some other embodiments, as a further improvement, the master ledger is also provided with a lifecycle management mechanism for the partitioned ledger, see Figure 2 As shown in the figure, the lifecycle management mechanism is used to record the status of each sub-partition ledger. The partition ledger status is the status of the transaction partition. The status of the sub-partition ledger includes:
[0119] Pause state: indicates the state of pausing the generation of page data, which can be restored to the normal state again;
[0120] Termination state: indicates the state of terminating the generation of page data. This state cannot be restored to the normal state or the paused state.
[0121] The node can control the corresponding partition ledger to generate page data normally, suspend page data generation, and / or terminate page data generation according to the status of the sub-partition ledger recorded in the main ledger.
[0122] Among them, for a partitioned ledger in a terminated state, even if transaction data with corresponding business characteristics is subsequently submitted to the consensus node, no new page data will be generated in the partitioned ledger; these transaction data can also be processed by opening another partitioned ledger.
[0123] In traditional blockchain ledgers, each child block in the linked list structure records the hash value of all transaction lists of the parent block. Therefore, once a transaction in the ledger has a problem, the transaction cannot be cut out of the ledger, because any change in the data of any intermediate block will change the hash data of all subsequent blocks. However, if the abnormal data is not cut out, the subsequent blocks on the chain will also retain the wrong data. Therefore, in this case, the entire ledger can only be abandoned, which will affect other transactions on the blockchain.
[0124] During the operation of the blockchain ledger data structure in this embodiment, when the page data recorded in the partition ledger in a block on the blockchain is abnormal or judged to be illegal data, the state of the partition ledger can be set to the termination state through the life cycle management of the partition ledger, so that even if the transaction data of the business feature is submitted to the consensus node in the future, no new page data will be generated in the partition ledger of the corresponding transaction. However, for the blocks that have been written into the blockchain ledger, there will be abnormal blocks or blocks that are judged to be illegal data, as well as the blocks after the block on the chain, the corresponding partition ledgers in the block bodies of these blocks can be pruned. After the partition ledger data is pruned, because the main ledger of the pruned block has not changed, the data recorded in the main ledgers of the subsequent blocks will not change, thereby ensuring the normal operation of other partitions in the blockchain ledger.
[0125] Figure 5 The following is a flow chart of a method for managing a blockchain ledger provided by an embodiment of the present disclosure. Figure 5 As shown, the management method of the blockchain ledger includes the following steps:
[0126] S501. Obtain the hash value of the current transaction page data in the partitioned ledger and record it in the main ledger; the partitioned ledger is used to record the transaction page data corresponding to the business characteristics;
[0127] S502. The main ledger and each of the currently described partitioned ledgers as its children generate a block body of the block in a hierarchical structure with a branching relationship; the block header records the hash value of the parent block header and the parent block main ledger;
[0128] S502. Write the block that has passed the consensus into the ledger of the blockchain.
[0129] The blockchain ledger management method provided in this embodiment constructs a blockchain ledger data structure with partitioning characteristics, performs data writing and maintenance operations on the ledger, and then protects the privacy of transaction data from the ledger level.
[0130] Specifically, in this embodiment, the partitioned ledger is used to record the transaction page data corresponding to the business characteristics, and the hash value of the transaction data page is submitted to the main ledger, which is recorded by the main ledger.
[0131] The main ledger and each current partition ledger as its child generate the block body of the block in a hierarchical structure with a branching relationship; then the block that passes the consensus is written into the ledger of the blockchain. In this way, in the ledger of the entire blockchain, since the main ledger level records the hash value of each relevant data instead of plain text data, it is conducive to protecting the privacy of transaction data from the ledger level.
[0132] For example, Figure 6 The following is a flow chart of a method for managing a ledger of a blockchain provided by an embodiment of the present disclosure in a specific embodiment. The management method includes:
[0133] Step S601. Acquire transaction data and put it into the transaction pool of the corresponding partition according to the partition number of the transaction data; the partition is a data storage area divided according to the business characteristics of the transaction, and the partition number is the unique identifier of the corresponding partition.
[0134] The business characteristics of a transaction can be set according to the type or nature of the business involved in the transaction. For example, transactions of the ticket type can be divided into "movie tickets", "attraction tickets", "train tickets" and so on according to their nature.
[0135] The storage of blockchain data is based on the node local file system. After the data is stored in the physical storage area of the file system, it is processed by assigning different processes. In this embodiment, the node stores the transaction data in the local database. Different partitions have their own independent local databases, and the partition number is set as the unique identifier of the local database;
[0136] In this step, when the on-chain consensus node receives a transaction to be sent to the chain, it is placed in the transaction pool of the corresponding partition according to the partition number contained in the transaction data.
[0137] Step S602: Package the transaction data in all current partition transaction pools into candidate blocks and broadcast them to all consensus nodes of the blockchain.
[0138] The consensus node that obtains the transaction data on the chain packages the transaction data of each partition transaction pool into candidate blocks. The transaction data of each business type in the candidate block is still marked to the corresponding partition to facilitate the consensus node that receives the candidate block to process.
[0139] Step S603: Obtain the hash value of the current transaction page data in the partitioned ledger and record it in the main ledger; the main ledger and each current partitioned ledger as its child have a hierarchical structure with a branching relationship to generate a block.
[0140] During the consensus process, each consensus node concurrently executes transaction data corresponding to different partitions in the candidate block through different processing processes to improve the overall performance of the blockchain.
[0141] The processing process of each partition will eventually obtain the page data of the corresponding partition, record the page data in the corresponding partition ledger, and then submit the page hash value of each partition page data to the main ledger process, and finally complete the generation of a new block.
[0142] The data structure of this new block has the same Figure 1 The structure is the same as the block data structure shown in the figure; in the generated new block, the main ledger is used as the root data, and each partition ledger is used as a leaf node to form a two-layer tree data structure with the main ledger to generate the block body data of the new block. The block header of the new block records the result of the hash operation on the block header of the previous block and the main ledger; the partition ledger records the transaction page data corresponding to the business characteristics, and each partition ledger submits the page hash value of the current page data to the main ledger. The data recorded in the main ledger includes an ordered set of the hash values of each partition ledger page; in this way, when a new block is calculated by the consensus node, it can be written to the end of the blockchain ledger, but at the ledger level, the hash values of each partition ledger can only be obtained from the surface main ledger.
[0143] In addition, the main ledger also has an area to record the access permission data of each partition ledger. If a node needs to synchronize page data in a block, it needs to verify the permission data of each partition ledger recorded on the main ledger to verify that the node initiating the request has the authority to access and obtain the partition ledger page data requested by the node. This then implements privacy protection through different partitions at the ledger level.
[0144] The access permission data can be a node public key list. When a node that needs to synchronize data initiates a request, the node private key signature in the request is verified through the node public key list to verify the permission and ensure the privacy and security of partition ledger data synchronization.
[0145] Step S604: Write the block that has passed the consensus into the ledger of the blockchain.
[0146] Based on the consensus mechanism of blockchain, the blocks that are voted by consensus nodes can be written into the ledger of blockchain, which can be Figure 3 The structure is the same as the linked list structure shown in the figure; in the block header part of the block (except the first block on the chain), the block header of the previous block (i.e., the parent block) and the hash value of its main ledger are recorded, so that each block is connected to its parent block, thus forming a blockchain ledger, which can protect the privacy of transaction data through partition management at the ledger level.
[0147] Step S605: Broadcast the main ledger data of the block to the read-only nodes.
[0148] The consensus node writes the consensus block to the locally stored blockchain ledger, while the read-only nodes that do not participate in the consensus need to request data synchronization from the consensus node; therefore, the consensus node broadcasts the main ledger data in the new consensus block to the read-only nodes.
[0149] Step S606: Obtain the partition ledger synchronization request of the read-only node.
[0150] The partitioned ledger synchronization request is initiated by the read-only node after receiving the master ledger data. When the read-only node receives the master ledger data of the new block, it determines that the block to which the master ledger data belongs is a new block, and submits a data synchronization application for the partitioned page with permissions to the consensus node. For example, for the new block "101" that has reached consensus, the current read-only node has the permission to synchronize the partitioned ledger "101A" therein, so it initiates a corresponding partitioned ledger synchronization request for the new block to the consensus node, requesting to obtain the partitioned page data.
[0151] Step S607. Obtain the node private key signature in the partition ledger synchronization request of the read-only node;
[0152] Step S608. Obtain a list of public keys with access rights to corresponding partition ledgers stored in the current block master ledger;
[0153] Step S609: Use the public key list to verify the node private key signature.
[0154] After receiving the partition ledger synchronization request from the read-only node, the consensus node verifies whether the node signature of the application has the permission for the partition. If so, the page data of the partition is sent to the read-only node. If not, the request is rejected.
[0155] The request initiated by the read-only node contains the request information of the target data and the private key signature. The consensus node obtains the public key list stored in the main ledger, and verifies the private key signature of the node through the corresponding public key. If the verification is successful, the read-only node has synchronization authority. If the verification fails, the request of the read-only node can be rejected. In this way, the read-only node can only obtain the corresponding partition data according to the authority, but cannot obtain other data outside the authority, which is conducive to protecting the privacy of the ledger.
[0156] Step S610. The consensus node sends the page data of the corresponding partitioned ledger to the verified read-only node.
[0157] Step S611. The read-only node receives the page data of the partitioned ledger;
[0158] Step S612: The read-only node processes the received page data to obtain a page hash value of the corresponding partition;
[0159] Step S613. Compare the page hash value generated by the read-only node with the page data hash value corresponding to the current block master ledger received through broadcast;
[0160] Step S614: When the comparison results are consistent, the read-only node writes the received page data of the partitioned ledger into the node ledger.
[0161] After the read-only node obtains the requested page data, it processes it through the process of the corresponding partition, generates a hash value of the partition page data, and compares it with the page hash value recorded on the main ledger previously received. If the comparison result is consistent, the obtained page data is written to the local ledger; if it is inconsistent, the write is rejected.
[0162] In other embodiments, Figure 7 As shown, before recording the hash value of the current transaction page data in the partitioned ledger to the main ledger, the ledger management method of the blockchain disclosed in the present invention further includes:
[0163] Step S701: Set up a lifecycle management mechanism for partitioned ledgers in the master ledger.
[0164] The lifecycle management mechanism is used to record the status of each sub-partition ledger. The partition ledger status is the status of the transaction partition. The status of the sub-partition ledger can include
[0165] Normal state: indicates the state in which page data can be generated normally;
[0166] Pause state: indicates the state of pausing the generation of page data, which can be restored to the normal state again;
[0167] Termination state: indicates the state of terminating the generation of page data. This state cannot be restored to the normal state or the paused state.
[0168] Step S702: Control the corresponding partition ledger to generate page data normally, suspend generating page data, and / or terminate generating page data according to the state of the child partition ledger.
[0169] For a partitioned ledger in a terminated state, even if transaction data with corresponding business characteristics is subsequently submitted to the consensus node, no new page data will be generated in the partitioned ledger; these transaction data can also be processed by opening another partitioned ledger.
[0170] The status setting of the partitioned ledger can adapt to different transaction data situations. For example, if the transaction data is normal, the status of the partitioned ledger is normal. If the blockchain operator finds suspected abnormal or illegal transaction data, it can suspend the partitioned ledger from processing transactions and generating page data. If the doubt is resolved, the suspended status can be changed to normal status. If the doubt is confirmed, the suspended status will be changed to terminated status, completely stopping the partitioned ledger from processing transactions and generating page data.
[0171] Step S703. Obtain transaction data about the state of the target partition ledger and send it to the main ledger;
[0172] Step S704: According to the transaction data of the target partition ledger state, set the corresponding partition ledger state in the main ledger.
[0173] When the operator finds that the data of a partitioned ledger in a block or subsequent blocks after being uploaded to the chain is suspected to be abnormal or abnormal, a transaction is submitted to the consensus node on the chain to enable each node to modify the status of the corresponding partitioned ledger to a suspended state or a terminated state; when a new block is generated, the partitioned ledger in a suspended or terminated state has no page data and the hash value does not need to be submitted to the main ledger.
[0174] Step S705: Remove the partition ledger data set to the terminated state.
[0175] For the block with the problem and subsequent blocks, or all blocks on the chain that contain the partitioned ledger, the partitioned ledger data corresponding to the termination state will be removed from the node where it is located, archived, and placed in the archiving device that executes the query. When the block of the partitioned ledger is removed, the main ledger data remains unchanged, but the removed partitioned ledger data cannot be viewed in the blockchain.
[0176] In the linked list of the traditional blockchain ledger, each child block records the hash value of all transaction lists of the parent block. Therefore, once a transaction in the ledger has a problem, the transaction cannot be cut out of the ledger, because any change in the data of any intermediate block will change the hash data of all subsequent blocks. However, if the abnormal data is not cut out, the subsequent blocks on the chain will also retain the wrong data. Therefore, in this case, the entire ledger can only be abandoned, which will affect other transactions on the blockchain.
[0177] In this embodiment, through the life cycle management of the partitioned ledger, separate partitioned transaction data management can be performed, and the partitioned data with problems can be cut from the blockchain ledger without affecting the normal operation of other partitioned data and the blockchain ledger. In this way, during the blockchain transaction processing and maintenance process, when a transaction abnormality occurs in a partition, the stability and normal operation of other partitions of the blockchain ledger can be guaranteed.
[0178] Figure 8 The present disclosure also provides a blockchain ledger management device, the device comprising:
[0179] Data acquisition module 801: used to obtain the hash value of the current transaction page data in the partitioned ledger, and record it in the main ledger; wherein the partitioned ledger is used to record the transaction page data corresponding to the business characteristics;
[0180] Block generation module 802: used to generate the block body of the block by combining the main ledger and each current partition ledger as its child in a hierarchical structure with a branch relationship; the block header records the hash value of the parent block header and the parent block main ledger;
[0181] Block processing module 803: used to write the block that passes the consensus into the ledger of the blockchain.
[0182] like Fig. 9 The management device of the ledger of the blockchain also includes a data processing module 901, which is used to:
[0183] The transaction data is obtained and placed into the transaction pool of the corresponding partition according to the partition number of the transaction data; the partition is a data storage area divided according to the business characteristics of the transaction, and the partition number is a unique identifier of the corresponding partition.
[0184] The business characteristics of the transaction can be set according to the business type or nature involved in the transaction; the storage of blockchain data is based on the node local file system, and the data is stored in the physical storage area of the file system and processed by assigning different processes. In this embodiment, the node stores the transaction data in the local database, and different partitions have their own independent local databases, and the partition number is used as the unique identifier of the local database.
[0185] The data processing module 901 is also used to package the transaction data in all current partition transaction pools into candidate blocks and broadcast them to all consensus nodes of the blockchain for consensus.
[0186] During the consensus process, each consensus node concurrently executes the transaction data corresponding to different partitions in the candidate block through different processing processes. The processing process of each partition will eventually obtain the page data of the corresponding partition. The page data is recorded in the corresponding partition ledger, and then the page hash value of each partition page data is submitted to the main ledger process.
[0187] Therefore, the data acquisition module 902 obtains the hash value of the current transaction page data in the partitioned ledger and records it in the main ledger;
[0188] The block generation module 903 generates the block body of the block by combining the main ledger and each current partition ledger as its child with a hierarchical structure having a branch relationship; the block header records the hash value of the parent block header and the parent block main ledger; and sets a life cycle management mechanism for the partition ledger in the main ledger; the life cycle management mechanism is used to record the status of each child partition ledger, that is, the status of the transaction partition, and control the corresponding partition ledger to generate page data normally, suspend the generation of page data and / or terminate the generation of page data according to the status of the child partition ledger.
[0189] The block processing module 904 writes the block that has passed the consensus into the ledger of the blockchain.
[0190] The management device of the ledger of this blockchain also includes
[0191] A data broadcast module 905 is used to broadcast the main ledger data of the block to the read-only nodes;
[0192] Information receiving module 906: used to obtain the partition ledger synchronization request of the read-only node; the request is initiated by the read-only node after receiving the master ledger data.
[0193] The consensus node writes the consensus block to the locally stored blockchain ledger, while the read-only nodes that do not participate in the consensus need to request data synchronization from the consensus node; therefore, the consensus node broadcasts the main ledger data in the new consensus block to the read-only nodes.
[0194] The management device of the ledger of the blockchain also includes an authority verification module 907, which is used to:
[0195] Get the node private key signature in the partition ledger synchronization request of the read-only node;
[0196] Get the list of public keys with access rights to the corresponding partitioned ledgers stored in the block master ledger;
[0197] Use the public key list to decrypt and verify the node private key signature;
[0198] For the read-only nodes that have passed the verification, the page data of the corresponding partition ledger is sent.
[0199] The request initiated by the read-only node contains the request information of the target data and the private key signature. The consensus node obtains the public key list stored in the main ledger, and uses the corresponding public key to decrypt and verify the private key signature of the node. If the verification is successful, the read-only node has synchronization authority. If the verification fails, the request of the read-only node can be rejected. In this way, the read-only node can only obtain the corresponding partition data according to the authority, but cannot obtain other data outside the authority, which is conducive to protecting the privacy of the ledger.
[0200] In other embodiments, when the operator finds that the data corresponding to a partitioned ledger in a block after being uploaded to the chain and subsequent blocks is suspected to be abnormal or abnormal, a transaction is submitted to the consensus node on the chain to enable each node to modify the status of the corresponding partitioned ledger to a suspended state or a terminated state; when a new block is generated, the partitioned ledger in a suspended or terminated state has no page data and the hash value does not need to be submitted to the main ledger.
[0201] Therefore, Fig. 9 As shown, the blockchain ledger management device of the present disclosure further includes a data clipping module 908, which is used to:
[0202] Get transaction data about the state of the target partition ledger and send it to the main ledger;
[0203] According to the transaction data of the target partition ledger status, set the corresponding partition ledger status in the main ledger;
[0204] Remove the partition ledger data that is set to the terminated state.
[0205] For the block with the problem and subsequent blocks, or all blocks on the chain that contain the partitioned ledger, the partitioned ledger data corresponding to the termination state will be removed from the node where it is located, archived, and placed in the archiving device that executes the query. When the block of the partitioned ledger is removed, the main ledger data remains unchanged, but the removed partitioned ledger data cannot be viewed in the blockchain.
[0206] Figure 8 and Fig. 9 Each module / unit in the device shown in FIG. Figure 5 , Figure 6 ,as well as Figure 7 The functions of each step in the process can achieve the corresponding technical effects, which will not be described in detail here for the sake of brevity.
[0207] Fig.10 A blockchain ledger management device provided by an embodiment of the present disclosure is shown, and the device may include a processor 1001 and a memory 1002 storing computer program instructions.
[0208] Specifically, the processor 1001 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present disclosure.
[0209] The memory 1002 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 1002 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In one example, the memory 1002 may include a removable or non-removable (or fixed) medium, or the memory 1002 is a non-volatile solid-state memory. The memory 1002 may be inside or outside the integrated gateway disaster recovery device.
[0210] The memory 1002 may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage media device, an optical storage media device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Thus, in general, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.
[0211] The processor 1001 reads and executes the computer program instructions stored in the memory 1002 to implement Figure 5 Steps S501 to S503 in the embodiment shown or Figure 6 Steps S601 to S610 in the embodiment shown, or implementation Figure 7 Steps S701 to S705 in the embodiment shown in the figure are completed. Figure 5 , Figure 6 as well as Figure 7 The corresponding technical effects achieved by executing the steps of the example shown are not repeated here for the sake of brevity.
[0212] In one example, the management device of the blockchain ledger may also include a communication interface 1003 and a bus 1010. Fig.10 As shown, the processor 1001, the memory 1002, and the communication interface 1003 are connected via a bus 1010 and communicate with each other.
[0213] The communication interface 1003 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present disclosure.
[0214] The components of the management device of the ledger of the blockchain are coupled to each other by bus 1010, including hardware, software, or both. By way of example and not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a Memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, one or more buses may be included by bus 1010. Although the embodiments of the present disclosure describe and illustrate specific buses, the present disclosure contemplates any suitable bus or interconnect.
[0215] In addition, in combination with the blockchain ledger management method in the above embodiments, the present disclosure embodiment can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by the processor, any blockchain ledger management method in the above embodiments is implemented.
[0216] It should be clear that the present disclosure is not limited to the specific configurations and processes described above and shown in the figures. For the sake of simplicity, a detailed description of the known methods is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present disclosure is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present disclosure.
[0217] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), appropriate firmware, plug-in, function card, etc. When implemented in software, the elements of the present disclosure are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or communication link by a data signal carried in a carrier. "Machine-readable medium" may include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (Radio Frequency, RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0218] It should also be noted that the exemplary embodiments mentioned in the present disclosure describe some methods or systems based on a series of steps or devices. However, the present disclosure is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiments, or in a different order from the embodiments, or several steps can be performed simultaneously.
[0219] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0220] The above is only a specific implementation of the present disclosure. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present disclosure is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present disclosure, and these modifications or replacements should be included in the protection scope of the present disclosure.
Claims
1. A computer program product for a block of a blockchain, characterized in that include At least one partitioned ledger, used to record transaction page data of a business feature; The main ledger is used to divide the recording area of each partition ledger, mark the number and description information, record the hash value of each partition ledger, and the access permission data of the partition ledger; The partition ledger and the main ledger form a hierarchical structure with a branching relationship, and the partition ledger is a child of the main ledger; The access permission data is used to authorize the node that passes the verification request to access the transaction page data of the corresponding partitioned ledger.
2. The computer program product of a block of the blockchain according to claim 1, characterized in that The master ledger is also used to generate block header data of a block; the block is a linked list block in the blockchain ledger; the block header data is used to record the hash value of the parent block master ledger and the parent block header.
3. The computer program product of a block of the blockchain according to claim 1, characterized in that The master ledger also has a lifecycle management mechanism for partitioned ledgers; The lifecycle management mechanism is used to record the status of each partition ledger, and according to the status of the partition ledger, control the corresponding partition ledger to normally generate page data, suspend the generation of page data and / or terminate the generation of page data.
4. A computer program product for a blockchain ledger, characterized in that: The blockchain ledger data structure is a linked list structure, which includes blocks. The blocks include a block header and a block body. The block body includes: At least one partitioned ledger, used to record transaction page data of a business feature; The main ledger is used to divide the recording area of each partition ledger, mark the number and description information, record the hash value of each partition ledger, and the access permission data of the partition ledger; The partition ledger and the main ledger form a hierarchical structure with a branching relationship, and the partition ledger is a child of the main ledger; The block header is used to record the hash value of the parent block header and the parent block main ledger; The access permission data is used to authorize the node that passes the verification request to access the transaction page data of the corresponding partitioned ledger.
5. The computer program product of the blockchain ledger according to claim 4, characterized in that: The master ledger also has a lifecycle management mechanism for partitioned ledgers; The lifecycle management mechanism is used to record the status of each partition ledger, and according to the status of the partition ledger, control the corresponding partition ledger to normally generate page data, suspend the generation of page data and / or terminate the generation of page data.
6. A method for managing a blockchain account book, characterized in that: The management method comprises: Recording the hash value of the current transaction page data in at least one partitioned ledger to the main ledger; each partitioned ledger is used to record the transaction page data of a business characteristic; The main ledger and each of the current partitioned ledgers as its children generate a block body in a hierarchical structure with a branching relationship; the block header of the block records the hash value of the parent block header and the parent block main ledger; wherein the main ledger is used to divide the recording area of each partitioned ledger, mark the number and description information, record the hash value of each partitioned ledger, and the access permission data of the partitioned ledger; Writing the blocks that have passed the consensus into the ledger of the blockchain; The access permission data is used to authorize the node that passes the verification request to access the transaction page data of the corresponding partitioned ledger.
7. The method for managing a blockchain account book according to claim 6, characterized in that: The management method also includes, Broadcast the main ledger data of the block to read-only nodes; Obtaining a partition ledger synchronization request of the read-only node; The partition ledger synchronization request is initiated by the read-only node after receiving the main ledger data.
8. The method for managing a blockchain account book according to claim 6, characterized in that: Before recording the hash value of the current transaction page data in the partitioned ledger to the main ledger, the management method further includes: The transaction data is obtained and placed into the transaction pool of the corresponding partition according to the partition number of the transaction data; the partition is a data storage area divided according to the business characteristics of the transaction, and the partition number is a unique identifier of the corresponding partition.
9. The method for managing a blockchain account book according to claim 7, characterized in that: After obtaining the partition ledger synchronization request of the read-only node, the management method further includes: Obtain the partition ledger synchronization request of the read-only node, and obtain the node private key signature in the partition ledger synchronization request; From the master ledger of the block, obtain a list of public keys with access rights to the corresponding partition ledger; Decrypt and verify the node private key signature using the public key list; For the read-only node that has passed the decryption verification, the page data of the corresponding partition ledger is sent.
10. The method for managing a blockchain account book according to claim 9, characterized in that: After sending the page data of the corresponding partition ledger to the read-only node that has passed the decryption verification, the management method further includes: The read-only node receives page data of the partitioned ledger; The read-only node processes the received page data to obtain a page hash value of the corresponding partition; Compare the page hash value generated by the read-only node with the page data hash value corresponding to the block master ledger received through broadcasting; When the comparison results are consistent, the read-only node writes the received page data of the partitioned ledger into the node ledger.
11. The method for managing a blockchain account book according to any one of claims 6 to 9, characterized in that: Before recording the hash value of the current transaction page data in the partitioned ledger to the main ledger, the management method further includes: A lifecycle management mechanism of the partition ledger is set in the master ledger; the lifecycle management mechanism is used to record the status of each partition ledger, and control the corresponding partition ledger to normally generate page data, suspend generation of page data and / or terminate generation of page data according to the status of the partition ledger; the status of the partition ledger includes a normal state, a suspended state and / or a terminated state.
12. The method for managing a blockchain account book according to claim 11, characterized in that: The management method also includes: Obtain transaction data including the state of the target partition ledger and send it to the master ledger; According to the transaction data of the target partition ledger state, setting the corresponding partition ledger state in the main ledger; Remove the partition ledger data set to the termination state.
13. The method for managing a blockchain account book according to claim 12, characterized in that: After removing the partition ledger data set to the termination state, the management method further includes: The removed partition ledger data is archived.
14. A blockchain ledger management device, characterized in that: The management device comprises: Data recording module: used to record the hash value of the current transaction page data in at least one partitioned ledger to the main ledger; each partitioned ledger is used to record the transaction page data of a business characteristic; Block generation module: used to generate the block body of the block by combining the master ledger and each current partition ledger as its child in a hierarchical structure with a branch relationship; the block header of the block records the hash value of the parent block header and the parent block master ledger; wherein the master ledger is used to divide the recording area of each partition ledger, mark the number and description information, record the hash value of each partition ledger, and the access permission data of the partition ledger; the access permission data is used to authorize the node that passes the verification request to access the transaction page data of the corresponding partition ledger; Block processing module: used to write the blocks that pass the consensus into the ledger of the blockchain.
15. A blockchain ledger management device, characterized in that: The device includes: a processor, and a memory storing computer program instructions; the processor reads and executes the computer program instructions to implement the blockchain ledger management method as described in any one of claims 6-13.
Citation Information
Patent Citations
Data management method and device for blockchain system, medium and electronic equipment
CN109379382A
Blockchain privacy protection method based on consensus node grouping isolation
CN111556049A
