CN111340496B - Block chain system and method for automatically optimizing historical transaction data - Google Patents
Block chain system and method for automatically optimizing historical transaction data Download PDFInfo
- Publication number
- CN111340496B CN111340496B CN202010429132.1A CN202010429132A CN111340496B CN 111340496 B CN111340496 B CN 111340496B CN 202010429132 A CN202010429132 A CN 202010429132A CN 111340496 B CN111340496 B CN 111340496B
- Authority
- CN
- China
- Prior art keywords
- transaction
- block
- output
- input
- funds
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q20/00—Payment architectures, schemes or protocols
- G06Q20/38—Payment protocols; Details thereof
- G06Q20/382—Payment protocols; Details thereof insuring higher security of transaction
- G06Q20/3827—Use of message hashing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/21—Design, administration or maintenance of databases
- G06F16/215—Improving data quality; Data cleansing, e.g. de-duplication, removing invalid entries or correcting typographical errors
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Accounting & Taxation (AREA)
- Physics & Mathematics (AREA)
- Finance (AREA)
- General Business, Economics & Management (AREA)
- Strategic Management (AREA)
- Quality & Reliability (AREA)
- Computer Security & Cryptography (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
Abstract
The invention provides a block chain system and a method for automatically optimizing historical transaction data, wherein the block chain system comprises at least one block, the block comprises a block head, a Merkle root is stored in the block head and used for marking the cleaned transaction of the block, the cleaned transaction replaces the original transaction in the form of a transaction hash value and is stored in the block, the block is of a structure only comprising the block head after being cleaned, the block chain system comprises an agreed settlement period, and when the agreed settlement period is reached, the transaction and the block in the system are automatically cleaned. The invention can greatly reduce the historical data of the blockchain, does not need to newly add a transaction special for cleaning, can complete all members offline, reduces the communication and transaction cost of cleaning, settles the transaction output at a proper time, summarizes scattered transaction outputs of users, can improve the speed of searching useful transactions and is convenient for the users to carry out new transactions.
Description
Technical Field
The invention relates to the field of blockchain, in particular to a blockchain system and a blockchain method for automatically optimizing historical transaction data.
Background
The block chain is a brand new distributed infrastructure and a calculation paradigm, stores data by using an ordered chain data structure, updates the data by using a consensus algorithm, and ensures data security by using a cryptography technology. In blockchain based transactions, ensuring data security for the transaction and privacy for the customer is a necessary condition for the blockchain to be able to develop further. For this reason, cryptography, and in particular public key cryptography, is widely used in blockchains.
With the increasing frequency of transactions in blockchains and the wide spread of blockchain applications, the amount of information for a block will continue to increase. The existing block chain adopts a chain structure for storage, an ore machine stores the hash value of a father block and packs other information into a current block, the current block is spread, accepted and verified in a network, and the consensus of the block is finally completed. The block chain depends on the parent block during verification, the parent block depends on the parent block of the previous stage, and if previous data in the whole block chain is tampered, the parent block is abnormal, so that consensus on a subsequent local mining machine cannot be completed. Over time, transaction data will grow infinitely, each transaction will occupy a certain space, the blockchain will become infinite, and the requirement for storage space will become higher and higher. In addition, the problem of the over-size of the block chain also makes the complete data synchronization of the blocks difficult.
Although the problem of serious transaction congestion caused by too small block capacity can be solved by capacity expansion, the total amount of information cannot be reduced by the capacity expansion. The isolation witness, the lightning network and the like solve the problem of slow transaction rather than the problem of more and more data. In a traditional centralized data system, continuously increased data can be solved by means of partitioning, dumping and the like, taking a traditional transaction type system as an example, as the core design concept in the system is to store the final state of an account, only historical transaction process data needs to be moved to other special storage equipment, and a host database stores the latest state of the account and transaction records in a recent period of time. But due to the characteristics of distribution, decentralization, chain storage and non-falsification, the blockchain cannot dump and divide data like a traditional database.
The invention patent with application publication number CN105741095A discloses a dynamic compression access method for a block chain, wherein a new block is dynamically compressed by an embedded compression function in the operation process of a digital currency wallet; when a new block is read, the compressed block is decompressed through the embedded decompression function, so that the data capacity of the block is reduced on the premise of ensuring that the data is not damaged, and the storage space is saved; the scheme achieves the purpose of reducing the data capacity of the block chain by compressing the blocks, although the space occupied by the blocks is reduced by compressing, the data volume in the whole block chain is not reduced substantially, and the same storage space is still occupied after decompression; thus, this solution does not essentially solve the problem of blockchain data being too large to store over time.
The invention patent with application publication number CN110457319A discloses a block chain state data storage method and device, and an electronic device, and discloses an MPT state tree, in which a hash value of data content contained in a node is used as a Key, and data content contained in the node is used as a value for storage. When the nodes on the MPT state tree need to be inquired, content addressing is carried out through keys based on the nodes; for some nodes with repeated contents, the aim of saving the storage space of data storage is fulfilled in a multiplexing mode. This approach also does not essentially solve the problem of blockchain data being too large to store over time.
The problems existing in the prior art are as follows:
(1) at present, the method of block compression and dump is adopted to reduce the storage space occupied by the block data, and the method does not substantially reduce the data volume in the whole block chain system, so that the problem that the block chain data is excessively stored along with the lapse of time cannot be substantially and effectively solved;
(2) the change of the user is distributed in the output of the block chains, and the subsequent transaction is usually carried out after the transaction of combining all the change is carried out, so that the transaction cost of the user is increased.
Disclosure of Invention
The technical purpose is as follows: in order to solve the technical problems, the invention provides a blockchain system and a method for automatically optimizing historical transaction data, which can greatly reduce the blockchain historical data by independently optimizing and cleaning transactions and blocks without newly adding transactions special for cleaning, and each member can complete offline, thereby reducing the cleaning communication and transaction cost, settling the transaction output at proper time, summarizing the scattered transaction output of users, greatly improving the speed of searching useful transactions, and facilitating the new transactions of users.
The technical scheme is as follows: in order to achieve the technical purpose, the invention adopts the following technical scheme:
a blockchain system for automatically optimizing historical transactional data, comprising: the block chain system comprises at least one block, the block comprises a block head, a Merkle root is stored in the block head and used for marking the transaction of the block after being cleaned, the original transaction comprises transaction input and transaction output before being cleaned, the transaction input and the transaction output are respectively cleaned when the original transaction is cleaned, and the cleaned transaction replaces the original transaction in the form of a transaction hash value to be stored in the block; the transaction hash value is obtained by computing a hash value for a combination of the transaction input cleared of transactions and the corresponding cleared transaction output.
Preferably, the blockchain system comprises at least one cleaned block, the block comprises a block head and a block body before cleaning, the block body stores the cleaned transaction set in the block, and the block is cleaned to be a structure only comprising the block head.
Preferably, the transaction output comprises a serial number of the output fund in the transaction, a transfer-in address of the output fund, an amount of the output fund and a cumulative amount of the output fund obtained by settling each settlement point in all the blocks before clearing;
the transaction output is cleared and comprises a serial number of the output fund in the transaction and a transaction output hash value, wherein the transaction output hash value is obtained by the combined calculation of the transfer-in address of the output fund, the amount of the output fund and the accumulated amount of the output fund obtained by settling all settlement points in all the blocks.
Preferably, the transaction input comprises a serial number of the input fund in the transaction before clearing, an ID of the input fund in a source transaction thereof, a serial number of the input fund as an output fund in the source transaction thereof, a digital signature for taking the input fund and a public key for taking the input fund, the transaction input comprises the serial number of the input fund in the transaction after clearing and a transaction input hash value, and the transaction input hash value is obtained by calculating a hash value by combining contents except the serial number of the input fund in the transaction.
Preferably, the blockchain system comprises an agreed settlement period, and when the agreed settlement period is reached, the transaction and the blocks in the system are automatically cleaned; the settlement period of each transaction address is a fixed settlement period or is determined according to the current unsettled transaction quantity of the transaction address.
Preferably, in the block chain system, at least one block is a structure including a block body and the block head, the block body stores a transaction set in the block, and the block head stores a Merkle root corresponding to a Merkle tree formed by intra-block transactions; the block head also stores a version number, a last block hash value, a target block hash value, a timestamp and a random number.
The invention also discloses a method for automatically optimizing the block chain system of the historical transaction data, which is characterized by comprising the following steps:
s1, searching corresponding transaction output according to each transaction input, cleaning the transaction output to obtain a transaction output hash value, and cleaning the transaction input to obtain a transaction input hash value;
s2, cleaning the cleaned transaction processed in the step S1, calculating a combined hash value of transaction input and transaction output, using the combined hash value as a transaction hash value for marking the complete transaction after data optimization is obtained, and storing the obtained transaction hash value in a block instead of original complete transaction data;
s3, repeating the steps S1-S2, calculating transaction hash values of more than one transaction in the block, calculating hash values of pairwise combinations of leaf nodes to serve as a tree node, calculating hash values of pairwise combinations of tree nodes to serve as a new tree node, copying the last leaf node to a duplicate if the number of transactions in the block is singular, constructing a Merkle tree, and taking the obtained tree node as a Merkle root in the block head.
Preferably, the method comprises the following steps:
s4, judging whether all the transactions in the block are cleared or not, if so, clearing the block and deleting the transaction data in the block; if not, the transaction data is reserved as the block with the block body.
Preferably, the transaction is collected by miners to form a miner transaction, the miner transaction input comprises miner information filled by the miners, and the miner transaction output comprises the serial number of output funds in the transaction, the transfer-in address of the output funds and the amount of the output funds.
Preferably, when the miners collect the transactions, whether the settlement point is reached or not is judged for the transaction addresses participating in all transactions of the block;
if the transfer-in address of the fund is output to the settlement point, the transaction address is settled; the settlement step comprises:
finding the last settlement point of the transferred-in address of the output fund, calculating the last settlement point to the current settlement point as a settlement period, and finding out all transactions related to the transferred-in address of the output fund in the settlement period;
obtaining the sum of the transaction outputs, the sum of the transaction inputs and the difference between the transaction outputs and the sum of the transaction inputs of all the transfer-in addresses related to the output funds in the settlement period, and calculating the accumulated amount of the current output funds;
placing the calculated accumulated amount of the current output funds in a first transaction including a transfer-in address of the output funds to generate a transaction with the accumulated amount of the output funds;
deleting all settled transaction outputs in the transferred-in address for outputting funds;
for the transaction addresses that have reached the settlement point but have not participated in all transactions in the block, separate settlement is performed, and these transfer-in addresses are counted for the current cumulative amount to be placed in the mineworker's transaction.
Has the advantages that: due to the adoption of the technical scheme, the invention has the following technical effects:
1. the block chain historical data can be greatly reduced;
2. the historical transaction data is cleaned without adding special cleaning transaction, and all members can complete the cleaning offline, so that the cleaning communication and transaction cost is reduced;
3. all block chain members can select to clear, not clear and partially clear self historical transaction data according to self requirements on storage;
4. settlement of transaction output is carried out at a proper opportunity, scattered transaction output of the user is summarized, the speed of searching for useful transactions can be improved, and meanwhile, the user can conveniently carry out new transactions;
5. after the historical transaction data is cleaned up, the speed of searching for useful transactions can be improved.
Drawings
FIG. 1 is a block diagram of a transaction in the present invention;
FIG. 2 is a diagram showing a structure of a settlement point Tx with Destn;
FIG. 3 is a block diagram of an optimized post nth output transaction;
FIG. 4 is a block diagram of a transaction after an optimization of an mth input;
FIG. 5 is a block diagram of the entire Tx with the inputs and outputs cleared;
FIG. 6 shows the relationship between blocks and transactions;
FIG. 7 is a block diagram of a miner-generated mine excavation transaction;
FIG. 8 is a block diagram of a mineworker generated ore cut transaction optimized.
Detailed Description
Description of the System
The structure of the transaction Tx before optimization is shown in FIG. 1. In fig. 1, InN represents the serial number of a certain input fund in the local Tx, and the size is 1 byte; the TxID represents the ID of a certain input fund at the Tx where the input fund is located, and generally, a hash value of TxID = Tx can be taken, and the size of the hash value is 32 bytes; n represents the serial number of a certain input fund as an output fund in Tx where the source of the input fund is located, and the size of the serial number is 1 byte; txs denotes a digital signature of 32 bytes in size for a certain input fund; PK represents a public key for taking a certain input fund, and the size of the public key is 33 bytes; OutN represents the serial number of a certain output fund in the Tx, and the size of the serial number is 1 byte; dest represents the transfer-in address of a certain output fund, generally in the form of a wallet, and the size is 34 bytes; value represents the amount of a certain output fund and is 8 bytes in size.
The transaction also comprises a version number which represents the version of the transaction data structure and has the size of 4 bytes; and setting the time for the transaction to take effect (to be posted to the blockchain) to be 4 bytes.
Taking an input-to-output transaction as an example, the total size of transaction Tx is 150 bytes.
The specific generation method of the TxID, which is the hash value of the transaction Tx, is as follows:
the hash values of m inputs and n outputs are calculated respectively.
Taking the mth input and the nth output as examples, calculate:
after HIn and HOut are calculated for each input and each output, respectively, Tx as shown in fig. 5 is obtained, and a Hash function is calculated for the Tx at that time to obtain a Hash value of Tx.
The first transaction location for Destn to occur is defined as the first settlement point for Destn.
Each transaction address has a different or the same fixed settlement period, for example, the settlement period of Destn is 1 year or 10000 blocks; or the settlement period is not fixed and is determined by the number of the current unsettled transaction outputs of Destn, for example, when miners search for the number of the current unsettled transaction outputs of Destn to be more than 100, settlement is carried out. After the settlement point is generated, all transaction outputs before the settlement point become settled transaction outputs.
The structure of the settlement point Tx with Destn is shown in fig. 2. VTotal is the amount of money settled for Destn in all blocks before the block. In the first settlement point of Destn, VTotal = 0. When the amount of Destn in the settlement point is used, i.e. as Tx input, the actual amount = value + VTotal.
After the miners collect the transactions, the mine digging transactions are formed, the input part is filled with some mine pools to which the miners belong or other necessary information, the output part is the same as the common transactions, and the total amount and the generation area are outputThe prize value for the blocks is the same. Take optimization of the nth output as an example, calculateThe structure of the optimized miner transaction is shown in fig. 8.
When a miner forms a new block each time, judging whether a settlement point is reached or not for all transaction addresses in each transaction; if Destn arrives at the settlement point, the Destn is settled: finding the last settlement point of the Destn (the settlement point is the point with the VTotal value or with 2 output sums), and all the transactions related to the Destn after the settlement point and before the current settlement point, calculating the current VTotal value, specifically, firstly, obtaining the sum of the transaction outputs and the sum of the transaction inputs of all the Destn in the settlement period, and obtaining the difference between the two. If there are multiple Destn in the new block formed by the mineworker, VTotal is placed in the Tx of the first occurring Destn.
When the miners form a new block, the transaction addresses which reach the settlement point but do not participate in all transactions in the block are separately settled. The current VTotal values are calculated for these Destn, in the same manner as above, placed in the miner trade. The mineworker transaction generated by the mineworker is shown in fig. 7; wherein, if Destn is not the miner digging the mine, Valuen = 0.
The user wallet generally stores records of all UTXOs (Unspent Transaction Outputs) corresponding to the user, but if a certain UTXO is found to have a settlement value, the user wallet deletes all UTXOs counted by the settlement value, that is, deletes all settled Transaction Outputs, from the records of all UTXOs stored locally according to the rules of the present invention.
After the transaction with VTotal is formally generated, all UTXOs including the settled value statistics, that is, all settled transaction outputs, can be deleted from the blockchain data.
The optimization condition is as follows: for each transaction input, its corresponding output is found and cleaned.
The method comprises the following steps: changing the output to Hash shortens the content of the output.
Take the nth output as an example, calculateThe structure of Tx after the nth pen output is optimized is shown in fig. 3; for a mine excavation transaction, the optimized structure is shown in FIG. 8.
The transfer-in address Dest of the output fund is 34 bytes, Value is 8 bytes, taking SHA256 algorithm as an example, the calculated length is 32 bytes, and the optimized shortened length is 10 bytes. For the entire Tx, taking a 150 byte transaction with one input and one output as an example, the optimization ratio is 6.67%.
Step two: changing the input to Hash shortens the content of the input.
Take the mth pen input as an example, calculateFig. 4 shows a structure of Tx after the mth pen input is optimized.
TxID is 32 bytes, N is 1 byte, the digital signature is 32 bytes, the public key is 33 bytes, taking SHA256 algorithm as an example, if the calculated length is 32 bytes, the optimized shortened length is 66 bytes. For the entire Tx, the optimized ratio is 44% for a 150 byte transaction with one input and one output, for example.
And (5) optimizing the condition II: tx is cleaned up.
For a certain Tx, if its input and output are both cleared, the Tx is cleared. The Tx configuration at this time is shown in fig. 5. The cleaning mode is as follows: the entire Tx is changed to TxID.
After the Tx transaction is cleared, the TxID is stored in the block, where the transaction was originally stored. All blockchain members can select to clear, not clear and partially clear self historical transaction data according to self requirements on storage. When the other nodes verify the block, whether the transaction or the TxID is stored in the transaction storage position at the moment is judged. If the stored transaction is the transaction, performing Hash calculation on the transaction and verifying the subsequent operations such as a Merkle root and the like; if the TxID is stored, directly performing Hash calculation with the Hash value of the adjacent transaction, and verifying the subsequent operations such as a Merkle root.
The length of the TxID is 32 bytes. For the whole Tx, taking 150 bytes of transaction as an example of one input and one output, the length shortened by optimization is 118 bytes, and the optimization proportion is 78.67%.
And (3) optimizing the condition three: and cleaning the block.
The relationship between blocks and transactions is shown in fig. 6, including a version number of 4 bytes; a parent block hash value of 32 bytes in size; a timestamp of 4 bytes in size; a random number of 4 bytes in size; a target hash of 4 bytes in size; merkle root, 32 bytes in size.
(1) If Tx of 2 branches of a certain node of the binary tree in the block becomes TxID, the 2 TxID becomes 1 hash value, and the calculation mode is similar to the flow in the process of calculating the Merkle root. I.e., TxID1 and TxID2, become Hash12,。
(2) for a block, if Tx of the block is cleared, the 'block body' part of the block is completely removed, only the block head is left, and the content of the block is shortened.
One block size is 1 MB. After the 'block body' part is cleaned, the block size is 80 bytes, and the optimization proportion is 99.99%.
In the above 3 cases, after the original content is replaced by the hash value, the hash value is directly adopted during verification without recalculating the hash value, so that the calculation amount is reduced, and the verification speed is increased.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.
Claims (6)
1. A method for automatically optimizing a blockchain system of historical transactional data, comprising the steps of:
s1, the original transaction comprises transaction input and transaction output before being cleared, the clearing of the original transaction comprises the clearing of the transaction input and the transaction output respectively, the corresponding transaction output is searched according to each transaction input, the transaction output is cleared to obtain a transaction output hash value, and then the transaction input is cleared to obtain a transaction input hash value;
s2, cleaning the cleaned transaction processed in the step S1, calculating a combined hash value of transaction input and transaction output, using the combined hash value as a transaction hash value for marking the original transaction after data optimization is obtained, and storing the obtained transaction hash value in a block instead of original complete transaction data;
s3, repeating the steps S1-S2, calculating transaction hash values of more than one transaction in the block, calculating hash values of pairwise combinations of leaf nodes and using the hash values as a tree node, calculating hash values of pairwise combinations of tree nodes and using the hash values as a new tree node, if the number of transactions in the block is singular, copying the last leaf node and collecting the leaf node into a double number to construct a Merkle tree, and using the finally obtained tree node as a Merkle root in the block head;
s4, judging whether all the transactions in the block are cleared or not, if so, clearing the block and deleting the transaction data in the block; if not, retaining the transaction data as a block with a block body;
when clearing the transaction in the block, storing the TxID at the position of the original stored transaction in the block; TxID represents the ID of the transaction Tx where a certain input fund in the transaction is located at the source of the transaction TxID is equal to the hash value of Tx; all block chain members select to clear, not clear and partially clear self historical transaction data according to self requirements on storage;
when other nodes verify the block, whether the transaction or the TxID is stored in the transaction storage position at the moment is judged; if the stored transaction is the transaction, performing Hash calculation on the transaction and performing subsequent operation including Merkle root verification; if the TxID is stored, the Hash calculation is directly carried out with the Hash value of the adjacent transaction and the subsequent operation of verifying the root verification of the Merkle is included.
2. The method of claim 1, wherein the step of automatically optimizing the blockchain system of historical transactional data comprises: the transaction is collected by miners to form miner transaction, the miner transaction input comprises miner information filled by the miners, and the miner transaction output comprises the serial number of output funds in the transaction, the transfer-in address of the output funds and the amount of the output funds.
3. The method of claim 2, wherein the step of automatically optimizing the blockchain system of historical transactional data comprises: when the miners collect the transactions, judging whether the transaction addresses participating in all transactions of the block arrive at a settlement point;
if the transfer-in address of the fund is output to the settlement point, the transaction address is settled; the settlement step comprises:
finding the last settlement point of the transferred-in address of the output fund, calculating the last settlement point to the current settlement point as a settlement period, and finding out all transactions related to the transferred-in address of the output fund in the settlement period;
obtaining the sum of the transaction outputs, the sum of the transaction inputs and the difference between the transaction outputs and the sum of the transaction inputs of all the transfer-in addresses related to the output funds in the settlement period, and calculating the accumulated amount of the current output funds;
placing the calculated accumulated amount of the current output funds in a first transaction including a transfer-in address of the output funds to generate a transaction with the accumulated amount of the output funds;
deleting all settled transaction outputs in the transferred-in address for outputting funds;
for the transaction addresses that have reached the settlement point but have not participated in all transactions in the block, separate settlement is performed, and these transfer-in addresses are counted for the current cumulative amount to be placed in the mineworker's transaction.
4. A blockchain system for automatically optimizing historical transactional data for performing the method of claim 1, wherein: the block chain system comprises at least one block, the block comprises a block head, a Merkle root is stored in the block head and used for marking the transaction of the block after being cleaned, the original transaction comprises transaction input and transaction output before being cleaned, the transaction input and the transaction output are respectively cleaned when the original transaction is cleaned, and the cleaned transaction replaces the original transaction in the form of a transaction hash value to be stored in the block; the transaction hash value is obtained by calculating the hash value of the combination of the transaction input after transaction cleaning and the corresponding transaction output after cleaning;
the block chain system comprises at least one cleaned block, the block comprises a block head and a block body before cleaning, the block body stores a cleaned transaction set in the block, and the block is a structure only comprising the block head after cleaning;
before clearing, the transaction output comprises a serial number of output funds in the transaction, a transfer-in address of the output funds, the amount of the output funds and the accumulated amount of the output funds obtained by settling all settlement points in all blocks;
the transaction output is cleared and comprises a serial number of the output fund in the transaction and a transaction output hash value, wherein the transaction output hash value is obtained by the combined calculation of a transfer-in address of the output fund, the amount of the output fund and the accumulated amount of the output fund obtained by settling each settlement point in all the previous blocks;
the transaction input comprises a serial number of input funds in the transaction, an ID of the input funds in source transactions, a serial number of the input funds serving as output funds in the source transactions, a digital signature for taking the input funds and a public key for taking the input funds before being cleared, the transaction input comprises the serial number of the input funds in the transaction and a transaction input hash value after being cleared, and the transaction input hash value is obtained by calculating a hash value through combination of contents except the serial number of the input funds in the transaction.
5. The blockchain system for automatically optimizing historical transactional data of claim 4, wherein: the block chain system comprises an agreed settlement period, and when the agreed settlement period is reached, the transaction and the blocks in the system are automatically cleaned; the settlement period of each transaction address is a fixed settlement period or is determined according to the current unsettled transaction quantity of the transaction address.
6. The blockchain system for automatically optimizing historical transactional data of claim 4, wherein: in the block chain system, at least one block is a structure comprising a block body and a block head, the block body stores a transaction set in the block, and the block head stores a Merkle root corresponding to a Merkle tree formed by transaction in the block; the block head also stores a version number, a last block hash value, a target block hash value, a timestamp and a random number.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010429132.1A CN111340496B (en) | 2020-05-20 | 2020-05-20 | Block chain system and method for automatically optimizing historical transaction data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010429132.1A CN111340496B (en) | 2020-05-20 | 2020-05-20 | Block chain system and method for automatically optimizing historical transaction data |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111340496A CN111340496A (en) | 2020-06-26 |
CN111340496B true CN111340496B (en) | 2020-10-27 |
Family
ID=71186489
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010429132.1A Active CN111340496B (en) | 2020-05-20 | 2020-05-20 | Block chain system and method for automatically optimizing historical transaction data |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111340496B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112017048A (en) * | 2020-09-03 | 2020-12-01 | 山西哆贝网络科技有限公司 | Distributed business platform and method based on block chain |
CN113360578B (en) * | 2021-06-18 | 2023-04-07 | 中国科学技术大学 | Method, system and storage medium for hierarchically cutting data in block chain transaction |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111143341A (en) * | 2019-12-25 | 2020-05-12 | 江苏众享金联科技有限公司 | Block chain account body slimming method based on intelligent contract |
CN111159288A (en) * | 2019-12-16 | 2020-05-15 | 郑杰骞 | Method, system, device and medium for storing, verifying and realizing chain structure data |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10402792B2 (en) * | 2015-08-13 | 2019-09-03 | The Toronto-Dominion Bank | Systems and method for tracking enterprise events using hybrid public-private blockchain ledgers |
EP3503012A1 (en) * | 2017-12-20 | 2019-06-26 | Accenture Global Solutions Limited | Analytics engine for multiple blockchain nodes |
CN109492049B (en) * | 2018-09-21 | 2021-05-04 | 上海点融信息科技有限责任公司 | Data processing, block generation and synchronization method for block chain network |
CN109299336B (en) * | 2018-09-30 | 2022-07-01 | 腾讯科技(深圳)有限公司 | Data backup method and device, storage medium and computing equipment |
CN109493044A (en) * | 2018-11-08 | 2019-03-19 | 深圳壹账通智能科技有限公司 | Block chain block delet method, device and terminal device |
CN110263035B (en) * | 2019-05-31 | 2023-10-27 | 创新先进技术有限公司 | Block chain-based data storage and query method and device and electronic equipment |
-
2020
- 2020-05-20 CN CN202010429132.1A patent/CN111340496B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111159288A (en) * | 2019-12-16 | 2020-05-15 | 郑杰骞 | Method, system, device and medium for storing, verifying and realizing chain structure data |
CN111143341A (en) * | 2019-12-25 | 2020-05-12 | 江苏众享金联科技有限公司 | Block chain account body slimming method based on intelligent contract |
Also Published As
Publication number | Publication date |
---|---|
CN111340496A (en) | 2020-06-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102017739B1 (en) | Blockchain system and method of creating blockchain | |
CN111340496B (en) | Block chain system and method for automatically optimizing historical transaction data | |
KR20200116011A (en) | Systems and methods for parallel-processing blockchain transactions | |
CN103814361B (en) | The delet method of scalable repetition data and system for fritter | |
CN110378697B (en) | Block chain light node UTXO transaction verification method and device based on RSA accumulator | |
CN112257118B (en) | Method and system for locking cross-fragment transactions in a blockchain system containing fragments | |
CN110493148A (en) | A kind of block processes, block common recognition and block synchronous method and device | |
CN105741095A (en) | Dynamic compression and access method of block chain | |
CN111596862B (en) | Independent optimization method and system for block chain historical transaction data | |
CN105138478B (en) | A kind of memory integrity protection method of non-equilibrium Hash tree | |
CN109146638A (en) | The recognition methods of abnormal financial transaction group and device | |
CN112988073A (en) | Stepped data storage method and system capable of reducing block chain storage overhead | |
Kim et al. | Ethanos: efficient bootstrapping for full nodes on account-based blockchain | |
CN109739903A (en) | A kind of generation method and relevant apparatus of ranking list data | |
Nagayama et al. | Trail: a blockchain architecture for light nodes | |
CN109685657B (en) | Method and node device for processing transactions in a blockchain network and storage medium | |
CN102855288B (en) | The treating method and apparatus of variance data | |
CN112598510B (en) | Resource data processing method and device | |
CN114328518A (en) | UTXO model-based low storage consumption method and system | |
CN111414421A (en) | Sectional type block chain storage method and storage device | |
KR20190020721A (en) | Blockchain system and method of creating blockchain | |
CN112261161B (en) | Method for locking partitioned blocks in block chain system and block chain system | |
CN110474776B (en) | Credible block data dynamic deleting method | |
CN112269423B (en) | Method for locking global clock in blockchain system and blockchain system | |
CN113395172B (en) | Important user discovery and behavior prediction method based on communication network |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |