TWI749583B - Chain structure data storage, verification, realization method, system, device and media - Google Patents

Chain structure data storage, verification, realization method, system, device and media Download PDF

Info

Publication number
TWI749583B
TWI749583B TW109119498A TW109119498A TWI749583B TW I749583 B TWI749583 B TW I749583B TW 109119498 A TW109119498 A TW 109119498A TW 109119498 A TW109119498 A TW 109119498A TW I749583 B TWI749583 B TW I749583B
Authority
TW
Taiwan
Prior art keywords
data
key
chain
information
transaction
Prior art date
Application number
TW109119498A
Other languages
Chinese (zh)
Other versions
TW202125299A (en
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 TW202125299A publication Critical patent/TW202125299A/en
Application granted granted Critical
Publication of TWI749583B publication Critical patent/TWI749583B/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2219Large Object storage; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Storage Device Security (AREA)

Abstract

一種鏈式結構資料儲存方法及裝置、鏈式結構驗證方法及裝置、鏈式結構系統及實現方法、儲存媒體及電腦裝置。該鏈式結構實現方法包括:第一鏈系統對帳本資料簽名後,將簽名後的帳本資料寫入第一鏈的區塊資料;第二鏈系統在驗證第一鏈的區塊資料後,將該第一鏈的一或複數連續的區塊資料寫入第二鏈的區塊資料;資料儲存裝置將該第二鏈中鏈的部分或全部連接資訊作為第一鍵,驗證該第一鍵關聯的資料無錯誤後,將該資料儲存為輸入資料或輸出資料,同一資料儲存裝置儲存的輸入資料和輸出資料根據相同的連接資訊相關聯。 A chain structure data storage method and device, a chain structure verification method and device, a chain structure system and an implementation method, a storage medium and a computer device. The implementation method of the chain structure includes: after the first chain system signs the ledger data, write the signed ledger data into the block data of the first chain; after the second chain system verifies the block data of the first chain , Write one or more consecutive block data of the first chain into the block data of the second chain; the data storage device uses part or all of the link information of the second chain as the first key to verify the first After the data associated with the key has no errors, save the data as input data or output data, and the input data and output data stored in the same data storage device are related according to the same connection information.

Description

鏈式結構資料儲存、驗證、實現方法、系統、裝置及媒體 Chain structure data storage, verification, realization method, system, device and media

本文涉及但不限於電腦資料處理技術領域,尤指一種鏈式結構資料儲存方法及裝置、鏈式結構驗證方法及裝置、鏈式結構系統及實現方法、儲存媒體及電腦裝置。 This article relates to but is not limited to the field of computer data processing technology, in particular to a chain structure data storage method and device, a chain structure verification method and device, a chain structure system and implementation method, a storage medium and a computer device.

目前的去中心化系統例如公有鏈系統,因為有著公開、透明、可追溯、不可篡改等特點,所以能降低交易參與方之間的信任成本,可作為信任的基礎實現價值傳遞。 Current decentralized systems, such as public chain systems, have the characteristics of being open, transparent, traceable, and non-tamperable, so they can reduce the cost of trust between transaction participants and can be used as the basis for trust to achieve value transfer.

然而,目前的去中心化系統存在以下問題:節點需要儲存全部資料才能驗證整個帳本資料。 However, the current decentralized system has the following problem: the node needs to store all the data in order to verify the entire ledger data.

以下是對本文詳細描述的主題的概述。本概述並非是為了限制申請專利範圍的保護範圍。 The following is an overview of the topics detailed in this article. This summary is not intended to limit the scope of protection of the patent application.

本文提供一種資料儲存方法、鏈式結構驗證方法、鏈式結構實現方法及系統。 This article provides a data storage method, chain structure verification method, chain structure realization method and system.

在一示例性實施例中,本揭露提供一種資料儲存方法,用於儲存鏈式結構中的資料,該方法包括:將該鏈式結構中鏈的部分或全部連接資訊作為第一鍵,該第一鍵關聯的該鏈式結構中的資料作為值,將該資料儲存為輸入資料或輸出資料,同一資料儲存裝置儲存的輸入資料和輸出資料根據相同的連接資訊相關聯。 In an exemplary embodiment, the present disclosure provides a data storage method for storing data in a chain structure. The method includes: using part or all of the connection information of the chain in the chain structure as a first key, and the first key The data in the chain structure associated with one key is used as the value, and the data is stored as input data or output data. The input data and output data stored in the same data storage device are related according to the same connection information.

在一示例性實施例中,本揭露還提供一種鏈式結構驗證方法,該方法包括:將該鏈式結構中鏈的部分或全部連接資訊作為第一鍵,該第一鍵關聯的該鏈式結構中的資料作為值,驗證該第一鍵關聯的資料是否有錯誤,驗證該第一鍵關聯的資料無錯誤後,將該資料儲存為輸入資料或輸出資料。 In an exemplary embodiment, the present disclosure further provides a method for verifying a chain structure, the method comprising: using part or all of the connection information of the chain in the chain structure as a first key, and the chain structure associated with the first key The data in the structure is used as the value to verify whether the data associated with the first key has errors, and after verifying that the data associated with the first key has no errors, save the data as input data or output data.

在一示例性實施例中,本揭露還提供一種鏈式結構驗證方法,該方法包括:將該鏈式結構中鏈的部分或全部連接資訊作為第二鍵,從資料儲存裝置獲取該資料儲存裝置儲存的與該第二鍵關聯的資料,根據該獲取的資料驗證該鏈式結構中的資料是否有錯誤。 In an exemplary embodiment, the present disclosure also provides a method for verifying a chain structure. The method includes: using part or all of the connection information of the chain in the chain structure as a second key, and obtaining the data storage device from the data storage device Based on the stored data associated with the second key, verify whether the data in the chain structure has errors based on the acquired data.

在一示例性實施例中,本揭露還提供一種鏈式結構實現方法,該鏈式結構系統包括第一鏈系統、第二鏈系統和資料儲存裝置,該方法包括:該第一鏈系統對帳本資料簽名後,將簽名後的帳本資料寫入第一鏈的區塊資料;該第二鏈系統在驗證第一鏈的區塊資料後,將該第一鏈的一或複數連續的區塊資料寫入第二鏈的區塊資料; 該資料儲存裝置將該第二鏈中鏈的部分或全部連接資訊作為第一鍵,該第一鍵關聯的資料作為值,驗證該第一鍵關聯的資料無錯誤後,將該資料儲存為輸入資料或輸出資料,同一資料儲存裝置儲存的輸入資料和輸出資料根據相同的連接資訊相關聯。 In an exemplary embodiment, the present disclosure also provides a method for implementing a chain structure. The chain structure system includes a first chain system, a second chain system, and a data storage device. The method includes: the first chain system reconciliation After this data is signed, the signed ledger data is written into the block data of the first chain; after the second chain system verifies the block data of the first chain, one or more consecutive areas of the first chain The block data is written into the block data of the second chain; The data storage device uses part or all of the link information of the second chain as the first key, and the data associated with the first key as the value. After verifying that the data associated with the first key is correct, the data is stored as input Data or output data, the input data and output data stored in the same data storage device are related according to the same connection information.

在一示例性實施例中,本揭露還提供了一種鏈式結構資料儲存裝置,該資料儲存裝置包括第一儲存模組和第二儲存模組,其中:該第一儲存模組,設定為將該鏈式結構中鏈的部分或全部連接資訊作為第一鍵儲存;該第二儲存模組,設定為將該第一鍵關聯的該鏈式結構中的資料儲存為輸入資料或輸出資料,同一資料儲存裝置儲存的輸入資料和輸出資料根據相同的連接資訊相關聯。 In an exemplary embodiment, the present disclosure also provides a chain structure data storage device, the data storage device includes a first storage module and a second storage module, wherein: the first storage module is set to Part or all of the link information of the chain in the chain structure is stored as the first key; the second storage module is set to store the data in the chain structure associated with the first key as input data or output data, the same The input data and output data stored in the data storage device are related according to the same connection information.

在一示例性實施例中,本揭露還提供了一種鏈式結構資料驗證裝置,該資料驗證裝置包括鍵值查找模組、第二驗證模組,其中:該鍵值查找模組,設定為查找該鏈式結構中鏈的部分或全部連接資訊作為第二鍵;該第二驗證模組,設定為從資料儲存裝置獲取該資料儲存裝置儲存的與該第二鍵關聯的資料,根據該獲取的資料驗證該鏈式結構中的資料是否有錯誤。 In an exemplary embodiment, the present disclosure also provides a chain structure data verification device. The data verification device includes a key value search module and a second verification module. The key value search module is set to search Part or all of the connection information of the chain in the chain structure is used as the second key; the second verification module is set to obtain the data stored in the data storage device and associated with the second key from the data storage device, and according to the obtained The data verifies whether there are errors in the data in the chain structure.

在一示例性實施例中,本揭露還提供一種鏈式結構系統,包括:第一鏈系統、第二鏈系統和資料儲存裝置,其中:該第一鏈系統,設定為對帳本資料簽名後,將簽名後的帳本資料寫入第一鏈的區塊資料; 該第二鏈系統,設定為在驗證第一鏈的區塊資料後,將該第一鏈的一或複數連續的區塊資料寫入第二鏈的區塊資料;該資料儲存裝置,設定為將該第二鏈中鏈的部分或全部連接資訊作為第一鍵,該第一鍵關聯的資料作為值,驗證該第一鍵關聯的資料是否有錯誤,驗證該第一鍵關聯的資料無錯誤後,將該資料儲存為輸入資料或輸出資料,同一資料儲存裝置儲存的輸入資料和輸出資料根據相同的連接資訊相關聯。 In an exemplary embodiment, the present disclosure also provides a chain structure system, including: a first chain system, a second chain system, and a data storage device, wherein: the first chain system is set to sign the account book data , Write the signed account book data into the block data of the first chain; The second chain system is set to write one or more consecutive block data of the first chain into the block data of the second chain after verifying the block data of the first chain; the data storage device is set to Use part or all of the link information of the second chain as the first key, and the data associated with the first key as the value, verify that the data associated with the first key is incorrect, and verify that the data associated with the first key has no errors After that, the data is stored as input data or output data, and the input data and output data stored in the same data storage device are related according to the same connection information.

在一示例性實施例中,本揭露還提供一種電腦可讀儲存媒體,儲存有電腦可執行指令,該電腦可執行指令用於實現上述任意一種方法。 In an exemplary embodiment, the present disclosure also provides a computer-readable storage medium that stores computer-executable instructions, and the computer-executable instructions are used to implement any of the above-mentioned methods.

在一示例性實施例中,本揭露還提供一種電腦裝置,包括記憶體、處理器及儲存在記憶體上並可在處理器上運行的電腦程式,該處理器執行該程式時實現上述任意一種方法中的步驟。 In an exemplary embodiment, the present disclosure also provides a computer device, including a memory, a processor, and a computer program stored on the memory and capable of running on the processor. The processor implements any of the foregoing when the program is executed. Steps in the method.

本發明的其它特徵和優點將在隨後的說明書中闡述,並且,部分地從說明書中變得顯而易見,或者藉由實施本發明而瞭解。本發明的目的和其他優點可藉由在說明書、申請專利範圍以及附圖中所特別指出的結構來實現和獲得。 Other features and advantages of the present invention will be described in the following description, and partly become obvious from the description, or understood by implementing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures specifically pointed out in the specification, the scope of the patent application and the drawings.

在閱讀並理解了附圖和詳細描述後,可以明白其他方面。 After reading and understanding the drawings and detailed description, other aspects can be understood.

11-12、31-33、51-52、71-73:步驟 11-12, 31-33, 51-52, 71-73: steps

21:第一儲存模組 21: The first storage module

22:第二儲存模組 22: The second storage module

41:第三儲存模組 41: The third storage module

42:第一驗證模組 42: The first verification module

43:第四儲存模組 43: The fourth storage module

61:鍵值查找模組 61: Key value search module

62:第二驗證模組 62: The second verification module

81:第一鏈系統 81: The first chain system

82:第二鏈系統 82: The second chain system

83:資料儲存裝置 83: data storage device

91:處理器 91: processor

92:記憶體 92: memory

93:匯流排系統 93: Busbar system

94:收發器 94: Transceiver

附圖用來提供對本發明技術方案的進一步理解,並且構成說明書的一部分,與本文的實施例一起用於解釋本發明的技術方案,並不構成對本文技術方案的限制。 The accompanying drawings are used to provide a further understanding of the technical solution of the present invention, and constitute a part of the specification. Together with the embodiments herein, they are used to explain the technical solution of the present invention, and do not constitute a limitation to the technical solution of the present invention.

圖1為一種示例性資料儲存方法流程圖;圖2為一種示例性資料儲存裝置結構示意圖;圖3為一種示例性資料驗證方法流程圖;圖4為一種示例性具有驗證功能的資料儲存裝置結構示意圖;圖5為另一種示例性資料驗證方法流程圖;圖6為一種示例性資料驗證裝置結構示意圖;圖7為一種示例性鏈式結構實現方法流程圖;圖8為一種示例性鏈式結構系統示意圖;圖9為一種示例性連接儲存圖,連接資訊為Bd1;圖10為一種示例性三層二鏈系統架構圖;圖11為一種示例性電腦設備的結構示意圖。 Fig. 1 is a flowchart of an exemplary data storage method; Fig. 2 is a schematic diagram of an exemplary data storage device structure; Fig. 3 is a flowchart of an exemplary data verification method; Fig. 4 is a structure of an exemplary data storage device with verification function Schematic diagram; Fig. 5 is a flowchart of another exemplary data verification method; Fig. 6 is a schematic diagram of an exemplary data verification device structure; Fig. 7 is a flowchart of an exemplary chain structure realization method; Fig. 8 is an exemplary chain structure System schematic diagram; Fig. 9 is an exemplary connection storage diagram, and the connection information is Bd1; Fig. 10 is an exemplary three-layer two-chain system architecture diagram; Fig. 11 is a schematic structural diagram of an exemplary computer device.

本文描述了複數實施例,但是該描述是示例性的,而不是限制性的,並且對於本領域的普通技術人員來說顯而易見的是,在本文所描述的實施例包含的範圍內可以有更多的實施例和實現方案。儘管在附圖中示出了許多可能的特徵組合,並在實施方式中進行了討論,但是所揭露的特徵的許多其它組合方式也是可能的。除非特意加以限制的情況以外,任何實施例的任何特徵或元件可以與任何其它實施例中的任何其他特徵或元件結合使用,或可以替代任何其它實施例中的任何其他特徵或元件。 A plurality of embodiments are described herein, but the description is exemplary rather than restrictive, and it is obvious to a person of ordinary skill in the art that there can be more within the scope of the embodiments described herein. Examples and implementation schemes. Although many possible feature combinations are shown in the drawings and discussed in the embodiments, many other combinations of the disclosed features are also possible. Unless specifically limited, any feature or element of any embodiment can be used in combination with any other feature or element in any other embodiment, or can replace any other feature or element in any other embodiment.

本文包括並設想了與本領域普通技術人員已知的特徵和元件的組合。本文已經揭露的實施例、特徵和元件也可以與任何常規特徵或元件組合,以形成由申請專利範圍限定的獨特的發明方案。任何實施例的任何特徵或元件也可以與來自其它發明方案的特徵或元件組合,以形成另一個由申請專利範圍限定的獨特的發明方案。因此,應當理解,在本文中示出和/或討論的任何特徵可以單獨地或以任何適當的組合來實現。因此,除了根據所附申請專利範圍及其等同替換所做的限制以外,實施例不受其它限制。此外,可以在所附申請專利範圍的保護範圍內進行各種修改和改變。 Combinations with features and elements known to those of ordinary skill in the art are included and contemplated herein. The embodiments, features, and elements already disclosed herein can also be combined with any conventional features or elements to form a unique invention solution defined by the scope of the patent application. Any feature or element of any embodiment can also be combined with features or elements from other invention solutions to form another unique invention solution defined by the scope of the patent application. Therefore, it should be understood that any of the features shown and/or discussed herein can be implemented individually or in any suitable combination. Therefore, the embodiments are not subject to other restrictions except for the restrictions made according to the scope of the attached patent application and equivalent substitutions thereof. In addition, various modifications and changes can be made within the protection scope of the attached patent application.

此外,在描述具有代表性的實施例時,說明書可能已經將方法和/或過程呈現為特定的步驟序列。然而,在該方法或過程不依賴於本文該步驟的特定順序的程度上,該方法或過程不應限於所述的特定順序的步驟。如本領域普通技術人員將理解的,其它的步驟順序也是可能的。因此,說明書中闡述的步驟的特定順序不應被解釋為對申請專利範圍的限制。此外,針對該方法和/或過程的申請專利範圍不應限於按照所寫循序執行它們的步驟,本領域技術人員可以容易地理解,這些順序可以變化,並且仍然保持在本文實施例的精神和範圍內。 In addition, when describing representative embodiments, the description may have presented the method and/or process as a specific sequence of steps. However, to the extent that the method or process does not depend on the specific order of the steps herein, the method or process should not be limited to the specific order of steps described. As those of ordinary skill in the art will understand, other sequence of steps are also possible. Therefore, the specific sequence of steps set forth in the specification should not be construed as a limitation on the scope of the patent application. In addition, the scope of the patent application for the method and/or process should not be limited to the steps that are executed in the written order. Those skilled in the art can easily understand that these orders can be changed and still remain within the spirit and scope of the embodiments herein. Inside.

在附圖的流程圖示出的步驟可以在諸如一組電腦可執行指令的電腦系統中執行。並且,雖然在流程圖中示出了邏輯順序,但是在某些情況下,可以以不同於此處的循序執行所示出或描述的步驟。 The steps shown in the flowchart of the drawings can be executed in a computer system such as a set of computer-executable instructions. And, although a logical sequence is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than here.

本文提出一種私有鏈與公有鏈的結合方案,解決私有鏈資料的可信問題,並且解決部分公平性問題,以及每個使用者端只需要儲存部分帳本資料即可等價驗證全部帳本資料。 This article proposes a combination of private chain and public chain to solve the credibility problem of private chain data, and to solve part of the fairness problem, and each user only needs to store part of the book data to equivalently verify all the book data .

下面先對本文涉及的概念進行說明。 Let's first explain the concepts involved in this article.

token,指區塊鏈上的代幣,也稱為憑證。 Token refers to the token on the blockchain, also known as a certificate.

CA(Certificate Authority),認證授權。 CA (Certificate Authority), certification and authorization.

eID(electronic Identity),指公民網路電子身份標識,是可信的實名認證方式 eID (electronic Identity) refers to the electronic identity of citizens on the Internet, which is a credible real-name authentication method

SPV(Simplified Payment Verification):簡單支付驗證,藉由默克爾樹認證路徑驗證某交易是否包含在鏈的區塊中,並且經過多少個確認。 SPV (Simplified Payment Verification): Simple payment verification, which verifies whether a transaction is included in a chain block and how many confirmations have passed through the Merkel tree verification path.

POA(Proof of Authority):權威證明,一種基於身份和聲譽的共識演算法。 POA (Proof of Authority): Proof of Authority, a consensus algorithm based on identity and reputation.

Gossip網路通訊協定:也叫Epidemic Protocol(流行病協定),是非結構化對等網路通訊協定,是Bitcoin等系統採用的網路通訊協定。 Gossip network communication protocol: also called Epidemic Protocol (epidemic protocol), is an unstructured peer-to-peer network communication protocol, and is a network communication protocol used by Bitcoin and other systems.

DHT(Distributed Hash Table):分散式雜湊表,是一種分散式儲存方法。在不需要伺服器的情況下,每個使用者端負責一小範圍的路由,並負責儲存一小部分資料,從而實現整個DHT網路的定址和儲存。 DHT (Distributed Hash Table): Distributed Hash Table is a distributed storage method. Without the need for a server, each client is responsible for a small range of routing, and is responsible for storing a small part of the data, so as to realize the addressing and storage of the entire DHT network.

Kademlia網路通訊協定:是一種分散式雜湊表(DHT)網路通訊協定,是結構化對等網路通訊協定,是IPFS等系統採用的網路通訊協定。 Kademlia network protocol: is a distributed hash table (DHT) network protocol, a structured peer-to-peer network protocol, and a network protocol used by systems such as IPFS.

一致性雜湊演算法:DHT的一種實現。能夠在動態變化的環境中滿足平衡性、單調性、分散性和負載。 Consistent hash algorithm: an implementation of DHT. It can satisfy balance, monotonicity, dispersion and load in a dynamically changing environment.

UTXO(Unspent Transaction Output),未花費的交易輸出,引用一或複數未花費交易輸出變為已花費,並且創建一或複數新的未花費交易輸出,並且不斷迴圈向後延伸。根據其連接的方式,形成DAG(Directed Acyclic Graph有向無環圖)的鏈式結構。本文稱為UTXO鏈。 UTXO (Unspent Transaction Output), unspent transaction output, refers to one or more unspent transaction output to become spent, and creates one or more new unspent transaction output, and continues to loop back. According to its connection mode, a chain structure of DAG (Directed Acyclic Graph) is formed. This article is called UTXO chain.

公有鏈,指任何人都可以讀取、發送交易和參與共識的區塊鏈,屬於完全去中心化的系統。本文實施例中採用的是一種除任何人都可以發送交易外,其餘都與公有鏈系統相同的類公有鏈系統,滿足交易中心化,帳本資料去中心化。在本文所述的類公有鏈系統中,任何人都可以讀取、驗證交易和參與共識,能夠實現可追溯、不可篡改。 The public chain refers to a blockchain that anyone can read, send transactions, and participate in consensus. It is a completely decentralized system. In the embodiment of this text, a public chain system that is the same as the public chain system except that anyone can send transactions is adopted to satisfy transaction centralization and decentralization of ledger data. In the public chain system described in this article, anyone can read and verify transactions and participate in consensus, which can be traced and cannot be tampered with.

私有鏈,指寫入許可權在一個組織手裡的資料鏈,屬於中心化的系統。 Private chain refers to a data chain whose write permission is in the hands of an organization and belongs to a centralized system.

聯盟鏈,指寫入許可權在複數組織手裡的資料鏈,屬於部分去中心化的系統。 Consortium chain refers to the data chain whose write permission is in the hands of plural organizations, and belongs to a partially decentralized system.

本文一示例性實施例提供了一種用於儲存鏈式結構中資料的資料儲存方法,如圖1所示,包括步驟11-12。 An exemplary embodiment herein provides a data storage method for storing data in a chain structure, as shown in FIG. 1, including steps 11-12.

步驟11,將該鏈式結構中鏈的部分或全部連接資訊作為第一鍵;步驟12,該第一鍵關聯的該鏈式結構中的資料作為值,將該資料儲存為輸入資料或輸出資料,同一資料儲存裝置儲存的輸入資料和輸出資料根據相同的連接資訊相關聯。 Step 11, use part or all of the link information of the chain in the chain structure as the first key; step 12, use the data in the chain structure associated with the first key as the value, and store the data as input data or output data , The input data and output data stored in the same data storage device are related according to the same connection information.

一個或一組資料中包含前一個或一組資料中的資訊,該資訊即為鏈的連接資訊,該連接資訊使得前述資料在邏輯上形成一鏈式結構。 One or a group of data contains information from the previous one or a group of data, which is the link information of the chain, and the link information makes the aforementioned data logically form a chain structure.

設定為進行資料儲存的裝置可採用DHT技術實現。該裝置上儲存有作為第一鍵(也可稱為鍵值或者關鍵值)的該鏈式結構中的連接資訊。作為第一鍵的連接資訊可以是該鏈式結構連接資訊的部分也可以是全部。該第一鍵例如可以是位址或者位址的雜湊值。 The device set for data storage can be implemented using DHT technology. The device stores connection information in the chain structure as a first key (also called a key value or a key value). The connection information as the first key can be part or all of the chain structure connection information. The first key may be an address or a hash value of the address, for example.

對於該鏈式結構中的任一個或一組資料,每個或每組資料包含輸入資訊和輸出資訊,其中目前資料的輸入資訊為資料M的輸出資訊,該資料M在邏輯上為目前資料的前一資料(上一資料),該目前資料的輸入資訊或資料M的輸出資訊屬於鏈的連接資訊,目前資料的輸出資訊為資料N的輸入資訊,該資料N在邏輯上為目前資料的後一資料(下一資料),該目前資料的輸出資訊或資料N的輸入資訊也屬於鏈的連接資訊。該鏈式結構例如為UTXO鏈,每個交易資料包括引用的未花費輸出作為輸入資訊和新的未花費輸出作為輸出資訊。 For any one or a group of data in the chain structure, each or each group of data includes input information and output information, where the input information of the current data is the output information of the data M, and the data M is logically the current data The previous data (previous data), the input information of the current data or the output information of the data M belongs to the link information of the chain, the output information of the current data is the input information of the data N, and the data N is logically the back of the current data One data (next data), the output information of the current data or the input information of the data N also belong to the link information of the chain. The chain structure is, for example, a UTXO chain, and each transaction data includes the quoted unspent output as input information and the new unspent output as output information.

資料儲存裝置當接收到與第一鍵值相匹配的資料時,根據該資料在鏈式結構中所表示的意義,將該資料儲存為輸入資料或輸出資料。同一資料儲存裝置上儲存的輸入資料和輸出資料根據相同的鍵(即鏈的連接資訊)相關聯,此種儲存方式可稱為連接儲存或者資料結對儲存。同一資料儲存裝置上可能儲存一組或多組輸入資料和輸出資料,對於任意一組輸入資料和輸出資料,該輸入資料和輸出資料根據相同的連接資訊相關聯。同一裝置上儲存的輸入資料可以有一個或複數個,儲存的輸出資料也可以有零個(即無輸出資料)、或一個或複數個。該鏈式結構可以是任意具有鏈式結構特徵的鏈。該資料儲存裝置可以是使用者端節點也可以是共識組,也可以是其他需要進行連接儲存的裝置。 待儲存的資料可以是交易資料,也可以是控制資料,例如可以將控制資料中的代幣token發行資料和共識獎勵資料儲存為輸入資料,將控制資料中的token回收資料儲存為輸出資料。其中對應的鍵分別為token發行預設位址、共識獎勵預設地址、token回收預設地址。 When the data storage device receives data that matches the first key value, it stores the data as input data or output data according to the meaning of the data in the chain structure. The input data and output data stored on the same data storage device are related according to the same key (that is, the connection information of the chain). This storage method can be called connection storage or data pair storage. One or more sets of input data and output data may be stored on the same data storage device. For any set of input data and output data, the input data and output data are related according to the same connection information. There can be one or more input data stored on the same device, and there can be zero (ie no output data), or one or more output data stored on the same device. The chain structure can be any chain with chain structure characteristics. The data storage device can be a user end node or a consensus group, or other devices that need to be connected for storage. The data to be stored can be transaction data or control data. For example, the token issuance data and consensus reward data in the control data can be stored as input data, and the token recovery data in the control data can be stored as output data. The corresponding keys are the preset address for token issuance, the preset address for consensus reward, and the preset address for token recovery.

採用此種連接儲存可以將龐大的鏈式結構資料分散儲存在複數裝置上,以減輕資料儲存壓力。該種儲存方式還便於進行驗證。 Using this kind of connection storage can disperse and store huge chain structure data on multiple devices to reduce the pressure of data storage. This storage method is also convenient for verification.

在一示例性實施例中,該第一鍵作為該鏈式結構中輸出資訊的部分或全部時,將該第一鍵關聯的資料作為輸入資料儲存;該第一鍵作為該鏈式結構中輸入資訊的部分或全部時,將該第一健關聯的資料作為輸出資料儲存。 In an exemplary embodiment, when the first key is used as part or all of the output information in the chain structure, the data associated with the first key is stored as input data; the first key is used as the input in the chain structure When part or all of the information, the data associated with the first key is stored as output data.

例如,如果第一鍵為該鏈式結構中的輸出位址時,則將該第一鍵關聯的資料儲存為輸入資料,如果第一鍵為該鏈式結構中的輸入位址時,則將該第一鍵關聯的資料儲存為輸出資料。 For example, if the first key is the output address in the chain structure, the data associated with the first key is stored as input data, and if the first key is the input address in the chain structure, it will be The data associated with the first key is stored as output data.

本實施例中的資料儲存裝置可以和其他系統結合使用,例如與一個去中心化系統結合,或者與一個中心化系統結合。 The data storage device in this embodiment can be used in combination with other systems, for example, with a decentralized system, or with a centralized system.

上述資料儲存裝置例如可以如圖2所示,包括第一儲存模組21和第二儲存模組22,其中:第一儲存模組21,設定為將該鏈式結構中鏈的部分或全部連接資訊作為第一鍵儲存;第二儲存模組22,設定為將該第一鍵關聯的該鏈式結構中的資料儲存為輸入資料或輸出資料,同一資料儲存裝置儲存的輸入資料和輸出資料根據相同的連接資訊相關聯。 The above-mentioned data storage device may, for example, as shown in FIG. 2, include a first storage module 21 and a second storage module 22, wherein: the first storage module 21 is set to connect part or all of the chain in the chain structure Information is stored as the first key; the second storage module 22 is set to store the data in the chain structure associated with the first key as input data or output data. The input data and output data stored in the same data storage device are based on The same connection information is associated.

例如,當該第一鍵作為該鏈式結構中輸出資訊的部分或全部時,該第二儲存模組22將該第一鍵關聯的資料作為輸入資料儲存,當該第一鍵作為該鏈式結構中輸入資訊的部分或全部時,該第二儲存模組22將該第一健關聯的資料作為輸出資料儲存。 For example, when the first key is used as part or all of the output information in the chain structure, the second storage module 22 stores the data associated with the first key as input data, and when the first key is used as the chain structure When part or all of the input information in the structure, the second storage module 22 stores the data associated with the first key as output data.

採用此種儲存方式,使得整個鏈式結構可以被複數資料儲存裝置分段儲存,便於檢索和驗證。 With this storage method, the entire chain structure can be stored in sections by multiple data storage devices, which is convenient for retrieval and verification.

本文一示例性實施例還提供了一種鏈式結構驗證方法,由資料儲存裝置實現驗證,如圖3所示,該方法包括步驟31-33。 An exemplary embodiment of this document also provides a chain structure verification method, which is verified by a data storage device. As shown in FIG. 3, the method includes steps 31-33.

步驟31,將該鏈式結構中鏈的部分或全部連接資訊作為第一鍵;步驟32,該第一鍵關聯的該鏈式結構中的資料作為值,驗證該第一鍵關聯的資料是否有錯誤;步驟33,驗證該第一鍵關聯的資料無錯誤後,將該資料儲存為輸入資料或輸出資料。 Step 31, use part or all of the link information of the chain in the chain structure as the first key; step 32, use the data in the chain structure associated with the first key as the value, and verify whether the data associated with the first key has Error; Step 33, after verifying that the data associated with the first key has no errors, save the data as input data or output data.

如前述實施例所述,該鏈式結構可以是任意具有鏈式結構特徵的鏈。該資料儲存裝置可以是使用者端節點也可以是共識組,也可以是其他需要進行連接儲存的裝置。待儲存的資料可以是交易資料,也可以是控制資料。作為第一鍵的連接資訊可以是該鏈式結構連接資訊的部分也可以是全部。在本實施例中,由進行資料儲存的裝置(例如使用者端節點)進行鏈式結構驗證。該資料儲存裝置上儲存有作為第一鍵的該鏈式結構中的連接資訊,因此該資料儲存裝置在接收與本裝置對應的第一鍵匹配的資料時,對該資料進行驗證,在驗證無錯誤後,再進行連接儲存。 As described in the foregoing embodiment, the chain structure can be any chain having the characteristics of a chain structure. The data storage device can be a user end node or a consensus group, or other devices that need to be connected for storage. The data to be stored can be transaction data or control data. The connection information as the first key can be part or all of the chain structure connection information. In this embodiment, the data storage device (such as a user end node) performs chain structure verification. The data storage device stores the connection information in the chain structure as the first key. Therefore, when the data storage device receives data that matches the first key corresponding to the device, it verifies the data. After the error, connect and save again.

以資料為帳本資料為例,資料儲存裝置驗證該帳本資料無錯誤後,判斷該帳本資料的輸出資訊與該第一鍵匹配時,將該帳本資料儲存為輸入資料,判斷該帳本資料的輸入資訊與該第一鍵匹配時,將該帳本資料儲存為輸出資料,同一裝置上儲存的輸入資料和輸出資料根據相同的連接資訊相關聯。同一裝置上儲存的輸入資料可以有一個或複數個,儲存的輸出資料也可以有零個(即無輸出資料)、或一個或複數個。 Taking the data as the book data as an example, after the data storage device verifies that the book data has no errors and determines that the output information of the book data matches the first key, the book data is stored as input data to determine the account When the input information of this data matches the first key, the ledger data is saved as output data, and the input data and output data stored on the same device are related according to the same connection information. There can be one or more input data stored on the same device, and there can be zero (ie no output data), or one or more output data stored on the same device.

本實施例在連接儲存時進行驗證,可以將對整個鏈式結構的驗證轉化為局部驗證,由複數資料儲存裝置分別進行,相當於等價驗證全部資料的正確性,採用此種等價驗證方式,將驗證工作分散到複數裝置上,以減輕資料驗證的工作量壓力。 In this embodiment, the verification is performed during connection storage. The verification of the entire chain structure can be converted into partial verification, which is performed separately by the plural data storage devices, which is equivalent to verifying the correctness of all data equivalently. This equivalent verification method is adopted. , Distribute the verification work to multiple devices to reduce the workload pressure of data verification.

在一示例性實施例中,將該資料儲存為輸入資料或輸出資料,可以採取以下方式:該第一鍵作為該鏈式結構中的輸出資訊的部分或全部時,將該第一鍵關聯的資料作為輸入資料儲存;該第一鍵作為該鏈式結構中的輸入資訊的部分或全部時,將該第一鍵關聯的資料作為輸出資料儲存;本裝置上儲存的輸入資料和輸出資料根據相同的連接資訊相關聯。 In an exemplary embodiment, storing the data as input data or output data may be in the following manner: when the first key is used as part or all of the output information in the chain structure, the first key is associated with Data is stored as input data; when the first key is used as part or all of the input information in the chain structure, the data associated with the first key is stored as output data; the input data and output data stored on this device are based on the same Is associated with the connection information.

在一示例性實施例中,上述驗證該第一鍵關聯的資料是否有錯誤,包括以下驗證中的一種或多種:驗證110,驗證該資料是否為該鏈式結構上的資料;驗證120,該第一鍵作為該鏈式結構中的輸入資訊時,驗證是否存在與該輸入資訊具有相同連接資訊的輸出資訊; 驗證130,該第一鍵作為該鏈式結構中的輸入資訊時,驗證與該輸入資訊具有相同連接資訊的輸出資訊是否被使用過;驗證140,該第一鍵作為該鏈式結構中的輸入資訊時,且該第一鍵關聯的資料包含交易數額時,驗證該交易數額是否正確。 In an exemplary embodiment, the foregoing verification of whether the data associated with the first key has errors includes one or more of the following verifications: verification 110, verifying whether the data is the data on the chain structure; verifying 120, the When the first key is used as the input information in the chain structure, verify whether there is output information that has the same connection information as the input information; Verify 130, when the first key is used as the input information in the chain structure, verify whether the output information with the same connection information as the input information has been used; verify 140, the first key is used as the input in the chain structure When information, and the data associated with the first key contains the transaction amount, verify that the transaction amount is correct.

驗證150,該第一鍵作為該鏈式結構中的輸入資訊時,且該第一鍵關聯的資料包含簽名資訊時,驗證該簽名資訊是否正確。該簽名資訊是產生交易資料的使用者端的解鎖簽名。該驗證簽名資訊是否正確即驗證簽名資訊是否有效。 In the verification 150, when the first key is used as the input information in the chain structure, and the data associated with the first key includes signature information, it is verified whether the signature information is correct. The signature information is the unlocking signature of the user side that generated the transaction data. The verification of whether the signature information is correct or not is to verify whether the signature information is valid.

上述驗證序號僅為說明方便,不代表驗證順序。對於上述驗證110,如果資料是鏈式結構上的資料,則驗證為無錯誤;對於驗證120,如果存在與該輸入資訊具有相同連接資訊的輸出資訊,則驗證為無錯誤;對於驗證130,該與輸入資訊具有相同連接資訊的輸出資訊未被使用過,則驗證為無錯誤;對於驗證140,交易數額正確,則驗證為無錯誤;對於驗證150,驗證簽名資訊有效,則驗證為無錯誤。 The above verification sequence number is only for convenience of illustration, and does not represent the verification sequence. For the above verification 110, if the data is in the chain structure, the verification is error-free; for the verification 120, if there is output information that has the same connection information as the input information, the verification is no error; for the verification 130, the If the output information with the same connection information as the input information has not been used, the verification is error-free; for verification 140, the transaction amount is correct, and the verification is error-free; for verification 150, the verification that the signature information is valid, then the verification is error-free.

一種示例性的驗證過程:該資料儲存裝置同步該鏈式結構中的區塊頭資料,該裝置查找本裝置是否儲存有與該第一鍵相關聯的輸入資料(還可以從該鏈式結構中查找),如果沒有,則判斷為連接錯誤,如果有,判斷該輸入資料的關聯連接是否被引用,如果已被引用過,則判斷為連接錯誤;判斷該帳本資料的交易數額是否正確,如果正確,則將該帳本資料儲存為輸出資料,並將輸入資料的關聯連接標識為已被引用,也即相關聯的輸出資訊將標記為已使用,如果不正確,判斷為資料錯誤,如果正確,如果資料中包含簽名資訊時,驗證該簽名資訊是否正確,如果不正確判斷為資料錯誤。該簽名資訊例如是產 生交易資料的使用者端的解鎖簽名。當驗證成功後,與輸入資訊相關聯的輸出資訊將標記為已使用。 An exemplary verification process: the data storage device synchronizes the block header data in the chain structure, the device searches whether the device stores the input data associated with the first key (you can also search from the chain structure ), if not, it is judged as a connection error, if so, judge whether the associated connection of the input data is quoted, if it has been quoted, it is judged as a connection error; judge whether the transaction amount of the ledger data is correct, if it is correct , Save the ledger data as output data, and mark the associated connection of the input data as being referenced, that is, the associated output information will be marked as used. If it is incorrect, it is judged as the data error. If it is correct, If the data contains signature information, verify that the signature information is correct. If it is incorrect, it is judged that the data is incorrect. The signature information is for example The unlocking signature of the user end of the raw transaction data. When the verification is successful, the output information associated with the input information will be marked as used.

在一示例性實施例中,可採用以下方式驗證該資料是否為該鏈式結構上的資料:同步該鏈式結構的區塊頭資料,根據該區塊頭資料中的默克爾樹根雜湊值和該資料的認證路徑驗證該資料是否為鏈式結構上的資料。 In an exemplary embodiment, the following method can be used to verify whether the data is the data on the chain structure: synchronizing the block header data of the chain structure, according to the Merkel tree root hash value in the block header data and the The certification path of the data verifies whether the data is on the chain structure.

在一示例性實施例中,該方法還包括:根據資料驗證裝置的請求,向該資料驗證裝置返回本裝置儲存的與該鏈的連接資訊關聯的資料,包括但不限於以下資料中的一種或多種:輸入資料、輸出資料、默克爾樹認證路徑、附加驗證資料。 In an exemplary embodiment, the method further includes: according to a request of the data verification device, returning to the data verification device the data associated with the link information stored in the device, including but not limited to one of the following data or Various: input data, output data, Merkel tree certification path, additional verification data.

其中,輸入資料可能有一個或複數個。輸出資料可能沒有(即零個)或者有一個或者複數,無輸出資料表示輸入資料的連接未被使用或未花費。正常情況下,有輸入資料才有輸出資料,但也不排除出錯的情況,只有輸出資料,沒有輸入資料。默克爾樹認證路徑與輸入資料或輸出資料對應存在。附加驗證資料可能有,也可能沒有。附加驗證資料用於驗證交易數額是否正確,例如UTXO中需要累加全部輸入數額和全部輸出數額,所以可能需要其它的交易資料才能完成交易數額的驗證。附加驗證資料也有對應的默克爾樹認證路徑。 Among them, there may be one or more input data. There may be no output data (ie zero) or one or a plural number. No output data means that the connection of the input data is not used or spent. Under normal circumstances, only output data will be output if there is input data, but errors are not ruled out. Only output data, no input data. The Merkel tree certification path exists corresponding to the input data or the output data. Additional verification information may or may not be available. Additional verification data is used to verify whether the transaction amount is correct. For example, UTXO needs to accumulate all input amounts and all output amounts, so other transaction data may be required to complete the verification of the transaction amount. The additional verification information also has a corresponding Merkel tree certification path.

為了加強資料的安全性,設定其他裝置的驗證機制,即由非資料儲存裝置作為資料驗證裝置驗證該鏈式結構中的資料有無錯誤,被選為資料驗證裝置的節點從儲存裝置處獲取相關資料,以完成驗證。 In order to strengthen the security of the data, set the verification mechanism of other devices, that is, use the non-data storage device as the data verification device to verify the data in the chain structure for errors, and the node selected as the data verification device obtains the relevant data from the storage device To complete verification.

本實施例中的資料儲存裝置可以和其他系統結合使用,例如與一個去中心化系統結合,或者與一個中心化系統結合。 The data storage device in this embodiment can be used in combination with other systems, for example, with a decentralized system, or with a centralized system.

上述具有驗證功能的資料儲存裝置例如可以如圖4所示,包括第三儲存模組41、第一驗證模組42和第四儲存模組43,其中:第三儲存模組41,設定為儲存該鏈式結構中鏈的部分或全部連接資訊作為第一鍵;第一驗證模組42,設定為驗證該第一鍵關聯的該鏈式結構中的資料是否有錯誤;該第四儲存模組43,設定為在該第一驗證模組42驗證無錯誤後,將該第一鍵關聯的該鏈式結構中的資料儲存為輸入資料或輸出資料。 The above-mentioned data storage device with verification function may, for example, as shown in FIG. Part or all of the link information of the chain in the chain structure is used as the first key; the first verification module 42 is configured to verify whether the data in the chain structure associated with the first key is incorrect; the fourth storage module 43. After the first verification module 42 verifies that there is no error, the data in the chain structure associated with the first key is stored as input data or output data.

例如,該第三儲存模組41的儲存方式可與圖2中的第一儲存模組21相同,該第四儲存模組43的儲存方式可與圖2中的第二儲存模組22相同,該具有驗證功能的資料儲存裝置可在上述圖2所示資料儲存裝置基礎上增加第一驗證模組42。當該第一鍵作為該鏈式結構中輸出資訊的部分或全部時,該第四儲存模組43將該第一鍵關聯的資料作為輸入資料儲存,當該第一鍵作為該鏈式結構中輸入資訊的部分或全部時,該第四儲存模組43將該第一健關聯的資料作為輸出資料儲存。 For example, the storage method of the third storage module 41 may be the same as that of the first storage module 21 in FIG. 2, and the storage method of the fourth storage module 43 may be the same as that of the second storage module 22 in FIG. 2. The data storage device with verification function can add a first verification module 42 on the basis of the data storage device shown in FIG. 2. When the first key is used as part or all of the output information in the chain structure, the fourth storage module 43 stores the data associated with the first key as input data, and when the first key is used as the input data in the chain structure When inputting part or all of the information, the fourth storage module 43 stores the data associated with the first key as output data.

該第一驗證模組42可以進行上述驗證110-150中的任意一種或多種,此處不再贅述。 The first verification module 42 can perform any one or more of the foregoing verifications 110-150, which will not be repeated here.

在一示例性實施例中,該資料儲存裝置還可以包括發送模組,其設定為根據其他資料驗證裝置的請求,向該資料驗證裝置返回本裝置儲存的與該 鏈的連接資訊關聯的資料,包括以下資料中的一種或多種:輸入資料、輸出資料、默克爾樹認證路徑、附加驗證資料。 In an exemplary embodiment, the data storage device may further include a sending module, which is configured to return to the data verification device the data stored in the device and the data verification device according to the request of the other data verification device. The data associated with the connection information of the chain includes one or more of the following data: input data, output data, Merkel tree certification path, and additional verification data.

採用此種儲存和驗證方式,使得整個鏈式結構可以被複數資料儲存裝置分段儲存和等價驗證。 With this storage and verification method, the entire chain structure can be stored in sections and equivalently verified by a plurality of data storage devices.

本文一示例性實施例還提供一種鏈式結構驗證方法,由資料驗證裝置實現,如圖5所示,該方法包括步驟51-52。 An exemplary embodiment herein also provides a chain structure verification method, which is implemented by a data verification device. As shown in FIG. 5, the method includes steps 51-52.

步驟51,將該鏈式結構中鏈的部分或全部連接資訊作為第二鍵;步驟52,從資料儲存裝置獲取該資料儲存裝置上儲存的與該第二鍵關聯的資料(即鍵對應的值),根據該獲取的資料驗證該鏈式結構中的資料是否有錯誤。 Step 51: Use part or all of the link information of the chain in the chain structure as the second key; Step 52: Obtain the data associated with the second key stored on the data storage device from the data storage device (that is, the value corresponding to the key) ) To verify whether the data in the chain structure has errors based on the acquired data.

為了加強資料的安全性,設定其他裝置驗證機制,即由非資料儲存裝置驗證該鏈式結構中的資料有無錯誤,作為資料驗證裝置的節點從資料儲存裝置處獲取相關資料,完成驗證。該第二鍵例如可以是位址或者位址的雜湊值。有關鏈式結構、鏈式結構中連接資訊、輸入資訊和輸出資訊的說明參見前述實施例中的描述,此處不再贅述。 In order to strengthen data security, other device verification mechanisms are set up, that is, the non-data storage device verifies whether the data in the chain structure has errors, and the node as the data verification device obtains relevant data from the data storage device to complete the verification. The second key may be an address or a hash value of the address, for example. For the description of the chain structure, the connection information, the input information and the output information in the chain structure, please refer to the description in the foregoing embodiment, and will not be repeated here.

在一示例性實施例中,該從資料儲存裝置獲取的與該第二鍵關聯的資料包括但不限於以下一種或多種:該資料儲存裝置儲存的:與該第二鍵關聯的資料、默克爾樹認證路徑、附加驗證資料,其中,該第二鍵作為該鏈式結構中輸出資訊的部分或全部,或者該第二鍵作為該鏈式結構中輸入資訊的部分或全部。當該第二鍵作為該鏈式結構中輸出資訊的部分或全部時,該第二鍵關聯的資料即為該資料儲存裝置儲存的輸入資料;該第二鍵作為該鏈式結構中輸入 資訊的部分或全部時,該第二鍵關聯的資料即為該資料儲存裝置儲存的輸出資料。 In an exemplary embodiment, the data associated with the second key obtained from the data storage device includes, but is not limited to, one or more of the following: stored by the data storage device: data associated with the second key, Merkel Tree certification path and additional verification data, wherein the second key is used as part or all of the output information in the chain structure, or the second key is used as part or all of the input information in the chain structure. When the second key is used as part or all of the output information in the chain structure, the data associated with the second key is the input data stored in the data storage device; the second key is used as the input in the chain structure In the case of part or all of the information, the data associated with the second key is the output data stored in the data storage device.

該資料驗證裝置可同步鏈式結構的區塊頭,該區塊頭中包含累計帳本資料量,該資料驗證裝置用該區塊頭中的累計帳本資料量產生編號位址(用累計控制資料量產生控制資料編號位址,用累計交易資料量產生交易資料編號位址),根據該編號位址獲取鏈的部分或全部連接資訊作為第二鍵,從該資料儲存裝置獲取該資料儲存裝置上儲存的與該第二鍵關聯的資料。控制資料編號位址作為鍵獲取的是該控制資料編號位址對應的控制資料,還可以包括該控制資料的默克爾樹認證路徑;交易資料編號位址作為鍵獲取的是該交易資料編號位址對應的交易資料,還可以包括該交易資料的默克爾樹認證路徑。例如,可將控制資料的代幣token發行資料的預設位址(簡稱token發行位址)、token回收資料的預設位址(簡稱token回收位址)或共識獎勵資料的預設位址(簡稱獎勵位址)作為鍵,用該鍵從資料儲存裝置獲取其上儲存的與鍵關聯的資料;可將交易資料的交易位址作為鍵,用該鍵從資料儲存裝置獲取其上儲存的與鍵關聯的資料。 The data verification device can synchronize the block header of the chain structure, the block header contains the cumulative book data volume, and the data verification device uses the cumulative book data volume in the block header to generate the number address (use the cumulative control data volume to generate Control data number address, use cumulative transaction data volume to generate transaction data number address), obtain part or all of the link information of the chain according to the number address as the second key, and obtain the data stored on the data storage device from the data storage device The data associated with this second key. The control data number address is used as the key to obtain the control data corresponding to the control data number address, and it can also include the Merkel tree certification path of the control data; the transaction data number address is used as the key to obtain the transaction data number address The corresponding transaction data may also include the Merkel tree certification path of the transaction data. For example, the default address of the token issuance data of the control data (referred to as the token issuance address), the default address of the token recovery data (referred to as the token recovery address), or the default address of the consensus reward data ( (Referred to as reward address) as the key, use the key to obtain the data associated with the key stored on it from the data storage device; you can use the transaction address of the transaction data as the key, and use the key to obtain the data stored on it from the data storage device The data associated with the key.

在一示例性實施例中,上述根據該獲取的資料驗證該鏈式結構中的資料是否有錯誤,包括:同步該鏈式結構中的區塊頭資料,結合該區塊頭資料與從該資料儲存裝置獲取的與該第二鍵關聯的資料,驗證該鏈式結構中的資料是否有錯誤。例如包括進行以下驗證中的一種或多種: 驗證210,驗證該從資料儲存裝置獲取的與該第二鍵關聯的值是否為該鏈式結構上的資料;驗證220,該第二鍵作為該獲取的資料的輸入資訊時,驗證是否存在與該輸入資訊具有相同連接資訊的輸出資訊;驗證230,該第二鍵作為該獲取的資料的輸入資訊時,驗證與該輸入資訊具有相同連接資訊的輸出資訊是否被使用過;驗證240,該第二鍵作為該獲取的資料的輸入資訊時,且該獲取的資料包含交易數額時,驗證該交易數額是否正確;驗證250,該第二鍵作為該獲取的資料的輸入資訊時,且該獲取的資料包含簽名資訊時,驗證該簽名資訊是否正確。 In an exemplary embodiment, verifying whether the data in the chain structure has errors based on the acquired data includes: synchronizing the block header data in the chain structure, combining the block header data with the data storage device The obtained data associated with the second key verifies whether the data in the chain structure has errors. For example, include one or more of the following verifications: Verification 210, verifying whether the value associated with the second key obtained from the data storage device is the data on the chain structure; verification 220, verifying whether the second key is used as the input information of the acquired data, verify whether there is a The input information has output information with the same connection information; verify 230, when the second key is used as the input information of the acquired data, verify whether the output information with the same connection information as the input information has been used; verify 240, the first When the second key is used as the input information of the acquired data, and the acquired data contains the transaction amount, verify whether the transaction amount is correct; verify 250, when the second key is used as the input information of the acquired data, and the acquired data When the data contains signature information, verify that the signature information is correct.

上述驗證序號僅為說明方便,不代表驗證順序。對於上述驗證210,如果該值是鏈式結構上的資料,則驗證為無錯誤;對於驗證220,如果存在與該輸入資訊具有相同連接資訊的輸出資訊,則驗證為無錯誤;對於驗證230,該與輸入資訊具有相同連接資訊的輸出資訊未被使用過,則驗證為無錯誤;對於驗證240,交易數額正確,則驗證為無錯誤;對於驗證250,驗證簽名資訊有效,則驗證為無錯誤。 The above verification sequence number is only for convenience of illustration, and does not represent the verification sequence. For the above verification 210, if the value is the data on the chain structure, the verification is error-free; for the verification 220, if there is output information with the same connection information as the input information, the verification is no error; for the verification 230, If the output information with the same connection information as the input information has not been used, the verification is error-free; for verification 240, the transaction amount is correct, then the verification is no error; for verification 250, the verification signature information is valid, then the verification is no error .

一種示例性的驗證過程:使用默克爾樹認證路徑驗證資料儲存裝置上儲存的輸入資料,或者輸入資料和輸出資料只要有一個資料不為鏈上的資料,則判斷為資料錯誤;判斷如果只有輸出資料,則判斷為連接錯誤;判斷該輸入資料的關聯連接如果被引用過,則判斷為連接錯誤;判斷該輸出資料的交 易數額如果不正確,則判斷為資料錯誤;判斷該資料中的簽名資訊(例如產生資料的使用者端的解鎖簽名)如果不正確,則判斷為資料錯誤。 An exemplary verification process: use the Merkel tree certification path to verify the input data stored on the data storage device, or as long as one of the input data and the output data is not the data on the chain, it is judged as a data error; judge if there is only output Data, it is judged to be a connection error; to judge that the associated connection of the input data has been cited, it is judged to be a connection error; to judge the connection of the output data If the easy amount is incorrect, it is judged as the data error; if the signature information (such as the unlocking signature of the user that generated the data) in the judgment data is incorrect, it is judged as the data error.

藉由非儲存裝置驗證可以提高系統的安全性,避免僅由固定儲存裝置驗證帶來的風險。 Non-storage device verification can improve the security of the system and avoid the risks caused by only fixed storage device verification.

上述資料驗證裝置例如可以如圖6所示,包括鍵值查找模組61和第二驗證模組62,其中:鍵值查找模組61,設定為查找該鏈式結構中鏈的部分或全部連接資訊作為第二鍵;第二驗證模組62,設定為從資料儲存裝置獲取該資料儲存裝置儲存的與該第二鍵關聯的資料(即鍵對應的值),根據該獲取的資料驗證該鏈式結構中的資料是否有錯誤。 The above-mentioned data verification device may, for example, as shown in FIG. 6, include a key value search module 61 and a second verification module 62, wherein: the key value search module 61 is set to search for part or all of the links in the chain structure The information is used as the second key; the second verification module 62 is configured to obtain the data associated with the second key (that is, the value corresponding to the key) stored in the data storage device from the data storage device, and verify the chain based on the obtained data Whether there are errors in the data in the formula structure.

該第二驗證模組62可以進行上述驗證210-250中的任意一種或多種,此處不再贅述。 The second verification module 62 can perform any one or more of the aforementioned verifications 210-250, which will not be repeated here.

採用此種驗證機制,藉由增加資料驗證裝置,提高了系統的安全性。 With this verification mechanism, the security of the system is improved by adding data verification devices.

本文一示例性實施例還提供了一種鏈式結構實現方法,該鏈式結構系統包括第一鏈系統、第二鏈系統和資料儲存裝置,如圖7所示,該方法包括步驟71-73。 An exemplary embodiment of this document also provides a method for implementing a chain structure. The chain structure system includes a first chain system, a second chain system, and a data storage device. As shown in FIG. 7, the method includes steps 71-73.

步驟71,該第一鏈系統對帳本資料簽名後,將簽名後的帳本資料寫入第一鏈的區塊資料;步驟72,該第二鏈系統在驗證第一鏈的區塊資料後,將該第一鏈的一或複數連續的區塊資料寫入第二鏈的區塊資料; 步驟73,該資料儲存裝置將該第二鏈中鏈的部分或全部連接資訊作為第一鍵,該第一鍵關聯的資料作為值,驗證該第一鍵關聯的資料無錯誤後,將該資料儲存為輸入資料或輸出資料,同一資料儲存裝置儲存的輸入資料和輸出資料根據相同的連接資訊相關聯。 Step 71, after the first chain system signs the ledger data, write the signed ledger data into the block data of the first chain; step 72, after the second chain system verifies the block data of the first chain , To write one or more consecutive block data of the first chain into the block data of the second chain; Step 73: The data storage device uses part or all of the link information of the second chain as the first key, and the data associated with the first key as the value. After verifying that the data associated with the first key is correct, the data It is stored as input data or output data, and the input data and output data stored in the same data storage device are related according to the same connection information.

該帳本資料包括交易資料和/或控制資料。 The ledger data includes transaction data and/or control data.

該第一鏈為私有鏈或者聯盟鏈,為由管理端控制的鏈,第二鏈與公有鏈類似,區別在於並非任意資料可以上鏈。當第一鏈產生新的區塊資料後,會同步到第二鏈的鏈產生節點,區塊資料驗證藉由後由第二鏈的鏈產生節點根據第二鏈的共識演算法產生新的區塊資料。第二鏈中順序記錄第一鏈提交的區塊資料,第二鏈上每個區塊資料包含的第一鏈的區塊資料的數量可以不固定,也即第二鏈上每個區塊可以包含1至n個第一鏈的區塊資料,數量由第二鏈的共識演算法決定。所以對外的第二鏈系統上的每個區塊資料是由第一鏈系統的一或複數區塊資料順序組合而成,因此第一鏈系統和第二鏈系統在邏輯狀態上是相同的。本實施例使用先產生鏈後驗證的方式,也即先產生第二鏈,再由第三層的資料儲存裝置進行驗證的方式。實際的帳本資料是由第一層即第一鏈系統上鏈的,第二層即第二鏈系統可驗證默克爾樹和管理端的簽名,並不修改帳本資料,由第三層的資料儲存裝置驗證帳本資料是否有錯誤。實現交易中心化,帳本資料去中心化。第三層的資料儲存裝置採用連接儲存的方式儲存並驗證資料,每個資料儲存裝置只需要儲存和驗證少量資料,即可實現整個鏈的等價驗證,減少每個裝置的負擔。且第二層的鏈產生節點可以只驗證第一鏈系統的管理端簽名和默克爾樹,降低了第二鏈系統的計算量。 The first chain is a private chain or a consortium chain, which is controlled by the management side. The second chain is similar to the public chain, except that not arbitrary data can be chained. When the first chain generates new block data, it will be synchronized to the chain generation node of the second chain. After the block data verification, the chain generation node of the second chain generates a new block based on the consensus algorithm of the second chain. Block data. The second chain sequentially records the block data submitted by the first chain. Each block data on the second chain contains the number of block data of the first chain. That is, each block on the second chain can Contains 1 to n block data of the first chain, and the number is determined by the consensus algorithm of the second chain. Therefore, each block data on the external second chain system is composed of one or more block data of the first chain system in sequence, so the first chain system and the second chain system are the same in logical state. This embodiment uses the method of first generating the chain and then verifying, that is, first generating the second chain, and then verifying by the third-tier data storage device. The actual ledger data is chained by the first layer, the first chain system, and the second layer, the second chain system, can verify the Merkel tree and the signature of the management end, and does not modify the ledger data. The third layer of data The storage device verifies whether there are errors in the ledger data. Realize transaction centralization and decentralization of ledger data. The third-tier data storage device uses connection storage to store and verify data. Each data storage device only needs to store and verify a small amount of data to achieve equivalent verification of the entire chain and reduce the burden on each device. In addition, the chain generating node of the second layer can only verify the signature of the management end of the first chain system and the Merkel tree, which reduces the calculation amount of the second chain system.

在一示例性實施例中,該方法還包括:該第一鏈系統將該第一鏈中鏈的部分或全部連接資訊作為第三鍵,該第三鍵關聯的資料作為值,將該第三鍵關聯的值分配到與該值具有相同第三鍵的共識組;例如第一鏈系統可在對交易資料簽名之前進行上述分配。該共識組對該第三鍵關聯的資料進行驗證,其中:該第三鍵關聯的資料包括交易資料,該驗證包括以下一種或多種:該第三鍵作為該交易資料的輸入資訊時,驗證是否存在與該輸入資訊具有相同連接資訊的輸出資訊;該第三鍵作為該交易資料的輸入資訊時,驗證與該輸入資訊具有相同連接資訊的輸出資訊是否被使用過;該第三鍵作為該交易資料的輸入資訊時,驗證該交易資料的交易數額是否正確;該第三鍵作為該交易資料的輸入資訊時,驗證該交易資料的簽名資訊(使用者端的解鎖簽名)是否正確。 In an exemplary embodiment, the method further includes: the first chain system uses part or all of the link information of the first chain as a third key, the data associated with the third key as a value, and the third key The value associated with the key is assigned to the consensus group that has the same third key as the value; for example, the first chain system can perform the above assignment before signing the transaction data. The consensus group verifies the data associated with the third key, where: the data associated with the third key includes transaction data, and the verification includes one or more of the following: when the third key is used as the input information of the transaction data, verify whether There is output information with the same connection information as the input information; when the third key is used as the input information of the transaction data, verify whether the output information with the same connection information as the input information has been used; the third key is used as the transaction When inputting information, verify whether the transaction amount of the transaction data is correct; when the third key is used as the input information of the transaction data, verify whether the signature information of the transaction data (unlocking signature on the user side) is correct.

上述驗證的順序不限。 The order of the above verification is not limited.

一種示例性的驗證過程:共識組查找與該交易資料相連接的輸入資料,即第三鍵作為該交易資料的輸入資訊時,查找是否存在與該輸入資訊具有相同連接資訊的輸出資訊,如果未查找到,判斷為連接錯誤,如果查找到,判斷該輸入資料的關聯連接是否被引用,即第三鍵作為該交易資料的輸入資訊時,驗證與該輸入資訊具有相同連接資訊的輸出資訊是否被使用過,如果已被引用過或被使用過,則判斷為連接錯誤,如果未被引用過,判斷該交易資料的 交易數額是否正確,如果不正確,判斷為資料錯誤,如果正確,判斷資料中包含的簽名資訊(例如產生交易資料的使用者端的解鎖簽名)是否正確,如果不正確,判斷為資料錯誤,如果正確,則將該交易資料儲存為輸出資料(即共識組也可以採用上述連接儲存方式儲存資料),並將該輸入資料的關聯連接標識為已被引用,也即相關聯的輸出資訊將標記為已使用。 An exemplary verification process: the consensus group searches for the input data connected to the transaction data, that is, when the third key is used as the input information of the transaction data, it searches whether there is output information with the same connection information as the input information. If it is found, it is judged as a connection error. If it is found, it is judged whether the associated connection of the input data is referenced, that is, when the third key is used as the input information of the transaction data, verify whether the output information with the same connection information as the input information is Used, if it has been quoted or used, it is judged as a connection error, if it has not been quoted, judge the transaction data Whether the transaction amount is correct, if not, it is judged as the data error, if it is correct, judge whether the signature information contained in the data (such as the unlocking signature of the user side that generated the transaction data) is correct, if not, it is judged as the data error, if it is correct , The transaction data is stored as output data (that is, the consensus group can also use the above-mentioned connection storage method to store data), and the associated connection of the input data is marked as being referenced, that is, the associated output information will be marked as use.

在一示例性實施例中,該共識組對該第三鍵關聯的資料進行驗證後,進行連接儲存時,根據該資料在第一鏈中所表示的意義,將該第三鍵關聯的資料儲存為輸入資料或輸出資料,其中,當該第三鍵作為該第一鏈中的輸出資訊的部分或全部時,將該第三鍵關聯的資料作為輸入資料儲存,當該第三鍵作為該第一鏈中的輸入資訊的部分或全部時,將該第三鍵關聯的資料作為輸出資料儲存;同一共識組上儲存的輸入資料和輸出資料根據相同的連接資訊相關聯。 In an exemplary embodiment, after the consensus group verifies the data associated with the third key, when performing connection storage, the data associated with the third key is stored according to the meaning of the data in the first chain Is input data or output data, where, when the third key is used as part or all of the output information in the first chain, the data associated with the third key is stored as input data, and when the third key is used as the first link When part or all of the input information in a chain is stored, the data associated with the third key is stored as output data; the input data and output data stored on the same consensus group are related according to the same connection information.

例如,該共識組如果判斷該交易資料或控制資料的輸出資訊與該第三鍵匹配,則將該交易資料或控制資料儲存為輸入資料;如果判斷該交易資料或控制資料的輸入資訊與該第三鍵匹配,將該交易資料或控制資料儲存為輸出資料。 For example, if the consensus group determines that the output information of the transaction data or control data matches the third key, then the transaction data or control data is stored as input data; if it is determined that the input information of the transaction data or control data matches the third key Three-key matching, save the transaction data or control data as output data.

第一鏈系統中包括複數共識組,同一個共識組中的節點對應的健是相同的,如果接收到的交易資料被驗證,則連接儲存該交易資料與該鍵,如果接收到的控制資料被驗證,則連接儲存該鍵值與控制資料。如果該資料為該鏈式結構中的輸出資訊,則將該資料作為輸入資料儲存;如果該資料為該鏈式結 構中的輸入資訊,則將該資料作為輸出資料儲存。同一共識組上儲存的輸入資料和輸出資料具有相同的鍵,以形成資料連接儲存。 The first chain system includes plural consensus groups. The nodes in the same consensus group have the same keys. If the received transaction data is verified, the transaction data and the key are connected and stored. If the received control data is Verify, then link to store the key value and control data. If the data is the output information in the chain structure, store the data as input data; if the data is the chain knot The input information in the structure is stored as output data. The input data and output data stored in the same consensus group have the same key to form data link storage.

在一示例性實施例中,該資料儲存裝置對資料的儲存與前述實施例中的處理相同:當該第一鍵作為該第二鏈中的輸出資訊的部分或全部時,將該第一鍵關聯的資料作為輸入資料儲存;當該第一鍵作為該第二鏈中的輸入資訊部分或全部時,將該第一鍵關聯的資料作為輸出資料儲存;本資料儲存裝置上儲存的輸入資料和輸出資料根據相同的連接資訊相關聯。 In an exemplary embodiment, the storage of data by the data storage device is the same as the processing in the foregoing embodiment: when the first key is used as part or all of the output information in the second chain, the first key The associated data is stored as input data; when the first key is used as part or all of the input information in the second chain, the data associated with the first key is stored as output data; the input data stored on this data storage device and The output data is related according to the same connection information.

在一示例性實施例中,該資料儲存裝置驗證該第一鍵關聯的資料是否有錯誤包括以下驗證中的一種或多種:驗證310,驗證該第二鏈的完整性;驗證320,驗證該資料是否為該第二鏈上的資料;驗證330,該第一鍵作為該第二鏈中帳本資料的輸入資訊時,驗證是否存在與該輸入資訊具有相同連接資訊的輸出資訊;驗證340,該第一鍵作為該第二鏈中帳本資料的輸入資訊時,驗證與該輸入資訊具有相同連接資訊的輸出資訊是否被使用過;驗證350,該第一鍵作為該第二鏈中帳本資料的輸入資訊時,且該第一鍵關聯的資料包含交易數額時,驗證該交易數額是否正確。 In an exemplary embodiment, the data storage device verifying whether the data associated with the first key has errors includes one or more of the following verifications: verification 310, verifying the integrity of the second chain; verification 320, verifying the data Whether it is the data on the second chain; verify 330, when the first key is used as the input information of the ledger data in the second chain, verify whether there is output information with the same connection information as the input information; verify 340, the When the first key is used as the input information of the ledger data in the second chain, verify whether the output information with the same connection information as the input information has been used; verify 350, the first key is used as the ledger data in the second chain When entering information for and the data associated with the first key contains the transaction amount, verify that the transaction amount is correct.

驗證360,該第一鍵作為該第二鏈中帳本資料的輸入資訊時,且該第一鍵關聯的資料包含簽名資訊時,驗證該簽名資訊是否正確。 Verification 360, when the first key is used as the input information of the ledger data in the second chain, and the data associated with the first key contains signature information, verify whether the signature information is correct.

本實施例中的驗證320-360與前述實施例中的驗證110-150類似,區別在於本實施例中的驗證對象為第二鏈。 The verification 320-360 in this embodiment is similar to the verification 110-150 in the foregoing embodiment, except that the verification object in this embodiment is the second chain.

在一示例性實施例中,該方法還包括:該第一鏈系統按順序為帳本資料編排序號,該帳本資料對應的區塊資料的區塊頭中包含累計帳本資料量。該第二鏈系統在第二鏈的區塊資料的區塊頭中包含該區塊資料中的累計帳本資料量。 In an exemplary embodiment, the method further includes: the first chain system sequentially numbers the book data, and the block header of the block data corresponding to the book data contains the accumulated book data amount. The second chain system includes the accumulated book data amount in the block data in the block header of the block data of the second chain.

例如,在將帳本資料寫入第一鏈的區塊資料時,按第一順序為交易資料編排序號,按第二順序為控制資料編排序號,在區塊資料的區塊頭中寫入最後一個交易資料的序號和/或最後一個控制資料的序號,使得該區塊頭資料中包含累計交易資料量和累計控制資料量。例如,每一共識組接收到前一共識組發送的累計交易資料量後,在該累計交易資料量的基礎上對本共識組待上鏈的交易資料編排序號,重新計算新的累計交易資料量併發送給下一個共識組;共識組對該待上鏈的交易資料編排序號後,該共識組請求對編排序號後的交易資料進行簽名,將被簽名的交易資料寫入第一鏈,該交易資料所在區塊的區塊頭中包含累計了該交易資料的累計交易資料量。第一鏈的累計帳本資料量包括第一累計交易資料量和/或第一累計控制資料量,第二鏈中的累計帳本資料量包括第二累計交易資料量和/或第二累計控制資料量。該第二鏈與第一鏈非同步同態,由於第一鏈的區塊頭中包含累計交易資料量和累計控制資料量,因此該第二鏈的區塊頭中也包含相應的累計交易資料量和累計控制資料量。藉由在區塊頭資料中攜帶累計帳本資料量以使資料儲存裝置能夠根據累計帳本資料量對第二鏈進行完整性驗證。 For example, when writing the ledger data into the block data of the first chain, the transaction data is numbered in the first order, the control data is numbered in the second order, and the last one is written in the block header of the block data The serial number of the transaction data and/or the serial number of the last control data makes the block header data include the cumulative transaction data volume and the cumulative control data volume. For example, after each consensus group receives the cumulative transaction data volume sent by the previous consensus group, on the basis of the cumulative transaction data volume, it will rank the transaction data of this consensus group to be chained, and recalculate the new cumulative transaction data volume. Send to the next consensus group; after the consensus group numbers the transaction data to be chained, the consensus group requests to sign the numbered transaction data, and writes the signed transaction data into the first chain. The transaction data The block header of the block where it is located contains the cumulative transaction data volume accumulating the transaction data. The cumulative ledger data volume of the first chain includes the first cumulative transaction data volume and/or the first cumulative control data volume, and the cumulative ledger data volume in the second chain includes the second cumulative transaction data volume and/or the second cumulative control data volume The amount of data. The second chain is asynchronous and homomorphic with the first chain. Since the block header of the first chain contains the cumulative transaction data volume and the cumulative control data volume, the block header of the second chain also contains the corresponding cumulative transaction data volume and Cumulative control data volume. By carrying the accumulated book data amount in the block header data, the data storage device can verify the integrity of the second chain based on the accumulated book data amount.

該資料儲存裝置可採用以下方式驗證該鏈式結構的完整性:該資料儲存裝置同步該第二鏈的區塊頭,根據該區塊頭中的累計帳本資料量(累計交 易資料量和累計控制資料量)對該第二鏈的完整性進行驗證。驗證完整性時,藉由編號位址為鍵來進行驗證。例如,裝置根據目前區塊頭資料中的累計交易資料量和前一區塊頭資料中的累計交易資料量計算得到目前區塊的所有交易資料編號位址,根據目前區塊頭資料中的累計控制資料量和前一區塊頭資料中的累計交易資料量計算得到目前區塊的所有控制資料編號位址,判斷每個交易資料編號位址如果與本節點分散式雜湊表的網路標識匹配,則查找與該交易資料編號位址對應的交易資料,判斷每個控制資料編號位址如果與本節點分散式雜湊表的網路標識匹配,則查找與該控制資料編號位址對應的控制資料,如果找到,則完整性驗證通過,如果未找到,完整性驗證失敗。 The data storage device can verify the integrity of the chain structure in the following ways: the data storage device synchronizes the block header of the second chain, and according to the accumulated book data volume (accumulated transaction amount) in the block header Easy data volume and cumulative control data volume) to verify the integrity of the second chain. When verifying the integrity, use the number address as the key to verify. For example, the device calculates all the transaction data number addresses of the current block based on the cumulative transaction data volume in the current block header data and the cumulative transaction data volume in the previous block header data, and the cumulative control data volume in the current block header data Calculate all the control data number addresses of the current block with the cumulative transaction data volume in the previous block header data, and determine if each transaction data number address matches the network identifier of the distributed hash table of this node, then search and For the transaction data corresponding to the transaction data number address, determine if each control data number address matches the network identifier of the node's distributed hash table, then search for the control data corresponding to the control data number address, and if found, The integrity verification is passed, if not found, the integrity verification fails.

完整性驗證是由儲存編號位址的資料儲存裝置進行的驗證,可在儲存時驗證。因為分散式雜湊表的特點就是要把資料儲存在對應鍵的節點上,以提供鍵的檢索,所以本身就需要儲存鍵(key)與值(value)。這裡因為編號位址是序號,是已知的,所以鍵已知,也就知道鍵應該儲存在哪些節點上。所以節點只需要同步區塊頭資料,就知道哪些編號位址的鍵應該由自己儲存,如果節點判斷自己需要儲存該鍵的資料,但是沒有儲存該資料,則在第三層(使用者端)或第二層(類公有鏈)檢索該資料,然後進行完整性驗證,這樣藉由節點自己驗證,也就能夠驗證資料的完整性。因為藉由區塊頭的累計數量,節點就能夠知道有哪些編號地址。 Integrity verification is the verification performed by the data storage device storing the numbered address, which can be verified during storage. Because the characteristic of the distributed hash table is to store data on the node corresponding to the key in order to provide key retrieval, it itself needs to store the key and value. Here, because the numbered address is a sequence number, which is known, the key is known, and it is also known on which nodes the key should be stored. Therefore, the node only needs to synchronize the block header data to know which keys of the number address should be stored by itself. If the node determines that it needs to store the data of the key, but does not store the data, it will be in the third layer (user side) or The second layer (like public chain) retrieves the data, and then performs integrity verification, so that the node can verify the integrity of the data by itself. Because with the cumulative number of block headers, the node can know which numbered addresses are.

除了完整性驗證外,還可以進行隨機驗證。隨機驗證可以是任意節點,不只是儲存編號位址的節點,可以隨機挑選某些編號位址進行驗證,並不 需要儲存。隨機驗證時根據隨機編號位址獲取該編號位址對應的交易資料,將交易資料的輸入位址作為鍵進行驗證。本質上與完整性驗證類似。 In addition to integrity verification, random verification can also be performed. Random verification can be any node, not just a node that stores numbered addresses, some numbered addresses can be randomly selected for verification, and it is not Need to store. During random verification, the transaction data corresponding to the number address is obtained according to the random number address, and the input address of the transaction data is used as a key for verification. In essence, it is similar to integrity verification.

在一示例性實施例中,該資料儲存裝置根據第一鏈區塊頭資料驗證第二鏈區塊頭資料,包括驗證累計帳本資料量是否正確。資料儲存裝置可驗證第一鏈區塊頭的累計交易數量和累計控制數量與第二鏈區塊頭的累計交易數量和累計控制數量是否相等,如果相等則說明數量正確並且第一鏈區塊頭是第二鏈區塊頭產生時間片段內的最後一個區塊頭資料。 In an exemplary embodiment, the data storage device verifies the block header data of the second chain according to the block header data of the first chain, including verifying whether the amount of accumulated ledger data is correct. The data storage device can verify whether the cumulative transaction number and cumulative control number of the first chain block head are equal to the cumulative transaction number and cumulative control number of the second chain block head. If they are equal, the number is correct and the first chain block head is the second The chain block header generates the last block header data in the time segment.

在一示例性實施例中,藉由在第二鏈區塊頭資料中攜帶默克爾樹根雜湊值以使資料儲存裝置驗證資料是否為鏈上資料。該第二鏈系統將該第一鏈的一或複數連續的區塊資料寫入第二鏈的區塊資料,包括:該第二鏈系統將該第一鏈的一或複數連續的區塊資料按照交易資料序號順序和控制資料序號順序重新組合分別產生默克爾樹根雜湊值,並在產生的第二鏈的區塊頭中包含該默克爾樹根雜湊值。 In an exemplary embodiment, the data storage device verifies whether the data is on-chain data by carrying the Merkel tree root hash value in the second chain block header data. The second chain system writes one or more continuous block data of the first chain into the block data of the second chain, including: the second chain system writes one or more continuous block data of the first chain The Merkel tree root hash value is generated by recombination according to the transaction data sequence number sequence and the control data sequence number sequence, and the Merkel tree root hash value is included in the block header of the generated second chain.

該資料儲存裝置驗證該資料是否為該第二鏈上的資料,包括:該資料儲存裝置同步該第二鏈的區塊頭,根據該區塊頭中的默克爾樹根雜湊值以及該資料對應的認證路徑驗證該資料是否為第二鏈上的資料。 The data storage device verifies whether the data is data on the second chain, including: the data storage device synchronizes the block header of the second chain, according to the Merkel tree root hash value in the block header and the authentication corresponding to the data The path verifies whether the data is the data on the second chain.

在一示例性實施例中,除了資料儲存裝置可實現資料驗證外,為提高安全性,增加資料驗證裝置進行資料驗證,即前述實施例中的資料驗證裝置。該鏈式結構系統還包括:資料驗證裝置,該方法還包括:該資料驗證裝置將該鏈式結構中鏈的部分或全部連接資訊作為第二鍵,從該資料儲存裝置獲取該資料儲存裝置上儲存的與該第二鍵關聯的資料,根據該獲取的資料驗證該第 二鏈中的資料是否有錯誤。例如,該資料驗證裝置可同步該第二鏈的區塊頭,用該區塊頭中的累計帳本資料量產生編號位址(用累計控制資料量產生控制資料編號位址,用累計交易資料量產生交易資料編號位址),根據該編號位址獲取鏈的部分或全部連接資訊作為第二鍵,從該資料儲存裝置獲取該資料儲存裝置上儲存的與該第二鍵關聯的資料。控制資料編號位址作為鍵獲取的是該控制資料編號位址對應的控制資料,還可以包括該控制資料的默克爾樹認證路徑;交易資料編號位址作為鍵獲取的是該交易資料編號位址對應的交易資料,還可以包括該交易資料的默克爾樹認證路徑。例如,可將控制資料的代幣token發行資料的預設位址(簡稱token發行位址)、token回收資料的預設位址(簡稱token回收位址)或共識獎勵資料的預設位址(簡稱獎勵位址)作為鍵,用該鍵從資料儲存裝置獲取其上儲存的與鍵關聯的資料;可將交易資料的交易位址作為鍵,用該鍵從資料儲存裝置獲取其上儲存的與鍵關聯的資料。 In an exemplary embodiment, in addition to the data storage device that can implement data verification, in order to improve security, a data verification device is added to perform data verification, that is, the data verification device in the foregoing embodiment. The chain structure system further includes: a data verification device, and the method further includes: the data verification device uses part or all of the connection information of the chain in the chain structure as a second key, and obtains the data storage device from the data storage device The stored data associated with the second key, and verify the second key based on the acquired data Whether there are errors in the data in the second chain. For example, the data verification device can synchronize the block header of the second chain, and use the cumulative book data volume in the block header to generate the number address (use the cumulative control data volume to generate the control data number address, and the cumulative transaction data volume to generate the number address. Transaction data number address), according to the number address to obtain part or all of the connection information of the chain as the second key, and obtain the data associated with the second key stored on the data storage device from the data storage device. The control data number address is used as the key to obtain the control data corresponding to the control data number address, and it can also include the Merkel tree certification path of the control data; the transaction data number address is used as the key to obtain the transaction data number address The corresponding transaction data may also include the Merkel tree certification path of the transaction data. For example, the default address of the token issuance data of the control data (referred to as the token issuance address), the default address of the token recovery data (referred to as the token recovery address), or the default address of the consensus reward data ( (Referred to as reward address) as the key, use the key to obtain the data associated with the key stored on it from the data storage device; you can use the transaction address of the transaction data as the key, and use the key to obtain the data stored on it from the data storage device The data associated with the key.

例如,資料驗證裝置從該資料儲存裝置獲取該資料儲存裝置上儲存的與該第二鍵關聯的資料,包括以下資料中的一種或多種:與該第二鍵關聯的資料、默克爾樹認證路徑、附加驗證資料,其中,該第二鍵作為該鏈式結構中輸出資訊的部分或全部,或者該第二鍵作為該鏈式結構中輸入資訊的部分或全部;該資料驗證裝置同步該第二鏈中的區塊頭,結合該區塊頭與從該資料儲存裝置獲取的與該第二鍵關聯的資料,進行以下驗證中的一種或多種:驗證該從資料儲存裝置獲取的與該第二鍵關聯的資料是否為該第二鏈上的資料; 該第二鍵作為該獲取的資料的輸入資訊時,驗證是否存在與該輸入資訊具有相同連接資訊的輸出資訊;該第二鍵作為該獲取的資料的輸入資訊時,驗證與該輸入資訊具有相同連接資訊的輸出資訊是否被使用過;該第二鍵作為該獲取的資料的輸入資訊時,且該獲取的資料包含交易數額時,驗證該交易數額是否正確;該第二鍵作為該獲取的資料的輸入資訊時,且該獲取的資料包含簽名資訊時,驗證該簽名資訊是否正確。 For example, the data verification device obtains the data associated with the second key stored on the data storage device from the data storage device, including one or more of the following data: data associated with the second key, Merkel tree authentication path , Additional verification data, wherein the second key is used as part or all of the output information in the chain structure, or the second key is used as part or all of the input information in the chain structure; the data verification device synchronizes the second The block header in the chain, combining the block header and the data associated with the second key obtained from the data storage device, performs one or more of the following verifications: verifying that the data obtained from the data storage device is associated with the second key Whether the data of is the data on the second chain; When the second key is used as the input information of the acquired data, verify whether there is output information that has the same connection information as the input information; when the second key is used as the input information of the acquired data, verify that the input information has the same Whether the output information of the connection information has been used; when the second key is used as the input information of the acquired data, and the acquired data contains the transaction amount, verify whether the transaction amount is correct; the second key is used as the acquired data When entering information for and the acquired data contains signature information, verify that the signature information is correct.

此處驗證部分的說明參見前述實施例中描述,此處不再贅述。 For the description of the verification part here, refer to the description in the foregoing embodiment, which is not repeated here.

在一示例性實施例中,該第一鏈為私有鏈或聯盟鏈,該方法還包括:第一鏈系統向使用者頒發以下金鑰的一個或複數個:管理位址主金鑰、交易位址主金鑰、機密交易主金鑰和對稱加密主金鑰,其中:該管理位址主金鑰用於與目前第一產生參數產生該使用者的下一個管理位址,該使用者的所有管理位址形成一邏輯鏈;該交易位址主金鑰用於與目前第二產生參數產生該使用者的下一個接收交易位址,該使用者的所有接收交易位址形成一邏輯鏈;該機密交易主金鑰用於與目前第三產生參數產生目前加解密密文交易數額的工作金鑰;該對稱加密主金鑰用於與目前第四產生參數產生該使用者的下一個加解密管理資料的對稱加密工作金鑰,該對稱加密主金鑰還可以用於產生其它資料的對稱加密工作金鑰。 In an exemplary embodiment, the first chain is a private chain or a consortium chain, and the method further includes: the first chain system issues one or more of the following keys to the user: management address master key, transaction location Address master key, secret transaction master key, and symmetric encryption master key, where: the management address master key is used to generate the user’s next management address with the current first generation parameter, and all of the user’s The management address forms a logical chain; the transaction address master key is used to generate the user's next receiving transaction address with the current second generation parameter, and all receiving transaction addresses of the user form a logical chain; the The secret transaction master key is used to generate the working key of the current encryption and decryption ciphertext transaction amount with the current third generation parameter; the symmetric encryption master key is used to generate the user's next encryption and decryption management with the current fourth generation parameter The symmetric encryption working key of the data, the symmetric encryption master key can also be used to generate the symmetric encryption working key of other data.

例如,該第一鏈系統使用為使用者頒發的管理位址主金鑰與該使用者的上一個管理資料中的產生參數產生該使用者的目前的管理位址,並在該目前的管理資料中寫入用於產生該使用者的下一個管理位址的產生參數。該第一鏈系統可以使用為使用者頒發的對稱加密主金鑰與該使用者的上一個管理資料中的產生參數產生對稱加密工作金鑰加密該使用者的目前的管理資料。該使用者可以使用相同的金鑰產生方式產生對稱加密工作金鑰解密該使用者的目前的管理資料。 For example, the first chain system uses the management address master key issued for the user and the generation parameters in the user's previous management data to generate the user's current management address, and then use the current management data Write in the generation parameters used to generate the user's next management address. The first chain system can use the symmetric encryption master key issued for the user and the generation parameters in the user's previous management data to generate a symmetric encryption working key to encrypt the user's current management data. The user can use the same key generation method to generate a symmetric encryption working key to decrypt the user's current management data.

在一示例性實施例中,該方法還包括:該第一鏈系統在第一鏈的區塊頭中包含目前共識公開金鑰集合映射的值;該資料儲存裝置根據第一鏈區塊頭中的共識公開金鑰集合的映射值採用默克爾樹證明或累加器證明,驗證第二鏈區塊頭中的共識公開金鑰是否有效。除數據儲存裝置可進行上述驗證外,該資料驗證裝置也可以根據第一鏈區塊頭中的共識公開金鑰集合的映射值採用默克爾樹證明或累加器證明,驗證第二鏈區塊頭中的共識公開金鑰是否有效。 In an exemplary embodiment, the method further includes: the first chain system includes the current consensus public key set mapping value in the block header of the first chain; the data storage device according to the consensus in the first chain block header The mapping value of the public key set uses Merkel tree proof or accumulator proof to verify whether the consensus public key in the second chain block header is valid. In addition to the data storage device that can perform the above verification, the data verification device can also use Merkel tree certification or accumulator certification based on the mapping value of the consensus public key set in the first chain block header to verify the data in the second chain block header. Whether the consensus public key is valid.

本文一示例性實施例還提供了一種鏈式結構系統,如圖8所示,包括:第一鏈系統81、第二鏈系統82和資料儲存裝置83,其中:該第一鏈系統81,設定為對帳本資料簽名後,將簽名後的帳本資料寫入第一鏈的區塊資料;該第二鏈系統82,設定為在驗證第一鏈的區塊資料後,將該第一鏈的一或複數連續的區塊資料寫入第二鏈的區塊資料;該資料儲存裝置83,設定為將該第二鏈中鏈的部分或全部連接資訊作為第一鍵,該第一鍵關聯的資料作為值,驗證該第一鍵關聯的資料是否有錯誤,驗 證該第一鍵關聯的資料無錯誤後,將該資料儲存為輸入資料或輸出資料,同一資料儲存裝置儲存的輸入資料和輸出資料根據相同的連接資訊相關聯。 An exemplary embodiment herein also provides a chain structure system, as shown in FIG. 8, including: a first chain system 81, a second chain system 82 and a data storage device 83, wherein: the first chain system 81 is set After signing the account book data, write the signed account book data into the block data of the first chain; the second chain system 82 is set to verify the block data of the first chain and then the first chain One or more continuous block data of the second chain is written into the block data of the second chain; the data storage device 83 is configured to use part or all of the link information of the second chain as the first key, and the first key is associated with As the value, verify whether the data associated with the first key is wrong, and verify After verifying that the data associated with the first key has no errors, save the data as input data or output data, and the input data and output data stored in the same data storage device are related according to the same connection information.

在一示例性實施例中,該第一鏈系統還包括共識組;該第一鏈系統還設定為將該第一鏈中鏈的部分或全部連接資訊作為第三鍵,該第三鍵關聯的資料作為值,將該第三鍵關聯的值分配到與該值具有相同第三鍵的共識組,該第三鍵關聯的資料包括交易資料;該共識組設定為對該第三鍵關聯的資料進行驗證,包括以下一種或多種驗證:該第三鍵作為該交易資料的輸入資訊時,驗證是否存在與該輸入資訊具有相同連接資訊的輸出資訊;該第三鍵作為該交易資料的輸入資訊時,驗證與該輸入資訊具有相同連接資訊的輸出資訊是否被使用過;該第三鍵作為該交易資料的輸入資訊時,驗證該交易資料的交易數額是否正確;該第三鍵作為該交易資料的輸入資訊時,驗證該交易資料的簽名資訊是否正確。 In an exemplary embodiment, the first chain system further includes a consensus group; the first chain system is also set to use part or all of the link information of the first chain as a third key, and the third key is associated with As the value, assign the value associated with the third key to a consensus group that has the same third key as the value, and the data associated with the third key includes transaction data; the consensus group is set to the data associated with the third key Verification includes one or more of the following verifications: when the third key is used as the input information of the transaction data, verify whether there is output information with the same connection information as the input information; when the third key is used as the input information of the transaction data , Verify whether the output information with the same connection information as the input information has been used; when the third key is used as the input information of the transaction data, verify whether the transaction amount of the transaction data is correct; the third key is used as the transaction data When entering information, verify that the signature information of the transaction data is correct.

在一示例性實施例中,該共識組還設定為對該第三鍵關聯的資料進行驗證後,將該第三鍵關聯的資料儲存為輸入資料或輸出資料,其中,當該第三鍵作為該第一鏈中的輸出資訊的部分或全部時,將該第三鍵關聯的資料作為輸入資料儲存,當該第三鍵作為該第一鏈中的輸入資訊的部分或全部時,將 該第三鍵關聯的資料作為輸出資料儲存;同一共識組上儲存的輸入資料和輸出資料根據相同的連接資訊相關聯。 In an exemplary embodiment, the consensus group is further set to store the data associated with the third key as input data or output data after verifying the data associated with the third key, wherein, when the third key is used as When part or all of the output information in the first chain is stored, the data associated with the third key is stored as input data. When the third key is part or all of the input information in the first chain, the The data associated with the third key is stored as output data; the input data and output data stored on the same consensus group are related according to the same connection information.

在一示例性實施例中,該第一鏈系統還設定為按順序為帳本資料編排序號,該帳本資料對應的區塊資料的區塊頭中包含累計帳本資料量;該第二鏈系統還設定為在第二鏈的區塊資料的區塊頭中包含該區塊資料中的累計帳本資料量。 In an exemplary embodiment, the first chain system is also set to sequentially number the book data, and the block header of the block data corresponding to the book data contains the cumulative book data amount; the second chain system It is also set to include the accumulated book data amount in the block data in the block header of the block data of the second chain.

在一示例性實施例中,該資料儲存裝置83例如可以是如圖2所示的資料儲存裝置,該資料儲存裝置將該資料儲存為輸入資料或輸出資料,包括:該第一鍵作為該第二鏈中的輸出資訊的部分或全部時,將該第一鍵關聯的資料作為輸入資料儲存;該第一鍵作為該第二鏈中的輸入資訊的部分或全部時,將該第一鍵關聯的資料作為輸出資料儲存;本資料儲存裝置上儲存的輸入資料和輸出資料根據相同的連接資訊相關聯。 In an exemplary embodiment, the data storage device 83 may be, for example, a data storage device as shown in FIG. 2. The data storage device stores the data as input data or output data, including: the first key serves as the first key When part or all of the output information in the second chain is stored, the data associated with the first key is stored as input data; when the first key is part or all of the input information in the second chain, the first key is associated The data of is stored as output data; the input data and output data stored on this data storage device are related according to the same connection information.

在一示例性實施例中,該資料儲存裝置驗證該第一鍵關聯的資料是否有錯誤,包括以下驗證中的一種或多種:驗證該第二鏈的完整性;驗證該資料是否為該第二鏈上的資料;該第一鍵作為該第二鏈中帳本資料的輸入資訊時,驗證是否存在與該輸入資訊具有相同連接資訊的輸出資訊;該第一鍵作為該第二鏈中帳本資料的輸入資訊時,驗證與該輸入資訊具有相同連接資訊的輸出資訊是否被使用過; 該第一鍵作為該第二鏈中帳本資料的輸入資訊時,且該第一鍵關聯的資料包含交易數額時,驗證該交易數額是否正確;該第一鍵作為該第二鏈中帳本資料的輸入資訊時,且該第一鍵關聯的資料包含簽名資訊時,驗證該簽名資訊是否正確。 In an exemplary embodiment, the data storage device verifies whether the data associated with the first key is incorrect, including one or more of the following verifications: verifying the integrity of the second chain; verifying whether the data is the second Data on the chain; when the first key is used as the input information of the ledger data in the second chain, verify whether there is output information with the same connection information as the input information; the first key is used as the ledger in the second chain When inputting data, verify whether the output information with the same connection information as the input information has been used; When the first key is used as the input information of the ledger data in the second chain, and the data associated with the first key contains the transaction amount, verify whether the transaction amount is correct; the first key is used as the ledger in the second chain When inputting data, and the data associated with the first key contains signature information, verify that the signature information is correct.

在一示例性實施例中,該資料儲存裝置採用以下方式驗證該鏈式結構的完整性:該資料儲存裝置同步該第二鏈的區塊頭,用該區塊頭中的累計帳本資料量產生編號位址,根據該編號位址對該第二鏈的完整性進行驗證。 In an exemplary embodiment, the data storage device verifies the integrity of the chain structure in the following manner: the data storage device synchronizes the block header of the second chain, and generates a serial number using the accumulated book data volume in the block header Address, verify the integrity of the second chain according to the numbered address.

在一示例性實施例中,該資料儲存裝置還設定為根據第一鏈區塊頭資料驗證第二鏈區塊頭資料中的累計帳本資料量是否正確。 In an exemplary embodiment, the data storage device is further configured to verify whether the accumulated book data amount in the second chain block header data is correct according to the first chain block header data.

在一示例性實施例中,該第一鏈為私有鏈或聯盟鏈,該第一鏈系統還設定為向使用者頒發以下金鑰的一個或複數個:管理位址主金鑰、交易位址主金鑰、機密交易主金鑰和對稱加密主金鑰。 In an exemplary embodiment, the first chain is a private chain or a consortium chain, and the first chain system is further configured to issue one or more of the following keys to the user: management address master key, transaction address Master key, secret transaction master key, and symmetric encryption master key.

在一示例性實施例中,該系統還可包括資料驗證裝置,該資料驗證裝置例如可以是如圖6所示的資料驗證裝置。該資料驗證裝置設定為將該鏈式結構中鏈的部分或全部連接資訊作為第二鍵,從該資料儲存裝置獲取該資料儲存裝置上儲存的與該第二鍵關聯的資料,根據該獲取的資料驗證該第二鏈中的資料是否有錯誤。 In an exemplary embodiment, the system may further include a data verification device, and the data verification device may be, for example, a data verification device as shown in FIG. 6. The data verification device is configured to use part or all of the connection information of the chain in the chain structure as the second key, and obtain the data associated with the second key stored on the data storage device from the data storage device, and according to the obtained The data verifies whether there are errors in the data in the second chain.

在一示例性實施例中,該第一鏈系統還設定為在第一鏈的區塊頭中包含目前共識公開金鑰集合映射的值,以使該資料儲存裝置或資料驗證裝置根據第一鏈區塊頭中的共識公開金鑰集合的映射值採用默克爾樹證明或累加器證明,驗證第二鏈區塊頭中的共識公開金鑰是否有效。 In an exemplary embodiment, the first chain system is further configured to include the current consensus public key set mapping value in the block header of the first chain, so that the data storage device or the data verification device is based on the first chain area. The mapping value of the consensus public key set in the block header adopts Merkel tree proof or accumulator proof to verify whether the consensus public key in the second chain block header is valid.

在一示例性實施例中,該第一鏈系統還設定為使用為使用者頒發的管理位址主金鑰與該使用者的上一個管理資料中的產生參數產生該使用者的目前管理位址,並在該目前管理資料中寫入用於產生該使用者的下一個管理位址的產生參數。 In an exemplary embodiment, the first chain system is further configured to use the management address master key issued for the user and the generation parameters in the user's previous management data to generate the user's current management address , And write the generation parameters used to generate the user's next management address in the current management data.

該鏈式結構系統中第一鏈系統、第二鏈系統、資料儲存裝置、資料驗證裝置的功能和效果參見方法中描述,此處不再贅述。 For the functions and effects of the first chain system, the second chain system, the data storage device, and the data verification device in the chain structure system, please refer to the description in the method, which will not be repeated here.

下面對本文中提到的鍵(key,或稱為鍵值、關鍵值)進行說明:第一鍵值為資料儲存裝置進行連接儲存時使用的鍵值,該第二鍵值為資料驗證裝置從資料儲存裝置上檢索資料時使用的鍵值,該第三鍵值為第一鏈系統中進行共識組查詢,以及共識組進行連接儲存時使用的鍵值。第一鍵值、第二鍵值和第三鍵值可以依據對應的鏈式結構的不同而有所差別,但均使用鏈式結構中的連接資訊的部分或者全部。例如可以是以下類型中的一種或多種:交易資料的交易位址,控制資料的代幣token發行資料的預設位址(簡稱token發行位址)、token回收資料的預設位址(簡稱token回收位址)和共識獎勵資料的預設位址(簡稱獎勵位址)。鍵值關聯的資料為對應的交易資料或控制資料,還可以包括資料對應的默克爾樹認證路徑(簡稱認證路徑)。鍵值可以儲存於管理端或使用者端。以上述實施例中的鏈式結構系統為例,該鏈式結構系統包括第一鏈系統、第二鏈系統和複數使用者端(或稱使用者端)節點,使用者端節點可以包括作為資料儲存裝置的使用者端節點,還可以包括作為資料驗證裝置的使用者端節點。對於使用者端節點,鍵值關聯的資料除交易資料或控制資 料外,還包含對應的默克爾樹認證路徑,該認證路徑為該交易資料或控制資料在第二鏈中的默克爾樹認證路徑。 The following describes the keys (key, or key value, key value) mentioned in this article: the first key value is the key value used when the data storage device is connected for storage, and the second key value is the data verification device The key value used when retrieving data from the data storage device, the third key value is the key value used when the consensus group is inquired in the first chain system and when the consensus group is connected and stored. The first key value, the second key value, and the third key value may be different according to the corresponding chain structure, but all use part or all of the connection information in the chain structure. For example, it can be one or more of the following types: the transaction address of the transaction data, the default address of the token issuance data of the control data (token issuance address), the default address of the token recovery data (token for short) Recycling address) and the default address of the consensus reward information (abbreviated as reward address). The data associated with the key value is the corresponding transaction data or control data, and may also include the Merkel tree certification path (referred to as the certification path) corresponding to the data. The key value can be stored in the management terminal or the user terminal. Take the chain structure system in the above embodiment as an example. The chain structure system includes a first chain system, a second chain system, and a plurality of user-side (or user-side) nodes. The user-side node may include data The user end node of the storage device may also include a user end node as a data verification device. For the user-side node, the data associated with the key value except for transaction data or control data In addition, it also contains the corresponding Merkel tree certification path, which is the Merkel tree certification path of the transaction data or control data in the second chain.

本揭露還提供一類鍵值(第四鍵值),可用於資料儲存裝置驗證帳本資料的完整性,還可以用於資料驗證裝置進行鍵值的查詢。第四鍵值包括以下資訊的一種或多種:交易資料的編號位址(根據交易資料編號產生)和控制資料的編號位址(根據控制資料編號產生)。可以儲存於使用者端。第四鍵值關聯的資料為對應的交易資料或控制資料,還可以包括對應的默克爾樹認證路徑。在上述鏈式結構系統的示例中,第四鍵值關聯的認證路徑為該交易資料或控制資料在第二鏈中的默克爾樹認證路徑。 This disclosure also provides a type of key value (fourth key value), which can be used for the data storage device to verify the integrity of the ledger data, and can also be used for the data verification device to query the key value. The fourth key value includes one or more of the following information: the number address of the transaction data (generated based on the transaction data number) and the number address of the control data (generated based on the control data number). Can be stored on the user side. The data associated with the fourth key value is the corresponding transaction data or control data, and may also include the corresponding Merkel tree authentication path. In the example of the above chain structure system, the authentication path associated with the fourth key value is the Merkel tree authentication path of the transaction data or control data in the second chain.

此外,本揭露還提供一類鍵值(第五鍵值),可用於進行帳戶資料鏈的查詢或檢索,使用者的帳戶資料鏈包括由該使用者的管理資料組成的第一帳戶資料鏈和由該使用者的接收交易資料組成的第二帳戶資料鏈。用於儲存管理資料的管理位址為隱性鏈式結構,由此構成第一帳戶資料鏈。用於儲存接收交易資料的交易位址也為隱性鏈式結構,由此構成第二帳戶資料鏈。第五鍵值包括用於查詢管理資料的管理位址或用於查詢交易資料的交易位址。 In addition, this disclosure also provides a type of key value (the fifth key value) that can be used to query or retrieve the account data chain. The user’s account data chain includes the first account data chain composed of the user’s management data and the The second account data chain composed of the user's received transaction data. The management address used to store the management data is an implicit chain structure, which constitutes the first account data chain. The transaction address used to store and receive transaction data is also an implicit chain structure, thus forming a second account data chain. The fifth key value includes a management address used to query management data or a transaction address used to query transaction data.

本文中作為鍵值的位址可以是位址或者是位址的雜湊值。 The address used as the key value in this article can be an address or a hash value of the address.

下面介紹默克爾樹和區塊鏈結構。默克爾樹是一種雜湊二叉樹,是一種用作快速歸納和校驗大規模資料完整性的資料結構。默克爾樹的葉子節點保存著資料集合的單中繼資料的雜湊值,而節點之間藉由雜湊運算得到父節點的雜湊值,藉由一層層往上層計算,最終會形成根節點的雜湊值。其中葉子 節點可以根據根雜湊值,以及對應的認證路徑,驗證該葉子節點是否屬於資料集合中的元素。 The following describes the Merkel tree and blockchain structure. Merkel tree is a kind of hash binary tree, which is a data structure used to quickly summarize and verify the integrity of large-scale data. The leaf nodes of the Merkel tree store the hash value of the single metadata of the data set, and the hash value of the parent node is obtained through the hash operation between nodes. By calculating layer by layer, the hash value of the root node will eventually be formed. . Where leaves The node can verify whether the leaf node belongs to the element in the data set according to the root hash value and the corresponding authentication path.

可以看出,如果默克爾樹的葉子節點數量(也即資料集合元素的數量)已知,葉子節點所在的序號(即位置)也已知,則該葉子節點所對應的認證路徑的高度和方向是固定且已知的,其中方向是指路徑的左右方向。所以也即表示該元素是有序的,不能用不同的認證路徑以及高度和方向來替代,也就能加強資料的安全性。 It can be seen that if the number of leaf nodes (that is, the number of data collection elements) of the Merkel tree is known, and the sequence number (that is, the position) of the leaf node is also known, the height and direction of the authentication path corresponding to the leaf node Is fixed and known, where the direction refers to the left and right directions of the path. Therefore, it means that the element is orderly and cannot be replaced by different authentication paths, heights and directions, and the security of the data can also be strengthened.

默克爾樹的葉子節點數量最多是樹深度的2^n,即使包含大量的資料,也能藉由固定的路徑快速驗證某個葉子節點。比如樹深度為30,則最大能包含1073741824個葉子節點。如果平均10分鐘產生一個資料塊,則每秒可包含1789569筆交易。但驗證某個葉子節點的資料,只需要30個hash值即可完成驗證,如果每個hash值為32位元組,則需要960位元組。如果每個使用者端每個區塊需要保存10筆資料,每個使用者端一年大約需要保存525600筆資料,每個區塊都按樹深度為30計算,則需要保存的認證路徑大小為481MB,如果每筆資料大小為1KB,則需要保存的總數據量大小為994MB。但實際並不需要保存這麼多資料,並且一定年限後使用者端就可以清除之前的資料,使需要保存的資料量一直保持在可控的範圍,即使移動設備也可以接受。 The number of leaf nodes of a Merkel tree is at most 2^n of the tree depth. Even if it contains a large amount of data, a certain leaf node can be quickly verified through a fixed path. For example, if the tree depth is 30, it can contain up to 1073741824 leaf nodes. If one data block is generated in an average of 10 minutes, it can contain 1,789,569 transactions per second. But to verify the data of a certain leaf node, only 30 hash values are needed to complete the verification. If each hash value is 32 bytes, then 960 bytes are required. If each user side needs to save 10 pieces of data per block, and each user side needs to save about 525,600 pieces of data a year, and each block is calculated based on the tree depth of 30, the size of the authentication path that needs to be saved is 481MB, if the size of each piece of data is 1KB, the total data size that needs to be saved is 994MB. But there is no need to save so much data, and the user side can clear the previous data after a certain number of years, so that the amount of data that needs to be saved has been kept in a controllable range, even if it is acceptable for mobile devices.

區塊鏈是由連續分片的時間片段內產生的區塊頭資料和區塊體資料組成。其中後一個區塊頭包含了前一個區塊頭的雜湊值,從而形成反向連接的鏈式結構。並且區塊頭還包含了對應區塊體資料的默克爾樹根雜湊值,從而能唯一映射該區塊體資料。而區塊體資料則包含實際的帳本資料。並且因為區 塊頭唯一映射了區塊體資料,也即區塊頭的一致性可以映射區塊體資料的一致性。所以只需要同步區塊頭資料,就可以根據帳本資料和對應的認證路徑,驗證該帳本資料是否在鏈的區塊中,並且經過多少個確認,也即SPV簡單支付驗證。 The block chain is composed of block header data and block body data generated in consecutive time segments. The latter block header contains the hash value of the previous block header, thus forming a chain structure of reverse connection. And the block header also contains the hash value of the Merkel tree root corresponding to the block body data, so that the block body data can be uniquely mapped. The block body data contains the actual ledger data. And because of the district The block header uniquely maps the block body data, that is, the consistency of the block header can map the consistency of the block body data. Therefore, it is only necessary to synchronize the block header data to verify whether the ledger data is in the block of the chain and how many confirmations have been passed according to the ledger data and the corresponding authentication path, that is, SPV simple payment verification.

下面介紹底層資料結構。帳本資料分為交易資料集和控制資料集兩部分,交易資料集包括實際的交易資料;控制資料集則包括但不限於以下資料的一種或多種類型:使用者的管理資料、token的發行資料、token的回收資料、獎勵資料和系統發佈的公告資料。交易資料主要由使用者端產生,包含使用者端的解鎖簽名,並由管理端驗證上鏈,並且上鏈時,被管理端賦予順序編排(例如遞增)的唯一序號,該序號連同交易資料一起經過管理端的背書簽名。控制資料由鏈式結構系統(例如第一鏈系統)的管理端產生,產生時賦予順序編排(例如遞增)的唯一序號並經過管理端簽名。交易資料集和控制資料集分別產生默克爾樹的根雜湊值記錄在區塊頭中。區塊頭中也會包含對應區塊體資料中的最後一個交易資料編號和最後一個控制資料編號,並且該編號是順序遞增的,也等同於區塊頭中包含目前所有的累計交易資料量和累計控制資料量。 The following describes the underlying data structure. Ledger data is divided into two parts: transaction data set and control data set. Transaction data set includes actual transaction data; control data set includes but is not limited to one or more types of the following data: user management data, token issuance data , Token recycling materials, reward materials and announcement materials issued by the system. The transaction data is mainly generated by the user side, including the unlocking signature of the user side, and verified by the management side on the chain, and when it is on the chain, the management side assigns a unique serial number that is arranged in sequence (for example, ascending), and the serial number passes through together with the transaction data. The endorsement and signature of the management side. The control data is generated by the management terminal of the chain structure system (for example, the first chain system), and is assigned a unique serial number arranged in sequence (for example, ascending) when generated, and is signed by the management terminal. The root hash value of the Merkel tree generated by the transaction data set and the control data set are recorded in the block header. The block header will also contain the last transaction data number and the last control data number in the corresponding block body data, and the number is sequentially increasing, which is equivalent to the block header containing all the current cumulative transaction data volume and cumulative control The amount of data.

第三層使用者端(包括資料儲存裝置)使用的是結構化對等網路,比如可以使用Kademlia網路通訊協定。每個使用者端(節點)只需要同步區塊頭資料,而區塊體中的帳本資料,則會根據分散式雜湊表(DHT)由整個網路上的節點分散儲存,每個節點儲存部分帳本資料和對應的認證路徑。由於每個交易資料和控制資料都具有一個遞增的唯一序號,並且區塊頭中會包含最後一個序號,相當於包含目前的累計交易資料量和累計控制資料量,所以能夠快速 查找到每個交易資料和控制資料所在的區塊,再結合認證路徑,即可使用默克爾樹驗證該資料。並且因為該區塊的默克爾樹的葉子節點數量和該資料所對應的序號(即位置)都是已知的,所以認證路徑的高度和方向是固定且已知的,不能用不同的認證路徑以及高度和方向來替代,加強了資料的安全性。 The third-tier client (including data storage devices) uses a structured peer-to-peer network, such as the Kademlia network protocol. Each user (node) only needs to synchronize the block header data, and the ledger data in the block body will be distributed and stored by the nodes on the entire network according to the distributed hash table (DHT), and each node stores part of the account. This information and the corresponding certification path. Since each transaction data and control data has an incrementally unique serial number, and the block header will contain the last serial number, which is equivalent to including the current cumulative transaction data volume and cumulative control data volume, it can quickly Find the block where each transaction data and control data are located, and then combine the authentication path to verify the data using the Merkel tree. And because the number of leaf nodes of the Merkel tree of the block and the serial number (ie location) corresponding to the data are known, the height and direction of the authentication path are fixed and known, and different authentication paths cannot be used And the height and direction to replace, strengthen the security of the data.

使用者則是藉由帳戶資料鏈查找自己的帳戶資料。而第三方使用者和監管者也可以在被授權使用者主金鑰後藉由帳戶資料鏈獲取該使用者的帳戶資料。帳戶資料鏈是指藉由使用者主金鑰與目前產生參數得到一中間值K,再由K經過其它運算得到下一個資料的位址,從而形成正向連接的邏輯鏈式結構。帳戶資料鏈使使用者能夠在隱私情況下根據使用者主金鑰進行檢索。一個使用者有兩條帳戶資料鏈,其中一條帳戶資料鏈即第一帳戶資料鏈由使用者的管理資料組成,該使用者藉由管理位址主金鑰進行檢索。該第一鏈系統使用為使用者頒發的管理位址主金鑰與該使用者的上一個管理資料中的產生參數產生該使用者的目前管理地址,該目前管理位址被包含在目前管理資料中,並在該目前管理資料中寫入用於產生該使用者的下一個管理位址的產生參數,以使該使用者的所有管理位址形成邏輯鏈。控制資料中使用者管理資料的管理位址可以作為該第一帳戶資料鏈的查詢鍵值,該鍵值關聯的資料為管理位址對應的使用者管理資料。 The user finds his own account information through the account information chain. Third-party users and supervisors can also obtain the user's account data through the account data chain after the authorized user's master key. The account data chain refers to obtaining an intermediate value K from the user's master key and the currently generated parameters, and then obtaining the address of the next data from K through other operations, thereby forming a logical chain structure of forward connection. The account data chain enables the user to retrieve it based on the user's master key in privacy. A user has two account data chains. One of the account data chains, the first account data chain, is composed of the user's management data, and the user is retrieved by the management address master key. The first chain system uses the management address master key issued for the user and the generation parameters in the user's previous management data to generate the user's current management address, and the current management address is included in the current management data In the current management data, the generation parameters used to generate the next management address of the user are written, so that all the management addresses of the user form a logical chain. The management address of the user management data in the control data can be used as the query key value of the first account data chain, and the data associated with the key value is the user management data corresponding to the management address.

初始管理位址產生參數可以是一個預設值,比如使用者ID。該管理位址是一次性的,並且都是唯一的,從而可以達到保護使用者身份隱私的目的。該第一鏈系統使用為使用者頒發的對稱加密主金鑰與該使用者的上一個管理資料中的產生參數產生對稱加密工作金鑰加密該使用者的目前的管理資料。 該使用者可以使用相同的金鑰產生方式產生對稱加密工作金鑰解密該使用者的目前的管理資料。 The initial management address generation parameter can be a preset value, such as a user ID. The management address is one-time and unique, so that the purpose of protecting the privacy of the user's identity can be achieved. The first chain system uses the symmetric encryption master key issued for the user and the generation parameters in the user's previous management data to generate a symmetric encryption working key to encrypt the user's current management data. The user can use the same key generation method to generate a symmetric encryption working key to decrypt the user's current management data.

另一條帳戶資料鏈即第二帳戶資料鏈由使用者的接收交易資料組成,該使用者藉由交易位址主金鑰進行檢索。該接收交易資料上鏈後,同一交易接收端的所有接收交易資料將會形成邏輯鏈式結構。該邏輯鏈隱含在產生的帳本資料中。 The other account data chain, the second account data chain, is composed of the user's received transaction data, and the user retrieves it by the transaction address master key. After the received transaction data is put on the chain, all the received transaction data of the same transaction receiving end will form a logical chain structure. This logical chain is implicit in the generated ledger data.

交易資料由使用者端提交給第一鏈系統的管理端,管理端對交易資料進行驗證。該交易資料包括交易接收端的交易位址和本次交易時產生的位址產生參數,交易位址利用該交易接收端上次接收交易時產生的位址產生參數產生,該本次交易時產生的位址產生參數用於產生該交易接收端下次接收交易的交易位址。管理端對交易資料的驗證主要包括有效性的驗證,例如包括驗證使用者狀態的有效性,解鎖腳本的有效性,交易數額的有效性,以及交易位址是否是有效的位址等。交易資料驗證藉由後,管理端對交易資料進行背書簽名,背書簽名後的交易資料將被寫入第一鏈的區塊資料中。該交易資料上鏈後,同一交易接收端的所有接收交易資料將會形成邏輯鏈式結構。該邏輯鏈隱含在產生的帳本資料中。 The transaction data is submitted by the user end to the management end of the first chain system, and the management end verifies the transaction data. The transaction data includes the transaction address of the transaction receiving end and the address generation parameters generated during this transaction. The transaction address is generated by using the address generation parameters generated during the last transaction received by the transaction receiving end. The address generation parameter is used to generate the transaction address of the transaction receiving end to receive the transaction next time. The verification of the transaction data by the management terminal mainly includes the verification of validity, such as verifying the validity of the user status, the validity of the unlocking script, the validity of the transaction amount, and whether the transaction address is a valid address, etc. After the transaction data is verified, the management terminal will endorse and sign the transaction data, and the transaction data after the endorsement and signature will be written into the block data of the first chain. After the transaction data is on the chain, all the received transaction data of the same transaction receiving end will form a logical chain structure. This logical chain is implicit in the generated ledger data.

使用者在註冊時管理端為其產生初始地址產生參數(或稱為nonce值),並產生起始接收交易位址,該使用者作為交易接收端發生交易時,該使用者的所有接收交易資料會形成一個邏輯鏈即第二帳戶資料鏈。當同一使用者被管理端頒發了用於產生交易位址的新金鑰後,管理端會重新為該使用者產生一個初始位址產生參數,並由重新產生的初始位址產生參數產生新的起始接收 交易位址,該重新產生的初始位址產生參數與頒發的新金鑰是配套的,或者說是相關聯的。此後,當該使用者作為交易接收端發生交易時,該使用者的所有接收交易資料會形成一個新的第二帳戶資料鏈。可見同一交易接收端的接收交易資料可有一或複數邏輯鏈式結構。每次新產生的初始位址產生參數會儲存在使用者的管理資料中,使用者可以根據管理資料中的初始位址產生參數自行查找第二帳戶資料鏈。 When the user registers, the management terminal generates parameters (or nonce value) for the initial address, and generates the initial receiving transaction address. When the user acts as the transaction receiving terminal, all the user’s receiving transaction data Will form a logical chain that is the second account data chain. When the same user is issued a new key for generating the transaction address by the management terminal, the management terminal will regenerate an initial address generation parameter for the user, and generate a new one from the newly generated initial address generation parameter Initial reception Transaction address, the re-generated initial address generation parameters and the issued new key are matched or related. After that, when the user acts as the transaction receiving end to make a transaction, all the received transaction data of the user will form a new second account data chain. It can be seen that the receiving transaction data of the same transaction receiving end can have one or more logical chain structures. Each newly generated initial address generation parameter will be stored in the user's management data, and the user can search for the second account data link by himself according to the initial address generation parameter in the management data.

如果有複數針對同一交易接收端的併發交易,即存在複數包含相同交易位址的交易資料,則包含相同交易位址的交易資料在第二帳戶資料鏈中互為兄弟節點。 If there are multiple concurrent transactions for the same transaction receiving end, that is, there are multiple transaction data containing the same transaction address, then the transaction data containing the same transaction address are sibling nodes in the second account data chain.

藉由交易資料中包含的用上一次接收交易中的位址產生參數產生的交易位址和用於產生下一次交易位址的位址產生參數,使得同一使用者端的接收交易資料形成或有兄弟節點的邏輯鏈條,從而能夠快速檢索使用者端的所有接收交易資料,且由於發送交易資料是引用接收交易資料,從而能夠實現快速獲取到所有交易資料。該交易位址是一次性的,對不同使用者是唯一的,從而可以達到保護使用者身份隱私的目的。 The transaction address generated using the address generation parameter in the last receiving transaction and the address generation parameter used to generate the next transaction address included in the transaction data, so that the receiving transaction data of the same user terminal is formed or has brothers The logical chain of the node can quickly retrieve all received transaction data on the user side, and because the sent transaction data refers to the received transaction data, all transaction data can be quickly obtained. The transaction address is one-time and unique to different users, so that the purpose of protecting the privacy of the user's identity can be achieved.

由於交易位址可作為第一鍵值,所以第二帳戶資料鏈的交易位址連接資訊是隱藏在連接儲存的鍵值裡,使用者可以藉由將交易位址作為第二鍵值檢索獲取該使用者的第二帳戶資料鏈。作為第二鍵值的交易位址可以為該使用者的目前接收交易位址,由該使用者的交易位址主金鑰與該使用者的上一個接收交易資料裡的產生參數,以及該使用者的簽名揭露金鑰產生。 Since the transaction address can be used as the first key value, the transaction address connection information of the second account data chain is hidden in the key value stored in the connection. The user can retrieve this by using the transaction address as the second key value. The user's second account data link. The transaction address used as the second key value can be the user’s current receiving transaction address, generated by the user’s transaction address master key and the user’s last received transaction data, and the use The signature of the author reveals that the key is generated.

使用者端的金鑰分為兩類,一類是使用者端的簽名金鑰,另一類是由管理端頒發的使用者主金鑰。簽名金鑰可由使用者端本地產生並管理,也可由可信第三方進行託管。如果需要實名認證,則該簽名金鑰的揭露金鑰需經過可信CA機構頒發身份證書或經過eID認證。管理端頒發的使用者主金鑰包括管理位址主金鑰、交易位址主金鑰、機密交易主金鑰和對稱加密主金鑰。其中管理位址主金鑰用於產生由使用者的管理資料組成的第一帳戶資料鏈的位址;交易位址主金鑰用於產生由使用者的接收交易資料組成的第二帳戶資料鏈的位址;機密交易主金鑰用於產生機密交易中的工作金鑰,可用於保護盲化因數,使使用者可以解密密文交易數額;對稱加密主金鑰用於產生對稱加密工作金鑰,可用於保護使用者的管理資料和使用者的其它資料。 There are two types of keys on the client side, one is the signature key on the client side, and the other is the user master key issued by the management side. The signature key can be generated and managed locally by the user, or it can be managed by a trusted third party. If real-name authentication is required, the reveal key of the signature key needs to be issued an identity certificate by a trusted CA or be authenticated by eID. The user master key issued by the management terminal includes the master key of the management address, the master key of the transaction address, the master key of confidential transactions, and the master key of symmetric encryption. The management address master key is used to generate the address of the first account data chain composed of the user's management data; the transaction address master key is used to generate the second account data chain composed of the user's received transaction data The address of the secret transaction; the secret transaction master key is used to generate the work key in the secret transaction, which can be used to protect the blinding factor, so that the user can decrypt the ciphertext transaction amount; the symmetric encryption master key is used to generate the symmetric encryption work key , Can be used to protect the user’s management data and other user data.

使用者主金鑰與目前產生參數藉由第一單向不可逆函數運算得到一中間值K,其中,管理位址主金鑰與第一產生參數產生中間值K1,交易位址主金鑰與第二產生參數產生中間值K2,機密交易主金鑰與第三產生參數產生中間值K3,對稱加密主金鑰與第四產生參數產生中間值K4。每個交易資料裡的產生參數可以不同,初始產生參數可以是使用者ID。可由K1藉由第二單向不可逆函數運算得到該使用者的下一個管理資料的位址;由K2與使用者的簽名揭露金鑰運算得到一新的揭露金鑰,比如可以使用橢圓曲線上的標量乘法運算,再用新的揭露金鑰藉由第三單向不可逆函數運算得到該使用者的下一個接收交易的位址,並且該新揭露金鑰所對應的私密金鑰可由K2與使用者的簽名私密金鑰運算得到,比如有限域的乘法運算;由K3藉由第四單向不可逆函數運算得到下一個管理資料的對稱加密工作金鑰;由K4藉由第五單向不可逆函數運算得到 目前機密交易中的工作金鑰,可用於保護盲化因數。使用者主金鑰與目前產生參數還可以藉由複數單向不可逆函數運算得到複數不同的中間值,然後中間值一對一與複數簽名揭露金鑰運算得到複數新的揭露金鑰,再由這些新的揭露金鑰產生下一個接收交易的多重簽名位址。 The user's master key and the current generation parameter are calculated by the first one-way irreversible function to obtain an intermediate value K. The management address master key and the first generation parameter generate the intermediate value K1, the transaction address master key and the first generation parameter generate an intermediate value K1. The second generation parameter generates the intermediate value K2, the secret transaction master key and the third generation parameter generate the intermediate value K3, and the symmetric encryption master key and the fourth generation parameter generate the intermediate value K4. The generation parameter in each transaction data can be different, and the initial generation parameter can be the user ID. The address of the user’s next management data can be obtained by K1 through the second one-way irreversible function calculation; a new disclosure key can be obtained by the calculation of K2 and the user’s signature disclosure key, such as using the elliptic curve Scalar multiplication operation, and then use the new disclosure key to obtain the user's next transaction receiving address through the third one-way irreversible function operation, and the private key corresponding to the new disclosure key can be shared by K2 and the user The signature private key operation of, such as finite field multiplication operation; K3 obtains the symmetric encryption work key of the next management data through the fourth one-way irreversible function operation; K4 obtains the fifth one-way irreversible function operation The working key in the current confidential transaction can be used to protect the blinding factor. The user’s master key and the current generation parameters can also be calculated by complex one-way irreversible functions to obtain complex intermediate values, and then the intermediate value is one-to-one with the complex signature disclosure key to obtain a complex new disclosure key, and then these The new disclosure key generates the multi-signature address of the next receiving transaction.

上述及本文中的單向不可逆函數都可以是散列函數或散列函數的組合,下文使用散列函數闡述。 The one-way irreversible function mentioned above and in this article can be a hash function or a combination of hash functions, and the hash function is used in the following description.

藉由使用者主金鑰與不同的產生參數得到不同的位址或金鑰,還能加強資料的安全性,比如上述散列函數都使用具有能抵抗量子計算破解的散列函數。即使量子計算破解了橢圓曲線上的私密金鑰,但由於該私密金鑰的揭露金鑰是藉由使用者簽名揭露金鑰與中間值K運算得到的,也即還需要破解中間值K才能把金鑰和使用者簽名揭露金鑰關聯上,因為任意使用者簽名揭露金鑰都能找到一個K’值運算得到該揭露金鑰,也就不能找到是由哪個使用者簽名揭露金鑰運算得到的,簽名私密金鑰也同理。或者量子計算破解了對稱加密工作金鑰,但由於對稱加密工作金鑰也都是藉由中間值K運算得到,並且每個資料中的K值都是不同的,也就無法找到資料之間的關聯。所以藉由使用者主金鑰與不同的產生參數,再結合使用具有能抵抗量子計算破解的散列函數,就能使資料或金鑰被破解後無法找到與使用者的關聯,也無法找到資料之間的關聯,也就能夠不洩漏使用者隱私。所以系統未來升級具有安全保障的抗量子計算的密碼演算法,並不會由於之前揭露的資料被破解而洩露使用者的隱私。 Different addresses or keys can be obtained by the user's master key and different generation parameters, which can also enhance the security of the data. For example, the above-mentioned hash functions use hash functions that are resistant to quantum computing cracking. Even if quantum computing cracks the private key on the elliptic curve, since the disclosure key of the private key is obtained by the user's signature disclosure key and the intermediate value K, it is also necessary to crack the intermediate value K to get The key is associated with the user signature disclosure key, because any user signature disclosure key can find a K'value calculation to get the disclosure key, and it is impossible to find which user signature disclosure key is calculated by , And the signature private key is the same. Or quantum computing cracks the symmetric encryption work key, but because the symmetric encryption work key is also obtained by the intermediate value K, and the K value in each data is different, it is impossible to find the data between the data. Associated. Therefore, by using the user's master key and different generation parameters, combined with a hash function that is resistant to quantum computing cracking, the data or key cannot be found after the data or key is cracked, and the user cannot be found. The relationship between them can not leak the privacy of users. Therefore, in the future, the system will upgrade the cryptographic algorithm with security and anti-quantum computing, and will not leak the user's privacy due to the previously disclosed information being cracked.

本系統中的交易資料使用UTXO模型,所以每個交易資料都包含未花費輸出的引用作為輸入和新的未花費輸出。引用的方式可以是未花費輸出 的位址加上所引用的交易標識(ID),其中交易ID為所引用交易資料的雜湊值。但在本系統中,每個交易資料都具有一個唯一的交易資料編號,所以也可以使用交易資料編號替換所引用的交易ID,根據輸出位址加上交易資料編號就能唯一確認所引用的未花費輸出。以下使用交易資料編號為例說明。新的未花費輸出的位址則是根據對應使用者的上一個接收交易的產生參數與使用者的交易位址主金鑰,以及使用者的簽名揭露金鑰產生的新地址。交易數額則是藉由加法同態承諾或佩德森承諾實現的機密交易進行保護,使任何使用者都可以在密文情況下驗證交易數額的輸入之和等於輸出之和,並結合範圍證明驗證交易數額都不小於零且不會溢出,也即驗證交易數額的有效性。機密交易中的盲化因數則是藉由目前交易資料的產生參數與使用者的機密交易主金鑰產生的工作金鑰加密保護,所以使用者可以解密自己的密文交易數額。 The transaction data in this system uses the UTXO model, so each transaction data contains the reference of the unspent output as input and the new unspent output. The way of quoting can be unspent output Add the quoted transaction identification (ID) to the address of, where the transaction ID is the hash value of the quoted transaction data. However, in this system, each transaction data has a unique transaction data number, so the transaction data number can also be used to replace the quoted transaction ID. According to the output address plus the transaction data number, the quoted transaction data can be uniquely confirmed. Expense output. The following uses the transaction data number as an example. The new unspent output address is a new address generated based on the generation parameters of the last received transaction corresponding to the user, the user's transaction address master key, and the user's signature disclosure key. The transaction amount is protected by a confidential transaction realized by an additive homomorphic promise or a Pedersen promise, so that any user can verify that the sum of the transaction amount is equal to the sum of the output in ciphertext, combined with range proof verification The transaction amount is not less than zero and will not overflow, that is, to verify the validity of the transaction amount. The blinding factor in the confidential transaction is encrypted and protected by the working key generated by the current transaction data generation parameters and the user's confidential transaction master key, so the user can decrypt his ciphertext transaction amount.

使用者端的結構化對等網路是藉由分散式雜湊表(DHT),根據索引的key(鍵)將對應的value(值)分散儲存在網路的節點中,可以使用索引key在網路中快速檢索對應的value。在本實施例中,將系統中的交易位址、管理位址、token發行或回收使用的預設位址等都藉由位址首碼有明確區別,再把交易資料編號和控制資料編號也藉由類似位址方式擴展(如補0)並藉由首碼明確區別(以下稱為編號地址)。比如控制資料編號位址首碼用E表示,序號為1的控制資料用E001作為控制資料編號位址;交易資料編號位址首碼用F表示,序號為1的交易資料用F001作為交易資料編號位址。可以將上述這些位址的雜湊值作為索引的key,比如某個帳本資料具有一或複數位址,則將每個位址的雜湊值都作為索引的key,對應的帳本資料和認證路徑資料作為value,儲存 在結構化對等網路中。任何使用者就可以藉由key(上述位址)檢索到相應的帳本資料和認證路徑,再結合區塊頭資料,根據編號找到帳本資料所在的區塊,就可以使用默克爾樹驗證該資料。為簡單描述,後文使用位址作為索引的key,這與使用位址的雜湊值作為索引的key是等價的。並且與通常DHT的key-value不同,本系統允許有複數value具有相同的key值,並且規定了相同key的不同value的儲存與檢索方式,也即下面介紹的連接儲存(或稱結對儲存)方式。 The structured peer-to-peer network on the client side uses a distributed hash table (DHT), and the corresponding value (value) is scattered and stored in the nodes of the network according to the index key (key), and the index key can be used in the network Quickly retrieve the corresponding value in. In this embodiment, the transaction address, management address, and default address for token issuance or recycling in the system are clearly distinguished by the address prefix, and then the transaction data number and the control data number are also clearly distinguished. It is expanded by a similar address method (such as 0) and clearly distinguished by the first code (hereinafter referred to as the numbered address). For example, the first code of the control data number address is represented by E, the control data with serial number 1 uses E001 as the control data number address; the first code of the transaction data number address is represented by F, and the transaction data with serial number 1 uses F001 as the transaction data number. Address. The hash value of the above addresses can be used as the key of the index. For example, if a certain ledger data has one or more addresses, the hash value of each address will be used as the key of the index, the corresponding ledger data and authentication path Data is stored as value In a structured peer-to-peer network. Any user can retrieve the corresponding book data and authentication path by key (above address), then combine the block header data, find the block where the book data is located according to the number, and then use the Merkel tree to verify the data . For simple description, the following text uses the address as the index key, which is equivalent to using the hash value of the address as the index key. And different from the usual DHT key-value, this system allows multiple values to have the same key value, and specifies the storage and retrieval methods for different values of the same key, that is, the connection storage (or pair storage) method described below .

下面介紹一種藉由連接儲存結構,將鏈式結構轉化為節點驗證的方式。 The following introduces a way to convert the chain structure into node verification by connecting the storage structure.

以區塊頭形成的鏈為例說明,已知區塊頭連接(包含)前一個區塊頭的雜湊值。假設第一個區塊頭H1所包含的值為0000,設H1的雜湊值為hash(00H1);則第二個區塊頭H2所包含的雜湊值為hash(00H1),設H2的雜湊值為hash(00H2);則第三個區塊頭H3所包含的雜湊值為hash(00H2),設H3的雜湊值為hash(00H3)。以區塊頭的雜湊值作為索引key,所包含的前一個區塊頭的雜湊值也作為索引key。則儲存hash(00H1)的節點,會儲存H1和H2;儲存hash(00H2)的節點,會儲存H2和H3;以此類推,每個節點都會儲存鏈上的一對資料,並且索引key為該資料對連接的全部或部分資訊。例如對於連接是交易ID和輸出索引,如果將交易ID作為key,就是部分資訊;如果區塊頭連接的是前一個區塊頭的雜湊值,將雜湊值作為key,就是全部資訊。下面以雜湊值作為key為例進行說明。H1的雜湊值為hash(00H1),H2所連接的雜湊值為hash(00H1),所以連接儲存還需要區分輸入資料(以下簡稱輸入)和輸出資料(以下簡稱輸出),比如這裡輸入的H1對應的key(hash(00H1))為資料的雜湊值 (可看作為輸出位址),而輸出的H2對應的key為資料連接的雜湊值(可看作為輸入位址)。這裡可以歸納為key對應的是輸出位址,則為連接儲存的輸入資料;key對應的是輸入位址,則為連接儲存的輸出資料。如果鏈在一直增長,假設目前的最後一個資料為Hn,所以儲存hash(00Hn)的節點,只會儲存輸入資料Hn,而輸出資料為空;當鏈新增加H[n+1]時,該節點才會包含輸出的資料H[n+1];而儲存hash(00H[n+1])的節點,也只會儲存輸入的資料H[n+1],輸出資料為空。儲存0000的節點,只會儲存H1,並且由於0000是H1所連接的輸入位址,所以H1為該節點的輸出資料,而輸入資料為空。但由於0000是特殊的起始資料,也即能標識為起始連接儲存,所以起始連接儲存能使用一個特殊的0000資料(或空資料)作為輸入。 Taking the chain formed by the block header as an example, it is known that the block header is connected to (including) the hash value of the previous block header. Suppose the value contained in the first block header H1 is 0000, and the hash value of H1 is set to hash(00H1); then the hash value contained in the second block header H2 is hash(00H1), and the hash value of H2 is set to hash (00H2); then the hash value contained in the third block header H3 is hash (00H2), and the hash value of H3 is set to hash (00H3). The hash value of the block header is used as the index key, and the hash value of the previous block header included is also used as the index key. Then the node that stores hash (00H1) will store H1 and H2; the node that stores hash (00H2) will store H2 and H3; and so on, each node will store a pair of data on the chain, and the index key is this All or part of the information about the data pair connection. For example, if the connection is transaction ID and output index, if the transaction ID is used as the key, it is part of the information; if the block header is connected to the hash value of the previous block header, the hash value is used as the key, which is all the information. The following takes the hash value as the key as an example for description. The hash value of H1 is hash (00H1), and the hash value of H2 is hash (00H1), so the connection storage also needs to distinguish input data (hereinafter referred to as input) and output data (hereinafter referred to as output). For example, the input H1 corresponds to The key(hash(00H1)) is the hash value of the data (It can be regarded as the output address), and the key corresponding to the output H2 is the hash value of the data connection (it can be regarded as the input address). It can be summarized here that the key corresponds to the output address, which is the input data stored in the connection; the key corresponds to the input address, which is the output data stored in the connection. If the chain keeps growing, suppose the last data is Hn, so the node storing hash(00Hn) will only store the input data Hn, and the output data will be empty; when the chain newly adds H[n+1], this The node will only contain the output data H[n+1]; and the node storing hash(00H[n+1]) will only store the input data H[n+1], and the output data will be empty. The node storing 0000 will only store H1, and since 0000 is the input address connected to H1, H1 is the output data of the node, and the input data is empty. However, because 0000 is a special starting data, that is, it can be marked as the initial connection storage, so the initial connection storage can use a special 0000 data (or empty data) as input.

區塊頭鏈有分叉和連接叔區塊頭的可能,也即區塊頭鏈可能出現有複數輸入和複數輸出的情況。因為叔區塊頭的雜湊值與父區塊頭的雜湊值是不同的,藉由雜湊值儲存也是在不同的節點上,所以區塊頭鏈的連接儲存不會有複數輸入資料,但分叉卻會使相關的節點有複數輸出資料。根據選擇的作為連接的key的不同,如果是資料的雜湊值,因為雜湊值具有唯一性(不考慮碰撞),則連接儲存只會有一個輸入資料;如果是位址,根據選擇的作為key的位址的不同,可能有複數相同位址的情況,則此時連接儲存可能會有複數輸入資料。 The block head chain has the possibility of forking and connecting the uncle block head, that is, the block head chain may have multiple inputs and multiple outputs. Because the hash value of the uncle block header is different from the hash value of the parent block header, the hash value is also stored on different nodes, so the connection storage of the block header chain will not have plural input data, but the fork will cause Related nodes have complex output data. According to the different key selected as the connection, if it is the hash value of the data, because the hash value is unique (without considering collision), the connection storage will only have one input data; if it is an address, according to the selected key as the key The address is different, there may be multiple numbers of the same address, then the connected storage may have multiple input data at this time.

如果節點只有輸出資料而沒有輸入資料(除特殊的起始連接儲存外),則該鏈的連接錯誤;如果節點只有輸入資料而沒有輸出資料,則該輸入資料必定會在上一個節點中連接儲存且為輸出資料。連接儲存是指節點儲存一 或複數輸入資料和對應的一或複數輸出資料,並且該節點能驗證輸入、輸出資料是否正確;也可以沒有輸出資料,表示輸入資料的連接未被使用或未花費,也即輸出資料為零個。其中驗證輸入輸出資料的正確性包括驗證一或複數輸入和對應的一或複數輸出的連接是否正確。如果輸出資料包含交易數額,還需要驗證輸出資料的交易數額是否正確;如果輸出資料包含簽名資訊,還可以驗證輸出資料的簽名資訊是否有效。比如UTXO結構中,只有輸出的數額,輸入是引用的位址,所以驗證輸出資料的交易數額,其中輸入數額的部分就可以來自輸入資料的輸出數額,也即可以減少部分資料的獲取。所以也就把鏈式結構轉換為節點的連接儲存,並且由節點驗證鏈的連接是否正確。而且連接儲存的方式還能使鏈具有雙向檢索的能力,比如上述區塊頭鏈查詢hash(00H2),能獲取H2所包含的前一個區塊頭的雜湊值hash(00H1),以及H3的雜湊值hash(00H3)。並且檢索資料者也可以藉由檢索的key和節點返回的資料判斷是輸入資料還是輸出資料,從而判斷鏈的連接是否正確。 If the node has only output data but no input data (except for the special initial connection storage), the link of the chain is wrong; if the node has only input data but no output data, the input data must be connected and stored in the previous node And is the output data. Connected storage refers to node storage Or plural input data and corresponding one or plural output data, and the node can verify whether the input and output data are correct; or there is no output data, which means that the connection of the input data is not used or cost, that is, the output data is zero . The verification of the correctness of the input and output data includes verifying whether the connection of one or plural input and the corresponding one or plural output is correct. If the output data contains the transaction amount, it is also necessary to verify whether the transaction amount of the output data is correct; if the output data contains signature information, it can also verify whether the signature information of the output data is valid. For example, in the UTXO structure, there is only the amount of output and the input is the referenced address. Therefore, the transaction amount of the output data is verified. The input amount can be derived from the output amount of the input data, which can reduce the acquisition of some data. Therefore, the chain structure is converted into node connection storage, and the node verifies whether the chain connection is correct. And the way of connection storage can also make the chain have the ability of two-way retrieval. For example, the above block header chain query hash (00H2), can obtain the hash value hash (00H1) of the previous block header contained in H2, and the hash value hash of H3 (00H3). And the person who retrieves the data can also use the retrieved key and the data returned by the node to determine whether it is input data or output data, thereby judging whether the chain connection is correct.

結合區塊鏈,進行連接儲存的節點還可以驗證連接儲存的資料是否為鏈上的資料。UTXO資料具有默克爾樹認證路徑,並且UTXO也屬於鏈式結構,下面以UTXO為例說明。因為本系統使用的UTXO引用方式為位址加上交易資料編號,以位址為索引的key。由於存在併發交易的原因,所以可能有複數相同輸出位址的情況,但交易資料編號是不同的,所以本系統根據交易位址的連接儲存,是可能出現複數輸入和複數輸出的情況,但相同位址引用的是不同的交易資料編號,也即複數輸入和複數輸出資料之間,根據地址加上交易資料編號是一對一的引用,所以並不是雙花。比如交易資料T1,其中的輸入位址 為Ad1和Ad2,輸出位址為Bd1和Bd2;交易資料T2,輸入位址為Bd1和Ed1,輸出位址為Cd1和Cd2。根據上文可知,對於儲存Bd1的節點,如圖9所示,會儲存T1和T2,其中T1為連接儲存的輸入資料(因為Bd1為T1的輸出位址),T2為連接儲存的輸出資料(因為Bd1為T2的輸入位址)。而對於儲存Ad1和Ad2的節點,T1資料是連接儲存的輸出資料;對於儲存Cd1和Cd2的節點,T2資料是連接儲存的輸入資料。每個節點都會驗證自己連接儲存資料的輸入輸出是否正確,比如儲存Bd1的節點,會驗證有無輸入資料T1,輸出資料T2是否存在雙花,輸出資料T2的交易數額是否正確,但T2的輸入還需要依賴Ed1,所以儲存Bd1的節點還需要獲取Ed1作為輸出的資料才能夠驗證,設Ed1作為輸出的資料為T3,所以儲存Bd1的節點,會儲存T3以及對應的認證路徑作為附加驗證資料,並驗證Bd1和Ed1的輸入數額是否等於Cd1和Cd2的輸出數額,即Bd1+Ed1是否等於Cd1+Cd2。同理儲存Ed1的節點,會儲存輸入資料T3和輸出資料T2,以及附加驗證資料T1,並驗證輸入輸出資料是否正確。 Combined with the blockchain, the node that is connected to the storage can also verify whether the data stored in the connection is the data on the chain. UTXO data has a Merkel tree certification path, and UTXO also belongs to a chain structure. The following takes UTXO as an example. Because the UTXO reference method used by this system is the address plus the transaction data number, and the address is the key of the index. Due to concurrent transactions, there may be multiple numbers with the same output address, but the transaction data numbers are different, so this system may have multiple input and multiple output according to the connection storage of the transaction address, but the same The address refers to different transaction data numbers, that is, between the plural input and the plural output data, it is a one-to-one quotation based on the address plus the transaction data number, so it is not a double spend. For example, transaction data T1, where the input address For Ad1 and Ad2, the output addresses are Bd1 and Bd2; for transaction data T2, the input addresses are Bd1 and Ed1, and the output addresses are Cd1 and Cd2. According to the above, for the node storing Bd1, as shown in Figure 9, T1 and T2 will be stored, where T1 is the input data stored in the connection (because Bd1 is the output address of T1), and T2 is the output data stored in the connection ( Because Bd1 is the input address of T2). For the nodes storing Ad1 and Ad2, T1 data is the output data of the connection storage; for the nodes storing Cd1 and Cd2, the T2 data is the input data of the connection storage. Each node will verify whether the input and output of its connection to the stored data is correct. For example, the node storing Bd1 will verify whether there is input data T1, whether the output data T2 has double spend, and whether the transaction amount of output data T2 is correct, but the input of T2 is still Need to rely on Ed1, so the node storing Bd1 also needs to obtain Ed1 as the output data to be able to verify, set Ed1 as the output data as T3, so the node storing Bd1 will store T3 and the corresponding certification path as additional verification data, and Verify whether the input amounts of Bd1 and Ed1 are equal to the output amounts of Cd1 and Cd2, that is, whether Bd1+Ed1 is equal to Cd1+Cd2. Similarly, the node storing Ed1 will store input data T3 and output data T2, as well as additional verification data T1, and verify whether the input and output data are correct.

下面介紹本系統的token發行和回收也即起始交易資料和結束交易資料也是連接儲存的,並且相關節點也能驗證連接儲存資料的輸入輸出是否正確。所以也就把UTXO鏈轉化為節點的連接儲存結構,每個節點驗證連接儲存是否正確,比如是否只有輸出而沒有輸入(起始連接儲存也會有特殊的輸入),輸入資料是否有複數相同輸出(即雙花),以及連接儲存資料的輸入輸出是否正確,並且每個交易資料都可以藉由默克爾樹驗證是否為鏈上的資料,因此藉由分散的節點即可驗證整個UTXO帳本的正確性。根據上文可知,使用者在網路中藉由檢索位址也可以獲取雙向檢索的能力,並且能根據節點返回的資料 是輸入還是輸出,從而判斷鏈的連接是否正確,還可以根據返回的資料判斷是否是未花費輸出。比如使用者C在網路中檢索Ed1,節點會將Ed1相關的資料T1、T2和T3以及對應的認證路徑返回給使用者C。使用者C根據Ed1是T3的輸出位址,所以T3是輸入資料;根據Ed1是T2的輸入位址,所以T2是輸出資料;Ed1不是T1的位址,所以T1是附加驗證資料。根據相關資料的認證路徑驗證T1、T2和T3都是鏈上的資料,並且可以驗證Bd1和Ed1的輸入數額是否等於Cd1和Cd2的輸出數額,從而可以驗證輸入輸出資料的正確性。如果節點只返回T2資料,則只有輸出而沒有輸入,判斷為鏈的連接錯誤;如果節點只返回T3資料,則表示T3的Ed1沒有被花費。 The following describes the token issuance and recovery of this system, that is, the initial transaction data and the end transaction data are also stored in connection, and the relevant nodes can also verify whether the input and output of the connected storage data are correct. Therefore, the UTXO chain is transformed into the connection storage structure of the nodes, and each node verifies whether the connection storage is correct, such as whether there is only output but no input (the initial connection storage will also have special inputs), and whether the input data has multiple identical outputs (I.e. double spend), and whether the input and output of the connected storage data are correct, and each transaction data can be verified by the Merkel tree to verify whether it is on-chain data, so the entire UTXO ledger can be verified by distributed nodes Correctness. According to the above, users can also obtain the ability of two-way retrieval by retrieving the address in the network, and can also obtain the data returned by the node Whether it is input or output, it can be judged whether the link of the chain is correct, and it can also be judged whether it is unspent output based on the returned data. For example, if user C searches for Ed1 on the network, the node will return Ed1 related data T1, T2, and T3 and the corresponding authentication path to user C. User C according to Ed1 is the output address of T3, so T3 is the input data; according to Ed1 is the input address of T2, so T2 is the output data; Ed1 is not the address of T1, so T1 is additional authentication data. Verify that T1, T2, and T3 are all data on the chain according to the certification path of the relevant data, and can verify whether the input amount of Bd1 and Ed1 is equal to the output amount of Cd1 and Cd2, so that the correctness of the input and output data can be verified. If the node only returns T2 data, there is only output but no input, and it is judged as a link connection error; if the node only returns T3 data, it means that Ed1 of T3 is not spent.

系統token發行或回收使用的是預設位址,並且首先需要在控制資料集中明文公佈。比如發行的地址為A001,回收的地址為B001。因為控制資料集中公佈的token發行或回收資訊中包含有該預設位址資訊,所以網路中儲存A001的節點,會儲存控制資料集中發佈的資訊,以及A001作為輸入引用位址的交易資料,也即起始交易資料;而網路中儲存B001的節點,會儲存控制資料集中發佈的資訊,以及B001作為輸出位址的交易資料,也即結束交易資料。所以系統token發行或回收的預設位址,也是符合連接儲存的特徵,只是使用預設的輸入或輸出資料,比如不是交易資料而是控制資料集中的明文發行或回收資訊,節點也可以驗證輸入輸出資料是否正確。 The system token issuance or recovery uses the default address, and first needs to be published in the control data set in clear text. For example, the issued address is A001, and the recycled address is B001. Because the token issuance or recovery information published in the control data set contains the preset address information, the node that stores A001 in the network will store the information published in the control data set and A001 as the transaction data of the input reference address. That is, the initial transaction data; and the node that stores B001 in the network will store the information released in the control data set, and the transaction data with B001 as the output address, that is, the end transaction data. Therefore, the default address for the issuance or recovery of the system token is also in line with the characteristics of connected storage. It only uses the default input or output data. For example, it is not transaction data but the plaintext issuance or recovery information in the control data set. The node can also verify the input Whether the output data is correct.

上述舉例系統使用的是同質化token,如果使用非同質化token,也是可以符合連接儲存的特徵,並能達到驗證UTXO鏈的目的。 The above example system uses a homogenized token. If a non-homogeneous token is used, it can also meet the characteristics of connected storage and achieve the purpose of verifying the UTXO chain.

上述藉由連接儲存使分散式節點即可驗證鏈的連接是否正確,此外還可以驗證鏈的長度是否正確。為了驗證鏈的長度是否正確,根據區塊頭中所包含的累計交易資料量和累計控制資料量,節點能計算出該區塊所包含的所有編號位址,然後節點可以根據每個編號位址查詢自己的網路標識是否匹配該key,如果有相應的編號位址key是由自己儲存,但自己沒有相應的資料,則藉由網路查詢該key的資料(例如先在使用者端節點查找,如果沒有再將編號地址作為key在第二層鏈上查找),如果沒有找到則說明該鏈的完整性錯誤。如果找到了該key對應的帳本資料,並驗證了該資料,則說明該編號位址的資料正確,如果該資料是交易資料,根據上述所知,交易資料藉由交易位址形成連接儲存,該節點可以根據交易的輸入引用位址查詢和驗證。這樣就能藉由編號地址驗證鏈的完整性,也就能藉由網路查詢未花費輸出。 The above-mentioned connection storage enables distributed nodes to verify whether the chain is connected correctly, and in addition, it can also verify whether the length of the chain is correct. In order to verify whether the length of the chain is correct, according to the cumulative transaction data volume and cumulative control data volume contained in the block header, the node can calculate all the numbered addresses contained in the block, and then the node can query according to each numbered address Whether your own network ID matches the key, if there is a corresponding number address key is stored by yourself, but you do not have the corresponding data, you can query the data of the key through the network (for example, first search on the user end node, If you do not use the numbered address as the key to search on the second-level chain), if it is not found, it means that the integrity of the chain is wrong. If the ledger data corresponding to the key is found, and the data is verified, it means that the data of the number address is correct. If the data is transaction data, according to the above knowledge, the transaction data is stored in connection with the transaction address. The node can query and verify the reference address based on the input of the transaction. In this way, the integrity of the chain can be verified by the numbered address, and the unspent output can be checked by the network.

由於本系統的帳本資料是由交易資料集和控制資料集兩部分組成。並且每個控制資料中都有唯一的控制資料編號,該編號是順序遞增的,根據上文可知,藉由編號位址即可驗證控制資料的完整性。如果某個位址只被特定節點驗證,也即驗證某個交易資料或控制資料的節點是固定並且已知的,這會帶來一定的風險,所以在一示例性實施例中,系統可選擇增加使用者隨機選取驗證的方式。因為區塊頭中包含了目前所有的累計交易數量和累計控制數量,所以每個節點都能知道區塊中所包含的交易資料和控制資料的起始編號與結束編號。使用者端節點在同步區塊頭時,可以根據編號位址對該區塊裡的帳本資料進行隨機選取驗證,比如可以隨機選取驗證m1個控制資料,也可以隨機選取驗證m2個交易資料。控制資料只有管理端的簽名,所以使用者端節點只需 要藉由控制資料編號位址獲取到控制資料,驗證管理端簽名,並根據認證路徑驗證資料是否在鏈上。驗證交易資料則需要先經過交易資料編號位址獲取到交易資料,再根據交易資料裡的輸入引用位址,查詢這些位址並進行驗證。根據上文所知,查詢輸入引用的位址節點返回的是具有輸入輸出資料的連接儲存資料,即前述具有關聯關係的輸入資料和輸出資料,並且能夠驗證輸入資料和輸出資料的正確性,以及根據認證路徑驗證資料是否在鏈上。由於使用者端使用的是分散式雜湊表網路進行檢索,並且每個節點都是獨立隨機選取帳本資料進行驗證,所以並不會知曉某個交易資料被哪些節點選擇驗證,也就能避免某個位址只被特定節點驗證的缺點,增加了安全性。 Because the account book data of this system is composed of two parts: transaction data set and control data set. And each control data has a unique control data number, which is sequentially increasing. According to the above, the integrity of the control data can be verified by the number address. If an address is only verified by a specific node, that is, the node that verifies a certain transaction data or control data is fixed and known, this will bring a certain risk, so in an exemplary embodiment, the system can choose to increase The user randomly selects the verification method. Because the block header contains all the current cumulative transaction quantity and cumulative control quantity, each node can know the starting number and ending number of the transaction data and control data contained in the block. When the user-side node synchronizes the block header, it can randomly select and verify the ledger data in the block according to the number address. For example, it can randomly select and verify m1 control data, or randomly select and verify m2 transaction data. The control data only has the signature of the management end, so the user end node only needs To obtain the control data by the control data number address, verify the signature of the management end, and verify whether the data is on the chain according to the certification path. To verify the transaction data, you need to obtain the transaction data through the transaction data number address, and then query these addresses and verify them based on the input reference addresses in the transaction data. According to what is known above, the address node referenced by the query input returns the connected storage data with input and output data, that is, the input data and output data with the aforementioned association relationship, and can verify the correctness of the input data and output data, and Verify that the data is on the chain according to the certification path. Since the client uses a distributed hash table network for retrieval, and each node randomly selects the ledger data for verification, it does not know which nodes choose to verify a certain transaction data, and it can be avoided. The disadvantage that an address is only verified by a specific node increases security.

從上文可知,可以把任意鏈上的資料轉化為節點的連接儲存結構,其中節點儲存一或複數輸入資料和對應的零個、一或複數輸出資料,並且節點能驗證輸入、輸出資料是否正確,特殊的起始連接儲存和結束連接儲存也可以藉由預設的輸入和輸出資料符合連接儲存特徵。藉由連接儲存把任意鏈上的資料轉化為節點儲存,再結合證明所儲存的資料是鏈上資料,就能驗證鏈的連接是否正確。以及藉由編號位址驗證鏈的完整性,就能使每個節點儲存部分帳本資料和對應的認證路徑,並驗證輸入、輸出資料是否正確,就能等價驗證全部帳本資料的正確性,稱之為等價驗證。並且還可以選擇增加使用者隨機選取驗證的方式,避免某個位址只被特定節點驗證的缺點,增加了安全性。 It can be seen from the above that the data on any chain can be transformed into a node’s connected storage structure, where the node stores one or plural input data and the corresponding zero, one or plural output data, and the node can verify whether the input and output data are correct , The special initial connection storage and end connection storage can also meet the connection storage characteristics by default input and output data. By linking storage to convert data on any chain into node storage, combined with proving that the stored data is on-chain data, it can be verified whether the chain connection is correct. And by verifying the integrity of the chain by the number address, each node can store part of the book data and the corresponding certification path, and verify whether the input and output data is correct, and the correctness of all the book data can be equivalently verified , Which is called equivalence verification. And you can also choose to increase the user's random selection of verification methods, to avoid the shortcomings of a certain address only being verified by a specific node, and to increase security.

再以公有鏈的UTXO為例說明,比如Bitcoin(比特幣)系統。Bitcoin的UTXO輸入引用的是未花費交易ID和輸出索引,其中交易ID為所引用交易資料的雜湊值。可以把發行看作為礦工創建的CoinBase獎勵交易(創幣交易, 也即每個區塊體資料中的第一個交易資料)。使用交易ID作為檢索的key,引用的交易ID也作為檢索的key。比如交易資料ID為Tb,其中的輸入引用為Ta[1]和Ta[2],有兩個輸出Tb[1]和Tb[2];交易資料ID為Tc,其中輸入引用為Tb[1];交易資料ID為Td,其中輸入引用為Tb[2];括弧內數位為引用的輸出索引。則儲存Tb的節點,會儲存輸入資料Tb,以及輸出資料Tc和Td。因為不允許有相同的交易ID,所以根據交易ID作為檢索的key,連接儲存不會有複數輸入資料,但可能會有複數輸出資料。這裡的兩個輸出的輸入引用並不是相同的輸出索引,所以並不是雙花。每個交易資料都包含對應的認證路徑資料,並且CoinBase獎勵交易的認證路徑是特殊的第一個交易資料,也即起始連接儲存。在不考慮交易手續費的情況下,每個節點可以容易驗證輸入、輸出資料的正確性,起始連接儲存也可以容易驗證CoinBase獎勵交易的正確性。但考慮實際Bitcoin交易中含有手續費,CoinBase獎勵交易是包含出塊獎勵和交易手續費兩部分,所以起始連接儲存需要CoinBase獎勵交易所在區塊體的所有交易手續費才能驗證,如果區塊體內的交易數量較多,會使驗證變得非常困難,檢索起始連接儲存的使用者需要驗證CoinBase獎勵交易也同樣變得非常困難。如果能夠僅依賴有限個交易資料驗證輸入、輸出資料的正確性,就能發揮分散式節點連接儲存的優點,能藉由每個節點儲存並驗證部分交易資料的正確性,達到驗證整個UTXO鏈的正確性的目的。並且可以藉由增加編號位址的方式驗證鏈的完整性。 Take the UTXO of the public chain as an example, such as the Bitcoin system. Bitcoin's UTXO input refers to the unspent transaction ID and output index, where the transaction ID is the hash value of the quoted transaction data. The issuance can be regarded as a CoinBase reward transaction created by miners (coin creation transaction, That is, the first transaction data in each block body data). Use the transaction ID as the key for retrieval, and the quoted transaction ID as the key for retrieval. For example, the transaction data ID is Tb, the input references are Ta[1] and Ta[2], and there are two outputs Tb[1] and Tb[2]; the transaction data ID is Tc, and the input reference is Tb[1] ; The transaction data ID is Td, and the input reference is Tb[2]; the digits in parentheses are the reference output index. The node that stores Tb will store the input data Tb, and the output data Tc and Td. Because the same transaction ID is not allowed, so based on the transaction ID as the key for retrieval, the connected storage will not have multiple input data, but there may be multiple output data. The input references of the two outputs here are not the same output index, so they are not double spend. Each transaction data contains the corresponding authentication path data, and the authentication path of the CoinBase reward transaction is the special first transaction data, that is, the initial connection storage. Without considering transaction fees, each node can easily verify the correctness of input and output data, and the initial connection storage can also easily verify the correctness of CoinBase reward transactions. However, considering that the actual Bitcoin transaction contains a handling fee, the CoinBase reward transaction includes two parts: the block reward and the transaction fee. Therefore, the initial connection storage requires all transaction fees of the CoinBase reward exchange in the block body to be verified. If the block The large number of transactions in the body will make verification very difficult. It is also very difficult for users who retrieve the initial connection storage to verify CoinBase reward transactions. If you can only rely on a limited number of transaction data to verify the correctness of input and output data, you can take advantage of the advantages of distributed node connection storage. By storing and verifying the correctness of part of the transaction data by each node, you can verify the entire UTXO chain. The purpose of correctness. And the integrity of the chain can be verified by adding a numbered address.

因為本系統使用UTXO模型,所以使用者A的未花費輸出可能會被同一個交易裡的其他使用者B知道,引用該未花費輸出的交易時間戳記也可能會被使用者B知道,如果交易裡還引用了使用者A的其它未花費輸出,也可 能會被使用者B知道。為保證盡可能不洩露任何資訊,使用者可以選擇系統提供的輔助混淆方案。比如使用者將這些未花費輸出依次轉入系統提供的混淆位址,該混淆位址也是一條邏輯鏈,所以每次轉入的混淆位址都是不同的,然後由系統的另外一個混淆位址轉出相同數額到使用者新的接收交易位址,而新的接收交易位址在UTXO鏈上與使用者之前的未花費輸出沒有任何關聯,也就能不洩漏任何資訊。 Because this system uses the UTXO model, user A’s unspent output may be known to other users B in the same transaction, and the transaction timestamp that refers to the unspent output may also be known to user B if the transaction is Other unspent output of user A is also quoted, or Can be known by user B. To ensure that no information is leaked as much as possible, users can choose the auxiliary obfuscation solution provided by the system. For example, the user transfers these unspent outputs to the obfuscated address provided by the system in turn. The obfuscated address is also a logical chain, so the obfuscated address transferred each time is different, and then another obfuscated address of the system Transfer the same amount to the user's new receiving transaction address, and the new receiving transaction address on the UTXO chain is not related to the user's previous unspent output, and no information will be leaked.

使用者的管理位址是藉由上一個管理資料中的產生參數與管理位址主金鑰產生,管理資料則由上一個管理資料中的產生參數與對稱加密主金鑰產生的對稱加密工作金鑰加密保護。而使用者的第一個管理資料,也即使用者的註冊管理資料,使用使用者的註冊ID作為產生參數。使用者的註冊管理資料中包含接收交易資料組成的第二帳戶資料鏈的初始位址產生參數,還包含使用者的身份證書散列值和使用者簽名揭露金鑰,可用於確認使用者身份。除使用者註冊管理資料和使用者身份證書更新管理資料中包含有使用者關聯資訊用於確認使用者身份外,其餘的帳本資料裡都不再含有使用者的關聯資訊。比如交易資料中可以包含使用者附加資訊,其中可能會含有使用者的身份資訊,所以使用者附加資訊是鏈下儲存,鏈上只記錄附加資訊的散列值,並且使用者附加資訊可以使用交易的時間戳記作為鹽值。除使用者附加資訊外,交易資料中還可以包含有合約附加資訊,合約附加資訊是用於記錄合約的關聯資訊,並不含有使用者的身份資訊,所以合約附加資訊可以是鏈上儲存的。使用者的簽名揭露金鑰與使用者身份證書是關聯的,所以使用者身份證書更新管理資料中也包 含使用者簽名揭露金鑰更新資訊。使用者的其它管理資料可以包含使用者主金鑰更新資訊和普通管理資訊,這些資訊都不會涉及使用者身份。 The user's management address is generated by the generation parameters in the previous management data and the management address master key, and the management data is generated by the symmetric encryption work fund generated by the generation parameters and the symmetric encryption master key in the previous management data Key encryption protection. The user's first management data, that is, the user's registration management data, uses the user's registration ID as the generation parameter. The user's registration management data includes the initial address generation parameters of the second account data chain composed of the received transaction data, and also includes the user's identity certificate hash value and the user's signature disclosure key, which can be used to confirm the user's identity. Except for user registration management data and user identity certificate update management data that contain user-related information to confirm the user's identity, the rest of the ledger data no longer contains user-related information. For example, transaction data can contain user additional information, which may contain user identity information, so user additional information is stored off-chain, and only the hash value of the additional information is recorded on the chain, and user additional information can use the transaction The timestamp is used as the salt value. In addition to user additional information, the transaction data can also contain additional contract information. The additional contract information is used to record the related information of the contract and does not contain the user's identity information. Therefore, the additional contract information can be stored on the chain. The user’s signature disclosure key is associated with the user identity certificate, so the user identity certificate update management data also includes Contains user signature to reveal key update information. The user's other management data can include user master key update information and general management information, none of which will involve the user's identity.

使用者在註冊後,藉由註冊ID與管理位址主金鑰找到註冊管理資料,並由註冊ID與對稱加密主金鑰產生的對稱加密工作金鑰解密資料,從而獲取到使用者的管理資料組成的第一帳戶資料鏈。然後根據註冊管理資料中的交易資料初始產生參數、交易位址主金鑰以及使用者的簽名揭露金鑰獲取到使用者接收交易資料組成的第二帳戶資料鏈。根據上文可知,在使用者端網路查找接收交易位址,因為採用連接儲存,所以能獲取到接收交易位址作為輸入引用的交易,也即使用者的發送交易。所以藉由獲取接收交易的第二帳戶資料鏈,就能同時獲取到使用者所有的交易資料。再由交易資料裡的產生參數與機密交易主金鑰產生的工作金鑰解密盲化因數,從而獲取到使用者的帳戶資訊。 After registration, the user finds the registration management data by using the registration ID and the master key of the management address, and decrypts the data with the symmetric encryption working key generated by the registration ID and the master key of symmetric encryption, thereby obtaining the user's management data The first account data chain formed. Then, according to the initial generation parameters of the transaction data in the registration management data, the master key of the transaction address, and the user's signature disclosure key, the second account data chain composed of the user's received transaction data is obtained. According to the above, searching for the receiving transaction address on the user-side network, because of the use of connection storage, the transaction referenced by the receiving transaction address can be obtained as the input, that is, the user's sending transaction. Therefore, by obtaining the second account data chain that receives the transaction, all transaction data of the user can be obtained at the same time. Then decrypt the blinding factor from the generation parameters in the transaction data and the working key generated by the secret transaction master key to obtain the user's account information.

比如使用者Alice藉由身份證書在管理端註冊了ID為Alice的帳戶,管理端給帳戶Alice頒發了管理位址主金鑰、交易位址主金鑰、機密交易主金鑰和對稱加密主金鑰。其中帳號ID名稱為管理資料的預設初始產生參數。使用者藉由帳戶ID名稱Alice和管理地址主金鑰產生註冊管理地址,然後在使用者端網路查找該註冊管理位址,即能找到帳戶Alice的註冊管理資訊,並藉由帳戶ID名稱Alice和對稱加密主金鑰產生的對稱加密工作金鑰解密資料。註冊管理資訊中包含了使用者身份證書雜湊值,可以證明使用者的身份,還有產生參數用於產生下一個管理資料的位址和對稱加密工作金鑰,並包含接收交易位址的初始產生參數,用於產生該使用者的第一個接收交易位址。當給帳戶Alice轉帳後,使用者就能藉由上一個接收交易的產生參數、交易位址主金鑰和使用者 的簽名揭露金鑰產生接收交易位址,然後在使用者端網路查找該位址,即能找到交易資訊,並藉由交易資料中的產生參數和機密交易主金鑰產生的工作金鑰解密盲化因數,即能解密密文交易數額。如果Alice需要給Bob轉帳,則需要藉由上一個接收交易的產生參數、交易位址主金鑰和使用者的簽名私密金鑰產生解鎖腳本。 For example, user Alice registers an account with ID Alice on the management side by using the identity certificate, and the management side issues the management address master key, transaction address master key, confidential transaction master key, and symmetric encryption master key to account Alice. key. The account ID name is the default initial generation parameter of the management data. The user generates the registration management address with the account ID name Alice and the management address master key, and then searches the registration management address on the user-side network to find the registration management information of the account Alice, and uses the account ID name Alice Decrypt the data with the symmetric encryption working key generated by the symmetric encryption master key. The registration management information contains the hash value of the user identity certificate, which can prove the identity of the user, as well as the generation parameters used to generate the address of the next management data and the symmetric encryption working key, and include the initial generation of the receiving transaction address Parameter, used to generate the user's first receiving transaction address. After transferring money to the account Alice, the user can use the generation parameters of the last received transaction, the master key of the transaction address, and the user The signature reveals the key to generate the receiving transaction address, and then search the address on the user-side network to find the transaction information, and decrypt it with the working key generated by the generation parameters in the transaction data and the secret transaction master key The blinding factor is the amount of ciphertext transactions that can be decrypted. If Alice needs to transfer money to Bob, she needs to generate an unlocking script based on the generation parameters of the last received transaction, the master key of the transaction address, and the user's signature private key.

當使用者需要向第三方使用者證明某個位址的資產時,只需要提供中間值K與使用者的身份證書,以及盲化因數即可。第三方使用者可以驗證身份證書的有效性確認使用者身份,然後用K與使用者簽名揭露金鑰做橢圓曲線上的標量乘法運算得到新的揭露金鑰,驗證新揭露金鑰產生的位址等於該地址。因為橢圓曲線上的標量乘法運算具有單向性,因此無法找到一個K’與使用者的簽名揭露金鑰運算得到其他人的揭露金鑰位址(假設為量子計算破解出現之前,之後需要更新能抵抗量子計算破解的演算法,才能提供有效證明)。再藉由網路查詢該位址是否是未花費位址,最後使用盲化因數解密密文數額。而使用者提供的資訊裡都不包含相關金鑰資訊,第三方使用者無法根據所提供的資訊,獲取到使用者其它交易資料的隱私。上述查詢未花費位址,是藉由節點的連接儲存實現的。根據上文所述,如果該位址已被花費,則相關節點會返回輸入資料和輸出資料;未花費則只會返回輸入資料而沒有輸出資料。但該查詢方式依賴於相關節點,根據後文將可知,第三方使用者也可以藉由第二鏈系統查詢未花費位址的資訊。 When the user needs to prove the asset of a certain address to a third-party user, he only needs to provide the intermediate value K, the user's identity certificate, and the blinding factor. The third-party user can verify the validity of the identity certificate to confirm the user's identity, and then use K and the user's signature disclosure key to do a scalar multiplication on the elliptic curve to obtain a new disclosure key, and verify the address generated by the new disclosure key Equal to this address. Because the scalar multiplication operation on the elliptic curve is one-way, it is impossible to find a K'and the user’s signature disclosure key operation to obtain the disclosure key address of other people (assuming it is before the quantum computing cracking occurs, it needs to be updated afterwards. Only algorithms that resist quantum computing cracking can provide valid proofs). Then check whether the address is an unspent address through the Internet, and finally use the blinding factor to decrypt the ciphertext amount. The information provided by the user does not contain relevant key information, and third-party users cannot obtain the privacy of other transaction data of the user based on the information provided. The above query does not cost the address, which is realized by the connection storage of the node. According to the above, if the address has been spent, the relevant node will return input data and output data; if it is not spent, only input data will be returned without output data. However, the query method depends on the relevant node. As will be known later, third-party users can also query the information of unspent addresses through the second chain system.

系統發佈的公告資料都是明文,比如token發行或回收的公告資訊、金鑰演算法更新資訊、新交易規則發佈資訊以及系統版本更新資訊等。根 據公告類型的不同,每個公告都有公告類型和遞增的序號,根據公告首碼+公告類型+公告序號,組成公告的位址,任何使用者都可以藉由公告位址在網路中檢索並驗證公告。 The announcement information released by the system is in plain text, such as announcement information on token issuance or recovery, key algorithm update information, new transaction rule announcement information, and system version update information. root According to the different types of announcements, each announcement has an announcement type and an incremental serial number. According to the announcement prefix + announcement type + announcement serial number, the address of the announcement is formed. Any user can search the Internet by the announcement address. And verify the announcement.

所以本系統根據交易位址(包括起始交易資料和結束交易資料的特殊位址)的UTXO鏈是連接儲存的,可以驗證UTXO鏈是否正確;編號位址等順序遞增的位址並不是鏈式關係,所以是直接儲存的,可以用於驗證鏈的完整性以及隨機選取驗證;管理位址不是顯性的鏈式關係(具有使用者主金鑰才能獲取該使用者的第一帳戶資料鏈,管理位址形成隱性的鏈式關係),以及公告位址等,也是直接儲存的。直接儲存的key對應的value具有唯一性,檢索返回相應資料;連接儲存的key可能對應複數value資料,也即連接儲存的輸入、輸出資料,檢索返回相關的所有資料,包括附加驗證資料。並且使用者端藉由結構化對等網路,使用分散式雜湊儲存方式,每個使用者端只需要儲存部分帳本資料,就可以藉由位址檢索到對應的帳本資料,並且可以使用默克爾樹驗證該帳本資料是否包含在鏈的區塊中。 Therefore, the UTXO chain of the system based on the transaction address (including the special address of the initial transaction data and the special address of the end transaction data) is connected and stored, and it can verify whether the UTXO chain is correct; the addresses that increase sequentially such as the number address are not chained The relationship, so it is stored directly, can be used to verify the integrity of the chain and random selection verification; the management address is not an explicit chain relationship (only the user’s master key can obtain the user’s first account data chain, The management address forms an implicit chain relationship), and the announcement address, etc., are also stored directly. The value corresponding to the directly stored key is unique, and the retrieval returns the corresponding data; the key stored in the connection may correspond to the plural value data, that is, the input and output data stored in the connection, and the retrieval returns all relevant data, including additional verification data. And the client uses a structured peer-to-peer network to use distributed hash storage. Each client only needs to store part of the ledger data, and the corresponding ledger data can be retrieved by address, and can be used The Merkel tree verifies whether the ledger information is included in the block of the chain.

系統中也可以有產生鏈的獎勵。為滿足類公有鏈的條件,任何人都可以參與鏈的產生,並不需要在系統中註冊或授權,只需要自行產生一非對稱金鑰作為領取獎勵使用的金鑰,將其中的揭露金鑰按一定方式產生一個位址,該位址藉由首碼標識為領取位址,以區別系統內部使用的位址。當鏈產生物件(例如鏈產生節點)參與產生新的區塊頭時,則會包含該領取位址。當該區塊頭經過了n個確認後,管理端則會將獎勵資訊明文發佈到控制資料集中,獎勵資訊包括獎勵預設位址、獎勵數額和綁定的領取地址,獎勵預設網址類別 似token發行的預設地址,比如為C001。領取獎勵時需要在系統中註冊,然後產生一個領取獎勵交易資料,交易的輸入引用為該獎勵位址C001,輸出則為使用者的接收交易位址,所以該交易是在使用者的第二帳戶資料鏈上,並且需要使用領取位址的私密金鑰產生解鎖腳本,才能解鎖領取獎勵。所以獎勵分為先發佈後領取兩個步驟,其中發佈類似token發行,並且獎勵位址也是符合上文中連接儲存的特徵,只是輸入是控制資料集中的明文獎勵資訊。所以參與鏈的產生並不需要在系統中註冊或授權,但領取獎勵則需要在系統中註冊。鏈產生物件也可以將領取位址的金鑰授權給其他使用者,由其他使用者領取獎勵。 There can also be rewards for chain generation in the system. In order to meet the conditions of the public-like chain, anyone can participate in the generation of the chain, without registration or authorization in the system, only need to generate an asymmetric key as the key for receiving rewards, and expose the key in it. An address is generated in a certain way, and the address is identified by the first code as the receiving address to distinguish the addresses used inside the system. When a chain-generating object (such as a chain-generating node) participates in generating a new block header, the receiving address will be included. After n confirmations of the block header, the management terminal will publish the reward information in plaintext to the control data set. The reward information includes the reward preset address, the reward amount and the bound receiving address, and the reward preset URL category It is similar to the default address issued by the token, such as C001. When receiving rewards, you need to register in the system, and then generate a reward transaction data. The input of the transaction is referenced to the reward address C001, and the output is the user's receiving transaction address, so the transaction is in the user's second account It is on the data chain, and the unlocking script needs to be generated using the private key of the receiving address to unlock the reward. Therefore, the reward is divided into two steps: release first and then receive. Among them, release is similar to token issuance, and the reward address is also in line with the characteristics of the above connection storage, but the input is the clear text reward information in the control data set. Therefore, the participation chain does not need to be registered or authorized in the system, but to receive rewards, you need to register in the system. The chain-generated object can also authorize the key of the receiving address to other users, and the other users can receive rewards.

公有鏈是指任何人都可以讀取、發送交易和參與共識的區塊鏈系統,屬於完全去中心化的系統。類公有鏈是指不包括任何人都可以發送交易外,其餘都與公有鏈相同的系統,滿足交易中心化,帳本資料去中心化。下面以公有鏈系統闡述類公有鏈的系統架構。 The public chain refers to a blockchain system in which anyone can read, send transactions, and participate in consensus. It is a completely decentralized system. The quasi-public chain refers to a system that does not include anyone who can send transactions, and the rest are the same as the public chain, which satisfies the centralization of transactions and the decentralization of ledger data. The following describes the system architecture of the class public chain with the public chain system.

假設有一個公有鏈系統S,其中有一個使用者A,A發送的交易資料需滿足UTXO的規則,也即要有一個合法的輸入引用,並且不能夠有雙花存在。如果不考慮有複數輸入輸出的情況,則S鏈上A的交易資料將形成一條順序單連接的UTXO鏈。將A假設為一個私有鏈系統(S仍可以將A看作為一個使用者),並將A的交易資料替換為私有鏈系統產生的區塊資料,因為可將私有鏈看作為後一個區塊連接(花費)了前一個區塊的輸出,可以把私有鏈看作為UTXO鏈,所以A所產生的區塊資料連接上一個區塊資料,並且不能夠分叉(不能夠有雙花),也即可以把S鏈上A的UTXO鏈與A的私有鏈看作為等價的。當A的區塊資料上鏈時,S系統需要驗證A區塊資料的合法性,需順序連 接且不能分叉,還需要驗證區塊裡帳本資料的合法性。S系統是任何人都可以參與共識,讀取帳本資料以及驗證帳本資料,所以任何人也都可以驗證A的帳本資料。 Suppose there is a public chain system S, in which there is a user A. The transaction data sent by A needs to meet the rules of UTXO, that is, there must be a legal input reference, and no double spend can exist. If you don't consider the situation of multiple inputs and outputs, the transaction data of A on the S chain will form a UTXO chain with sequential single connections. Assume A is a private chain system (S can still regard A as a user), and replace A’s transaction data with block data generated by the private chain system, because the private chain can be regarded as the next block connection (Spent) the output of the previous block, the private chain can be regarded as a UTXO chain, so the block data generated by A is connected to a block data, and cannot be forked (no double spend), that is The UTXO chain of A on the S chain can be regarded as equivalent to the private chain of A. When the block data of A is on the chain, the S system needs to verify the legality of the block A data, and it needs to be connected in order If it is connected and cannot be forked, it is also necessary to verify the legality of the ledger data in the block. In the S system, anyone can participate in the consensus, read the ledger data and verify the ledger data, so anyone can also verify A's ledger data.

S系統除A的區塊資料外,還可以有擴展資料,但該擴展資料並不對使用者的管理資料和交易資料產生影響,也不會影響使用者的帳戶狀態,所以使用者端並不需要讀取和驗證該擴展資料。擴展資料的作用是使S能夠與A進行交互,使S能夠部分影響A資料的產生,所以該資料只有參與S共識的物件和A會讀取。比如A系統在控制資料中發佈token發行或回收的資訊之前,需要經過S進行投票;或者由S產生可證公平亂數,藉由該亂數影響A系統產生的資料,以解決A系統的部分公平性問題。使用者端C並不需要同步A私有鏈的區塊頭資料,而只需要同步S系統的區塊頭資料,所以A私有鏈的區塊頭資料也可以儲存在擴展資料中。如果系統中有不合法的資料產生,需要能夠對資料進行舉證時,也可以將相關的資料儲存在S系統的擴展資料中。如果系統使用了POA(Proof Of Activity,權威證明)等共識演算法,相關驗證者選舉和驗證者清單的資料也可以儲存在擴展資料中。 In addition to the block data of A, the S system can also have extended data, but the extended data does not affect the user's management data and transaction data, nor does it affect the user's account status, so the user side does not need Read and verify the extended data. The function of the extended data is to enable S to interact with A, so that S can partially affect the generation of A data, so the data can only be read by the objects participating in the S consensus. For example, A system needs to vote through S before releasing information about token issuance or recovery in the control data; or S generates a provably fair random number, and the random number affects the data generated by the A system to solve part of the A system Fairness issues. User C does not need to synchronize the block header data of the A private chain, but only the block header data of the S system, so the block header data of the A private chain can also be stored in the extended data. If there are illegal data generated in the system and it is necessary to be able to prove the data, the relevant data can also be stored in the extended data of the S system. If the system uses consensus algorithms such as POA (Proof Of Activity), the relevant verifier election and verifier list data can also be stored in the extended data.

A系統的使用者端C,發起的交易資料需要經過A再到S,C從S上獲取到交易資料。可以將上述系統S、系統A(私有鏈或聯盟鏈系統),以及A系統的使用者端C,看作一種類公有鏈應用系統。任何人都可以讀取、驗證交易,並參與共識。這裡是指讀取S鏈的資料,使用者端C也同步S鏈的區塊頭資料。根據上文可知,區塊頭的一致性能保證系統狀態的一致性,所有使用者端同步一致的S鏈區塊頭,就能保證所有的使用者端以及系統S的狀態都是一 致的。並且使用者端只需要從A系統獲取使用者主金鑰(金鑰不屬於鏈資料),就能在使用者端的結構化對等網路中(或S鏈中)自行檢索帳戶資料,而第三方使用者和監管者也可以在被授權金鑰後自行檢索,該過程並不依賴A系統或其它中心化的系統。所以類公有鏈應用系統是可驗證、可追溯、不可篡改的。但因為使用者的交易資料首先需要經過A才能在S中上鏈,所以類公有鏈應用系統並不解決交易的公平性問題,但對於通常的支付系統,比如線上購買音樂等,購買的順序並不會對結果有影響,只要合規的交易都能正常上鏈。並且有一類可延遲選擇優先的公平性問題,類公有鏈應用系統也是可以解決的。 The user terminal C of the A system needs to pass through A and then to S for the transaction data initiated, and C obtains the transaction data from S. The above-mentioned system S, system A (private chain or consortium chain system), and user end C of system A can be regarded as a kind of public chain application system. Anyone can read, verify transactions, and participate in consensus. This refers to reading the data of the S chain, and the user terminal C also synchronizes the block header data of the S chain. According to the above, the consistent performance of the block header guarantees the consistency of the system state, and the synchronization of all user-side S-chain block headers can ensure that the state of all user-side and system S is the same. Towards. And the user only needs to obtain the user's master key from the system A (the key does not belong to the chain data), and can retrieve the account data on its own in the structured peer-to-peer network (or S-chain) on the user side. Third-party users and regulators can also retrieve the keys by themselves after being authorized. This process does not rely on the A system or other centralized systems. Therefore, the public chain-like application system is verifiable, traceable, and non-tamperable. But because the user’s transaction data needs to go through A before it can be chained in S, the public chain-like application system does not solve the fairness of the transaction. However, for the usual payment systems, such as online music purchases, the order of purchase is different. It will not affect the results, as long as the compliant transactions can be normally connected to the chain. And there is a kind of fairness problem that can be delayed to choose priority, which can be solved by similar public chain application systems.

可延遲選擇優先與時間優先不同,是藉由產生可證公平亂數,然後根據該亂數決定優先權的方式,因為是任何人都能夠參與,所以是公平的。比如一個彩票系統,購買人支付一定的金額並預留一個亂數以及領獎位址,然後系統S藉由共識者物件產生一個可證公平亂數,比如可以使用先提交再披露的方案(Commit Reveal),並且為避免塊保留攻擊,可以終止提交後先經過若干個區塊確認,再延遲披露相關參數,確保產生的亂數事先無人知曉,並且無法被篡改。公佈該亂數後,根據每個人預留的亂數與該亂數的相關程度來判斷獲獎情況,再藉由領獎位址領取獎勵。系統A可以根據公佈的亂數,調用相關合約,給中獎的使用者頒發獎勵。該獎勵會綁定中獎的相關合約資訊,包括引用開獎資訊、引用使用者預留的亂數和領獎位址,以及中獎的明文數額,產生相應密文數額的獎勵到領獎位址,然後從發行彩票的實名機構帳戶中減去相應的明文數額,以保證系統內token總數額沒有發生變化。所以可延遲選擇優先, 是系統S產生一個可證公平亂數,延遲若干個區塊揭露,系統A藉由該亂數來決定優先權,以解決此類問題的公平性。 Delayable selection priority is different from time priority. It is a method of generating a provably fair random number and then determining the priority based on the random number. Because anyone can participate, it is fair. For example, in a lottery system, the buyer pays a certain amount and reserves a random number and a prize-receiving address. Then the system S uses the consensus object to generate a provably fair random number. For example, the scheme of submitting and then disclosing (Commit Reveal), and in order to avoid block retention attacks, you can terminate the submission and go through several block confirmations, and then delay the disclosure of related parameters to ensure that the random number generated is unknown in advance and cannot be tampered with. After the random number is announced, the award will be judged according to the degree of correlation between the random number reserved by each person and the random number, and then the reward will be received by the prize-receiving address. System A can call related contracts according to the announced random numbers to award rewards to users who have won the prize. The reward will be bound to the relevant contract information of the winning, including quoting the lottery information, quoting the random number reserved by the user and the prize receiving address, and the plaintext amount of the winning, and generating the corresponding ciphertext amount of the reward to the prize receiving address, and then The corresponding plaintext amount is subtracted from the real-name agency account that issued the lottery to ensure that the total amount of tokens in the system has not changed. So you can delay the selection priority, System S generates a provably fair random number and delays the disclosure of several blocks. System A uses the random number to determine the priority to solve the fairness of such problems.

下面介紹系統的架構,系統是由三層二鏈架構組成,如圖10所示。 The following describes the architecture of the system. The system is composed of a three-layer two-chain architecture, as shown in Figure 10.

第一層也是第一鏈系統,可以是私有鏈或聯盟鏈,屬於中心化的系統(例如上述系統A),可以採用私有網路以及PBFT(Practical Byzantine Fault Tolerance,實用拜占庭容錯演算法)等共識演算法,以滿足快速確認和高頻交易的需求,由具有實名的主體物件負責,是系統的管理者。包括以下管理的一種或多種:使用者和機構的管理、token的發行或回收、使用者主金鑰的頒發和系統公告等,主要藉由發佈控制資料實現系統管理,然後寫入第一鏈中。使用者端的交易資料藉由管理端驗證後寫入第一鏈中,第一鏈產生的區塊資料會立即向第二層廣播,也可以立即向第三層廣播。因為管理端具有所有的使用者主金鑰,所以管理端能產生系統的狀態樹,管理端查詢和修改使用者帳戶狀態等操作是藉由系統的狀態樹實現的,然後轉換為底層的UTXO交易資料或控制資料。管理端會驗證使用者端的交易資料,並且會驗證相關的使用者身份資訊。每個交易資料或控制資料都會被分別賦予順序遞增的唯一序號,連同交易資料或控制資料一起經過管理端的背書簽名。第一鏈的區塊頭資料中會包含目前的累計交易數量和累計控制數量,並且區塊頭資料會經過管理端的簽名。 The first layer is also the first chain system, which can be a private chain or a consortium chain. It belongs to a centralized system (such as the above system A). It can adopt a private network and PBFT (Practical Byzantine Fault Tolerance, practical Byzantine fault tolerance algorithm) and other consensus The algorithm to meet the needs of fast confirmation and high-frequency trading, is responsible for the main object with a real name, and is the administrator of the system. Including one or more of the following management: the management of users and institutions, the issuance or recovery of tokens, the issuance of user master keys and system announcements, etc. The system is managed mainly by issuing control data, and then written into the first chain . The transaction data on the user side is written into the first chain after verification by the management side, and the block data generated by the first chain will be broadcast to the second layer immediately, or it can be broadcast to the third layer immediately. Because the management terminal has all the user's master keys, the management terminal can generate the state tree of the system, and operations such as querying and modifying the user account status of the management terminal are realized by the state tree of the system, and then converted to the underlying UTXO transaction Data or control data. The management terminal will verify the transaction data on the client side, and will verify the relevant user identity information. Each transaction data or control data will be assigned a unique serial number that increases sequentially, and the transaction data or control data will be endorsed and signed by the management terminal together with the transaction data or control data. The block header data of the first chain will contain the current cumulative transaction quantity and cumulative control quantity, and the block header data will be signed by the management terminal.

第二層也是第二鏈系統,是類公有鏈(上述系統S),採用非結構化對等網路,比如可以使用gossip網路通訊協定,可以採用共識時間較長的演算法。第二層會對第一鏈的區塊資料進行驗證,但由於第二層並沒有使用者主金鑰,所以只會驗證交易資料,而不會驗證相關的使用者身份資訊,也不會產 生系統的狀態樹。根據上文可知,系統採用UTXO模型,並且任何人都可以在密文情況下驗證交易數額的正確性。第二鏈的區塊資料是由第一鏈的一或複數區塊資料順序組成,第一鏈上任一帳戶的狀態與第二鏈上該帳戶的狀態一致,所以系統是非同步同態的。因為第二鏈的區塊資料可能是由複數第一鏈的區塊資料順序組成,第一鏈區塊體的帳本資料需要重新順序組成第二鏈區塊體的帳本資料,包括交易資料和控制資料,然後分別重新產生默克爾樹的根雜湊值記錄在第二鏈的區塊頭中,第二鏈的區塊頭也會包含目前的累計交易數量和累計控制數量。因為第二鏈區塊體的帳本資料重新順序組成,所以也是滿足已知默克爾樹的葉子節點數量和節點序號,對應的認證路徑的高度和方向是固定且已知的。第二鏈還可以包含擴展資料,該資料可以是第二鏈系統自身的狀態資料,並不會修改使用者的狀態,第三層也不會同步和讀取該資料。比如該資料可以是第二鏈的投票過程或者是產生可證公平亂數的過程等,也可以是第二鏈投票選取鏈產生節點的過程,還可以是用於存證的資料,該擴展資料只會由第一層和第二層讀取,並且可能會對第一鏈或第二鏈後續產生的區塊產生影響。第一鏈的區塊頭資料也可記錄在第二鏈的擴展資料中,並不會影響使用者狀態,而是作為存證的資料。第二鏈產生的區塊資料會向第三層廣播,廣播的資料是第二鏈的區塊頭資料、交易資料和控制資料以及對應的認證路徑資料等。 The second layer is also a second chain system, which is similar to a public chain (system S mentioned above), and uses an unstructured peer-to-peer network. For example, gossip network communication protocol can be used, and algorithms with a longer consensus time can be used. The second layer will verify the block data of the first chain, but because the second layer does not have a user master key, it will only verify transaction data, not related user identity information, and will not produce The state tree of the health system. According to the above, the system adopts the UTXO model, and anyone can verify the correctness of the transaction amount in ciphertext. The block data of the second chain is composed of one or more block data sequences of the first chain. The state of any account on the first chain is consistent with the state of the account on the second chain, so the system is asynchronous and homomorphic. Because the block data of the second chain may be composed of plural block data of the first chain, the ledger data of the first chain block body needs to be re-ordered to form the ledger data of the second chain block body, including transaction data And control data, and then separately regenerate the root hash value of the Merkel tree and record it in the block header of the second chain. The block header of the second chain will also contain the current cumulative transaction quantity and cumulative control quantity. Because the ledger data of the second chain block body is re-composed in order, it also satisfies the number of leaf nodes and node serial numbers of the known Merkel tree, and the height and direction of the corresponding authentication path are fixed and known. The second chain can also contain extended data, which can be the state data of the second chain system itself, and will not modify the user's state, and the third layer will not synchronize and read the data. For example, the data can be the voting process of the second chain or the process of generating provably fair random numbers, etc., it can also be the process of the second chain voting to select the chain to generate nodes, or it can be the data used for evidence, the extended data It will only be read by the first and second layers, and may affect the subsequent blocks generated by the first chain or the second chain. The block header data of the first chain can also be recorded in the extended data of the second chain, which will not affect the user's status, but is used as evidence data. The block data generated by the second chain will be broadcast to the third layer. The broadcast data are the block header data, transaction data and control data of the second chain, and the corresponding authentication path data.

第三層是使用者端系統,採用結構化對等網路,比如可以使用kademlia網路通訊協定,藉由分散式雜湊表(DHT)檢索資料,每個使用者端節點(以下簡稱節點)只需要儲存部分帳本資料以及對應的認證路徑。根據上文可知,第三層藉由等價驗證,每個節點驗證自己的部分帳本資料,即可等價驗 證全部的帳本資料,再結合每個節點獨立隨機選取帳本資料進行驗證,避免某個位址只被特定節點驗證,增加了安全性。第三層的每個節點都會同步第二層的區塊頭資料,所以第三層與第二層系統狀態是一致性的。使用者端、第三方使用者和監管者的讀取操作可以是在第二層或第三層,使用者端交易資料的寫入操作則是藉由管理端在第一層上鏈,所以系統是讀寫分離的。並且第一鏈可以立即向第三層廣播,所以使用者端的交易資料是能及時獲取的,但此時的交易資料是沒有上第二鏈的,只是上了第一鏈。如果是小額交易,使用者端可以立即信任管理端發佈的資料;但如果交易數額較大,使用者端可以等待一段時間,等該交易資料在第二鏈上鏈,並經過n個區塊確認,就可以認為該交易資料不可逆且無法被篡改了。 The third layer is the user-side system, which uses a structured peer-to-peer network. For example, the kademlia network protocol can be used to retrieve data through a distributed hash table (DHT). Each user-side node (hereinafter referred to as node) only Need to store part of the ledger data and the corresponding certification path. According to the above, the third layer uses equivalent verification, and each node verifies part of its own account data, which can be equivalently verified. Prove all the book data, and then combine each node to independently select the book data for verification, avoiding a certain address to be verified by a specific node, and increasing security. Each node of the third layer will synchronize the block header data of the second layer, so the third layer and the second layer system state are consistent. The read operations of the user, third-party users, and regulators can be on the second or third layer, and the write operations of transaction data on the user end are linked to the first layer by the management end, so the system It is separated from reading and writing. And the first chain can broadcast to the third layer immediately, so the transaction data on the user side can be obtained in time, but the transaction data at this time is not on the second chain, but on the first chain. If it is a small transaction, the user side can immediately trust the data released by the management side; but if the transaction amount is large, the user side can wait for a period of time to wait for the transaction data to be on the second chain and be confirmed by n blocks , It can be considered that the transaction information is irreversible and cannot be tampered with.

由於第二層系統和第三層系統狀態是一致性的,並且第三層藉由等價驗證對全部的帳本資料進行了驗證,所以第二層系統可以選擇只驗證第一鏈的區塊頭資料、帳本資料的默克爾樹和帳本資料的管理端簽名,然後將資料上鏈產生第二鏈的區塊資料,並向第三層廣播,由第三層驗證UTXO鏈的連接是否正確,以及驗證每個交易資料裡的使用者端解鎖簽名和交易數額是否正確。因為第三層的每個節點只需要驗證少量帳本資料,所以即使使用者端使用多重簽名的方式,並且需要驗證密文交易數額是否正確,每個節點的負擔都較少,即使是移動設備也能夠完成驗證。而第二層驗證管理端的簽名,還可以使用最佳化的批量驗證單個簽名者產生的複數簽名,大大降低了參與第二層共識所需要驗證的計算量。並且根據默克爾樹的特點,第二層的鏈產生節點可以將第一層產生的帳本資料,順序分散到複數實體設備上,將這些實體設備上的帳 本資料聯合產生默克爾樹的根雜湊值,也即可以藉由複數實體設備完成一個含有非常多帳本資料的巨大區塊體資料的產生和驗證,並且儲存也可以分散到複數實體設備上。不同於第三層使用分散式雜湊表儲存的方式,該方式屬於線性劃分儲存,也即把一個巨大區塊體資料,根據默克爾樹的特點,某個父節點對應的葉子節點數是2的冪次方,所以把資料按2的冪次方個線性劃分到複數實體設備上進行儲存,然後可以聯合產生對應的默克爾樹根雜湊值,並且還可以產生帳本資料對應的認證路徑。所以第二層的鏈產生節點,只需要複數普通的實體設備和存放裝置,並且驗證的計算量也可控,實際參與共識產生區塊頭的設備也只需要普通設備即可,大大降低了參與第二層共識的門檻。 Since the state of the second-tier system and the third-tier system are consistent, and the third-tier verified all the ledger data by equivalent verification, the second-tier system can choose to verify only the block header of the first chain The data, the Merkel tree of the ledger data and the management end of the ledger data are signed, and then the data is uploaded to the chain to generate the block data of the second chain, and broadcast to the third layer, and the third layer verifies whether the connection of the UTXO chain is correct , And verify that the user-side unlocking signature in each transaction data and the transaction amount are correct. Because each node in the third layer only needs to verify a small amount of book data, even if the user side uses multi-signature and needs to verify whether the ciphertext transaction amount is correct, each node has less burden, even if it is a mobile device It can also be verified. The second layer verifies the signature of the management end, and can also use the optimized batch verification of the plural signatures generated by a single signer, which greatly reduces the amount of verification required to participate in the second layer consensus. And according to the characteristics of the Merkel tree, the chain generation nodes of the second layer can sequentially distribute the ledger data generated by the first layer to a plurality of physical devices, and transfer the accounts on these physical devices. This data is combined to generate the root hash value of the Merkel tree, that is, the generation and verification of a huge block data containing a lot of book data can be completed by multiple physical devices, and the storage can also be distributed to multiple physical devices. Different from the third layer using distributed hash table storage, this method is a linear partition storage, that is, a huge block of data, according to the characteristics of the Merkel tree, the number of leaf nodes corresponding to a parent node is 2. Power, so the data is linearly divided into a complex number of physical devices according to the power of 2 for storage, and then the corresponding Merkel tree root hash value can be jointly generated, and the authentication path corresponding to the ledger data can also be generated. Therefore, the chain generation node of the second layer only needs a plurality of ordinary physical equipment and storage devices, and the amount of verification calculation is also controllable. The equipment that actually participates in the consensus generation block header also needs ordinary equipment, which greatly reduces the participation in the first. The threshold of the second-tier consensus.

上述方式使用了先產生後驗證的方式,也即先產生第二鏈,再由第三層進行驗證的方式,因為實際的帳本資料是由第一層系統上鏈的,第二層會驗證默克爾樹和管理端的簽名,並不會修改帳本資料。所以如果第三層驗證帳本資料錯誤,並且經過管理端的簽名(後面還需第二層驗證是否為第一鏈的資料),責任人是第一層系統,並且第一層是具有實名的管理端,可由監管者進行相應處理。因為第一層是中心化的系統,如果產生了非法的帳本資料,第二層和第三層也是無法阻止的,但可以立即驗證出來,然後採取相應的措施。比如第三層將非法的帳本資料由第二層寫入類公有鏈擴展資料的存證資料中,而第一層系統也是無法修改第二鏈的資料,並且該資料是揭露的任何人都可以訪問,就可以由監管者進行相應處理。所以該系統雖然無法保證上鏈片段所處時間段內的資料一定正確(因為該資料由中心化產生),但卻可以保證錯誤的資料無所遁形(由第二層或第三層驗證)。由第二鏈上鏈且經過n個區塊確認 的資料是正確的,並且是無法篡改的,所以是可信任的。而第一層系統也是採用私有鏈或聯盟鏈,減少和防止資料出錯的可能性。並且根據上述可知,不允許第一鏈產生分叉,第一鏈可以採用PBFT等共識演算法防止分叉。如果第一鏈產生分叉,第二層系統能檢測出來並寫入類公有鏈擴展資料的存證資料中,由監管者進行相應處理。 The above method uses the first generation and then verification method, that is, the second chain is generated first, and then the third layer is verified, because the actual ledger data is chained by the first layer system, and the second layer will verify The signature of the Merkel tree and the management side does not modify the ledger information. Therefore, if the third-level verification ledger data is wrong and it is signed by the management end (the second-level verification is needed to verify whether it is the data of the first chain), the person in charge is the first-level system, and the first-level is the management with real names At the end, the supervisor can deal with it accordingly. Because the first layer is a centralized system, if illegal account information is generated, the second and third layers cannot be prevented, but they can be verified immediately, and then corresponding measures can be taken. For example, the third layer writes illegal account data from the second layer into the certificate data of the extended data of the public chain, and the first layer system cannot modify the data of the second chain, and the information is exposed to anyone. If it can be accessed, the supervisor can handle it accordingly. Therefore, although the system cannot guarantee that the data in the time period of the upper chain segment must be correct (because the data is generated by the centralization), it can guarantee that the wrong data is not hidden (verified by the second or third layer) . On-chain by the second chain and confirmed by n blocks The information is correct and cannot be tampered with, so it is trustworthy. The first-tier system also uses private chains or alliance chains to reduce and prevent the possibility of data errors. And based on the above, the first chain is not allowed to fork, and the first chain can use consensus algorithms such as PBFT to prevent forks. If the first chain has a fork, the second-level system can detect it and write it into the certificate data of the extended data of the public chain, and the supervisor will deal with it accordingly.

第一層的管理端系統也可以藉由連接儲存的方式最佳化處理需要驗證和儲存的海量資料。比如可以使用一致性雜湊演算法,根據交易位址和交易ID,將交易資料分散到複數共識組中,然後再藉由屬性分組的PBFT(實用拜占庭容錯演算法)共識演算法,產生第一鏈的區塊頭資料。 The first-tier management system can also optimize the processing of massive amounts of data that need to be verified and stored by connecting to storage. For example, a consensus hash algorithm can be used to disperse transaction data into plural consensus groups based on transaction addresses and transaction IDs, and then use the attribute grouping PBFT (Practical Byzantine Fault Tolerance Algorithm) consensus algorithm to generate the first chain The header data of the block.

PBFT演算法是一種狀態機副本複製演算法。將所有的副本組成的集合的數量設為N,假設失效的副本數量是F,則需要N>3F。每個節點具有一個狀態機副本,所以PBFT演算法可以容忍小於N/3個無效或者惡意的節點。但PBFT的缺點是具有O(N^2)的消息複雜度,所以通常N不會很大。 The PBFT algorithm is a state machine replica replication algorithm. Set the number of sets composed of all copies to N, assuming that the number of invalid copies is F, then N>3F is required. Each node has a copy of the state machine, so the PBFT algorithm can tolerate less than N/3 invalid or malicious nodes. But the disadvantage of PBFT is that it has O(N^2) message complexity, so usually N is not very large.

屬性分組的PBFT共識演算法,是使用一致性雜湊演算法,根據資料的屬性,將資料分散到複數共識組中,只需要在其中的某一組中進行狀態機副本複製。比如將N分為M個共識組,每個共識組中有n個節點,也即N=M*n,並將這些共識組設為1到M序號。 The attribute grouping PBFT consensus algorithm uses a consistent hash algorithm. According to the attributes of the data, the data is distributed to the plural consensus groups, and only a copy of the state machine is required in one of the groups. For example, divide N into M consensus groups, and each consensus group has n nodes, that is, N=M*n, and set these consensus groups as serial numbers from 1 to M.

產生區塊之前,使用一致性雜湊演算法將交易資料的每個輸入位址都映射到1到M中的一個,將交易ID也即交易資料的雜湊值也映射到1到M中的一個,然後將交易資料儲存到所映射的共識組中,根據上文可知,輸入位址對應的是連接儲存的輸出資料。產生區塊之後,也即資料上鏈後,再用同樣 方式將交易資料的每個輸出位址都映射到1到M中的一個,並且包括上鏈的控制資料中的token發行位址和獎勵位址,然後將相應的上鏈資料儲存在所映射的共識組中。根據上文可知,輸出位址對應的是連接儲存的輸入資料,所以共識組儲存的連接儲存的輸入資料是上鏈後的資料,共識組可以藉由默克爾樹驗證該資料。 Before generating the block, use the consistent hash algorithm to map each input address of the transaction data to one of 1 to M, and map the transaction ID, that is, the hash value of the transaction data, to one of 1 to M. Then store the transaction data in the mapped consensus group. According to the above, the input address corresponds to the output data stored in the connection. After the block is generated, that is, after the data is on the chain, use the same The method maps each output address of the transaction data to one of 1 to M, and includes the token issuance address and reward address in the control data of the chain, and then stores the corresponding chain data in the mapped In the consensus group. According to the above, the output address corresponds to the input data stored in the connection, so the input data stored in the connection storage in the consensus group is the data after the chain is on the chain, and the consensus group can verify the data through the Merkel tree.

如果共識組儲存對應的是輸入資料,則儲存即可;如果共識組儲存對應的是輸出資料,則需要查找對應的輸入資料,並且驗證輸入輸出的正確性,然後形成連接儲存;如果共識組儲存對應的是交易ID,則需要根據交易資料所有的輸入引用位址,向位址對應的共識組發起PBFT共識驗證。可以知道這些位址對應的共識組如果驗證通過,則會形成連接儲存,返回驗證成功,如果驗證未藉由則返回驗證失敗。根據上文可知,當每個位址返回驗證成功的數量都大於n*2/3時,則該交易資料驗證通過,可以上鏈。所以交易資料是由交易ID對應的共識組發起驗證和上鏈的,並且因為交易ID是唯一的,所以不會重複上鏈。為最佳化驗證交易數額所需的附加驗證資料,交易數額可以由交易ID對應的共識組驗證,輸入引用位址對應的共識組只需要驗證連接是否正確,以及使用者端解鎖簽名是否有效,並返回交易數額資料,並不需要附加驗證資料。 If the consensus group storage corresponds to input data, just store it; if the consensus group storage corresponds to output data, you need to find the corresponding input data, and verify the correctness of the input and output, and then form a connection storage; if the consensus group stores Corresponding to the transaction ID, you need to initiate PBFT consensus verification to the consensus group corresponding to the address based on all the input reference addresses of the transaction data. It can be known that if the consensus group corresponding to these addresses passes the verification, it will form a connection storage and return the verification success. If the verification fails, the verification failure will be returned. According to the above, when the number of successful verifications returned by each address is greater than n*2/3, the transaction data is verified and can be uploaded to the chain. Therefore, the transaction data is verified and chained by the consensus group corresponding to the transaction ID, and because the transaction ID is unique, it will not be repeated on the chain. In order to optimize the additional verification data required to verify the transaction amount, the transaction amount can be verified by the consensus group corresponding to the transaction ID. Entering the consensus group corresponding to the reference address only needs to verify whether the connection is correct and whether the unlocking signature on the user side is valid. And return the transaction amount data, without additional verification data.

一時間片段後,每個共識組獨立發起PBFT共識上鏈,由每個共識組分別獨立共識出自己的上鏈集合的交易資料以及順序。然後由1號共識組將自己的上鏈集合數量加上累計數量,向2號共識組發出累加後的數量消息;然後由2號共識組將自己的上鏈集合數量加上累計數量,向3號共識組發出累加後的數量消息;直到最後的共識組M,M再向1號共識組發出累加後的數量消息; 當1號共識組收到累計數量消息後,則完成一次迴圈作業,將迴圈內的交易資料聯合上鏈。每個共識組根據累計數量計算出起始序號,然後將上鏈集合的交易資料以及對應順序賦予遞增的序號並請求簽名(例如n個節點,則需要大於n*2/3的請求才給予簽名),最後將簽名後的資料聯合產生默克爾樹的根雜湊值。因為是獨立共識上鏈,所以每個共識組可以接收到數量消息後再進行共識上鏈,藉由消息傳遞完成迴圈作業。共識組可以獨立共識上鏈的原因,是因為連接儲存的輸入資料是上鏈後的資料,所以同一時間片段內,不會出現兩個之間相引用的合法交易。 After a period of time, each consensus group independently initiates the PBFT consensus on the chain, and each consensus group independently agrees on its own set of transaction data and order on the chain. Then the consensus group No. 1 adds its own on-chain collection quantity to the cumulative quantity, and sends the cumulative quantity message to the consensus group No. 2; then, the consensus group No. 2 adds its own on-chain collection quantity to the cumulative quantity to 3 Consensus group No. sends an accumulated quantity message; until the last consensus group M, M sends an accumulated quantity message to consensus group No. 1; When consensus group No. 1 receives the cumulative quantity message, it completes a loop operation and combines the transaction data in the loop on the chain. Each consensus group calculates the starting sequence number based on the cumulative number, and then assigns the transaction data and the corresponding order of the on-chain collection to an increasing sequence number and requests a signature (for example, if there are n nodes, a request greater than n*2/3 is required to give a signature ), and finally combine the signed data to generate the root hash value of the Merkel tree. Because it is an independent consensus on the chain, each consensus group can receive the number of messages before proceeding to the consensus on the chain, and complete the loop operation through message transmission. The reason why the consensus group can independently agree on the chain is because the input data stored in the connection is the data after the chain, so in the same time segment, there will be no legal transactions quoted between the two.

因此可知,屬性分組的PBFT共識演算法消息複雜度是O(n^2),可以容忍小於n/3個無效或者惡意的節點。但由於是有M個分組,交易資料也是分散到M個分組中,所以最後能處理的交易資料的數量就能得到較大提高。 Therefore, it can be seen that the message complexity of the attribute grouping PBFT consensus algorithm is O(n^2), which can tolerate less than n/3 invalid or malicious nodes. However, since there are M groups, the transaction data is also scattered into M groups, so the final amount of transaction data that can be processed can be greatly increased.

系統的控制資料不是UTXO鏈,產生時即可賦予遞增的序號並進行簽名,然後根據序號線性劃分儲存和驗證,也可以聯合產生控制資料的默克爾樹根雜湊值。最後根據交易資料的根雜湊值和控制資料的根雜湊值,以及相應的累計數量產生第一鏈的區塊頭資料。所以第一鏈的管理端系統是可以藉由連接儲存的方式最佳化處理海量的資料。 The control data of the system is not a UTXO chain. When it is generated, an incremental serial number can be assigned and signed, and then stored and verified linearly according to the serial number. The Merkel root hash value of the control data can also be jointly generated. Finally, the block header data of the first chain is generated according to the root hash value of the transaction data and the root hash value of the control data, and the corresponding cumulative quantity. Therefore, the management system of the first chain can optimally process massive amounts of data by connecting to storage.

根據上述可知,第三層使用者端儲存的資料,包括區塊頭資料、帳本資料以及對應的認證路徑資料。帳本資料實際是由第一層的管理端產生,區塊頭資料是由第二層共識產生,並且區塊頭資料也能映射區塊體資料(帳本資料)的一致性,而且區塊頭資料還能確認對應的認證路徑,所以區塊頭資料的正確同步對於系統的正確性非常重要。但第三層使用者端並不參與第二層的 共識,如果第二層的類公有鏈系統採用POA(權威證明)等共識演算法,或者是抵押懲罰的共識演算法,需要第三層使用者端能夠正確同步共識者列表,這會增加使用者端的負擔。因為第二鏈是在經過驗證第一鏈區塊頭的基礎上產生的,所以第三層使用者端可以在信任第一鏈區塊頭的基礎上對第二鏈的區塊頭進行驗證。以採用抵押懲罰的共識演算法為例進行說明。第二層的共識物件可以是匿名的,可以使用第三方公有鏈(除第一鏈系統和第二鏈系統之外的第三方公有鏈系統)的抵押資產的方式參與共識,如果產生了非法的資料,則會扣除所抵押的資產,下面進行說明。 According to the above, the data stored on the third-tier user terminal includes block header data, ledger data, and corresponding authentication path data. The ledger data is actually generated by the first-level management terminal, and the block header data is generated by the second-level consensus, and the block header data can also map the consistency of the block body data (ledger data), and the block header data is also The corresponding authentication path can be confirmed, so the correct synchronization of the block header data is very important to the correctness of the system. But the third-tier user terminal does not participate in the second-tier Consensus, if the second-tier public chain system adopts consensus algorithms such as POA (Proof of Authority), or a consensus algorithm for mortgage punishment, the third-tier user side needs to be able to correctly synchronize the consensus list, which will increase the user side burden. Because the second chain is generated on the basis of verifying the block header of the first chain, the third-tier user side can verify the block header of the second chain on the basis of trusting the block header of the first chain. Take the consensus algorithm using mortgage penalty as an example. Consensus objects on the second layer can be anonymous, and can participate in the consensus by using third-party public chains (third-party public chain systems other than the first chain system and the second chain system) to participate in the consensus. Data will be deducted from the mortgaged assets, which will be explained below.

首先第一層的管理端需要在第三方的公有鏈上建立一個智慧合約。該合約的功能是任何使用者均可上傳共識公開金鑰(共識公開金鑰是由使用者自己產生的一非對稱金鑰,可用於參與第二層的共識),一個共識公開金鑰需抵押第三方公有鏈上一定數額的token,所抵押的token與該上傳的共識公開金鑰關聯,合約會將目前上傳的所有共識公開金鑰組成的共識公開金鑰集合映射為一個值,該共識公開金鑰集合和映射方法都是揭露的,能很容易找到集合中元素存在集合中的證明,但很難找到一個不在集合中元素存在集合中的證明,比如可以使用默克爾樹證明或累加器證明。其中一個密碼學上的累加器是一個單向的隸屬函數,它可以用於識別一個候選是否為一個集合的成員,且不會在過程中暴露集合中的成員。第一鏈產生的區塊頭中包含目前該共識公開金鑰集合映射的值,還可以包含共識公開金鑰集合中元素的數量,並且一個金鑰代表一個固定的權益,即為一金鑰一票。第二鏈產生的區塊頭資料,會連同第一鏈對應的最後一個區塊頭資料對第三層廣播。第二鏈區塊頭包含目前所有的 累計交易數量和累計控制數量,以及對應的共識公開金鑰,第二鏈區塊頭資料經過共識私密金鑰的簽名。第三層的使用者端同步第二鏈的區塊頭資料,可根據共識公開金鑰驗證該共識私密金鑰的簽名,驗證第一鏈區塊頭的管理端簽名,驗證第一鏈區塊頭的累計交易數量和累計控制數量與第二鏈區塊頭的累計交易數量和累計控制數量是否相等,相等則說明數量正確並且第一鏈區塊頭是第二鏈區塊頭產生時間片段內的最後一個區塊頭資料,所以第一鏈區塊頭中的共識公開金鑰集合的映射值是該時間片段內最新的。使用者端還可以根據第一鏈區塊頭中的共識公開金鑰集合的映射值採用默克爾樹證明或累加器證明,驗證第二鏈區塊頭中的共識公開金鑰是否有效,驗證藉由則說明第二鏈區塊頭有效,可以加入候選主鏈的區塊頭。這樣使用者端就能藉由信任第一鏈區塊頭的基礎上對第二鏈的區塊頭進行驗證,而無需同步第二鏈的共識者列表,並且可以藉由第一鏈區塊頭的累計交易數量和累計控制數量驗證第二鏈區塊頭的累計交易數量和累計控制數量是否正確,以保證能正確同步第二鏈的區塊頭資料。 First, the management side of the first layer needs to establish a smart contract on the third-party public chain. The function of the contract is that any user can upload the consensus public key (the consensus public key is an asymmetric key generated by the user and can be used to participate in the second-level consensus), and a consensus public key needs to be mortgaged A certain amount of tokens on the third-party public chain. The pledged tokens are associated with the uploaded consensus public key. The contract will map the consensus public key set consisting of all the currently uploaded consensus public keys to a value, and the consensus will be public. The key set and the mapping method are both exposed. It is easy to find the proof that the elements in the set exist in the set, but it is difficult to find a proof that the elements in the set do not exist in the set. For example, you can use Merkel tree proof or accumulator proof . One of the cryptographic accumulators is a one-way membership function, which can be used to identify whether a candidate is a member of a set without exposing the members of the set in the process. The block header generated by the first chain contains the value of the current consensus public key set mapping, and can also include the number of elements in the consensus public key set, and a key represents a fixed equity, that is, one key, one vote . The block header data generated by the second chain will be broadcast to the third layer along with the last block header data corresponding to the first chain. The second chain block header contains all the current The accumulated transaction quantity and accumulated control quantity, as well as the corresponding consensus public key, the second chain block header data are signed by the consensus private key. The user side of the third layer synchronizes the block header data of the second chain, and can verify the signature of the consensus private key according to the consensus public key, verify the signature of the management end of the first chain block head, and verify the accumulation of the first chain block head Whether the transaction quantity and cumulative control quantity are equal to the cumulative transaction quantity and cumulative control quantity of the second chain block header, if they are equal, the quantity is correct and the first chain block header is the last block header data in the second chain block header generation time segment , So the mapping value of the consensus public key set in the first chain block header is the latest in the time segment. The user can also use Merkel tree proof or accumulator proof according to the mapping value of the consensus public key set in the first chain block header to verify whether the consensus public key in the second chain block header is valid. It shows that the block header of the second chain is valid and can be added to the block header of the candidate main chain. In this way, the user can verify the block header of the second chain by trusting the block header of the first chain, without synchronizing the consensus list of the second chain, and can use the accumulated transactions of the block header of the first chain Quantity and cumulative control quantity verify whether the cumulative transaction quantity and cumulative control quantity of the second chain block header are correct to ensure that the block header data of the second chain can be correctly synchronized.

第二層的類公有鏈系統,也可以採用POA等共識演算法,這樣可以不依賴第三方的公有鏈,但需要參與的共識者物件提供身份證明。第一鏈區塊頭也可以包含POA共識演算法的驗證者清單的映射值和驗證者的數量,以方便使用者端能正確同步第二鏈的區塊頭資料。 The second-tier public chain-like system can also use consensus algorithms such as POA, so that it does not rely on third-party public chains, but the participating consensus objects need to provide identity certification. The first chain block header can also include the mapping value of the validator list of the POA consensus algorithm and the number of validators, so that the user can correctly synchronize the block header data of the second chain.

如果第一鏈區塊頭沒有按照規則包含正確的共識者揭露金鑰集合的映射值,因為該共識者揭露金鑰集合的映射值是在第三方公有鏈的合約中或第二層類揭露金鑰鏈的擴展資料中儲存的,都是揭露且無法被篡改的。第二層 系統可以將第一鏈的不合規區塊頭資料寫入類公有鏈擴展資料的存證資料中,由監管者進行相應處理。 If the block header of the first chain does not contain the correct mapping value of the consensus person's disclosure key set according to the rules, because the consensus person's disclosure key set's mapping value is in the third-party public chain contract or the second-level type of disclosure key The extended data stored in the chain are all exposed and cannot be tampered with. Second floor The system can write the non-compliant block header data of the first chain into the certificate data of the extended data of the public chain, and the supervisor will deal with it accordingly.

所以本系統分別使用區塊鏈實現帳本資料可溯源、不可篡改,UTXO鏈實現交易資料的正確連接,確保系統的token總量是一定的,帳戶資料鏈實現使用者帳戶資料的隱私檢索。並且藉由等價驗證,使使用者端藉由結構化對等網路儲存和驗證部分帳本資料,即可等價驗證全部帳本資料的正確性。 Therefore, this system uses the blockchain to realize the traceability and non-tampering of the ledger data. The UTXO chain realizes the correct connection of transaction data to ensure that the total amount of tokens in the system is fixed. The account data chain realizes the privacy retrieval of user account data. And through equivalent verification, the client can store and verify part of the book data through a structured peer-to-peer network, and the correctness of all the book data can be equivalently verified.

本揭露一示例性實施例還提供一種電腦儲存媒體,該電腦儲存媒體儲存有電腦程式;該電腦程式被執行後,能夠實現前述一或複數示例性實施例提供的方法,例如,執行如圖1、圖3、圖5及圖7所示方法中的一個或複數個。該電腦儲存媒體包括在設定為儲存資訊(諸如電腦可讀指令、資料結構、程式模組或其他資料)的任何方法或技術中實施的揮發性和非揮發性、可移和非可移媒體。電腦儲存媒體包括但不限於RAM、ROM、EEPROM、快閃記憶體或其他記憶體技術、CD-ROM、數位多功能光碟(DVD)或其他光碟儲存裝置、磁盒、磁帶、磁片儲存裝置或其他磁儲存裝置、或者可以設定為儲存期望的資訊並且可以被電腦訪問的任何其他的媒體。 An exemplary embodiment of the present disclosure further provides a computer storage medium that stores a computer program; after the computer program is executed, the method provided by one or more of the foregoing exemplary embodiments can be implemented, for example, as shown in FIG. 1 , One or more of the methods shown in Figure 3, Figure 5 and Figure 7. The computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology configured to store information (such as computer readable instructions, data structures, program modules, or other data). Computer storage media include but are not limited to RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage devices, magnetic cartridges, magnetic tapes, magnetic disk storage devices or Other magnetic storage devices, or any other media that can be configured to store desired information and that can be accessed by a computer.

本揭露一示例性實施例還提供了一種電腦裝置(或稱電腦設備)。該電腦設備可包括處理器、記憶體及儲存在該記憶體上並可在該處理器上運行的電腦程式,該處理器執行該電腦程式時實現本揭露中資料儲存裝置或資料驗證裝置所執行的操作。 An exemplary embodiment of the present disclosure also provides a computer device (or computer equipment). The computer equipment may include a processor, a memory, and a computer program stored on the memory and running on the processor. When the processor executes the computer program, the execution of the data storage device or the data verification device in this disclosure is implemented Operation.

如圖11所示,在一個示例中,電腦設備(節點)可包括:處理器91、記憶體92、匯流排系統93和收發器94,其中,該處理器91、該記憶體92 和該收發器94藉由該匯流排系統93相連,該記憶體92設定為儲存指令,該處理器91設定為執行該記憶體92儲存的指令,以控制該收發器94發送信號。例如上述資料儲存裝置中第二儲存模組的操作可由收發器在處理器的控制下執行,第一驗證模組的操作可由處理器執行。 As shown in FIG. 11, in an example, a computer device (node) may include: a processor 91, a memory 92, a bus system 93, and a transceiver 94, where the processor 91, the memory 92 The transceiver 94 is connected through the bus system 93, the memory 92 is set to store instructions, and the processor 91 is set to execute the instructions stored in the memory 92 to control the transceiver 94 to send signals. For example, the operations of the second storage module in the aforementioned data storage device can be executed by the transceiver under the control of the processor, and the operations of the first verification module can be executed by the processor.

應理解,處理器91可以是中央處理單元(Central Processing Unit,簡稱為“CPU”),處理器91還可以是其他通用處理器、數位訊號處理器(DSP)、專用積體電路(ASIC)、現場可程式閘陣列(FPGA)或者其他可程式邏輯裝置、離散閘或者電晶體邏輯裝置、分立硬體元件等。通用處理器可以是微處理器或者該處理器也可以是任何常規的處理器等。 It should be understood that the processor 91 may be a central processing unit (Central Processing Unit, referred to as "CPU"), and the processor 91 may also be other general-purpose processors, digital signal processors (DSP), special integrated circuits (ASIC), Field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.

記憶體92可以包括唯讀記憶體和隨機存取記憶體,並向處理器91提供指令和資料。記憶體92的一部分還可以包括非揮發性隨機存取記憶體。例如,記憶體92還可以存放裝置類型的資訊。 The memory 92 may include a read-only memory and a random access memory, and provides instructions and data to the processor 91. A part of the memory 92 may also include a non-volatile random access memory. For example, the memory 92 can also store device type information.

匯流排系統93除包括資料匯流排之外,還可以包括電源匯流排、控制匯流排和狀態信號匯流排等。但是為了清楚說明起見,在圖11中將所有匯流排都標為匯流排系統93。 In addition to the data bus, the bus system 93 may also include a power bus, a control bus, and a status signal bus. However, for the sake of clarity, all the bus bars are marked as the bus bar system 93 in FIG. 11.

在實現過程中,該電腦設備所執行的處理可以藉由處理器91中的硬體的整合邏輯電路或者軟體形式的指令完成。即本揭露實施例所揭露的方法的步驟可以體現為硬體處理器執行完成,或者用處理器中的硬體及軟體模組組合執行完成。軟體模組可以位於隨機記憶體、快閃記憶體、唯讀記憶體、可程式唯讀記憶體或者電可讀寫可程式記憶體、暫存器等儲存媒體中。該儲存媒體 位於記憶體92,處理器91讀取記憶體92中的資訊,結合其硬體完成上述方法的步驟。為避免重複,這裡不再詳細描述。 In the implementation process, the processing executed by the computer device can be completed by the integrated logic circuit of the hardware in the processor 91 or instructions in the form of software. That is, the steps of the method disclosed in the embodiments of the present disclosure may be embodied as being executed by a hardware processor, or executed by a combination of hardware and software modules in the processor. The software module can be located in storage media such as random memory, flash memory, read-only memory, programmable read-only memory, or electronically readable and writable programmable memory, register. The storage medium Located in the memory 92, the processor 91 reads the information in the memory 92, and completes the steps of the above method in combination with its hardware. In order to avoid repetition, it will not be described in detail here.

本領域普通技術人員可以理解,上文中所揭露方法中的全部或某些步驟、系統、裝置中的功能模組/單元可以被實施為軟體、韌體、硬體及其適當的組合。在硬體實施方式中,在以上描述中提及的功能模組/單元之間的劃分不一定對應於實體元件的劃分;例如,一個實體元件可以具有複數功能,或者一個功能或步驟可以由若干實體元件合作執行。某些元件或所有元件可以被實施為由處理器,如數位訊號處理器或微處理器執行的軟體,或者被實施為硬體,或者被實施為積體電路,如專用積體電路。這樣的軟體可以分佈在電腦可讀媒體上,電腦可讀媒體可以包括電腦儲存媒體(或非暫時性媒體)和通訊媒體(或暫時性媒體)。如本領域普通技術人員公知的,術語電腦儲存媒體包括在設定為儲存資訊(諸如電腦可讀指令、資料結構、程式模組或其他資料)的任何方法或技術中實施的揮發性和非揮發性、可移和非可移媒體。電腦儲存媒體包括但不限於RAM、ROM、EEPROM、快閃記憶體或其他記憶體技術、CD-ROM、數位多功能光碟(DVD)或其他光碟儲存裝置、磁盒、磁帶、磁片儲存裝置或其他磁儲存裝置、或者可以設定為儲存期望的資訊並且可以被電腦訪問的任何其他的媒體。此外,本領域普通技術人員公知的是,通訊媒體通常包含電腦可讀指令、資料結構、程式模組或者諸如載波或其他傳輸機制之類的調製資料信號中的其他資料,並且可包括任何資訊遞送媒體。 A person of ordinary skill in the art can understand that all or some of the steps in the methods, systems, and devices disclosed above can be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical elements; for example, a physical element may have plural functions, or a function or step may consist of several Cooperative implementation of physical components. Some or all of the components can be implemented as software executed by a processor, such as a digital signal processor or a microprocessor, or as hardware, or as an integrated circuit, such as a dedicated integrated circuit. Such software can be distributed on computer-readable media, and computer-readable media can include computer storage media (or non-transitory media) and communication media (or temporary media). As is well known by those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile implementations in any method or technology configured to store information (such as computer-readable instructions, data structures, program modules, or other data). , Removable and non-removable media. Computer storage media include but are not limited to RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage devices, magnetic cartridges, magnetic tapes, magnetic disk storage devices or Other magnetic storage devices, or any other media that can be configured to store desired information and that can be accessed by a computer. In addition, as is well known to those of ordinary skill in the art, communication media usually include computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery media.

本領域的普通技術人員應當理解,可以對本文實施例的技術方案進行修改或者等同替換,而不脫離本文技術方案的精神和範圍,均應涵蓋在本申請的申請專利範圍當中。 Those of ordinary skill in the art should understand that the technical solutions of the embodiments herein can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions herein, and should be covered by the scope of the patent application of this application.

81:第一鏈系統 81: The first chain system

82:第二鏈系統 82: The second chain system

83:資料儲存裝置 83: data storage device

Claims (40)

一種鏈式結構資料儲存方法,包括: 將該鏈式結構中鏈的部分或全部連接資訊作為一第一鍵,該第一鍵關聯的該鏈式結構中的資料作為值,將該資料儲存為輸入資料或輸出資料,同一資料儲存裝置儲存的輸入資料和輸出資料根據相同的連接資訊相關聯。A chain structure data storage method, including: Take part or all of the link information of the chain in the chain structure as a first key, and the data in the chain structure associated with the first key as the value, and store the data as input data or output data, and the same data storage device The stored input data and output data are related according to the same connection information. 如請求項1所述的資料儲存方法,其中,該將該資料儲存為輸入資料或輸出資料,包括: 該第一鍵作為該鏈式結構中輸出資訊的部分或全部時,將該第一鍵關聯的資料作為輸入資料儲存;該第一鍵作為該鏈式結構中輸入資訊的部分或全部時,將該第一鍵關聯的資料作為輸出資料儲存。The data storage method according to claim 1, wherein the storage of the data as input data or output data includes: When the first key is part or all of the output information in the chain structure, the data associated with the first key is stored as input data; when the first key is part or all of the input information in the chain structure, the The data associated with the first key is stored as output data. 一種鏈式結構驗證方法,包括: 將該鏈式結構中鏈的部分或全部連接資訊作為一第一鍵,該第一鍵關聯的該鏈式結構中的資料作為值,驗證該第一鍵關聯的資料是否有錯誤,驗證該第一鍵關聯的資料無錯誤後,將該資料儲存為輸入資料或輸出資料。A chain structure verification method, including: Use part or all of the link information of the chain in the chain structure as a first key, and the data in the chain structure associated with the first key as the value to verify whether the data associated with the first key is wrong, and to verify the first key. After the data associated with the one-click has no errors, save the data as input data or output data. 如請求項3所述的鏈式結構驗證方法,其中,該將該資料儲存為輸入資料或輸出資料,包括: 該第一鍵作為該鏈式結構中的輸出資訊的部分或全部時,將該第一鍵關聯的資料作為輸入資料儲存;該第一鍵作為該鏈式結構中的輸入資訊的部分或全部時,將該第一鍵關聯的資料作為輸出資料儲存;本裝置上儲存的輸入資料和輸出資料根據相同的連接資訊相關聯。The chain structure verification method according to claim 3, wherein the storing of the data as input data or output data includes: When the first key is used as part or all of the output information in the chain structure, the data associated with the first key is stored as input data; when the first key is used as part or all of the input information in the chain structure , The data associated with the first key is stored as output data; the input data and output data stored on this device are related according to the same connection information. 如請求項3所述的鏈式結構驗證方法,其中,該驗證該第一鍵關聯的資料是否有錯誤,包括以下驗證中的一種或多種: 驗證該資料是否為該鏈式結構上的資料; 該第一鍵作為該鏈式結構中的輸入資訊時,驗證是否存在與該輸入資訊具有相同連接資訊的輸出資訊; 該第一鍵作為該鏈式結構中的輸入資訊時,驗證與該輸入資訊具有相同連接資訊的輸出資訊是否被使用過; 該第一鍵作為該鏈式結構中的輸入資訊時,且該第一鍵關聯的資料包含一交易數額時,驗證該交易數額是否正確; 該第一鍵作為該鏈式結構中的輸入資訊時,且該第一鍵關聯的資料包含一簽名資訊時,驗證該簽名資訊是否正確。The chain structure verification method according to claim 3, wherein the verification of whether the data associated with the first key has an error includes one or more of the following verifications: Verify whether the data is the data on the chain structure; When the first key is used as the input information in the chain structure, verify whether there is output information that has the same connection information as the input information; When the first key is used as the input information in the chain structure, verify whether the output information with the same connection information as the input information has been used; When the first key is used as input information in the chain structure, and the data associated with the first key includes a transaction amount, verify that the transaction amount is correct; When the first key is used as the input information in the chain structure, and the data associated with the first key includes signature information, it is verified whether the signature information is correct. 如請求項4所述的鏈式結構驗證方法,該方法還包括: 根據一資料驗證裝置的請求,向該資料驗證裝置返回本裝置儲存的與該鏈的連接資訊關聯的資料,包括以下資料中的一種或多種:輸入資料、輸出資料、默克爾樹認證路徑、附加驗證資料。According to the chain structure verification method described in claim 4, the method further includes: According to the request of a data verification device, return to the data verification device the data associated with the link information stored in this device, including one or more of the following data: input data, output data, Merkel tree certification path, additional Verify the information. 一種鏈式結構驗證方法,包括: 將該鏈式結構中鏈的部分或全部連接資訊作為一第二鍵,從一資料儲存裝置獲取該資料儲存裝置儲存的與該第二鍵關聯的一資料,根據該獲取的資料驗證該鏈式結構中的資料是否有錯誤。A chain structure verification method, including: Use part or all of the link information of the chain in the chain structure as a second key, obtain a data stored in the data storage device and associated with the second key from a data storage device, and verify the chain according to the obtained data Whether there are errors in the data in the structure. 如請求項7所述的鏈式結構驗證方法,其中,該從資料儲存裝置獲取的與該第二鍵關聯的資料包括以下一種或多種:與該第二鍵關聯的資料、默克爾樹認證路徑、附加驗證資料,其中,該第二鍵作為該鏈式結構中輸出資訊的部分或全部,或者該第二鍵作為該鏈式結構中輸入資訊的部分或全部。The chain structure verification method according to claim 7, wherein the data associated with the second key obtained from the data storage device includes one or more of the following: data associated with the second key, Merkel tree authentication path , Additional verification data, wherein the second key is used as part or all of the output information in the chain structure, or the second key is used as part or all of the input information in the chain structure. 如請求項7所述的鏈式結構驗證方法,其中,該根據該獲取的資料驗證該鏈式結構中的資料是否有錯誤,包括: 同步該鏈式結構中的一區塊頭資料,結合該區塊頭資料與從該資料儲存裝置獲取的與該第二鍵關聯的資料,進行以下驗證中的一種或多種: 驗證該從資料儲存裝置獲取的與該第二鍵關聯的資料是否為該鏈式結構上的資料; 該第二鍵作為該獲取的資料的輸入資訊時,驗證是否存在與該輸入資訊具有相同連接資訊的輸出資訊; 該第二鍵作為該獲取的資料的輸入資訊時,驗證與該輸入資訊具有相同連接資訊的輸出資訊是否被使用過; 該第二鍵作為該獲取的資料的輸入資訊時,且該獲取的資料包含一交易數額時,驗證該交易數額是否正確; 該第二鍵作為該獲取的資料的輸入資訊時,且該獲取的資料包含一簽名資訊時,驗證該簽名資訊是否正確。The method for verifying the chain structure according to claim 7, wherein the verifying whether the data in the chain structure has errors according to the acquired data includes: Synchronize a block header data in the chain structure, combine the block header data with the data associated with the second key obtained from the data storage device, and perform one or more of the following verifications: Verifying whether the data associated with the second key obtained from the data storage device is the data on the chain structure; When the second key is used as the input information of the acquired data, verify whether there is output information that has the same connection information as the input information; When the second key is used as the input information of the acquired data, verify whether the output information with the same connection information as the input information has been used; When the second key is used as the input information of the acquired data, and the acquired data contains a transaction amount, verify whether the transaction amount is correct; When the second key is used as the input information of the acquired data, and the acquired data contains a signature information, verify whether the signature information is correct. 一種鏈式結構實現方法,該鏈式結構系統包括一第一鏈系統、一第二鏈系統和一資料儲存裝置,該方法包括: 該第一鏈系統對帳本資料簽名後,將簽名後的帳本資料寫入第一鏈的區塊資料; 該第二鏈系統在驗證第一鏈的區塊資料後,將該第一鏈的一或複數連續的區塊資料寫入第二鏈的區塊資料; 該資料儲存裝置將該第二鏈中鏈的部分或全部連接資訊作為一第一鍵,該第一鍵關聯的資料作為值,驗證該第一鍵關聯的資料無錯誤後,將該資料儲存為輸入資料或輸出資料,同一資料儲存裝置儲存的輸入資料和輸出資料根據相同的連接資訊相關聯。A method for realizing a chain structure. The chain structure system includes a first chain system, a second chain system and a data storage device. The method includes: After the first chain system signs the ledger data, it writes the signed ledger data into the block data of the first chain; After verifying the block data of the first chain, the second chain system writes one or more consecutive block data of the first chain into the block data of the second chain; The data storage device uses part or all of the link information in the second chain as a first key, and the data associated with the first key as a value. After verifying that the data associated with the first key is correct, the data is stored as Input data or output data, the input data and output data stored in the same data storage device are related according to the same connection information. 如請求項10所述的鏈式結構實現方法,該方法還包括:該第一鏈系統將該第一鏈中鏈的部分或全部連接資訊作為一第三鍵,該第三鍵關聯的資料作為值,將該第三鍵關聯的值分配到與該值具有相同第三鍵的一共識組;該共識組對該第三鍵關聯的資料進行驗證,其中: 該第三鍵關聯的資料包括一交易資料,該驗證包括以下一種或多種: 該第三鍵作為該交易資料的輸入資訊時,驗證是否存在與該輸入資訊具有相同連接資訊的輸出資訊; 該第三鍵作為該交易資料的輸入資訊時,驗證與該輸入資訊具有相同連接資訊的輸出資訊是否被使用過; 該第三鍵作為該交易資料的輸入資訊時,驗證該交易資料的交易數額是否正確; 該第三鍵作為該交易資料的輸入資訊時,驗證該交易資料的簽名資訊是否正確。According to the chain structure realization method of claim 10, the method further includes: the first chain system uses part or all of the connection information of the chain in the first chain as a third key, and the data associated with the third key is used as Value, the value associated with the third key is assigned to a consensus group that has the same third key as the value; the consensus group verifies the data associated with the third key, where: The data associated with the third key includes a transaction data, and the verification includes one or more of the following: When the third key is used as the input information of the transaction data, verify whether there is output information that has the same connection information as the input information; When the third key is used as the input information of the transaction data, verify whether the output information with the same connection information as the input information has been used; When the third key is used as the input information of the transaction data, verify whether the transaction amount of the transaction data is correct; When the third key is used as the input information of the transaction data, it is verified whether the signature information of the transaction data is correct. 如請求項11所述的鏈式結構實現方法,該共識組對該第三鍵關聯的資料進行驗證後,該方法還包括: 該共識組將該第三鍵關聯的資料儲存為輸入資料或輸出資料,其中,當該第三鍵作為該第一鏈中的輸出資訊的部分或全部時,將該第三鍵關聯的資料作為輸入資料儲存,當該第三鍵作為該第一鏈中的輸入資訊的部分或全部時,將該第三鍵關聯的資料作為輸出資料儲存;同一共識組上儲存的輸入資料和輸出資料根據相同的連接資訊相關聯。For the chain structure implementation method described in claim 11, after the consensus group verifies the data associated with the third key, the method further includes: The consensus group stores the data associated with the third key as input data or output data, where, when the third key is part or all of the output information in the first chain, the data associated with the third key is used as Input data storage. When the third key is used as part or all of the input information in the first chain, the data associated with the third key is stored as output data; the input data and output data stored in the same consensus group are based on the same Is associated with the connection information. 如請求項10所述的鏈式結構實現方法,其中,該資料儲存裝置將該資料儲存為輸入資料或輸出資料,包括: 該第一鍵作為該第二鏈中的輸出資訊的部分或全部時,將該第一鍵關聯的資料作為輸入資料儲存;該第一鍵作為該第二鏈中的輸入資訊的部分或全部時,將該第一鍵關聯的資料作為輸出資料儲存;本資料儲存裝置上儲存的輸入資料和輸出資料根據相同的連接資訊相關聯。The method for implementing the chain structure according to claim 10, wherein the data storage device stores the data as input data or output data, including: When the first key is used as part or all of the output information in the second chain, the data associated with the first key is stored as input data; when the first key is used as part or all of the input information in the second chain , The data associated with the first key is stored as output data; the input data and output data stored on the data storage device are related according to the same connection information. 如請求項10所述的鏈式結構實現方法,其中,該資料儲存裝置驗證該第一鍵關聯的資料是否有錯誤,包括以下驗證中的一種或多種: 驗證該第二鏈的完整性; 驗證該資料是否為該第二鏈上的資料; 該第一鍵作為該第二鏈中帳本資料的輸入資訊時,驗證是否存在與該輸入資訊具有相同連接資訊的輸出資訊; 該第一鍵作為該第二鏈中帳本資料的輸入資訊時,驗證與該輸入資訊具有相同連接資訊的輸出資訊是否被使用過; 該第一鍵作為該第二鏈中帳本資料的輸入資訊時,且該第一鍵關聯的資料包含一交易數額時,驗證該交易數額是否正確; 該第一鍵作為該第二鏈中帳本資料的輸入資訊時,且該第一鍵關聯的資料包含一簽名資訊時,驗證該簽名資訊是否正確。The method for implementing the chain structure according to claim 10, wherein the data storage device verifies whether the data associated with the first key has an error, including one or more of the following verifications: Verify the integrity of the second chain; Verify whether the data is the data on the second chain; When the first key is used as the input information of the ledger data in the second chain, verify whether there is output information that has the same connection information as the input information; When the first key is used as the input information of the ledger data in the second chain, verify whether the output information with the same connection information as the input information has been used; When the first key is used as the input information of the ledger data in the second chain, and the data associated with the first key includes a transaction amount, verify that the transaction amount is correct; When the first key is used as the input information of the ledger data in the second chain, and the data associated with the first key includes signature information, it is verified whether the signature information is correct. 如請求項10或請求項14所述的鏈式結構實現方法,該方法還包括:該第一鏈系統按順序為一帳本資料編排序號,該帳本資料對應的一區塊資料的區塊頭中包含累計帳本資料量;該第二鏈系統在第二鏈的區塊資料的區塊頭中包含該區塊資料中的累計帳本資料量。For example, the chain structure implementation method of claim 10 or claim 14, the method further includes: the first chain system sequentially numbers a book data, and the block header of a block data corresponding to the book data Contains the accumulated book data amount; the second chain system includes the accumulated book data amount in the block data in the block header of the block data of the second chain. 如請求項15所述的鏈式結構實現方法,其中,該資料儲存裝置驗證該鏈式結構的完整性,包括:該資料儲存裝置同步該第二鏈的區塊頭,用該區塊頭中的累計帳本資料量產生一編號位址,根據該編號位址對該第二鏈的完整性進行驗證。The method for implementing the chain structure according to claim 15, wherein the data storage device verifies the integrity of the chain structure includes: the data storage device synchronizes the block header of the second chain, and uses the accumulated data in the block header The data volume of the ledger generates a number address, and the integrity of the second chain is verified according to the number address. 如請求項15所述的鏈式結構實現方法,該方法還包括: 該資料儲存裝置根據第一鏈區塊頭資料驗證第二鏈區塊頭資料中的累計帳本資料量是否正確。According to the chain structure realization method described in claim 15, the method further includes: The data storage device verifies whether the accumulated book data amount in the second chain block header data is correct according to the first chain block header data. 如請求項10所述的鏈式結構實現方法,該方法還包括: 該第一鏈系統在第一鏈的區塊頭中包含目前共識公開金鑰集合映射的值; 該資料儲存裝置根據第一鏈區塊頭中的共識公開金鑰集合的映射值採用默克爾樹證明或累加器證明,驗證第二鏈區塊頭中的共識公開金鑰是否有效。According to the chain structure realization method described in claim 10, the method further includes: The first chain system includes the current consensus public key set mapping value in the block header of the first chain; The data storage device uses Merkel tree certification or accumulator certification according to the mapping value of the consensus public key set in the first chain block header to verify whether the consensus public key in the second chain block header is valid. 如請求項10所述的鏈式結構實現方法,其中,該第二鏈系統將該第一鏈的一或複數連續的區塊資料寫入第二鏈的區塊資料,包括:該第二鏈系統將該第一鏈的一或複數連續的區塊資料按照交易資料序號順序和控制資料序號順序重新組合分別產生一默克爾樹根雜湊值,並在產生的第二鏈的區塊頭中包含該默克爾樹根雜湊值。The method for implementing the chain structure according to claim 10, wherein the second chain system writes one or more consecutive block data of the first chain into the block data of the second chain, including: the second chain The system recombines one or more consecutive block data of the first chain according to the sequence of transaction data and the sequence of control data to generate a Merkel tree root hash value, and includes this in the block header of the generated second chain Merkel root hash value. 如請求項10所述的鏈式結構實現方法, 該系統還包括:一資料驗證裝置; 該方法還包括:該資料驗證裝置將該鏈式結構中鏈的部分或全部連接資訊作為一第二鍵,從該資料儲存裝置獲取該資料儲存裝置上儲存的與該第二鍵關聯的資料,根據該獲取的資料驗證該第二鏈中的資料是否有錯誤。The chain structure realization method as described in claim 10, The system also includes: a data verification device; The method further includes: the data verification device uses part or all of the connection information of the chain in the chain structure as a second key, and obtains the data associated with the second key stored on the data storage device from the data storage device, Verify whether the data in the second chain has errors based on the acquired data. 如請求項20所述的鏈式結構實現方法,其中,該資料驗證裝置將該鏈式結構中鏈的部分或全部連接資訊作為一第二鍵,從該資料儲存裝置獲取該資料儲存裝置上儲存的與該第二鍵關聯的資料,包括: 該資料驗證裝置同步該第二鏈的一區塊頭,用該區塊頭中的累計帳本資料量產生一編號位址,根據該編號位址獲取鏈的部分或全部連接資訊作為一第二鍵,從該資料儲存裝置獲取該資料儲存裝置上儲存的與該第二鍵關聯的資料。The method for implementing the chain structure according to claim 20, wherein the data verification device uses part or all of the connection information of the chain in the chain structure as a second key, and obtains the data stored on the data storage device from the data storage device The data associated with the second key includes: The data verification device synchronizes a block header of the second chain, uses the accumulated book data volume in the block header to generate a number address, and obtains part or all of the link information of the chain according to the number address as a second key, Obtain the data associated with the second key stored on the data storage device from the data storage device. 如請求項20所述的鏈式結構實現方法,其中,該資料驗證裝置從該資料儲存裝置獲取該資料儲存裝置上儲存的與該第二鍵關聯的資料包括以下資料中的一種或多種:與該第二鍵關聯的資料、默克爾樹認證路徑、附加驗證資料,其中,該第二鍵作為該鏈式結構中輸出資訊的部分或全部,或者該第二鍵作為該鏈式結構中輸入資訊的部分或全部; 該資料驗證裝置根據該獲取的資料驗證該第二鏈中的資料是否有錯誤,包括: 該資料驗證裝置同步該第二鏈中的區塊頭,結合該區塊頭與從該資料儲存裝置獲取的與該第二鍵關聯的資料,進行以下驗證中的一種或多種: 驗證該從資料儲存裝置獲取的與該第二鍵關聯的資料是否為該第二鏈上的資料; 該第二鍵作為該獲取的資料的輸入資訊時,驗證是否存在與該輸入資訊具有相同連接資訊的輸出資訊; 該第二鍵作為該獲取的資料的輸入資訊時,驗證與該輸入資訊具有相同連接資訊的輸出資訊是否被使用過; 該第二鍵作為該獲取的資料的輸入資訊時,且該獲取的資料包含一交易數額時,驗證該交易數額是否正確; 該第二鍵作為該獲取的資料的輸入資訊時,且該獲取的資料包含一簽名資訊時,驗證該簽名資訊是否正確。The method for implementing the chain structure according to claim 20, wherein the data verification device obtains from the data storage device the data associated with the second key stored on the data storage device includes one or more of the following data: and Data associated with the second key, Merkel tree certification path, additional verification data, wherein the second key is used as part or all of the output information in the chain structure, or the second key is used as the input information in the chain structure Part or all of The data verification device verifies whether the data in the second chain has errors based on the acquired data, including: The data verification device synchronizes the block header in the second chain, and combines the block header and the data associated with the second key obtained from the data storage device to perform one or more of the following verifications: Verifying whether the data associated with the second key obtained from the data storage device is the data on the second chain; When the second key is used as the input information of the acquired data, verify whether there is output information that has the same connection information as the input information; When the second key is used as the input information of the acquired data, verify whether the output information with the same connection information as the input information has been used; When the second key is used as the input information of the acquired data, and the acquired data contains a transaction amount, verify whether the transaction amount is correct; When the second key is used as the input information of the acquired data, and the acquired data contains a signature information, verify whether the signature information is correct. 如請求項20所述的鏈式結構實現方法,該方法還包括: 該第一鏈系統在第一鏈的區塊頭中包含目前共識公開金鑰集合的映射值; 該資料驗證裝置根據第一鏈區塊頭中的共識公開金鑰集合的映射值採用默克爾樹證明或累加器證明,驗證第二鏈區塊頭中的共識公開金鑰是否有效。According to the chain structure implementation method described in claim 20, the method further includes: The first chain system includes the mapping value of the current consensus public key set in the block header of the first chain; The data verification device uses Merkel tree certification or accumulator certification according to the mapping value of the consensus public key set in the first chain block header to verify whether the consensus public key in the second chain block header is valid. 如請求項10所述的鏈式結構實現方法, 其中,該第一鏈為私有鏈或聯盟鏈, 該方法還包括:第一鏈系統向一使用者頒發以下金鑰的一個或複數個:一管理位址主金鑰、一交易位址主金鑰、一機密交易主金鑰和一對稱加密主金鑰,其中: 該管理位址主金鑰用於與目前第一產生參數產生該使用者的下一個管理位址,該使用者的所有管理位址形成邏輯鏈; 該交易位址主金鑰用於與目前第二產生參數產生該使用者的下一個接收交易位址,該使用者的所有接收交易位址形成邏輯鏈; 該機密交易主金鑰用於與目前第三產生參數產生目前加解密密文交易數額的工作金鑰; 該對稱加密主金鑰用於與目前第四產生參數產生該使用者的下一個加解密管理資料的對稱加密工作金鑰。The chain structure realization method as described in claim 10, Among them, the first chain is a private chain or a consortium chain, The method also includes: the first chain system issues one or more of the following keys to a user: a management address master key, a transaction address master key, a confidential transaction master key, and a symmetric encryption master Key, where: The management address master key is used to generate the next management address of the user with the current first generation parameter, and all the management addresses of the user form a logical chain; The transaction address master key is used to generate the user's next receiving transaction address with the current second generation parameter, and all receiving transaction addresses of the user form a logical chain; The secret transaction master key is used to generate the working key for the current encryption and decryption ciphertext transaction amount with the current third generation parameter; The symmetric encryption master key is used to generate the symmetric encryption working key of the user's next encryption and decryption management data with the current fourth generation parameter. 如請求項10或請求項24所述的鏈式結構實現方法,該方法還包括: 該第一鏈系統使用為一使用者頒發的管理位址主金鑰與該使用者的上一個管理資料中的產生參數產生該使用者的目前管理位址,並在該目前管理資料中寫入用於產生該使用者的下一個管理位址的產生參數。As described in claim 10 or claim 24, the method for implementing the chain structure further includes: The first chain system uses the management address master key issued for a user and the generation parameters in the user's previous management data to generate the user's current management address, and writes it in the current management data The generation parameter used to generate the user's next management address. 一種鏈式結構資料儲存裝置,包括一第一儲存模組和一第二儲存模組,其中: 該第一儲存模組,設定為將該鏈式結構中鏈的部分或全部連接資訊作為一第一鍵儲存; 該第二儲存模組,設定為將該第一鍵關聯的該鏈式結構中的資料儲存為輸入資料或輸出資料,同一資料儲存裝置儲存的輸入資料和輸出資料根據相同的連接資訊相關聯。A chain structure data storage device includes a first storage module and a second storage module, wherein: The first storage module is configured to store part or all of the connection information of the chain in the chain structure as a first key; The second storage module is configured to store the data in the chain structure associated with the first key as input data or output data, and the input data and output data stored in the same data storage device are related according to the same connection information. 如請求項26所述的鏈式結構資料儲存裝置,該資料儲存裝置還包括一第一驗證模組,該第一驗證模組設定為驗證該第一鍵關聯的該鏈式結構中的資料是否有錯誤。For the chain structure data storage device according to claim 26, the data storage device further includes a first verification module configured to verify whether the data in the chain structure associated with the first key is wrong. 如請求項27所述的鏈式結構資料儲存裝置,該第一驗證模組驗證該第一鍵關聯的一資料是否有錯誤,包括: 該第一驗證模組執行以下驗證操作中的一種或多種: 驗證該資料是否為該鏈式結構上的資料; 該第一鍵作為該鏈式結構中的輸入資訊時,驗證是否存在與該輸入資訊具有相同連接資訊的輸出資訊; 該第一鍵作為該鏈式結構中的輸入資訊時,驗證與該輸入資訊具有相同連接資訊的輸出資訊是否被使用過; 該第一鍵作為該鏈式結構中的輸入資訊時,且該第一鍵關聯的資料包含一交易數額時,驗證該交易數額是否正確; 該第一鍵作為該鏈式結構中的輸入資訊時,且該第一鍵關聯的資料包含一簽名資訊時,驗證該簽名資訊是否正確。For the chain structure data storage device according to claim 27, the first verification module verifies whether a data associated with the first key has an error, including: The first verification module performs one or more of the following verification operations: Verify whether the data is the data on the chain structure; When the first key is used as the input information in the chain structure, verify whether there is output information that has the same connection information as the input information; When the first key is used as the input information in the chain structure, verify whether the output information with the same connection information as the input information has been used; When the first key is used as input information in the chain structure, and the data associated with the first key includes a transaction amount, verify that the transaction amount is correct; When the first key is used as the input information in the chain structure, and the data associated with the first key includes signature information, it is verified whether the signature information is correct. 一種鏈式結構資料驗證裝置,包括一鍵值查找模組和一第二驗證模組,其中: 該鍵值查找模組,設定為查找該鏈式結構中鏈的部分或全部連接資訊作為一第二鍵; 該第二驗證模組,設定為從一資料儲存裝置獲取該資料儲存裝置儲存的與該第二鍵關聯的資料,根據該獲取的資料驗證該鏈式結構中的資料是否有錯誤。A chain structure data verification device includes a key value search module and a second verification module, wherein: The key value search module is set to search part or all of the link information in the chain structure as a second key; The second verification module is configured to obtain data associated with the second key stored in the data storage device from a data storage device, and verify whether the data in the chain structure has errors according to the obtained data. 如請求項29所述的鏈式結構資料驗證裝置,其中,該第二驗證模組根據該獲取的資料驗證該鏈式結構中的資料是否有錯誤,包括: 該資料驗證裝置同步該鏈式結構中的一區塊頭資料,該第二驗證模組結合該區塊頭資料與從該資料儲存裝置獲取的與該第二鍵關聯的資料,進行以下驗證中的一種或多種: 驗證該從資料儲存裝置獲取的與該第二鍵關聯的資料是否為該鏈式結構上的資料; 該第二鍵作為該獲取的資料的輸入資訊時,驗證是否存在與該輸入資訊具有相同連接資訊的輸出資訊; 該第二鍵作為該獲取的資料的輸入資訊時,驗證與該輸入資訊具有相同連接資訊的輸出資訊是否被使用過; 該第二鍵作為該獲取的資料的輸入資訊時,且該獲取的資料包含一交易數額時,驗證該交易數額是否正確; 該第二鍵作為該獲取的資料的輸入資訊時,且該獲取的資料包含一簽名資訊時,驗證該簽名資訊是否正確。The chain structure data verification device according to claim 29, wherein the second verification module verifies whether the data in the chain structure has errors according to the acquired data, including: The data verification device synchronizes a block header data in the chain structure, and the second verification module combines the block header data with the data associated with the second key obtained from the data storage device to perform one of the following verifications Or multiple: Verifying whether the data associated with the second key obtained from the data storage device is the data on the chain structure; When the second key is used as the input information of the acquired data, verify whether there is output information that has the same connection information as the input information; When the second key is used as the input information of the acquired data, verify whether the output information with the same connection information as the input information has been used; When the second key is used as the input information of the acquired data, and the acquired data contains a transaction amount, verify whether the transaction amount is correct; When the second key is used as the input information of the acquired data, and the acquired data contains a signature information, verify whether the signature information is correct. 一種鏈式結構系統,包括:一第一鏈系統、一第二鏈系統和一資料儲存裝置,其中: 該第一鏈系統,設定為對帳本資料簽名後,將簽名後的帳本資料寫入一第一鏈的區塊資料; 該第二鏈系統,設定為在驗證第一鏈的區塊資料後,將該第一鏈的一或複數連續的區塊資料寫入一第二鏈的區塊資料; 該資料儲存裝置,設定為將該第二鏈中鏈的部分或全部連接資訊作為第一鍵,該第一鍵關聯的資料作為值,驗證該第一鍵關聯的資料是否有錯誤,驗證該第一鍵關聯的資料無錯誤後,將該資料儲存為輸入資料或輸出資料,同一資料儲存裝置儲存的輸入資料和輸出資料根據相同的連接資訊相關聯。A chain structure system includes: a first chain system, a second chain system and a data storage device, wherein: The first chain system is set to write the signed account data into the block data of a first chain after signing the account book data; The second chain system is configured to write one or more consecutive block data of the first chain into the block data of a second chain after verifying the block data of the first chain; The data storage device is configured to use part or all of the link information in the second chain as the first key, and the data associated with the first key as the value, verify whether the data associated with the first key is wrong, and verify the first key. After the one-click association data is correct, save the data as input data or output data, and the input data and output data stored in the same data storage device are related according to the same connection information. 如請求項31所述的鏈式結構系統,其中,該第一鏈系統還包括一共識組; 該第一鏈系統還設定為將該第一鏈中鏈的部分或全部連接資訊作為一第三鍵,該第三鍵關聯的資料作為值,將該第三鍵關聯的值分配到與該值具有相同第三鍵的共識組,該第三鍵關聯的資料包括一交易資料; 該共識組設定為對該第三鍵關聯的資料進行驗證,包括以下一種或多種驗證: 該第三鍵作為該交易資料的輸入資訊時,驗證是否存在與該輸入資訊具有相同連接資訊的輸出資訊; 該第三鍵作為該交易資料的輸入資訊時,驗證與該輸入資訊具有相同連接資訊的輸出資訊是否被使用過; 該第三鍵作為該交易資料的輸入資訊時,驗證該交易資料的交易數額是否正確; 該第三鍵作為該交易資料的輸入資訊時,驗證該交易資料的簽名資訊是否正確。The chain structure system according to claim 31, wherein the first chain system further includes a consensus group; The first chain system is also set to use part or all of the link information in the first chain as a third key, the data associated with the third key as a value, and the value associated with the third key is assigned to the value Consensus groups with the same third key, the data associated with the third key includes a transaction data; The consensus group is set to verify the data associated with the third key, including one or more of the following verifications: When the third key is used as the input information of the transaction data, verify whether there is output information that has the same connection information as the input information; When the third key is used as the input information of the transaction data, verify whether the output information with the same connection information as the input information has been used; When the third key is used as the input information of the transaction data, verify whether the transaction amount of the transaction data is correct; When the third key is used as the input information of the transaction data, it is verified whether the signature information of the transaction data is correct. 如請求項32所述的鏈式結構系統,該共識組還設定為對該第三鍵關聯的資料進行驗證後,將該第三鍵關聯的資料儲存為輸入資料或輸出資料,其中,當該第三鍵作為該第一鏈中的輸出資訊的部分或全部時,將該第三鍵關聯的資料作為輸入資料儲存,當該第三鍵作為該第一鏈中的輸入資訊的部分或全部時,將該第三鍵關聯的資料作為輸出資料儲存;同一共識組上儲存的輸入資料和輸出資料根據相同的連接資訊相關聯。For example, in the chain structure system of claim 32, the consensus group is also set to store the data associated with the third key as input data or output data after verifying the data associated with the third key. When the third key is part or all of the output information in the first chain, the data associated with the third key is stored as input data. When the third key is part or all of the input information in the first chain , The data associated with the third key is stored as output data; the input data and output data stored on the same consensus group are related according to the same connection information. 如請求項31所述的鏈式結構系統,該第一鏈系統還設定為按順序為一帳本資料編排序號,該帳本資料對應的區塊資料的區塊頭中包含累計帳本資料量;該第二鏈系統還設定為在第二鏈的區塊資料的區塊頭中包含該區塊資料中的累計帳本資料量。For the chain structure system described in claim 31, the first chain system is also set to sequentially number a book data, and the block header of the block data corresponding to the book data contains the cumulative book data amount; The second chain system is also set to include the accumulated book data amount in the block data in the block header of the block data of the second chain. 如請求項31所述的鏈式結構系統,該資料儲存裝置驗證該第一鍵關聯的資料是否有錯誤,包括以下驗證中的一種或多種: 驗證該第二鏈的完整性; 驗證該資料是否為該第二鏈上的資料; 該第一鍵作為該第二鏈中帳本資料的輸入資訊時,驗證是否存在與該輸入資訊具有相同連接資訊的輸出資訊; 該第一鍵作為該第二鏈中帳本資料的輸入資訊時,驗證與該輸入資訊具有相同連接資訊的輸出資訊是否被使用過; 該第一鍵作為該第二鏈中帳本資料的輸入資訊時,且該第一鍵關聯的資料包含交易數額時,驗證該交易數額是否正確; 該第一鍵作為該第二鏈中帳本資料的輸入資訊時,且該第一鍵關聯的資料包含簽名資訊時,驗證該簽名資訊是否正確。For the chain structure system described in claim 31, the data storage device verifies whether the data associated with the first key has errors, including one or more of the following verifications: Verify the integrity of the second chain; Verify whether the data is the data on the second chain; When the first key is used as the input information of the ledger data in the second chain, verify whether there is output information that has the same connection information as the input information; When the first key is used as the input information of the ledger data in the second chain, verify whether the output information with the same connection information as the input information has been used; When the first key is used as the input information of the ledger data in the second chain, and the data associated with the first key contains the transaction amount, verify whether the transaction amount is correct; When the first key is used as the input information of the ledger data in the second chain, and the data associated with the first key contains signature information, it is verified whether the signature information is correct. 如請求項31所述的鏈式結構系統,該鏈式結構系統還包括:一資料驗證裝置;該資料驗證裝置設定為將該鏈式結構中鏈的部分或全部連接資訊作為一第二鍵,從該資料儲存裝置獲取該資料儲存裝置上儲存的與該第二鍵關聯的資料,根據該獲取的資料驗證該第二鏈中的資料是否有錯誤。According to the chain structure system of claim 31, the chain structure system further includes: a data verification device; the data verification device is set to use part or all of the connection information of the chain in the chain structure as a second key, Obtain the data associated with the second key stored on the data storage device from the data storage device, and verify whether the data in the second chain has errors according to the acquired data. 如請求項31或請求項36所述的鏈式結構系統,該第一鏈系統還設定為在第一鏈的區塊頭中包含目前共識公開金鑰集合映射的值,以使該資料儲存裝置或資料驗證裝置根據第一鏈區塊頭中的共識公開金鑰集合的映射值採用默克爾樹證明或累加器證明,驗證第二鏈區塊頭中的共識公開金鑰是否有效。For the chain structure system described in claim 31 or 36, the first chain system is also set to include the value of the current consensus public key set mapping in the block header of the first chain, so that the data storage device or The data verification device uses Merkel tree certification or accumulator certification according to the mapping value of the consensus public key set in the first chain block header to verify whether the consensus public key in the second chain block header is valid. 如請求項31所述的鏈式結構系統,該第一鏈系統還設定為使用為一使用者頒發的管理位址主金鑰與該使用者的上一個管理資料中的產生參數產生該使用者的目前管理位址,並在該目前管理資料中寫入用於產生該使用者的下一個管理位址的產生參數。For the chain structure system described in claim 31, the first chain system is also configured to generate the user using the management address master key issued for a user and the generation parameters in the user's previous management data The current management address of, and write the generation parameters for generating the user’s next management address in the current management data. 一種電腦可讀儲存媒體,儲存有一電腦可執行指令,該電腦可執行指令用於執行請求項1至請求項2或請求項3至請求項6或請求項7至請求項9或請求項10至請求項25中任一項所述的方法。A computer-readable storage medium storing a computer-executable instruction for executing request item 1 to request item 2 or request item 3 to request item 6 or request item 7 to request item 9 or request item 10 to The method described in any one of claim 25. 一種電腦裝置,包括一記憶體、一處理器及儲存在記憶體上並可在處理器上運行的一電腦程式,該處理器執行該程式時實現如請求項1至請求項2或請求項3至請求項6或申請專利範圍7至請求項9或請求項10至請求項25中任一項所述方法的步驟。A computer device includes a memory, a processor, and a computer program stored on the memory and capable of running on the processor. When the processor executes the program, it implements request item 1 to request item 2 or request item 3 To the steps of the method described in any one of Claim 6 or Patent Scope 7 to Claim 9 or Claim 10 to Claim 25.
TW109119498A 2019-12-16 2020-06-10 Chain structure data storage, verification, realization method, system, device and media TWI749583B (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN201911294794.6 2019-12-16
CN201911294794.6A CN111159288B (en) 2019-12-16 2019-12-16 Method, system, device and medium for storing, verifying and realizing chained structure data
PCT/CN2019/128379 WO2021120253A1 (en) 2019-12-16 2019-12-25 Data storage method and verification method for blockchain structure, blockchain structure implementation method, blockchain-structured system, device, and medium
WOPCT/CN2019/128379 2019-12-25

Publications (2)

Publication Number Publication Date
TW202125299A TW202125299A (en) 2021-07-01
TWI749583B true TWI749583B (en) 2021-12-11

Family

ID=70557219

Family Applications (1)

Application Number Title Priority Date Filing Date
TW109119498A TWI749583B (en) 2019-12-16 2020-06-10 Chain structure data storage, verification, realization method, system, device and media

Country Status (3)

Country Link
CN (1) CN111159288B (en)
TW (1) TWI749583B (en)
WO (1) WO2021120253A1 (en)

Families Citing this family (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111340496B (en) * 2020-05-20 2020-10-27 南京如般量子科技有限公司 Block chain system and method for automatically optimizing historical transaction data
CN111695856A (en) * 2020-06-08 2020-09-22 中设设计集团股份有限公司 Ship information registration method based on block chain intelligent contract
CN112100171B (en) * 2020-08-12 2021-06-25 北京大学 Method and device for establishing content index for random consensus diagram book
CN112035890B (en) * 2020-09-04 2022-08-05 北京邮电大学 Data integrity verification method and device
CN112311772B (en) * 2020-10-12 2022-06-14 华中师范大学 Hyperridge-based cross-domain certificate management system and method
CN114629628B (en) * 2020-12-14 2024-02-27 科大国盾量子技术股份有限公司 Quantum key synchronization method based on Merck algorithm
CN113157693B (en) * 2021-03-21 2023-05-19 贵州大学 Block chain storage optimization scheme for digital currency
CN112907248A (en) * 2021-03-25 2021-06-04 芝麻链(北京)科技有限公司 Data storage transaction method and transaction system based on block chain
KR102650336B1 (en) * 2021-05-04 2024-03-22 계명대학교 산학협력단 Method and apparatus for providing lightweight blockchain using external strorage and pbft consensus algorithm
CN113378236B (en) * 2021-06-02 2022-09-16 浙江数秦科技有限公司 Evidence data online security notarization platform and security method
CN113746638B (en) * 2021-09-03 2023-04-07 杭州复杂美科技有限公司 NFT storage method, NFT restoration method, computer device, and storage medium
US20230087602A1 (en) * 2021-09-19 2023-03-23 International Business Machines Corporation Privacy-preserving state reference
CN113902441A (en) * 2021-10-04 2022-01-07 杭州复杂美科技有限公司 Multiple signature method, computer device, and storage medium
CN116070285A (en) * 2021-11-04 2023-05-05 京东科技信息技术有限公司 Asynchronous consensus method, device, server and medium based on Bayesian fault tolerance
CN113904869B (en) * 2021-11-10 2024-04-19 深圳前海微众银行股份有限公司 Method for detecting malicious nodes in blockchain and blockchain
CN114124641B (en) * 2021-11-26 2023-06-02 成都质数斯达克科技有限公司 Block chain exception service processing method, device, equipment and readable storage medium
CN113867690B (en) * 2021-12-07 2022-03-04 中移(上海)信息通信科技有限公司 Generation method and device of random number in block chain and block chain link point
CN114547641B (en) * 2022-01-05 2024-04-26 浪潮工业互联网股份有限公司 Industrial data tracking method, device, equipment and medium based on block chain
CN114398206B (en) * 2022-01-06 2022-11-11 北京德风新征程科技有限公司 Information storage method and device, electronic equipment and computer readable medium
CN115052047A (en) * 2022-01-27 2022-09-13 昆明理工大学 Front-end verification method of Gossip network protocol
CN114928447B (en) * 2022-02-10 2024-04-30 北京轻信科技有限公司 Data management method and system based on distributed identity
CN114666058B (en) * 2022-03-08 2023-06-13 深圳大学 Verification method, device, equipment and storage medium based on multiple signatures
CN114584383B (en) * 2022-03-10 2024-02-27 东南大学 Block chain-based anonymous identity authentication method for Internet of things equipment
CN115118435B (en) * 2022-06-29 2024-03-22 河北工业大学 Privacy data protection and authorization framework based on double-layer chain
CN114915428B (en) * 2022-07-18 2022-11-18 江苏数一科技服务有限公司 Alliance chain suitable for circulation steel is traced to source
CN115118437B (en) * 2022-08-25 2022-10-28 人民法院信息技术服务中心 Multi-signature verification method, device and equipment based on consistent hash and path certification
CN115841285B (en) * 2022-11-28 2023-09-19 浙江百世技术有限公司 Commodity logistics tracing method and system based on blockchain

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW457788B (en) * 1999-03-15 2001-10-01 Sony Corp Processing method and apparatus for encrypted data transfer
TW201732559A (en) * 2015-12-23 2017-09-16 英特爾股份有限公司 Processing devices to perform a key value lookup instruction
CN108647964A (en) * 2018-05-02 2018-10-12 郑杰骞 A kind of block chain data processing method, device and computer readable storage medium
TW201916629A (en) * 2017-09-29 2019-04-16 香港商阿里巴巴集團服務有限公司 Data storage method, data query method and apparatuses
CN109903161A (en) * 2019-02-28 2019-06-18 百度在线网络技术(北京)有限公司 Object processing method, device, equipment and medium based on block chain
WO2019174430A1 (en) * 2018-03-14 2019-09-19 郑杰骞 Block chain data processing method, management terminal, user terminal, conversion device, and medium
US20190327090A1 (en) * 2017-06-07 2019-10-24 At&T Intellectual Property I, L.P. Blockchain-Based Social Media History Maps

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030093695A1 (en) * 2001-11-13 2003-05-15 Santanu Dutta Secure handling of stored-value data objects
US10789373B2 (en) * 2011-10-31 2020-09-29 Reid Consulting Group, Inc. System and method for securely storing and sharing information
US20160098730A1 (en) * 2014-10-01 2016-04-07 The Filing Cabinet, LLC System and Method for Block-Chain Verification of Goods
US10460120B1 (en) * 2016-03-30 2019-10-29 Amazon Technologies, Inc. Policy mediated hierarchical structures in key value stores
CN113111387A (en) * 2017-03-31 2021-07-13 唐晓领 Method, device and system for sharing transaction metadata information among multiple financial asset parties based on block chain
CA3014385A1 (en) * 2017-08-16 2019-02-16 Royal Bank Of Canada Platform for generating authenticated data objects
US10742416B2 (en) * 2017-08-21 2020-08-11 Andrew J. Polcha Fuzzy dataset processing and biometric identity technology leveraging blockchain ledger technology
EP4287104A3 (en) * 2018-01-29 2024-01-17 Panasonic Intellectual Property Corporation of America Control method, controller, data structure, and electric power transaction system
WO2019170617A1 (en) * 2018-03-05 2019-09-12 British Telecommunications Public Limited Company Confirmable authentication method
CN108681943B (en) * 2018-05-18 2022-07-12 百度在线网络技术(北京)有限公司 Data processing method, device and equipment of block chain network and storage medium
US11165756B2 (en) * 2018-06-11 2021-11-02 Fujitsu Limited Delayed-access encryption for blockchain field
CN109255056B (en) * 2018-08-16 2021-05-25 北京京东尚科信息技术有限公司 Data reference processing method, device, equipment and storage medium of block chain
CN109242500B (en) * 2018-09-20 2021-07-02 百度在线网络技术(北京)有限公司 Block chain transaction validity verification method and device and storage medium
CN109726202B (en) * 2018-12-18 2020-11-17 北京新唐思创教育科技有限公司 Block chain data storage method and computer storage medium
CN110177109B (en) * 2019-06-04 2020-05-12 北京理工大学 Double-proxy cross-domain authentication system based on identification password and alliance chain

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW457788B (en) * 1999-03-15 2001-10-01 Sony Corp Processing method and apparatus for encrypted data transfer
TW201732559A (en) * 2015-12-23 2017-09-16 英特爾股份有限公司 Processing devices to perform a key value lookup instruction
US20190327090A1 (en) * 2017-06-07 2019-10-24 At&T Intellectual Property I, L.P. Blockchain-Based Social Media History Maps
TW201916629A (en) * 2017-09-29 2019-04-16 香港商阿里巴巴集團服務有限公司 Data storage method, data query method and apparatuses
WO2019174430A1 (en) * 2018-03-14 2019-09-19 郑杰骞 Block chain data processing method, management terminal, user terminal, conversion device, and medium
CN108647964A (en) * 2018-05-02 2018-10-12 郑杰骞 A kind of block chain data processing method, device and computer readable storage medium
CN109903161A (en) * 2019-02-28 2019-06-18 百度在线网络技术(北京)有限公司 Object processing method, device, equipment and medium based on block chain

Also Published As

Publication number Publication date
WO2021120253A1 (en) 2021-06-24
CN111159288B (en) 2023-04-28
TW202125299A (en) 2021-07-01
CN111159288A (en) 2020-05-15

Similar Documents

Publication Publication Date Title
TWI749583B (en) Chain structure data storage, verification, realization method, system, device and media
TWI706275B (en) System and method for information protection
CN108924092B (en) Public arbitration distributed cloud storage method and system based on block chain
CN107070644B (en) Decentralized public key management method and management system based on trust network
TWI716034B (en) System and method for information protection
JP2021512569A (en) Blockchain data processing method, management side, client side, converter and medium
US20190295069A1 (en) Systems and methods for integrating cryptocurrency wallet identifiers with digital certificates
US10846372B1 (en) Systems and methods for trustless proof of possession and transmission of secured data
Augot et al. Transforming face-to-face identity proofing into anonymous digital identity using the bitcoin blockchain
Brunner et al. SPROOF: A Platform for Issuing and Verifying Documents in a Public Blockchain.
CN115176441A (en) Identity-based public key generation protocol
EP3726774A1 (en) Transparent blockchain sidechains to support blockchain processing heterogeneity
US11818266B2 (en) Methods and systems for distributed cryptographically secured data validation
WO2023015840A1 (en) Chain structure processing method, transaction data processing method, data verification method, apparatus, and medium
CN115136543A (en) Authentication service for use in blockchain networks
TW202231018A (en) Identifying denial-of-service attacks
EP4035326A1 (en) Divisible tokens
TWM586416U (en) Implementing a multi-center, distributed verification system for transactions based on blockchain technology
Liu et al. A blockchain-based cross-domain authentication management system for IoT devices
Noh et al. PyRos: A State Channel‐Based Access Control System for a Public Blockchain Network
WO2021053426A1 (en) Allocation of a digital asset using blockchain transactions
Sadath et al. Scalability in Blockchain-Hyperledger Fabric and Hierarchical Model
Dong et al. The secure data sharing and interchange model based on blockchain for single window in trade facilitation
Kumar Hyperledger Fabric In-Depth: Learn, Build and Deploy Blockchain Applications Using Hyperledger Fabric
Banaeian Far et al. A generic framework for blockchain-assisted on-chain auditing for off-chain storage

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees