Efficient alliance block chain data distributed storage method

By introducing a division of labor mechanism between transaction nodes and consensus nodes in the alliance blockchain, the problem of inefficient blockchain storage is solved, and more efficient data storage and the integrity of transaction credentials is achieved.

CN120123355APending Publication Date: 2025-06-10ZHONGKE BOCHENG TECH (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411582104.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-07
Publication Date
2025-06-10

AI Technical Summary

Technical Problem

The existing blockchain technology has insufficient storage efficiency, which leads to the inability to effectively store large texts or files, which in turn affects the integrity of transaction credentials in financial scenarios.

Method used

An efficient distributed storage method for alliance blockchain data is adopted. By dividing labor between transaction nodes and consensus nodes, transaction nodes only store transaction chains and provide query and endorsement services, while consensus nodes save endorsement chains, participate in consensus, and generate new blocks.

Benefits of technology

It significantly improves data storage efficiency, ensures the integrity and reliability of transaction credentials, and avoids the loss of transaction credentials outside the blockchain.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120123355A_ABST
    Figure CN120123355A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of block chain data storage, and particularly discloses an efficient alliance block chain data distributed storage method, which comprises the following steps: receiving a chain entry request sent by an App based on a transaction node, and obtaining and verifying the information of the App and the information of the chain entry request; when the verification is passed, sending a packaging request to the consensus node; when the consensus node receives the packaging request, verifying the packaging request, and when the verification is passed, generating a new block; monitoring the new block in real time based on the transaction node, and returning a monitoring result to the App; when a query request sent by the App is received, obtaining a query result based on the transaction node, and returning the query result to the App; and when the query request is a request for querying the endorsement block, querying the block based on the consensus node. According to the method, two kinds of nodes are provided and are the transaction node and the consensus node, the transaction node only stores the transaction chain and only stores the transaction block, and the data storage efficiency is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of blockchain data storage, and specifically to an efficient distributed storage method for consortium blockchain data. Background Art

[0002] Blockchain is a decentralized and distributed digital ledger technology used to record transactions or other data. Its core features lie in the security, transparency, and immutability of data. Each block contains a number of transactions or records, and the blocks are connected through encryption technology to form a chain, thus being called "blockchain".

[0003] In the existing blockchain, transaction data and evidence data are stored on the chain together. This approach brings another serious problem: low storage efficiency. And the low storage efficiency in turn leads to the inability to store a lot of things on the blockchain, such as large texts and files. The inappropriateness of the blockchain for storage will cause another problem: in some typical financial scenarios, some files will be generated during transactions, such as contracts and invoices, as part of the transaction vouchers. The fact that this part cannot be stored on the chain requires the business system to store a part of the transaction vouchers outside the blockchain. Therefore, the vouchers on the blockchain are not complete. Moreover, the business system stores the transaction vouchers in different locations. The vouchers on the blockchain can ensure non-loss, but the loss of transaction vouchers outside the blockchain will still trouble the business team, and the value of the blockchain will be discounted. Therefore, how to design a new consortium blockchain technology to solve the low storage efficiency of traditional blockchain networks through a unique multi-machine data storage scheme is the technical problem that the technical solution of the present invention aims to solve. Summary of the Invention

[0004] The purpose of the present invention is to provide an efficient distributed storage method for consortium blockchain data to solve the problems raised in the above background art.

[0005] To achieve the above purpose, the present invention provides the following technical solutions:

[0006] An efficient distributed storage method for consortium blockchain data, the method comprising:

[0007] Based on the transaction node receiving the on-chain request sent by the App, obtaining and verifying the information of the App and the information of the on-chain request;

[0008] When the verification is passed, sending a packaging request to the consensus node; when the consensus node receives the packaging request, verifying the packaging request, and when the verification is passed, generating a new block;

[0009] Based on the transaction node monitoring the new block in real time and returning the monitoring result to the App;

[0010] When receiving a query request sent by the App, obtain the query result based on the transaction node and return it to the App; among them, the query request includes a request to query non-endorsed blocks and a request to query endorsed blocks; when the query request is a request to query endorsed blocks, query the block based on the consensus node.

[0011] As a further solution of the present invention: The steps of receiving an in-chain request sent by the App based on the transaction node and obtaining and verifying the information of the App and the in-chain request include:

[0012] Receive the in-chain request sent by the App and verify the signature information of the App based on the transaction node;

[0013] If the signature information is legal, continue the in-chain process; otherwise, return an error code to the App and terminate the in-chain process;

[0014] Verify the validity of the in-chain request. If the in-chain request is valid, the endorsement result is true; if the in-chain request is invalid, return an error code to the App and terminate the in-chain process.

[0015] As a further solution of the present invention: The steps of the transaction node monitoring new blocks in real time and returning the monitoring results to the App include:

[0016] When the consensus node receives a packaging request, verify the signature information in the packaging request;

[0017] When the signature information is legal, generate a new block.

[0018] As a further solution of the present invention: The steps of the transaction node monitoring new blocks in real time and returning the monitoring results to the App include:

[0019] Monitor new blocks in real time based on the transaction node;

[0020] If a packaging request is monitored and it shows that the in-chain is successful, return a success label to the App;

[0021] If a packaging request is monitored and it shows that the in-chain fails, return an error code to the App;

[0022] When no packaging request is monitored within the preset time range, return an error code to the App.

[0023] As a further solution of the present invention: The propagation of new blocks is divided into the propagation of endorsed blocks and the broadcast of transaction blocks, and the propagation of endorsed blocks and the broadcast of transaction blocks are independent of each other; among them, the propagation of endorsed blocks is processed by the consensus node based on the consensus algorithm, and the broadcast of endorsed blocks uses the Gossip protocol.

[0024] As a further solution of the present invention: when receiving a query request sent by the App, the steps of obtaining a query result based on the transaction node and returning it to the App include:

[0025] Receive a query request containing signature information sent by the App, and verify the signature information based on the transaction node;

[0026] If the signature is illegal, return an error code to the App;

[0027] If the signature is legal, query the endorsement block in the local cache. When the query is successful, return the queried endorsement block to the App.

[0028] As a further solution of the present invention: when receiving a query request sent by the App, the steps of obtaining a query result based on the transaction node and returning it to the App further include:

[0029] When the query for the endorsement block in the local cache fails, send a query request to the consensus node;

[0030] Verify the signature information and the query request based on the consensus node. When the signature information is legal and the query request is valid, return the target block to the transaction node;

[0031] Based on the transaction node, store the target block in the local cache and feedback the target block to the App.

[0032] Compared with the prior art, the beneficial effects of the present invention are: the present invention provides two types of nodes, namely transaction nodes and consensus nodes. Transaction nodes only store the transaction chain and only save transaction blocks. Transaction nodes can endorse transactions for the App, but do not participate in consensus and cannot package and generate blocks. Transaction nodes need to join the alliance network with real names. After a new transaction node joins the alliance network, it first links to the full nodes to pull the transaction chain / endorsement chain, and then can provide query (except for querying the endorsement block) and endorsement services for the App; greatly improving the data storage efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention.

[0034] Figure 1 It is a flowchart of the chain entry process for an efficient distributed storage method of alliance blockchain data.

[0035] Figure 2 It is a flowchart of the query process for an efficient distributed storage method of alliance blockchain data. DETAILED DESCRIPTION OF THE INVENTION

[0036] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present invention more clear and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0037] Figure 1 The following is a flowchart of the process of entering data into a high - efficiency consortium blockchain data distributed storage method. In an embodiment of the present invention, a high - efficiency consortium blockchain data distributed storage method includes:

[0038] Based on the transaction node receiving the data - entry request sent by the App, obtain and verify the information of the App and the information of the data - entry request.

[0039] When the verification is passed, send a packaging request to the consensus node; when the consensus node receives the packaging request, verify the packaging request, and when the verification is passed, generate a new block.

[0040] Based on the transaction node to monitor the new block in real - time and return the monitoring result to the App.

[0041] When receiving the query request sent by the App, obtain the query result based on the transaction node and return it to the App; wherein, the query request includes a request to query non - endorsed blocks and a request to query endorsed blocks; when the query request is a request to query an endorsed block, query the block based on the consensus node.

[0042] The technical solution of the present invention has two types of nodes, one is the transaction node and the other is the consensus node; the block data is divided into two categories, one is the transaction parameter and the other is the endorsement data; among them, the transaction data is all the parameters passed in when the blockchain App initiates data - entry, and the endorsement data is the endorsement data generated by the transaction node for it when the blockchain App initiates data - entry.

[0043] The blocks are divided into two categories: transaction blocks and endorsed blocks. Transaction blocks only contain transaction parameters; endorsed blocks contain transaction parameters, endorsement information, packaging node information, etc.; correspondingly, the blockchain also includes two types of chains: the transaction chain and the endorsement chain. Among them, the transaction chain only contains all historical transaction information; the endorsement chain contains historical transaction information and all transaction endorsement information, that is, the complete transaction information is in the endorsement chain and also contains all the information of the transaction chain; in order to ensure that the blocks on the transaction chain and the endorsement chain are not easily damaged, both the transaction chain and the endorsement chain form a chain - like structure independently, and at the same time, the transaction block and the corresponding endorsed block are associated with each other.

[0044] Regarding the two types of blockchain network nodes, namely, the transaction nodes and consensus nodes mentioned above, transaction nodes only store transaction chains and save transaction blocks; transaction nodes can endorse transactions for Apps, but do not participate in consensus and cannot package and generate blocks; transaction nodes need to join the alliance network with real names. After a new transaction node joins the alliance network, it first links to all nodes to pull the transaction chain / endorsement chain; then it can provide query (except for querying endorsement blocks) and endorsement services for Apps; consensus nodes save endorsement chains. Consensus nodes need to join the alliance chain network with real names and can participate in consensus. Depending on the consensus configuration, consensus nodes run different consensus algorithms.

[0045] In an example of the technical solution of the present invention, the step of receiving the link-in request sent by the App based on the transaction node, and obtaining and verifying the App information and the link-in request information includes:

[0046] Receive the chain entry request sent by the App and verify the signature information of the App based on the transaction node;

[0047] If the signature information is legal, the chain entry process continues; otherwise, an error code is returned to the App and the chain entry process is terminated;

[0048] Verify the validity of the on-chain request. If the on-chain request is valid, the endorsement result is true; if the on-chain request is invalid, an error code is returned to the App and the on-chain process is terminated.

[0049] Furthermore, the step of monitoring new blocks in real time based on the transaction node and returning the monitoring results to the App includes:

[0050] When the consensus node receives the packaging request, it verifies the signature information in the packaging request;

[0051] When the signature information is legal, a new block is generated.

[0052] In an example of the technical solution of the present invention, App signs the chain entry information and initiates a chain entry request T-endorser_request to the transaction node N-endorser, and then the operation process is as follows:

[0053] 1. The transaction node N-endorser verifies the signature information of the App:

[0054] a) If the signature is valid, the chain entry process continues;

[0055] b) Otherwise, an error code is returned to the App and the linking process is terminated;

[0056] 2. The transaction node N-endorser verifies the validity of the on-chain request T-endorser_request and endorses the transaction signature:

[0057] a) If it is valid, the endorsement result is True, and the process continues to the block insertion process;

[0058] b) Otherwise, the endorsement result is False, and an error code is returned to the App to terminate the block insertion process;

[0059] 3. The trading node N - endorser sends a packaging request T - endorser_consensus to a certain consensus node N - consensus;

[0060] 4. The consensus node N - consensus verifies the signature information in T - endorser_consensus:

[0061] a) If the signature is legal, attempt to generate a new block;

[0062] b) Otherwise, return an error code to N - endorser.

[0063] As a preferred embodiment of the technical solution of the present invention, the step of the trading node monitoring new blocks in real - time and returning the monitoring result to the App includes:

[0064] The trading node monitors new blocks in real - time;

[0065] If a packaging request is monitored and it shows successful block insertion, return a success label to the App;

[0066] If a packaging request is monitored and it shows failed block insertion, return an error code to the App;

[0067] When no packaging request is monitored within the preset time range, return an error code to the App.

[0068] If it contains T - endorser and shows successful block insertion, return E_Success to the App; if it contains T - endorser and shows failed block insertion, return the error code E_COMMIT_FAILURE to the App; if T - endorser is not monitored within the TIMEOUT time, return the error code E_TIMEOUT to the App.

[0069] As a preferred embodiment of the technical solution of the present invention, the propagation of new blocks is divided into the propagation of endorsement blocks and the broadcast of transaction blocks, and the propagation of endorsement blocks and the broadcast of transaction blocks are independent of each other; among them, the propagation of endorsement blocks is processed by the consensus node based on the consensus algorithm, and the broadcast of endorsement blocks adopts the Gossip protocol.

[0070] As a preferred embodiment of the technical solution of the present invention, when receiving a query request sent by the App, the steps of obtaining a query result based on the transaction node and returning it to the App include:

[0071] Receive a query request containing signature information sent by the App, and verify the signature information based on the transaction node;

[0072] If the signature is illegal, return an error code to the App;

[0073] If the signature is legal, query the endorsement block in the local cache. When the query is successful, return the queried endorsement block to the App.

[0074] Furthermore, when receiving a query request sent by the App, the steps of obtaining a query result based on the transaction node and returning it to the App further include:

[0075] When the query of the endorsement block in the local cache fails, send a query request to the consensus node;

[0076] Verify the signature information and the query request based on the consensus node. When the signature information is legal and the query request is valid, return the target block to the transaction node;

[0077] Based on the transaction node, store the target block in the local cache and feedback the target block to the App.

[0078] Figure 2 For the query flow block diagram of the efficient distributed storage method of consortium blockchain data, in an example of the technical solution of the present invention, a specific query scheme is provided as follows:

[0079] For non-endorsement blocks, the query process:

[0080] 1. The App signs the query information and sends a query request Q-request to the transaction node N-endorser;

[0081] 2. The transaction node N-endorser verifies the signature information of the App

[0082] a) If the signature is legal, continue the query process;

[0083] b) Otherwise, return an error code to the App and terminate the query process;

[0084] 3. The transaction node N-endorser queries the content of the Q-request request and signs on the query result;

[0085] 4. The transaction node N-endorser returns the signed query result to the App.

[0086] For endorsement blocks, the query process:

[0087] 1. For the App signature query information, send a query request Q-block_request (query endorsement block) to the transaction node N-endorser;

[0088] 2. The transaction node N-endorser verifies the signature information of the App:

[0089] a) If the signature is legal, continue with the query process;

[0090] b) Otherwise, return an error code to the App and terminate the query process;

[0091] 3. The transaction node N-endorser queries Q-block_request and finds that it is to query the endorsement block Blockendorser;

[0092] 4. The transaction node N-endorser queries the local cache:

[0093] a) If the query hits, return Blockendorser to the APP and terminate the query process;

[0094] b) If the query misses, continue with the query process;

[0095] 5. The transaction node N-endorser sends a query for the endorsement block Q-block_request_endorser to a certain consensus node;

[0096] 6. The consensus node N-consensus verifies the signature information in Q-block_request_endorser:

[0097] a) If the signature is legal, continue with the query process;

[0098] b) Otherwise, return an error code to N-endorser;

[0099] 7. The consensus node N-consensus checks whether the query is valid:

[0100] a) If it is a valid query, return the target block to the transaction node N-endorser;

[0101] b) Otherwise, return an error code to N-endorser;

[0102] 8. The transaction node N-endorser checks the return result of the transaction node N-endorser;

[0103] a) If the target block Blockendorser is returned, back it up in the local cache, and then return the Blockendorser of the target block to the App;

[0104] b) Otherwise, return an error code to the App.

[0105] All functions that can be achieved by the efficient distributed storage method of consortium blockchain data are completed by a computer device. The computer device includes one or more processors and one or more memories. At least one program code is stored in the one or more memories, and the program code is loaded and executed by the one or more processors to implement the functions of the efficient distributed storage method of consortium blockchain data.

[0106] The processor fetches instructions one by one from the memory, analyzes the instructions, and then completes corresponding operations according to the requirements of the instructions, generating a series of control commands to make each part of the computer act automatically, continuously and coordinately, becoming an organic whole, realizing the input of the program, the input of data, and the operation and output of results. All arithmetic operations or logical operations generated in this process are completed by the arithmetic unit; the memory includes a read-only memory (ROM), and the read-only memory is used to store computer programs. A protection device is provided outside the memory.

[0107] Exemplarily, the computer program can be divided into one or more modules. One or more modules are stored in the memory and executed by the processor to complete the present invention. One or more modules can be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program in the terminal device.

[0108] Those skilled in the art can understand that the description of the above service device is only an example and does not constitute a limitation on the terminal device. It may include more or fewer components than the above description, or combine some components, or different components. For example, it may include input and output devices, network access devices, buses, etc.

[0109] The so-called processor may be a Central Processing Unit (CPU), or may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The above-mentioned processor is the control center of the above-mentioned terminal device, and connects various parts of the entire user terminal through various interfaces and lines.

[0110] The above-mentioned memory can be used to store computer programs and / or modules. The above-mentioned processor realizes various functions of the above-mentioned terminal device by running or executing the computer programs and / or modules stored in the memory, and by calling the data stored in the memory. The memory mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as information collection template display function, product information release function, etc.); the data storage area can store data created according to the use of the berth status display system (such as product information collection templates corresponding to different product types, product information to be released by different product providers, etc.). In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disks, memory, plug-in hard disks, Smart Media Cards (SMCs), Secure Digital (SD) cards, Flash Cards, at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices.

[0111] When the modules / units integrated in a terminal device are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, to implement all or part of the modules / units in the above-mentioned embodiment systems of the present invention, it can also be completed by instructing relevant hardware through a computer program. The above computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, it can realize the functions of the above-mentioned various system embodiments. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc.

[0112] It should be noted that in this article, the term "including", "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such a process, method, article or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, article or device including that element.

[0113] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention accordingly. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present invention.

Claims

1. An efficient distributed storage method for alliance blockchain data, characterized in that: The method comprises: Based on the transaction node receiving the chain entry request sent by the App, the App information and the chain entry request information are obtained and verified; When the verification is passed, the consensus node will send a packaging request; when the consensus node receives the packaging request, it will verify the packaging request, and when the verification is passed, a new block will be generated; Monitor new blocks in real time based on transaction nodes and return monitoring results to the App; When receiving a query request sent by the App, the query result is obtained based on the transaction node and returned to the App; wherein the query request includes a request to query a non-endorsed block and a request to query an endorsed block; when the query request is a request to query an endorsed block, the block is queried based on the consensus node.

2. The efficient alliance blockchain data distributed storage method according to claim 1 is characterized in that: The step of receiving the chain entry request sent by the App based on the transaction node, and obtaining and verifying the App information and the chain entry request information includes: Receive the chain entry request sent by the App and verify the signature information of the App based on the transaction node; If the signature information is legal, the chain entry process continues; otherwise, an error code is returned to the App and the chain entry process is terminated; Verify the validity of the on-chain request. If the on-chain request is valid, the endorsement result is true; if the on-chain request is invalid, an error code is returned to the App and the on-chain process is terminated.

3. The efficient alliance blockchain data distributed storage method according to claim 1 is characterized in that: The step of monitoring new blocks in real time based on the transaction node and returning the monitoring results to the App includes: When the consensus node receives the packaging request, it verifies the signature information in the packaging request; When the signature information is legal, a new block is generated.

4. The efficient alliance blockchain data distributed storage method according to claim 1 is characterized in that: The step of monitoring new blocks in real time based on the transaction node and returning the monitoring results to the App includes: Monitor new blocks in real time based on transaction nodes; If the packaging request is monitored and the link is successfully entered, a success tag is returned to the App; If a packaging request is detected and linking fails, an error code is returned to the App. If no packaging request is detected within the preset time range, an error code is returned to the App.

5. The efficient alliance blockchain data distributed storage method according to claim 1 is characterized in that: The propagation of new blocks is divided into the propagation of endorsement blocks and the broadcast of transaction blocks. The propagation of endorsement blocks and the broadcast of transaction blocks are independent of each other. Among them, the propagation of endorsement blocks is processed by consensus nodes based on the consensus algorithm, and the broadcast of endorsement blocks adopts the Gossip protocol.

6. The efficient alliance blockchain data distributed storage method according to claim 1 is characterized in that: When receiving the query request sent by the App, the step of obtaining the query result based on the transaction node and returning it to the App includes: Receive the query request containing signature information sent by the App, and verify the signature information based on the transaction node; If the signature is illegal, an error code is returned to the App; If the signature is valid, the endorsement block is queried in the local cache. If the query is successful, the queried endorsement block is returned to the App.

7. The efficient alliance blockchain data distributed storage method according to claim 6 is characterized in that: When receiving the query request sent by the App, the step of obtaining the query result based on the transaction node and returning it to the App also includes: When the query of endorsed blocks in the local cache fails, a query request is sent to the consensus node; The consensus node verifies the signature information and query request. When the signature information is legal and the query request is valid, the target block is returned to the transaction node. Based on the transaction node, the target block is stored in the local cache and fed back to the App.