TWI794713B - Blockchain construction method and related devices - Google Patents

Blockchain construction method and related devices Download PDF

Info

Publication number
TWI794713B
TWI794713B TW109146562A TW109146562A TWI794713B TW I794713 B TWI794713 B TW I794713B TW 109146562 A TW109146562 A TW 109146562A TW 109146562 A TW109146562 A TW 109146562A TW I794713 B TWI794713 B TW I794713B
Authority
TW
Taiwan
Prior art keywords
edge computing
block
node
chain
blockchain
Prior art date
Application number
TW109146562A
Other languages
Chinese (zh)
Other versions
TW202225998A (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 鴻海精密工業股份有限公司
Priority to TW109146562A priority Critical patent/TWI794713B/en
Publication of TW202225998A publication Critical patent/TW202225998A/en
Application granted granted Critical
Publication of TWI794713B publication Critical patent/TWI794713B/en

Links

Images

Landscapes

  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a blockchain construction method and related devices. The blockchain construction method is applied to a distributed system, which includes a cloud center and a plurality of edge computing nodes. The blockchain construction method includes: acquiring a plurality of first edge computing nodes at a preset first distance threshold from the cloud center, and building a main blockchain based on the cloud center and the plurality of first edge computing nodes; selecting at least one first edge computing node from the plurality of first edge computing nodes as a shared edge computing node; and acquiring a plurality of second edge computing nodes from the shared edge computing node with a preset second distance threshold, and constructing at least one side blockchain based on the shared edge computing node and the plurality of second edge computing nodes; writing blocks generated by the at least one side blockchain into the main blockchain. The application can improve the efficiency of building a blockchain.

Description

區塊鏈構建方法及相關設備 Block chain construction method and related equipment

本發明涉及區塊鏈技術領域,具體涉及一種區塊鏈構建方法及裝置、電腦設備和電腦可讀儲存介質。 The present invention relates to the technical field of block chains, in particular to a block chain construction method and device, computer equipment, and a computer-readable storage medium.

邊緣計算的使用在網路服務或通訊服務上愈顯重要,但是邊緣計算節點的資料與雲端中心不同步,且在資料傳送的過程中存在資料難以追溯和資料傳輸可能遺失或被盜取的風險。 The use of edge computing is becoming more and more important in network services or communication services, but the data of the edge computing nodes is not synchronized with the cloud center, and there is a risk that the data is difficult to trace and the data transmission may be lost or stolen during the data transmission process .

去中心化的區塊鏈網路可以有效的增加資料安全性,將資料儲存在不同的區塊鏈節點中,避免資料的遺失。 The decentralized blockchain network can effectively increase data security, store data in different blockchain nodes, and avoid data loss.

因此,如何基於分散式系統中的邊緣計算節點構建區塊鏈網路成為待解決的技術問題。 Therefore, how to build a blockchain network based on edge computing nodes in a decentralized system has become a technical problem to be solved.

鑒於以上內容,有必要提出一種區塊鏈構建方法及裝置、電腦設備、電腦可讀儲存介質和電腦程式產品,其可以透過將邊緣計算節點視作為區塊鏈節點,並藉由適當的分群與側鏈控制,有效的將分散式系統中的邊緣計算節點構建成一個高效能的區塊鏈網路,從而保障分散式系統中資料的同步及傳輸過程中的安全。 In view of the above, it is necessary to propose a block chain construction method and device, computer equipment, computer-readable storage media and computer program products, which can treat edge computing nodes as block chain nodes, and through appropriate clustering and Side chain control effectively builds the edge computing nodes in the decentralized system into a high-performance blockchain network, thereby ensuring the synchronization of data in the decentralized system and the security of the transmission process.

本申請的第一方面提供一種區塊鏈構建方法,所述區塊鏈構建方法 包括:獲取距離所述雲端中心預設第一距離閾值的多個第一邊緣計算節點,並基於所述雲端中心和所述多個第一邊緣計算節點構建一條區塊鏈主鏈;從所述多個第一邊緣計算節點中選取至少一個第一邊緣計算節點作為共用邊緣計算節點,並獲取距離所述共用邊緣計算節點預設第二距離閾值的多個第二邊緣計算節點,基於所述共用邊緣計算節點及所述多個第二邊緣計算節點構建至少一條區塊鏈側鏈;將所述至少一條區塊鏈側鏈產生的區塊寫入所述區塊鏈主鏈中。 The first aspect of the present application provides a block chain construction method, the block chain construction method Including: obtaining a plurality of first edge computing nodes with a preset first distance threshold from the cloud center, and constructing a blockchain main chain based on the cloud center and the plurality of first edge computing nodes; Selecting at least one first edge computing node from the plurality of first edge computing nodes as a shared edge computing node, and obtaining a plurality of second edge computing nodes with a preset second distance threshold from the shared edge computing node, based on the shared The edge computing node and the plurality of second edge computing nodes construct at least one blockchain side chain; and write the block generated by the at least one blockchain side chain into the blockchain main chain.

另一種可能的實現方式中,所述基於所述雲端中心和所述多個第一邊緣計算節點構建一條區塊鏈主鏈包括:透過所述雲端中心生成第一創世區塊;透過所述多個第一邊緣計算節點驗證所述第一創世區塊;當確定驗證所述第一創世區塊成功時,將所述第一創世區塊作為所述區塊鏈主鏈的鏈頭,並控制所述雲端中心和所述多個第一邊緣計算節點繼續生成區塊。 In another possible implementation, the building of a blockchain main chain based on the cloud center and the plurality of first edge computing nodes includes: generating a first genesis block through the cloud center; A first edge computing node verifies the first genesis block; when it is determined that the verification of the first genesis block is successful, the first genesis block is used as the chain head of the blockchain main chain, and control The cloud center and the plurality of first edge computing nodes continue to generate blocks.

另一種可能的實現方式中,所述基於所述共用邊緣計算節點及所述多個第二邊緣計算節點構建至少一條區塊鏈側鏈包括:將所述共用邊緣計算節點產生的區塊作為第二創世區塊;透過所述共用邊緣計算節點和所述多個第二邊緣計算節點驗證所述第二創世區塊;當確定驗證所述第二創世區塊成功時,將所述第二創世區塊作為所述至少一條區塊鏈側鏈的鏈頭,並控制所述共用邊緣計算節點和所述多個第二邊緣計算節點繼續生成區塊。 In another possible implementation manner, the constructing at least one blockchain side chain based on the shared edge computing node and the plurality of second edge computing nodes includes: using the block generated by the shared edge computing node as the first Two genesis blocks; verify the second genesis block through the shared edge computing node and the plurality of second edge computing nodes; when it is determined that the verification of the second genesis block is successful, the second genesis block The block serves as the chain head of the at least one blockchain side chain, and controls the shared edge computing node and the plurality of second edge computing nodes to continue to generate blocks.

另一種可能的實現方式中,所述將所述至少一條區塊鏈側鏈產生的區塊寫入所述區塊鏈主鏈中包括:判斷所述至少一條區塊鏈側鏈是否滿足預設條件;當所述至少一條區塊鏈側鏈滿足所述預設條件時,獲取所述至少一條區塊鏈側鏈的最後一個區塊的第一雜湊值,獲取所述區塊鏈主鏈的最後一個區塊的第二雜湊值;控制所述雲端中心和所述多個第一邊緣計算節點在所述區塊鏈主鏈新生成一個目標區塊,將所述第一雜湊值和所述第二雜湊值寫入所述目標區塊,使所述目標區塊的雜湊值等於所述第一雜湊值與所述第二雜湊值的合併值。 In another possible implementation manner, writing the block generated by the at least one blockchain side chain into the blockchain main chain includes: judging whether the at least one blockchain side chain satisfies the preset Condition; when the at least one blockchain side chain satisfies the preset condition, obtain the first hash value of the last block of the at least one blockchain side chain, and obtain the hash value of the main chain of the blockchain The second hash value of the last block; control the cloud center and the plurality of first edge computing nodes to generate a new target block in the blockchain main chain, and combine the first hash value and the The second hash value is written into the target block, so that the hash value of the target block is equal to the combined value of the first hash value and the second hash value.

另一種可能的實現方式中,所述判斷所述至少一條區塊鏈側鏈是否 滿足預設條件包括:獲取所述至少一條區塊鏈側鏈產生的區塊的總數量;判斷所述總數量是否等於預設數量閾值;當所述總數量等於所述預設數量閾值時,確定所述至少一條區塊鏈側鏈滿足所述預設條件;當所述總數量小於所述預設數量閾值,確定所述至少一條區塊鏈側鏈不滿足所述預設條件。 In another possible implementation, the judging whether the at least one blockchain side chain Satisfying the preset condition includes: obtaining the total number of blocks generated by the at least one blockchain side chain; judging whether the total number is equal to the preset number threshold; when the total number is equal to the preset number threshold, It is determined that the at least one blockchain side chain satisfies the preset condition; when the total quantity is less than the preset quantity threshold, it is determined that the at least one blockchain sidechain does not satisfy the preset condition.

另一種可能的實現方式中,所述區塊鏈構建方法還包括:接收使用者終端在第一位置的第一交易請求,確定距離所述第一位置最近的第一目標邊緣計算節點;將所述第一交易請求分配給所述第一目標邊緣計算節點所在的第一區塊鏈側鏈中,並透過所述第一區塊鏈側鏈驗證所述第一交易請求的有效性並生成第一交易區塊;將所述第一交易區塊上傳到所述第一區塊鏈側鏈中。 In another possible implementation, the blockchain construction method further includes: receiving a first transaction request from a user terminal at a first location, determining the first target edge computing node closest to the first location; The first transaction request is allocated to the first block chain side chain where the first target edge computing node is located, and the validity of the first transaction request is verified through the first block chain side chain and the second transaction request is generated. A transaction block; uploading the first transaction block to the side chain of the first block chain.

另一種可能的實現方式中,在所述生成第一交易區塊之後,所述區塊鏈構建方法還包括:接收所述使用者終端在第二位置的第二交易請求,確定距離所述第二位置最近的第二目標邊緣計算節點;將所述第二交易請求分配給所述第二目標邊緣計算節點所在的第二區塊鏈側鏈;判斷所述第一區塊鏈側鏈與所述第二區塊鏈側鏈是否有共同的邊緣計算節點;當確定所述第一區塊鏈側鏈與所述第二區塊鏈側鏈有共同的邊緣計算節點時,透過所述共同的邊緣計算節點獲取所述第一交易區塊;根據所述第一交易區塊生成第二交易區塊,並將所述第二交易區塊上傳到所述第二區塊鏈側鏈中。 In another possible implementation manner, after the first transaction block is generated, the block chain construction method further includes: receiving a second transaction request from the user terminal at a second location, and determining the distance from the first transaction block The second target edge computing node with the closest location; assign the second transaction request to the second block chain side chain where the second target edge computing node is located; determine the relationship between the first block chain side chain and the second block chain side chain Whether the second block chain side chain has a common edge computing node; when it is determined that the first block chain side chain and the second block chain side chain have a common edge computing node, through the common The edge computing node obtains the first transaction block; generates a second transaction block according to the first transaction block, and uploads the second transaction block to the second block chain side chain.

本申請的第二方面提供一種區塊鏈構建裝置,應用於分散式系統,所述分散式系統包括雲端中心及多個邊緣計算節點,所述區塊鏈構建裝置包括:第一構建單元,用於獲取距離所述雲端中心預設第一距離閾值的多個第一邊緣計算節點,並基於所述雲端中心和所述多個第一邊緣計算節點構建一條區塊鏈主鏈;第二構建單元,用於從所述多個第一邊緣計算節點中選取至少一個第一邊緣計算節點作為共用邊緣計算節點,並獲取距離所述共用邊緣計算節點預設第二距離閾值的多個第二邊緣計算節點,基於所述共用邊緣計算節點及所述多個第二邊緣計算節點構建至少一條區塊鏈側鏈;寫入單元,用於將所述至少一條區塊鏈側鏈產生的區塊寫入所述區塊鏈主鏈中。 The second aspect of the present application provides a block chain construction device, which is applied to a distributed system, and the distributed system includes a cloud center and a plurality of edge computing nodes. The block chain construction device includes: a first construction unit, used Obtaining a plurality of first edge computing nodes with a preset first distance threshold from the cloud center, and constructing a block chain main chain based on the cloud center and the plurality of first edge computing nodes; the second construction unit , for selecting at least one first edge computing node from the plurality of first edge computing nodes as a shared edge computing node, and obtaining a plurality of second edge computing nodes with a preset second distance threshold from the shared edge computing node A node, constructing at least one blockchain side chain based on the shared edge computing node and the plurality of second edge computing nodes; a writing unit configured to write the block generated by the at least one blockchain side chain In the blockchain main chain.

本申請的第三方面提供一種電腦可讀儲存介質,所述電腦可讀儲存介質上儲存有電腦程式,所述電腦程式被處理器執行時實現所述區塊鏈構建方法。 A third aspect of the present application provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the block chain construction method is implemented.

本發明可以透過將邊緣計算節點視作為區塊鏈節點,並藉由適當的分群與側鏈控制,有效地將分散式系統中的邊緣計算節點構建成一個高效能的區塊鏈網路,從而保障分散式系統中資料的同步及傳輸過程中的安全。 The present invention can effectively construct an edge computing node in a decentralized system into a high-performance blockchain network by treating the edge computing node as a blockchain node, and through appropriate grouping and side chain control, thereby Guarantee the synchronization of data in the decentralized system and the security during transmission.

20:區塊鏈構建裝置 20: Block chain construction device

201:第一構建單元 201: The first building unit

202:第二構建單元 202: Second building unit

203:寫入單元 203: write unit

30:電腦設備 30:Computer equipment

301:儲存器 301: storage

302:處理器 302: Processor

303:電腦程式 303: Computer program

304:匯流排 304: Bus

圖1是本發明實施例提供的區塊鏈構建方法較佳實施例的流程圖。 Figure 1 is a flow chart of a preferred embodiment of the block chain construction method provided by the embodiment of the present invention.

圖2是本發明實施例提供的節點群的示意圖。 Fig. 2 is a schematic diagram of a node group provided by an embodiment of the present invention.

圖3是本發明實施例提供的主側鏈產生區塊的示意圖。 Fig. 3 is a schematic diagram of blocks generated by the main side chain provided by the embodiment of the present invention.

圖4是本發明實施例提供的根據交易請求方的位置處理交易的示意圖。 Fig. 4 is a schematic diagram of processing a transaction according to the location of the transaction requester provided by an embodiment of the present invention.

圖5是本發明實施例提供的區塊鏈構建裝置較佳實施例的結構圖。 Fig. 5 is a structural diagram of a preferred embodiment of the block chain construction device provided by the embodiment of the present invention.

圖6是本發明實施例提供的電腦設備較佳實施例的示意圖。 Fig. 6 is a schematic diagram of a preferred embodiment of a computer device provided by an embodiment of the present invention.

為了使本發明的目的、技術方案及優點更加清楚明白,以下結合附圖及實施例,對本發明進行進一步詳細說明。應當理解,此處所描述的具體實施例僅用以解釋本發明,並不用於限定本發明。基於本發明中的實施例,本領域普通技術人員在沒有做出創造性勞動前提下所獲得的所有其他實施例,都屬於本發明保護的範圍。 In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

本申請的說明書和請求項書及上述附圖中的術語“第一”、“第二”、“第三”、“第四”等(如果存在)是用於區別類似的物件,而不必用於描述特定的順序或先後次序。應該理解這樣使用的資料在適當情況下可以互換,以便這裡描述的實施例能夠以除了在這裡圖示或描述的內容以外的順序實施。此外,術語 “包括”和“具有”以及他們的任何變形,意圖在於覆蓋不排他的包含,例如,包含了一系列步驟或單元的過程、方法、裝置、產品或設備不必限於清楚地列出的那些步驟或單元,而是可包括沒有清楚地列出的或對於這些過程、方法、產品或設備固有的其它步驟或單元。 The terms "first", "second", "third", "fourth", etc. (if any) in the description and claims of this application and the above drawings are used to distinguish similar items and do not necessarily use Used to describe a specific sequence or sequence. It is to be understood that the materials so used are interchangeable under appropriate circumstances such that the embodiments described herein can be practiced in sequences other than those illustrated or described herein. In addition, the term "comprising" and "having" and any variations thereof are intended to cover a non-exclusive inclusion, for example, a process, method, apparatus, product or equipment comprising a series of steps or units need not be limited to those steps or units, but may include other steps or units not explicitly listed or inherent to the process, method, product or apparatus.

可選地,本發明的區塊鏈構建方法應用在分散式系統中。所述分散式系統包括多個電腦設備。所述多個電腦設備是組成區塊鏈網路的節點。所述電腦設備是一種能夠按照事先設定或儲存的指令,自動進行數值計算和/或資訊處理的設備,其硬體包括但不限於微處理器、專用積體電路(Application Specific Integrated Circuit,ASIC)、可程式設計閘陣列(Field-Programmable Gate Array,FPGA)、數位訊號處理器(Digital Signal Processor,DSP)、嵌入式設備等。 Optionally, the block chain construction method of the present invention is applied in a decentralized system. The distributed system includes a plurality of computer devices. The plurality of computer devices are nodes forming a block chain network. The computer device is a device that can automatically perform numerical calculations and/or information processing according to pre-set or stored instructions, and its hardware includes but not limited to microprocessors, Application Specific Integrated Circuits (ASIC) , Programmable Gate Array (Field-Programmable Gate Array, FPGA), Digital Signal Processor (Digital Signal Processor, DSP), embedded devices, etc.

所述電腦設備可以是桌上型電腦、筆記本、掌上型電腦及雲端伺服器等計算設備。所述電腦設備可以與使用者透過鍵盤、滑鼠、遙控器、觸控板或聲控設備等方式進行人機交互。 The computer equipment may be computing equipment such as desktop computers, notebooks, palmtop computers, and cloud servers. The computer equipment can perform human-computer interaction with the user through keyboard, mouse, remote control, touch panel or voice control equipment.

實施例一: Embodiment one:

圖1是本發明實施例提供的區塊鏈構建方法的流程圖。所述區塊鏈構建方法應用於分散式系統中,所述分散式系統包括雲端中心及多個邊緣計算節點。 Fig. 1 is a flow chart of the block chain construction method provided by the embodiment of the present invention. The block chain construction method is applied in a distributed system, and the distributed system includes a cloud center and a plurality of edge computing nodes.

參閱1所示,所述區塊鏈構建方法具體包括以下步驟: Referring to 1, the block chain construction method specifically includes the following steps:

101,獲取距離所述雲端中心預設第一距離閾值的多個第一邊緣計算節點,並基於所述雲端中心和所述多個第一邊緣計算節點構建一條區塊鏈主鏈。 101. Acquire a plurality of first edge computing nodes with a preset first distance threshold from the cloud center, and construct a blockchain main chain based on the cloud center and the plurality of first edge computing nodes.

具體地,獲取各個邊緣計算節點與所述雲端中心的距離值,將距離值小於或等於所述預設第一距離閾值的邊緣計算節點確定為多個第一邊緣計算節點。 Specifically, the distance value between each edge computing node and the cloud center is obtained, and the edge computing nodes whose distance value is less than or equal to the preset first distance threshold are determined as a plurality of first edge computing nodes.

例如,預設第一距離閾值為2km,獲取雲端中心與3個邊緣計算節點(節點A、節點B、節點C)的距離。雲端中心與節點A的距離為1km, 雲端中心與節點B的距離為2km,雲端中心與節點C的距離為3km,將節點A和節點B確定為多個第一邊緣計算節點。 For example, the preset first distance threshold is 2km, and the distances between the cloud center and three edge computing nodes (node A, node B, and node C) are acquired. The distance between the cloud center and node A is 1km, The distance between the cloud center and node B is 2km, the distance between the cloud center and node C is 3km, and nodes A and B are determined as multiple first edge computing nodes.

在一具體實施例中,所述基於所述雲端中心和所述多個第一邊緣計算節點構建一條區塊鏈主鏈包括:透過所述雲端中心生成第一創世區塊;透過所述多個第一邊緣計算節點驗證所述第一創世區塊;當確定驗證所述第一創世區塊成功時,將所述第一創世區塊作為所述區塊鏈主鏈的鏈頭,並控制所述雲端中心和所述多個第一邊緣計算節點繼續生成區塊。 In a specific embodiment, said building a blockchain main chain based on said cloud center and said plurality of first edge computing nodes includes: generating a first genesis block through said cloud center; The first edge computing node verifies the first genesis block; when it is determined that the verification of the first genesis block is successful, the first genesis block is used as the chain head of the blockchain main chain, and controls all The cloud center and the plurality of first edge computing nodes continue to generate blocks.

可以基於所述雲端中心和所述多個第一邊緣計算節點組建區塊鏈網路,使所述雲端中心和所述第一邊緣計算節點能夠相互通信。區塊鏈(包括區塊鏈主鏈)由多個相連的區塊構成,每個區塊記錄了一段時間內區塊鏈網路中的交易情況,可以將區塊視為帳簿中的帳頁。第一個被最早構建的區塊稱為創世區塊,擁有一個唯一的ID標識號。除創世區塊外,每個後續建立的區塊均包含兩個ID號,一個是該區塊自身的ID號,另一個是前序區塊的ID號。透過ID號之間的前後指向關係,所有區塊按序相連就構成了區塊鏈。 A blockchain network can be established based on the cloud center and the plurality of first edge computing nodes, so that the cloud center and the first edge computing nodes can communicate with each other. The blockchain (including the blockchain main chain) is composed of multiple connected blocks, and each block records the transactions in the blockchain network for a period of time, and the blocks can be regarded as the account pages in the account book . The first block to be constructed is called the genesis block, which has a unique ID number. Except for the genesis block, each subsequent block contains two ID numbers, one is the ID number of the block itself, and the other is the ID number of the previous block. Through the forward and backward pointing relationship between ID numbers, all blocks are connected in sequence to form a blockchain.

所述創世區塊(包括第一創世區塊)包含有創世區塊時間戳記、初始雜湊值及初始核心參數。 The genesis block (including the first genesis block) includes a genesis block timestamp, an initial hash value and initial core parameters.

102,從所述多個第一邊緣計算節點中選取至少一個第一邊緣計算節點作為共用邊緣計算節點,並獲取距離所述共用邊緣計算節點預設第二距離閾值的多個第二邊緣計算節點,基於所述共用邊緣計算節點及所述多個第二邊緣計算節點構建至少一條區塊鏈側鏈。 102. Select at least one first edge computing node from the plurality of first edge computing nodes as a shared edge computing node, and acquire a plurality of second edge computing nodes with a preset second distance threshold from the shared edge computing node Constructing at least one blockchain side chain based on the shared edge computing node and the plurality of second edge computing nodes.

具體地,所述獲取距離所述共用邊緣計算節點預設第二距離閾值的多個第二邊緣計算節點包括:獲取預設節點數量閾值,獲取一個共用邊緣計算節點,以共用邊緣計算節點為當前節點查找當前節點的鄰近節點,將當前節點和當前節點的鄰近節點確定為第二邊緣計算節點;將當前節點的鄰近節點確定為當前節點,反覆運算查找當前節點的鄰近節點,將當前節點的鄰近節點確定為第二邊緣計算節點,當第二邊緣計算節點的數量等於所述預設節點數量閾 值時,停止反覆運算。當前節點的鄰近節點是距離當前節點最近的一個或多個節點。 Specifically, the acquiring a plurality of second edge computing nodes with a preset second distance threshold from the shared edge computing node includes: acquiring a preset threshold number of nodes, acquiring a shared edge computing node, and taking the shared edge computing node as the current The node searches the adjacent nodes of the current node, and determines the current node and the adjacent nodes of the current node as the second edge computing node; determines the adjacent nodes of the current node as the current node, repeatedly calculates the adjacent nodes of the current node, and determines the adjacent nodes of the current node The node is determined as a second edge computing node, when the number of second edge computing nodes is equal to the preset node number threshold value, stop iterative operation. The neighbors of the current node are one or more nodes closest to the current node.

在一具體實施例中,所述基於所述共用邊緣計算節點及所述多個第二邊緣計算節點構建至少一條區塊鏈側鏈包括:將所述共用邊緣計算節點產生的區塊作為第二創世區塊;透過所述共用邊緣計算節點和所述多個第二邊緣計算節點驗證所述第二創世區塊;當確定驗證所述第二創世區塊成功時,將所述第二創世區塊作為所述至少一條區塊鏈側鏈的鏈頭,並控制所述共用邊緣計算節點和所述多個第二邊緣計算節點繼續生成區塊。 In a specific embodiment, the constructing at least one blockchain side chain based on the shared edge computing node and the plurality of second edge computing nodes includes: using the block generated by the shared edge computing node as the second Genesis block; verifying the second genesis block through the shared edge computing node and the plurality of second edge computing nodes; when it is determined that the verification of the second genesis block is successful, the second genesis block The block serves as the chain head of the at least one blockchain side chain, and controls the shared edge computing node and the plurality of second edge computing nodes to continue to generate blocks.

可以基於所述共用邊緣計算節點及所述多個第二邊緣計算節點組建區塊鏈網路。所述共用邊緣計算節點連接了所述多個第一邊緣計算節點、所述雲端中心和所述多個第二邊緣計算節點。 A blockchain network can be established based on the shared edge computing node and the plurality of second edge computing nodes. The shared edge computing node connects the plurality of first edge computing nodes, the cloud center and the plurality of second edge computing nodes.

在另一實施例中,所述區塊鏈主鏈和所述至少一條區塊鏈側鏈採用相同的共識機制。所述共識機制包括DPOS(授權股權證明,Delegated Proof-of-Stake)機制、PoW(工作量證明,Proof of Work)機制等。所述共識機制用於驗證新產生的區塊的有效性。例如,控制所述共用邊緣計算節點及所述多個第二邊緣計算節點透過所述共識機制驗證所述第二創世區塊。 In another embodiment, the blockchain main chain and the at least one blockchain side chain adopt the same consensus mechanism. The consensus mechanism includes a DPOS (Delegated Proof-of-Stake) mechanism, a PoW (Proof of Work) mechanism, and the like. The consensus mechanism is used to verify the validity of newly generated blocks. For example, controlling the shared edge computing node and the plurality of second edge computing nodes to verify the second genesis block through the consensus mechanism.

103,將所述至少一條區塊鏈側鏈產生的區塊寫入所述區塊鏈主鏈中。 103. Write the block generated by the at least one blockchain side chain into the blockchain main chain.

在一具體實施例中,所述將所述至少一條區塊鏈側鏈產生的區塊寫入所述區塊鏈主鏈中包括:判斷所述至少一條區塊鏈側鏈是否滿足預設條件;當所述至少一條區塊鏈側鏈滿足所述預設條件時,獲取所述至少一條區塊鏈側鏈的最後一個區塊的第一雜湊值,獲取所述區塊鏈主鏈的最後一個區塊的第二雜湊值;控制所述雲端中心和所述多個第一邊緣計算節點在所述區塊鏈主鏈新生成一個目標區塊,將所述第一雜湊值和所述第二雜湊值寫入所述目標區塊,使所述目標區塊的雜湊值等於所述第一雜湊值與所述第二雜湊值的合併值。 In a specific embodiment, writing the block generated by the at least one blockchain side chain into the blockchain main chain includes: judging whether the at least one blockchain side chain satisfies a preset condition ; When the at least one block chain side chain meets the preset condition, obtain the first hash value of the last block of the at least one block chain side chain, and obtain the last hash value of the block chain main chain The second hash value of a block; control the cloud center and the plurality of first edge computing nodes to generate a new target block on the blockchain main chain, and combine the first hash value and the second hash value Two hash values are written into the target block, so that the hash value of the target block is equal to the combined value of the first hash value and the second hash value.

在一具體實施例中,所述判斷所述至少一條區塊鏈側鏈是否滿足預設條件包括:獲取所述至少一條區塊鏈側鏈產生的區塊的總數量;判斷所述總數量是否等於預設數量閾值;當所述總數量等於所述預設數量閾值時,確定所述至少一條區塊鏈側鏈滿足所述預設條件;當所述總數量小於所述預設數量閾值,確定所述至少一條區塊鏈側鏈不滿足所述預設條件。 In a specific embodiment, the judging whether the at least one blockchain side chain satisfies the preset condition includes: obtaining the total number of blocks generated by the at least one blockchain side chain; judging whether the total number equal to a preset quantity threshold; when the total quantity is equal to the preset quantity threshold, it is determined that the at least one block chain side chain satisfies the preset condition; when the total quantity is less than the preset quantity threshold, It is determined that the at least one blockchain side chain does not satisfy the preset condition.

在另一實施例中,當所述總數量大於所述預設數量閾值時,確定所述至少一條區塊鏈側鏈滿足所述預設條件。 In another embodiment, when the total quantity is greater than the preset quantity threshold, it is determined that the at least one blockchain sidechain satisfies the preset condition.

在另一實施例中,所述判斷所述至少一條區塊鏈側鏈是否滿足預設條件包括:獲取上一次將所述至少一條區塊鏈側鏈寫入所述區塊鏈主鏈的第一時間點,獲取預設週期和當前時間點;根據所述第一時間點和所述預設週期,確定下一次將所述至少一條區塊鏈側鏈寫入所述區塊鏈主鏈的第二時間點;當所述當前時間點等於所述第二時間點,判斷所述至少一條區塊鏈側鏈滿足預設條件;當所述當前時間點不等於所述第二時間點,判斷所述至少一條區塊鏈側鏈不滿足預設條件。 In another embodiment, the judging whether the at least one blockchain side chain satisfies the preset condition includes: obtaining the last time the at least one blockchain side chain was written into the blockchain main chain A point in time, obtaining a preset cycle and the current point in time; according to the first point in time and the preset cycle, determine the next time to write the at least one block chain side chain into the block chain main chain The second time point; when the current time point is equal to the second time point, it is judged that the at least one blockchain side chain satisfies the preset condition; when the current time point is not equal to the second time point, it is judged The at least one blockchain side chain does not meet the preset condition.

在一具體實施例中,將所述至少一條區塊鏈側鏈寫入所述區塊鏈主鏈之後,控制所述共用邊緣計算節點及所述多個第二邊緣計算節點根據所述區塊鏈主鏈重新構建新的區塊鏈側鏈。當重新構建新的區塊鏈側鏈時,所述共用邊緣計算節點及所述多個第二邊緣計算節點在新的區塊鏈側鏈中生成區塊的難度降低。 In a specific embodiment, after writing the at least one block chain side chain into the block chain main chain, control the shared edge computing node and the plurality of second edge computing nodes according to the block The chain main chain rebuilds a new blockchain side chain. When a new blockchain sidechain is rebuilt, the difficulty for the shared edge computing node and the multiple second edge computing nodes to generate blocks in the new blockchain sidechain is reduced.

實施例一的區塊鏈構建方法可以構建由區塊鏈側鏈和區塊鏈主鏈組成的區塊鏈,提升構建區塊鏈的效率。透過將邊緣計算節點視作為區塊鏈節點,並藉由適當的分群與側鏈控制,有效的將分散式系統中的邊緣計算節點構建成一個高效能的區塊鏈網路,從而保障分散式系統中資料的同步及傳輸過程中的安全。 The blockchain construction method in Embodiment 1 can construct a blockchain composed of a blockchain sidechain and a blockchain main chain, improving the efficiency of building a blockchain. By treating the edge computing nodes as blockchain nodes, and through appropriate grouping and side chain control, the edge computing nodes in the decentralized system can be effectively constructed into a high-performance blockchain network, thereby ensuring the decentralized Synchronization of data in the system and security during transmission.

在另一實施例中,所述區塊鏈構建方法還包括:接收使用者終端在第一位置的第一交易請求,確定距離所述第一位置最近的第一目標邊緣計算 節點;將所述第一交易請求分配給所述第一目標邊緣計算節點所在的第一區塊鏈側鏈中,並透過所述第一區塊鏈側鏈驗證所述第一交易請求的有效性並生成第一交易區塊;將所述第一交易區塊上傳到所述第一區塊鏈側鏈中。 In another embodiment, the block chain construction method further includes: receiving a first transaction request from a user terminal at a first location, and determining the first target edge computing terminal closest to the first location node; distribute the first transaction request to the first block chain side chain where the first target edge computing node is located, and verify the validity of the first transaction request through the first block chain side chain and generate a first transaction block; upload the first transaction block to the first block chain side chain.

在另一實施例中,在所述生成第一交易區塊之後,所述區塊鏈構建方法還包括:接收所述使用者終端在第二位置的第二交易請求,確定距離所述第二位置最近的第二目標邊緣計算節點;將所述第二交易請求分配給所述第二目標邊緣計算節點所在的第二區塊鏈側鏈;判斷所述第一區塊鏈側鏈與所述第二區塊鏈側鏈是否有共同的邊緣計算節點;當確定所述第一區塊鏈側鏈與所述第二區塊鏈側鏈有共同的邊緣計算節點時,透過所述共同的邊緣計算節點獲取所述第一交易區塊;根據所述第一交易區塊生成第二交易區塊,並將所述第二交易區塊上傳到所述第二區塊鏈側鏈中。 In another embodiment, after the first transaction block is generated, the block chain construction method further includes: receiving a second transaction request from the user terminal at a second location, determining the distance from the second The second target edge computing node with the closest location; assigning the second transaction request to the second block chain side chain where the second target edge computing node is located; judging the relationship between the first block chain side chain and the Whether the second blockchain side chain has a common edge computing node; when it is determined that the first blockchain side chain and the second blockchain side chain have a common edge computing node, through the common edge The calculation node obtains the first transaction block; generates a second transaction block according to the first transaction block, and uploads the second transaction block to the second block chain side chain.

所述第一區塊鏈側鏈與所述第二區塊鏈側鏈有所述共同的邊緣計算節點;當所述使用者終端在所述第一位置透過第一區塊鏈側鏈進行第一次交易時,所述共同的邊緣計算節點能夠獲取第一次交易的交易資訊;當所述使用者終端在所述第二位置透過第二區塊鏈側鏈進行第二次交易時,所述第二區塊鏈側鏈能夠透過所述共同的邊緣計算節點獲取第一次交易的交易資訊。透過所述共同的邊緣計算節點作為交易資訊傳輸的通道,能夠減少交易資訊傳輸的時間消耗。第一次交易的交易資訊和第二次交易的交易資訊包括使用者終端的帳本資訊。 The first block chain side chain and the second block chain side chain have the common edge computing node; when the user terminal is at the first location through the first block chain side chain During a transaction, the common edge computing node can obtain the transaction information of the first transaction; when the user terminal conducts the second transaction through the second blockchain side chain at the second location, the The second block chain side chain can obtain the transaction information of the first transaction through the common edge computing node. By using the common edge computing node as a channel for transaction information transmission, the time consumption of transaction information transmission can be reduced. The transaction information of the first transaction and the transaction information of the second transaction include account book information of the user terminal.

在上述實施例中,可以用所述區塊鏈主鏈替換所述第一區塊鏈側鏈或所述第二區塊鏈側鏈。例如,用所述區塊鏈主鏈替換所述第二區塊鏈側鏈。在所述生成第一交易區塊之後,接收所述使用者終端在第二位置的第二交易請求,確定距離所述第二位置最近的第二目標邊緣計算節點;將所述第二交易請求分配給所述第二目標邊緣計算節點所在的區塊鏈(為所述區塊鏈主鏈);判斷所述第一區塊鏈側鏈與所述區塊鏈主鏈是否有共同的邊緣計算節點;當確定所述第一區塊鏈側鏈與所述區塊鏈主鏈有共同的邊緣計算節點時,透過所述共 同的邊緣計算節點獲取所述第一交易區塊;根據所述第一交易區塊生成第二交易區塊,並將所述第二交易區塊上傳到所述區塊鏈主鏈中。 In the above embodiments, the first blockchain sidechain or the second blockchain sidechain can be replaced by the blockchain main chain. For example, the second blockchain side chain is replaced with the blockchain main chain. After the generation of the first transaction block, receive the second transaction request from the user terminal at the second location, determine the second target edge computing node closest to the second location; send the second transaction request Assigned to the block chain where the second target edge computing node is located (the main chain of the block chain); determine whether the side chain of the first block chain and the main chain of the block chain have a common edge computing node; when it is determined that the first block chain side chain and the block chain main chain have a common edge computing node, through the common The same edge computing node obtains the first transaction block; generates a second transaction block according to the first transaction block, and uploads the second transaction block to the blockchain main chain.

圖2是本發明實施例提供的節點群的示意圖。中間的菱形塊表示雲端中心,正方形塊表示邊緣計算節點。包括菱形塊的橢圓表示由所述雲端中心和所述多個第一邊緣計算節點組成的主鏈節點群,不包括菱形塊的橢圓或圓表示由所述共用邊緣計算節點和所述多個第二邊緣計算節點組成的側鏈節點群。同時存在於主鏈節點群和側鏈節點群的邊緣計算節點為所述共用邊緣計算節點。 Fig. 2 is a schematic diagram of a node group provided by an embodiment of the present invention. The diamond-shaped block in the middle represents the cloud center, and the square block represents the edge computing node. An ellipse including a diamond-shaped block represents the main chain node group composed of the cloud center and the plurality of first edge computing nodes, and an ellipse or circle not including a diamond-shaped block represents the main chain node group composed of the shared edge computing node and the plurality of first edge computing nodes. A side chain node group composed of two edge computing nodes. The edge computing nodes that exist in both the main chain node group and the side chain node group are the shared edge computing nodes.

圖3是本發明實施例提供的主側鏈產生區塊的示意圖。基於所述主鏈節點群(基於所述雲端中心和所述多個第一邊緣計算節點構建一條區塊鏈主鏈)構建區塊鏈主鏈後,控制側鏈節點群(所述共用邊緣計算節點和所述多個第二邊緣計算節點)從區塊鏈主鏈中的A區塊產生區塊鏈側鏈的創世區塊。該區塊鏈側鏈對應一個側鏈節點群,該側鏈節點群在該區塊鏈側鏈繼續產生新的區塊。當產生X區塊後,區塊鏈側鏈滿足預設條件(如區塊鏈側鏈的長度達到5個),透過合併X區塊的hash值和區塊鏈主鏈的對應區塊的hash值將區塊鏈側鏈的信息錨定到主鏈。 Fig. 3 is a schematic diagram of blocks generated by the main side chain provided by the embodiment of the present invention. After constructing the blockchain main chain based on the main chain node group (based on the cloud center and the plurality of first edge computing nodes to construct a blockchain main chain), control the side chain node group (the shared edge computing node group) node and the plurality of second edge computing nodes) generate the genesis block of the blockchain side chain from the A block in the blockchain main chain. The blockchain side chain corresponds to a side chain node group, and the side chain node group continues to generate new blocks in the blockchain side chain. When the X block is generated, the blockchain side chain meets the preset conditions (such as the length of the blockchain side chain reaches 5), by merging the hash value of the X block and the hash value of the corresponding block of the blockchain main chain The value anchors the information of the blockchain side chain to the main chain.

圖4是本發明實施例提供的根據交易請求方的位置處理交易的示意圖。L1、L2、L3表示3個不同的位置。N1、N2、N3、Nc表示節點。將N1、N2所屬的節點群記為第一節點群,將N3所屬的節點群記為第二節點群。Nc為第一節點群和第二節點群間的第二共用節點。其中,第一節點群和第二節點群為側鏈節點群;或第一節點群為主鏈節點群,第二節點群為側鏈節點群;或第一節點群為側鏈節點群,第二節點群為主鏈節點群。 Fig. 4 is a schematic diagram of processing a transaction according to the location of the transaction requester provided by an embodiment of the present invention. L1, L2, L3 represent 3 different positions. N1, N2, N3, and Nc represent nodes. The node group to which N1 and N2 belong is referred to as a first node group, and the node group to which N3 belongs is referred to as a second node group. Nc is a second shared node between the first node group and the second node group. Among them, the first node group and the second node group are side chain node groups; or the first node group is the main chain node group, and the second node group is the side chain node group; or the first node group is the side chain node group, and the second node group is the side chain node group. The two-node group is the main chain node group.

當使用者終端在位置L1發送交易請求時,將交易請求分配給距離位置L1最近的N1節點。N1節點屬於第一節點群,第一節點群對應第一區塊鏈側鏈,透過第一節點群驗證交易是否有效,當交易有效時,透過第一節點群在第一區塊鏈側鏈中新生成第一個交易區塊。 When the user terminal sends a transaction request at the location L1, the transaction request is distributed to the N1 node closest to the location L1. The N1 node belongs to the first node group, and the first node group corresponds to the side chain of the first block chain. Through the first node group, it is verified whether the transaction is valid. When the transaction is valid, through the first node group in the first block chain side chain Newly generate the first transaction block.

當使用者終端在位置L2發送交易請求時,將交易請求分配給距離位置L2最近的N2節點。N2節點屬於第一節點群,透過第一節點群驗證交易是否有效,當交易有效時,透過第一節點群在第一區塊鏈側鏈中新生成二個交易區塊。 When the user terminal sends a transaction request at the location L2, the transaction request is distributed to the N2 node closest to the location L2. The N2 node belongs to the first node group and verifies whether the transaction is valid through the first node group. When the transaction is valid, two transaction blocks are newly generated in the first blockchain side chain through the first node group.

當使用者終端在位置L3發送交易請求時,將交易請求分配給距離位置L3最近的N3節點。N3節點屬於第二節點群,第二節點群對應第二區塊鏈側鏈,透過第二節點群驗證交易是否有效,當交易有效時,透過第二節點群在第二區塊鏈側鏈中新生成第三個交易區塊。第一節點群和第二節點群中都存在Nc節點(所述共同的邊緣計算節點),當使用者終端在第一區塊鏈側鏈進行交易時,Nc節點能夠獲得使用者終端的帳本資訊;當使用者終端在第二區塊鏈側鏈進行交易時,第二節點群能夠從Nc節點獲取使用者終端的帳本資訊。 When the user terminal sends a transaction request at the location L3, the transaction request is allocated to the N3 node closest to the location L3. The N3 node belongs to the second node group, and the second node group corresponds to the second blockchain side chain. Through the second node group, it is verified whether the transaction is valid. When the transaction is valid, the second node group is in the second blockchain side chain. A third transaction block is newly generated. There are Nc nodes (the common edge computing nodes) in both the first node group and the second node group. When the user terminal conducts transactions on the first block chain side chain, the Nc node can obtain the ledger of the user terminal Information; when the user terminal conducts transactions on the second blockchain side chain, the second node group can obtain the ledger information of the user terminal from the Nc node.

實施例二: Embodiment two:

圖5為本發明實施例提供的區塊鏈構建裝置較佳實施例的結構圖。所述區塊鏈構建裝置20應用於分散式系統,所述分散式系統包括雲端中心及多個邊緣計算節點。 Fig. 5 is a structural diagram of a preferred embodiment of the block chain construction device provided by the embodiment of the present invention. The block chain construction device 20 is applied to a distributed system, and the distributed system includes a cloud center and a plurality of edge computing nodes.

如圖5所示,所述區塊鏈構建裝置20可以包括:第一構建單元201、第二構建單元202、寫入單元203。 As shown in FIG. 5 , the block chain construction device 20 may include: a first construction unit 201 , a second construction unit 202 , and a writing unit 203 .

第一構建單元201,用於獲取距離所述雲端中心預設第一距離閾值的多個第一邊緣計算節點,並基於所述雲端中心和所述多個第一邊緣計算節點構建一條區塊鏈主鏈。 The first construction unit 201 is configured to acquire a plurality of first edge computing nodes with a preset first distance threshold from the cloud center, and construct a blockchain based on the cloud center and the plurality of first edge computing nodes main chain.

具體地,獲取各個邊緣計算節點與所述雲端中心的距離值,將距離值小於或等於所述預設第一距離閾值的邊緣計算節點確定為多個第一邊緣計算節點。 Specifically, the distance value between each edge computing node and the cloud center is obtained, and the edge computing nodes whose distance value is less than or equal to the preset first distance threshold are determined as a plurality of first edge computing nodes.

例如,預設第一距離閾值為2km,獲取雲端中心與3個邊緣計算節點(節點A、節點B、節點C)的距離。雲端中心與節點A的距離為1km, 雲端中心與節點B的距離為2km,雲端中心與節點C的距離為3km,將節點A和節點B確定為多個第一邊緣計算節點。 For example, the preset first distance threshold is 2km, and the distances between the cloud center and three edge computing nodes (node A, node B, and node C) are obtained. The distance between the cloud center and node A is 1km, The distance between the cloud center and node B is 2km, the distance between the cloud center and node C is 3km, and nodes A and B are determined as multiple first edge computing nodes.

在一具體實施例中,所述基於所述雲端中心和所述多個第一邊緣計算節點構建一條區塊鏈主鏈包括:透過所述雲端中心生成第一創世區塊;透過所述多個第一邊緣計算節點驗證所述第一創世區塊;當確定驗證所述第一創世區塊成功時,將所述第一創世區塊作為所述區塊鏈主鏈的鏈頭,並控制所述雲端中心和所述多個第一邊緣計算節點繼續生成區塊。 In a specific embodiment, said building a blockchain main chain based on said cloud center and said plurality of first edge computing nodes includes: generating a first genesis block through said cloud center; The first edge computing node verifies the first genesis block; when it is determined that the verification of the first genesis block is successful, the first genesis block is used as the chain head of the blockchain main chain, and controls all The cloud center and the plurality of first edge computing nodes continue to generate blocks.

可以基於所述雲端中心和所述多個第一邊緣計算節點組建區塊鏈網路,使所述雲端中心和所述第一邊緣計算節點能夠相互通信。區塊鏈(包括區塊鏈主鏈)由多個相連的區塊構成,每個區塊記錄了一段時間內區塊鏈網路中的交易情況,可以將區塊視為帳簿中的帳頁。第一個被最早構建的區塊稱為創世區塊,擁有一個唯一的ID標識號。除創世區塊外,每個後續建立的區塊均包含兩個ID號,一個是該區塊自身的ID號,另一個是前序區塊的ID號。透過ID號間的前後指向關係,所有區塊按序相連就構成了區塊鏈。 A blockchain network can be established based on the cloud center and the plurality of first edge computing nodes, so that the cloud center and the first edge computing nodes can communicate with each other. The blockchain (including the blockchain main chain) is composed of multiple connected blocks, and each block records the transactions in the blockchain network for a period of time, and the blocks can be regarded as the account pages in the account book . The first block to be constructed is called the genesis block, which has a unique ID number. Except for the genesis block, each subsequent block contains two ID numbers, one is the ID number of the block itself, and the other is the ID number of the previous block. Through the forward and backward pointing relationship between ID numbers, all blocks are connected in sequence to form a blockchain.

所述創世區塊(包括第一創世區塊)包含有創世區塊時間戳記、初始雜湊值及初始核心參數。 The genesis block (including the first genesis block) includes a genesis block timestamp, an initial hash value and initial core parameters.

第二構建單元202,用於從所述多個第一邊緣計算節點中選取至少一個第一邊緣計算節點作為共用邊緣計算節點,並獲取距離所述共用邊緣計算節點預設第二距離閾值的多個第二邊緣計算節點,基於所述共用邊緣計算節點及所述多個第二邊緣計算節點構建至少一條區塊鏈側鏈。 The second construction unit 202 is configured to select at least one first edge computing node from the plurality of first edge computing nodes as a shared edge computing node, and acquire a distance from the shared edge computing node to a preset second distance threshold. a second edge computing node, constructing at least one block chain side chain based on the common edge computing node and the plurality of second edge computing nodes.

具體地,所述獲取距離所述共用邊緣計算節點預設第二距離閾值的多個第二邊緣計算節點包括:獲取預設節點數量閾值,獲取一個共用邊緣計算節點,以共用邊緣計算節點為當前節點查找當前節點的鄰近節點,將當前節點和當前節點的鄰近節點確定為第二邊緣計算節點;將當前節點的鄰近節點確定為當前節點,反覆運算查找當前節點的鄰近節點,將當前節點的鄰近節點確定為第二邊緣計算節點,當第二邊緣計算節點的數量等於所述預設節點數量閾 值時,停止反覆運算。當前節點的鄰近節點是距離當前節點最近的一個或多個節點。 Specifically, the acquiring a plurality of second edge computing nodes with a preset second distance threshold from the shared edge computing node includes: acquiring a preset threshold number of nodes, acquiring a shared edge computing node, and taking the shared edge computing node as the current The node searches the adjacent nodes of the current node, and determines the current node and the adjacent nodes of the current node as the second edge computing node; determines the adjacent nodes of the current node as the current node, repeatedly calculates the adjacent nodes of the current node, and determines the adjacent nodes of the current node The node is determined as a second edge computing node, when the number of second edge computing nodes is equal to the preset node number threshold value, stop iterative operation. The neighbors of the current node are one or more nodes closest to the current node.

在一具體實施例中,所述基於所述共用邊緣計算節點及所述多個第二邊緣計算節點構建至少一條區塊鏈側鏈包括:將所述共用邊緣計算節點產生的區塊作為第二創世區塊;透過所述共用邊緣計算節點和所述多個第二邊緣計算節點驗證所述第二創世區塊;當確定驗證所述第二創世區塊成功時,將所述第二創世區塊作為所述至少一條區塊鏈側鏈的鏈頭,並控制所述共用邊緣計算節點和所述多個第二邊緣計算節點繼續生成區塊。 In a specific embodiment, the constructing at least one blockchain side chain based on the shared edge computing node and the plurality of second edge computing nodes includes: using the block generated by the shared edge computing node as the second Genesis block; verifying the second genesis block through the shared edge computing node and the plurality of second edge computing nodes; when it is determined that the verification of the second genesis block is successful, the second genesis block The block serves as the chain head of the at least one blockchain side chain, and controls the shared edge computing node and the plurality of second edge computing nodes to continue to generate blocks.

可以基於所述共用邊緣計算節點及所述多個第二邊緣計算節點組建區塊鏈網路。所述共用邊緣計算節點連接了所述多個第一邊緣計算節點、所述雲端中心和所述多個第二邊緣計算節點。 A blockchain network can be established based on the shared edge computing node and the plurality of second edge computing nodes. The shared edge computing node connects the plurality of first edge computing nodes, the cloud center and the plurality of second edge computing nodes.

在另一實施例中,所述區塊鏈主鏈和所述至少一條區塊鏈側鏈採用相同的共識機制。所述共識機制包括DPOS(授權股權證明,Delegated Proof-of-Stake)機制、PoW(工作量證明,Proof of Work)機制等。所述共識機制用於驗證新產生的區塊的有效性。例如,控制所述共用邊緣計算節點及所述多個第二邊緣計算節點透過所述共識機制驗證所述第二創世區塊。 In another embodiment, the blockchain main chain and the at least one blockchain side chain adopt the same consensus mechanism. The consensus mechanism includes a DPOS (Delegated Proof-of-Stake) mechanism, a PoW (Proof of Work) mechanism, and the like. The consensus mechanism is used to verify the validity of newly generated blocks. For example, controlling the shared edge computing node and the plurality of second edge computing nodes to verify the second genesis block through the consensus mechanism.

寫入單元203,用於將所述至少一條區塊鏈側鏈產生的區塊寫入所述區塊鏈主鏈中。 The writing unit 203 is configured to write the blocks generated by the at least one blockchain side chain into the blockchain main chain.

在一具體實施例中,所述將所述至少一條區塊鏈側鏈產生的區塊寫入所述區塊鏈主鏈中包括:判斷所述至少一條區塊鏈側鏈是否滿足預設條件;當所述至少一條區塊鏈側鏈滿足所述預設條件時,獲取所述至少一條區塊鏈側鏈的最後一個區塊的第一雜湊值,獲取所述區塊鏈主鏈的最後一個區塊的第二雜湊值;控制所述雲端中心和所述多個第一邊緣計算節點在所述區塊鏈主鏈新生成一個目標區塊,將所述第一雜湊值和所述第二雜湊值寫入所述目標區塊,使所述目標區塊的雜湊值等於所述第一雜湊值與所述第二雜湊值的合併值。 In a specific embodiment, writing the block generated by the at least one blockchain side chain into the blockchain main chain includes: judging whether the at least one blockchain side chain satisfies a preset condition ; When the at least one block chain side chain meets the preset condition, obtain the first hash value of the last block of the at least one block chain side chain, and obtain the last hash value of the block chain main chain The second hash value of a block; control the cloud center and the plurality of first edge computing nodes to generate a new target block on the blockchain main chain, and combine the first hash value and the second hash value Two hash values are written into the target block, so that the hash value of the target block is equal to the combined value of the first hash value and the second hash value.

在一具體實施例中,所述判斷所述至少一條區塊鏈側鏈是否滿足預設條件包括:獲取所述至少一條區塊鏈側鏈產生的區塊的總數量;判斷所述總數量是否等於預設數量閾值;當所述總數量等於所述預設數量閾值時,確定所述至少一條區塊鏈側鏈滿足所述預設條件;當所述總數量小於所述預設數量閾值,確定所述至少一條區塊鏈側鏈不滿足所述預設條件。 In a specific embodiment, the judging whether the at least one blockchain side chain satisfies the preset condition includes: obtaining the total number of blocks generated by the at least one blockchain side chain; judging whether the total number equal to a preset quantity threshold; when the total quantity is equal to the preset quantity threshold, it is determined that the at least one block chain side chain satisfies the preset condition; when the total quantity is less than the preset quantity threshold, It is determined that the at least one blockchain side chain does not satisfy the preset condition.

在另一實施例中,當所述總數量大於所述預設數量閾值時,確定所述至少一條區塊鏈側鏈滿足所述預設條件。 In another embodiment, when the total quantity is greater than the preset quantity threshold, it is determined that the at least one blockchain sidechain satisfies the preset condition.

在另一實施例中,所述判斷所述至少一條區塊鏈側鏈是否滿足預設條件包括:獲取上一次將所述至少一條區塊鏈側鏈寫入所述區塊鏈主鏈的第一時間點,獲取預設週期和當前時間點;根據所述第一時間點和所述預設週期,確定下一次將所述至少一條區塊鏈側鏈寫入所述區塊鏈主鏈的第二時間點;當所述當前時間點等於所述第二時間點,判斷所述至少一條區塊鏈側鏈滿足預設條件;當所述當前時間點不等於所述第二時間點,判斷所述至少一條區塊鏈側鏈不滿足預設條件。 In another embodiment, the judging whether the at least one blockchain side chain satisfies the preset condition includes: obtaining the last time the at least one blockchain side chain was written into the blockchain main chain A point in time, obtaining a preset cycle and the current point in time; according to the first point in time and the preset cycle, determine the next time to write the at least one block chain side chain into the block chain main chain The second time point; when the current time point is equal to the second time point, it is judged that the at least one blockchain side chain satisfies the preset condition; when the current time point is not equal to the second time point, it is judged The at least one blockchain side chain does not meet the preset condition.

在一具體實施例中,將所述至少一條區塊鏈側鏈寫入所述區塊鏈主鏈之後,控制所述共用邊緣計算節點及所述多個第二邊緣計算節點根據所述區塊鏈主鏈重新構建新的區塊鏈側鏈。當重新構建新的區塊鏈側鏈時,所述共用邊緣計算節點及所述多個第二邊緣計算節點在新的區塊鏈側鏈中生成區塊的難度降低。 In a specific embodiment, after writing the at least one block chain side chain into the block chain main chain, control the shared edge computing node and the plurality of second edge computing nodes according to the block The chain main chain rebuilds a new blockchain side chain. When a new blockchain sidechain is rebuilt, the difficulty for the shared edge computing node and the multiple second edge computing nodes to generate blocks in the new blockchain sidechain is reduced.

實施例二的區塊鏈構建裝置20可以構建由區塊鏈側鏈和區塊鏈主鏈組成的區塊鏈,提升構建區塊鏈的效率。透過將邊緣計算節點視作為區塊鏈節點,並藉由適當的分群與側鏈控制,有效的將分散式系統中的邊緣計算節點構建成一個高效能的區塊鏈網路,從而保障分散式系統中資料的同步及傳輸過程中的安全。 The block chain construction device 20 of the second embodiment can construct a block chain composed of a block chain side chain and a block chain main chain, and improve the efficiency of block chain construction. By treating the edge computing nodes as blockchain nodes, and through appropriate grouping and side chain control, the edge computing nodes in the decentralized system can be effectively constructed into a high-performance blockchain network, thereby ensuring the decentralized Synchronization of data in the system and security during transmission.

在另一實施例中,所述區塊鏈構建裝置還包括上傳單元,用於接收使用者終端在第一位置的第一交易請求,確定距離所述第一位置最近的第一 目標邊緣計算節點;將所述第一交易請求分配給所述第一目標邊緣計算節點所在的第一區塊鏈側鏈中,並透過所述第一區塊鏈側鏈驗證所述第一交易請求的有效性並生成第一交易區塊;將所述第一交易區塊上傳到所述第一區塊鏈側鏈中。 In another embodiment, the block chain construction device further includes an upload unit, configured to receive a first transaction request from a user terminal at a first location, and determine the first transaction request closest to the first location. The target edge computing node; assigning the first transaction request to the first block chain side chain where the first target edge computing node is located, and verifying the first transaction through the first block chain side chain request validity and generate a first transaction block; upload the first transaction block to the first block chain side chain.

在另一實施例中,所述上傳單元還用於在所述生成第一交易區塊之後,接收所述使用者終端在第二位置的第二交易請求,確定距離所述第二位置最近的第二目標邊緣計算節點;將所述第二交易請求分配給所述第二目標邊緣計算節點所在的第二區塊鏈側鏈;判斷所述第一區塊鏈側鏈與所述第二區塊鏈側鏈是否有共同的邊緣計算節點;當確定所述第一區塊鏈側鏈與所述第二區塊鏈側鏈有共同的邊緣計算節點時,透過所述共同的邊緣計算節點獲取所述第一交易區塊;根據所述第一交易區塊生成第二交易區塊,並將所述第二交易區塊上傳到所述第二區塊鏈側鏈中。 In another embodiment, the uploading unit is further configured to receive a second transaction request from the user terminal at a second location after the generation of the first transaction block, and determine the transaction request closest to the second location. The second target edge computing node; assigning the second transaction request to the second block chain side chain where the second target edge computing node is located; judging the connection between the first block chain side chain and the second area Whether the block chain side chain has a common edge computing node; when it is determined that the first block chain side chain and the second block chain side chain have a common edge computing node, obtain through the common edge computing node The first transaction block; generating a second transaction block according to the first transaction block, and uploading the second transaction block to the second block chain side chain.

所述第一區塊鏈側鏈與所述第二區塊鏈側鏈有所述共同的邊緣計算節點;當所述使用者終端在所述第一位置透過第一區塊鏈側鏈進行第一次交易時,所述共同的邊緣計算節點能夠獲取第一次交易的交易資訊;當所述使用者終端在所述第二位置透過第二區塊鏈側鏈進行第二次交易時,所述第二區塊鏈側鏈能夠透過所述共同的邊緣計算節點獲取第一次交易的交易資訊。透過所述共同的邊緣計算節點作為交易資訊傳輸的通道,能夠減少交易資訊傳輸的時間消耗。第一次交易的交易資訊和第二次交易的交易資訊包括使用者終端的帳本資訊。 The first block chain side chain and the second block chain side chain have the common edge computing node; when the user terminal is at the first location through the first block chain side chain During a transaction, the common edge computing node can obtain the transaction information of the first transaction; when the user terminal conducts the second transaction through the second blockchain side chain at the second location, the The second block chain side chain can obtain the transaction information of the first transaction through the common edge computing node. By using the common edge computing node as a channel for transaction information transmission, the time consumption of transaction information transmission can be reduced. The transaction information of the first transaction and the transaction information of the second transaction include account book information of the user terminal.

在上述實施例中,可以用所述區塊鏈主鏈替換所述第一區塊鏈側鏈或所述第二區塊鏈側鏈。例如,用所述區塊鏈主鏈替換所述第二區塊鏈側鏈。在所述生成第一交易區塊之後,接收所述使用者終端在第二位置的第二交易請求,確定距離所述第二位置最近的第二目標邊緣計算節點;將所述第二交易請求分配給所述第二目標邊緣計算節點所在的區塊鏈(為所述區塊鏈主鏈);判斷所述第一區塊鏈側鏈與所述區塊鏈主鏈是否有共同的邊緣計算節點;當確定 所述第一區塊鏈側鏈與所述區塊鏈主鏈有共同的邊緣計算節點時,透過所述共同的邊緣計算節點獲取所述第一交易區塊;根據所述第一交易區塊生成第二交易區塊,並將所述第二交易區塊上傳到所述區塊鏈主鏈中。 In the above embodiments, the first blockchain sidechain or the second blockchain sidechain can be replaced by the blockchain main chain. For example, the second blockchain side chain is replaced with the blockchain main chain. After the generation of the first transaction block, receive the second transaction request from the user terminal at the second location, determine the second target edge computing node closest to the second location; send the second transaction request Assigned to the block chain where the second target edge computing node is located (the main chain of the block chain); determine whether the side chain of the first block chain and the main chain of the block chain have a common edge computing node; when determined When the first block chain side chain and the block chain main chain have a common edge computing node, the first transaction block is obtained through the common edge computing node; according to the first transaction block A second transaction block is generated, and the second transaction block is uploaded to the blockchain main chain.

實施例三 Embodiment Three

本實施例提供一種電腦可讀儲存介質,該電腦可讀儲存介質上儲存有電腦程式,該電腦程式被處理器執行時實現上述區塊鏈構建方法實施例中的步驟,例如圖1所示的101-103:101,獲取距離所述雲端中心預設第一距離閾值的多個第一邊緣計算節點,並基於所述雲端中心和所述多個第一邊緣計算節點構建一條區塊鏈主鏈;102,從所述多個第一邊緣計算節點中選取至少一個第一邊緣計算節點作為共用邊緣計算節點,並獲取距離所述共用邊緣計算節點預設第二距離閾值的多個第二邊緣計算節點,基於所述共用邊緣計算節點及所述多個第二邊緣計算節點構建至少一條區塊鏈側鏈;103,將所述至少一條區塊鏈側鏈產生的區塊寫入所述區塊鏈主鏈中。 This embodiment provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned block chain construction method embodiment are implemented, for example, as shown in FIG. 1 101-103: 101, obtaining a plurality of first edge computing nodes with a preset first distance threshold from the cloud center, and constructing a blockchain main chain based on the cloud center and the plurality of first edge computing nodes ; 102. Selecting at least one first edge computing node from the plurality of first edge computing nodes as a shared edge computing node, and obtaining a plurality of second edge computing nodes with a preset second distance threshold from the shared edge computing node A node, constructing at least one blockchain side chain based on the shared edge computing node and the plurality of second edge computing nodes; 103, writing the block generated by the at least one blockchain side chain into the block in the main chain.

或者,該電腦程式被處理器執行時實現上述裝置實施例中各模組/單元的功能,例如圖5中的單元201-203:第一構建單元201,用於獲取距離所述雲端中心預設第一距離閾值的多個第一邊緣計算節點,並基於所述雲端中心和所述多個第一邊緣計算節點構建一條區塊鏈主鏈;第二構建單元202,用於從所述多個第一邊緣計算節點中選取至少一個第一邊緣計算節點作為共用邊緣計算節點,並獲取距離所述共用邊緣計算節點預設第二距離閾值的多個第二邊緣計算節點,基於所述共用邊緣計算節點及所述多個第二邊緣計算節點構建至少一條區塊鏈側鏈; 寫入單元203,用於將所述至少一條區塊鏈側鏈產生的區塊寫入所述區塊鏈主鏈中。 Alternatively, when the computer program is executed by the processor, the functions of the modules/units in the above-mentioned device embodiments are realized, such as the units 201-203 in FIG. 5: the first construction unit 201 is used to obtain the preset distance from the cloud center A plurality of first edge computing nodes with a first distance threshold, and construct a block chain main chain based on the cloud center and the plurality of first edge computing nodes; the second construction unit 202 is configured to obtain from the plurality of Select at least one first edge computing node from the first edge computing nodes as a shared edge computing node, and obtain a plurality of second edge computing nodes with a preset second distance threshold from the shared edge computing node, based on the shared edge computing node The node and the plurality of second edge computing nodes construct at least one blockchain side chain; The writing unit 203 is configured to write the blocks generated by the at least one blockchain side chain into the blockchain main chain.

實施例四 Embodiment Four

圖6為本發明實施例提供的電腦設備的示意圖。所述電腦設備30包括儲存器301、處理器302、儲存在所述儲存器301中並可在所述處理器302上運行的電腦程式303以及匯流排304,例如區塊鏈構建方法程式。所述處理器302執行所述電腦程式303時實現上述區塊鏈構建方法實施例中的步驟,例如圖1所示的101-103:101,獲取距離所述雲端中心預設第一距離閾值的多個第一邊緣計算節點,並基於所述雲端中心和所述多個第一邊緣計算節點構建一條區塊鏈主鏈;102,從所述多個第一邊緣計算節點中選取至少一個第一邊緣計算節點作為共用邊緣計算節點,並獲取距離所述共用邊緣計算節點預設第二距離閾值的多個第二邊緣計算節點,基於所述共用邊緣計算節點及所述多個第二邊緣計算節點構建至少一條區塊鏈側鏈;103,將所述至少一條區塊鏈側鏈產生的區塊寫入所述區塊鏈主鏈中。 FIG. 6 is a schematic diagram of a computer device provided by an embodiment of the present invention. The computer device 30 includes a storage 301 , a processor 302 , a computer program 303 stored in the storage 301 and operable on the processor 302 , and a bus 304 , such as a block chain construction method program. When the processor 302 executes the computer program 303, it realizes the steps in the above-mentioned block chain construction method embodiment, such as 101-103: 101 shown in FIG. a plurality of first edge computing nodes, and build a blockchain main chain based on the cloud center and the plurality of first edge computing nodes; 102, select at least one first edge computing node from the plurality of first edge computing nodes The edge computing node is used as a shared edge computing node, and a plurality of second edge computing nodes with a preset second distance threshold from the shared edge computing node are obtained, based on the shared edge computing node and the plurality of second edge computing nodes Construct at least one blockchain side chain; 103, write the block generated by the at least one blockchain side chain into the blockchain main chain.

或者,所述處理器302執行所述電腦程式303時實現上述裝置實施例中各模組/單元的功能,例如圖5中的單元201-203:第一構建單元201,用於獲取距離所述雲端中心預設第一距離閾值的多個第一邊緣計算節點,並基於所述雲端中心和所述多個第一邊緣計算節點構建一條區塊鏈主鏈;第二構建單元202,用於從所述多個第一邊緣計算節點中選取至少一個第一邊緣計算節點作為共用邊緣計算節點,並獲取距離所述共用邊緣計算節點預設第二距離閾值的多個第二邊緣計算節點,基於所述共用邊緣計算節點及所述多個第二邊緣計算節點構建至少一條區塊鏈側鏈; 寫入單元203,用於將所述至少一條區塊鏈側鏈產生的區塊寫入所述區塊鏈主鏈中。 Or, when the processor 302 executes the computer program 303, it realizes the functions of the modules/units in the above-mentioned device embodiments, for example, the units 201-203 in FIG. 5: the first construction unit 201, which is used to obtain the distance The cloud center presets a plurality of first edge computing nodes with a first distance threshold, and builds a block chain main chain based on the cloud center and the plurality of first edge computing nodes; the second construction unit 202 is used to Selecting at least one first edge computing node from the plurality of first edge computing nodes as a shared edge computing node, and obtaining a plurality of second edge computing nodes preset to a second distance threshold from the shared edge computing node, based on the The shared edge computing node and the plurality of second edge computing nodes construct at least one block chain side chain; The writing unit 203 is configured to write the blocks generated by the at least one blockchain side chain into the blockchain main chain.

示例性的,所述電腦程式303可以被分割成一個或多個模組/單元,所述一個或者多個模組/單元被儲存在所述儲存器301中,並由所述處理器302執行,以完成本發明。所述一個或多個模組/單元可以是能夠完成特定功能的一系列電腦程式指令段,該指令段用於描述所述電腦程式303在所述電腦設備30中的執行過程。例如,所述電腦程式303可以被分割成圖5中的第一構建單元201、第二構建單元202、寫入單元203,各單元具體功能參見實施例二。 Exemplarily, the computer program 303 can be divided into one or more modules/units, and the one or more modules/units are stored in the storage 301 and executed by the processor 302 , to complete the present invention. The one or more modules/units may be a series of computer program instruction segments capable of accomplishing specific functions, and the instruction segments are used to describe the execution process of the computer program 303 in the computer device 30 . For example, the computer program 303 can be divided into the first construction unit 201 , the second construction unit 202 , and the writing unit 203 in FIG. 5 . For specific functions of each unit, refer to Embodiment 2.

所述電腦設備30可以是PC(Personal Computer,個人電腦),也可以是智慧手機、平板電腦、掌上型電腦、可攜式電腦、智慧路由器、礦機、網路存放裝置等終端設備。 The computer device 30 may be a PC (Personal Computer, personal computer), or may be a terminal device such as a smart phone, a tablet computer, a palmtop computer, a portable computer, a smart router, a mining machine, or a network storage device.

所稱處理器302可以是中央處理單元(Central Processing Unit,CPU),還可以是其他通用處理器、數位訊號處理器(Digital Signal Processor,DSP)、專用積體電路(Application Specific Integrated Circuit,ASIC)、現場可程式設計閘陣列(Field-Programmable Gate Array,FPGA)或者其他可程式設計邏輯器件、分立門或者電晶體邏輯器件、分立硬體元件等。通用處理器可以是微處理器或者該處理器302也可以是任何常規的處理器等,所述處理器302是所述電腦設備30的控制中心,利用各種介面和線路連接整個電腦設備30的各個部分。 The so-called processor 302 may be a central processing unit (Central Processing Unit, CPU), and may also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC) , Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor 302 can also be any conventional processor, etc., the processor 302 is the control center of the computer device 30, and uses various interfaces and lines to connect the various components of the entire computer device 30. part.

所述儲存器301可用於儲存所述電腦程式303和/或模組/單元,所述處理器302透過運行或執行儲存在所述儲存器301內的電腦程式和/或模組/單元,以及調用儲存在儲存器301內的資料,實現所述電腦設備30的各種功能。所述儲存器301可主要包括儲存程式區和儲存資料區,其中,儲存程式區可儲存作業系統、至少一個功能所需的應用程式(比如聲音播放功能、圖像播放功能等)等;儲存資料區可儲存根據電腦設備30的使用所創建的資料等。此外,儲存器301可以包括非易失性儲存器,例如硬碟、儲存器、插接式硬碟,智慧儲存卡(Smart Media Card,SMC),安全數位(Secure Digital,SD)卡,快閃儲 存器卡(Flash Card)、至少一個磁碟儲存器件、快閃儲存器器件、或其他易失性固態儲存器件。 The storage 301 can be used to store the computer programs 303 and/or modules/units, the processor 302 runs or executes the computer programs and/or modules/units stored in the storage 301, and The data stored in the memory 301 is invoked to realize various functions of the computer device 30 . The storage 301 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application program required by a function (such as a sound playback function, an image playback function, etc.); The area can store materials and the like created according to the use of the computer device 30 . In addition, the storage 301 may include non-volatile storage, such as hard disk, memory, plug-in hard disk, smart memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash memory reserve memory card (Flash Card), at least one magnetic disk storage device, flash memory device, or other volatile solid state storage devices.

所述匯流排304以是外設部件互連標準(peripheral component interconnect,簡稱PCI)匯流排或延伸工業標準架構(extended industry standard architecture,簡稱EISA)匯流排等。所述匯流排304可以分為位址匯流排、資料匯流排、控制匯流排等。為便於表示,圖6中僅用一條粗線表示,但並不表示僅有一根匯流排或一種類型的匯流排。 The bus 304 may be a peripheral component interconnect (PCI for short) bus or an extended industry standard architecture (EISA for short) bus or the like. The bus 304 can be divided into address bus, data bus, control bus and so on. For ease of representation, only one thick line is used in FIG. 6 , but it does not mean that there is only one bus bar or one type of bus bar.

進一步地,電腦設備30還可以包括網路介面,網路介面可選的可以包括有線介面和/或無線介面(如WI-FI介面、藍牙介面等),通常用於在該電腦設備30與其他電腦裝置之間建立通信連接。 Further, the computer device 30 can also include a network interface, and the network interface can optionally include a wired interface and/or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which are usually used to communicate between the computer device 30 and other A communication connection is established between the computer devices.

可選地,該電腦設備30還可以包括使用者介面,使用者介面可以包括顯示器(Display)、輸入單元比如鍵盤(Keyboard),可選的使用者介面還可以包括標準的有線介面、無線介面。可選地,在一些實施例中,顯示器可以是LED顯示器、液晶顯示器、觸控式液晶顯示器以及OLED(Organic Light-Emitting Diode,有機發光二極體)觸摸器等。其中,顯示器也可以適當的稱為顯示幕或顯示單元,用於顯示在電腦設備30中處理的資訊以及用於顯示視覺化的使用者介面。 Optionally, the computer device 30 may also include a user interface, which may include a display (Display), an input unit such as a keyboard (Keyboard), and an optional user interface may also include a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, and the like. Wherein, the display may also be appropriately called a display screen or a display unit, and is used for displaying information processed in the computer device 30 and for displaying a visual user interface.

本領域技術人員可以理解,所述示意圖6僅僅是電腦設備30的示例,並不構成對電腦設備30的限定,可以包括比圖示更多或更少的部件,或者組合某些部件,或者不同的部件。 Those skilled in the art can understand that the schematic diagram 6 is only an example of the computer device 30, and does not constitute a limitation to the computer device 30. It may include more or less components than those shown in the figure, or combine certain components, or be different. parts.

在上述實施例中,可以全部或部分地透過軟體、硬體、固件或者其任意組合來實現。當使用軟體實現時,可以全部或部分地以電腦程式產品的形式實現。 In the above-mentioned embodiments, it may be fully or partially implemented through software, hardware, firmware or any combination thereof. When implemented by software, it may be implemented in whole or in part in the form of a computer program product.

所述電腦程式產品包括一個或多個電腦指令。在電腦設備上載入和執行所述電腦程式指令時,全部或部分地產生按照本發明實施例所述的流程或功能。所述電腦設備可以是通用電腦、專用電腦、電腦網路、或者其他可程 式設計裝置。所述電腦指令可以儲存在電腦可讀儲存介質中,或者從一個電腦可讀儲存介質向另一電腦可讀儲存介質傳輸,例如,所述電腦指令可以從一個網站網站、電腦、伺服器或資料中心透過有線(例如同軸電纜、光纖、數位用戶線路(DSL))或無線(例如紅外、無線、微波等)方式向另一個網站網站、電腦、伺服器或資料中心進行傳輸。所述電腦可讀儲存介質可以是電腦能夠儲存的任何可用介質或者是包含一個或多個可用介質集成的伺服器、資料中心等區塊鏈構建方法設備。所述可用介質可以是磁性介質,(例如,軟碟、硬碟、磁帶)、光介質(例如,DVD)、或者半導體介質(例如固態硬碟Solid State Disk(SSD))等。 The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer equipment, the processes or functions according to the embodiments of the present invention are generated in whole or in part. The computer equipment can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable design device. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website, computer, server or data The center transmits to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be stored by a computer, or a block chain construction method device such as a server or a data center integrated with one or more available media. The available medium may be a magnetic medium (eg, floppy disk, hard disk, magnetic tape), an optical medium (eg, DVD), or a semiconductor medium (eg, Solid State Disk (SSD)).

所屬領域的技術人員可以清楚地瞭解到,為描述的方便和簡潔,上述描述的系統,裝置和單元的具體工作過程,可以參考前述方法實施例中的對應過程,在此不再贅述。 Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.

在本申請所提供的幾個實施例中,應該理解到,所揭露的系統,裝置和方法,可以透過其它的方式實現。例如,以上所描述的裝置實施例僅僅是示意性的,例如,所述單元的劃分,僅僅為一種邏輯功能劃分,實際實現時可以有另外的劃分方式,例如多個單元或元件可以結合或者可以集成到另一個裝置,或一些特徵可以忽略,或不執行。另一點,所顯示或討論的相互之間的耦合或直接耦合或通信連接可以是透過一些介面,裝置或單元的間接耦合或通信連接,可以是電性,機械或其它的形式。 In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or elements can be combined or can be integrated into another device, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.

所述作為分離部件說明的單元可以是或者也可以不是物理上分開的,作為單元顯示的部件可以是或者也可以不是物理單元,即可以位於一個地方,或者也可以分佈到多個網路單元上。可以根據實際的需要選擇其中的部分或者全部單元來實現本實施例方案的目的。 The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may also be distributed to multiple network units . Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

另外,在本申請各個實施例中的各功能單元可以集成在一個處理單元中,也可以是各個單元單獨物理存在,也可以兩個或兩個以上單元集成在一個單元中。上述集成的單元既可以採用硬體的形式實現,也可以採用軟體功能單元的形式實現。 In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented not only in the form of hardware, but also in the form of software functional units.

所述集成的單元如果以軟體功能單元的形式實現並作為獨立的產品銷售或使用時,可以儲存在一個電腦可讀取儲存介質中。基於這樣的理解,本申請的技術方案本質上或者說對現有技術做出貢獻的部分或者該技術方案的全部或部分可以以軟體產品的形式體現出來,該電腦軟體產品儲存在一個儲存介質中,包括若干指令用以使得一台電腦設備(可以是個人電腦,伺服器,或者網路設備等)執行本申請各個實施例所述區塊鏈構建方法的全部或部分步驟。而前述的儲存介質包括:隨身碟、移動硬碟、唯讀儲存器(ROM,Read-Only Memory)、磁碟或者光碟等各種可以儲存程式碼的介質。 If the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the essence of the technical solution of this application or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of software products, and the computer software products are stored in a storage medium. Several instructions are included to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the block chain construction method described in each embodiment of the present application. The aforementioned storage media include: various media capable of storing program codes, such as a flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a magnetic disk, or an optical disk.

需要說明的是,上述本發明實施例序號僅僅為了描述,不代表實施例的優劣。並且本文中的術語“包括”、“包含”或者其任何其他變體意在涵蓋非排他性的包含,從而使得包括一系列要素的過程、裝置、物品或者方法不僅包括那些要素,而且還包括沒有明確列出的其他要素,或者是還包括為這種過程、裝置、物品或者方法所固有的要素。在沒有更多限制的情況下,由語句“包括一個......”限定的要素,並不排除在包括該要素的過程、裝置、物品或者方法中還存在另外的相同要素。 It should be noted that the serial numbers of the above embodiments of the present invention are only for description, and do not represent the advantages and disadvantages of the embodiments. And herein the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, apparatus, article or method comprising a set of elements includes not only those elements, but also includes the elements not expressly included. other elements listed, or also include elements inherent in the process, apparatus, article, or method. Without further limitations, an element defined by the phrase "comprising a..." does not preclude the presence of additional identical elements in the process, apparatus, article or method comprising that element.

以上僅為本發明的優選實施例,並非因此限制本發明的專利範圍,凡是利用本發明說明書及附圖內容所作的等效結構或等效流程變換,或直接或間接運用在其他相關的技術領域,均同理包括在本發明的專利保護範圍內。 The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process conversion made by using the description of the present invention and the contents of the accompanying drawings, or directly or indirectly used in other related technical fields , are all included in the scope of patent protection of the present invention in the same way.

Claims (9)

一種區塊鏈構建方法,由電腦設備執行,應用於分散式系統中,所述分散式系統包括雲端中心及多個邊緣計算節點,其中,所述區塊鏈構建方法包括:獲取各個所述邊緣計算節點與所述雲端中心的距離值,將距離值小於或等於預設第一距離閾值的邊緣計算節點確定為多個第一邊緣計算節點,並基於所述雲端中心和所述多個第一邊緣計算節點構建一條區塊鏈主鏈;從所述多個第一邊緣計算節點中選取至少一個第一邊緣計算節點作為共用邊緣計算節點,並獲取預設節點數量閾值,以所述共用邊緣計算節點為當前節點查找當前節點的鄰近節點,將所述當前節點和所述當前節點的鄰近節點確定為第二邊緣計算節點;將所述當前節點的鄰近節點確定為當前節點,反覆運算查找所述當前節點的鄰近節點,將所述當前節點的鄰近節點確定為所述第二邊緣計算節點,當所述第二邊緣計算節點的數量等於所述預設節點數量閾值時,停止反覆運算,基於所述共用邊緣計算節點及多個所述第二邊緣計算節點構建至少一條區塊鏈側鏈;將所述至少一條區塊鏈側鏈產生的區塊寫入所述區塊鏈主鏈中,包括:判斷所述至少一條區塊鏈側鏈是否滿足預設條件;當所述至少一條區塊鏈側鏈滿足所述預設條件時,獲取所述至少一條區塊鏈側鏈的最後一個區塊的第一雜湊值,獲取所述區塊鏈主鏈的最後一個區塊的第二雜湊值;控制所述雲端中心和所述多個第一邊緣計算節點在所述區塊鏈主鏈新生成一個目標區塊,將所述第一雜湊值和所述第二雜湊值寫入所述目標區塊,使所述目標區塊的雜湊值等於所述第一雜湊值與所述第二雜湊值的合併值。 A block chain construction method, executed by computer equipment, applied to a distributed system, the distributed system includes a cloud center and a plurality of edge computing nodes, wherein the block chain construction method includes: obtaining each of the edge Calculate the distance value between the node and the cloud center, determine the edge computing nodes whose distance value is less than or equal to the preset first distance threshold as a plurality of first edge computing nodes, and based on the cloud center and the plurality of first An edge computing node constructs a block chain main chain; select at least one first edge computing node from the plurality of first edge computing nodes as a shared edge computing node, and obtain a preset node number threshold, and use the shared edge computing node The node searches for the adjacent nodes of the current node for the current node, and determines the current node and the adjacent nodes of the current node as the second edge computing node; determines the adjacent nodes of the current node as the current node, and repeatedly calculates and searches for the The adjacent nodes of the current node determine the adjacent nodes of the current node as the second edge computing node, and when the number of the second edge computing nodes is equal to the preset node number threshold, stop iterative calculation, based on the The shared edge computing node and a plurality of the second edge computing nodes construct at least one blockchain side chain; writing the blocks generated by the at least one blockchain side chain into the blockchain main chain, including : judging whether the at least one blockchain side chain satisfies the preset condition; when the at least one blockchain side chain satisfies the preset condition, obtaining the last block of the at least one blockchain side chain The first hash value of the block chain main chain to obtain the second hash value of the last block; control the cloud center and the plurality of first edge computing nodes to generate a new block on the block chain main chain A target block, writing the first hash value and the second hash value into the target block, so that the hash value of the target block is equal to the first hash value and the second hash value combined value of . 如請求項1所述的區塊鏈構建方法,其中,所述基於所述雲端中心和所述多個第一邊緣計算節點構建一條區塊鏈主鏈包括:透過所述雲端中心生成第一創世區塊;透過所述多個第一邊緣計算節點驗證所述第一創世區塊; 當確定驗證所述第一創世區塊成功時,將所述第一創世區塊作為所述區塊鏈主鏈的鏈頭,並控制所述雲端中心和所述多個第一邊緣計算節點繼續生成區塊。 The block chain construction method according to claim 1, wherein said building a block chain main chain based on said cloud center and said plurality of first edge computing nodes includes: generating a first genesis through said cloud center a block; verifying the first genesis block through the plurality of first edge computing nodes; When it is determined that the verification of the first genesis block is successful, use the first genesis block as the chain head of the blockchain main chain, and control the cloud center and the plurality of first edge computing nodes to continue Generate blocks. 如請求項1所述的區塊鏈構建方法,其中,所述基於所述共用邊緣計算節點及多個所述第二邊緣計算節點構建至少一條區塊鏈側鏈包括:將所述共用邊緣計算節點產生的區塊作為第二創世區塊;透過所述共用邊緣計算節點和多個所述第二邊緣計算節點驗證所述第二創世區塊;當確定驗證所述第二創世區塊成功時,將所述第二創世區塊作為所述至少一條區塊鏈側鏈的鏈頭,並控制所述共用邊緣計算節點和多個所述第二邊緣計算節點繼續生成區塊。 The block chain construction method according to claim 1, wherein said building at least one block chain side chain based on said shared edge computing node and a plurality of said second edge computing nodes includes: The block generated by the node is used as the second genesis block; the second genesis block is verified through the shared edge computing node and a plurality of the second edge computing nodes; when it is determined that the verification of the second genesis block is successful , using the second genesis block as the chain head of the at least one blockchain side chain, and controlling the shared edge computing node and multiple second edge computing nodes to continue to generate blocks. 如請求項1所述的區塊鏈構建方法,其中,所述判斷所述至少一條區塊鏈側鏈是否滿足預設條件包括:獲取所述至少一條區塊鏈側鏈產生的區塊的總數量;判斷所述總數量是否等於預設數量閾值;當所述總數量等於所述預設數量閾值時,確定所述至少一條區塊鏈側鏈滿足所述預設條件;或當所述總數量小於所述預設數量閾值,確定所述至少一條區塊鏈側鏈不滿足所述預設條件。 The block chain construction method according to claim 1, wherein said judging whether said at least one block chain side chain satisfies preset conditions includes: obtaining the total number of blocks generated by said at least one block chain side chain Quantity; determine whether the total quantity is equal to the preset quantity threshold; when the total quantity is equal to the preset quantity threshold, determine that the at least one block chain side chain satisfies the preset condition; or when the total amount is less than the preset quantity threshold, it is determined that the at least one blockchain side chain does not meet the preset condition. 如請求項1所述的區塊鏈構建方法,其中,所述區塊鏈構建方法還包括:接收使用者終端在第一位置的第一交易請求,確定距離所述第一位置最近的第一目標邊緣計算節點;將所述第一交易請求分配給所述第一目標邊緣計算節點所在的第一區塊鏈側鏈中,並透過所述第一區塊鏈側鏈驗證所述第一交易請求的有效性並生成第一交易區塊; 將所述第一交易區塊上傳到所述第一區塊鏈側鏈中。 The block chain construction method according to claim 1, wherein the block chain construction method further includes: receiving the first transaction request from the user terminal at the first position, and determining the first transaction request closest to the first position The target edge computing node; assigning the first transaction request to the first block chain side chain where the first target edge computing node is located, and verifying the first transaction through the first block chain side chain The validity of the request and generate the first transaction block; Upload the first transaction block to the side chain of the first blockchain. 如請求項5所述的區塊鏈構建方法,其中,在所述生成第一交易區塊之後,所述區塊鏈構建方法還包括:接收所述使用者終端在第二位置的第二交易請求,確定距離所述第二位置最近的第二目標邊緣計算節點;將所述第二交易請求分配給所述第二目標邊緣計算節點所在的第二區塊鏈側鏈;判斷所述第一區塊鏈側鏈與所述第二區塊鏈側鏈是否有共同的邊緣計算節點;當確定所述第一區塊鏈側鏈與所述第二區塊鏈側鏈有共同的邊緣計算節點時,透過所述共同的邊緣計算節點獲取所述第一交易區塊;根據所述第一交易區塊生成第二交易區塊,並將所述第二交易區塊上傳到所述第二區塊鏈側鏈中。 The block chain construction method according to claim 5, wherein, after the first transaction block is generated, the block chain construction method further includes: receiving the second transaction of the user terminal at the second location Request, determine the second target edge computing node closest to the second location; assign the second transaction request to the second block chain side chain where the second target edge computing node is located; determine the first Whether the blockchain side chain and the second blockchain side chain have a common edge computing node; when it is determined that the first blockchain side chain and the second blockchain side chain have a common edge computing node , obtain the first transaction block through the common edge computing node; generate a second transaction block according to the first transaction block, and upload the second transaction block to the second zone In the block chain side chain. 一種電腦設備,其中,所述電腦設備包括儲存器和處理器,所述儲存器上儲存有可在所述處理器上運行的電腦程式,所述電腦程式被所述處理器執行時實現如請求項1至6中任一項所述區塊鏈構建方法。 A computer device, wherein the computer device includes a memory and a processor, the memory stores a computer program that can run on the processor, and when the computer program is executed by the processor, the The block chain construction method described in any one of items 1 to 6. 一種區塊鏈構建裝置,其中,應用於分散式系統中,所述分散式系統包括雲端中心及多個邊緣計算節點,所述區塊鏈構建裝置包括:第一構建單元,獲取各個所述邊緣計算節點與所述雲端中心的距離值,將距離值小於或等於預設第一距離閾值的邊緣計算節點確定為多個第一邊緣計算節點,並基於所述雲端中心和所述多個第一邊緣計算節點構建一條區塊鏈主鏈;第二構建單元,從所述多個第一邊緣計算節點中選取至少一個第一邊緣計算節點作為共用邊緣計算節點,並獲取預設節點數量閾值,以所述共用邊緣計算節點為當前節點查找當前節點的鄰近節點,將所述當前節點和所述當前節點的鄰近節點確定為第二邊緣計算節點;將所述當前節點的鄰近節點確定為當前 節點,反覆運算查找所述當前節點的鄰近節點,將所述當前節點的鄰近節點確定為所述第二邊緣計算節點,當所述第二邊緣計算節點的數量等於所述預設節點數量閾值時,停止反覆運算,基於所述共用邊緣計算節點及多個所述第二邊緣計算節點構建至少一條區塊鏈側鏈;寫入單元,將所述至少一條區塊鏈側鏈產生的區塊寫入所述區塊鏈主鏈中,包括:判斷所述至少一條區塊鏈側鏈是否滿足預設條件;當所述至少一條區塊鏈側鏈滿足所述預設條件時,獲取所述至少一條區塊鏈側鏈的最後一個區塊的第一雜湊值,獲取所述區塊鏈主鏈的最後一個區塊的第二雜湊值;控制所述雲端中心和所述多個第一邊緣計算節點在所述區塊鏈主鏈新生成一個目標區塊,將所述第一雜湊值和所述第二雜湊值寫入所述目標區塊,使所述目標區塊的雜湊值等於所述第一雜湊值與所述第二雜湊值的合併值。 A block chain construction device, wherein, applied in a distributed system, the distributed system includes a cloud center and a plurality of edge computing nodes, the block chain construction device includes: a first construction unit, which acquires each edge Calculate the distance value between the node and the cloud center, determine the edge computing nodes whose distance value is less than or equal to the preset first distance threshold as a plurality of first edge computing nodes, and based on the cloud center and the plurality of first The edge computing node builds a block chain main chain; the second construction unit selects at least one first edge computing node from the plurality of first edge computing nodes as a shared edge computing node, and obtains a preset threshold of the number of nodes to The shared edge computing node searches for adjacent nodes of the current node for the current node, and determines the current node and the adjacent nodes of the current node as the second edge computing node; determines the adjacent nodes of the current node as the current node node, iteratively calculates the adjacent nodes of the current node, and determines the adjacent nodes of the current node as the second edge computing node, when the number of the second edge computing nodes is equal to the preset node number threshold , stop repeated calculations, construct at least one blockchain side chain based on the shared edge computing node and multiple second edge computing nodes; write unit, write the block generated by the at least one blockchain side chain into the blockchain main chain, including: judging whether the at least one blockchain side chain satisfies the preset condition; when the at least one blockchain side chain satisfies the preset condition, obtaining the at least The first hash value of the last block of a block chain side chain, obtain the second hash value of the last block of the block chain main chain; control the cloud center and the plurality of first edge computing The node generates a new target block in the blockchain main chain, writes the first hash value and the second hash value into the target block, so that the hash value of the target block is equal to the A combined value of the first hash value and the second hash value. 一種儲存媒體,其中,所述儲存媒體上儲存有電腦程式,所述電腦程式被處理器執行時實現如請求項1至6中任一項所述的區塊鏈構建方法。 A storage medium, wherein a computer program is stored on the storage medium, and when the computer program is executed by a processor, the block chain construction method described in any one of claims 1 to 6 is realized.
TW109146562A 2020-12-28 2020-12-28 Blockchain construction method and related devices TWI794713B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW109146562A TWI794713B (en) 2020-12-28 2020-12-28 Blockchain construction method and related devices

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW109146562A TWI794713B (en) 2020-12-28 2020-12-28 Blockchain construction method and related devices

Publications (2)

Publication Number Publication Date
TW202225998A TW202225998A (en) 2022-07-01
TWI794713B true TWI794713B (en) 2023-03-01

Family

ID=83437052

Family Applications (1)

Application Number Title Priority Date Filing Date
TW109146562A TWI794713B (en) 2020-12-28 2020-12-28 Blockchain construction method and related devices

Country Status (1)

Country Link
TW (1) TWI794713B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111260924A (en) * 2020-02-10 2020-06-09 北京中交国通智能交通***技术有限公司 Traffic intelligent control and service release strategy method adapting to edge calculation
CN111447177A (en) * 2020-03-02 2020-07-24 西北工业大学 Vehicle networking trust management method based on block chain

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111260924A (en) * 2020-02-10 2020-06-09 北京中交国通智能交通***技术有限公司 Traffic intelligent control and service release strategy method adapting to edge calculation
CN111447177A (en) * 2020-03-02 2020-07-24 西北工业大学 Vehicle networking trust management method based on block chain

Also Published As

Publication number Publication date
TW202225998A (en) 2022-07-01

Similar Documents

Publication Publication Date Title
US20210288961A1 (en) Identifying accounts having shared credentials
US20190356474A1 (en) Layout-independent cryptographic stamp of a distributed dataset
WO2019144553A1 (en) Data storage method and apparatus, and storage medium
US9846650B2 (en) Tail response time reduction method for SSD
WO2020206847A1 (en) Blockchain-based data processing method and system, and related device
WO2016199232A1 (en) Storage management computer and management method for storage device
CN113408746A (en) Block chain-based distributed federal learning method and device and terminal equipment
AU2016225864A1 (en) Local server for synced online content management system
JP2015001828A (en) Allocation program, allocation device, and allocation method
JP2009238114A (en) Storage management method, storage management program, storage management apparatus, and storage management system
WO2016026433A1 (en) Data processing method and data processing apparatus
CN105159841B (en) A kind of internal memory migration method and device
CN102884516A (en) File system migration
TWI645330B (en) Methods for controlling a ssd (solid state disk) and apparatuses using the same
WO2020119029A1 (en) Distributed task scheduling method and system, and storage medium
WO2020181696A1 (en) Network bandwidth evaluation method, device and system, and storage medium
US20130326259A1 (en) System and method for multiple backplane time synchronization
CN111290907A (en) Distributed storage network pressure measurement method and device, computer device and storage medium
CN109697035B (en) Writing method of address data of cascade equipment, writing equipment and storage medium
CN112437167B (en) Method and device for creating transmission channel, storage medium and electronic equipment
WO2021108978A1 (en) Method for selecting validator node, electronic device, system, and medium
TWI794713B (en) Blockchain construction method and related devices
CN111142799A (en) Distributed storage method and device, network node and storage medium
CN104506636B (en) A kind of method of data synchronization and device
CN109947667B (en) Data access prediction method and device