WO2020220251A1 - Data processing method for blockchain system and block generating method - Google Patents

Data processing method for blockchain system and block generating method Download PDF

Info

Publication number
WO2020220251A1
WO2020220251A1 PCT/CN2019/085154 CN2019085154W WO2020220251A1 WO 2020220251 A1 WO2020220251 A1 WO 2020220251A1 CN 2019085154 W CN2019085154 W CN 2019085154W WO 2020220251 A1 WO2020220251 A1 WO 2020220251A1
Authority
WO
WIPO (PCT)
Prior art keywords
chain
block
hash
parent
sub
Prior art date
Application number
PCT/CN2019/085154
Other languages
French (fr)
Chinese (zh)
Inventor
郑桂珊
Original Assignee
厦门特华荣商贸有限公司
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 厦门特华荣商贸有限公司 filed Critical 厦门特华荣商贸有限公司
Priority to CN201980000562.7A priority Critical patent/CN110235162B/en
Priority to PCT/CN2019/085154 priority patent/WO2020220251A1/en
Publication of WO2020220251A1 publication Critical patent/WO2020220251A1/en

Links

Images

Classifications

    • 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/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3827Use of message hashing
    • 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

Definitions

  • This application relates to the field of blockchain technology, and in particular to a method for processing blockchain system data and a method for generating blocks.
  • Blockchain technology also known as distributed ledger technology, is a distributed Internet database technology.
  • a network constructed based on blockchain technology can be called a blockchain network.
  • the blockchain network (or blockchain technology) has the characteristics of decentralization, openness and transparency, immutability, and trustworthiness.
  • Blockchain technology has three basic concepts:
  • Transaction An operation on the ledger, which leads to a change in the state of the ledger, such as adding a transfer record;
  • Block Record all transactions and status results that occurred within a period of time, which is a consensus on the current ledger status;
  • Chain A chain of blocks in the order of occurrence, which is a log record of changes in the state of the entire ledger.
  • the structure of the block includes the pre-Hash (Pre Hash), other information of the block (Meta Data) and the transaction list (Transactions).
  • the data structure of the blockchain is a chain data structure.
  • the chained data structure facilitates data synchronization between nodes in a distributed system.
  • the latest block contains the hash value of the previous block. Modifying any character in the middle will cause the hash to change. , Cannot be verified, so it is not tamperable. But because it is serial data, the data verification must be serial, which makes the processing capacity of the entire system limited; expansion can only be done by modifying the block time interval or block size, and the expansion capacity is limited; this restricts the blockchain Usage scenarios.
  • TPS Transactions Per Second
  • system throughput that is, “the number of transactions that the system can process per second.”
  • a system consists of a chain.
  • the TPS value of such a blockchain system is too low.
  • the TPS of the three mainstream blockchain systems Bitcoin's TPS is about 3 to 7
  • Ethereum's TPS is about 15 to 30
  • EOS's TPS is about 1000 to 3000. pen.
  • any single-threaded system has a processing power much higher than this value.
  • This application proposes a block chain system data processing method and a block generation method, which can support concurrent processing of data under the condition that the block chain technology is satisfied, thereby improving the processing capacity of the entire block chain system.
  • a block generation method of the present application includes:
  • the local chain identifier is used to mark the chain to which this block belongs
  • the previous hash is used to point to the previous block of this chain
  • the parent hash is used to point to the block of the parent chain
  • the sub-hash is used to point to the block of the sub-chain
  • the chain identifier carried by each transaction of the unpackaged transaction list is the own chain identifier, so that the transaction list in each chain only contains transactions of the own chain;
  • the own chain identifier, the previous hash, the parent hash, the child hash, and the unpackaged transaction list are filled according to the block format to generate a new block.
  • obtaining the previous hash includes: selecting a chain, and obtaining the hash of the last block of the chain as the previous hash;
  • Obtaining the parent hash includes: if the chain to which this block belongs has a parent chain, obtaining the hash of the block pointing to the parent chain as the parent hash;
  • Obtaining the sub-hash includes: if there is a sub-chain in the chain to which the current block belongs, obtaining the hash of the block that the current block points to the sub-chain as the sub-hash.
  • the obtaining the hash of the block whose current block points to the parent chain as the parent hash is specifically:
  • the hash of the block whose time stamp in the parent chain and the time stamp of the current block is within the threshold time difference is used as the parent hash.
  • the obtaining the hash of the block pointing to the sub-chain of the current block as the sub-hash specifically includes:
  • the hash of the block whose time stamp in the sub-chain and the time stamp of the current block is within the threshold time difference is used as the sub-hash.
  • the method further includes: obtaining other information of the block, and filling the other information according to the block format to generate the new block.
  • this application provides a blockchain system data processing method, including:
  • the verifying whether the parent hash and the child hash of the new block meet the first verification condition includes:
  • the verification of the transaction in the transaction list of the new block includes: processing the transaction based on the operation code of the transaction.
  • the transaction-based operation code processing transaction includes transfer transactions, cross-chain data transfer transactions, and creation of new chain transactions.
  • the verifying the transaction list in the transaction list of the new block further includes:
  • it further includes: if a certain block is discarded, also discarding the block with the certain block as the child hash or the parent hash.
  • the above-mentioned generating method is included.
  • this application also provides a blockchain system data processing method, including: creating one or more sub-chains for a chain; the above-mentioned generating method.
  • the present application provides a computer device, which includes:
  • One or more processors are One or more processors;
  • Memory used to store one or more programs
  • the one or more programs may be executed by the one or more processors to realize the above method.
  • the present application provides a computer-readable storage medium in which program instructions are stored, and when the program instructions are executed by a processor of a computer, the processor executes the foregoing method.
  • the structure of the block is improved so that the block chain system includes multiple parallel chains.
  • Parent hash and child hash can ensure the traceability of the blockchain system.
  • transactions of related blocks in the parent chain and the child chain can be queried respectively, and data can be modified according to the query result. Allows computing nodes to conduct concurrent transactions through different blocks, and can change the serial processing of data to parallel processing, which can improve the processing capacity of the entire blockchain system, thereby improving the TPS of the system.
  • FIG. 1 is a schematic diagram of the structure of the blockchain system of the first embodiment of the application
  • Figure 2 is a diagram of the logical relationship between chains in the first embodiment of this application.
  • Figure 3 shows the block structure of the first embodiment of the present application
  • FIG. 4 is a flowchart of a block generation method according to the first embodiment of the application.
  • Fig. 5 shows the block chain data structure of the block chain system of the first embodiment of the present application
  • Fig. 6 is a flowchart of a blockchain system data processing method according to the first embodiment of the application.
  • FIG. 7 shows another blockchain data structure of the blockchain system of the first embodiment of the present application.
  • FIG. 8 shows a third blockchain data structure of the blockchain system of the first embodiment of the present application.
  • step S11 is a flowchart of step S11 in the second embodiment of this application.
  • Fig. 10 is a schematic structural diagram of a computer device according to a third embodiment of the application.
  • first and second are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined with “first” and “second” may explicitly or implicitly include one or more of these features. In the description of the embodiments of the present application, “plurality” means two or more, unless otherwise specifically defined.
  • the blockchain system of this embodiment includes multiple units. Referring to FIG. 1, it specifically includes a data synchronization unit 1, a transaction processing unit 2, a block generation unit 3, a block processing unit 4, a transaction generation unit 5, and a storage unit 6.
  • Data synchronization unit 1 used to share transactions or blocks with other computing nodes; or used to obtain new transactions and blocks from other computing nodes, and to transfer new blocks or transactions (including self-created or obtained from other nodes) To all connected computing nodes.
  • Transaction processing unit 2 Used to process transactions in the block when the block is legal.
  • Block generation unit 3 Used to generate new blocks.
  • Block processing unit 4 used to verify whether the block is legal.
  • Transaction generating unit 5 used to create a specified transaction (such as a transfer operation) according to a user's operation, and send the transaction to other computing nodes through the data synchronization unit.
  • a specified transaction such as a transfer operation
  • Storage unit 6 used to store block data, unpackaged transaction data, and data generated by system operation.
  • This embodiment provides a block chain system data processing method, which includes a block generation method.
  • the block generation method can also be called the block chain expansion method.
  • the block generation method is executed by the block generation unit 3.
  • the blockchain system of this embodiment initially has only one chain, but this chain can add child chains as needed, so that there are parent chains and child chains in the system, and each chain can add child chains as needed, so that The blockchain system includes multiple chains. Specifically, if a certain chain a creates a new chain b, then chain a is called the parent chain of chain b, and chain b is called the child chain of chain a.
  • the logical relationship diagram between the chain and the chain is in the shape of a linked list. Referring to Figure 2, if a chain can create two sub-chains, then the logical relationship diagram between the chain and the chain is in the shape of a binary tree. If a chain can create three sub-chains, then the logical relationship diagram between the chain and the chain is in the shape of a trigeminal tree.
  • the block structure of the blocks of the parent chain and the child chain is the same.
  • the block structure of this embodiment includes the own chain identifier, pre-hash (Pre Hash), parent hash (Parent Hash), child hash (Child Hash), other block information (Meta Data), and Transaction list (Transactions).
  • the block generation method of this embodiment includes steps S1 to S7.
  • Step S1 Obtain the own chain identifier.
  • Chain ID (Chain ID) is the identifier of the chain in the blockchain system and is unique.
  • This chain identifier is used to identify the chain to which this block belongs.
  • This block refers to the block to be added.
  • the chain to which this block belongs refers to the chain to which the new block belongs, and a chain in the entire system can be randomly selected.
  • the entire system can have multiple chains, and different chains have different chain identifiers.
  • this chain is the second chain of the system.
  • this chain ID is the ID of the second chain of the system, where the second chain is a sub-chain of the first chain of the system.
  • the chain identifier of the new chain is the parent chain ID*2 or ID*2+1.
  • the own chain ID of the first chain C1 is equal to 1
  • the own chain ID of the second chain C2 is equal to 2.
  • Step S2 obtain the front hash.
  • the previous hash is used to point to the previous block of this chain.
  • this chain is the second chain of the system.
  • Obtaining the previous hash is to use the hash of the last block of the second chain as the previous hash.
  • the value of the previous hash must point to the previous block, so its value is unique.
  • Step S3 Obtain the parent hash.
  • the parent hash is used to point to the block of the parent chain.
  • the first chain of the system has no parent chain, and the value of the parent hash is empty.
  • the parent hash of the first block of the chain can also be empty.
  • the chain to which this block belongs is the second chain, and there is a parent chain.
  • the parent chain of the second chain is the first chain.
  • This block points to the block of the first chain, it can point to the last block of the first chain, or it can point to the difference between the timestamp in the first chain and the timestamp of this block within the threshold time difference
  • the threshold time difference is a value or a range. In this embodiment, the threshold time difference is less than or equal to 1 hour.
  • Step S4 Obtain the sub-hash.
  • the sub-hash is used to point to the block of the sub-chain.
  • This block can refer to a block in which the difference between the timestamp in the sub-chain and the timestamp of this block is within the threshold time difference.
  • the threshold time difference is a value or a range. In this embodiment, the threshold time difference is less than or equal to 1 hour.
  • obtaining the sub-hash is to use the hash of the block pointing to the sub-chain as the sub-hash.
  • the first chain C1 creates a child chain, that is, the second chain C2.
  • the first chain C1 includes block Bi, block Bi+1 and block Bi+2.
  • the second chain C2 includes block B1, block B2, and block B3.
  • the second chain C2 is created based on the block Bi of the first chain C1, and the sub-hash in the block Bi is the first block of the second chain C2.
  • the value of the sub-hash of the block after the block Bi is non-empty.
  • Block verification The sub-hash block is stored in the sub-chain. Referring to Figure 5, the block Bi+2 of the first chain C1 points to the block B2 of the second chain C2.
  • Block verification The parent hash block is stored in the parent chain. Referring to Figure 5, the block B3 of the second chain C2 points to the block Bi+1 of the first chain C1.
  • the dashed lines are used for the direction of the child hash and the parent hash, indicating that its value is not unique.
  • the sub-hash of the block Block i+2 in the first chain can be the block Block1 in the second chain, or it can be the block Block2.
  • the limiting condition of the child hash and the parent hash is: the difference between the timestamp t1 of the current block and the timestamp t2 of the target block is within the threshold time difference; in this embodiment, the timestamp t1 and the timestamp t2
  • the time difference ranges from 0 to 1 hour. Different blocks will complete processing transactions at different times. The advantage of this is that different chains can process data concurrently in an efficient and orderly manner.
  • Step S5 Obtain a list of unpackaged transactions.
  • each transaction carries the chain identifier of the chain to which it belongs.
  • the chain identifier carried by each transaction in the unpackaged transaction list is the own chain identifier, that is, the chain identifier of the second chain, so that the transaction list in each chain only contains the transactions of this chain.
  • the chain ID in the transaction is equal to the chain ID of the block, so that the transaction clearly belongs to a different chain, and it is convenient to concurrently verify the validity of the transaction.
  • Step S6 Obtain other information of the block. That is, to obtain other information about the block to be generated.
  • Other information includes but is not limited to version information and time stamps.
  • Step S7 Fill in the own chain ID, previous hash, parent hash, child hash, other information of the block, and unpackaged transaction list according to the block format to generate a new block.
  • the new block can be the first block of the system or the block after the first block.
  • the new block is shared with all computing nodes.
  • the block chain system data processing method of this embodiment further includes steps S8 to S13.
  • steps S8 to S13 are executed by the block processing unit 4.
  • Step S8 verify whether the hash of the new block is legal.
  • the block processing unit 4 verifies whether the hash of the block is legal. If the hash is illegal, the block is also illegal.
  • the hash of each block needs to meet certain conditions, which can be set according to the needs of the system.
  • Step S9 verify whether the previous hash of the new block is correct.
  • Step S10 verify whether the parent hash and child hash of the new block meet the first verification condition.
  • Step S10 specifically includes: whether the difference between the time stamp of the block to which the parent hash belongs and the time stamp of the new block is within the threshold time difference; if not, the verification fails; the time of the block to which the child hash belongs Whether the difference between the stamp and the timestamp of the new block is within the threshold time difference, if not, the verification fails.
  • the first verification condition is: whether the difference between the timestamp of the block to which the parent hash belongs and the timestamp of the new block is within the threshold time difference, and the timestamp of the block to which the child hash belongs and the new block Whether the difference between the timestamps of the block is within the threshold time difference.
  • the parent hash of the new block can also be verified as follows: whether the block to which the parent hash belongs is the last block of the parent chain of the block to which the parent hash belongs, if not, the verification fails. Then, for the parent hash of a new block, the first verification condition is: whether the block to which the parent hash belongs is the last block of the parent chain to which the block to which the parent hash belongs.
  • the verification fails.
  • Step S11 verify the transactions in the transaction list of the new block.
  • the verification of the transaction is for the subsequent processing of the block transaction.
  • Step S12 Query the parent chain based on the parent hash. If there is a transaction that transfers data from the parent chain, and the block of the transaction that transfers data from the parent chain belongs to the block before the parent hash belongs, modify the designation Account data.
  • the first chain is queried according to the parent hash of the new block. If there is a transaction that transfers data from the first chain, specifically there is a transfer from the first chain to this chain, and the transaction If the block belongs to before the block to which the parent hash belongs, the data of the specified account is modified, specifically, the specified digital currency is added to the specified account.
  • Step S13 Query the sub-chain according to the sub-hash. If there is a transaction that transfers data from the sub-chain, and the block of the transaction that transfers data from the sub-chain belongs to before the block to which the sub-hash belongs, modify the designation Account data.
  • the current chain that is, the child chain of the second chain C2
  • the third chain C3 is queried according to the sub-hash of the new block. If there is a transaction transferring data from the third chain C3, specifically, there is a transfer from the third chain C3 to this chain. And the block to which the transaction belongs is before the block to which the sub-hash belongs, the data of the specified account is modified, specifically, the specified digital currency is added to the specified account.
  • the existing blockchain is distributed, only the distribution of data is distributed, and data processing needs to be processed by each computing node. Because it is a single-chain structure, in order to ensure the consistency of the processing results of all nodes, data can only be processed serially.
  • the TPS of the blockchain depends on the block size, block generation time and serial processing capabilities.
  • the blockchain can be expanded in some way, such as changing the block size limit and accelerating the block generation speed, etc., to expand the blockchain.
  • the traditional expansion method is only to adjust the block size limit and adjust the block generation time, and the performance improvement is limited.
  • this embodiment improves the structure of the block, so that the block chain system includes multiple parallel chains.
  • Parent hash and child hash can ensure the traceability of the blockchain system.
  • transactions of related blocks in the parent chain and the child chain can be queried respectively, and data can be modified according to the query result. Allows computing nodes to conduct concurrent transactions through different blocks, and can change the serial processing of data to parallel processing, which can improve the processing capacity of the entire blockchain system, thereby improving the TPS of the system.
  • the entire system can have 2 ⁇ 64 chains. If the TPS of a chain is 7, then the TPS limit of the entire system is 7*2 ⁇ 64.
  • the TPS limit of the system increases exponentially as the number of chain identification bits increases. If the system uses optimization technologies such as Ethereum and EOS (Enterprise Operation System, commercial distributed design blockchain operating system), the TPS limit can continue to increase.
  • the consensus algorithm of the blockchain is superimposed and enhanced.
  • block B2' of the second chain C2 was also a valid block when it was first generated, but over time, it was finally abandoned based on consensus, resulting in block Bi+2 of the first chain C1 It is an unrecognized block.
  • the sub-hash of block Bi+2 is block B2' in the second chain C2, so block Bi+2 is also discarded. If the parent hash of a block in the second chain C2 is block Bi+2, then this block will also be discarded.
  • step S11 to verify the transactions in the transaction list of the new block specifically includes steps S111 to S115.
  • step S11 is executed by the transaction processing unit 2.
  • Step S111 verify whether the digital signature of the transaction is legal.
  • Step S112 It is verified whether the chain identifier carried in the transaction is consistent with the local chain identifier of the new block. That is, verify whether the chain ID of the transaction is consistent with the chain ID of the block.
  • Step S113 verify whether the transaction operation code is supported.
  • Each transaction has corresponding information such as digital signature and operation code.
  • Opcodes are used to process transactions.
  • the default operation code is the transfer transaction code. If supported, the transaction is processed based on the opcode.
  • Step S114 verify whether the source of the digital currency is correct and whether the amount is correct.
  • Step S115 Process the transaction based on the operation code of the transaction.
  • the operation codes in this embodiment include, but are not limited to, transfer transaction codes, cross-chain transfer data codes, and create sub-chain codes.
  • transactions that can be processed include transfer transactions, cross-chain data transfer transactions, and creation of new chain transactions.
  • Transfer transactions modify the amount of digital currency transferred into and out of the account.
  • cross-chain transfer For cross-chain transfer of data transactions, take cross-chain transfer as an example:
  • target chain parent chain or child chain
  • the user creates a transaction to transfer the tokens on the first chain C1 to the second chain C2.
  • the transaction is confirmed and included in block Bi+1, and the user's corresponding tokens are deducted.
  • the block B3 of the second chain C2 points to the block Bi+1 of the first chain C1, and it is found that there is a transaction to the second chain C2, and the system automatically adds corresponding tokens to the user on the second chain C2 .
  • Block B2 of the second chain C2 only relies on block Bi, so in block B2, the user does not have tokens, and only when it reaches block B3, will there be tokens. In this way, data is transferred across chains.
  • the creation of a new chain transaction specifically includes:
  • this embodiment provides a computer device.
  • the computer device includes: one or more processors 7 and a memory 8.
  • the memory 8 is used to store one or more programs.
  • One or more programs may be executed by one or more processors 7 to realize the methods of the above-mentioned embodiments.
  • the program can be stored in a computer readable storage medium.
  • the aforementioned storage media include: ROM or random storage RAM, magnetic disks or optical discs and other media that can store program codes.

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • General Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Technology Law (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

Disclosed in embodiments of the present application are a data processing method for a blockchain system and a block generating method. The generating method comprises: acquiring a local chain identity, a pre-hash, a parent hash, a child hash and a not-yet-packaged transaction list, wherein the local chain identity is used for labeling a chain to which a local block belongs, the pre-hash is used for pointing to the previous block of the local chain, the parent hash is used for pointing to a block of a parent chain, the child hash is used for pointing to a block of a child chain, and a chain identity carried by each transaction in the not-yet-packaged transaction list is the local chain identity, so that the transaction list in each chain only contains transactions of the local chain; and filling the local chain identity, the pre-hash, the parent hash, the child hash and the not-yet-packaged transaction list in a block format so as to generate a new block. The data processing method comprises the described generating method. The present application may increase the processing capacity of the entire blockchain system, thereby improving the TPS of the system.

Description

区块链系统数据处理方法和区块的生成方法Block chain system data processing method and block generation method 技术领域Technical field
本申请涉及区块链技术领域,特别涉及一种区块链系统数据处理方法和区块的生成方法。This application relates to the field of blockchain technology, and in particular to a method for processing blockchain system data and a method for generating blocks.
背景技术Background technique
区块链技术也称为分布式账本技术,是一种分布式互联网数据库技术。基于区块链技术构建的网络可以称之为区块链网络。区块链网络(或者区块链技术)具备去中心化、公开透明、不可篡改和可信任等特点。Blockchain technology, also known as distributed ledger technology, is a distributed Internet database technology. A network constructed based on blockchain technology can be called a blockchain network. The blockchain network (or blockchain technology) has the characteristics of decentralization, openness and transparency, immutability, and trustworthiness.
区块链技术有三个基本概念:Blockchain technology has three basic concepts:
交易(Transaction):一次对账本的操作,导致账本状态的一次改变,比如添加一条转账记录;Transaction: An operation on the ledger, which leads to a change in the state of the ledger, such as adding a transfer record;
区块(Block):记录一段时间内发生的所有交易和状态结果等,是对当前账本状态的一次共识;Block: Record all transactions and status results that occurred within a period of time, which is a consensus on the current ledger status;
链(Chain):由区块按照发生顺序串联而成,是整个账本状态变化的日志记录。Chain: A chain of blocks in the order of occurrence, which is a log record of changes in the state of the entire ledger.
区块的结构包括前哈希(Pre Hash)、区块的其它信息(Meta Data)和交易列表(Transactions)。区块链的数据结构是链式数据结构。The structure of the block includes the pre-Hash (Pre Hash), other information of the block (Meta Data) and the transaction list (Transactions). The data structure of the blockchain is a chain data structure.
链式数据结构方便分布式系统中节点之间的数据同步,以区块为力度同步;最新的一个区块包含前一块的哈希(hash)值,修改中间任何一个字符,将导致哈希改变,无法验证通过,因此具有不可篡改的特点。但由于是串行数据,数据的校验必须是串行的,使得整个系统的处理能力有限;只能通过修改区块时间间隔或者区块大小进行扩容,扩容能力有限;这制约着区块链的使用场景。The chained data structure facilitates data synchronization between nodes in a distributed system. The latest block contains the hash value of the previous block. Modifying any character in the middle will cause the hash to change. , Cannot be verified, so it is not tamperable. But because it is serial data, the data verification must be serial, which makes the processing capacity of the entire system limited; expansion can only be done by modifying the block time interval or block size, and the expansion capacity is limited; this restricts the blockchain Usage scenarios.
TPS(Transactions Per Second)又称“系统的吞吐量”,即“系统每秒钟能够处理的交易数量”。TPS (Transactions Per Second) is also called "system throughput", that is, "the number of transactions that the system can process per second."
当前的区块链系统,一个系统由一条链组成。这样的区块链系统的TPS的值太低。基于2018年之前的历史数据看,主流的3个区块链系统的TPS:比特币的TPS约为3至7笔,以太坊的TPS约为15至30笔,EOS的TPS 约为1000至3000笔。可是,随便一个单线程系统,其处理能力都远高于该数值。In the current blockchain system, a system consists of a chain. The TPS value of such a blockchain system is too low. Based on historical data before 2018, the TPS of the three mainstream blockchain systems: Bitcoin's TPS is about 3 to 7, Ethereum's TPS is about 15 to 30, and EOS's TPS is about 1000 to 3000. pen. However, any single-threaded system has a processing power much higher than this value.
发明内容Summary of the invention
本申请提出一种区块链系统数据处理方法和区块的生成方法,在满足区块链技术的情况下,可支持数据的并发处理,从而提升整个区块链系统的处理能力。This application proposes a block chain system data processing method and a block generation method, which can support concurrent processing of data under the condition that the block chain technology is satisfied, thereby improving the processing capacity of the entire block chain system.
在第一方面,本申请一种区块的生成方法,包括:In the first aspect, a block generation method of the present application includes:
获取本链标识、前哈希、父哈希、子哈希和未被打包的交易列表;Get the chain ID, previous hash, parent hash, child hash and list of unpackaged transactions;
所述本链标识用于标记本区块所属的链;The local chain identifier is used to mark the chain to which this block belongs;
所述前哈希用于指向本链的前一个区块;The previous hash is used to point to the previous block of this chain;
所述父哈希用于指向父链的区块;The parent hash is used to point to the block of the parent chain;
所述子哈希用于指向子链的区块;The sub-hash is used to point to the block of the sub-chain;
所述未被打包的交易列表的每条交易携带的链标识均为所述本链标识,以使每条链里的交易列表都只包含本链的交易;The chain identifier carried by each transaction of the unpackaged transaction list is the own chain identifier, so that the transaction list in each chain only contains transactions of the own chain;
将所述本链标识、所述前哈希、所述父哈希、所述子哈希和所述未被打包的交易列表按照区块格式填充,以生成新的区块。The own chain identifier, the previous hash, the parent hash, the child hash, and the unpackaged transaction list are filled according to the block format to generate a new block.
在一些优选的实施方式中,获取所述前哈希包括:选取一条链,获取所述一条链的最后一个区块的哈希作为所述前哈希;In some preferred embodiments, obtaining the previous hash includes: selecting a chain, and obtaining the hash of the last block of the chain as the previous hash;
获取所述父哈希包括:如果本区块所属的链存在父链,则获取本区块指向父链的区块的哈希作为所述父哈希;Obtaining the parent hash includes: if the chain to which this block belongs has a parent chain, obtaining the hash of the block pointing to the parent chain as the parent hash;
获取所述子哈希包括:如果本区块所属的链存在子链,则获取本区块指向子链的区块的哈希作为所述子哈希。Obtaining the sub-hash includes: if there is a sub-chain in the chain to which the current block belongs, obtaining the hash of the block that the current block points to the sub-chain as the sub-hash.
在一些优选的实施方式中,所述获取本区块指向父链的区块的哈希作为所述父哈希具体为:In some preferred implementations, the obtaining the hash of the block whose current block points to the parent chain as the parent hash is specifically:
将父链的最后一个区块的哈希作为所述父哈希;Use the hash of the last block of the parent chain as the parent hash;
或者,将父链中时间戳与本区块的时间戳的差值在门限时间差值内的区块的哈希作为所述父哈希。Or, the hash of the block whose time stamp in the parent chain and the time stamp of the current block is within the threshold time difference is used as the parent hash.
在一些优选的实施方式中,所述获取本区块指向子链的区块的哈希作为所述子哈希具体为:In some preferred implementations, the obtaining the hash of the block pointing to the sub-chain of the current block as the sub-hash specifically includes:
将子链中时间戳与本区块的时间戳的差值在门限时间差值内的区块的哈希作为所述子哈希。The hash of the block whose time stamp in the sub-chain and the time stamp of the current block is within the threshold time difference is used as the sub-hash.
在一些优选的实施方式中,还包括:获取区块的其它信息,也将所述其它信息按照区块格式填充,以生成所述新的区块。In some preferred embodiments, the method further includes: obtaining other information of the block, and filling the other information according to the block format to generate the new block.
在第二方面,本申请提供一种区块链系统数据处理方法,包括:In the second aspect, this application provides a blockchain system data processing method, including:
验证新的区块的哈希是否合法;Verify that the hash of the new block is legal;
验证所述新的区块的前哈希是否正确;Verifying whether the previous hash of the new block is correct;
验证所述新的区块的父哈希和子哈希是否满足第一验证条件;Verifying whether the parent hash and child hash of the new block meet the first verification condition;
对所述新的区块的交易列表中的交易进行验证;Verify the transactions in the transaction list of the new block;
根据所述父哈希对父链进行查询,如果有从父链转入数据的交易,且所述从父链转入数据的交易所属的区块在所述父哈希所属的区块之前,则修改指定账户的数据;Query the parent chain according to the parent hash, if there is a transaction that transfers data from the parent chain, and the block to which the data transferred from the parent chain belongs is before the block to which the parent hash belongs, Modify the data of the specified account;
根据所述子哈希对子链进行查询,如果有从子链转入数据的交易,且所述从子链转入数据的交易所属的区块在所述子哈希所属的区块之前,则修改指定账户的数据。Query the sub-chain based on the sub-hash, if there is a transaction that transfers data from the sub-chain, and the block to which the data-transferred-in transaction from the sub-chain belongs is before the block to which the sub-hash belongs, Modify the data of the specified account.
在一些优选的实施方式中,所述验证所述新的区块的父哈希和子哈希是否满足第一验证条件包括:In some preferred embodiments, the verifying whether the parent hash and the child hash of the new block meet the first verification condition includes:
判断所述父哈希所属的区块的时间戳与所述新的区块的时间戳的差值是否在门限时间差值内;判断所述子哈希所属的区块的时间戳与所述新的区块的时间戳的差值是否在门限时间差值内。Determine whether the difference between the time stamp of the block to which the parent hash belongs and the time stamp of the new block is within the threshold time difference; Whether the time stamp difference of the new block is within the threshold time difference.
在一些优选的实施方式中,所述对所述新的区块的交易列表中的交易进行验证包括:基于交易的操作码处理交易。In some preferred embodiments, the verification of the transaction in the transaction list of the new block includes: processing the transaction based on the operation code of the transaction.
在一些优选的实施方式中,所述基于交易的操作码处理交易包括转账交易、跨链转移数据交易和创建新链交易。In some preferred embodiments, the transaction-based operation code processing transaction includes transfer transactions, cross-chain data transfer transactions, and creation of new chain transactions.
在一些优选的实施方式中,所述对所述新的区块的交易列表中的交易列表进行验证还包括:In some preferred embodiments, the verifying the transaction list in the transaction list of the new block further includes:
验证交易的数字签名是否合法;Verify that the digital signature of the transaction is legal;
验证交易携带的链标识是否与所述新的区块的本链标识是否一致;Verify whether the chain identifier carried in the transaction is consistent with the local chain identifier of the new block;
验证是否支持交易的操作码;Verify whether the transaction operation code is supported;
验证数字货币的来源是否正确以及数量是否正确。Verify that the source of the digital currency is correct and the amount is correct.
在一些优选的实施方式中,还包括:若某一个区块被丢弃,则也丢弃以所述某一个区块作为子哈希或者父哈希的区块。In some preferred implementations, it further includes: if a certain block is discarded, also discarding the block with the certain block as the child hash or the parent hash.
在一些优选的实施方式中,包括上述生成方法。In some preferred embodiments, the above-mentioned generating method is included.
在第三方面,本申请还提供一种区块链系统数据处理方法,包括:为一条链创建一条或者多条子链;上述生成方法。In the third aspect, this application also provides a blockchain system data processing method, including: creating one or more sub-chains for a chain; the above-mentioned generating method.
在第四方面,本申请提供一种计算机设备,所述计算机设备包括:In a fourth aspect, the present application provides a computer device, which includes:
一个或多个处理器;One or more processors;
存储器,用于存储一个或多个程序;Memory, used to store one or more programs;
所述一个或多个程序可被所述一个或多个处理器执行,以实现上述方法。The one or more programs may be executed by the one or more processors to realize the above method.
在第五方面,本申请提供一种计算机可读存储介质,所述计算机可读存储介质中存储有程序指令,所述程序指令被计算机的处理器执行时使所述处理器执行上述方法。In a fifth aspect, the present application provides a computer-readable storage medium in which program instructions are stored, and when the program instructions are executed by a processor of a computer, the processor executes the foregoing method.
与现有技术相比,本申请的有益效果有:Compared with the prior art, the beneficial effects of this application are:
对区块的结构进行改进,使得区块链系统包括多条并行的链。父哈希和子哈希可保证区块链系统的可追溯性。如此,根据区块的父哈希和子哈希可分别对父链和子链中相关区块的交易进行查询并可依据查询结果修改数据。允许计算节点通过不同的区块进行并发交易,可将数据的串行处理改为并行处理,可提升整个区块链系统的处理能力,从而提升系统的TPS。The structure of the block is improved so that the block chain system includes multiple parallel chains. Parent hash and child hash can ensure the traceability of the blockchain system. In this way, according to the parent hash and child hash of the block, transactions of related blocks in the parent chain and the child chain can be queried respectively, and data can be modified according to the query result. Allows computing nodes to conduct concurrent transactions through different blocks, and can change the serial processing of data to parallel processing, which can improve the processing capacity of the entire blockchain system, thereby improving the TPS of the system.
附图说明Description of the drawings
图1为本申请第一实施例的区块链系统的结构示意图;FIG. 1 is a schematic diagram of the structure of the blockchain system of the first embodiment of the application;
图2为本申请第一实施例的链与链的逻辑关系图;Figure 2 is a diagram of the logical relationship between chains in the first embodiment of this application;
图3示出本申请第一实施例的区块结构;Figure 3 shows the block structure of the first embodiment of the present application;
图4为本申请第一实施例的区块的生成方法的流程图;4 is a flowchart of a block generation method according to the first embodiment of the application;
图5示出本申请第一实施例的区块链系统的区块链数据结构;Fig. 5 shows the block chain data structure of the block chain system of the first embodiment of the present application;
图6为本申请第一实施例的区块链系统数据处理方法的流程图;Fig. 6 is a flowchart of a blockchain system data processing method according to the first embodiment of the application;
图7示出本申请第一实施例的区块链系统的另一种区块链数据结构;FIG. 7 shows another blockchain data structure of the blockchain system of the first embodiment of the present application;
图8示出本申请第一实施例的区块链系统的第三种区块链数据结构;FIG. 8 shows a third blockchain data structure of the blockchain system of the first embodiment of the present application;
图9为本申请第二实施例的步骤S11的流程图;9 is a flowchart of step S11 in the second embodiment of this application;
图10为本申请第三实施例的计算机设备的结构示意图。Fig. 10 is a schematic structural diagram of a computer device according to a third embodiment of the application.
具体实施方式Detailed ways
为了使本申请实施例所要解决的技术问题、技术方案及有益效果更加清楚明白,以下结合图1至图10及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。In order to make the technical problems, technical solutions, and beneficial effects to be solved by the embodiments of the present application clearer, the following further describes the present application in detail with reference to FIGS. 1 to 10 and embodiments. It should be understood that the specific embodiments described herein are only used to explain the application, and not used to limit the application.
术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多该特征。在本申请实施例的描述中,“多个”的含义是两个或两个以上,除非另有明确具体的 限定。The terms "first" and "second" are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined with "first" and "second" may explicitly or implicitly include one or more of these features. In the description of the embodiments of the present application, "plurality" means two or more, unless otherwise specifically defined.
第一实施例First embodiment
本实施例的区块链系统包括多个单元,参考图1,具体包括数据同步单元1、交易处理单元2、区块生成单元3、区块处理单元4、交易生成单元5和存储单元6。The blockchain system of this embodiment includes multiple units. Referring to FIG. 1, it specifically includes a data synchronization unit 1, a transaction processing unit 2, a block generation unit 3, a block processing unit 4, a transaction generation unit 5, and a storage unit 6.
数据同步单元1:用于将交易或区块共享给其它计算节点;或者用于从其它计算节点获取新的交易和区块,将新的区块或交易(包括自身创建的或者从其它节点获取到的)发给所有相连的计算节点。Data synchronization unit 1: used to share transactions or blocks with other computing nodes; or used to obtain new transactions and blocks from other computing nodes, and to transfer new blocks or transactions (including self-created or obtained from other nodes) To all connected computing nodes.
交易处理单元2:用于在区块合法时,处理区块里的交易。Transaction processing unit 2: Used to process transactions in the block when the block is legal.
区块生成单元3:用于生成新区块。区块处理单元4:用于验证区块是否合法。Block generation unit 3: Used to generate new blocks. Block processing unit 4: used to verify whether the block is legal.
交易生成单元5:用于根据用户的操作,创建指定的交易(如转账操作),并通过数据同步单元将交易发送给其它计算节点。Transaction generating unit 5: used to create a specified transaction (such as a transfer operation) according to a user's operation, and send the transaction to other computing nodes through the data synchronization unit.
存储单元6:用于存储区块数据、未打包的交易数据、系统运行产生的数据。Storage unit 6: used to store block data, unpackaged transaction data, and data generated by system operation.
本实施例提供一种区块链系统数据处理方法,该方法包括区块的生成方法。区块的生成方法也可以称为区块链的扩容方法。在本实施例中,区块的生成方法由区块生成单元3执行。This embodiment provides a block chain system data processing method, which includes a block generation method. The block generation method can also be called the block chain expansion method. In this embodiment, the block generation method is executed by the block generation unit 3.
本实施例的区块链系统初始时只有一条链,但这一条链可以根据需要新增子链,从而在系统中存在父链和子链,且每条链都可以根据需要新增子链,使得区块链系统包括多条链。具体的,某条链a创建了一条新链b,则称链a为链b的父链,称链b为链a的子链。The blockchain system of this embodiment initially has only one chain, but this chain can add child chains as needed, so that there are parent chains and child chains in the system, and each chain can add child chains as needed, so that The blockchain system includes multiple chains. Specifically, if a certain chain a creates a new chain b, then chain a is called the parent chain of chain b, and chain b is called the child chain of chain a.
如果一条链只允许一条子链,那么在整个系统中,链与链的逻辑关系图就是一个链表的形状了。参考图2,如果一条链可以创建两条子链,那么链与链的逻辑关系图就是一个二叉树的形状。如果一条链可以创建三条子链,那么链与链的逻辑关系图就是三叉树的形状。If a chain only allows one sub-chain, then in the entire system, the logical relationship diagram between the chain and the chain is in the shape of a linked list. Referring to Figure 2, if a chain can create two sub-chains, then the logical relationship diagram between the chain and the chain is in the shape of a binary tree. If a chain can create three sub-chains, then the logical relationship diagram between the chain and the chain is in the shape of a trigeminal tree.
在本实施例中,父链和子链的区块的结构是相同的。参考图3,本实施例的区块结构包括本链标识、前哈希(Pre Hash)、父哈希(Parent Hash)、子哈希(Child Hash)、区块的其它信息(Meta Data)和交易列表(Transactions)。In this embodiment, the structure of the blocks of the parent chain and the child chain is the same. Referring to FIG. 3, the block structure of this embodiment includes the own chain identifier, pre-hash (Pre Hash), parent hash (Parent Hash), child hash (Child Hash), other block information (Meta Data), and Transaction list (Transactions).
为生成具有上述区块结构的区块,参考图4,本实施例的区块的生成方法包括步骤S1至步骤S7。To generate a block with the above-mentioned block structure, referring to FIG. 4, the block generation method of this embodiment includes steps S1 to S7.
步骤S1、获取本链标识。Step S1: Obtain the own chain identifier.
链标识(Chain ID)是区块链系统中链的标识,是独一无二的。Chain ID (Chain ID) is the identifier of the chain in the blockchain system and is unique.
本链标识用于标识本区块所属的链。本区块是指将要新增的区块。本区块所属的链是指将要新增的区块所归属的链,可以随机选取整个系统中的一条链。整个系统可以很有多条链,不同的链有不同的链标识。在本实施例中,本链是系统第二条链。如此,本链标识为系统第二条链的标识,其中,第二条链是系统第一条链的子链。This chain identifier is used to identify the chain to which this block belongs. This block refers to the block to be added. The chain to which this block belongs refers to the chain to which the new block belongs, and a chain in the entire system can be randomly selected. The entire system can have multiple chains, and different chains have different chain identifiers. In this embodiment, this chain is the second chain of the system. In this way, this chain ID is the ID of the second chain of the system, where the second chain is a sub-chain of the first chain of the system.
在本实施例中,新链的链标识为父链ID*2或ID*2+1。对于子链的数量和ID生成规则,只要使得链标识不冲突即可。参考图5,第一条链C1的本链标识等于1,第二条链C2的本链标识等于2。In this embodiment, the chain identifier of the new chain is the parent chain ID*2 or ID*2+1. Regarding the number of sub-chains and ID generation rules, as long as the chain identifiers do not conflict. Referring to Fig. 5, the own chain ID of the first chain C1 is equal to 1, and the own chain ID of the second chain C2 is equal to 2.
步骤S2、获取前哈希。Step S2, obtain the front hash.
前哈希用于指向本链的前一个区块。在本实施例中本链为系统第二条链。获取前哈希就是将第二条链的最后一个区块的哈希(Hash)作为前哈希。The previous hash is used to point to the previous block of this chain. In this embodiment, this chain is the second chain of the system. Obtaining the previous hash is to use the hash of the last block of the second chain as the previous hash.
前哈希的值必须指向前一个区块,所以它的值是唯一的。The value of the previous hash must point to the previous block, so its value is unique.
步骤S3、获取父哈希。Step S3: Obtain the parent hash.
父哈希用于指向父链的区块。系统的第一条链没有父链,父哈希的值为空。此外,链的第一个区块的父哈希也可以为空。在本实施例中,本区块所属的链为第二条链,是存在父链的。第二条链的父链为第一条链。本区块指向第一条链的区块,可以是指向第一条链的最后一个区块,也可以是指向第一条链中时间戳与本区块的时间戳的差值在门限时间差值内的区块。门限时间差值为一个值,也可以为一个范围。在本实施例中,门限时间差值为小于或等于1个小时。The parent hash is used to point to the block of the parent chain. The first chain of the system has no parent chain, and the value of the parent hash is empty. In addition, the parent hash of the first block of the chain can also be empty. In this embodiment, the chain to which this block belongs is the second chain, and there is a parent chain. The parent chain of the second chain is the first chain. This block points to the block of the first chain, it can point to the last block of the first chain, or it can point to the difference between the timestamp in the first chain and the timestamp of this block within the threshold time difference The block within the value. The threshold time difference is a value or a range. In this embodiment, the threshold time difference is less than or equal to 1 hour.
因此,获取父哈希就是将本区块指向第一条链的区块的哈希作为父哈希。Therefore, to obtain the parent hash is to use the hash of the block pointing to the first chain as the parent hash.
步骤S4、获取子哈希。Step S4: Obtain the sub-hash.
子哈希用于指向子链的区块。本区块可以是指向子链中时间戳与本区块的时间戳的差值在门限时间差值内的区块。门限时间差值为一个值,也可以为一个范围。在本实施例中,门限时间差值为小于或等于1个小时。The sub-hash is used to point to the block of the sub-chain. This block can refer to a block in which the difference between the timestamp in the sub-chain and the timestamp of this block is within the threshold time difference. The threshold time difference is a value or a range. In this embodiment, the threshold time difference is less than or equal to 1 hour.
因此,如果本区块所属的链存在子链,获取子哈希就是将本区块指向子链的区块的哈希作为子哈希。Therefore, if the chain to which this block belongs has a sub-chain, obtaining the sub-hash is to use the hash of the block pointing to the sub-chain as the sub-hash.
在本链也即第二条链还没创建子链时,子哈希的值为空。When this chain, that is, the second chain, has not created a child chain, the value of the child hash is empty.
对于第一条链C1,参考图5,第一条链C1创建了子链也即第二条链 C2。第一条链C1包括区块Bi、区块Bi+1和区块Bi+2。第二条链C2包括区块B1、区块B2和区块B3。第二条链C2是基于第一条链C1的区块Bi创建的,区块Bi中的子哈希就是第二条链C2的第一个区块。在第一条链C1中,区块Bi之后的区块的子哈希的值为非空。For the first chain C1, referring to Figure 5, the first chain C1 creates a child chain, that is, the second chain C2. The first chain C1 includes block Bi, block Bi+1 and block Bi+2. The second chain C2 includes block B1, block B2, and block B3. The second chain C2 is created based on the block Bi of the first chain C1, and the sub-hash in the block Bi is the first block of the second chain C2. In the first chain C1, the value of the sub-hash of the block after the block Bi is non-empty.
区块的校验:子哈希的区块存在子链中。参考图5,第一条链C1的区块Bi+2指向第二条链C2的区块B2。Block verification: The sub-hash block is stored in the sub-chain. Referring to Figure 5, the block Bi+2 of the first chain C1 points to the block B2 of the second chain C2.
区块的校验:父哈希的区块存在父链中。参考图5,第二条链C2的区块B3指向第一条链C1的区块Bi+1。Block verification: The parent hash block is stored in the parent chain. Referring to Figure 5, the block B3 of the second chain C2 points to the block Bi+1 of the first chain C1.
参考图5,子哈希和父哈希的指向使用虚线,表示它的值不是唯一的。具体的,第一条链中区块Block i+2的子哈希可以是第二条链中的区块Block1,也可以是区块Block2。Referring to Figure 5, the dashed lines are used for the direction of the child hash and the parent hash, indicating that its value is not unique. Specifically, the sub-hash of the block Block i+2 in the first chain can be the block Block1 in the second chain, or it can be the block Block2.
子哈希和父哈希的限定条件为:当前区块的时间戳t1和目标区块的时间戳t2的差值在门限时间差值内;在本实施例中,时间戳t1与时间戳t2时间差范围为0至1小时。不同的区块会在不同的时间完成处理交易。这样做的好处是不同链之间可以高效、有序地并发处理数据。The limiting condition of the child hash and the parent hash is: the difference between the timestamp t1 of the current block and the timestamp t2 of the target block is within the threshold time difference; in this embodiment, the timestamp t1 and the timestamp t2 The time difference ranges from 0 to 1 hour. Different blocks will complete processing transactions at different times. The advantage of this is that different chains can process data concurrently in an efficient and orderly manner.
步骤S5、获取未被打包的交易列表。Step S5: Obtain a list of unpackaged transactions.
若交易列表中包含有交易,则每条交易都携带所属链的链标识。未被打包的交易列表的每条交易携带的链标识均为本链标识也即第二条链的链标识,以使每条链里的交易列表都只包含本链的交易。If there are transactions in the transaction list, each transaction carries the chain identifier of the chain to which it belongs. The chain identifier carried by each transaction in the unpackaged transaction list is the own chain identifier, that is, the chain identifier of the second chain, so that the transaction list in each chain only contains the transactions of this chain.
交易里的链标识等于本区块的链标识,使交易明确归属于不同的链,方便并发校验交易的有效性。The chain ID in the transaction is equal to the chain ID of the block, so that the transaction clearly belongs to a different chain, and it is convenient to concurrently verify the validity of the transaction.
步骤S6、获取区块的其它信息。也即,获取将要生成的区块的其它信息。其它信息包括但不限于版本信息和时间戳。Step S6: Obtain other information of the block. That is, to obtain other information about the block to be generated. Other information includes but is not limited to version information and time stamps.
区块的其它信息对于区块结构来说是可选的。Other information of the block is optional for the block structure.
步骤S7、将本链标识、前哈希、父哈希、子哈希、区块的其它信息和未被打包的交易列表按照区块格式填充,生成新的区块。新的区块可以是系统的第一个区块,也可以是第一个区块之后的区块。Step S7: Fill in the own chain ID, previous hash, parent hash, child hash, other information of the block, and unpackaged transaction list according to the block format to generate a new block. The new block can be the first block of the system or the block after the first block.
生成新的区块后,将新的区块共享给所有计算节点。After a new block is generated, the new block is shared with all computing nodes.
为对接收到的新的区块进行处理,参考图6,本实施例的区块链系统数据处理方法还包括步骤S8至步骤S13。在本实施例中,步骤S8至步骤S13由区块处理单元4执行。In order to process the received new block, referring to FIG. 6, the block chain system data processing method of this embodiment further includes steps S8 to S13. In this embodiment, steps S8 to S13 are executed by the block processing unit 4.
步骤S8、验证新的区块的哈希是否合法。Step S8, verify whether the hash of the new block is legal.
数据同步单元1收到新的区块后,由区块处理单元4验证该区块的哈希是否合法,若哈希不合法,则该区块也不合法。每一个区块自身的哈希需满足一定的条件,具体可根据系统需要来设定条件。After the data synchronization unit 1 receives the new block, the block processing unit 4 verifies whether the hash of the block is legal. If the hash is illegal, the block is also illegal. The hash of each block needs to meet certain conditions, which can be set according to the needs of the system.
步骤S9、验证新的区块的前哈希是否正确。Step S9, verify whether the previous hash of the new block is correct.
也即验证第二链中新的区块的前一个区块的哈希是否正确。如不正确,则该新的区块不合法。That is, verify whether the hash of the previous block of the new block in the second chain is correct. If it is incorrect, the new block is illegal.
步骤S10、验证新的区块的父哈希和子哈希是否满足第一验证条件。Step S10, verify whether the parent hash and child hash of the new block meet the first verification condition.
步骤S10具体包括:父哈希所属的区块的时间戳与新的区块的时间戳的差值是否在门限时间差值内,若否,则验证失败;子哈希所属的区块的时间戳与新的区块的时间戳的差值是否在门限时间差值内,若否,则验证失败。那么,第一验证条件为:父哈希所属的区块的时间戳与新的区块的时间戳的差值是否在门限时间差值内,以及子哈希所属的区块的时间戳与新的区块的时间戳的差值是否在门限时间差值内。Step S10 specifically includes: whether the difference between the time stamp of the block to which the parent hash belongs and the time stamp of the new block is within the threshold time difference; if not, the verification fails; the time of the block to which the child hash belongs Whether the difference between the stamp and the timestamp of the new block is within the threshold time difference, if not, the verification fails. Then, the first verification condition is: whether the difference between the timestamp of the block to which the parent hash belongs and the timestamp of the new block is within the threshold time difference, and the timestamp of the block to which the child hash belongs and the new block Whether the difference between the timestamps of the block is within the threshold time difference.
对于新的区块的父哈希还可以这样验证:父哈希所属的区块是否为父哈希所属的区块所属父链的最后一个区块,若否,则验证失败。那么,对于新的区块的父哈希,第一验证条件为:父哈希所属的区块是否为父哈希所属的区块所属父链的最后一个区块。The parent hash of the new block can also be verified as follows: whether the block to which the parent hash belongs is the last block of the parent chain of the block to which the parent hash belongs, if not, the verification fails. Then, for the parent hash of a new block, the first verification condition is: whether the block to which the parent hash belongs is the last block of the parent chain to which the block to which the parent hash belongs.
若哈希不存在或差值不在门限时间差值内,则都验证失败。If the hash does not exist or the difference is not within the threshold time difference, the verification fails.
步骤S11、对新的区块的交易列表中的交易进行验证。Step S11, verify the transactions in the transaction list of the new block.
对交易进行验证是为了后续处理区块的交易。The verification of the transaction is for the subsequent processing of the block transaction.
步骤S12、根据父哈希对父链进行查询,如果有从父链转入数据的交易,且从父链转入数据的交易所属的区块在父哈希所属的区块之前,则修改指定账户的数据。Step S12: Query the parent chain based on the parent hash. If there is a transaction that transfers data from the parent chain, and the block of the transaction that transfers data from the parent chain belongs to the block before the parent hash belongs, modify the designation Account data.
具体的,根据新的区块的父哈希对第一条链进行查询,如果有从第一条链转入数据的交易,具体为有从第一条链到本链的转账,且该交易所属的区块位于父哈希所属的区块之前,则修改指定账户的数据,具体为给指定账户增加指定的数字货币。Specifically, the first chain is queried according to the parent hash of the new block. If there is a transaction that transfers data from the first chain, specifically there is a transfer from the first chain to this chain, and the transaction If the block belongs to before the block to which the parent hash belongs, the data of the specified account is modified, specifically, the specified digital currency is added to the specified account.
步骤S13、根据子哈希对子链进行查询,如果有从子链转入数据的交易,且从子链转入数据的交易所属的区块在子哈希所属的区块之前,则修改指定账户的数据。Step S13: Query the sub-chain according to the sub-hash. If there is a transaction that transfers data from the sub-chain, and the block of the transaction that transfers data from the sub-chain belongs to before the block to which the sub-hash belongs, modify the designation Account data.
参考图7,在本实施例中,本链也即第二条链C2的子链为系统第三条链C3。具体的,根据新的区块的子哈希对第三条链C3进行查询,如果有 从第三条链C3转入数据的交易,具体为有从第三条链C3到本链的转账,且该交易所属的区块位于子哈希所属的区块之前,则修改指定账户的数据,具体为给指定账户增加指定的数字货币。Referring to Fig. 7, in this embodiment, the current chain, that is, the child chain of the second chain C2, is the third chain C3 of the system. Specifically, the third chain C3 is queried according to the sub-hash of the new block. If there is a transaction transferring data from the third chain C3, specifically, there is a transfer from the third chain C3 to this chain. And the block to which the transaction belongs is before the block to which the sub-hash belongs, the data of the specified account is modified, specifically, the specified digital currency is added to the specified account.
现有的区块链虽然是分布式的,仅仅是数据的分发是分布式的,数据的处理是每个计算节点都需要处理的。由于是单链式结构,为保证所有节点处理结果的一致性,只能串行处理数据。区块链的TPS依赖于区块大小、区块生成时间及串行处理能力。Although the existing blockchain is distributed, only the distribution of data is distributed, and data processing needs to be processed by each computing node. Because it is a single-chain structure, in order to ensure the consistency of the processing results of all nodes, data can only be processed serially. The TPS of the blockchain depends on the block size, block generation time and serial processing capabilities.
为提升区块链系统的处理能力,可通过某种方式对区块链进行扩容,比如改变区块大小限制和加快区块生成速度等方法都能够对区块链进行扩容。传统的扩容方法仅仅是调整区块的大小限制和调整区块生成时间,性能提升有限。In order to improve the processing capacity of the blockchain system, the blockchain can be expanded in some way, such as changing the block size limit and accelerating the block generation speed, etc., to expand the blockchain. The traditional expansion method is only to adjust the block size limit and adjust the block generation time, and the performance improvement is limited.
相比之下,本实施例对区块的结构进行改进,使得区块链系统包括多条并行的链。父哈希和子哈希可保证区块链系统的可追溯性。如此,根据区块的父哈希和子哈希可分别对父链和子链中相关区块的交易进行查询并可依据查询结果修改数据。允许计算节点通过不同的区块进行并发交易,可将数据的串行处理改为并行处理,可提升整个区块链系统的处理能力,从而提升系统的TPS。In contrast, this embodiment improves the structure of the block, so that the block chain system includes multiple parallel chains. Parent hash and child hash can ensure the traceability of the blockchain system. In this way, according to the parent hash and child hash of the block, transactions of related blocks in the parent chain and the child chain can be queried respectively, and data can be modified according to the query result. Allows computing nodes to conduct concurrent transactions through different blocks, and can change the serial processing of data to parallel processing, which can improve the processing capacity of the entire blockchain system, thereby improving the TPS of the system.
在本实施例的区块链系统中,如果链标识的位数为64位,那么整个系统可以拥有2^64条链。如果一条链的TPS为7,那么整个系统的TPS极限为7*2^64。系统的TPS极限随链标识位数增加而呈指数级增长。如果系统使用以太坊、EOS(Enterprise Operation System,商用分布式设计区块链操作系统)等优化技术,TPS极限还能继续提升。In the blockchain system of this embodiment, if the number of bits of the chain identification is 64 bits, the entire system can have 2^64 chains. If the TPS of a chain is 7, then the TPS limit of the entire system is 7*2^64. The TPS limit of the system increases exponentially as the number of chain identification bits increases. If the system uses optimization technologies such as Ethereum and EOS (Enterprise Operation System, commercial distributed design blockchain operating system), the TPS limit can continue to increase.
本实施例是对区块链的共识算法进行叠加增强。In this embodiment, the consensus algorithm of the blockchain is superimposed and enhanced.
对无效区块的校验进行说明。The verification of invalid blocks is explained.
如图8,第二条链C2的区块B2’在刚生成的时候也是一个有效的区块,只是随着时间推移,基于共识最终被放弃,导致第一条链C1的区块Bi+2是不被承认的区块。区块Bi+2的子哈希是第二条链C2中的区块B2’,所以区块Bi+2也被丢弃。如果第二条链C2中的某个区块的父哈希为区块Bi+2,那么该某个区块也将被丢弃。As shown in Figure 8, block B2' of the second chain C2 was also a valid block when it was first generated, but over time, it was finally abandoned based on consensus, resulting in block Bi+2 of the first chain C1 It is an unrecognized block. The sub-hash of block Bi+2 is block B2' in the second chain C2, so block Bi+2 is also discarded. If the parent hash of a block in the second chain C2 is block Bi+2, then this block will also be discarded.
第二实施例Second embodiment
参考图9,步骤S11对新的区块的交易列表中的交易进行验证具体包括步骤S111至步骤S115。在本实施例中,步骤S11由交易处理单元2执 行。Referring to FIG. 9, step S11 to verify the transactions in the transaction list of the new block specifically includes steps S111 to S115. In this embodiment, step S11 is executed by the transaction processing unit 2.
步骤S111、验证交易的数字签名是否合法。Step S111, verify whether the digital signature of the transaction is legal.
步骤S112、验证交易携带的链标识是否与新的区块的本链标识是否一致。也即验证交易的链标识和区块的链标识是否一致。Step S112: It is verified whether the chain identifier carried in the transaction is consistent with the local chain identifier of the new block. That is, verify whether the chain ID of the transaction is consistent with the chain ID of the block.
步骤S113、验证是否支持交易的操作码。Step S113, verify whether the transaction operation code is supported.
每个交易都有相应的数字签名和操作码等信息。操作码用于处理交易。默认的操作码是转账交易码。如果支持,则基于操作码处理交易。Each transaction has corresponding information such as digital signature and operation code. Opcodes are used to process transactions. The default operation code is the transfer transaction code. If supported, the transaction is processed based on the opcode.
步骤S114、验证数字货币的来源是否正确以及数量是否正确。Step S114, verify whether the source of the digital currency is correct and whether the amount is correct.
步骤S115、基于交易的操作码处理交易。Step S115: Process the transaction based on the operation code of the transaction.
本实施例的操作码包括但不限于转账交易码、跨链转移数据码和创建子链码。相应的,可处理的交易包括转账交易、跨链转移数据交易和创建新链交易。The operation codes in this embodiment include, but are not limited to, transfer transaction codes, cross-chain transfer data codes, and create sub-chain codes. Correspondingly, transactions that can be processed include transfer transactions, cross-chain data transfer transactions, and creation of new chain transactions.
转账交易:修改转入账户和转出账户的数字货币数量。Transfer transactions: modify the amount of digital currency transferred into and out of the account.
跨链转移数据交易,以跨链转账为例进行说明:For cross-chain transfer of data transactions, take cross-chain transfer as an example:
验证目标链的链标识是否合法,如果目标链还不存在,属于不合法操作;Verify whether the chain identity of the target chain is legal. If the target chain does not exist yet, it is an illegal operation;
扣除转出账户的数字货币;Deduct the digital currency transferred out of the account;
在目标链(父链或子链)中,增加一条转入数据的记录,等待目标链处理该记录。In the target chain (parent chain or child chain), add a record of transferred data and wait for the target chain to process the record.
对本实施例的跨链转移数据交易进行具体说明。The cross-chain transfer data transaction in this embodiment will be specifically described.
用户创建一条交易,要把第一条链C1上的代币转移到第二条链C2上。参考图5,交易被区块Bi+1确认收录,扣除用户的相应代币。第二条链C2的区块B3指向第一条链C1的区块Bi+1,发现有转到第二条链C2的交易,系统自动在第二条链C2上为用户增加相应的代币。第二条链C2的区块B2只依赖区块Bi,所以区块B2中,用户还没有代币,只有到区块B3时,才有代币。这样就做到了跨链转移数据。The user creates a transaction to transfer the tokens on the first chain C1 to the second chain C2. Referring to Figure 5, the transaction is confirmed and included in block Bi+1, and the user's corresponding tokens are deducted. The block B3 of the second chain C2 points to the block Bi+1 of the first chain C1, and it is found that there is a transaction to the second chain C2, and the system automatically adds corresponding tokens to the user on the second chain C2 . Block B2 of the second chain C2 only relies on block Bi, so in block B2, the user does not have tokens, and only when it reaches block B3, will there be tokens. In this way, data is transferred across chains.
创建新链交易具体包括:The creation of a new chain transaction specifically includes:
验证条件是否满足;在本实施例中,需要花费一定数量的数字货币才允许创建新链;Verify whether the conditions are met; in this embodiment, it takes a certain amount of digital currency to allow the creation of a new chain;
验证新链的链标识是否合法;在本实施例中,新链的链标识除以2要等于本链的链标识;Verify whether the chain ID of the new chain is legal; in this embodiment, the chain ID of the new chain divided by 2 must be equal to the chain ID of this chain;
验证新链的链标识是否已经存在,如果存在就忽略交易;Verify whether the chain identity of the new chain already exists, and ignore the transaction if it exists;
如果上述验证均通过,则创建指定的新链。If the above verifications are passed, the specified new chain is created.
第三实施例The third embodiment
参考图10,本实施例提供一种计算机设备,该计算机设备包括:一个或多个处理器7,以及存储器8。存储器8用于存储一个或多个程序。Referring to FIG. 10, this embodiment provides a computer device. The computer device includes: one or more processors 7 and a memory 8. The memory 8 is used to store one or more programs.
一个或多个程序可被一个或多个处理器7执行,从而实现上述实施例的方法。One or more programs may be executed by one or more processors 7 to realize the methods of the above-mentioned embodiments.
本领域普通技术人员可以理解实施例方法中的全部或部分流程可以由计算机程序来命令相关的硬件完成,程序可存储于计算机可读取存储介质中,程序在执行时,可包括如各方法实施例的流程。而前述的存储介质包括:ROM或随机存储记忆体RAM、磁碟或者光盘等各种可存储程序代码的介质。A person of ordinary skill in the art can understand that all or part of the procedures in the method of the embodiment can be completed by a computer program instructing the relevant hardware. The program can be stored in a computer readable storage medium. When the program is executed, it can include the implementation of various methods. Example process. The aforementioned storage media include: ROM or random storage RAM, magnetic disks or optical discs and other media that can store program codes.
以上内容是结合具体/优选的实施方式对本申请所作的进一步详细说明,不能认定本申请的具体实施只局限于这些说明。对于本申请所属技术领域的普通技术人员来说,在不脱离本申请构思的前提下,其还可以对这些已描述的实施方式做出若干替代或变型,而这些替代或变型方式都应当视为属于本申请的保护范围。The above content is a further detailed description of the application in combination with specific/preferred implementations, and it cannot be considered that the specific implementation of the application is limited to these descriptions. For those of ordinary skill in the technical field to which this application belongs, without departing from the concept of this application, they can also make several substitutions or modifications to the described implementations, and these substitutions or modifications should be regarded as It belongs to the protection scope of this application.

Claims (10)

  1. 一种区块的生成方法,其特征在于包括:A block generation method, which is characterized in that it includes:
    获取本链标识、前哈希、父哈希、子哈希和未被打包的交易列表;Get the chain ID, previous hash, parent hash, child hash and list of unpackaged transactions;
    所述本链标识用于标记本区块所属的链;The local chain identifier is used to mark the chain to which this block belongs;
    所述前哈希用于指向本链的前一个区块;The previous hash is used to point to the previous block of this chain;
    所述父哈希用于指向父链的区块;The parent hash is used to point to the block of the parent chain;
    所述子哈希用于指向子链的区块;The sub-hash is used to point to the block of the sub-chain;
    所述未被打包的交易列表的每条交易携带的链标识均为所述本链标识,以使每条链里的交易列表都只包含本链的交易;The chain identifier carried by each transaction of the unpackaged transaction list is the own chain identifier, so that the transaction list in each chain only contains transactions of the own chain;
    将所述本链标识、所述前哈希、所述父哈希、所述子哈希和所述未被打包的交易列表按照区块格式填充,以生成新的区块。The own chain identifier, the previous hash, the parent hash, the child hash, and the unpackaged transaction list are filled according to the block format to generate a new block.
  2. 根据权利要求1所述的生成方法,其特征在于,The generating method according to claim 1, wherein:
    获取所述前哈希包括:选取一条链,获取所述一条链的最后一个区块的哈希作为所述前哈希;Obtaining the previous hash includes: selecting a chain, and acquiring the hash of the last block of the chain as the previous hash;
    获取所述父哈希包括:如果本区块所属的链存在父链,则获取本区块指向父链的区块的哈希作为所述父哈希;Obtaining the parent hash includes: if the chain to which this block belongs has a parent chain, obtaining the hash of the block pointing to the parent chain as the parent hash;
    获取所述子哈希包括:如果本区块所属的链存在子链,则获取本区块指向子链的区块的哈希作为所述子哈希。Obtaining the sub-hash includes: if there is a sub-chain in the chain to which the current block belongs, obtaining the hash of the block that the current block points to the sub-chain as the sub-hash.
  3. 根据权利要求2所述的生成方法,其特征在于,The generating method according to claim 2, wherein:
    所述获取本区块指向父链的区块的哈希作为所述父哈希具体为:The obtaining the hash of the block whose current block points to the parent chain as the parent hash is specifically:
    将父链的最后一个区块的哈希作为所述父哈希;Use the hash of the last block of the parent chain as the parent hash;
    或者,将父链中时间戳与本区块的时间戳的差值在门限时间差值内的区块的哈希作为所述父哈希;Or, use the hash of the block whose time stamp in the parent chain and the time stamp of the current block is within the threshold time difference as the parent hash;
    所述获取本区块指向子链的区块的哈希作为所述子哈希具体为:The obtaining the hash of the block that the current block points to the sub-chain as the sub-hash specifically includes:
    将子链中时间戳与本区块的时间戳的差值在门限时间差值内的区块的哈希作为所述子哈希。The hash of the block whose time stamp in the sub-chain and the time stamp of the current block is within the threshold time difference is used as the sub-hash.
  4. 一种区块链系统数据处理方法,其特征在于包括:A data processing method for blockchain system, which is characterized in that it comprises:
    验证新的区块的哈希是否合法;Verify that the hash of the new block is legal;
    验证所述新的区块的前哈希是否正确;Verifying whether the previous hash of the new block is correct;
    验证所述新的区块的父哈希和子哈希是否满足第一验证条件;Verifying whether the parent hash and child hash of the new block meet the first verification condition;
    对所述新的区块的交易列表中的交易进行验证;Verify the transactions in the transaction list of the new block;
    根据所述父哈希对父链进行查询,如果有从父链转入数据的交易,且所述从父链转入数据的交易所属的区块在所述父哈希所属的区块之前,则修改指定账户的数据;Query the parent chain according to the parent hash, if there is a transaction that transfers data from the parent chain, and the block to which the data transferred from the parent chain belongs is before the block to which the parent hash belongs, Modify the data of the specified account;
    根据所述子哈希对子链进行查询,如果有从子链转入数据的交易,且所述从子链转入数据的交易所属的区块在所述子哈希所属的区块之前,则修改指定账户的数据。Query the sub-chain based on the sub-hash, if there is a transaction that transfers data from the sub-chain, and the block to which the data-transferred-in transaction from the sub-chain belongs is before the block to which the sub-hash belongs, Modify the data of the specified account.
  5. 根据权利要求4所述的区块链系统数据处理方法,其特征在于所述验证所述新的区块的父哈希和子哈希是否满足第一验证条件包括:The blockchain system data processing method according to claim 4, wherein said verifying whether the parent hash and the child hash of the new block meet the first verification condition comprises:
    判断所述父哈希所属的区块的时间戳与所述新的区块的时间戳的差值是否在门限时间差值内;判断所述子哈希所属的区块的时间戳与所述新的区块的时间戳的差值是否在门限时间差值内。Determine whether the difference between the time stamp of the block to which the parent hash belongs and the time stamp of the new block is within the threshold time difference; Whether the time stamp difference of the new block is within the threshold time difference.
  6. 根据权利要求4或5所述的区块链系统数据处理方法,其特征在于所述对所述新的区块的交易列表中的交易列表进行验证包括:基于交易的操作码处理交易;所述基于交易的操作码处理交易包括转账交易、跨链转移数据交易和创建新链交易。The block chain system data processing method according to claim 4 or 5, wherein the verification of the transaction list in the transaction list of the new block comprises: processing the transaction based on the operation code of the transaction; Transaction-based opcode processing transactions include transfer transactions, cross-chain transfer data transactions, and creation of new chain transactions.
  7. 根据权利要求4所述的区块链系统数据处理方法,其特征在于:包括根据权利要求1至3任一项所述生成方法。The block chain system data processing method according to claim 4, characterized by comprising the generating method according to any one of claims 1 to 3.
  8. 一种区块链系统数据处理方法,其特征在于包括:A data processing method for blockchain system, which is characterized in that it comprises:
    为一条链创建一条或者多条子链;Create one or more sub-chains for a chain;
    根据权利要求1至3任一项所述生成方法。The production method according to any one of claims 1 to 3.
  9. 一种计算机设备,其特征在于所述计算机设备包括:A computer device, characterized in that the computer device includes:
    一个或多个处理器;One or more processors;
    存储器,用于存储一个或多个程序;Memory, used to store one or more programs;
    所述一个或多个程序可被所述一个或多个处理器执行,以实现根据权利要求1至7任一项所述方法。The one or more programs may be executed by the one or more processors to implement the method according to any one of claims 1 to 7.
  10. 一种计算机可读存储介质,其特征在于:所述计算机可读存储介质中存储有程序指令,所述程序指令被计算机的处理器执行时使所述处理器执行根据权利要求1至7任一项所述方法。A computer-readable storage medium, characterized in that: the computer-readable storage medium stores program instructions, and when the program instructions are executed by a processor of a computer, the processor executes any one of claims 1 to 7 The method described in the item.
PCT/CN2019/085154 2019-04-30 2019-04-30 Data processing method for blockchain system and block generating method WO2020220251A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201980000562.7A CN110235162B (en) 2019-04-30 2019-04-30 Block chain system data processing method and block generation method
PCT/CN2019/085154 WO2020220251A1 (en) 2019-04-30 2019-04-30 Data processing method for blockchain system and block generating method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/085154 WO2020220251A1 (en) 2019-04-30 2019-04-30 Data processing method for blockchain system and block generating method

Publications (1)

Publication Number Publication Date
WO2020220251A1 true WO2020220251A1 (en) 2020-11-05

Family

ID=67855273

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/085154 WO2020220251A1 (en) 2019-04-30 2019-04-30 Data processing method for blockchain system and block generating method

Country Status (2)

Country Link
CN (1) CN110235162B (en)
WO (1) WO2020220251A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112651044A (en) * 2020-12-29 2021-04-13 杭州趣链科技有限公司 Business transaction method, system and storage medium based on block chain technology
CN114153658A (en) * 2021-11-22 2022-03-08 成都飞机工业(集团)有限责任公司 Data storage method and device for industrial equipment, terminal equipment and storage medium

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111061735B (en) * 2019-12-13 2023-07-25 度小满科技(北京)有限公司 Capacity expansion method and device based on single-chain blockchain
CN111506658B (en) * 2020-04-17 2021-09-28 腾讯科技(深圳)有限公司 Data processing method and device, first equipment and storage medium
CN112395646B (en) * 2020-10-28 2024-09-13 杭州趣链科技有限公司 Coding generation method, device, equipment and storage medium based on block chain
CN115460222B (en) * 2022-09-05 2024-09-20 蚂蚁区块链科技(上海)有限公司 Block chain data stream computing device
CN115580621B (en) * 2022-09-08 2024-02-27 中国联合网络通信集团有限公司 Block chain cross-chain business processing method, node, medium and block chain

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7822927B1 (en) * 2007-05-14 2010-10-26 Emc Corporation Dynamically configurable reverse DNLC lookup
CN108462582A (en) * 2018-02-09 2018-08-28 北京欧链科技有限公司 Feedback method for treating in block chain and device
CN108512649A (en) * 2018-02-09 2018-09-07 北京欧链科技有限公司 The processing method and processing device of the reversed Hash link of block chain
CN109033422A (en) * 2018-08-08 2018-12-18 云南天之游科技股份有限公司 A kind of method, apparatus and block chain generating block chain

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105809420A (en) * 2016-03-08 2016-07-27 杭州复杂美科技有限公司 Liquidation method of multi-layer block chain
CN107464112B (en) * 2017-07-20 2021-05-25 捷德(中国)科技有限公司 Transaction management method and system based on block chain
CN109460530A (en) * 2018-10-18 2019-03-12 尚维斯 A kind of block chain chain address register method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7822927B1 (en) * 2007-05-14 2010-10-26 Emc Corporation Dynamically configurable reverse DNLC lookup
CN108462582A (en) * 2018-02-09 2018-08-28 北京欧链科技有限公司 Feedback method for treating in block chain and device
CN108512649A (en) * 2018-02-09 2018-09-07 北京欧链科技有限公司 The processing method and processing device of the reversed Hash link of block chain
CN109033422A (en) * 2018-08-08 2018-12-18 云南天之游科技股份有限公司 A kind of method, apparatus and block chain generating block chain

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112651044A (en) * 2020-12-29 2021-04-13 杭州趣链科技有限公司 Business transaction method, system and storage medium based on block chain technology
CN112651044B (en) * 2020-12-29 2024-03-01 杭州趣链科技有限公司 Business transaction method, system and storage medium based on block chain technology
CN114153658A (en) * 2021-11-22 2022-03-08 成都飞机工业(集团)有限责任公司 Data storage method and device for industrial equipment, terminal equipment and storage medium

Also Published As

Publication number Publication date
CN110235162A (en) 2019-09-13
CN110235162B (en) 2023-10-31

Similar Documents

Publication Publication Date Title
WO2020220251A1 (en) Data processing method for blockchain system and block generating method
EP3678346B1 (en) Blockchain smart contract verification method and apparatus, and storage medium
CN113329031B (en) Method and device for generating state tree of block
US20240348442A1 (en) Maintaining blocks of a blockchain in a partitioned blockchain network
US12073400B2 (en) Method and system for an efficient consensus mechanism for permissioned blockchains using audit guarantees
US11663090B2 (en) Method and system for desynchronization recovery for permissioned blockchains using bloom filters
CN107392608B (en) Block chain system-based digital asset transaction method and block chain system
CN107577427B (en) data migration method, device and storage medium for blockchain system
US9990391B1 (en) Transactional messages in journal-based storage systems
US10108658B1 (en) Deferred assignments in journal-based storage systems
US20210049715A1 (en) Blockchain-based data procesing method, apparatus, and electronic device
JPWO2019038839A1 (en) Blockchain management device, blockchain management method and program
KR20220123221A (en) Data structure for efficient data validation
CN108470039A (en) Data processing method and device in block chain
CN110489420A (en) A kind of data processing method and device based on block chain
WO2024000897A1 (en) Blockchain-based digital asset synthesis method and apparatus
CN108710658B (en) Data record storage method and device
WO2023071373A1 (en) Blockchain consensus method, apparatus, and device, and storage medium
US20230230080A1 (en) Storing and retrieving data associated with an asset
WO2021057165A1 (en) Method for concurrently executing transactions in blockchain, and device
CN108509149A (en) Data processing method and device in block chain

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19926901

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19926901

Country of ref document: EP

Kind code of ref document: A1