WO2019224593A1 - 区块链的生成方法及系统 - Google Patents

区块链的生成方法及系统 Download PDF

Info

Publication number
WO2019224593A1
WO2019224593A1 PCT/IB2018/057142 IB2018057142W WO2019224593A1 WO 2019224593 A1 WO2019224593 A1 WO 2019224593A1 IB 2018057142 W IB2018057142 W IB 2018057142W WO 2019224593 A1 WO2019224593 A1 WO 2019224593A1
Authority
WO
WIPO (PCT)
Prior art keywords
block
blockchain
node
nodes
broadcast
Prior art date
Application number
PCT/IB2018/057142
Other languages
English (en)
French (fr)
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 柯宾汉数位金融科技有限公司
Publication of WO2019224593A1 publication Critical patent/WO2019224593A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications

Definitions

  • the present invention relates to a blockchain system, and in particular, to a blockchain system in which a plurality of nodes each produce a blockchain, and then the plurality of blockchains are compacted into a common blockchain.
  • Blockchain technology is a technical solution that does not rely on third parties to store, verify, transfer, and communicate network data through its own decentralized nodes. Therefore, from the perspective of financial accounting, some people regard the blockchain technology as a decentralized and open decentralized large-scale network book (public ledger).
  • Public ledger An organization of a blockchain
  • the public ledger used by Bitcoin is a decentralized storage scheme based on the Proof-of-Work mechanism, which usually has extremely high security and anti-attack characteristics.
  • computing power of up to thousands of TH / s is required, which has exceeded the total computing power of the top 500 supercomputers in the world by a hundred times.
  • Bitcoin has the advantages of decentralization and immutable data, there are still many shortcomings. For example, resources are wasted. Bitcoin uses the Proof-of-Work mechanism to determine who produces new blocks. This method results in a large number of computers computing a meaningless mathematical problem at the same time, resulting in resources. Waste; incomplete decentralization, Bitcoin uses the Proof-of-Work mechanism to determine who produces new blocks, resulting in computers with strong computing power controlling most of the rights to produce blocks, forming Another form of centralization problem; non-scalable, in order to ensure the consistency of data, Bitcoin can only produce one recognized block per period of time, so the average number of transactions per second (TPS) can only load 7 transactions Transactions cause problems such as network congestion and slow block production speeds; there is a risk of front-running.
  • TPS average number of transactions per second
  • the present invention provides a method for generating a blockchain, which is executed on a computer system, the computer system includes a plurality of nodes, and includes the following steps: the nodes obtain a shared file based on a blockchain protocol, and The shared file separately establishes a blockchain, where each blockchain contains a block, and the content of the blockchain established by each node is not completely the same; the nodes mutually confirm (Ack) the blockchain To form multiple confirmed blockchains; and It has been confirmed that the blockchain is compacted to form a common blockchain.
  • the steps of the nodes mutually confirming the blockchain to form a plurality of confirmed blockchains further include the following sub-steps: a first of the nodes is in the block established A first block is generated in the chain, and a first broadcast corresponding to the first block is issued; the nodes other than the first node receive the broadcast, and confirm the first block; and when the first block After a block is confirmed by more than a predetermined number of the nodes, the block chain established by the first node becomes the confirmed block chain.
  • the predetermined number is two thirds of the total number of the nodes.
  • the sub-steps of the nodes other than the first node receiving the first broadcast to confirm the first block further include the following steps: a second node of the nodes receives the first block The first broadcast of a node; the second node generates a second block according to the shared file, wherein the second block contains a confirmation data corresponding to the first block; and the second node sends the first block A second broadcast corresponding to the two blocks.
  • the confirmation data includes the creator code of the first block, the hash value of the first block, the height of the first block, and a confirmation time stamp, where the confirmation time stamp is the The second node receives the timestamp of the first broadcast. And a creation timestamp of the second block is greater than a creation timestamp of the first block, wherein the creation time stamp is a timestamp created by the block.
  • the method further includes the following steps: storing the common blockchain at the nodes.
  • the block of each block chain is compacted according to an ordering algorithm to form the common block chain.
  • the block includes a creator code, a transaction record, a hash value of the block, a hash value of a previous block of the block, a creator signature, a block height, and -Confirm the data.
  • the transaction record contains multiple transaction data, and each transaction data includes a transaction code, a sender code, a receiver code, a transaction volume, and a sender signature.
  • Another category of the present invention is to provide a blockchain generation system, which includes: a blockchain network that stores a shared file; and a plurality of nodes that are connected to the blockchain network to obtain the shared file, and based on The shared file separately establishes a blockchain, and the nodes mutually confirm (Ack) the blockchain to form a plurality of confirmed blockchains; wherein, the confirmed blockchains are compacted to form a A common blockchain, and each blockchain contains a block, and the content of the blockchain established by each node is not exactly the same.
  • the method and system for generating a blockchain according to the present invention use a plurality of nodes to form a blockchain each, and use a consensus algorithm and a sorting algorithm to compact multiple blockchains into a common blockchain.
  • the present invention proposes an innovative blockchain data structure based on Directed Acyclic Graph (DAG). Multiple nodes establish their own blockchains at the same time, which makes the speed very fast. In the current blockchain system, the problem of centralization is avoided.
  • the present invention uses the method of mutual confirmation (Ack) between nodes to achieve consensus between the nodes, which can not only solve the Byzantine Generals Problem, but also greatly reduce the amount of system operation and avoid waste of resources. .
  • FIG. 1 is a method flowchart of a specific embodiment of the present invention.
  • FIG. 2 is a sub-flow chart of step 2000 in FIG. 1.
  • FIG. 3 is a sub-flow chart of step 2500 in FIG. 2.
  • FIG. 4 is a schematic diagram of a specific embodiment of steps 2300 and 2400 of FIG. 2.
  • FIG. 5 is a schematic diagram of a specific embodiment of steps 2530 and 2540 in FIG. 3.
  • Figure 6 is a schematic diagram of a node generating a branch chain.
  • FIG. 7 is a schematic diagram of a blockchain structure of the present invention.
  • FIG. 8 is a schematic diagram of a specific embodiment of step 3000 in FIG. 1.
  • Second Broadcast 1000 Steps
  • Step 2400 Step 2
  • Step 2510 Step 2510
  • Step 2530 Step
  • Step 2540 Step 2540
  • Step 3000 Steps
  • FIG. 1 is a flowchart of a method according to a specific embodiment of the present invention.
  • the invention provides a method and system for generating a blockchain.
  • the blockchain generation system includes a blockchain network and a plurality of nodes.
  • a shared file is stored in the blockchain network.
  • the shared file is an open file uploaded by a user, such as transaction records, contract contents, etc., each Each node can obtain shared files by accessing the blockchain network.
  • Multiple nodes are co-maintainers of the blockchain network, and play the storage and validator of the blockchain network.
  • each node represents an electronic computer device, and multiple nodes It includes a first node and a second node. As shown in FIG.
  • step 1000 multiple nodes respectively establish a blockchain based on a shared file on the blockchain network.
  • a shared file on the blockchain network there are several shared files on the blockchain network, and each node can obtain different shared files to establish a blockchain, so the blockchain established by each node is not exactly the same (some content may occur the same).
  • the user can choose to deliver the uploaded shared file to the selected node, or a representative (Delegate) randomly allocates the shared file to multiple nodes for data packaging.
  • the block chain established by each node is connected by multiple blocks, and each block includes a creator code (Block Proposer ID) and a transaction record (Transactions)
  • Each block includes a creator code (Block Proposer ID) and a transaction record (Transactions)
  • Block Hash the previous block hash of the block (Previous Block Hash), a creator signature (Signature), a block height (Block Height), and a confirmation data (Acks).
  • the transaction record contains multiple transaction data, and each transaction data includes a transaction code (Transaction ID), a sender code (Sender ID), a receiver code (Receiver ID), and a transaction load (Payload) , And a Sender Signature.
  • FIG. 2 is a sub-flow chart of step 2000 in FIG. 1
  • FIG. 3 is a sub-flow chart of step 2500 in FIG. 2.
  • each node confirms (Ack) the blockchain to form a plurality of confirmed blockchains.
  • Step 2000 can be divided into the following sub-steps: Step 2100, the first node obtains the shared file; step 2200, the first node checks whether the shared file is correct?
  • Step 2600 When the first block is confirmed by more than a predetermined number of nodes, a confirmed block chain is formed.
  • Step 2500 can be divided into the following steps: Step 2510, the second node receives the first broadcast; step 2520, the second node checks whether the first broadcast content is correct? If not, continue to step 2531 to remove the first broadcast that fails the check; if yes, continue to step 2530.
  • the second node creates a second block based on the shared file, where the second block contains a confirmation data; step 2540: The second node sends a second broadcast.
  • FIG. 4 is a schematic diagram of a specific embodiment of steps 2300 and 2400 in FIG. 2.
  • the first node 100 obtains a transaction record (shared file) from the blockchain network and checks the transaction record.
  • the check item includes checking whether the data format of the transaction record is correct, and checking whether the content of the transaction record conforms to
  • the data stored in the first node 100 for example, checks whether there is sufficient balance in the account of the transaction sender to perform the transaction. If the inspection result shows that the data is wrong, the transaction record will be removed and will not be recorded in the new block.
  • the first node 100 can directly delete the transaction record that fails the inspection, or the error message Return to Delegate or other nodes.
  • the transaction record is written into the newly created first block 110.
  • the first node 100 establishes the first block 110, it sends a first broadcast 120 to notify other nodes.
  • the first broadcast 120 includes information about the first block 110, and the first broadcast 120 is based on the Gossip protocol. Protocol) to ensure that all nodes can receive the broadcast, but the broadcast method is not limited to this. Please refer to FIG. 3, FIG. 4, FIG. 5, and FIG. 6.
  • FIG. 5 is a schematic diagram of a specific embodiment of steps 2530 and 2540 of FIG. 3, and FIG. 6 is a schematic diagram of a node generating a fork.
  • the second node 200 receives the first broadcast 120, and checks whether the content included in the first broadcast 120 is correct, such as checking the hash value of the previous block included in the broadcast (Previous Block Hash). ) Is it the same as other broadcasts? If it has the same previous block hash (Previous Block Hash), it means that the node that sent the broadcast generates a branch (Fork), and the case where the same node generates a branch is in the present invention. It is not allowed. Therefore, when it is checked that the node that sends the broadcast generates a branch chain, an error message can be reported to the representative (Delegate) or other nodes, and even the node that generates the branch chain is punished.
  • the block 20 of node 10 generates a branch chain. As shown in Figure 6.
  • the second node 200 writes the confirmation information of the received first broadcast 120 into a newly generated second block 210. It is worth noting that The second node 200 does not establish the second block 210 because of receiving the first broadcast 120.
  • the second node 200 may receive several broadcasts before establishing a new block 210, while the second node 200 is only establishing a new block When receiving the second block 210, the received broadcast (pass inspection) confirmation information (Ack) is written into the second block 210.
  • the second node 200 When the first broadcast 120 passes the check, and the second node 200 writes the confirmation information of the first broadcast 120 into a newly generated second block 210, it represents the second block 210 to confirm (Ack) the first area Block 110, as shown in FIG. 5, the second block 210 points to the arrow of the first block 110.
  • the confirmation data includes the creator code of the first block (Block Proposer ID), the hash value of the first block (Block Hash), the height of the first block (Block Height), and a confirmation time stamp (Block Ack Timestamp), where the confirmation timestamp is the timestamp of the second node 210 receiving the first broadcast 120, and the height of the first block is the first block 110 generated in the blockchain of the first node 100 In sequence, for example, if the first block 110 is the second block generated by the first node 100, the height of the first block is 2.
  • the second node 200 After the second node 200 establishes the second block 210, it sends a second broadcast 220 to notify other nodes, where the second broadcast 220 contains information about the second block 210, and the second broadcast 220 is based on the gossip protocol ( Gossip Protocol) to ensure that all nodes (including the first node 100) can receive the broadcast, but the broadcast method is not limited to this.
  • Gossip Protocol Gossip Protocol
  • the block is created with a creation time stamp.
  • the creation time stamp of the second block 210 must be greater than the first block.
  • the creation timestamp of block 110, that is, the first block 110 must be created earlier than the second block 210.
  • FIG. 7 is a schematic diagram of a blockchain structure of the present invention.
  • each node establishes multiple blocks to form a blockchain, and multiple nodes confirm the newly generated blocks with each other (as shown by the arrows between the blocks), forming a directed acyclic loop.
  • Graph Directed Acyclic Graph, DAG
  • block 20 is the latest block generated by node 10.
  • the block chain 30 to which block 20 belongs is: Become a confirmed blockchain.
  • FIG. 1 and FIG. 8 is a schematic diagram of a specific embodiment of step 3000 in FIG. 1. After performing the above steps 2000, multiple confirmed blockchains are obtained, and then step 3000 is performed to compact the multiple confirmed blockchains to form a common blockchain. In the specific embodiment of FIG.
  • the blockchains 30, 32, and 34 generated by the nodes 10, 12, and 14 have been confirmed (Ack) by more than two-thirds of the nodes to form a confirmed blockchain, and the nodes can use All confirmed blockchains are compacted into a common blockchain.
  • the common blockchain contains all blocks of all confirmed blockchains, and these blocks (21, 22, 23, 24, 25 , 26, 27)
  • the relative position of the sort is fixed.
  • the order of blocks can be sorted according to the creation timestamp of each block, or sorted according to an ordering algorithm. Among them, the sorting algorithm regards the previous block that has been placed in the common blockchain as the first order to enter the common blockchain, and then enters the common area according to the number of times that the block is confirmed (Ack).
  • the ordering algorithm Total Ordering
  • each node will confirm each other by broadcast (Ack), so the common blockchain calculated by each node will be consistent.
  • the common blockchain is stored in each node as a basis for inspection (public ledger).
  • a representative can also be used to check whether the common blockchain generated by each node is consistent to ensure data consistency.
  • each node acquires a shared file from the blockchain network to establish a blockchain
  • the same transaction record may be generated when two nodes are formed in a common blockchain and recorded in two different blocks.
  • it will automatically delete one of the duplicate transaction records to ensure the correctness of the data.
  • an electronic computer device is sliced into a plurality of nodes, and each node operates independently to generate a blockchain, so that the computing resources are used to the maximum.
  • the method and system for generating a blockchain according to the present invention utilize a plurality of nodes to form a blockchain each, and use a consensus algorithm and a sorting algorithm to compact multiple blockchains into a common blockchain.
  • the present invention proposes an innovative blockchain data structure based on Directed Acyclic Graph (DAG). Multiple nodes establish their own blockchains at the same time, which makes the speed very fast. In the current blockchain system, the problem of centralization is avoided.
  • the present invention uses the method of mutual confirmation (Ack) between nodes to achieve consensus between the nodes, which can not only solve the Byzantine Generals Problem, but also greatly reduce the amount of system operation and avoid waste of resources. .
  • the block generation speed of the present invention is much faster than the current blockchain system, it means that when a transaction is put on the blockchain generation system of the present invention, it can be written into the block quickly, so It also solves the problem of fairness in the prior art.

Abstract

一种区块链的生成方法,其包含以下步骤:多个节点基于区块链协定获取一共享文件,并且依据共享文件分别建立一区块链,其中每一区块链包含一区块,且每一节点所建立的区块链内容皆不完全相同;该些节点互相确认区块链,形成多个已确认区块链;以及将该些已确认区块链压实形成一共同区块链。相较于现有技术,本发明的区块链生成方法及系统可以更快速的产生区块,并且大幅降低运算量,具有无限的可扩展性、防止网络壅塞、确保交易公平、以及达到真正的去中心化的优点。

Description

区块链的生成方法及系统
技术领域
本发明关于一种区块链系统,并且特别地,关于一种由多个节点各自产出一条区块链, 之后将多条区块链压实成一条共同区块链的区块链系统。 背景技术
近年来, 以区块链技术为基础的各种虚拟货币 (Crypto Currency)开始在网际网络上大 量使用和流行,如比特币、以太币、狗狗币等,且这些虚拟货币的日交易额超过千万美元, 并且在不断增长中。 目前已有维基百科、 戴尔电脑、 新蛋、 PayPal 等著名公司和机构支 持使用比特币作为交易货币。
区块链技术是一种不依赖第三方、 通过自身分散式节点进行网络数据的存储、 验证、 传递和交流的一种技术方案。 因此, 有人从金融会计的角度, 把区块链技术看成是一种分 散式开放性去中心化的大型网络记账薄 (公开帐本), 任何人任何时间都可以采用相同的技 术标准加入自己的信息, 延伸区块链, 持续满足各种需求带来的数据录入需要。
比特币使用的公开帐本是一套基于工作量证明 (Proof-of-Work)机制的分散式存储方 案, 通常具有极高的安全性和抗攻击特性。要对比特币区块链的安全性形成有效攻击, 需 要高达数千 TH/s以上的计算能力, 这已经超过了当前全球前 500强巨型机的计算能力总 和的百倍。
然而,虽然比特币具有去中心化、数据不可窜改等优点,但仍存在着许多缺点。例如, 资源浪费, 比特币使用工作量证明 (Proof-of-Work)机制决定由谁产出新的区块, 这样的方 式导致有大量的电脑在同一时间计算一个没有意义的数学问题,造成资源的浪费;非完全 去中心化, 比特币使用工作量证明 (Proof-of-Work)机制决定由谁产出新的区块, 导致算力 较强的电脑掌控了大部分出块的权利, 形成另一种形式的中心化问题; 不可扩展, 比特币 为了确保数据的一致性,限制每段时间只能产出一个被认可的区块, 因此平均每秒交易数 (TPS)仅能负荷 7笔交易,造成网络堵塞、出块速度过慢等问题;具有提前交易 (front-running) 的风险, 区块链上每一笔交易数据都是公开透明的, 比特币送出的交易有可能需要经过几 个小时或是几天才会被写入区块中承认,而在交易被写入区块之前都会有被别人抢先交易 的风险, 造成不公平的问题。 由上述内容可知, 目前以区块链为基础的比特币具有诸多的 缺点, 实非良善设计。 发明内容
有鉴于此, 本发明提供一种区块链的生成方法, 执行于一电脑系统, 该电脑系统包含 多个节点, 其包含以下步骤: 该些节点基于区块链协定获取一共享文件, 并且依据该共享 文件分别建立一区块链,其中每一区块链包含一区块,且每一节点所建立的该区块链内容 皆不完全相同; 该些节点互相确认 (Ack)该区块链, 形成多个已确认区块链; 以及将该些 已确认区块链压实 (Compacted)形成一共同区块链。
于一具体实施例中,该些节点互相确认该区块链以形成多个已确认区块链的步骤,进 一步包含以下子步骤: 该些节点中的一第一节点在所建立的该区块链中产生一第一区块, 并且发出该第一区块所对应的一第一广播;非该第一节点的该些节点接收该广播,并且确 认该第一区块; 以及当该第一区块被超过一预定数量的该些节点确认后,该第一节点建立 的该区块链即成为该已确认区块链。 其中该预定数量为该些节点总数的三分之二。
于一具体实施例中,非该第一节点的该些节点接收该第一广播以确认该第一区块的子 步骤, 进一步包含以下次步骤: 该些节点中的一第二节点接收该第一节点的该第一广播; 该第二节点依据该共享文件产生一第二区块,其中该第二区块包含对应于该第一区块的一 确认数据; 以及该第二节点发出该第二区块所对应的一第二广播。
于实际应用上, 该确认数据包含该第一区块的创建者代码、该第一区块的哈希值、该 第一区块的高度、以及一确认时间戳,其中该确认时间戳为该第二节点接收到该第一广播 的时间戳。且该第二区块的一创建时间戳大于该第一区块的一创建时间戳,其中该创建时 间戳为该区块创建的时间戳。
于一具体实施例中,将该些已确认区块链压实形成一共同区块链的步骤后,另包含以 下步骤: 将该共同区块链储存在该些节点。
于一具体实施例中, 每一区块链的该区块依据一排序演算法 (Ordering Algorithm)压实 形成该共同区块链。
于实际应用上, 该区块包含一创建者代码、 一交易记录、 该区块的哈希值、 该区块的 前一区块的哈希值、 一创建者签名、 一区块高度、 以及一确认数据。且该交易记录为包含 多笔交易数据, 每一笔交易数据包含一交易代码、 一发送者代码、 一接受者代码、 一交易 量、 以及一发送者签名。
本发明另一范畴在于提供一种区块链生成系统, 其包含: 一区块链网络, 储存一共享 文件; 以及多个节点, 该些节点连接该区块链网络获取该共享文件, 并且依据该共享文件 分别建立一区块链, 该些节点互相确认 (Ack)该区块链以形成多个已确认区块链; 其中, 该些已确认区块链被压实 (Compacted)以形成一共同区块链, 而每一区块链包含一区块, 且每一节点所建立的该区块链内容皆不完全相同。
本发明的区块链生成方法及系统利用多个节点各自形成一条区块链,并且利用共识演 算法以及排序演算法将多条区块链压实成一共同区块链。相较于现有技术,本发明以有向 无环图 (Directed Acyclic Graph, DAG)为基础提出一种创新的区块链数据结构,多个节点同 时建立各自的区块链使得出快速度远大于目前的区块链系统,且避免了中心化的问题。另 一方面, 本发明使用个节点间互相确认 (Ack)的方式使节点间达到共识 (Consensus), 不但 能解决拜占庭将军问题 (Byzantine Generals Problem), 又可以大幅降低系统的运算量, 避 免资源浪费。 同时, 由于本发明的出块速度远大于目前的区块链系统, 意味着当一笔交易 被放上本发明的区块链生成系统时,可以很快的就被写入区块中, 因此也解决了现有技术 公平性问题。 附图说明
图 1为本发明的一具体实施例的方法流程图。
图 2为图 1步骤 2000的子流程图。
图 3为图 2步骤 2500的次流程图。
图 4为图 2步骤 2300、 步骤 2400的一具体实施例的示意图。
图 5为图 3步骤 2530、 步骤 2540的一具体实施例的示意图。
图 6为节点产生支链的示意图。
图 7为本发明的区块链结构的示意图。
图 8为图 1步骤 3000的一具体实施例的示意图。 图号说明:
10、 12、 14: 节点
20、 21、 22、 23、 24、 25、 26、 27 : 区块
30、 32、 34: 区块链 100: 第一节点
110: 第一区块 120: 第一广播
200: 第二节点 210: 第二区块
220: 第二广播 1000: 步骤
2000: 步骤 2100: 步骤
2200: 步骤 2300: 步骤
2301: 步骤 2400: 步骤
2500: 步骤 2510: 步骤
2520: 步骤 2530: 步骤
2531: 步骤 2540: 步骤
2600: 步骤 3000: 步骤 具体实施方式
为了让本发明的优点,精神与特征可以更容易且明确地了解, 后续将以具体实施例并 参照附图进行详述与讨论。值得注意的是, 这些具体实施例仅为本发明代表性的具体实施 例, 其中所举例的特定方法、 装置、 条件、 材质等并非用以限定本发明或对应的具体实施 例。 又, 图中各装置仅用于表达其相对位置且未按其实际比例绘述, 合先叙明。
请参考图 1, 图 1为本发明的一具体实施例的方法流程图。 本发明提供一区块链生成 方法及系统, 该区块链生成系统包含一区块链网络以及多个节点。 区块链网络中储存一共 享文件, 共享文件是经由一使用者所上传的公开文件, 例如交易记录, 合约内容等, 每一 个节点都可以通过访问区块链网络获取共享文件。多个节点为该区块链网络的共同维护者, 扮演着区块链网络的储存器 (Storage)以及验证器 (Validator), 一般来说每一个节点代表着 一个电子计算机装置, 其中多个节点中包含一第一节点以及一第二节点。如图 1所示, 步 骤 1000, 多个节点依据区块链网络上的共享文件分别建立一区块链。 实际应用上, 区块 链网络上存在着数笔共享文件,而每一个节点可以获取不同的共享文件建立区块链, 因此 每一个节点所建立的区块链皆不完全相同 (可能发生部分内容相同)。 于一具体实施例中, 使用者可以自行选择要将上传的共享文件交付给选择的节点, 或是由一代表 (Delegate)将 共享文件随机分配给多个节点进行数据打包。
于一具体实施例中,每一节点所建立的区块链都是由多个区块所连接而成,且每一区 块包含一创建者代码 (Block Proposer ID)、 一交易记录 (Transactions)、 该区块的哈希值
(Block Hash)、该区块的前一区块的哈希值 (Previous Block Hash)、一创建者签名 (Signature)、 一区块高度 (Block Height)、 以及一确认数据 (Acks)。 进一步的, 交易记录中包含多笔交易 数据, 每一笔交易数据包含一交易代码 (Transaction ID)、 一发送者代码 (Sender ID)、 一接 受者代码 (Receiver ID)、 一交易量 (Payload)、 以及一发送者签名 (Sender Signature)。
请参考图 1、图 2以及图 3 , 图 2为图 1步骤 2000的子流程图, 图 3为图 2步骤 2500 的次流程图。 于步骤 2000中, 各节点互相确认 (Ack)区块链, 形成多个已确认区块链。 而 步骤 2000又可以分为以下子步骤: 步骤 2100, 第一节点获取共享文件; 步骤 2200, 第一 节点查验共享文件是否正确?若否, 则接续步骤 2301, 除去未通过查验的共享文件; 若 是,则接续步骤 2300,第一节点建立一第一区块;步骤 2400,第一节点发出一第一广播; 步骤 2500, 其余节点接收到第一广播后, 确认 (Ack)第一区块; 步骤 2600, 当第一区块被 超过一预定数量的节点确认后, 即形成已确认区块链。 其中, 步骤 2500又可以分为以下 次步骤: 步骤 2510, 第二节点接收到第一广播; 步骤 2520, 第二节点查验第一广播内容 是否正确?若否,则接续步骤 2531,除去未通过查验的第一广播;若是,则接续步骤 2530, 第二节点依据共享文件建立一第二区块, 其中第二区块包含一确认数据; 步骤 2540: 第 二节点发出一第二广播。 以下将针对上述步骤以实施例以及附图方式详尽说明。
请参考图 2以及图 4, 图 4为图 2步骤 2300、 步骤 2400的一具体实施例的示意图。 于一具体实施例中, 第一节点 100由区块链网络获取交易记录 (共享文件), 并且对交易记 录进行查验,查验项目包含检查交易记录的数据格式是否正确, 以及检查交易记录内容是 否符合第一节点 100内所储存的数据,例如,检查交易发送者的帐号中是否有足够余额进 行交易。 若查验结果显示数据错误, 此笔交易记录则被除去, 不会被记录到新的区块中, 于实际应用上,第一节点 100可以直接把未通过查验的交易记录删除,或将错误讯息回报 给代表 (Delegate)或其他节点。 若查验结果显示数据正确, 则将交易记录写入新创建的第 一区块 110中。当第一节点 100建立第一区块 110后即发出一第一广播 120通知其他节点, 其中,第一广播 120包含第一区块 110的相关信息,且第一广播 120是以八卦协议 (Gossip Protocol)的方式广播, 以确保所有节点都能收到广播, 但广播方式不限于此。 请参考图 3、 图 4、 图 5以及图 6, 图 5为图 3步骤 2530、 步骤 2540的一具体实施例 的示意图, 图 6为节点产生支链 (Fork)示意图。 于一具体实施例中, 第二节点 200接收到 第一广播 120, 并且查验第一广播 120所包含的内容是否正确, 例如检查广播中所包含的 前一区块的哈希值 (Previous Block Hash)是否与其他广播相同, 若具有相同的前一区块的 哈希值 (Previous Block Hash)则代表发送广播的节点产生支链 (Fork), 而同一节点产生支链 的情况在本发明中是不允许的, 因此当检查出发送广播的节点产生支链,可以将错误讯息 回报给代表 (Delegate)或其他节点, 甚至给予产生支链的节点惩处, 节点 10的区块 20产 生支链的示意图如图 6所示。
另一方面,若查验第一广播 120所包含的内容物正确,则第二节点 200将接收到第一 广播 120的确认信息写入新产生的一第二区块 210中,值得注意的是,第二节点 200并非 因为收到第一广播 120而建立第二区块 210,第二节点 200在建立新的区块 210之前可能 会收到数个广播, 而第二节点 200仅是在建立新的第二区块 210时, 将收到的广播 (通过 查验)的确认信息 (Ack)写入第二区块 210中。 当第一广播 120通过查验, 且第二节点 200 将收到第一广播 120的确认信息写入新产生的一第二区块 210中, 则代表第二区块 210 确认 (Ack)第一区块 110, 如图 5中第二区块 210指向第一区块 110的箭号。 实际应用上, 确认数据包含第一区块的创建者代码 (Block Proposer ID)、 第一区块的哈希值 (Block Hash)、 第一区块的高度 (Block Height)、 以及一确认时间戳 (Block Ack Timestamp), 其中确认时间 戳为第二节点 210接收到第一广播 120的时间戳,第一区块的高度为第一区块 110在第一 节点 100的区块链中被产生的顺序, 例如, 若第一区块 110为第一节点 100所产生的第 2 个区块, 则第一区块的高度为 2。 当第二节点 200建立第二区块 210后, 即发出一第二广 播 220通知其他节点, 其中, 第二广播 220包含第二区块 210的相关信息, 且第二广播 220是以八卦协议 (Gossip Protocol)的方式广播, 以确保所有节点 (包含第一节点 100)都能 收到广播, 但广播方式不限于此。
于一具体实施例中, 区块被建立时具有一创建的时间戳, 当第二区块 210确认 (Ack) 第一区块 110时,第二区块 210的创建时间戳必须大于第一区块 110的创建时间戳, 即第 一区块 110必须比第二区块 210早创建。
请参考图 7, 图 7为本发明的区块链结构的示意图。 图 7中, 每个节点各自建立多个 区块以形成区块链, 而多个节点相互对新产生的区块进行确认 (如图中区块间的箭号), 形 成一有向无环图 (Directed Acyclic Graph, DAG)架构的区块链。 于一具体实施例中, 区块 20为节点 10最新生成的区块, 当区块 20被超过节点总数三分之二的节点确认 (Ack)后, 区块 20所属的区块链 30即成为已确认区块链。值得注意的是, 由于区块信息中包含前一 区块的哈希值 (Previous Block Hash), 因此当节点 10生成新的区块 20(子区块)被超过三分 之二的节点确认 (Ack)时, 相当于确认了节点 10的区块 20(子区块)前所有连接的区块 (母 区块)。本发明所使用确认 (Ack)方式的共识演算法 (Consensus Algorithm)解决了区块链中的 拜占庭将军问题 (Byzantine Generals Problem)。 请参考图 1以及图 8, 图 8为图 1步骤 3000的一具体实施例的示意图。 执行完上述 步骤 2000后获得多个已确认区块链, 接着进行步骤 3000, 将多个已确认区块链压实形成 一共同区块链。 于图 8 的具体实施例中, 节点 10、 12、 14所产生的区块链 30、 32、 34 已经被超过三分之二的节点确认 (Ack)形成已确认区块链, 而节点可以将所有已确认区块 链压实 (Compacted)成一条共同区块链,共同区块链上包含所有已确认区块链的所有区块, 且该些区块 (21、 22、 23、 24、 25、 26、 27)排序的相对位置固定不变。 区块的排序方式可 以依据每个区块的创建时间戳排序, 或是依据一排序演算法 (Ordering Algorithm)进行排序。 其中,排序演算法将前一区块已被放入共同区块链的区块当作进入共同区块链的第一顺序, 之后则依据区块被确认 (Ack)的次数做为进入共同区块链的排序, 利用排序演算法 (Ordering Algorithm)进行整合排序 (Total Ordering)可以避免使用区块的创建时间戳, 避免 创建时间戳被窜改的风险。
于实际应用上,虽然每个节点虽然各自建立不同的区块链,但由于每个节点间会以广 播方式互相确认 (Ack), 因此每个节点计算出的共同区块链会是一致的, 而共同区块链被 储存在每个节点中当作查验的依据 (公开帐本)。 于一具体实施例中, 亦可以通过一代表 (Delegate)检查每个节点所产生的共同区块链是否一致, 以确保数据的一致性。
于实际应用上, 由于每个节点都是由区块链网络中获取共享文件而建立区块链, 因此 在形成共同区块链时可能会产生同一笔交易记录被记录在两个不同的区块中,当压实时检 测到同一笔交易重复出现, 则会自动删除其中一笔重复的交易记录, 确保数据的正确性。
于一具体实施例中,一电子计算机装置被分片成多个节点,且每一节点独立运作产生 一区块链, 使运算资源被最大化的利用。
本发明的区块链生成方法及系统利用多个节点各自形成一条区块链,并且利用共识演 算法以及排序演算法将多条区块链压实成一共同区块链。相较于现有技术,本发明以有向 无环图 (Directed Acyclic Graph, DAG)为基础提出一种创新的区块链数据结构,多个节点同 时建立各自的区块链使得出快速度远大于目前的区块链系统,且避免了中心化的问题。另 一方面, 本发明使用个节点间互相确认 (Ack)的方式使节点间达到共识 (Consensus), 不但 能解决拜占庭将军问题 (Byzantine Generals Problem), 又可以大幅降低系统的运算量, 避 免资源浪费。 同时, 由于本发明的出块速度远大于目前的区块链系统, 意味着当一笔交易 被放上本发明的区块链生成系统时,可以很快的就被写入区块中, 因此也解决了现有技术 公平性问题。
通过以上较佳具体实施例的详述,是希望能更加清楚描述本发明的特征与精神,而并 非以上述所公开的较佳具体实施例来对本发明的范畴加以限制。相反地,其目的是希望能 涵盖各种改变及具相等性的安排于本发明所欲申请的专利范围的范畴内。因此,本发明所 申请的专利范围的范畴应根据上述的说明作最宽广的解释,以致使其涵盖所有可能的改变 以及具相等性的安排。

Claims

权利要求
1. 一种区块链生成方法, 执行于一电脑系统, 该电脑系统包含多个节点, 其包含以 下步骤:
该些节点基于一区块链协定获取一共享文件,并且依据该共享文件分别建立一区块链, 其中每一区块链包含一区块, 且每一节点所建立的该区块链内容皆不完全相同;
该些节点互相确认该区块链, 形成多个已确认区块链; 以及
将该些已确认区块链压实形成一共同区块链。
2. 如权利要求 1所述的方法, 其中该些节点互相确认该区块链以形成多个已确认区 块链的步骤, 进一步包含以下子步骤:
该些节点中的一第一节点在所建立的该区块链中产生一第一区块, 并且发出该第 一区块所对应的一第一广播;
非该第一节点的该些节点接收该广播, 确认该第一区块; 以及
当该第一区块被超过一预定数量的该些节点确认后,该第一节点建立的该区块链即成 为该已确认区块链。
3. 如权利要求 2所述的方法, 其中该预定数量为该些节点总数的三分之二。
4. 如权利要求 2所述的方法, 其中非该第一节点的该些节点接收该第一广播以确认 该第一区块的子步骤, 进一步包含以下次步骤:
该些节点中的一第二节点接收该第一节点的该第一广播;
该第二节点依据该共享文件产生一第二区块,其中该第二区块包含对应于该第一区块 的一确认数据; 以及
该第二节点发出该第二区块所对应的一第二广播。
5. 如权利要求 4所述的方法, 其中该确认数据包含该第一区块的创建者代码、 该第 一区块的哈希值、该第一区块的高度、 以及一确认时间戳, 其中该确认时间戳为该第二节 点接收到该第一广播的时间戳。
6. 如权利要求 4所述的方法, 其中该第二区块的一创建时间戳大于该第一区块的一 创建时间戳, 其中该创建时间戳为该区块创建的时间戳。
7. 如权利要求 1所述的方法, 其中将该些已确认区块链压实形成一共同区块链之步 骤后, 另包含以下步骤:
将该共同区块链储存在该些节点。
8. 如权利要求 1所述的方法, 其中每一区块链的该区块依据一排序演算法压实形成 该共同区块链。
9. 如权利要求 1所述的方法, 其中该区块包含一创建者代码、 一交易记录、 该区块 的哈希值、 该区块的前一区块的哈希值、 一创建者签名、 一区块高度以及一确认数据。
10.如权利要求 9所述的方法, 其中该交易记录为包含多笔交易数据, 每一笔交易数 据包含一交易代码、 一发送者代码、 一接受者代码、 一交易量以及一发送者签名。
11.一种区块链生成系统, 其包含:
一区块链网络, 储存一共享文件; 以及
多个节点,该些节点连接该区块链网络获取该共享文件,并且依据该共享文件分别建 立一区块链, 该些节点互相确认该区块链以形成多个已确认区块链;
其中, 该些已确认区块链被压实以形成一共同区块链, 而每一区块链包含一区块, 且 每一节点所建立的该区块链内容皆不完全相同。
12.如权利要求 11所述的区块链生成系统,其中该多个节点包含有一第一节点,该第 一节点依据该共享文件生成一第一区块,并且发出该第一区块所对应的一第一广播,其中 非该第一节点的该些节点接收该第一广播,并且确认该第一区块, 当该第一区块被超过一 预定数量的该些节点确认后, 该第一节点建立的该区块链即成为该已确认区块链。
13.如权利要求 12所述的区块链生成系统,其中该预定数量为该些节点总数的三分之
14.如权利要求 12所述的区块链生成系统,其中该多个节点包含有一第二节点,用于 接收该第一节点的该第一广播,其中当该第二节点依据该共享文件产生一第二区块时,该 第二区块包含对应于该第一区块的一确认数据,并且该第二节点发出该第二区块所对应的 一第二广播。
15.如权利要求 14所述的区块链生成系统,其中该确认数据包含该第一区块的创建者 代码、该第一区块的哈希值、该第一区块的高度以及一确认时间戳, 其中该确认时间戳为 该第二节点接收到该第一广播的时间戳。
16.如权利要求 14所述的区块链生成系统,其中该第二区块的一创建时间戳大于该第 一区块的一创建时间戳, 其中该创建时间戳为该区块创建的时间戳。
17.如权利要求 11所述的区块链生成系统, 其中该共同区块链被储存在该些节点中。
18.如权利要求 11所述的区块链生成系统,其中每一区块链的该区块依据一排序演算 法压实以形成该共同区块链。
19.如权利要求 11所述的区块链生成系统,其中该区块包含一创建者代码、一交易记 录、 该区块的哈希值、 该区块的前一区块的哈希值、 一创建者签名、 一区块高度以及一确 认数据。
20.如权利要求 19所述的区块链生成系统,其中该交易记录为包含多笔交易数据,每 一笔交易数据包含一交易代码、一发送者代码、一接受者代码、一交易量以及一发送者签 名。
PCT/IB2018/057142 2018-05-25 2018-09-18 区块链的生成方法及系统 WO2019224593A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
TW107118027 2018-05-25
TW107118027A TWI673988B (zh) 2018-05-25 2018-05-25 區塊鏈的生成方法及系統

Publications (1)

Publication Number Publication Date
WO2019224593A1 true WO2019224593A1 (zh) 2019-11-28

Family

ID=68615561

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/IB2018/057142 WO2019224593A1 (zh) 2018-05-25 2018-09-18 区块链的生成方法及系统

Country Status (2)

Country Link
TW (1) TWI673988B (zh)
WO (1) WO2019224593A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111538791A (zh) * 2020-05-07 2020-08-14 深圳创客区块链技术有限公司 区块链多重跨链相互保护方法、装置及存储介质
WO2023279972A1 (zh) * 2021-07-07 2023-01-12 支付宝(杭州)信息技术有限公司 区块链一致性处理方法、区块链节点和区块链系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106228446A (zh) * 2016-05-12 2016-12-14 北京众享比特科技有限公司 基于私有区块链的资产交易平台系统及方法
CN106452785A (zh) * 2016-09-29 2017-02-22 财付通支付科技有限公司 区块链网络、分支节点及区块链网络应用方法
CN107078910A (zh) * 2016-12-23 2017-08-18 深圳前海达闼云端智能科技有限公司 生成区块链区块的方法、装置、节点、签名设备及系统
US20170346637A1 (en) * 2016-05-27 2017-11-30 Sony Corporation Electronic apparatus, method for electronic apparatus and information processing system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI331861B (en) * 2007-01-24 2010-10-11 Realtek Semiconductor Corp Null symbol detecting device and method
US9229952B1 (en) * 2014-11-05 2016-01-05 Palantir Technologies, Inc. History preserving data pipeline system and method
US10198325B2 (en) * 2016-05-24 2019-02-05 Mastercard International Incorporated Method and system for desynchronization recovery for permissioned blockchains using bloom filters
CN106406896B (zh) * 2016-09-27 2020-03-17 北京天德科技有限公司 一种并行PipeLine技术的区块链建块方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106228446A (zh) * 2016-05-12 2016-12-14 北京众享比特科技有限公司 基于私有区块链的资产交易平台系统及方法
US20170346637A1 (en) * 2016-05-27 2017-11-30 Sony Corporation Electronic apparatus, method for electronic apparatus and information processing system
CN106452785A (zh) * 2016-09-29 2017-02-22 财付通支付科技有限公司 区块链网络、分支节点及区块链网络应用方法
CN107078910A (zh) * 2016-12-23 2017-08-18 深圳前海达闼云端智能科技有限公司 生成区块链区块的方法、装置、节点、签名设备及系统

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111538791A (zh) * 2020-05-07 2020-08-14 深圳创客区块链技术有限公司 区块链多重跨链相互保护方法、装置及存储介质
CN111538791B (zh) * 2020-05-07 2023-09-22 深圳创客区块链技术有限公司 区块链多重跨链相互保护方法、装置及存储介质
WO2023279972A1 (zh) * 2021-07-07 2023-01-12 支付宝(杭州)信息技术有限公司 区块链一致性处理方法、区块链节点和区块链系统

Also Published As

Publication number Publication date
TWI673988B (zh) 2019-10-01
TW202005327A (zh) 2020-01-16

Similar Documents

Publication Publication Date Title
WO2023050555A1 (zh) 一种高性能分布式存储区块数据、时间戳、跨链通信与数据协同方法
CN109871669B (zh) 一种基于区块链技术的数据共享解决方法
JP7472333B2 (ja) バリデータノードにより提供されるブロックチェーントランザクションをマイニングする方法及びシステム
KR102432731B1 (ko) 네트워크 내의 분산 데이터베이스를 위한 방법 및 장치
CN114514732B (zh) 用于区块链dag结构的共识协议的方法、计算系统和可读介质
Bandara et al. Mystiko—blockchain meets big data
US20200145233A1 (en) System and method for implementing blockchain-based digital certificates
US10572455B2 (en) Methods and apparatus for a distributed database within a network
US20200143366A1 (en) Methods for decentralized digital asset transfer and smart contract state transition
Kaur et al. Scalability in blockchain: Challenges and solutions
CN112686671B (zh) 基于区块链的智能合约部署方法、装置、设备以及介质
CN112835612A (zh) 一种基于区块链的电子文档版本管理方法及装置
CN111988338A (zh) 基于区块链的权限可控的物联网云平台及数据交互方法
WO2023016164A1 (zh) 一种基于智能合约的数据处理方法、装置、电子设备、计算机可读存储介质及计算机程序产品
CN112053271B (zh) 基于区块链的公益平台数据存证管理方法及系统
WO2019224593A1 (zh) 区块链的生成方法及系统
WO2023020242A1 (zh) 基于区块链的数据处理方法、装置、计算机设备、计算机可读存储介质及计算机程序产品
CN111737352B (zh) 一种基于区块链的供应链信息协同管理方法
CN111881109A (zh) 数据库可合并分类账
Li et al. Scalable blockchain storage mechanism based on two-layer structure and improved distributed consensus
JP2024515022A (ja) ブロックチェーンに基づくデータ処理方法、装置、機器及びコンピュータプログラム
CN114329528A (zh) 一种基于区块链的档案数据管理方法及系统
CN116304265A (zh) 一种基于区块链的电子档案管理方法及系统
WO2023221350A1 (zh) 基于区块链的代码版权登记系统、方法及平台
Jadhav et al. Decentralized Data Storage Solutions using Hyperledger Fabric

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: 18919758

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: 18919758

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 28.05.2021.)

122 Ep: pct application non-entry in european phase

Ref document number: 18919758

Country of ref document: EP

Kind code of ref document: A1