TWI709868B - Data storage method and device based on blockchain - Google Patents
Data storage method and device based on blockchain Download PDFInfo
- Publication number
- TWI709868B TWI709868B TW108108445A TW108108445A TWI709868B TW I709868 B TWI709868 B TW I709868B TW 108108445 A TW108108445 A TW 108108445A TW 108108445 A TW108108445 A TW 108108445A TW I709868 B TWI709868 B TW I709868B
- Authority
- TW
- Taiwan
- Prior art keywords
- data
- block
- blockchain
- target data
- chain
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q20/00—Payment architectures, schemes or protocols
- G06Q20/38—Payment protocols; Details thereof
- G06Q20/389—Keeping log of transactions for guaranteeing non-repudiation of a transaction
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q40/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/04—Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
Landscapes
- Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Finance (AREA)
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Strategic Management (AREA)
- General Business, Economics & Management (AREA)
- Development Economics (AREA)
- Technology Law (AREA)
- Marketing (AREA)
- Economics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
- Information Transfer Between Computers (AREA)
Abstract
本說明書的一個或多個實施例提供了一種基於區塊鏈的資料存證方法和裝置,上述方法包括:接收目標節點提議的候選區塊,所述候選區塊的區塊頭包括目標資料的詮釋資料,所述候選區塊的區塊體包括所述目標資料的內容;發起對所述候選區塊的共識處理;回應於所述候選區塊共識處理通過的共識結果,將所述候選區塊作為最新區塊儲存至所述區塊鏈的分散式資料庫,以完成針對所述目標資料的資料存證。One or more embodiments of this specification provide a blockchain-based data storage method and device. The method includes: receiving a candidate block proposed by a target node, and the block header of the candidate block includes an interpretation of the target data Data, the block body of the candidate block includes the content of the target data; initiates a consensus process on the candidate block; responds to the consensus result passed by the candidate block consensus process, the candidate block As the latest block, it is stored in the distributed database of the blockchain to complete the data storage of the target data.
Description
本說明書係有關網路通信技術領域,尤其有關一種基於區塊鏈的資料存證方法和裝置。 This manual is related to the field of network communication technology, especially a method and device for data storage based on blockchain.
在網際網路資訊時代,資訊流非常多且真假混合,很多錯誤虛假資訊導致用戶難以甄別有效真實可用的資訊,一個比較常見的情況是各類房產資訊網,一套房源可能有多個仲介發佈,且各個仲介發佈的資訊均不盡相同,這樣用戶難以區分哪些才是真實的資訊。 In the Internet information age, there are many information flows and a mixture of true and false information. Many false and false information make it difficult for users to distinguish effective and true information. A common situation is various real estate information networks. There may be multiple listings in a set The information released by the intermediary, and the information released by each intermediary is not the same, so it is difficult for users to distinguish what is the real information.
針對以上提出的問題,本說明書提供了一種基於區塊鏈的資料存證方法,包括:接收目標節點提議的候選區塊,所述候選區塊的區塊頭包括目標資料的詮釋資料,所述候選區塊的區塊體包括所述目標資料的內容;發起對所述候選區塊的共識處理;回應於所述候選區塊共識處理通過的共識結果,將所述候選區塊作為最新區塊儲存至所述區塊鏈的分散式資料 庫,以完成針對所述目標資料的資料存證。 In response to the above-mentioned problems, this specification provides a blockchain-based data storage method, including: receiving a candidate block proposed by a target node, the block header of the candidate block includes interpretation data of the target data, and the candidate block The block body of the block includes the content of the target data; initiates consensus processing on the candidate block; in response to the consensus result passed by the candidate block consensus processing, the candidate block is stored as the latest block Decentralized data to the blockchain Database to complete the data deposit for the target data.
較佳地,所述詮釋資料包括所述目標資料的唯一標識;或者,所述目標資料的唯一標識的資料摘要。 Preferably, the interpretation data includes a unique identifier of the target data; or, a data summary of the unique identifier of the target data.
較佳地,所述候選區塊的區塊體包括實例化的目標資料。 Preferably, the block body of the candidate block includes instantiated target data.
較佳地,所述方法還包括:當所述區塊鏈上的任一目標區塊連接有多個子區塊,統計所述多個子區塊所在支鏈上的子區塊的數量;將所述子區塊的數量先達到預設閾值的支鏈,確定為所述區塊鏈的主鏈。 Preferably, the method further includes: when any target block on the blockchain is connected to multiple sub-blocks, counting the number of sub-blocks on the branch chain where the multiple sub-blocks are located; The branch chain whose number of the sub-blocks first reaches the preset threshold is determined as the main chain of the block chain.
較佳地,所述目標資料為房產資料,所述目標資料的詮釋資料包括房產地址,或者房產地址的資料摘要。 Preferably, the target data is real estate data, and the interpretation data of the target data includes a real estate address or a data summary of the real estate address.
較佳地,所述區塊鏈為聯盟鏈,所述聯盟鏈的聯盟成員包括房產仲介公司。 Preferably, the blockchain is a consortium chain, and alliance members of the consortium chain include real estate agency companies.
較佳地,所述共識處理基於PBFT演算法來進行。 Preferably, the consensus processing is performed based on the PBFT algorithm.
本說明書還提供了一種基於區塊鏈的目標資料存證裝置,包括:接受單元,接收目標節點提議的候選區塊,所述候選區塊的區塊頭包括目標資料的詮釋資料,所述候選區塊的區塊體包括所述目標資料的內容;發起共識單元,發起對所述候選區塊的共識處理;儲存單元,回應於所述候選區塊共識處理通過的共識結果,將所述候選區塊作為最新區塊儲存至所述區塊鏈的分散式資料庫,以完成針對所述目標資料的資料存證。 This specification also provides a block chain-based target data storage device, including: an accepting unit that receives a candidate block proposed by the target node, the block header of the candidate block includes interpretation data of the target data, and the candidate block The block body of the block includes the content of the target data; the initiating consensus unit initiates the consensus processing of the candidate block; the storage unit responds to the consensus result passed by the candidate block consensus processing, and transfers the candidate area The block is stored as the latest block in the distributed database of the blockchain to complete the data storage of the target data.
較佳地,所述詮釋資料包括所述目標資料的唯一標識;或者,所述目標資料的唯一標識的資料摘要。 Preferably, the interpretation data includes a unique identifier of the target data; or, a data summary of the unique identifier of the target data.
較佳地,所述候選區塊的區塊體包括實例化的目標資料。 Preferably, the block body of the candidate block includes instantiated target data.
較佳地,所述裝置還包括:主鏈確定單元,當所述區塊鏈上的任一目標區塊連接有多個子區塊,統計所述多個子區塊所在支鏈上的子區塊的數量;將所述子區塊的數量先達到預設閾值的支鏈,確定為所述區塊鏈的主鏈。 Preferably, the device further includes: a main chain determining unit, when any target block on the blockchain is connected with multiple sub-blocks, count the sub-blocks on the branch where the multiple sub-blocks are located The number of sub-blocks; the branch chain whose number of the sub-blocks first reaches the preset threshold is determined as the main chain of the block chain.
較佳地,所述目標資料為房產資料,所述目標資料的詮釋資料包括房產地址,或者房產地址的資料摘要。 Preferably, the target data is real estate data, and the interpretation data of the target data includes a real estate address or a data summary of the real estate address.
較佳地,所述區塊鏈為聯盟鏈,所述聯盟鏈的聯盟成員包括房產仲介公司。 Preferably, the blockchain is a consortium chain, and alliance members of the consortium chain include real estate agency companies.
較佳地,所述共識處理基於PBFT演算法來進行。 Preferably, the consensus processing is performed based on the PBFT algorithm.
相應地,本說明書還提供了一種電腦設備,包括:記憶體和處理器;所述記憶體上儲存有可由處理器運行的電腦程式;所述處理器運行所述電腦程式時,執行如上基於區塊鏈的資料存證方法所述的步驟。 Correspondingly, this specification also provides a computer device, including: a memory and a processor; the memory stores a computer program that can be run by the processor; when the processor runs the computer program, it executes the above-mentioned region-based The steps described in the data storage method of the block chain.
相應地,本說明書還提供了一種電腦可讀儲存媒體,其上儲存有電腦程式,所述電腦程式被處理器運行時,執行如上述基於區塊鏈的資料存證方法所述的步驟。 Correspondingly, this specification also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is run by a processor, the steps described in the above-mentioned blockchain-based data storage method are executed.
應用本說明書所提供的基於區塊鏈的資料存證方法、裝置、電腦設備和電腦可讀儲存媒體,利用去中心化的區塊鏈分散式資料庫儲存、存證資料資訊,摒棄了中心化資 料庫儲存可能出現的對資料資訊的任意改動;利用區塊鏈的共識處理對資料進行識別存證,避免了用戶在不同的網路平臺伺服器中對同一個對象(如房產)描述的情形不盡相同而不知哪一個為真實的缺陷;且在本說明書提供的多個實施例中,將資料資訊的詮釋資料保存在區塊頭中,更加方便了包括區塊鏈輕節點在內任意區塊鏈節點設備對目標資料資訊的檢索。 Apply the blockchain-based data storage methods, devices, computer equipment and computer readable storage media provided in this manual, and use the decentralized blockchain distributed database to store and record data information, abandoning centralization Capital Arbitrary changes to data and information that may occur in the storage of the database; use the consensus processing of the blockchain to identify and store the data, avoiding the situation that users describe the same object (such as real estate) in different network platform servers I don’t know which one is the real defect; and in the multiple embodiments provided in this specification, the interpretation data of the data information is stored in the block header, which makes it more convenient for any block including the light node of the blockchain Retrieval of target data information by chain node equipment.
區塊鏈技術,也被稱之為分散式帳本技術,是一種由若干台計算設備共同參與“記帳”,共同維護一份完整的分散式資料庫的新興技術。由於區塊鏈技術具有去中心化、公開透明、每台計算設備可以參與資料庫記錄、並且各計算設備之間可以快速地進行資料同步的特性,使得區 塊鏈技術已在眾多的領域中廣泛地進行應用。 Blockchain technology, also known as distributed ledger technology, is an emerging technology in which several computing devices participate in "bookkeeping" and jointly maintain a complete distributed database. Because the blockchain technology has the characteristics of decentralization, openness and transparency, each computing device can participate in database recording, and the data can be synchronized quickly between computing devices, making the district Blockchain technology has been widely used in many fields.
為了克服現有的網際網路路中,同一筆資料資訊由多方發佈且真假難辨的問題,本說明書提供了一種基於區塊鏈的資料存證方法。如圖1所示,本說明書提供的實施例示意了一種基於區塊鏈的資料存證方法,包括:步驟102,接收目標節點提議的候選區塊,所述候選區塊的區塊頭包括目標資料的詮釋資料,所述候選區塊的區塊體包括所述目標資料的內容。 In order to overcome the problem that the same piece of data information is released by multiple parties and is difficult to distinguish between true and false in the existing Internet, this manual provides a method for data storage based on blockchain. As shown in Figure 1, the embodiment provided in this specification illustrates a blockchain-based data storage method, including: step 102, receiving a candidate block proposed by a target node, and the block header of the candidate block includes the target data Interpretation data, the block body of the candidate block includes the content of the target data.
本說明書提供的實施例所述的“區塊鏈”,具體可指一個各節點透過共識機制達成的、具有分散式資料儲存結構的P2P網路系統,且該系統內的資料透過加密演算法來進行儲存或傳輸,該區塊鏈內的資料分佈在時間上相連的一個個“區塊(block)”之內,後一個區塊包含前一個區塊的資料摘要,且根據具體的共識機制(如POW、POS、DPOS或PBFT等)的不同,達成全部或部分節點的資料全備份。本發明所屬技術領域中具有通常知識者熟知,由於區塊鏈系統在相應共識機制下運行,已收錄至區塊鏈資料庫內的資料很難被任意的節點篡改,例如採用Pow共識的區塊鏈,至少需要全網51%算力的攻擊才有可能篡改已有資料,因此區塊鏈系統有著其他中心化資料庫系統所無法比擬的保證資料安全、防攻擊篡改的特性。透過將待存證的資料(目標資料)保存在區塊鏈上,通過共識達成該區塊鏈的所有成員或大部分成員對資料的認可,可有效防止前述的網際網路上的資料真假難辨的問題。 The "blockchain" described in the examples provided in this specification can specifically refer to a P2P network system with a distributed data storage structure reached by each node through a consensus mechanism, and the data in the system is obtained through an encryption algorithm For storage or transmission, the data in the blockchain is distributed in time-connected "blocks". The next block contains the data summary of the previous block and is based on the specific consensus mechanism ( Such as POW, POS, DPOS or PBFT, etc.) to achieve full backup of all or part of the node data. Those with ordinary knowledge in the technical field to which the present invention pertains are well known. Because the blockchain system operates under the corresponding consensus mechanism, the data that has been included in the blockchain database is difficult to be tampered with by any node, such as a block using Pow consensus. The blockchain requires at least 51% of the entire network's computing power to attack the existing data. Therefore, the blockchain system has the characteristics of ensuring data security and anti-attack tampering that other centralized database systems cannot match. By storing the data to be certified (target data) on the blockchain, all members or most of the members of the blockchain can recognize the data through consensus, which can effectively prevent the authenticity of the aforementioned data on the Internet. The problem of identification.
本說明書提供的實施例可以運行在任何具有計算和儲存能力的設備上,如手機、平板電腦、PC(Personal Computer,個人電腦)、筆記型電腦、伺服器等設備;還可以由運行在兩個或兩個以上設備的邏輯節點來實現本說明書實施例中的各項功能。 The embodiments provided in this manual can run on any device with computing and storage capabilities, such as mobile phones, tablets, PCs (Personal Computers, personal computers), notebook computers, servers and other devices; it can also be run on two devices. Or the logical nodes of two or more devices to realize the functions in the embodiments of this specification.
上述實施例中的目標節點是指在上述區塊鏈中具有資料提議權限的節點,目標資料是指待存證入區塊鏈的區塊體的資料。該節點提議的候選區塊包括區塊頭和區塊體。區塊頭通常封裝了該區塊鏈系統目前的版本號、前一個區塊的地址或資料摘要、本區塊的區塊體的資料摘要(如交易的Merkel Root)等資訊,在本說明書中不作限定。在本發明提供的實施例中,候選區塊的區塊頭還封裝有目標資料的詮釋資料,用以描述上述待存證的目標資料。 The target node in the foregoing embodiment refers to a node with data proposal authority in the foregoing blockchain, and the target data refers to the data of the block body to be deposited into the blockchain. The candidate block proposed by the node includes block header and block body. The block header usually encapsulates the current version number of the blockchain system, the address or data summary of the previous block, the data summary of the block body of this block (such as the Merkel Root of the transaction) and other information, which is not included in this manual. limited. In the embodiment provided by the present invention, the block header of the candidate block also encapsulates interpretation data of the target data to describe the target data to be certified.
詮釋資料為描述資料的資料(data about data),主要是描述資料屬性(property)的資訊,用來支援如指示儲存位置、歷史資料、資源查找、文件記錄等功能。在區塊頭中封裝目標資料的詮釋資料,且區塊頭內的資料如區塊摘要、詮釋資料等均可作為檢索對象,可以使用戶方便地獲知該區塊所收錄或存證的目標資料內容、便於對目標資料內容的檢索、查找。而且,一些區塊鏈系統的用戶,受限於自身的權限或硬體設定,選擇在本地安裝輕節點形式的用戶端,該輕節點用戶端通常僅保存區塊鏈在一段時間內的區塊的區塊頭資料,對於以往區塊頭僅封裝有本區塊的父區塊的區塊摘要及本區塊的區塊體內所包括交易的數學摘要的情況,輕節點用戶並不能獲知其在本地保存的區塊鏈所存證的目標資料的概況;本說明書實施例所提供的將目標資料的詮釋資料資訊封裝保存於區塊頭的實施例,可以更加方便上述輕節點用戶對區塊鏈所儲存資料的查閱與檢索。 在本說明書提供的上述實施例中,區塊鏈的節點提議的候選區塊的區塊體中應存證所述目標資料的內容,本發明所屬技術領域中具有通常知識者易知,上述目標資料的內容是以“交易”的形式儲存在區塊體中。在本說明書中所描述的交易(transfer),是指用戶透過區塊鏈的用戶端創建,並需要最終發佈至區塊鏈的分散式資料庫中的一筆資料。其中,區塊鏈中的交易,存在狹義的交易以及廣義的交易之分。狹義的交易是指用戶向區塊鏈發佈的一筆價值轉移;例如,在傳統的比特幣區塊鏈網路中,交易可以是用戶在區塊鏈中發起的一筆轉帳。而廣義的交易是指用戶向區塊鏈發佈的一筆具有業務意圖的業務資料;例如,運營方可以基於實際的業務需求來搭建一個聯盟鏈,依託於聯盟鏈部署一些與價值轉移無關的其它類型的線上業務(比如,租房業務、車輛調度業務、保險理賠業務、信用服務、醫療服務等),而在這類聯盟鏈中,交易可以是用戶在聯盟鏈中發佈的一筆具有業務意圖的業務訊息或者業務請求。在本說明書中並不限定該交易的具體內容,任何形式或內容的目標資料均可作為交易存證於本說明書所述的區塊鏈中。 步驟104,發起對所述候選區塊的共識處理。 在上述區塊鏈的各節點設備接收到候選區塊後,該區塊鏈系統應發起對候選區塊的共識處理。本說明書並不限定上述共識處理所遵循的共識機制準則,任何能實現本說明書提供的實施例所描述的技術方案的共識機制或共識演算法,均在本說明書保護的範圍內。 以下,本說明書以PBFT共識演算法為例,簡述上述對候選區塊的共識處理過程。聯盟鏈通常選用PBFT作為自身的共識機制,以增加網路的輸送量。 在實現時,在區塊鏈的每一輪共識開始之前,可以在區塊鏈中的各節點設備中選舉出一台主節點設備(比如,每一輪共識都重新選舉出一主節點設備,其它節點設備作為從節點設備),由主節點設備向發起交易共識,並負責基於共識通過的交易資料(或目標資料)為區塊鏈創建最新的區塊。 例如,基於PBFT演算法,在聯盟鏈每一輪共識開始之前,可以基於以下的公式,為本輪公式計算出一個主節點設備: P=v mod R 其中,P表示計算出的本輪共識的主節點編號;v表示聯盟鏈目前的視圖編號;視圖編號通常是一個連續編號的整數,表示聯盟鏈已經成功完成共識的輪數;比如,在成功完成一輪共識,選舉出的主節點設備向聯盟鏈成功寫入一個新的區塊之後,可以將視圖編號自動加1。R表示聯盟鏈中的節點設備的總數量。 各個節點設備可以分別執行以上計算,並將計算出的主節點編號與本設備的編號進行匹配來確定本設備是否被選舉為主節點設備。 一方面,如果一節點設備確定本設備未被選舉為主節點設備,則可以將收到的由用戶端提交的交易向聯盟鏈中的各個節點設備進行廣播發送。 另一方面,如果一節點設備確定本設備被選舉為主節點設備,則可以收集各個用戶用戶端在本輪的共識時間段內廣播發送的交易,並基於收集到的交易來創建交易清單。此時,創建的交易清單即為主節點設備提議的需要進行共識處理的交易資料。 PBFT演算法一般可分為預準備(pre-prepare)、準備(prepare)、和確認(commit)等三個階段。 主節點設備將交易清單攜帶在Pre-Prepare訊息中,然後將該Pre-Prepare訊息在聯盟鏈中的各個節點設備中進行廣播發送,將完整的交易清單傳播至聯盟鏈中需要參與交易共識的從節點設備。 接收到上述Pre-Prepare訊息的從節點設備,首先可以遵循PBFT演算法的規定,對接收到的Pre-Prepare訊息進行驗證,以確定是否接受接收到的Pre-Prepare訊息。 其中,在本說明書中,對接收到的Pre-Prepare訊息進行驗證,即為對接收到的Pre-Prepare訊息中攜帶的內容進行驗證的過程; 例如,遵循PBFT演算法的規定,在Pre-Prepare訊息中,可以攜帶待共識的交易資料(本說明書中為目標資料)、視圖編號v、數位簽章等資訊。相應地,在本說明書中,在對Pre-Prepare訊息進行驗證時,具體可以執行以下的驗證過程: 1)驗證視圖編號V與本地記錄的視圖編號是否一致; 2)對Pre-Prepare訊息中的數位簽章進行驗證; 3)對Pre-Prepare訊息中攜帶的目標資料進行有效性驗證; 上述對目標資料的有效性驗證,可以理解為各個從節點設備對目標資料的準確性、有效性等方面進行驗證,在目標資料被正式收錄到上述區塊鏈之前,以期獲得一份受區塊鏈的多數成員的認可(在PBFT演算法中,至少為2F+1個成員的認可,F為該區塊鏈系統的拜占庭容錯數)的目標資料。 當接收到上述Pre-Prepare訊息的節點設備,在執行以上列舉出的驗證過程後,如果驗證通過,表示該節點設備接受上述Pre-Prepare訊息(對上述目標資料認可),此時該節點設備可以進入PBFT協定的Prepare階段,向聯盟鏈中的其它各個節點設備廣播發送一條用以對上述Pre-Prepare訊息進行確認的Prepare訊息;其中,上述Prepare訊息中攜帶的內容格式,可以與上述Pre-Prepare訊息保持一致。各節點設備也可以接收由其它各從節點設備廣播發送的Prepare訊息,對接收到的Prepare訊息進行驗證,以確定是否接受接收到的Prepare訊息。其中,對接收到的Prepare訊息進行驗證的具體過程,可以參考對Pre-Prepare訊息進行驗證的具體過程,在本說明書中不再進行贅述。 聯盟鏈中的節點設備在向聯盟鏈中的其它各個節點設備廣播發送commit訊息之後,也可以接收由其它各節點設備廣播發送的commit訊息訊息,對接收到的commit訊息進行驗證,以確定是否接受接收到的commit訊息。 其中,上述commit訊息中攜帶的內容格式,可以與Pre-Prepare訊息和Prepare訊息保持一致。其中,對收到commit訊息進行驗證的具體過程,可以參考對Pre-Prepare訊息進行驗證的具體過程,在本說明書中不再進行贅述。 如果驗證通過,表示該節點設備接受收到的commit訊息,該節點設備還可以進一步確定接收到的由其它各節點設備廣播發送的commit訊息的數量,是否達到2F+1個(包括自身廣播的commit訊息在內),F為該區塊鏈系統的拜占庭容錯數。 透過以上的共識過程,區塊鏈的所有節點設備獲得了一份經大多數節點設備認可的目標資料,避免了用戶在不同的網路平臺伺服器中對同一個對象的目標資料描述的情形不盡相同而不知哪一個為真實的缺陷。 步驟106,回應於所述候選區塊共識處理通過的共識結果,將所述候選區塊作為最新區塊儲存至所述區塊鏈的分散式資料庫,以完成針對所述目標資料的資料存證。 區塊鏈的共識處理機制、及分散式儲存備份的機制確保了任何用戶很難對該認可後的目標資料進行篡改,從而為用戶獲取真實有效的資料提供了存證。例如採用Pow共識的區塊鏈,至少需要全網51%算力的攻擊才有可能篡改已有資料,因此區塊鏈系統有著其他中心化資料庫系統所無法比擬的保證資料安全、防攻擊篡改的特性。上述採用PBFT共識的區塊鏈,透過主節點與從節點對交易資料的確認,達到了全鏈對交易資料的強一致,因此避免了用戶在不同的網路平臺伺服器中對同一個對象的目標資料描述的情形不盡相同而不知哪一個為真實的缺陷。透過將待存證的資料(目標資料)保存在區塊鏈上,通過共識達成該區塊鏈的所有成員或大部分成員對資料的認可,可有效防止前述的網際網路上的資料真假難辨的問題 在又一示出的實施例中,上述區塊頭所封裝收錄的目標資料的詮釋資料資訊包括目標資料的唯一標識,或者目標資料的唯一標識的資料摘要,更加方便了區塊鏈用戶端用戶對區塊鏈所收錄資訊的檢索。 以下以區塊鏈為房產資訊做存證的業務情況為例,論述本技術方案的實施例。對於同一個房產的同一個特徵,如面積、戶型、報價等,應在網路中保證唯一的描述,以防止任何用戶在查詢房產資訊時出現對同一個房產資訊的同一個特徵的不同描述,難辨真偽。為降低交易或目標資料的確認時間、提高交易輸送量、滿足對安全和性能的需求,通常選用聯盟鏈架構來建構該區塊鏈。在上述買賣房產的業務情況中,房產仲介公司、房屋交易監督機構等信用較高的機構,可作為該聯盟鏈的聯盟成員節點,參與區塊的記帳。例如,聯盟鏈的共識過程可參照上述的根據PBFT演算法的共識過程進行。聯盟鏈可以根據應用情況來決定對公眾的開放程度,對可開放的機構或個人給予存取該聯盟鏈的權限,對於可存取的節點還可分為一般節點和輕節點,輕節點一般不具有參與聯盟鏈記帳的權限,且一般保存有該聯盟鏈在一段時期內的區塊的區塊頭資料,以節省儲存空間。 Interpretation data is data about data, which mainly describes information about data properties, and is used to support functions such as indicating storage locations, historical data, resource search, and document recording. Encapsulate the interpretation data of the target data in the block header, and the data in the block header, such as block summary, interpretation data, etc., can be used as retrieval objects, allowing users to easily know the content of the target data included or recorded in the block, It is convenient to retrieve and find the content of the target data. Moreover, some users of the blockchain system, limited by their own authority or hardware settings, choose to install a client in the form of a light node locally. The light node client usually only saves the blocks of the blockchain within a period of time. In the past, the block header only encapsulated the block summary of the parent block of the block and the mathematical summary of the transaction included in the block body of the block, the light node user cannot know that it is stored locally An overview of the target data stored in the blockchain; the embodiment of this specification provides the embodiment of encapsulating and storing the interpretation data information of the target data in the block header, which can make it more convenient for the light node users to access the data stored in the blockchain Look up and retrieve. In the above-mentioned embodiment provided in this specification, the content of the target data should be stored in the block body of the candidate block proposed by the node of the blockchain. Those with ordinary knowledge in the technical field of the present invention can easily know that the above-mentioned target The content of the data is stored in the block body in the form of "transactions". The transfer described in this manual refers to a piece of data created by the user through the client terminal of the blockchain and needs to be finally released to the distributed database of the blockchain. Among them, transactions in the blockchain are divided into narrow transactions and broad transactions. A narrowly defined transaction refers to a transfer of value issued by a user to the blockchain; for example, in a traditional Bitcoin blockchain network, a transaction can be a transfer initiated by the user in the blockchain. In a broad sense, a transaction refers to a piece of business data with business intent released by a user to the blockchain; for example, an operator can build a consortium chain based on actual business needs, and rely on the consortium chain to deploy other types that are not related to value transfer Online business (for example, rental business, vehicle scheduling business, insurance claims business, credit services, medical services, etc.), and in this type of alliance chain, a transaction can be a business message with business intent issued by the user in the alliance chain Or business request. This manual does not limit the specific content of the transaction, and any form or content of target data can be used as transaction evidence in the blockchain described in this manual. Step 104: Initiate consensus processing on the candidate block. After each node device of the aforementioned blockchain receives the candidate block, the blockchain system should initiate a consensus process on the candidate block. This specification does not limit the consensus mechanism criteria followed by the aforementioned consensus processing, and any consensus mechanism or consensus algorithm that can implement the technical solutions described in the embodiments provided in this specification is within the protection scope of this specification. Hereinafter, this manual uses the PBFT consensus algorithm as an example to briefly describe the above consensus processing process for candidate blocks. The alliance chain usually chooses PBFT as its own consensus mechanism to increase the network throughput. In implementation, before the start of each round of consensus in the blockchain, a master node device can be elected from each node device in the blockchain (for example, a master node device is re-elected for each round of consensus, and other nodes As the slave node device, the master node device initiates a transaction consensus, and is responsible for creating the latest block for the blockchain based on the transaction data (or target data) passed by the consensus. For example, based on the PBFT algorithm, before the start of each round of consensus in the alliance chain, a master node device can be calculated for this round based on the following formula: P=v mod R Among them, P represents the calculated master node number of the current round of consensus; v represents the current view number of the alliance chain; the view number is usually an integer numbered consecutively, indicating that the alliance chain has successfully completed the number of rounds of consensus; for example, after successful completion In a round of consensus, after the elected master node device successfully writes a new block to the alliance chain, the view number can be automatically increased by 1. R represents the total number of node devices in the alliance chain. Each node device can perform the above calculation separately, and match the calculated master node number with the number of the device to determine whether the device is elected as the master node device. On the one hand, if a node device determines that the device is not elected as the master node device, it can broadcast the received transaction submitted by the user to each node device in the alliance chain. On the other hand, if a node device determines that the device is elected as the master node device, it can collect the transactions broadcasted by each user client during the current round of consensus time period, and create a transaction list based on the collected transactions. At this time, the created transaction list is the transaction data proposed by the master node device that requires consensus processing. The PBFT algorithm can generally be divided into three stages: pre-prepare, prepare, and commit. The master node device carries the transaction list in the Pre-Prepare message, and then broadcasts the Pre-Prepare message to each node device in the alliance chain, and broadcasts the complete transaction list to the slaves in the alliance chain that need to participate in the transaction consensus. Node device. The slave node device that receives the above-mentioned Pre-Prepare message can first follow the PBFT algorithm to verify the received Pre-Prepare message to determine whether to accept the received Pre-Prepare message. Among them, in this manual, verifying the received Pre-Prepare message is the process of verifying the content carried in the received Pre-Prepare message; For example, in accordance with the PBFT algorithm, the Pre-Prepare message can carry information such as transaction data to be agreed (target data in this manual), view number v, and digital signature. Correspondingly, in this manual, when verifying the Pre-Prepare message, the following verification process can be specifically performed: 1) Verify that the view number V is consistent with the view number recorded locally; 2) Verify the digital signature in the Pre-Prepare message; 3) Verify the validity of the target data carried in the Pre-Prepare message; The above verification of the validity of the target data can be understood as the verification of the accuracy and validity of the target data by each slave node device, in order to obtain a copy of the target data before the target data is officially included in the blockchain. The target data for the approval of the majority of the members of the chain (in the PBFT algorithm, at least the approval of 2F+1 members, and F is the Byzantine fault tolerance of the blockchain system). When a node device that receives the above-mentioned Pre-Prepare message performs the verification process listed above, if the verification passes, it means that the node device accepts the above-mentioned Pre-Prepare message (recognizes the above-mentioned target data), and the node device can Enter the Prepare phase of the PBFT agreement, broadcast and send a Prepare message for confirming the above Pre-Prepare message to other nodes in the alliance chain; wherein, the content format carried in the above Prepare message can be the same as the above Pre-Prepare The message remains consistent. Each node device can also receive Prepare messages broadcasted by other slave node devices, and verify the received Prepare messages to determine whether to accept the received Prepare messages. Among them, the specific process of verifying the received Prepare message can refer to the specific process of verifying the Pre-Prepare message, which will not be repeated in this specification. After the node device in the alliance chain broadcasts and sends the commit message to the other node devices in the alliance chain, it can also receive the commit message broadcasted by other node devices, and verify the received commit message to determine whether to accept Commit message received. Among them, the content format carried in the commit message can be consistent with the Pre-Prepare message and the Prepare message. Among them, the specific process of verifying the received commit message can refer to the specific process of verifying the Pre-Prepare message, which will not be repeated in this specification. If the verification is passed, it means that the node device accepts the received commit message. The node device can further determine whether the number of received commit messages broadcasted by other node devices reaches 2F+1 (including the commit message broadcast by itself). Information), F is the Byzantine fault tolerance of the blockchain system. Through the above consensus process, all node devices of the blockchain have obtained a target data recognized by most node devices, avoiding the situation that users describe the target data of the same object in different network platform servers. Do the same without knowing which one is the real defect. Step 106: In response to the consensus result of the candidate block consensus process, the candidate block is stored as the latest block in the distributed database of the blockchain to complete the data storage for the target data. certificate. The consensus processing mechanism of the blockchain and the mechanism of distributed storage and backup ensure that it is difficult for any user to tamper with the approved target data, thereby providing evidence for users to obtain true and effective data. For example, a blockchain using Pow consensus requires at least 51% of the entire network's computing power to tamper with existing data. Therefore, the blockchain system has incomparable guarantees of data security and protection against attack and tampering that other centralized database systems cannot match. Characteristics. The above-mentioned blockchain adopting PBFT consensus, through the confirmation of transaction data by the master node and the slave node, achieves a strong consistency of transaction data across the entire chain, thus avoiding users from different network platform servers for the same object The situation described by the target material is not the same, and it is not known which one is the real defect. By storing the data to be certified (target data) on the blockchain, all members or most of the members of the blockchain can recognize the data through consensus, which can effectively prevent the authenticity of the aforementioned data on the Internet. Problem of discrimination In another illustrated embodiment, the interpretive data information of the target data encapsulated and included in the block header includes the unique identification of the target data, or the data summary of the unique identification of the target data, which makes it more convenient for the blockchain client user to check Retrieval of information contained in the blockchain. In the following, an example of the business situation where the blockchain serves as a deposit certificate for real estate information is used to discuss the embodiments of the technical solution. For the same feature of the same property, such as area, house type, quotation, etc., a unique description should be guaranteed on the Internet to prevent any user from having different descriptions of the same feature of the same property information when inquiring about the property information. Difficult to distinguish authenticity. In order to reduce the confirmation time of the transaction or target data, increase the transaction throughput, and meet the requirements for security and performance, the alliance chain architecture is usually used to construct the blockchain. In the above-mentioned business situation of buying and selling real estate, institutions with higher credit such as real estate agency companies and housing transaction supervision agencies can serve as alliance member nodes of the alliance chain and participate in block accounting. For example, the consensus process of the alliance chain can refer to the aforementioned consensus process based on the PBFT algorithm. The consortium chain can determine the degree of openness to the public according to the application situation, and grant access to the consortium chain to open institutions or individuals. The accessible nodes can also be divided into general nodes and light nodes. Light nodes generally do not It has the authority to participate in the accounting of the alliance chain, and generally saves the block header data of the block of the alliance chain in a period of time to save storage space.
PBFT演算法作為本說明書所提供的聯盟鏈的共識演算法的一種較佳的實施方式,是由於採用該種演算法共識的效率高,可滿足高頻交易量的需求,例如在本實施例中各房產仲介公司頻繁產生房產資訊(交易);且共識的時延很低,基本達到即時處理的要求,能快速即時地在區塊鏈的新生區塊中收錄上述房產資料資訊;而且,將聯盟鏈網路中可信節點如房產交易的監管機構作為預選的記帳節點,兼顧了安全性與穩定性;另外,採用PBFT演算法不會消耗過多的電腦算力資源,也不一定需要代幣流通,因此具有良好的可使用性。 The PBFT algorithm, as a preferred implementation of the consensus algorithm of the alliance chain provided in this specification, is due to the high efficiency of adopting this algorithm consensus and can meet the needs of high-frequency trading volume. For example, in this embodiment Real estate agency companies frequently generate real estate information (transactions); and the consensus delay is very low, which basically meets the requirements of real-time processing, and can quickly and instantly collect the above-mentioned real estate information in the new block of the blockchain; moreover, the alliance Trusted nodes in the chain network, such as real estate transaction regulators, serve as pre-selected accounting nodes, taking into account security and stability; in addition, the use of PBFT algorithm will not consume too much computer computing resources, and does not necessarily require token circulation , So it has good workability.
透過區塊鏈的共識機制,可保證對於同一個房產資訊的同一個特徵(如房屋的報價資訊),在區塊鏈上僅存證一種經過成員節點共識後的描述。在上述業務情況下,聯盟鏈的每個區塊的區塊頭內收錄的上述詮釋資訊可以為房產的地址資訊,或房產地址的數字摘要如雜湊值,由於房產的地址資訊為一處房產的唯一性標識,透過該資訊可唯一 確定一處房產。用戶透過用戶端在包含區塊頭的區塊鏈資料庫內檢索該房產的地址資訊或房產地址的雜湊值後,可獲取到與該房產對應的一個或多個區塊,再到查詢到的該區塊的區塊體內查詢該房產的具體資訊,如房屋住址、房產人資訊、戶型、面積、價格等。 Through the consensus mechanism of the block chain, it can be ensured that for the same feature of the same real estate information (such as the quotation information of the house), only one description after the consensus of the member nodes is stored on the block chain. In the above business situation, the above-mentioned interpretation information contained in the block header of each block of the alliance chain can be the address information of the real estate, or the digital summary of the real estate address such as hash value, because the address information of the real estate is unique to a real estate Sexual identification, through the information can be unique Identify a property. After the user retrieves the address information of the real estate or the hash value of the real estate address in the blockchain database containing the block header through the client, one or more blocks corresponding to the real estate can be obtained, and then the query found Query the specific information of the real estate in the block of the block, such as house address, real estate owner information, house type, area, price, etc.
值得注意的是,為便於本說明書提供的資料存證方法在不同業務情況中的應用,區塊體中包含的目標資料資訊或交易資訊可以採用依據業務情況而實例化的格式,例如,在上述為房產資訊做存證的業務情況的區塊鏈的區塊體中,如圖2所示,可為房產的內容設定包括地址、戶型、面積、房產人、報價資訊在內的實例化內容範本;進一步地,還可以為房屋的地址設定如“xx省xx市xx區xx街xx房”格式的實例化描述,為房屋戶型設定如“xx房xx廳xx衛xx陽臺”等格式的實例化描述,等等,從而便於房產仲介機構在提議關於一目標房產資訊的候選區塊時不會遺漏某些重要資訊,從而使得關於該目標房產資訊的所有資訊均保存在同一個區塊內,更加方便的用戶的查閱。 It is worth noting that, in order to facilitate the application of the data storage method provided in this manual in different business situations, the target data information or transaction information contained in the block body can adopt a format that is instantiated according to the business situation, for example, in the above In the block body of the blockchain of the business situation for depositing real estate information, as shown in Figure 2, the content of the real estate can be set up for instance content templates including address, house type, area, real estate owner, and quotation information. Further, you can also set the instantiation description of the format of "xx street xx room, xx district, xx city, xx province, xx province" for the address of the house, and set the instantiation description of the format of "xx room xx hall xx bathroom xx balcony" for the house type Description, etc., so that the real estate agency will not omit certain important information when proposing a candidate block of target real estate information, so that all information about the target real estate information is stored in the same block, which is more Convenient user access.
以上的實施例中提出,透過區塊鏈的共識機制,可保證對於同一個房產資訊的同一個特徵(如房屋的報價資訊),在區塊鏈上僅存證一種經過成員節點共識後的描述,但是也不排除極個別的情況下,由於該區塊鏈所採取的具體的共識機制所導致的,不同的房產仲介對同一個房產資訊的同一個特徵的不同描述均被收錄至上述區塊鏈,即上述區塊鏈出現分叉:即出現所述區塊鏈上的某一個目標區塊連接有超過一個的子區塊。在這種情況下,本說明書的一個實施例提供以下方案用以解決上述的分叉問題:當所述區塊鏈上的任一目標區塊連接有多個子區塊,統計所述多個子區塊所在支鏈上的子區塊的數量;將所述子區塊的數量先達到預設閾值的支鏈,確定為所述區塊鏈的主鏈。分叉後的支鏈上的區塊的數量越多,可以表示為對該支鏈上的區塊內所收錄的資訊共識認可越快,利用區塊鏈的節點成員對分叉後不同子區塊的認可程度和認可速度,快速解決區塊鏈的分叉問題。 本說明書提供的以上各個實施例,透過區塊鏈上收錄的資料為區塊鏈的多個成員節點設備共識而得的機制,為區塊鏈上收錄的目標資料提供了唯一地、不可被篡改的存證;而且,上述區塊鏈的區塊頭內封裝收錄有關於目標資料的詮釋資料資訊,更加方便了對上述目標資料的查詢獲取。 與上述流程實現對應,本說明書的實施例還提供了一種基於區塊鏈的資料存證裝置。該裝置可以透過軟體來實現,也可以透過硬體或者軟硬體結合的方式來實現。以軟體實現為例,作為邏輯意義上的裝置,是透過所在設備的CPU(Central Process Unit,中央處理器)將對應的電腦程式指令讀取到記憶體中運行形成的。從硬體層面而言,除了圖4所示的CPU、記憶體以及記憶體之外,該資料處理裝置所在的設備通常還包括用來進行無線信號收發的晶片等其他硬體,和/或用來實現網路通信功能的板卡等其他硬體。 圖3所示為本說明書所提供的一種基於區塊鏈的資料存證裝置30,包括: 接受單元302,接收目標節點提議的候選區塊,所述候選區塊的區塊頭包括目標資料的詮釋資料,所述候選區塊的區塊體包括所述目標資料的內容; 發起共識單元304,發起對所述候選區塊的共識處理; 儲存單元306,回應於所述候選區塊共識處理通過的共識結果,將所述候選區塊作為最新區塊儲存至所述區塊鏈的分散式資料庫,以完成針對所述目標資料的資料存證。 較佳地,所述詮釋資料包括所述目標資料的唯一標識;或者,所述目標資料的唯一標識的資料摘要。 較佳地,所述的裝置30,還包括: 主鏈確定單元308,當所述區塊鏈上的任一目標區塊連接有多個子區塊,統計所述多個子區塊所在支鏈上的子區塊的數量;將所述子區塊的數量先達到預設閾值的支鏈,確定為所述區塊鏈的主鏈。 較佳地,所述目標資料為房產資料,所述目標資料的詮釋資料包括房產地址,或者房產地址的資料摘要。 較佳地,所述區塊鏈為聯盟鏈,所述聯盟鏈的聯盟成員包括房產仲介公司。 上述裝置中各個單元的功能和作用的實現過程具體詳見上述方法中對應步驟的實現過程,相關之處參見方法實施例的部分說明即可,在此不再贅述。應用本說明書所提供的基於區塊鏈的資料存證裝置,利用去中心化的區塊鏈分散式資料庫儲存、存證資料資訊,摒棄了中心化資料庫儲存可能出現的對資料資訊的任意改動;利用區塊鏈的共識機制對資料進行識別存證,避免了用戶在不同的網路平臺伺服器中對同一個對象(如房產)描述的情形不盡相同而不知哪一個為真實的缺陷;且在本說明書提供的多個實施例中,將資料資訊的詮釋資料保存在區塊頭中,更加方便了包括區塊鏈輕節點在內任意區塊鏈節點設備對目標資料資訊的檢索。 以上所描述的裝置實施例僅僅是示意性的,其中,所述作為分離部件說明的單元可以是或者也可以不是物理上分開的,作為單元顯示的部件可以是或者也可以不是物理模組,即可以位於一個地方,或者也可以分佈到多個網路模組上。可以根據實際的需要而選擇其中的部分或者全部單元或模組來實現本說明書方案的目的。本發明所屬技術領域中具有通常知識者在不付出創造性勞動的情況下,即可以理解並實施。 上述實施例闡明的裝置、單元、模組,具體可以由電腦晶片或實體實現,或者由具有某種功能的產品來實現。一種典型的實現設備為電腦,電腦的具體形式可以是個人電腦、膝上型電腦、蜂巢式電話、相機電話、智慧型電話、個人數位助理、媒體播放機、導航設備、電子郵件收發設備、遊戲控制台、平板電腦、可穿戴設備或者這些設備中的任意幾種設備的組合。 與上述方法實施例相對應,本說明書的實施例還提供了一種電腦設備,該電腦設備包括記憶體和處理器。其中,記憶體上儲存有能夠由處理器運行的電腦程式;處理器在運行儲存的電腦程式時,執行本說明書實施例中資料中心基於區塊鏈的資料存證方法的各個步驟。對資料中心基於區塊鏈的資料存證方法的各個步驟的詳細描述請參見之前的內容,不再重複。 與上述方法實施例相對應,本說明書的實施例還提供了一種電腦可讀儲存媒體,該儲存媒體上儲存有電腦程式,這些電腦程式在被處理器運行時,執行本說明書實施例中資料中心基於區塊鏈的資料存證方法的各個步驟。對基於資料中心基於區塊鏈的資料存證方法的各個步驟的詳細描述請參見之前的內容,不再重複。 以上所述僅為本說明書的較佳實施例而已,並不用以限制本說明書,凡在本說明書的精神和原則之內,所做的任何修改、等同替換、改進等,均應包含在本說明書保護的範圍之內。 在一個典型的配置中,計算設備包括一個或多個處理器(CPU)、輸入/輸出介面、網路介面和記憶體。 記憶體可能包括電腦可讀媒體中的非永久性記憶體,隨機存取記憶體(RAM)和/或非易失性記憶體等形式,如唯讀記憶體(ROM)或快閃記憶體(flash RAM)。記憶體是電腦可讀媒體的示例。 電腦可讀媒體包括永久性和非永久性、可移動和非可移動媒體可以由任何方法或技術來實現資訊儲存。資訊可以是電腦可讀指令、資料結構、程式的模組或其他資料。 電腦的儲存媒體的例子包括,但不限於相變記憶體(PRAM)、靜態隨機存取記憶體(SRAM)、動態隨機存取記憶體(DRAM)、其他類型的隨機存取記憶體(RAM)、唯讀記憶體(ROM)、電可擦除可程式設計唯讀記憶體(EEPROM)、快閃記憶體或其他記憶體技術、唯讀光碟唯讀記憶體(CD-ROM)、數位多功能光碟(DVD)或其他光學儲存、磁盒式磁帶,磁帶磁磁片儲存或其他磁性儲存裝置或任何其他非傳輸媒體,可用於儲存可以被計算設備訪問的資訊。按照本文中的界定,電腦可讀媒體不包括暫態性電腦可讀媒體(transitory media),如調變的資料信號和載波。 還需要說明的是,術語“包括”、“包含”或者其任何其他變體意在涵蓋非排他性的包含,從而使得包括一系列要素的過程、方法、商品或者設備不僅包括那些要素,而且還包括沒有明確列出的其他要素,或者是還包括為這種過程、方法、商品或者設備所固有的要素。在沒有更多限制的情況下,由語句“包括一個……”限定的要素,並不排除在包括所述要素的過程、方法、商品或者設備中還存在另外的相同要素。 本發明所屬技術領域中具有通常知識者應明白,本說明書的實施例可提供為方法、系統或電腦程式產品。因此,本說明書的實施例可採用完全硬體實施例、完全軟體實施例或結合軟體和硬體態樣的實施例的形式。而且,本說明書的實施例可採用在一個或多個其中包含有電腦可用程式碼的電腦可用儲存媒體(包括但不限於磁碟記憶體、CD-ROM、光學記憶體等)上實施的電腦程式產品的形式。The above embodiment proposes that through the consensus mechanism of the blockchain, it can be ensured that for the same feature of the same real estate information (such as housing quote information), only one description after the consensus of the member nodes is stored on the blockchain , But it does not rule out that in very rare cases, due to the specific consensus mechanism adopted by the blockchain, different real estate agencies have different descriptions of the same feature of the same real estate information are included in the above block The chain, that is, the above-mentioned block chain is bifurcated: that is, there is more than one sub-block connected to a certain target block on the block chain. In this case, an embodiment of this specification provides the following solution to solve the above-mentioned bifurcation problem: when any target block on the blockchain is connected to multiple sub-blocks, count the multiple sub-blocks The number of sub-blocks on the branch chain where the block is located; the branch whose number of the sub-blocks first reaches a preset threshold is determined as the main chain of the blockchain. The larger the number of blocks on the branch chain after the fork, it can be expressed as the faster the consensus of the information contained in the block on the branch chain is recognized, and the node members of the blockchain are used to compare different sub-zones after the fork. The recognition level and recognition speed of the block quickly solve the bifurcation problem of the blockchain. The above embodiments provided in this manual, through the mechanism that the data recorded on the blockchain is the consensus of multiple member node devices of the blockchain, it provides a unique and non-tamperable mechanism for the target data recorded on the blockchain In addition, the block header of the above-mentioned block chain contains the interpretation data information about the target data, which makes it more convenient to query and obtain the above-mentioned target data. Corresponding to the implementation of the above process, the embodiment of this specification also provides a data storage device based on blockchain. The device can be implemented through software, or through hardware or a combination of software and hardware. Taking software implementation as an example, as a logical device, it is formed by reading the corresponding computer program instructions into the memory through the CPU (Central Process Unit) of the device where it is located. From the perspective of hardware, in addition to the CPU, memory, and memory shown in Figure 4, the equipment where the data processing device is located usually includes other hardware such as chips for wireless signal transmission and reception, and/or Other hardware such as boards to realize network communication functions. Figure 3 shows a block chain-based data storage device 30 provided in this specification, including: The accepting unit 302 receives a candidate block proposed by the target node, the block header of the candidate block includes the interpretation data of the target data, and the block body of the candidate block includes the content of the target data; Initiating a consensus unit 304 to initiate consensus processing on the candidate block; The storage unit 306, in response to the consensus result passed by the candidate block consensus process, stores the candidate block as the latest block in the distributed database of the blockchain to complete the data for the target data Deposit evidence. Preferably, the interpretation data includes a unique identifier of the target data; or, a data summary of the unique identifier of the target data. Preferably, the device 30 further includes: The main chain determining unit 308, when any target block on the blockchain is connected with multiple sub-blocks, count the number of sub-blocks on the branch chain where the multiple sub-blocks are located; The branch chain whose number reaches the preset threshold first is determined as the main chain of the blockchain. Preferably, the target data is real estate data, and the interpretation data of the target data includes a real estate address or a data summary of the real estate address. Preferably, the blockchain is a consortium chain, and alliance members of the consortium chain include real estate agency companies. For the implementation process of the functions and roles of each unit in the above-mentioned device, please refer to the implementation process of the corresponding steps in the above-mentioned method. Apply the blockchain-based data storage device provided in this manual, use the decentralized blockchain distributed database to store and store data information, and abandon the arbitrary data information that may occur in centralized database storage Changes; the use of the blockchain consensus mechanism to identify and store data, avoiding the defect that users describe the same object (such as real estate) in different network platform servers and do not know which one is true. ; And in the multiple embodiments provided in this specification, the interpretation data of the data information is stored in the block header, which is more convenient for any blockchain node equipment including the blockchain light node to retrieve the target data information. The device embodiments described above are merely illustrative, where the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical modules, that is, It can be located in one place, or it can be distributed across multiple network modules. Some or all of the units or modules can be selected according to actual needs to achieve the objectives of the solution in this specification. Those with ordinary knowledge in the technical field to which the present invention belongs can understand and implement it without creative work. The devices, units, and modules described in the foregoing embodiments may be specifically implemented by computer chips or entities, or implemented by products with certain functions. A typical implementation device is a computer. The specific form of the computer can be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email receiving and sending device, and a game. Console, tablet, wearable device, or a combination of any of these devices. Corresponding to the foregoing method embodiments, the embodiments of this specification also provide a computer device, which includes a memory and a processor. Wherein, the memory stores a computer program that can be run by the processor; when the processor runs the stored computer program, each step of the data center based on the blockchain-based data storage method in the embodiment of this specification is executed. Please refer to the previous content for a detailed description of each step of the data center's blockchain-based data storage method, and will not be repeated. Corresponding to the above-mentioned method embodiments, the embodiments of this specification also provide a computer-readable storage medium on which computer programs are stored. When these computer programs are run by a processor, they execute the data center in the embodiments of this specification. The various steps of the blockchain-based data storage method. Please refer to the previous content for a detailed description of each step of the data storage method based on the blockchain based on the data center, and will not be repeated. The above descriptions are only preferred embodiments of this specification, and are not intended to limit this specification. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this specification shall be included in this specification Within the scope of protection. In a typical configuration, the computing device includes one or more processors (CPU), input/output interfaces, network interfaces, and memory. Memory may include non-permanent memory in computer-readable media, random access memory (RAM) and/or non-volatile memory, such as read-only memory (ROM) or flash memory ( flash RAM). Memory is an example of computer-readable media. Computer-readable media includes permanent and non-permanent, removable and non-removable media, and information storage can be realized by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), and other types of random access memory (RAM) , Read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only CD-ROM (CD-ROM), digital multi-function Optical discs (DVD) or other optical storage, magnetic cassettes, magnetic tape storage or other magnetic storage devices, or any other non-transmission media, can be used to store information that can be accessed by computing devices. According to the definition in this article, computer-readable media does not include transient computer-readable media (transitory media), such as modulated data signals and carrier waves. It should also be noted that the terms "include", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, product or equipment including a series of elements not only includes those elements, but also includes Other elements that are not explicitly listed, or include elements inherent to this process, method, commodity, or equipment. If there are no more restrictions, the element defined by the sentence "including a..." does not exclude the existence of other identical elements in the process, method, commodity, or equipment that includes the element. Those with ordinary knowledge in the technical field to which the present invention pertains should understand that the embodiments of this specification can be provided as methods, systems or computer program products. Therefore, the embodiments of this specification may adopt the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of this specification can adopt computer programs implemented on one or more computer-usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) containing computer-usable program codes. The form of the product.
30‧‧‧裝置 302‧‧‧接受單元 304‧‧‧發起共識單元 306‧‧‧儲存單元30‧‧‧Device 302‧‧‧Receiving Unit 304‧‧‧Initiated consensus unit 306‧‧‧Storage Unit
圖1為本說明書一示例性實施例提供的一種基於區塊鏈的資料存證方法的流程圖;圖2為本說明書一示例性實施例提供的用於房產資訊存證的區塊鏈包括的區塊內容示意圖;圖3為本說明書一示例性實施例提供的一種基於區塊鏈的資料存證裝置的示意圖;圖4為運行本說明書所提供的基於區塊鏈的資料存證裝置實施例的一種硬體結構圖。 Fig. 1 is a flowchart of a method for depositing data based on blockchain according to an exemplary embodiment of this specification; Fig. 2 is a block chain used for depositing real estate information provided by an exemplary embodiment of this specification. Block content schematic diagram; Figure 3 is a schematic diagram of a blockchain-based data storage device provided by an exemplary embodiment of this specification; Figure 4 is an embodiment of the blockchain-based data storage device provided by this specification A kind of hardware structure diagram.
Claims (14)
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810975342.3A CN109359973A (en) | 2018-08-24 | 2018-08-24 | Data based on block chain deposit card method and apparatus |
| CN201810975342.3 | 2018-08-24 |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| TW202009757A TW202009757A (en) | 2020-03-01 |
| TWI709868B true TWI709868B (en) | 2020-11-11 |
Family
ID=65349941
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| TW108108445A TWI709868B (en) | 2018-08-24 | 2019-03-13 | Data storage method and device based on blockchain |
Country Status (3)
| Country | Link |
|---|---|
| CN (1) | CN109359973A (en) |
| TW (1) | TWI709868B (en) |
| WO (1) | WO2020038105A1 (en) |
Families Citing this family (15)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109359973A (en) * | 2018-08-24 | 2019-02-19 | 阿里巴巴集团控股有限公司 | Data based on block chain deposit card method and apparatus |
| CN109902091B (en) * | 2019-02-21 | 2021-08-10 | 腾讯科技(深圳)有限公司 | Method for recording data blocks on block chain, leading accounting node and medium |
| CN110070365B (en) * | 2019-03-07 | 2021-12-07 | 创新先进技术有限公司 | Commodity evidence storing method and device based on block chain and electronic equipment |
| CN110163753A (en) * | 2019-04-23 | 2019-08-23 | 阿里巴巴集团控股有限公司 | Houseclearing based on block chain deposits card, application method and device |
| CN110189122B (en) * | 2019-04-30 | 2020-09-01 | 阿里巴巴集团控股有限公司 | Method and device for anchoring time for data on block chain and electronic equipment |
| CN110166442B (en) * | 2019-04-30 | 2022-09-06 | 创新先进技术有限公司 | Data processing method and device based on block chain |
| CN110321384B (en) * | 2019-06-04 | 2023-07-28 | 创新先进技术有限公司 | A blockchain-based data recording method, device and electronic equipment |
| CN110363527B (en) * | 2019-06-26 | 2023-07-04 | 创新先进技术有限公司 | Method and device for storing evidence and supervising based on block chain |
| CN110413691A (en) * | 2019-07-18 | 2019-11-05 | 西安纸贵互联网科技有限公司 | Database backup method, restoration methods and device based on block chain |
| CN110879903B (en) * | 2019-11-20 | 2024-02-02 | 京东科技信息技术有限公司 | Evidence storage methods, evidence verification methods and devices, equipment and media |
| CN111400761B (en) * | 2020-03-17 | 2022-04-22 | 吉林亿联银行股份有限公司 | Data sharing method and device, storage medium and electronic equipment |
| JP7531583B2 (en) * | 2020-04-23 | 2024-08-09 | エヌイーシー ラボラトリーズ ヨーロッパ ゲーエムベーハー | TEE-based mining pool for POW cryptocurrencies |
| EP4165516B1 (en) * | 2020-06-16 | 2025-11-19 | Lenovo (Beijing) Limited | Method and apparatus for blockchain-aware mobile vehicle communication |
| CN113542439B (en) * | 2021-09-17 | 2021-12-07 | 深圳时空云科技有限公司 | Distributed data storage access method and device |
| CN114861227A (en) * | 2022-05-18 | 2022-08-05 | 华侨大学 | Intelligent tourism data processing method and system based on metauniverse |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105610578A (en) * | 2016-01-25 | 2016-05-25 | 杭州复杂美科技有限公司 | Block chain information archiving and privacy protection method |
| CN107450981A (en) * | 2017-05-31 | 2017-12-08 | 阿里巴巴集团控股有限公司 | A kind of block chain common recognition method and apparatus |
| US20180101560A1 (en) * | 2016-10-07 | 2018-04-12 | International Business Machines Corporation | Establishing overlay trust consensus for blockchain trust validation system |
| TW201828648A (en) * | 2017-01-20 | 2018-08-01 | 現代財富控股有限公司 | Node election system based on permissioned blockchain and method thereof |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106506638B (en) * | 2016-11-04 | 2020-01-07 | 江苏通付盾科技有限公司 | Block storage method and device in block chain |
| CN107360238A (en) * | 2017-07-25 | 2017-11-17 | 光载无限(北京)科技有限公司 | Intelligent contract gateway based on block chain CPOW common recognition algorithms |
| CN107729471A (en) * | 2017-10-13 | 2018-02-23 | 上海策赢网络科技有限公司 | A kind of block chain and its generation method and equipment |
| CN109359973A (en) * | 2018-08-24 | 2019-02-19 | 阿里巴巴集团控股有限公司 | Data based on block chain deposit card method and apparatus |
| CN110096551A (en) * | 2019-04-23 | 2019-08-06 | 浙江泰链科技有限公司 | Credit data storage method, device, equipment and medium based on block chain |
-
2018
- 2018-08-24 CN CN201810975342.3A patent/CN109359973A/en active Pending
-
2019
- 2019-03-13 TW TW108108445A patent/TWI709868B/en active
- 2019-06-26 WO PCT/CN2019/092887 patent/WO2020038105A1/en not_active Ceased
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105610578A (en) * | 2016-01-25 | 2016-05-25 | 杭州复杂美科技有限公司 | Block chain information archiving and privacy protection method |
| US20180101560A1 (en) * | 2016-10-07 | 2018-04-12 | International Business Machines Corporation | Establishing overlay trust consensus for blockchain trust validation system |
| TW201828648A (en) * | 2017-01-20 | 2018-08-01 | 現代財富控股有限公司 | Node election system based on permissioned blockchain and method thereof |
| CN107450981A (en) * | 2017-05-31 | 2017-12-08 | 阿里巴巴集团控股有限公司 | A kind of block chain common recognition method and apparatus |
Also Published As
| Publication number | Publication date |
|---|---|
| CN109359973A (en) | 2019-02-19 |
| WO2020038105A1 (en) | 2020-02-27 |
| TW202009757A (en) | 2020-03-01 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| TWI709868B (en) | Data storage method and device based on blockchain | |
| TWI753346B (en) | Block chain-based housing information storage certificate, application method and device | |
| TWI724391B (en) | Node management method and device based on blockchain | |
| CN110166442B (en) | Data processing method and device based on block chain | |
| WO2020088109A1 (en) | Blockchain-based private transactions and usage method and apparatus therefor | |
| TWI727284B (en) | Block chain-based privacy transaction method, device and computer equipment, application method based on block chain privacy transaction and computer equipment | |
| WO2020205044A1 (en) | Blockchain-based resource allocation method and apparatus | |
| WO2020082887A1 (en) | Block chain transaction method and apparatus | |
| TW202022857A (en) | Invoice creating method and device based on block chain and electronic device | |
| CN110046999A (en) | Block chain method of commerce and device | |
| WO2020155789A1 (en) | Blockchain-based certificate storage method and apparatus | |
| TW202022754A (en) | Invoice creating method and device based on block chain and electronic equipment | |
| TW202036430A (en) | Work copyright distribution method and device based on block chain | |
| WO2020220759A1 (en) | Block chain-based payment method and device | |
| CN110471982B (en) | Data processing method and device based on block chain | |
| US11256551B2 (en) | Blockchain-based virtual resource allocation | |
| CN113159902A (en) | Auction method based on block chain | |
| CN111414434A (en) | Block chain-based data transaction management network, transaction device and storage medium | |
| CN113159898A (en) | Auction method based on block chain | |
| TW202008270A (en) | Block release method and apparatus, and electronic device | |
| CN110347750A (en) | Data processing method and device based on block chain | |
| CN113095915A (en) | Auction method based on block chain | |
| CN113095917A (en) | Auction method based on block chain | |
| CN112215602A (en) | Data query method, device and system and electronic equipment | |
| CN113095916A (en) | Auction method based on block chain |