CN108519985B - Bidirectional block chain, data processing method and device - Google Patents

Bidirectional block chain, data processing method and device Download PDF

Info

Publication number
CN108519985B
CN108519985B CN201810136676.1A CN201810136676A CN108519985B CN 108519985 B CN108519985 B CN 108519985B CN 201810136676 A CN201810136676 A CN 201810136676A CN 108519985 B CN108519985 B CN 108519985B
Authority
CN
China
Prior art keywords
block
existing
transaction data
data
chain
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
CN201810136676.1A
Other languages
Chinese (zh)
Other versions
CN108519985A (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.)
Beijing Oracle Chain Technology Co ltd
Original Assignee
Beijing Oracle Chain 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 Beijing Oracle Chain Technology Co ltd filed Critical Beijing Oracle Chain Technology Co ltd
Priority to CN201810136676.1A priority Critical patent/CN108519985B/en
Publication of CN108519985A publication Critical patent/CN108519985A/en
Application granted granted Critical
Publication of CN108519985B publication Critical patent/CN108519985B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • 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

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Technology Law (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Development Economics (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides a bidirectional block chain structure, a data processing method and a device, wherein the bidirectional block chain structure comprises the following components: at least one bidirectional chain; the bidirectional chain is formed by sequentially linking a previous block and a subsequent block along two opposite directions, and the previous block stores a check value obtained by calculating data in the subsequent block through an irreversible algorithm. The scheme of the embodiment of the invention can realize the processing logic of the transaction data in the existing block in the starting block chain based on the transaction data in the newly generated block through the bidirectional linked block pointing relation.

Description

Bidirectional block chain, data processing method and device
Technical Field
The present application relates to the field of computer technologies, and in particular, to a bidirectional block chain, a data processing method, and an apparatus.
Background
As shown in fig. 1, the structure of the block chain in the prior art is extended in a chain-like unidirectional manner, and the subsequent block writes a Hash value (Hash) calculated based on the content of the previous block into the block header of the subsequent block, so as to form a logical relationship with the previous block. As new data is generated, the blockchain is continuously extended forward in the direction of the arrow, and an irreversible chain of data records is formed through the relation of hash values between blocks.
In the logic system of the block chain, only the forward development content and trend of the data can be reflected and recorded. However, in practice, there are many variations and relationships in the generation and development of data content, and the simple front-to-back recording logic inevitably limits the development of blockchain data.
Disclosure of Invention
The invention provides a bidirectional block chain structure, a data processing method and a data processing device, which can realize the processing logic of transaction data in the existing block in a block chain based on the transaction data in a newly generated block through the block pointing relation of the bidirectional link.
In order to achieve the above purpose, the embodiment of the invention adopts the following technical scheme:
in a first aspect, a bi-directional block-chain structure is provided, comprising: at least one bidirectional chain;
the bidirectional chain is formed by sequentially linking a previous block and a subsequent block along two opposite directions, and the previous block stores a check value obtained by calculating data in the subsequent block through an irreversible algorithm.
In a second aspect, a data processing method is provided, including:
responding to generation of a new block containing transaction data of an existing block in an opening block chain, calculating the data in the new block through an irreversible algorithm to obtain a check value, writing the check value of the new block into the existing block, and forming a bidirectional link with the existing block as a previous block and the new block as a next block so as to mark that the transaction data in the existing block is opened;
the newly added data in the blockchain forming the bidirectional link with the transaction data in the existing block in the open blockchain is broadcasted to the blockchain network.
In a third aspect, a data processing apparatus is provided, including:
the check value calculating module is used for responding to the generation of a new block containing the transaction data of the existing block in the open block chain, and calculating the data in the new block through an irreversible algorithm to obtain a check value;
the block linking module is used for writing the check value of the new block into an existing block to form a bidirectional link taking the existing block as a prior block and the new block as a later block so as to mark that the transaction data in the existing block is opened;
and the data broadcasting module is used for broadcasting the newly added data in the block chain which forms the bidirectional link with the transaction data in the existing block in the opened block chain to the block chain network.
According to the bidirectional block chain structure, the data processing method and the data processing device, the transaction data in the existing blocks in the block chain can be started based on the transaction data in the newly generated blocks through the bidirectional linked block pointing relation, so that the processing logic of the transaction data in the existing blocks is enabled by fully utilizing the reverse link structure among the blocks.
The foregoing description is only an overview of the technical solutions of the present application, and the present application can be implemented according to the content of the description in order to make the technical means of the present application more clearly understood, and the following detailed description of the present application is given in order to make the above and other objects, features, and advantages of the present application more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the application. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a schematic diagram of a block chain of the prior art;
FIG. 2 is a diagram illustrating a reverse link structure according to an embodiment of the present invention;
FIG. 3 is a block diagram of a bi-directional block chain structure according to an embodiment of the present invention;
FIG. 4 is a block diagram of a bi-directional block chain structure according to an embodiment of the present invention;
FIG. 5 is a block diagram of a bi-directional block chain structure according to an embodiment of the present invention;
FIG. 6 is a block diagram of a bi-directional block chain structure according to a fourth embodiment of the present invention;
FIG. 7 is a block diagram of a bidirectional block chain structure according to a fifth embodiment of the present invention;
FIG. 8 is a flowchart illustrating a first data processing method according to an embodiment of the present invention;
FIG. 9 is a flowchart illustrating a data processing method according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The blockchain was originally proposed with the generation of bitcoins, and therefore, in describing data related to the blockchain, expressions such as transaction data and ledger are adopted, and with the development of blockchain technology, information and data that can be recorded by the blockchain technology is not limited to transaction data in the conventional sense, but can be used to record any information and data. Therefore, in the embodiment of the present invention, the transaction data refers to a piece of information, data, an instruction, or the like, and the ledger refers to an aggregate made up of a plurality of transaction data.
The blockchain is a data storage structure formed by a plurality of blocks and encrypted by a blockchain technology, and the blockchain network is a network formed by a plurality of nodes for realizing the blockchain technology. The nodes in the blockchain network can be servers or terminal equipment with a function of processing blockchain data in the internet. Each node in the blockchain performs functions such as accounting for transaction data (writing transaction data to the blockchain), linking a new blockchain to an existing blockchain, and storing and verifying the blockchain.
The basic principle of the embodiment of the invention is as follows: the nodes are indicated to establish the reverse link by the transaction data of the existing blocks in the starting block chain, so that the bidirectional link is established, and the reverse link is established after the new blocks are generated. The reverse link is established by writing the check value calculated by the irreversible algorithm from the data of the new block into the previous existing block, so as to establish a reverse link from the new block to the existing block, further establish two bidirectional links from the existing block to the new block and from the new block to the existing block along the opposite direction. In the embodiment of the invention, the transaction data containing the existing block in the open block chain can be in a command form, and when the node in the block chain acquires the transaction data, the node can recognize that the processing indicated in the transaction data is to establish the reverse link, so that after the new block is generated, the establishment of the reverse link is triggered, and further the processing of the bidirectional link is established.
It should be noted that, in the embodiment of the present invention, the link between the blocks is a logical link, and this link relationship is embodied by a verification mechanism in the block chain. In a conventional blockchain, a check value generated based on a previous block is recorded in a blockhead of a subsequent block, and the block is continuously extended forward based on such a mechanism, so that a blockchain with a link direction always going forward is formed.
As shown in fig. 2, the blockchain includes a reverse link pointing to block3 from block4, that is, the block header of block3 includes a check value Hash2 of block4, the content of block3 is modified due to establishment of the reverse link, and when verifying block3 using the check value recorded in block4, since a Hash2 occurs in the block header of block3, the check value calculated based on modified block3 is not equal to the check value recorded in the block header of block4, and thus a verification error occurs.
Through this authentication mechanism, the presence of a reverse link can be identified. In practical application, a data area for filling a reverse check value can be reserved in the block header of each block, so that in the subsequent verification process, when data exists in the area, the fact that the block has a reverse link can be known, then, each block behind the block is verified based on the data, the check value calculated based on which block is found, and then, a complete reverse link relation can be known.
For identifying reverse links, this can also be done by way of blockchain error tables. The blockchain error table, which may be maintained by a supervisory node managing the blockchain network, is intended to perform the necessary modifications to the blockchain, which are done under the supervision of the supervisory node, thereby ensuring the accuracy of the blockchain data.
The modification of each block in the blockchain may be recorded in a blockchain error table corresponding to the blockchain, where the specific location (block number, row number and column number of data in the block, etc.) where the modification is located, and information or data before and after the modification are recorded in the blockchain error table. In the verification process, if the verification fails, the error table can be inquired to determine whether the block which fails to pass the verification has modification, if so, the block can be verified again by using the data or information before the modification, and if so, the block can be confirmed to be allowed to modify and not be tampered maliciously. In addition, in the blockchain error checking table, it may further record whether the modification is reverse link modification, and specifically, based on which block the generated check value and other information, so as to identify the reverse link logical relationship.
The technical solution of the present application is further illustrated by the following examples.
Example one
Based on the above concept of the reverse link structure in the block chain and the corresponding data processing scheme, as shown in fig. 3, a schematic diagram of a bidirectional block chain structure shown in the embodiment of the present invention includes: at least one bidirectional chain (such as the bidirectional chain of Block2 and Block4 in fig. 3);
the bidirectional chain is formed by sequentially linking a previous Block (such as Block2) and a subsequent Block (such as Block4) in two opposite directions, and the data in the subsequent Block is stored in the previous Block and is subjected to a check value calculated by an irreversible algorithm. For example, the irreversible algorithm may be a hash algorithm, and the corresponding check value is a hash value.
Here, the sequential linking of a previous Block and a subsequent Block in two opposite directions means that, in a direction in which the Block chain normally extends from front to back, a subsequent Block serving as a child Block is generated based on the previous Block extending as a parent Block, and then a backward link is formed in which the subsequent Block points to the previous Block, so that a chain having bidirectional links is formed like Block2 and Block4 in fig. 3.
Although the two blocks are a parent Block and a child Block in theory, check values obtained by irreversible algorithm of data in the other Block are stored in Block headers of the two blocks, which seems contradictory, because the links in the two directions are generated sequentially, logical confusion is not caused, that is, when Block4 is generated, the check values of the data in Block2 are obtained by irreversible algorithm and recorded in the Block header of Block4, and then check values of all the data in Block4 containing the check values of Block2 are obtained by irreversible algorithm and recorded in the Block header of Block 2. In other words, Block2 stores the parity of the original parent Block and the parity of the child Block 4.
In fact, the bi-directional chain structure can be regarded as two adjacent blocks, and is formed by forming a link in the direction of normal extension (Block2 → the directional link of Block4) and then forming a link in the direction opposite to the direction of normal extension (Block4 → the directional link of Block 2).
Based on the logic that when the reverse link is formed, the previous block in the two blocks having the reverse link relationship needs to be modified, so that the verification cannot pass, the transaction data in the previous block can be set to be in a closed state (i.e. the transaction data is not available) when being formed, and the transaction data is set to be turned on (i.e. the transaction data is available) after the reverse link is formed. Based on the opened logical relationship of the data, the opened logical relationship can be expanded in the formed bidirectional chain. For example, after the transaction data in the previous block is opened, the transaction data in the other blocks linked to the previous block are also opened synchronously in the bidirectional link.
Furthermore, a plurality of the bidirectional link structures may be simultaneously included in one block chain, and blocks in the bidirectional links may be separated from each other to form a plurality of non-linked bidirectional links, or may be linked together by sharing at least one block.
For example, the bi-directional block chain structure may include at least two bi-directional chains, where the two bi-directional chains share a previous block, and check values calculated by an irreversible algorithm are stored in the previous block respectively from data in a subsequent block of the two bi-directional chains.
As shown in fig. 4, a block chain state diagram showing two bidirectional chains sharing a previous block is shown. Wherein two dashed boxes each correspond to a bidirectional chain, and Block2 is a common prior Block of the two bidirectional chains, and check values of a following Block4 and a following Block5 are recorded in a Block header of Block2, respectively.
Based on the specific application of the structure shown in fig. 4 in the actual scenario, the logic of the existing blocks in the open blockchain may be configured, that is, when the transaction data including the existing blocks in the open blockchain is stored in at least two new blocks; it is determined that the transaction data in the existing block is finally opened only when all new blocks containing the transaction data of the existing block in the open block chain are generated and a corresponding number of bi-directional links are formed.
As shown in fig. 4, assuming that all transaction data for opening Block2 are recorded in the following Block4 and the following Block5, the transaction data in Block2 is finally determined to be valid and opened after both Block4 and Block5 form reverse links with Block2, thereby forming the two bidirectional chains.
For another example, the bidirectional block chain structure may include at least two bidirectional chains, where the two bidirectional chains share a following block, and check values calculated by an irreversible algorithm on data in the following block are stored in preceding blocks of the two bidirectional chains, respectively.
As shown in fig. 5, a block chain state diagram is shown in which two bidirectional chains share a subsequent block. Wherein two dashed boxes each correspond to one bidirectional chain, and Block4 is a common succeeding Block of the two bidirectional chains, and check values of succeeding Block4 are recorded in Block headers of preceding Block2 and preceding Block3, respectively.
Based on the specific application of the structure shown in fig. 5 in the actual scenario, the logic of the existing blocks in the open block chain may be set, that is, when the transaction data including a plurality of existing blocks in the open block chain is stored in the same new block; then, after the same new block containing the transaction data of the existing blocks in the open block chain is generated and a corresponding number of bidirectional links are formed, it is determined that the transaction data in the existing blocks are open, respectively.
As shown in fig. 5, assuming that transaction data for starting Block2 and Block3 is recorded in the back Block4, it may be determined that the transaction data in Block2 is valid and the transaction data is started after Block4 and Block2 form a reverse link and further form a bidirectional link; after Block4 and Block3 form a reverse link and further form a bidirectional link, the transaction data in Block3 are determined to be valid, and the transaction data is opened. After the transaction data in Block2 and Block3 are confirmed to be opened, the transaction data in other blocks which may exist and are mutually linked with the previous blocks in the two bidirectional chains can also be set to be valid according to preset processing logic.
Further, in any of the above bidirectional block chain structures, a block and/or sub-block chain linked to a previous block in the bidirectional chain may be further included. For example, fig. 6 shows that, based on the structure shown in fig. 3, Block5 is linked to Block2, and a sub-Block chain consisting of Block6 and Block7 contains two blocks.
In a practical application scenario, for example, as shown in fig. 6, after the transaction data in Block2 is confirmed to be turned on, the transaction data in another Block (Block5) linked to the previous Block (Block2) in the bidirectional chain and/or a Block in a subblock chain (a subblock chain composed of Block6 and Block 7) may also be set to be valid according to preset processing logic.
Similarly, in a practical application scenario, for example, as shown in fig. 4, after the transaction data in Block2 is confirmed to be turned on, the transaction data in other blocks and/or blocks of the sub-Block chain that are linked with each other with the common prior Block2 in the bidirectional chain may also be set to be valid according to the preset processing logic.
Similarly, in a practical application scenario, for example, as shown in fig. 5, after the transaction data in Block2 and Block3 is confirmed to be valid, the transaction data in other blocks and/or blocks of the sub-Block chain linked with Block2 and Block3 may also be set to be valid according to preset processing logic.
Further, in any of the above bidirectional block chain structures, a block and/or a sub-block chain may be further included, in which a preceding block in the bidirectional chain is used as a parent block, and a following block is used as a sub-block.
For example, fig. 7 shows that, on the basis of the structure shown in fig. 3, a Block2 is used as a parent Block, a Block5 is used as a child Block, and the child Block is linked to a Block4 in a Block chain and a sub-Block chain consisting of Block6 and Block 7. The transaction data in Block4 and/or blocks Block6 and Block7 of the subblock chain may be used as the previous data or condition data of Block 5.
The bidirectional block chain structure provided by the embodiment of the invention can realize the processing logic of the transaction data in the existing blocks in the block chain based on the transaction data in the newly generated block through the bidirectional linked block pointing relationship.
Further, a common prior block may be included in the at least two bidirectional chains formed, thereby implementing processing logic that opens transaction data in existing blocks in the block chain based on transaction data in a plurality of newly generated blocks.
Further, a common one of the subsequent tiles may be included in the at least two formed endless chains, thereby enabling processing logic to open transaction data in a plurality of existing tiles in the chain of tiles based on transaction data in the same newly generated tile.
Further, in the formed bidirectional chain, a chain of blocks and/or sub-blocks linked to a previous block in the bidirectional chain may be included, thereby implementing processing logic that synchronously opens transaction data in other blocks linked to a previous block in the bidirectional chain while opening transaction data in existing blocks in the chain of blocks based on transaction data in the newly generated block.
Example two
Based on the above solution idea of the reverse link structure in the block chain and corresponding data processing, as shown in fig. 8, it is a first flowchart of a data processing method shown in the embodiment of the present invention, and an execution main body of the method may be a processing node in the block chain. As shown in fig. 8, the data processing method includes:
s810, responding to the generation of a new block containing the transaction data of the existing block in the starting block chain, and calculating the data in the new block through an irreversible algorithm to obtain a check value;
s820, the check value of the new block is written into the existing block to form a bidirectional link with the existing block as the previous block and the new block as the next block, so as to mark that the transaction data in the existing block is opened.
In the process of generating a new block by extending a block chain, if transaction data for opening an existing block is stored in the current new block, after the new block is generated, the new block is used as a sub-block of the existing block to be linked into the block chain, a check value is calculated from the data in the new block through an irreversible algorithm, and the check value of the new block is written into the existing block, so that bidirectional linking with the existing block as a previous block and the new block as a next block is formed. The bidirectional link is used for identifying that the transaction data in the existing block is opened.
The fact that the transaction data are opened means that the transaction data are valid, and a new block corresponding to new transaction data can be generated based on the opened transaction data.
For example, in the field of asset processing, there may be a need for: a batch of assets is sold in a designated block set, but the assets are in an invalid state initially, and after a certain condition is met, a special transaction is executed in a subsequent block, and all the assets in the previous designated block are started. The above condition may be that a certain period of time passes, for example, for some commodities that are still in the quality inspection period, the commodities have the value of selling after the quality inspection passes. Alternatively, the condition may be a change in the form of the asset (initialization to invalid) which, when it occurs, triggers the asset to enter a valid state by means of special transaction data.
In this case, a reverse link may be triggered by a special transaction data to open the transaction data in the previous designated block, so that the assets of the previous block are changed from invalid to valid.
S830, new data in the block chain forming the bidirectional link with the transaction data in the existing block in the open block chain is broadcasted to the block chain network.
Since the bidirectional link includes a reverse link, and the reverse link involves modification of an existing block before, after a node generates a new block, not only the new block needs to be broadcast, but also new data in the existing block needs to be broadcast to a blockchain network, so as to perform verification and validation on a final blockchain through a consensus mechanism of multiple nodes.
Further, in the above method steps, if the transaction data including the existing block in the open block chain is stored in at least two new blocks, the method steps shown in fig. 8 can be further specifically detailed as the method steps shown in fig. 9, including:
s910, responding to the generation of a new block containing the transaction data of the existing block in the starting block chain, and calculating the data in the new block through an irreversible algorithm to obtain a check value;
s920, writing the check value of the new block into the existing block to form a bidirectional link with the existing block as a previous block and the new block as a next block;
steps S910 to S920 are similar to those of steps S810 to S820 described above.
Specifically, the transaction data including the existing blocks in the closed block chain may be stored in at least two new blocks. Therefore, the bidirectional link formed based on the existing blocks may be plural.
S930, after all new blocks containing the transaction data of the existing blocks in the open block chain are generated to form a plurality of bidirectional links in corresponding numbers, determining that the transaction data in the existing blocks are finally opened.
In the process of generating new blocks by extending the block chain, the transaction data for starting the existing blocks may be located in different new blocks, after all the new blocks are generated, the data in the new blocks can be calculated by an irreversible algorithm to obtain check values, and the check values of the new blocks are written into the existing blocks, so that a plurality of bidirectional links with the existing blocks as the previous blocks and the new blocks as the next blocks are formed. The two-way links are used together to identify that the transaction data in the existing block is opened. I.e., the bi-directional chain formed on the basis of each new block may be an insufficient prerequisite for starting up the transaction data in the existing block.
S940, the newly added data in the block chain forming the bidirectional link with the transaction data in the existing block in the open block chain is broadcasted to the block chain network.
Step S940 is the same as step S830 described above.
Further, after determining that the transaction data in the existing block in the block chain is opened, it may also be determined that the transaction data in other blocks linked with the existing block is opened synchronously.
For example, in the field of asset processing, there may be a need for: a batch of assets is sold in a designated block set, but the assets are in an invalid state initially, and other asset transactions based on the batch of assets are linked with the block (in an invalid state initially), after a certain condition is met, a special transaction is executed in a subsequent block, all the assets of the previous designated block are started, and other related asset transactions based on the assets are started synchronously. The condition may be that a certain period of time passes, for example, for some commodities that are still in the quality inspection period, after the quality inspection passes, the commodity has the value of sale, and related services based on the commodities (the transaction data is stored in other blocks linked with the previously specified block) need to be opened. Alternatively, the condition may be a change in the form of the asset (initialization to invalid) which, when it occurs, triggers the asset to enter a valid state by means of special transaction data. At the same time, other transactions based on these assets (the portion of transaction data stored in other tiles linked to the previously designated tile) may also be started in synchronization.
The data processing method provided by the embodiment of the invention can realize processing logic for starting the transaction data in the existing block in the block chain based on the transaction data in the newly generated block based on the bidirectional linked block pointing relationship.
Further, when the transaction data including the existing block in the starting block chain is stored in at least two new blocks, the transaction data in the existing block is finally marked to be started only after the two-way link where the two new blocks are located is formed.
Further, after determining that the transaction data in the existing block in the block chain is opened, it may also be determined that the transaction data in other blocks linked with the existing block is opened synchronously.
EXAMPLE III
As shown in fig. 10, which is a schematic structural diagram of a data processing apparatus according to a first embodiment of the present invention, the apparatus may be a server disposed in a network, and configured to perform the method steps shown in the second embodiment. As shown in fig. 10, the data processing apparatus includes:
the check value calculating module 101 is configured to calculate a check value by an irreversible algorithm for data in a new block in response to generation of the new block including transaction data of an existing block in the open block chain;
the block linking module 102 is configured to write the check value of the new block into an existing block, and form a bidirectional link with the existing block as a previous block and the new block as a subsequent block to identify that the transaction data in the existing block is opened;
the data broadcasting module 103 is configured to broadcast, to a blockchain network, new data in a blockchain forming a bidirectional link with transaction data in an existing block in an open blockchain.
Further, the transaction data including the existing blocks in the open block chain is stored in at least two new blocks;
accordingly, the block linking module 102 is further configured to,
and when all new blocks containing the transaction data of the existing blocks in the starting block chain are generated and a plurality of bidirectional links with corresponding quantity are formed, determining that the transaction data in the existing blocks are finally started.
Further, the block linking module 102 is further configured to,
after determining that the transaction data in the existing block in the block chain is started, determining that the transaction data in other blocks linked with the existing block is started synchronously.
The data processing device provided by the embodiment of the invention can realize processing logic for starting the transaction data in the existing block in the block chain based on the transaction data in the newly generated block based on the bidirectional linked block pointing relation.
Further, when the transaction data including the existing block in the starting block chain is stored in at least two new blocks, the transaction data in the existing block is finally marked to be started only after the two-way link where the two new blocks are located is formed.
Further, after determining that the transaction data in the existing block in the block chain is opened, it may also be determined that the transaction data in other blocks linked with the existing block is opened synchronously.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (10)

1. A data processing method, comprising:
responding to generation of a new block containing transaction data of an existing block in an opening block chain, calculating the data in the new block through an irreversible algorithm to obtain a check value, writing the check value of the new block into the existing block, and forming a bidirectional link with the existing block as a previous block and the new block as a next block so as to mark that the transaction data in the existing block is opened;
the newly added data in the blockchain forming the bidirectional link with the transaction data in the existing block in the open blockchain is broadcasted to the blockchain network.
2. The method of claim 1, wherein the transaction data containing existing blocks in an open blockchain is stored in at least two new blocks;
the method further comprises the following steps:
and when all new blocks containing the transaction data of the existing blocks in the starting block chain are generated and a plurality of bidirectional links with corresponding quantity are formed, determining that the transaction data in the existing blocks are finally started.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
after determining that the transaction data in the existing block in the block chain is started, determining that the transaction data in other blocks linked with the existing block is started synchronously.
4. A bidirectional blockchain formed by the data processing method according to any one of claims 1 to 3, comprising: at least one bidirectional chain;
the bidirectional chain is formed by sequentially linking a previous block and a subsequent block along two opposite directions, and the previous block stores a check value obtained by calculating data in the subsequent block through an irreversible algorithm.
5. The bi-directional block chain according to claim 4, wherein the bi-directional block chain structure comprises at least two bi-directional chains, the two bi-directional chains share a previous block, and the previous block stores therein check values calculated by an irreversible algorithm from data in a subsequent block of the two bi-directional chains.
6. The bi-directional block chain according to claim 4, wherein the bi-directional block chain structure comprises at least two bi-directional chains, the two bi-directional chains share a following block, and the following block stores therein check values calculated by the irreversible algorithm for data of a preceding block of the two bi-directional chains, and the preceding block stores therein check values calculated by the irreversible algorithm for data of the following block.
7. The bi-directional blockchain according to any one of claims 4 to 6, further comprising:
a chain of blocks and/or sub-blocks linked to a previous block in the bi-directional chain.
8. A data processing apparatus, comprising:
the check value calculating module is used for responding to the generation of a new block containing the transaction data of the existing block in the open block chain, and calculating the data in the new block through an irreversible algorithm to obtain a check value;
the block linking module is used for writing the check value of the new block into an existing block to form a bidirectional link taking the existing block as a prior block and the new block as a later block so as to mark that the transaction data in the existing block is opened;
and the data broadcasting module is used for broadcasting the newly added data in the block chain which forms the bidirectional link with the transaction data in the existing block in the opened block chain to the block chain network.
9. The apparatus of claim 8, wherein the transaction data containing existing blocks in an open blockchain is stored in at least two new blocks;
the block linking module is configured to,
and when all new blocks containing the transaction data of the existing blocks in the starting block chain are generated and a plurality of bidirectional links with corresponding quantity are formed, determining that the transaction data in the existing blocks are finally started.
10. The apparatus of claim 8 or 9, wherein the block linking module is further configured to,
after determining that the transaction data in the existing block in the block chain is started, determining that the transaction data in other blocks linked with the existing block is started synchronously.
CN201810136676.1A 2018-02-09 2018-02-09 Bidirectional block chain, data processing method and device Active CN108519985B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810136676.1A CN108519985B (en) 2018-02-09 2018-02-09 Bidirectional block chain, data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810136676.1A CN108519985B (en) 2018-02-09 2018-02-09 Bidirectional block chain, data processing method and device

Publications (2)

Publication Number Publication Date
CN108519985A CN108519985A (en) 2018-09-11
CN108519985B true CN108519985B (en) 2020-09-11

Family

ID=63433106

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810136676.1A Active CN108519985B (en) 2018-02-09 2018-02-09 Bidirectional block chain, data processing method and device

Country Status (1)

Country Link
CN (1) CN108519985B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3668036A1 (en) * 2018-12-14 2020-06-17 Siemens Aktiengesellschaft Creation of a blockchain with blocks comprising an adjustable number of transaction blocks and multiple intermediate blocks
CN111639080B (en) * 2020-06-01 2021-07-27 腾讯科技(深圳)有限公司 Data processing method and device, node equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02216552A (en) * 1989-02-17 1990-08-29 Hokkaido Nippon Denki Software Kk System for releasing data area of data base system
CN106341421A (en) * 2016-10-31 2017-01-18 杭州云象网络技术有限公司 Block chain technology based data exchange method
CN106446705A (en) * 2016-08-26 2017-02-22 杨鹏 Cyclic writing method and system of data on the basis of block chain
CN106534085A (en) * 2016-10-25 2017-03-22 杭州云象网络技术有限公司 Privacy protection method based on block chain technology
CN106815330A (en) * 2016-12-29 2017-06-09 北京瑞卓喜投科技发展有限公司 The generation method and system of the block chain expanded along Spatial Dimension
CN106844477A (en) * 2016-12-23 2017-06-13 北京众享比特科技有限公司 To synchronous method after block catenary system, block lookup method and block chain
CN106897352A (en) * 2016-12-29 2017-06-27 北京瑞卓喜投科技发展有限公司 The generation method and system of the block chain modified in expansion
CN107146087A (en) * 2017-04-11 2017-09-08 广东网金控股股份有限公司 A kind of quick common recognition bookkeeping methods and system based on block chain alliance chain
CN107171829A (en) * 2017-04-24 2017-09-15 杭州趣链科技有限公司 A kind of dynamic node management method for algorithm realization of being known together based on BFT

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9967096B2 (en) * 2016-05-23 2018-05-08 Accenture Global Solutions Limited Rewritable blockchain

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02216552A (en) * 1989-02-17 1990-08-29 Hokkaido Nippon Denki Software Kk System for releasing data area of data base system
CN106446705A (en) * 2016-08-26 2017-02-22 杨鹏 Cyclic writing method and system of data on the basis of block chain
CN106534085A (en) * 2016-10-25 2017-03-22 杭州云象网络技术有限公司 Privacy protection method based on block chain technology
CN106341421A (en) * 2016-10-31 2017-01-18 杭州云象网络技术有限公司 Block chain technology based data exchange method
CN106844477A (en) * 2016-12-23 2017-06-13 北京众享比特科技有限公司 To synchronous method after block catenary system, block lookup method and block chain
CN106815330A (en) * 2016-12-29 2017-06-09 北京瑞卓喜投科技发展有限公司 The generation method and system of the block chain expanded along Spatial Dimension
CN106897352A (en) * 2016-12-29 2017-06-27 北京瑞卓喜投科技发展有限公司 The generation method and system of the block chain modified in expansion
CN107146087A (en) * 2017-04-11 2017-09-08 广东网金控股股份有限公司 A kind of quick common recognition bookkeeping methods and system based on block chain alliance chain
CN107171829A (en) * 2017-04-24 2017-09-15 杭州趣链科技有限公司 A kind of dynamic node management method for algorithm realization of being known together based on BFT

Also Published As

Publication number Publication date
CN108519985A (en) 2018-09-11

Similar Documents

Publication Publication Date Title
CN108462582B (en) Feedback processing method and device in block chain
CN108510268B (en) Annular block chain structure, data processing method and device
CN113329031B (en) Method and device for generating state tree of block
CN108389129B (en) Transaction execution method and device based on block chain and electronic equipment
CN107330681B (en) Method and equipment for determining transaction time of transaction outside block chain
CN108512649B (en) Processing method and device for reverse hash link of block chain
US20210049715A1 (en) Blockchain-based data procesing method, apparatus, and electronic device
CN108769264B (en) Block chain domain division method
CN107463597B (en) Passive verification method and system for block chain of modified block volume data
CN106909605B (en) Method and system for generating block chain expanded along transverse direction
CN107391292B (en) Block chain verification method and system for realizing error correction aiming at data of block body
CN110048851B (en) Method and device for generating and verifying multilayer linkable ring signature in block chain
KR102172514B1 (en) Managing method for test data based on blockchain node apparatus of blockchain
CN108519985B (en) Bidirectional block chain, data processing method and device
CN110096903A (en) Assets verification method and block chain network system based on block chain
CN113065169B (en) File storage method, device and equipment
US20200175622A1 (en) Processing ledger transactions in a blockchain
CN109447636A (en) A kind of assets transfer method and device
CN111461751A (en) Block chain-based house property information chain organization method, historical state tracing method and device
CN108510254B (en) Chain bidirectional block chain structure, data processing method and device
CN109492049A (en) Data processing, block generation and synchronous method for block chain network
CN111177257A (en) Data storage and access method, device and equipment of block chain
CN114529415A (en) Transaction verification method and device based on block chain and electronic equipment
CN113362068B (en) Method for verifying block chain state transfer by light node
CN107451002B (en) Active verification method and system for block chain of modified block volume data

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