CN111291067B - Block chain data forwarding method - Google Patents

Block chain data forwarding method Download PDF

Info

Publication number
CN111291067B
CN111291067B CN202010169348.9A CN202010169348A CN111291067B CN 111291067 B CN111291067 B CN 111291067B CN 202010169348 A CN202010169348 A CN 202010169348A CN 111291067 B CN111291067 B CN 111291067B
Authority
CN
China
Prior art keywords
block
transaction
transfer
carry
over
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
Application number
CN202010169348.9A
Other languages
Chinese (zh)
Other versions
CN111291067A (en
Inventor
杨志高
温贤强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Erren Technology Co Ltd
Original Assignee
Nanjing Erren Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing Erren Technology Co Ltd filed Critical Nanjing Erren Technology Co Ltd
Priority to CN202010169348.9A priority Critical patent/CN111291067B/en
Publication of CN111291067A publication Critical patent/CN111291067A/en
Application granted granted Critical
Publication of CN111291067B publication Critical patent/CN111291067B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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/00Payment architectures, schemes or protocols
    • G06Q20/04Payment circuits
    • G06Q20/06Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme
    • G06Q20/065Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme using e-cash
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Computer Security & Cryptography (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Finance (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Technology Law (AREA)
  • Bioethics (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention relates to a block chain data transmission method, which comprises the following steps: initiating a transfer-forward transaction; generating a carry-over block; a uplink carry-over block; a carry forward history block; sealing and storing a carry-over history block; inquiring a carry-over history block; the carry forward history block is deleted. By initiating the transfer transaction of the account, the balance of the corresponding account after the upper chain of the transfer transaction is in effect is credible and available, the account can use the balance as a base and a source to carry out subsequent transaction, the subsequent transaction verification of the account can not need historical transaction information stored in a block before the block chain, the transaction verification and consensus can be carried out as long as the transfer transaction which is recently in effect is carried out on the account, the normal operation of the block chain in the current area is not influenced, and the transferred historical block can be sealed or deleted. The method can effectively reduce the data volume of real-time operation of block link point storage, and avoid various problems caused by large data volume.

Description

Block chain data forwarding method
Technical Field
The invention relates to the technical field of block chain application, in particular to a block chain data transfer method.
Background
The block chain is essentially a distributed shared account book and a database, and has the characteristics of decentralization, no tampering, trace retaining in the whole process, traceability, collective maintenance, openness and transparency and the like, and the characteristics lay a foundation for creating trust for the block chain. The abundant application scenes of the block chains basically solve the problem of information asymmetry based on the block chains, and realize the cooperative trust and consistent action among a plurality of main bodies. The block chain technology is the basic technology for realizing various encrypted digital currencies at present, and the realization of each encrypted digital currency is the same and different. Taking the bit currency as an example, in the formation process of the bit currency, the block is a storage unit, and records all transaction information of each node within a certain time; the blocks are linked by random hashing (also called hashing algorithm), the next block contains the hash value of the previous block, one block is connected with another block in sequence, and the formed result is called a block chain.
The consensus mechanism is the key for ensuring the validity of information and preventing falsification of various blockchains, and whether a transaction is valid or invalid needs to be verified on the blockchains when the consensus is achieved. For example, the account a transfers 100 units to the account B, the blockchain verification node needs to confirm that the account a really has 100 units available, and most of the confirmation results of the nodes participating in the confirmation are that the account a has 100 units available, in this case, the transfer transaction records are packaged and stored in a certain block and stored on the nodes of the blockchain, and the blocks form a blockchain, which is a simple consensus process. The verification and confirmation that 100 yuan of account A is available is to trace all transactions of account A to find the source of the 100 yuan, and the supporting data of the verification and confirmation is all historical transaction information related to account A on the block chain, the historical transaction information is randomly stored in each block of the block chain, and the blocks are randomly scattered at each position of the block chain.
As described above, if a certain blockchain node needs to participate in consensus (authentication), the node needs to store all the blockchain block information. Because the blocks used in the transaction verification validation are all related to a certain account, firstly the account to be verified and validated has randomness, and secondly the required blocks also have randomness, which are unpredictable, only all the block data can be stored to meet the requirement of consensus (verification). However, as transactions continue to progress and time passes, the number of blocks increases, and if all the block data needs to be stored, a lot of storage space is occupied and the required storage space increases. The storage space for storing block data after a period of time is remarkable, and simultaneously, in order to ensure the efficiency of transaction verification, higher requirements are continuously put on the computing capability of the consensus node along with the continuous increase of the data volume. Under the condition, only a few 'super nodes' can meet the requirement of consensus, and the consensus can be only performed among the few 'super nodes' for a long time. The requirement on the super nodes is higher and higher, the number of the super nodes meeting the requirement is less and less, the centralization trend is gradually shown, the centralization is possible to be realized finally, and the super nodes are more likely to be absent at last, the massive data storage can be borne, the ultrahigh operation capability is provided, so that the block chain is stopped, and the ecological system of the block chain is seriously damaged.
Disclosure of Invention
The invention aims to solve the technical problem of providing a block chain data transfer method which can reduce the data amount stored by a block chain consensus node, does not improve the requirement on the computing capability of the consensus node, can enable as many block chain link points as possible to meet the consensus requirement to participate in consensus on the premise of ensuring safety and credibility, can be completely compatible with the transaction and consensus system of the original block chain, and can not change the characteristics of decentralized, non-falsifiable, trace in the whole process, traceable, collective maintenance, public transparency and the like of the block chain due to continuous transaction and time lapse, so that the block chain is always in a good operation state, and the ecological system of the block chain is maintained.
In order to solve the technical problems, the technical scheme adopted by the invention is as follows:
a method for performing block chain data forwarding, comprising: the data scale is reduced by carrying out balance on accounts, the data after balance of any account of the block chain can be used as the basis and the source of subsequent transactions, and the concrete steps of the block chain data balance are as follows:
step 1, initiating a carry-over transaction, wherein the carry-over transaction is block chain transaction information added with a carry-over mark, and the trigger condition of the carry-over transaction is that a system automatically starts all accounts to carry out the carry-over transaction when the number of blocks reaches a set number, or automatically triggers all accounts to carry out the carry-over transaction periodically according to a set time; all the balance transactions in the period use the same balance serial number from the moment when the same trigger balance condition is met to the moment when all the accounts produce balance trades;
step 2, generating a transfer block, wherein the block containing the transfer transaction is called the transfer block; when the accounting node generates a new block, the forward transaction is preferentially packed to generate the new block, if the forward transaction is included in the new block, a forward mark is added, and the block is identified as the forward block; if no transfer transaction exists in the newly generated block, the new block is kept consistent with the original block; after a new block is generated, chaining the new block according to a common identification mechanism of an original block chain;
step 3, linking the block link by the common identification mechanism of the original block chain, wherein the block link authenticated information of the block chain after the transfer transaction contained in the block link passes through the common identification linking chain has the same characteristics with other transactions of the block chain, and can be used as the source transaction of the subsequent transaction of the account; dividing a batch of continuous blocks into different carry-over periods, wherein the carry-over period No. 0 comprises all blocks before a first carry-over block, and each follow-up carry-over period comprises starting from the first carry-over block with a carry-over sequence number to the end of the previous block of the first carry-over block with the next carry-over sequence number; all blocks before a certain transfer period are called history blocks of the transfer period;
step 4, if the history block meeting the set condition has no influence on the authenticity of the blockchain information and the normal operation of the blockchain, the account transaction tracing only needs to trace to the nearest transfer transaction, and the history block meeting the set condition is a transfer history block; if the conversion history block needs to be sealed, the step 5 is carried out; if the rotating history block needs to be deleted, the step 7 is carried out;
step 5, storing a batch of continuous forwarding history blocks by taking the forwarding period as a unit, and calling the blocks as the sealing forwarding history blocks, wherein the link points of the blocks are called sealing nodes; when the carry-over historical block is sealed, the node is sealed and stored to initiate the transaction of the sealed carry-over historical block, the transaction of the sealed carry-over historical block comprises sealed carry-over period information and sealed node information, the sealed node signs the transaction, and the sealed carry-over period information is linked for subsequent use;
step 6, inquiring a forwarding history block; initiating a transfer history block inquiry transaction, acquiring a sealed transfer period list, splicing the list with the current block chain, and finally inquiring the transfer history block transaction and executing an incentive distribution policy;
and 7, except the node for sealing the transfer history block, all other nodes are allowed to delete the transfer history block, so that the consensus of the block chain and other normal services are not influenced.
In step 1, the output information of the transfer transaction is the current total balance of the account, and the transfer transaction verification is to verify whether the current total balance of the account is correct and available.
The number of the carry-over sequence is numbered in sequence from 1, the last carry-over sequence number is obtained on the block chain when the carry-over sequence number is calculated, the number of the last carry-over sequence number is added with 1, when the triggering condition of the carry-over transaction in the step 1 is that the number of the blocks reaches the set number, the last carry-over sequence number can be obtained by searching the first carry-over block from the height of the first triggered block, and the step of initiating the carry-over transaction is as follows:
step 1.1.1, after a new block is generated, meeting the triggering condition of initiating the transfer transaction;
step 1.1.2, calculating a carry-over sequence number;
and step 1.1.3, traversing all accounts in sequence, judging whether a certain account has a transfer closing transaction initiated by the current transfer closing sequence number, if not, initiating the transfer closing transaction of the account and signing until all the accounts generate the transfer closing transaction.
In the step 1.1.3, the method for judging whether a transfer transaction initiated by the current transfer account number exists in a certain account includes: and if the balance transaction corresponding to the balance sequence number of the account does not exist in the two verification results, the account can be judged not to have the balance transaction initiated by the current balance sequence number.
The number of the carry-over sequence is numbered in sequence from 1, the last carry-over sequence number plus 1 is obtained on the block chain when the carry-over sequence number is calculated, when the trigger condition of the carry-over transaction in the step 1 is that the trigger condition is periodically and automatically triggered according to the set time, the last carry-over sequence number can be obtained by inquiring the first carry-over block smaller than the trigger time point, and the step of initiating the carry-over transaction is as follows:
step 1.2.1, before a certain account initiates a transaction, judging whether a preset trigger time condition is met, if not, directly initiating the transaction;
step 1.2.2, if a certain account meets the conditions before initiating a transaction, calculating a transfer settlement serial number;
step 1.2.3, judging whether the transfer transaction with the current transfer sequence number in effect exists, if so, continuing to initiate the transaction;
and 1.2.4, if the balance transaction does not exist, continuing to initiate the transaction after the balance transaction takes effect.
If the account initiates the historical transaction information inquiry in the step 6, the specific flow is as follows:
step 6.1, initiating a carry-over history block query transaction; the conversion history block query transaction can be supported by an incentive mechanism of each block chain, and an incentive mechanism exists for a public chain;
step 6.2, a sealed storage spin-up period list is obtained;
step 6.3, judging whether the carry-over period can be linked with the current block chain; pushing forward the currently sealed carry-over period from large to small according to the number until the carry-over period number is discontinuous, if the carry-over period with the number which can be continuous exists, returning to be successful, and entering the step 6.4, otherwise, returning to be failed;
step 6.4, acquiring the information of the forwarding historical block and splicing the information with the current block chain;
step 6.5, judging whether the assembly is successful, if the assembly is failed, judging that no forwarding history block which can be continuously pushed forward with the current block exists; if the assembly is successful, a forwarding history block which can be continuously pushed forward with the current block exists;
step 6.6, inquiring the transaction of the transfer history block and executing an incentive distribution scheme; and inquiring the block transaction information of the settlement history and returning a result, and distributing excitation to the block chain nodes providing related services according to the excitation scheme.
In step 6.4, the process of forwarding historical block information and assembling the current block chain is as follows: acquiring the information of the transfer history blocks from the sealed nodes, assembling all the acquired transfer history blocks with the current block chain to form a temporary chain, verifying whether the previous block is tampered by a mechanism of storing the characteristic information of the previous block by the subsequent blocks of the block chain during assembling, discarding the previous block if the previous block is judged to be tampered, acquiring the corresponding transfer history blocks from other sealed nodes again, and finishing assembling if no transfer history blocks meeting the conditions exist; and if the block is acquired and is not tampered, assembling the block into a chain, and continuing assembling the next block until all the forwarding history blocks are assembled.
The block chain data transmission method has the following beneficial effects: the block chain data transfer method calculates the total balance of each current account by using the transfer service in the banking service for reference, and initiates a special transaction of transferring the balance to the account, wherein the special transaction is called the transfer transaction, and the process is called the account transfer. The balance of the corresponding account after the uplink of the transfer-forward transaction takes effect is credible and available, then the account can use the balance as a base and a source to carry out subsequent transaction, and the subsequent transaction verification of the account can be carried out without historical transaction information stored in a block before the block chain, and the transaction verification and consensus can be carried out as long as the transfer-forward transaction which is recently taken effect by the account. The existence of some blocks has no influence on the normal operation of the current block chain, these blocks are called as the forwarding history blocks, and the block link points can seal the forwarding history blocks or delete the forwarding history blocks. The method can effectively reduce the data volume of real-time operation of the storage of the chain nodes of the blocks, and avoid various problems caused by large data volume. Meanwhile, by various means such as an excitation mechanism, the link points of part of the blocks are used for sealing the rotating historical blocks and providing query service, and the characteristics of whole-course trace retention, traceability and the like of the block chain are further realized, so that various service requirements of the block chain are met.
Drawings
Fig. 1 is a flowchart illustrating a method for performing block link data forwarding according to the present invention.
FIG. 2 is a schematic diagram illustrating a comparison between the forward transaction and the normal transaction structure in the blockchain data forward method of the present invention
Fig. 3 is a schematic diagram illustrating a comparison between the structure of a forwarding block and a normal block in a method for forwarding block chain data according to the present invention.
Fig. 4 is a flowchart illustrating a process of verifying a forward transaction trigger condition after a new block is generated in a method for forwarding blockchain data according to the present invention.
Fig. 5 is a flowchart illustrating a process of verifying whether a forward transaction initiated by a forward serial number exists in an account in a blockchain data forwarding method according to the present invention.
Fig. 6 is a flowchart illustrating the operation of verifying the trigger condition of the transfer transaction when a new transaction is initiated in an account in the method for transferring blockchain data according to the present invention.
Fig. 7 is a block chain diagram after adding a forwarding block in a block chain data forwarding method according to the present invention.
Fig. 8 is a schematic diagram of a block link forwarding period in a block link data forwarding method according to the present invention.
Fig. 9 is a schematic diagram illustrating that the forwarding history blocks are stored in units of forwarding cycles in the method for forwarding blockchain data according to the present invention.
FIG. 10 is a flowchart illustrating the block chaining data forwarding method according to the present invention.
Fig. 11 is a block chain diagram of a related node after deleting a forwarding history block in the block chain data forwarding method of the present invention.
FIG. 12 is a flowchart illustrating deleting a forwarding history block in a method for forwarding blockchain data according to the present invention.
Fig. 13 is a flowchart of transaction information query in a blockchain data forwarding method according to the present invention.
Fig. 14 is a flowchart of assembling a forwarding history block and a current blockchain in a blockchain data forwarding method according to the present invention.
Detailed Description
The invention is further described below with reference to the drawings and specific preferred embodiments.
A block chain data transfer system and a block chain data transfer device adopt a block chain with a single accounting node as a common identification mechanism, wherein the single accounting node common identification mechanism refers to the situation that more than one block can never occur simultaneously, and a new block can be generated by only one accounting node at the same time, so that the situation of block chain branching can not occur.
As shown in fig. 1, a method for performing block link data forwarding includes the following steps: step 1, initiating a transfer-forward transaction; step 2, generating a carry-over block; step 3, chaining the link block; step 4, carrying out the transfer of the history block; step 5, sealing and storing the carry-over historical block; step 6, inquiring a forwarding history block; and 7, deleting the forwarding history block.
In step 1, the transfer-off transaction only needs to expand the transaction information of the original block chain, add the transfer-off tag, that is, fill the transfer-off serial number, and is compatible with the original transaction, as shown in fig. 2, the transaction with the transfer-off tag is a transfer-off transaction, which means that the account itself initiates a special transfer-off transaction, the input transaction of the transaction may be null or the last transaction of the current account, the output information is the total balance of the current account, and the subsequent transaction verification is to verify whether the current total balance of the account is correct and available. Input transaction information is not used in the scenario to initiate a carry-over transaction, and the fill-in transaction is used to accommodate the needs of certain blockchains.
Triggering conditions for the forward-to-forward transaction trigger include, but are not limited to: firstly, taking the number of blocks as a trigger condition; second, a fixed time interval is used as a trigger condition. Regardless of the mode of independent triggering or the combination of the two modes of triggering, the triggering conditions of the two transfer-forward transactions need reasonable time intervals, so that the transfer-forward transactions are prevented from being frequently triggered and enough time needs to be reserved to ensure that all accounts can complete the transfer-forward transactions. All the balance transactions in the period from the moment when the trigger balance condition is met to the moment when all the accounts produce balance changes use the same balance serial number, and the balance serial numbers are numbered in sequence from 1. And acquiring the last carry forward sequence number +1 on the block chain when calculating the carry forward sequence number.
Because the data volume of the block chain is closely related to the number of blocks, when the number of blocks is taken as a trigger condition, the system can be defined to automatically trigger the transfer-forward transaction of all accounts after a certain number of blocks are reached, and at the moment, the first transfer-forward block can be searched from the height of the first triggered block, so that the last transfer sequence number can be obtained.
Because the data volume of the block chain is closely related to the running time, when a fixed time interval is used as a trigger condition, the system can set the fixed time interval of every week, every month, every quarter, every year and the like to periodically and automatically trigger the transfer forward transaction of all accounts, and at the moment, the first transfer forward block smaller than the trigger time point can be inquired forward, and the last transfer forward serial number can be obtained.
The process of checking whether the forward transaction trigger condition is satisfied after a new tile is generated is shown in FIG. 4: and after the new block is generated, if the conditions for triggering the transfer-over transaction are met, calculating the transfer-over serial number, circularly traversing all accounts, judging whether the transfer-over transaction initiated by the current transfer-over serial number exists in a certain account, if not, initiating the transfer-over transaction of the account and signing until all the accounts generate the transfer-over transaction. The flow of verifying whether a transfer transaction initiated by a current transfer number exists in a certain account is shown in fig. 5: because the transaction of each blockchain mainly exists in the transaction pool of each node and the block of the blockchain, the forward transaction is also a transaction mechanism which can be compatible with the original blockchain, and therefore whether the forward transaction of the current forward sequence number is initiated by the current account is verified in the transaction pool cached by the node and the uplink block. When the transfer-forward transaction of the current transfer-forward sequence number does not exist in the transaction pool cached by the node and the uplink block, the transfer-forward transaction of the account is initiated, so that the transfer-forward transaction of a certain account can be prevented from being initiated repeatedly.
The flow of checking whether the forward transaction triggering condition is satisfied before a certain account initiates a transaction is shown in fig. 6: verifying whether a condition for carrying out forward transaction triggering is met before a certain account initiates a transaction, and if the condition is not met, directly initiating a new transaction; if the transfer-over transaction triggering condition is met, the new transaction can be initiated only by taking the transfer-over transaction of the current transfer-over serial number which takes effect as a final source, so that whether the transfer-over transaction of the current transfer-over serial number which takes effect exists needs to be verified; if the effective carry-over transaction of the current carry-over sequence number exists, the carry-over transaction is required to be used as the final source transaction of all subsequent transactions to initiate a new transaction; if the effective carry-over transaction of the current carry-over sequence number does not exist, judging whether the effective carry-over transaction of the current carry-over sequence number does not exist or not; if the transfer closing transaction of the current transfer closing sequence number which is not effective yet exists, waiting for the transfer closing transaction to be effective, and then issuing a new transaction; and if the balance transaction of the current balance sequence number which is not validated does not exist, prompting the user to initiate the account balance transaction, and initiating a new transaction after the relevant balance transaction is validated.
Further, the system has two transaction modes of a forward transaction and a common transaction, and the two transaction verification methods are as follows: the transfer transaction verification calculates the current total balance of an account according to all transactions of the account on the current block chain, and verifies whether the total balance of the account is correct and available when the transfer transaction is generated. Meanwhile, the transaction signature needs to be verified, and the verification of the transaction signature only verifies whether the transaction information is consistent with the signature or not and whether the transaction information is tampered or not. And after the verification of the transfer transaction is passed, the transfer transaction is recorded in the node transaction pool, and if the verification is not passed, the transfer transaction is discarded. The tracing of the transaction during the ordinary transaction verification can be only until the transfer transaction which has been validated last time, and forward tracing verification is not needed, because the balance of the transfer transaction according to the mechanism of the block chain is real, credible and available, and other verification contents are unchanged. And after the transaction verification is passed, the transaction is recorded in the node transaction pool, and if the transaction verification is not passed, the transaction is discarded.
In step 2, the difference between the carry-over block and the normal block is whether the current block contains the carry-over transaction, as shown in fig. 3, when the accounting node generates a new block, the carry-over transaction is preferentially packed to generate a new block, the carry-over transaction serial numbers in the same block are consistent, the carry-over transaction trigger mechanism and the carry-over serial number calculation algorithm ensure that the carry-over transactions with inconsistent carry-over serial numbers are not simultaneously packaged, if the new block contains the carry-over transaction, a carry-over mark is added to mark that the block is the carry-over block, the carry-over mark is a carry-over serial number for filling the carry-over transaction, and if the block does not contain the carry-over block, the new block is kept consistent with the original block. And after the new block is generated, the new block is uplinked according to the consensus mechanism of the original block chain.
In step 3, the block chaining, the transfer block and the common block chaining are basically indistinguishable through a common identification mechanism of the original block chain, only the transfer transaction and the common transaction need to be verified respectively during the transaction verification, and other common identification mechanisms are completely compatible with the original block chain, the block chain is as shown in fig. 7 after the transfer block is added, the transfer block and the common block can appear at intervals or continuously, and both types are not required to be continuous. The information authenticated by the block chain after the transfer transaction passes through the common identification chain has the same characteristics with other transactions of the block chain, and the information is authentic and credible and can be used as a source transaction of subsequent transactions of the account.
Further, a batch of consecutive blocks in the block chain is divided into different carry forward periods, as shown in fig. 8, all blocks before the first carry forward block belongs to the first carry forward period, which is defined as the carry forward period numbered 0. Starting from the first carry-over block of a carry-over sequence number to the previous carry-over block of the first carry-over block of the next carry-over sequence number, ending as a carry-over period, taking the carry-over sequence number with smaller two as the sequence number of the carry-over period, the blocks belong to the carry-over period, and so on, the block chain is divided into a plurality of carry-over periods, and at this time, each corresponding block can belong to a carry-over period. The transfer block and the normal block can be present at intervals or continuously, and the division of the transfer period is not influenced. The carry-over period 0 is a special carry-over period, which does not include carry-over blocks, and other carry-over periods begin with carry-over blocks. All blocks before any spin-down cycle are called history blocks of the spin-down cycle, which may be referred to as history blocks for short, and history blocks are used to represent the relationship.
In step 4, by presetting conditions, the history blocks meeting the conditions are defined as the forwarding history blocks, for example, the history blocks before three forwarding cycles can be defined as the forwarding history blocks. The history blocks meeting the conditions have no influence on the authenticity of the blockchain information and the normal operation of the blockchain, and the account transaction tracing only needs to trace to the nearest transfer transaction. The subsequent steps process the transfer history block by taking the transfer period as a unit.
In step 5, the procedure of sealing the transmission and reception history block is as shown in fig. 10, after initiating the task of sealing the transmission and reception history block, whether the transmission and reception history block exists is determined, the existing transmission and reception history block is stored to form the sealing and reception history block, and finally the information of the sealing and reception history block is linked. The block link node stores a batch of consecutive forwarding history blocks in units of forwarding cycles, which is called a block forwarding history block, and the block link node is called a block node, as shown in fig. 9. And initiating the transaction of the sealed transfer-off history block by the node for sealing off the transfer-off history block, wherein the transaction comprises sealed transfer-off period information and sealed node information, the sealed node signs the transaction, and the sealed transfer-off period information is linked for subsequent use. The sealed node needs to ensure that the sealed transfer history block is not tampered and can normally provide service to obtain the corresponding excitation. The public chain must have an incentive to encourage block-link point-to-point blocking of the block of the spin history, and for both the public and private chains, an incentive may be set to allow certain block-link points to block the spin history. The excitation mechanism may be defined according to different situations, and the excitation mechanism adopted in this embodiment is: the node storing the forwarding history block may provide services for subsequent forwarding history block queries and obtain corresponding incentives, and it is suggested that more incentives may be obtained for the sequestration node providing the forwarding history block with the longer storage time in the incentive mechanism.
In step 6, the query of the transition history block needs to be paid according to the incentive mechanism of the block chain, the process of querying transaction information is shown in fig. 13, the query of the history transaction is divided into the current block chain query and the transition history block query, and the query of the transition history block information includes the following steps:
step 6.1, initiating a carry-over history block query transaction; if the transaction information in the balance history block needs to be inquired, the balance history block inquiry transaction needs to be initiated, the transaction needs the cooperation of an excitation mechanism of each block chain, an excitation is needed for a public chain, and whether the excitation is needed or not can be determined for a alliance chain and a private chain according to specific conditions;
step 6.2, a sealed storage spin-up period list is obtained; after the block link points seal the carry-over historical blocks, the related sealed carry-over period information can be linked up, the sealed information of all sealed nodes is integrated, and the node which stores the most sealed carry-over historical blocks and can provide services is preferentially selected.
Step 6.3, whether the carry forward period can be linked with the current block chain or not; and pushing the currently sealed and stored carry forward from large to small according to the carry forward period number of the current block chain until the carry forward period number is discontinuous, and if the carry forward period with continuous carry forward numbers exists, returning success, otherwise, returning failure.
Step 6.4, acquiring the information of the forwarding historical block and splicing the information with the current block chain; the process of assembling the forwarding history block and the current blockchain is shown in fig. 14, where forwarding history block information is obtained from the sealed node, and all the obtained forwarding history blocks are assembled with the current blockchain to form a temporary chain. According to a unique mechanism that the subsequent blocks of the block chain store the characteristic information of the previous block, whether the previous block is tampered or not needs to be verified during assembling, and if the previous block is tampered, the block is discarded. For the tampered blocks or the blocks which do not acquire information, corresponding transfer history blocks need to be acquired from other sealed nodes again, and if no transfer history blocks meeting the conditions exist, splicing is finished; and if the block is acquired and is not tampered, assembling the block into a chain, and continuing assembling the next block until all the forwarding history blocks are assembled. The information of the forwarding history blocks is credible after being assembled into the chain. During assembly, the maximum number of blocks pushed forward by the link history blocks is ensured, namely the block chain capable of being assembled is the longest chain, until the whole network has no link history blocks capable of being assembled continuously and successfully.
Step 6.5, judging whether the assembly is successful; failure in assembly: no forward history block which can be continuously pushed forward with the current block exists; and (3) successfully assembling: there is a block of the forwarding history that can be continued by pushing forward the current block.
Step 6.6, inquiring the transaction of the transfer history block and executing an incentive distribution scheme; after the block chain assembly is completed, historical block transaction information can be inquired and returned, and the result is returned, so that the block chain link points providing related services are distributed with excitation according to the excitation scheme.
In step 7, the procedure of deleting the forwarding history block is as shown in fig. 12, and first, a task of deleting the forwarding history block is initiated and whether the forwarding history block exists is determined, and if the forwarding history block exists, the forwarding history block is deleted. The block link points can delete the carry-over history blocks to save storage space and improve the node operation efficiency, so that the aim of slimming the block chain is fulfilled. The blockchain information stored by the deleted related node is shown in fig. 11.
In the block chain data transfer method and system, account transfer of a block chain means that all balance of an account of the block chain at the current moment is calculated, and a transaction for transferring the balance to the block chain from the account of the block chain is initiated, wherein the transaction is called transfer transaction, and the action is account transfer. The balance in the transfer transaction is the sum of the current available balance of the account, each account currently has only one final balance, the current total balance information of the account is credible after the transfer transaction is validated through transaction authentication and common identification uplink of the blockchain, the balance is available, and subsequent transactions can be subjected to transaction verification by taking the transfer transaction as a source transaction. The consensus node can be verified only by finding the nearest transfer transaction which takes effect of the transaction account to be verified during transaction verification without tracing forward, so that the source data scale of transaction verification can be reduced, the consensus node does not need to store too much historical information, and the aim of greatly reducing the data storage capacity of the consensus node is achieved on the premise of safety and credibility.
Further, other consensus mechanisms for blockchaining data in a manner that reduces the size of the data by carrying out a forward rotation on the account are also within the scope of the claimed invention. The mode of transfer is not limited to the account transferring to the account itself, that is, the balance of a certain account at a certain time is determined in a certain mode and is used as the base and the source of a subsequent transaction, and other consensus mechanisms without historical transaction verification are also included in the scope of the claimed invention.
The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above-mentioned embodiments, and all technical solutions belonging to the idea of the present invention belong to the protection scope of the present invention. It should be noted that modifications and embellishments within the scope of the invention may be made by those skilled in the art without departing from the principle of the invention.

Claims (5)

1. A method for performing block chain data forwarding, comprising: the data scale is reduced by adopting a mode of carrying out:
step 1, initiating a transfer closing transaction, wherein output information of the transfer closing transaction is the current total balance of an account, the transfer closing transaction is blockchain transaction information added with a transfer closing mark, and the triggering condition of the transfer closing transaction is that a system automatically triggers all accounts to carry out the transfer closing transaction when the number of blocks reaches a set number, or automatically triggers all accounts to carry out the transfer closing transaction periodically according to set time; all the balance transactions in the period use the same balance serial number from the moment when the same trigger balance condition is met to the moment when all the accounts generate balance trades;
step 2, generating a transfer block, wherein the block containing the transfer transaction is called the transfer block; when the accounting node generates a new block, the forward transaction is preferentially packed to generate the new block, if the forward transaction is included in the new block, a forward mark is added, and the block is identified as the forward block; if no transfer transaction exists in the newly generated block, the new block is kept consistent with the original block; after a new block is generated, chaining the new block according to a common identification mechanism of an original block chain;
step 3, linking the block of the transfer block through a common identification mechanism of the block chain, wherein the common identification mechanism is used for verifying the transfer transaction, namely verifying whether the current total balance of the account is correct and available, and the transfer transaction contained in the transfer block has the same characteristic as other transactions of the block chain after passing through the common identification linking and is used as a source transaction of the subsequent transaction of the account; dividing a batch of continuous blocks into different carry-over periods, wherein the carry-over period No. 0 comprises all blocks before a first carry-over block, and each follow-up carry-over period comprises starting from the first carry-over block with a carry-over sequence number to the end of the previous block of the first carry-over block with the next carry-over sequence number; all blocks before a certain transfer period are called history blocks of the transfer period;
step 4, if the history block meeting the set condition has no influence on the authenticity of the blockchain information and the normal operation of the blockchain, the account transaction tracing only needs to trace to the nearest transfer transaction, and the history block meeting the set condition is a transfer history block; if the conversion history block needs to be sealed, the step 5 is carried out; if the rotating history block needs to be deleted, the step 7 is carried out;
step 5, storing a batch of continuous forwarding history blocks by taking the forwarding period as a unit, and calling the blocks as the sealing forwarding history blocks, wherein the link points of the blocks are called sealing nodes; when the transfer-stop historical block is sealed, the sealed node initiates a transaction of the transfer-stop historical block, the transaction of the transfer-stop historical block comprises sealed transfer cycle information and sealed node information, the sealed node signs the transaction, and the sealed transfer cycle information is linked for subsequent use;
step 6, inquiring a forwarding history block; initiating a transfer history block inquiry transaction, acquiring a sealed transfer period list, splicing the list with a current block chain, and finally inquiring the transfer history block transaction and executing an incentive distribution policy;
and 7, except the node for sealing the transfer history block, all other nodes are allowed to delete the transfer history block, so that the consensus of the block chain and other normal services are not influenced.
2. The method of claim 1, wherein: the number of the carry-over sequence is numbered in sequence from 1, the last carry-over sequence number is obtained on the block chain when the carry-over sequence number is calculated, the number of the last carry-over sequence number is added with 1, when the triggering condition of the carry-over transaction in the step 1 is that the number of the blocks reaches the set number, the first carry-over block is searched from the height of the first triggered block to obtain the last carry-over sequence number, and the step of initiating the carry-over transaction at this moment is as follows:
step 1.1.1, after a new block is generated, meeting the triggering condition of initiating the transfer transaction;
step 1.1.2, calculating a carry-over sequence number;
step 1.1.3, traversing all accounts in sequence, judging whether a certain account has a transfer closing transaction initiated by the current transfer closing sequence number, if not, initiating the transfer closing transaction of the account and signing until all the accounts generate the transfer closing transaction;
in the step 1.1.3, the method for judging whether a transfer transaction initiated by the current transfer account number exists in a certain account includes: and if the balance transaction of the balance sequence number corresponding to the account does not exist in the verification results of the two times, the account can be judged not to exist in the balance transaction initiated by the current balance sequence number.
3. The method of claim 1, wherein: the number of the carry-over sequence is numbered in sequence from 1, the last carry-over sequence number plus 1 is obtained on the block chain when the carry-over sequence number is calculated, when the trigger condition of the carry-over transaction in the step 1 is that the trigger condition is periodically and automatically triggered according to the set time, the first carry-over block smaller than the trigger time point is inquired in the forward direction to obtain the last carry-over sequence number, and the step of initiating the carry-over transaction at this moment is as follows:
step 1.2.1, before a certain account initiates a transaction, judging whether a preset trigger time condition is met, if not, directly initiating the transaction;
step 1.2.2, if a certain account meets the conditions before initiating a transaction, calculating a transfer settlement serial number;
step 1.2.3, judging whether the transfer transaction with the current transfer sequence number in effect exists, if so, continuing to initiate the transaction;
and step 1.2.4, if the transaction does not exist, continuing to initiate the transaction after the carry-over transaction takes effect.
4. The method of claim 1, wherein: if the account initiates the historical transaction information inquiry in the step 6, the specific flow is as follows:
step 6.1, initiating a carry-over history block query transaction; the balance history block query transaction is supported by an excitation mechanism of each block chain, and an excitation mechanism exists for a public chain;
step 6.2, a sealed storage spin-up period list is obtained;
step 6.3, judging whether the carry-over period can be linked with the current block chain; pushing forward the currently sealed carry-over period from large to small according to the number until the carry-over period number is discontinuous, if the carry-over period with the number capable of being continuous exists, returning to be successful and entering the step 6.4, otherwise, returning to be failed;
step 6.4, acquiring the information of the forwarding historical block and splicing the information with the current block chain;
step 6.5, judging whether the assembly is successful, if the assembly is failed, judging that no forwarding history block which can be continuously pushed forward with the current block exists; if the assembly is successful, a forwarding history block which can be continuously pushed forward with the current block exists;
step 6.6, inquiring the transaction of the transfer history block and executing an incentive distribution scheme; and inquiring the block transaction information of the settlement history and returning a result, and distributing excitation to the block chain nodes providing related services according to the excitation scheme.
5. The method of claim 4, wherein: in step 6.4, the process of forwarding historical block information and assembling the current block chain is as follows: acquiring the information of the transfer history blocks from the sealed nodes, assembling all the acquired transfer history blocks with the current block chain to form a temporary chain, verifying whether the previous block is tampered by a mechanism of storing the characteristic information of the previous block by the subsequent blocks of the block chain during assembling, discarding the previous block if the previous block is judged to be tampered, acquiring the corresponding transfer history blocks from other sealed nodes again, and finishing assembling if no transfer history blocks meeting the conditions exist; and if the block is acquired and is not tampered, assembling the block into a chain, and continuing assembling the next block until all the forwarding history blocks are assembled.
CN202010169348.9A 2020-03-12 2020-03-12 Block chain data forwarding method Active CN111291067B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010169348.9A CN111291067B (en) 2020-03-12 2020-03-12 Block chain data forwarding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010169348.9A CN111291067B (en) 2020-03-12 2020-03-12 Block chain data forwarding method

Publications (2)

Publication Number Publication Date
CN111291067A CN111291067A (en) 2020-06-16
CN111291067B true CN111291067B (en) 2021-01-26

Family

ID=71029615

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010169348.9A Active CN111291067B (en) 2020-03-12 2020-03-12 Block chain data forwarding method

Country Status (1)

Country Link
CN (1) CN111291067B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112465546B (en) * 2020-11-26 2024-04-19 中诚信征信有限公司 User identification method, device and equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106228446A (en) * 2016-05-12 2016-12-14 北京众享比特科技有限公司 Transaction in assets plateform system based on privately owned block chain and method
CN106649838A (en) * 2016-12-29 2017-05-10 先锋支付有限公司 Data transmission method, block chain node and distributed database

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107360206B (en) * 2017-03-29 2020-03-27 创新先进技术有限公司 Block chain consensus method, equipment and system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106228446A (en) * 2016-05-12 2016-12-14 北京众享比特科技有限公司 Transaction in assets plateform system based on privately owned block chain and method
CN106649838A (en) * 2016-12-29 2017-05-10 先锋支付有限公司 Data transmission method, block chain node and distributed database

Also Published As

Publication number Publication date
CN111291067A (en) 2020-06-16

Similar Documents

Publication Publication Date Title
CN107169865B (en) Asset data processing system based on block chain technology
CN107392608B (en) Block chain system-based digital asset transaction method and block chain system
CN108305056B (en) Block chain-based data processing method and device and block chain node network
CN108924092B (en) Public arbitration distributed cloud storage method and system based on block chain
CN107807951A (en) A kind of block chain generation method, data verification method, node and system
CN110493148B (en) Block processing, block consensus and block synchronization method and device
CN107657438A (en) A kind of block chain generation method, data verification method, node and system
CN107301536A (en) Resource transfers method and device
CN109166037B (en) Consensus method of block chains
CN111736963A (en) Transaction processing system and method for backbone-free multi-partition blockchain
CN112261159A (en) Method and system for executing cross-slice transaction, main chain node and target slicing node
CN112015823B (en) Block chain data deleting method and device
CN112015822B (en) Block chain data deleting method and device
CN112015596B (en) Block chain data recovery method and device
CN111966538B (en) Block chain data recovery method and device
CN110060161A (en) It trades anti-heavy client service implementation method and serviced component for block chain
CN112261157B (en) Method and system for submitting cross-fragment transaction, main chain node and source fragment node
CN111667270A (en) Region-based digital currency using method and device and electronic equipment
CN111291067B (en) Block chain data forwarding method
CN110930152A (en) Data processing method based on block chain and related equipment
CN112261160B (en) Method and system for quitting cross-slice transaction in block chain system containing slices
CN110162274A (en) A kind of data processing method based on block chain, device and equipment
CN113132459A (en) Distributed storage method, system, storage medium, information data processing terminal
CN112015577A (en) Calling method and device of intelligent contract
CN115631579A (en) Charging pile metering method and system based on block chain

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