TWI770486B - Method and apparatus for unlocking an account in a blockchain - Google Patents

Method and apparatus for unlocking an account in a blockchain Download PDF

Info

Publication number
TWI770486B
TWI770486B TW109109960A TW109109960A TWI770486B TW I770486 B TWI770486 B TW I770486B TW 109109960 A TW109109960 A TW 109109960A TW 109109960 A TW109109960 A TW 109109960A TW I770486 B TWI770486 B TW I770486B
Authority
TW
Taiwan
Prior art keywords
account
transaction
authentication information
blockchain
nodes
Prior art date
Application number
TW109109960A
Other languages
Chinese (zh)
Other versions
TW202046208A (en
Inventor
方思羽
左軍
Original Assignee
開曼群島商創新先進技術有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 開曼群島商創新先進技術有限公司 filed Critical 開曼群島商創新先進技術有限公司
Publication of TW202046208A publication Critical patent/TW202046208A/en
Application granted granted Critical
Publication of TWI770486B publication Critical patent/TWI770486B/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Economics (AREA)
  • Development Economics (AREA)
  • Computer Security & Cryptography (AREA)
  • Marketing (AREA)
  • Technology Law (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Electrotherapy Devices (AREA)
  • Supplying Of Containers To The Packaging Station (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本說明書實施例提供了一種在區塊鏈中解鎖帳戶的方法和裝置,所述區塊鏈為聯盟鏈,所述聯盟鏈中的全節點為可信節點,所述全節點本地預先儲存有第一帳戶的認證資訊,其中,所述認證資訊包括至少兩個認證項,所述第一帳戶的當前狀態為鎖定狀態,所述方法由區塊鏈中的全節點執行,包括:從區塊鏈中接收由第一帳戶發起的第二交易,所述第二交易用於在區塊鏈中解鎖所述第一帳戶;從本地獲取所述第一帳戶的認證資訊;基於所述認證資訊,驗證所述第二交易中是否包括所述認證資訊;以及在驗證通過的情況中,在本地進行對第一帳戶的解鎖。The embodiments of this specification provide a method and device for unlocking an account in a blockchain, where the blockchain is a consortium chain, and all nodes in the consortium chain are trusted nodes, and the full nodes locally pre-store the first Authentication information of an account, wherein the authentication information includes at least two authentication items, the current state of the first account is a locked state, and the method is executed by all nodes in the blockchain, including: from the blockchain Receive a second transaction initiated by the first account in the blockchain, the second transaction is used to unlock the first account in the blockchain; obtain the authentication information of the first account from the local; based on the authentication information, verify whether the authentication information is included in the second transaction; and if the verification is passed, unlock the first account locally.

Description

在區塊鏈中解鎖帳戶的方法和裝置Method and apparatus for unlocking an account in a blockchain

本說明書實施例係關於區塊鏈技術領域,更具體地,關於一種在區塊鏈中解鎖帳戶的方法和裝置。 The embodiments of this specification relate to the field of blockchain technology, and more particularly, to a method and apparatus for unlocking an account in a blockchain.

區塊鏈技術是構建在點對點(P2P)網路上,利用鏈式資料結構來驗證與儲存資料,利用分散式節點共識演算法來生成和更新資料,利用密碼學的方式保證資料傳輸和訪問的安全,利用由自動化腳本代碼組成的智慧合約來編程和操作數據的一種全新的分散式基礎架構與計算範式。所述區塊鏈例如為以太坊區塊鏈。在以太坊中,新增了帳戶的概念,其中,由用戶創建的帳戶為以太坊中的外部帳戶。通常,每個外部帳戶擁有一對公私鑰,其中,私鑰用於進行數位簽名,公鑰用於驗證簽名。另外,在各個全節點中,在節點本地的資料庫中以狀態樹的形式維持區塊鏈中全部帳戶的資料表,該狀態樹為帳戶地址與帳戶內容之間的映射,所述帳號內容包括,帳戶餘額、帳戶密鑰資訊(雜湊值)等。然而,在目前已有的區塊鏈中,當用戶發現區塊鏈帳戶的密鑰丟失或被盜從而凍結帳戶後,一般無法進行帳戶解鎖操作,從而導致用戶帳戶內的資產無法轉出。 因此,需要一種更有效的在區塊鏈中解鎖帳戶的方案。 Blockchain technology is built on a peer-to-peer (P2P) network, using a chain data structure to verify and store data, using a distributed node consensus algorithm to generate and update data, and using cryptography to ensure the security of data transmission and access , a new decentralized infrastructure and computing paradigm that utilizes smart contracts composed of automated script code to program and manipulate data. The blockchain is, for example, the Ethereum blockchain. In Ethereum, the concept of an account is added, in which an account created by a user is an external account in Ethereum. Typically, each external account has a pair of public and private keys, where the private key is used to digitally sign and the public key is used to verify the signature. In addition, in each full node, the data table of all accounts in the blockchain is maintained in the form of a state tree in the local database of the node. The state tree is the mapping between account addresses and account content, and the account content includes , account balance, account key information (hash value), etc. However, in the existing blockchain, when the user finds that the key of the blockchain account is lost or stolen and the account is frozen, the account unlocking operation is generally not possible, resulting in the inability to transfer the assets in the user account. Therefore, a more efficient scheme for unlocking accounts in the blockchain is needed.

本說明書實施例旨在提供一種更有效的在區塊鏈中解鎖帳戶的方案,以解決現有技術中的不足。 為實現上述目的,本說明書一個方面提供一種在區塊鏈中存入帳戶的認證資訊的方法,所述區塊鏈為聯盟鏈,所述聯盟鏈中的全節點為可信節點,所述方法由區塊鏈中的第一帳戶客戶端執行,包括: 向任一所述全節點發送第一交易,所述第一交易用於在區塊鏈中存入第一帳戶的認證資訊,所述第一交易的資料欄位中包括所述認證資訊,所述認證資訊用於在所述第一帳戶被鎖定之後解鎖所述第一帳戶,其中,所述認證資訊包括至少兩個認證項。 在一個實施例中,所述第一交易為調用第一智慧合約的交易,所述第一智慧合約為區塊鏈中預先部署的用於存入帳戶的認證資訊的智慧合約。 在一個實施例中,所述認證資訊包括兩個認證項,所述兩個認證項為以下多項中的任意兩項:私鑰、密碼、手機號、簡訊驗證碼。 在一個實施例中,向任一所述全節點發送第一交易包括,通過可信平台提供的閘道向任一所述全節點發送第一交易,其中,所述閘道與所述區塊鏈連接。 本說明書另一方面提供一種在區塊鏈中存入帳戶的認證資訊的方法,所述區塊鏈為聯盟鏈,所述聯盟鏈中的全節點為可信節點,所述方法由區塊鏈中的全節點執行,包括: 從區塊鏈中接收由第一帳戶發起的第一交易,所述第一交易用於在區塊鏈中存入第一帳戶的認證資訊,所述第一交易的資料欄位中包括所述認證資訊,所述認證資訊用於在所述第一帳戶被鎖定之後解鎖所述第一帳戶,其中,所述認證資訊包括至少兩個認證項;以及 基於所述第一交易,在本地存入所述第一帳戶的認證資訊。 在一個實施例中,所述第一交易為調用第一智慧合約的交易,所述第一智慧合約為區塊鏈中預先部署的用於存入帳戶的認證資訊的智慧合約,其中,基於所述第一交易,在本地存入所述第一帳戶的認證資訊包括,通過在本地執行所述第一智慧合約而將所述認證資訊存入本地的狀態樹中的第一帳戶下。 本說明書另一方面提供一種在區塊鏈中解鎖帳戶的方法,所述區塊鏈為聯盟鏈,所述聯盟鏈中的全節點為可信節點,所述全節點本地預先儲存有第一帳戶的認證資訊,其中,所述認證資訊包括至少兩個認證項,所述第一帳戶的當前狀態為鎖定狀態,所述方法由第一帳戶客戶端執行,包括: 向任一所述全節點發送第二交易,所述第二交易用於在區塊鏈中解鎖所述第一帳戶,所述第二交易的資料欄位中包括所述認證資訊。 在一個實施例中,所述第二交易為調用第二智慧合約的交易,所述第二智慧合約為區塊鏈中預先部署的用於解鎖帳戶的智慧合約。 本說明書另一方面提供一種在區塊鏈中解鎖帳戶的方法,所述區塊鏈為聯盟鏈,所述聯盟鏈中的全節點為可信節點,所述全節點本地預先儲存有第一帳戶的認證資訊,其中,所述認證資訊包括至少兩個認證項,所述第一帳戶的當前狀態為鎖定狀態,所述方法由區塊鏈中的全節點執行,包括: 從區塊鏈中接收由第一帳戶發起的第二交易,所述第二交易用於在區塊鏈中解鎖所述第一帳戶; 從本地獲取所述第一帳戶的認證資訊; 基於所述認證資訊,驗證所述第二交易中是否包括所述認證資訊;以及 在驗證通過的情況中,在本地進行對第一帳戶的解鎖。 在一個實施例中,所述第二交易為調用第二智慧合約的交易,所述第二智慧合約為區塊鏈中預先部署的用於解鎖帳戶的智慧合約,其中,在本地進行對第一帳戶的解鎖包括,通過在本地執行所述第二智慧合約而進行對第一帳戶的解鎖。 在一個實施例中,所述認證資訊被儲存在所述全節點的本地狀態樹中,其中,從本地獲取所述第一帳戶的認證資訊包括,從本地狀態樹中獲取所述第一帳戶的認證資訊。 本說明書另一方面提供一種在區塊鏈中存入帳戶的認證資訊的裝置,所述區塊鏈為聯盟鏈,所述聯盟鏈中的全節點為可信節點,所述裝置部署於區塊鏈中的第一帳戶客戶端,包括: 交易發起單元,配置為,向任一所述全節點發送第一交易,所述第一交易用於在區塊鏈中存入第一帳戶的認證資訊,所述第一交易的資料欄位中包括所述認證資訊,所述認證資訊用於在所述第一帳戶被鎖定之後解鎖所述第一帳戶,其中,所述認證資訊包括至少兩個認證項。 在一個實施例中,所述交易發起單元還配置為,通過可信平台提供的閘道向任一所述全節點發送第一交易,其中,所述閘道與所述區塊鏈連接。 本說明書另一方面提供一種在區塊鏈中存入帳戶的認證資訊的裝置,所述區塊鏈為聯盟鏈,所述聯盟鏈中的全節點為可信節點,所述裝置部署於區塊鏈中的全節點,包括: 接收單元,配置為,從區塊鏈中接收由第一帳戶發起的第一交易,所述第一交易用於在區塊鏈中存入第一帳戶的認證資訊,所述第一交易的資料欄位中包括所述認證資訊,所述認證資訊用於在所述第一帳戶被鎖定之後解鎖所述第一帳戶,其中,所述認證資訊包括至少兩個認證項;以及 存入單元,配置為,基於所述第一交易,在本地存入所述第一帳戶的認證資訊。 在一個實施例中,所述第一交易為調用第一智慧合約的交易,所述第一智慧合約為區塊鏈中預先部署的用於存入帳戶的認證資訊的智慧合約,其中,所述存入單元還配置為,通過在本地執行所述第一智慧合約而將所述認證資訊存入本地的狀態樹中的第一帳戶下。 本說明書另一方面提供一種在區塊鏈中解鎖帳戶的裝置,所述區塊鏈為聯盟鏈,所述聯盟鏈中的全節點為可信節點,所述全節點本地預先儲存有第一帳戶的認證資訊,其中,所述認證資訊包括至少兩個認證項,所述第一帳戶的當前狀態為鎖定狀態,所述裝置部署於第一帳戶客戶端,包括: 交易發起單元,配置為,向任一所述全節點發送第二交易,所述第二交易用於在區塊鏈中解鎖所述第一帳戶,所述第二交易的資料欄位中包括所述認證資訊。 在一個實施例中,所述第二交易為調用第二智慧合約的交易,所述第二智慧合約為區塊鏈中預先部署的用於解鎖帳戶的智慧合約。 本說明書另一方面提供一種在區塊鏈中解鎖帳戶的裝置,所述區塊鏈為聯盟鏈,所述聯盟鏈中的全節點為可信節點,所述全節點本地預先儲存有第一帳戶的認證資訊,其中,所述認證資訊包括至少兩個認證項,所述第一帳戶的當前狀態為鎖定狀態,所述裝置部署於區塊鏈中的全節點,包括: 接收單元,配置為,從區塊鏈中接收由第一帳戶發起的第二交易,所述第二交易用於在區塊鏈中解鎖所述第一帳戶; 獲取單元,配置為,從本地獲取所述第一帳戶的認證資訊; 驗證單元,配置為,基於所述認證資訊,驗證所述第二交易中是否包括所述認證資訊;以及 解鎖單元,配置為,在驗證通過的情況中,在本地進行對第一帳戶的解鎖。 在一個實施例中,所述第二交易為調用第二智慧合約的交易,所述第二智慧合約為區塊鏈中預先部署的用於解鎖帳戶的智慧合約,其中,所述解鎖單元還配置為,通過在本地執行所述第二智慧合約而進行對第一帳戶的解鎖。 在一個實施例中,所述認證資訊被儲存在所述全節點的本地狀態樹中,其中,所述獲取單元還配置為,從本地狀態樹中獲取所述第一帳戶的認證資訊。 本說明書另一方面提供一種電腦可讀儲存媒體,其上儲存有電腦程式,當所述電腦程式在電腦中執行時,令電腦執行上述任一項方法。 本說明書另一方面提供一種計算設備,包括記憶體和處理器,其特徵在於,所述記憶體中儲存有可執行代碼,所述處理器執行所述可執行代碼時,實現上述任一項方法。 相比於傳統區塊鏈平台中用戶的帳戶凍結之後無法解凍的問題,本方案通過採用多認證項認證方式,通過用戶預先在區塊鏈中存入其自身設定的認證資訊,使得用戶在需要解凍時可基於該認證資訊進行安全方便的帳戶解凍操作。提高了區塊鏈平台的可用性。 The embodiments of this specification aim to provide a more effective solution for unlocking accounts in the blockchain, so as to solve the deficiencies in the prior art. In order to achieve the above purpose, one aspect of this specification provides a method for storing authentication information of an account in a blockchain, where the blockchain is a consortium chain, and all nodes in the consortium chain are trusted nodes, and the method Executed by the first account client in the blockchain, including: Send a first transaction to any of the full nodes, the first transaction is used to deposit the authentication information of the first account in the blockchain, and the data field of the first transaction includes the authentication information, so The authentication information is used to unlock the first account after the first account is locked, wherein the authentication information includes at least two authentication items. In one embodiment, the first transaction is a transaction that invokes a first smart contract, and the first smart contract is a smart contract pre-deployed in the blockchain for depositing authentication information of an account. In one embodiment, the authentication information includes two authentication items, and the two authentication items are any two of the following items: private key, password, mobile phone number, and SMS verification code. In one embodiment, sending the first transaction to any of the full nodes includes sending the first transaction to any of the full nodes through a gateway provided by a trusted platform, wherein the gateway is associated with the block chain connection. Another aspect of this specification provides a method for storing authentication information of an account in a blockchain, where the blockchain is a consortium chain, and all nodes in the consortium chain are trusted nodes, and the method is implemented by the blockchain Full node execution in , including: A first transaction initiated by the first account is received from the blockchain, the first transaction is used to deposit the authentication information of the first account in the blockchain, and the data field of the first transaction includes the authentication information for unlocking the first account after the first account is locked, wherein the authentication information includes at least two authentication items; and Based on the first transaction, locally depositing authentication information for the first account. In one embodiment, the first transaction is a transaction that invokes a first smart contract, and the first smart contract is a smart contract pre-deployed in the blockchain for depositing authentication information of an account, wherein based on the In the first transaction, locally depositing the authentication information of the first account includes storing the authentication information under the first account in the local state tree by executing the first smart contract locally. Another aspect of this specification provides a method for unlocking an account in a blockchain, where the blockchain is a consortium chain, full nodes in the consortium chain are trusted nodes, and the full nodes locally pre-store a first account The authentication information, wherein the authentication information includes at least two authentication items, the current state of the first account is a locked state, and the method is executed by the first account client, including: Send a second transaction to any of the full nodes, the second transaction is used to unlock the first account in the blockchain, and the data field of the second transaction includes the authentication information. In one embodiment, the second transaction is a transaction that invokes a second smart contract, and the second smart contract is a smart contract pre-deployed in the blockchain for unlocking an account. Another aspect of this specification provides a method for unlocking an account in a blockchain, where the blockchain is a consortium chain, full nodes in the consortium chain are trusted nodes, and the full nodes locally pre-store a first account The authentication information, wherein the authentication information includes at least two authentication items, the current state of the first account is a locked state, and the method is executed by all nodes in the blockchain, including: receiving, from the blockchain, a second transaction initiated by the first account, the second transaction being used to unlock the first account in the blockchain; Obtain the authentication information of the first account locally; based on the authentication information, verifying whether the authentication information is included in the second transaction; and In the case of passing the verification, the unlocking of the first account is performed locally. In one embodiment, the second transaction is a transaction that invokes a second smart contract, and the second smart contract is a smart contract pre-deployed in the blockchain for unlocking an account, wherein the first transaction is performed locally. The unlocking of the account includes unlocking the first account by executing the second smart contract locally. In one embodiment, the authentication information is stored in the local state tree of the full node, wherein acquiring the authentication information of the first account locally includes acquiring the authentication information of the first account from the local state tree Authentication information. Another aspect of this specification provides a device for storing authentication information of an account in a blockchain, where the blockchain is a consortium chain, all nodes in the consortium chain are trusted nodes, and the device is deployed in the blockchain The first account client in the chain, including: a transaction initiating unit, configured to send a first transaction to any of the full nodes, the first transaction is used to store the authentication information of the first account in the blockchain, and the data field of the first transaction is The authentication information is included for unlocking the first account after the first account is locked, wherein the authentication information includes at least two authentication items. In one embodiment, the transaction initiating unit is further configured to send the first transaction to any of the full nodes through a gateway provided by a trusted platform, wherein the gateway is connected to the blockchain. Another aspect of this specification provides a device for storing authentication information of an account in a blockchain, where the blockchain is a consortium chain, all nodes in the consortium chain are trusted nodes, and the device is deployed in the blockchain Full nodes in the chain, including: a receiving unit, configured to receive a first transaction initiated by the first account from the blockchain, where the first transaction is used to store the authentication information of the first account in the blockchain, and the data of the first transaction The field includes the authentication information for unlocking the first account after the first account is locked, wherein the authentication information includes at least two authentication items; and The depositing unit is configured to deposit the authentication information of the first account locally based on the first transaction. In one embodiment, the first transaction is a transaction that invokes a first smart contract, and the first smart contract is a smart contract pre-deployed in the blockchain for depositing authentication information of an account, wherein the The depositing unit is further configured to store the authentication information under the first account in the local state tree by executing the first smart contract locally. Another aspect of this specification provides a device for unlocking an account in a blockchain, where the blockchain is a consortium chain, full nodes in the consortium chain are trusted nodes, and the full nodes locally pre-store a first account The authentication information, wherein the authentication information includes at least two authentication items, the current state of the first account is a locked state, and the device is deployed on the first account client, including: A transaction initiation unit, configured to send a second transaction to any of the full nodes, the second transaction is used to unlock the first account in the blockchain, and the data field of the second transaction includes all the authentication information. In one embodiment, the second transaction is a transaction that invokes a second smart contract, and the second smart contract is a smart contract pre-deployed in the blockchain for unlocking an account. Another aspect of this specification provides a device for unlocking an account in a blockchain, where the blockchain is a consortium chain, full nodes in the consortium chain are trusted nodes, and the full nodes locally pre-store a first account The authentication information, wherein the authentication information includes at least two authentication items, the current state of the first account is a locked state, and the device is deployed on a full node in the blockchain, including: a receiving unit, configured to receive a second transaction initiated by the first account from the blockchain, where the second transaction is used to unlock the first account in the blockchain; an obtaining unit, configured to obtain the authentication information of the first account locally; a verification unit configured to, based on the authentication information, verify whether the authentication information is included in the second transaction; and The unlocking unit is configured to unlock the first account locally when the verification is passed. In one embodiment, the second transaction is a transaction that invokes a second smart contract, and the second smart contract is a smart contract pre-deployed in the blockchain for unlocking an account, wherein the unlocking unit is further configured In order to unlock the first account by executing the second smart contract locally. In one embodiment, the authentication information is stored in the local state tree of the full node, wherein the obtaining unit is further configured to obtain the authentication information of the first account from the local state tree. Another aspect of the present specification provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed in a computer, the computer is made to execute any one of the above methods. Another aspect of the present specification provides a computing device, including a memory and a processor, wherein executable code is stored in the memory, and when the processor executes the executable code, any one of the above methods is implemented . Compared with the problem that the user's account cannot be unfrozen after being frozen in the traditional blockchain platform, this scheme adopts the multi-authentication item authentication method, and the user pre-stores the authentication information set by himself in the blockchain, so that the user needs When unfreezing, you can perform a safe and convenient account unfreezing operation based on the authentication information. Improved usability of the blockchain platform.

下面將結合附圖描述本說明書實施例。 圖1示出根據本說明書實施例的區塊鏈系統100的示意圖。如圖1所示,區塊鏈系統100中包括聯盟鏈11,其中包括圖中1、2、3、4四個共識節點(全節點),另外,聯盟鏈11中還包括多個用戶客戶端,這些用戶客戶端擁有自己的帳戶、私鑰和公鑰,其可視為該區塊鏈的輕節點,或者其通過閘道12進行區塊鏈中的操作。如圖中所示,所述用戶客戶端例如包括客戶端A和客戶端B。其中,客戶端B為惡意客戶端,其例如可能會盜取客戶端A的帳戶私鑰,以進行非法交易活動。閘道12由可信平台提供,其可與區塊鏈中任一全節點連接,從而使得用戶客戶端可通過其進行與區塊鏈相關的各種操作,例如發送交易。客戶端A可通過發起第一交易,而在區塊鏈中存入其認證資訊。在例如客戶端B盜取客戶端A的帳戶私鑰,從而在區塊鏈中鎖定客戶端A的帳戶之後,客戶端A在找回私鑰的情況中,可發起第二交易,以使得在區塊鏈中對其帳戶進行解鎖。 可以理解,上文參考圖1的描述僅是示意性的,並不用於限制本說明書實施例的範圍。下面將詳細描述上述存入認證資訊和解鎖帳戶的過程。 圖2示出根據本說明書實施例的一種在區塊鏈中存入帳戶的認證資訊的方法流程圖,所述區塊鏈為聯盟鏈,所述聯盟鏈中的全節點為可信節點,所述方法由區塊鏈中的第一帳戶客戶端執行,包括: 步驟S202,向任一所述全節點發送第一交易,所述第一交易用於在區塊鏈中存入第一帳戶的認證資訊,所述第一交易的資料欄位中包括所述認證資訊,所述認證資訊用於在所述第一帳戶被鎖定之後解鎖所述第一帳戶,其中,所述認證資訊包括至少兩個認證項。 如圖1中所示,聯盟鏈中例如包括四個全節點,這四個全節點為可信節點,其本地都包括區塊鏈中的全部區塊和帳戶資料,可用作為區塊鏈中的共識節點或記帳節點,其構成區塊鏈的服務端,對區塊鏈平台的客戶端提供服務。例如,所述聯盟鏈為金融體系的聯盟鏈,從而,該聯盟鏈的各個全節點為各個銀行、金融機構等,這些銀行、金融機構通過區塊鏈平台共同為用戶提供金融服務。在該聯盟鏈中,通過各個銀行、金融機構的共識保證了交易資訊的不可篡改和安全性,同時用戶的交易資訊、個人資訊等都保存在各個可信全節點處,從而不會造成個人資訊的洩露。 例如圖1中的用戶A屬於該區塊鏈中的用戶,其通過與其第一帳戶對應的客戶端使用區塊鏈中的服務,該客戶端例如可以為區塊鏈中的輕節點,即本地不儲存有區塊鏈中的區塊、帳戶資訊等,或者,該客戶端可如圖1所示通過可信平台提供的閘道使用區塊鏈中提供的服務。例如,該客戶端可通過向任一全節點發送交易而使用區塊鏈中的特定服務,或者,該客戶端可通過閘道向任一全節點發送交易。 在該方法中,在步驟S202,向任一所述全節點發送第一交易,所述第一交易用於在區塊鏈中存入第一帳戶的認證資訊,所述第一交易的資料欄位中包括所述認證資訊,所述認證資訊用於在所述第一帳戶被鎖定之後解鎖所述第一帳戶,其中,所述認證資訊包括至少兩個認證項。 在一個實施例中,所述第一交易為調用第一智慧合約的交易,所述第一智慧合約為區塊鏈中預先部署的用於存入帳戶的認證資訊的智慧合約。所述第一智慧合約中例如包括set1( )函數,用於在區塊鏈中的狀態樹中設置帳戶的預置的認證資訊欄位。當第一帳戶發起調用第一智慧合約的第一交易時,第一交易例如如圖3所示,圖3示出了第一交易的示意形式,其中,第一交易中的發送欄位(From)為第一帳戶,接收欄位(To)為該第一智慧合約的合約帳戶,資料欄位(Data)為對第一智慧合約中的set1( )函數的調用,例如{set1(strings,strings),”6f8ae…”,“186115…”},其中,“6f8ae…”例如為第一帳戶的私鑰,“186115…”例如為手機號,其為set1( )函數的兩個輸入參數,另外,該第一交易包括通過第一帳戶的私鑰生成的數位簽名。第一帳戶例如向圖1中的任一全節點(例如節點1)發送該第一交易,節點1在接收該第一交易之後,對該第一交易進行驗證之後在共識節點中擴散該第一交易。在通過共識節點確定記帳節點之後,在記帳節點執行該第一智慧合約,從而通過執行該第一智慧合約將記帳節點本地的狀態樹中的第一帳戶的認證資訊欄位設置為上述傳入參數(即私鑰和手機號)。 所述認證資訊用於在需要時解鎖第一帳戶,雖然在上文中,認證資訊包括私鑰和手機號,本說明書實施例不限於此。例如,認證資訊中還可以包括三項、四項認證項等,並且,所述認證項不限於為私鑰和手機號,而可以由用戶自己確定,例如可以為私鑰、預置密碼、手機號、簡訊驗證碼中的任意兩項或多項等等。通過在認證資訊中包括至少兩個認證項,並且由用戶自身確定該至少兩個認證項,增加了惡意用戶破解該認證資訊的難度,提高了安全性。 可以理解,這裡雖然通過智慧合約自動在狀態樹中存入帳戶的認證資訊,本說明書不限於此,例如,所述第一智慧合約的函數包括的Set函數可以不進行任何操作,從而僅用於傳遞該認證資訊,使得將該認證資訊與該智慧合約的調用一起作為交易被存入區塊中,以用於後續的認證資訊的查找。或者可通過預定好的規則,使得區塊鏈中的節點基於該交易中調用的智慧合約帳戶,確定該交易為用於存入認證資訊的交易,從而在本地狀態樹中更新第一帳戶的預置的認證資訊欄位。 在一個實施例中,所述第一交易例如為由第一帳戶發送給任一全節點的普通交易(例如轉帳交易),在該交易的資料欄位中,可設置預定標誌,以用於標識該交易用於存入認證資訊,例如,該交易的資料欄位中包括“存入認證資訊”文本和認證資訊本身,從而,第一帳戶通過對第二帳戶發送這樣的第一交易,當第一交易在經過共識被存入區塊中之後,亦即,第一帳戶向區塊鏈中存入了第一帳戶的認證資訊,該認證資訊可通過基於第一帳戶和“存入認證資訊”文本在區塊中進行檢索獲取。 圖4示出根據本說明書實施例的一種在區塊鏈中存入帳戶的認證資訊的方法流程圖,所述區塊鏈為聯盟鏈,所述聯盟鏈中的全節點為可信節點,所述方法由區塊鏈中的全節點執行,包括: 步驟S402,從區塊鏈中接收由第一帳戶發起的第一交易,所述第一交易用於在區塊鏈中存入第一帳戶的認證資訊,所述第一交易的資料欄位中包括所述認證資訊,所述認證資訊用於在所述第一帳戶被鎖定之後解鎖所述第一帳戶,其中,所述認證資訊包括至少兩個認證項;以及 步驟S404,基於所述第一交易,在本地存入所述第一帳戶的認證資訊。 該方法即為在第一帳戶客戶端向區塊鏈發出第一交易之後,區塊鏈中的各個全節點基於第一交易向區塊鏈中存入第一帳戶的認證資訊的過程。如上文所述,此處,向區塊鏈中存入包括,向本地狀態樹中存入,或向本地區塊中存入,等等。 首先,在步驟S402,從區塊鏈中接收由第一帳戶發起的第一交易,所述第一交易用於在區塊鏈中存入第一帳戶的認證資訊,所述第一交易的資料欄位中包括所述認證資訊,所述認證資訊用於在所述第一帳戶被鎖定之後解鎖所述第一帳戶,其中,所述認證資訊包括至少兩個認證項。 該全節點例如為通過共識確定的記帳節點,其可以為區塊鏈中的任一全節點,如圖1中的節點1、2、3、4,該全節點可從第一帳戶客戶端接收該第一交易,或者可從其它任意全節點接收該第一交易。可以理解,用於執行該方法的全節點不限於為記帳節點,例如,其可以為記帳節點的共識節點,其通過從記帳節點接收新生成的區塊中包含的第一交易,從而接收該第一交易。參考上文對步驟S202中的描述,該第一交易例如為調用第一智慧合約的交易。 在步驟S404,基於所述第一交易,在本地存入所述第一帳戶的認證資訊。 參考上文中對步驟S202中的描述,在一個實施例中,所述第一交易為調用第一智慧合約的交易,所述第一智慧合約為區塊鏈中預先部署的用於存入帳戶的認證資訊的智慧合約。從而,該全節點通過在本地執行所述第一智慧合約而自動將所述認證資訊存入本地的狀態樹中的第一帳戶下。或者,所述第一智慧合約包括的set函數可不進行任何操作,僅用於傳遞資訊,從而,該全節點通過在本地執行所述第一智慧合約,基於預定規則,由全節點自身將所述認證資訊存入本地的狀態樹中的第一帳戶下。 參考上文中對步驟S202中的描述,在一個實施例中,所述第一交易中包括預定標誌(例如第一智慧合約的帳戶,或者“存入認證資訊”文本),用於指示該第一交易為用於向區塊鏈中存入認證資訊的交易。例如記帳節點基於所述第一交易生成新的區塊之後,將該區塊存入本地的區塊資料庫中,並將該區塊擴散給其它全節點,從而在區塊鏈的新的區塊中存入第一帳戶的認證資訊。 圖5示出根據本說明書實施例的一種在區塊鏈中解鎖帳戶的方法流程圖,所述區塊鏈為聯盟鏈,所述聯盟鏈中的全節點為可信節點,所述全節點本地預先儲存有第一帳戶的認證資訊,其中,所述認證資訊包括至少兩個認證項,所述第一帳戶的當前狀態為鎖定狀態,所述方法由第一帳戶客戶端執行,包括: 步驟S502,向任一所述全節點發送第二交易,所述第二交易用於在區塊鏈中解鎖所述第一帳戶,所述第二交易的資料欄位中包括所述認證資訊。 在如上所述執行圖2和圖4所示方法之後,區塊鏈中已存入了第一帳戶的認證資訊。在該情況中,當第一帳戶由於私鑰丟失或被竊取等原因而被鎖定之後,第一帳戶被禁止進行除第二交易以外的任何交易,在第一帳戶找回私鑰的情況中,第一帳戶可通過發送第二交易進行帳戶解鎖。 在一個實施例中,所述第二交易為調用第二智慧合約的交易,所述第二智慧合約為區塊鏈中預先部署的用於解鎖帳戶的智慧合約。例如,第二智慧合約中包括“UnLock( )”函數,其用於在確定滿足預定條件的情況中,即,在確定第二交易中包括認證資訊的情況中,在區塊鏈中的狀態樹中將指定帳戶的鎖定狀態修改為正常狀態。第一帳戶發起的調用第二智慧合約的第二交易的具體形式與第一交易的形式類似,其也包括發送欄位、接收欄位和資料欄位,其中發送欄位為第一帳戶,接收欄位為第二智慧合約的合約帳戶,資料欄位為對“UnLock( )”函數的調用,例如{UnLock(strings,strings), “6f8ae…”,“186115…”}。如上文所述,“6f8ae…”,“186115…”分別為私鑰和手機號,即為兩個驗證項。 可以理解,同樣地,所述第二智慧合約不限於包括上述UnLock函數,以通過執行該函數而在狀態樹中修改帳戶的狀態,在一個實施例中,第二智慧合約包括的UnLock函數可以不進行任何操作,僅用於傳遞解鎖第一帳戶的資訊,從而使得在區塊鏈各個節點在執行該智慧合約時基於預定規則主動修改第一帳戶的狀態。 在一個實施例中,所述第二交易例如為由第一帳戶發送給任一全節點的普通交易(例如轉帳交易),在該交易的資料欄位中,可設置預定標誌,以用於標識該交易用於解鎖帳戶,例如,該交易的資料欄位包括“解鎖帳戶”文本和認證資訊。從而,第一帳戶通過發送這樣的第二交易,當第二交易在經過共識被存入區塊中之後,亦即,第一帳戶向區塊鏈中傳播瞭解鎖第一帳戶的資訊。 圖6示出根據本說明書實施例的一種在區塊鏈中解鎖帳戶的方法流程圖,所述區塊鏈為聯盟鏈,所述聯盟鏈中的全節點為可信節點,所述全節點本地預先儲存有第一帳戶的認證資訊,其中,所述認證資訊包括至少兩個認證項,所述第一帳戶的當前狀態為鎖定狀態,所述方法由區塊鏈中的全節點執行,包括: 步驟S602,從區塊鏈中接收由第一帳戶發起的第二交易,所述第二交易用於在區塊鏈中解鎖所述第一帳戶; 步驟S604,從本地獲取所述第一帳戶的認證資訊; 步驟S606,基於所述認證資訊,驗證所述第二交易中是否包括所述認證資訊;以及 步驟S608,在驗證通過的情況中,在本地進行對第一帳戶的解鎖。 在第一帳戶進行圖5所示方法之後,即向區塊鏈中發起第二交易之後,區塊鏈中通過共識節點的共識產生記帳節點,從而記帳節點及其共識節點可執行圖6所示的方法,所述共識節點都應為區塊鏈中的全節點,即,本地都包括全部區塊和帳戶資料庫,從而可基於資料庫中的內容進行對交易的驗證。 首先,在步驟S602,從區塊鏈中接收由第一帳戶發起的第二交易,所述第二交易用於在區塊鏈中解鎖所述第一帳戶。 第一帳戶客戶端在如上所述將該第二交易發送給區塊鏈中的任一全節點之後,該任一全節點然後將該第二交易擴散給其它全節點。從而,例如記帳節點可以從第二帳戶直接接收第二交易,或者可從區塊中的其它全節點接收第二交易。 在步驟S604,從本地獲取所述第一帳戶的認證資訊。 如上為所述,在一個實施例中,所述認證資訊被儲存在所述全節點的本地狀態樹中,其中,從本地獲取所述第一帳戶的認證資訊包括,從本地狀態樹中獲取所述第一帳戶的認證資訊。 在一個實施例中,所述認證資訊被儲存在區塊中,其中,從本地獲取所述第一帳戶的認證資訊包括,從本地的多個區塊中檢索具有第一帳戶和預定標誌的交易(即上述第一交易),從而獲取第一帳戶的認證資訊。 該全節點在接收到該第二交易並獲取認證資訊之後,首先使用第一帳戶的公鑰對該交易的數位簽名進行驗證,另外,在例如以太坊中,該全節點還對第一帳戶的剩餘燃料進行驗證等,在此不一一列出。 在進行上述常規的驗證之後,在一個實施例中,所述第二交易為調用第二智慧合約的交易,從而該全節點開始執行該智慧合約中的上述Unlock( )函數,從而通過執行該函數自動進行下述的步驟S606-S608。在一個實施例中,如上文所述,所述第二交易中包括預定標誌,用於指示該第二交易為用於解鎖帳戶的交易,從而使得該全節點本地執行下述的步驟S606-S608。 在步驟S606,基於所述認證資訊,驗證所述第二交易中是否包括所述認證資訊。 在獲取認證資訊之後,可通過將該認證資訊與第二交易中包括的資訊相比對,從而確定第二交易中是否包括所述認證資訊。例如,所述認證資訊中包括私鑰和手機號兩個認證項,則可將獲取的私鑰和手機號分別與第二交易的資料欄位中包括的私鑰和手機號進行比對,從而確定第二交易是否包括所述認證資訊。 在步驟S608,在驗證通過的情況中,在本地進行對第一帳戶的解鎖。 在一個實施例中,所述第二交易為調用第二智慧合約的交易,如上文所述,所述第二智慧合約為區塊鏈中預先部署的用於解鎖帳戶的智慧合約,從而,記帳節點通過在本地執行所述第二智慧合約而進行對第一帳戶的解鎖,也即,通過執行上述“UnLock( )”函數,執行步驟S606,在驗證通過的情況中,自動將本地狀態樹中的第一帳戶的鎖定狀態修改為正常狀態。 在一個實施例中,所述第二交易為普通交易,如上文所述,其向記帳節點傳遞瞭解鎖第一帳戶的資訊,從而記帳節點可在驗證通過的情況中將本地狀態樹中的第一帳戶的鎖定狀態修改為解鎖狀態。 記帳節點在修改本地狀態樹之後,將第二交易打包到區塊中併發送給其它全節點,從而將該區塊存入區塊鏈中。其它節點在接收包括第二交易的區塊之後,可同樣地基於第二交易,修改本地狀態樹中第一帳戶的狀態,從而達到各個全節點的資料一致性。 圖7示出根據本說明書實施例的一種在區塊鏈中存入帳戶的認證資訊的裝置700,所述區塊鏈為聯盟鏈,所述聯盟鏈中的全節點為可信節點,所述裝置部署於區塊鏈中的第一帳戶客戶端,包括: 交易發起單元71,配置為,向任一所述全節點發送第一交易,所述第一交易用於在區塊鏈中存入第一帳戶的認證資訊,所述第一交易的資料欄位中包括所述認證資訊,所述認證資訊用於在所述第一帳戶被鎖定之後解鎖所述第一帳戶,其中,所述認證資訊包括至少兩個認證項。 在一個實施例中,所述交易發起單元還配置為,通過可信平台提供的閘道向任一所述全節點發送第一交易,其中,所述閘道與所述區塊鏈連接。 圖8示出根據本說明書實施例的一種在區塊鏈中存入帳戶的認證資訊的裝置800,所述區塊鏈為聯盟鏈,所述聯盟鏈中的全節點為可信節點,所述裝置部署於區塊鏈中的全節點,包括: 接收單元81,配置為,從區塊鏈中接收由第一帳戶發起的第一交易,所述第一交易用於在區塊鏈中存入第一帳戶的認證資訊,所述第一交易的資料欄位中包括所述認證資訊,所述認證資訊用於在所述第一帳戶被鎖定之後解鎖所述第一帳戶,其中,所述認證資訊包括至少兩個認證項;以及 存入單元82,配置為,基於所述第一交易,在本地存入所述第一帳戶的認證資訊。 在一個實施例中,所述第一交易為調用第一智慧合約的交易,所述第一智慧合約為區塊鏈中預先部署的用於存入帳戶的認證資訊的智慧合約,其中,所述存入單元82還配置為,通過在本地執行所述第一智慧合約而將所述認證資訊存入本地的狀態樹中的第一帳戶下。 圖9示出根據本說明書實施例的一種在區塊鏈中解鎖帳戶的裝置900,所述區塊鏈為聯盟鏈,所述聯盟鏈中的全節點為可信節點,所述全節點本地預先儲存有第一帳戶的認證資訊,其中,所述認證資訊包括至少兩個認證項,所述第一帳戶的當前狀態為鎖定狀態,所述裝置部署於第一帳戶客戶端,包括: 交易發起單元91,配置為,向任一所述全節點發送第二交易,所述第二交易用於在區塊鏈中解鎖所述第一帳戶,所述第二交易的資料欄位中包括所述認證資訊。 在一個實施例中,所述第二交易為調用第二智慧合約的交易,所述第二智慧合約為區塊鏈中預先部署的用於解鎖帳戶的智慧合約。 圖10示出根據本說明書實施例的一種在區塊鏈中解鎖帳戶的裝置1000,所述區塊鏈為聯盟鏈,所述聯盟鏈中的全節點為可信節點,所述全節點本地預先儲存有第一帳戶的認證資訊,其中,所述認證資訊包括至少兩個認證項,所述第一帳戶的當前狀態為鎖定狀態,所述裝置部署於區塊鏈中的全節點,包括: 接收單元101,配置為,從區塊鏈中接收由第一帳戶發起的第二交易,所述第二交易用於在區塊鏈中解鎖所述第一帳戶; 獲取單元102,配置為,從本地獲取所述第一帳戶的認證資訊; 驗證單元103,配置為,基於所述認證資訊,驗證所述第二交易中是否包括所述認證資訊;以及 解鎖單元104,配置為,在驗證通過的情況中,在本地進行對第一帳戶的解鎖。 在一個實施例中,所述第二交易為調用第二智慧合約的交易,所述第二智慧合約為區塊鏈中預先部署的用於解鎖帳戶的智慧合約,其中,所述解鎖單元104還配置為,通過在本地執行所述第二智慧合約而進行對第一帳戶的解鎖。 在一個實施例中,所述認證資訊被儲存在所述全節點的本地狀態樹中,其中,所述獲取單元102還配置為,從本地狀態樹中獲取所述第一帳戶的認證資訊。 本說明書另一方面提供一種電腦可讀儲存媒體,其上儲存有電腦程式,當所述電腦程式在電腦中執行時,令電腦執行上述任一項方法。 本說明書另一方面提供一種計算設備,包括記憶體和處理器,其特徵在於,所述記憶體中儲存有可執行代碼,所述處理器執行所述可執行代碼時,實現上述任一項方法。 相比於傳統區塊鏈平台中用戶的帳戶凍結之後無法解凍的問題,本方案通過採用多認證項認證方式,通過用戶預先在區塊鏈中存入其自身設定的認證資訊,使得用戶在需要解凍時可基於該認證資訊進行安全方便的帳戶解凍操作。提高了區塊鏈平台的可用性。 需要理解,本文中的“第一”,“第二”等描述,僅僅為了描述的簡單而對相似概念進行區分,並不具有其他限定作用。 本說明書中的各個實施例均採用遞進的方式描述,各個實施例之間相同相似的部分互相參見即可,每個實施例重點說明的都是與其他實施例的不同之處。尤其,對於系統實施例而言,由於其基本相似於方法實施例,所以描述的比較簡單,相關之處參見方法實施例的部分說明即可。 上述對本說明書特定實施例進行了描述。其它實施例在所附申請專利範圍內。在一些情況下,在申請專利範圍中記載的動作或步驟可以按照不同於實施例中的順序來執行並且仍然可以實現期望的結果。另外,在附圖中描繪的過程不一定要求示出的特定順序或者連續順序才能實現期望的結果。在某些實施方式中,多工處理和並行處理也是可以的或者可能是有利的。 本領域普通技術人員應該還可以進一步意識到,結合本文中所公開的實施例描述的各示例的單元及演算法步驟,能夠以電子硬體、電腦軟體或者二者的結合來實現,為了清楚地說明硬體和軟體的可互換性,在上述說明中已經按照功能一般性地描述了各示例的組成及步驟。這些功能究竟以硬體還是軟體方式來執行,取決於技術方案的特定應用和設計約束條件。本領域普通技術人員可以對每個特定的應用來使用不同方法來實現所描述的功能,但是這種實現不應認為超出本申請的範圍。 結合本文中所公開的實施例描述的方法或演算法的步驟可以用硬體、處理器執行的軟體模組,或者二者的結合來實施。軟體模組可以置於隨機記憶體(RAM)、記憶體、唯讀記憶體(ROM)、電可編程ROM、電可擦除可編程ROM、暫存器、硬碟、抽取式磁碟、CD-ROM、或技術領域內所公知的任意其它形式的儲存媒體中。 以上所述的具體實施方式,對本發明的目的、技術方案和有益效果進行了進一步詳細說明,所應理解的是,以上所述僅為本發明的具體實施方式而已,並不用於限定本發明的保護範圍,凡在本發明的精神和原則之內,所做的任何修改、等同替換、改進等,均應包含在本發明的保護範圍之內。 The embodiments of the present specification will be described below with reference to the accompanying drawings. FIG. 1 shows a schematic diagram of a blockchain system 100 according to an embodiment of the present specification. As shown in FIG. 1 , the blockchain system 100 includes a consortium chain 11, including four consensus nodes (full nodes) 1, 2, 3, and 4 in the figure. In addition, the consortium chain 11 also includes multiple user clients , these user clients have their own accounts, private keys and public keys, which can be regarded as light nodes of the blockchain, or they can perform operations in the blockchain through the gateway 12. As shown in the figure, the user clients include, for example, client A and client B. Among them, client B is a malicious client, which may steal the account private key of client A, for example, to conduct illegal transaction activities. The gateway 12 is provided by a trusted platform, which can be connected to any full node in the blockchain, so that user clients can perform various operations related to the blockchain through it, such as sending transactions. Client A can store its authentication information in the blockchain by initiating the first transaction. For example, after client B steals client A's account private key, thereby locking client A's account in the blockchain, in the case of retrieving the private key, client A can initiate a second transaction, so that the The account is unlocked in the blockchain. It can be understood that the above description with reference to FIG. 1 is only illustrative, and is not intended to limit the scope of the embodiments of the present specification. The above process of depositing authentication information and unlocking the account will be described in detail below. FIG. 2 shows a flowchart of a method for storing authentication information of an account in a blockchain according to an embodiment of the present specification, where the blockchain is a consortium chain, and all nodes in the consortium chain are trusted nodes, so The method is executed by the first account client in the blockchain, and includes: Step S202, sending a first transaction to any of the full nodes, and the first transaction is used to deposit the first account in the blockchain Authentication information, the authentication information is included in the data field of the first transaction, and the authentication information is used to unlock the first account after the first account is locked, wherein the authentication information includes at least two authentication items. As shown in Figure 1, the alliance chain includes, for example, four full nodes. These four full nodes are trusted nodes, which locally include all the blocks and account information in the blockchain, which can be used as Consensus nodes or accounting nodes, which constitute the server side of the blockchain, provide services to the clients of the blockchain platform. For example, the consortium chain is a consortium chain of the financial system, so each full node of the consortium chain is each bank, financial institution, etc., and these banks and financial institutions jointly provide financial services to users through the blockchain platform. In this alliance chain, the non-tampering and security of transaction information is guaranteed through the consensus of various banks and financial institutions. At the same time, users' transaction information and personal information are stored in each trusted full node, so that no personal information will be created. of leakage. For example, user A in FIG. 1 belongs to the user in the blockchain, and uses the services in the blockchain through the client corresponding to its first account. For example, the client can be a light node in the blockchain, that is, a local Blocks, account information, etc. in the blockchain are not stored, or the client can use the services provided in the blockchain through the gateway provided by the trusted platform as shown in Figure 1. For example, the client can use a particular service in the blockchain by sending a transaction to any full node, or the client can send a transaction to any full node through a gateway. In this method, in step S202, a first transaction is sent to any of the full nodes, the first transaction is used to store the authentication information of the first account in the blockchain, and the information column of the first transaction is bit includes the authentication information for unlocking the first account after the first account is locked, wherein the authentication information includes at least two authentication items. In one embodiment, the first transaction is a transaction that invokes a first smart contract, and the first smart contract is a smart contract pre-deployed in the blockchain for depositing authentication information of an account. The first smart contract includes, for example, the set1( ) function, which is used to set the preset authentication information field of the account in the state tree in the blockchain. When the first account initiates the first transaction that invokes the first smart contract, the first transaction is shown, for example, as shown in FIG. 3 , which shows a schematic form of the first transaction, wherein the sending field (From ) is the first account, the receiving field (To) is the contract account of the first smart contract, and the data field (Data) is the call to the set1( ) function in the first smart contract, for example {set1(strings, strings ),"6f8ae...","186115..."}, where "6f8ae..." is for example the private key of the first account, "186115..." is for example the mobile phone number, which is the two input parameters of the set1( ) function, and in addition , the first transaction includes a digital signature generated by the private key of the first account. For example, the first account sends the first transaction to any full node in FIG. 1 (eg, node 1). After receiving the first transaction, node 1 verifies the first transaction and spreads the first transaction among the consensus nodes. trade. After the accounting node is determined by the consensus node, the first smart contract is executed on the accounting node, so that the authentication information field of the first account in the local state tree of the accounting node is set as the above-mentioned incoming parameter by executing the first smart contract (i.e. private key and mobile phone number). The authentication information is used to unlock the first account when needed, although in the above, the authentication information includes a private key and a mobile phone number, the embodiments of this specification are not limited thereto. For example, the authentication information may also include three or four authentication items, and the authentication items are not limited to the private key and the mobile phone number, but can be determined by the user, for example, the private key, preset password, mobile phone number, etc. , any two or more of SMS verification codes, etc. By including at least two authentication items in the authentication information, and determining the at least two authentication items by the user, the difficulty for malicious users to decipher the authentication information is increased, and the security is improved. It can be understood that although the authentication information of the account is automatically stored in the state tree through the smart contract, this specification is not limited to this. For example, the Set function included in the function of the first smart contract may not perform any operation, so it is only used for The authentication information is passed, so that the authentication information and the invocation of the smart contract are stored in the block as a transaction for subsequent search of the authentication information. Alternatively, predetermined rules can be used to enable the nodes in the blockchain to determine that the transaction is a transaction for depositing authentication information based on the smart contract account invoked in the transaction, so as to update the pre-determined account of the first account in the local state tree. set authentication information field. In one embodiment, the first transaction is, for example, an ordinary transaction (such as a transfer transaction) sent by the first account to any full node, and a predetermined flag can be set in the data field of the transaction to identify The transaction is used to deposit authentication information, for example, the data field of the transaction includes the text "deposit authentication information" and the authentication information itself, so that the first account sends such a first transaction to the second account, when the first account After a transaction is deposited into the block by consensus, that is, the first account has deposited the authentication information of the first account into the blockchain. The text is retrieved in the block. 4 shows a flowchart of a method for storing authentication information of an account in a blockchain according to an embodiment of the present specification, where the blockchain is a consortium chain, and all nodes in the consortium chain are trusted nodes, so The method is executed by all nodes in the blockchain, including: Step S402, receiving a first transaction initiated by a first account from the blockchain, where the first transaction is used to deposit the first account in the blockchain The authentication information of the first transaction, the authentication information is included in the data field of the first transaction, and the authentication information is used to unlock the first account after the first account is locked, wherein the authentication information includes at least two authentication items; and step S404, based on the first transaction, locally deposit the authentication information of the first account. The method is a process in which each full node in the blockchain stores the authentication information of the first account into the blockchain based on the first transaction after the first account client sends the first transaction to the blockchain. As mentioned above, here, depositing into the blockchain includes depositing into the local state tree, or depositing into the local block, and so on. First, in step S402, a first transaction initiated by the first account is received from the blockchain, the first transaction is used to store the authentication information of the first account in the blockchain, and the data of the first transaction The field includes the authentication information for unlocking the first account after the first account is locked, wherein the authentication information includes at least two authentication items. The full node is, for example, an accounting node determined by consensus, which can be any full node in the blockchain, such as nodes 1, 2, 3, and 4 in FIG. 1 , and the full node can receive from the first account client The first transaction, or the first transaction may be received from any other full node. It can be understood that the full node for executing this method is not limited to be an accounting node, for example, it can be a consensus node of the accounting node, which receives the first transaction contained in the newly generated block from the accounting node, thereby receiving the first transaction. a transaction. Referring to the description of step S202 above, the first transaction is, for example, a transaction that invokes the first smart contract. In step S404, based on the first transaction, locally deposit the authentication information of the first account. Referring to the description of step S202 above, in one embodiment, the first transaction is a transaction that invokes a first smart contract, and the first smart contract is a pre-deployed transaction in the blockchain for depositing into an account. Smart contracts that authenticate information. Therefore, the full node automatically stores the authentication information under the first account in the local state tree by executing the first smart contract locally. Alternatively, the set function included in the first smart contract may not perform any operations and is only used to transmit information. Therefore, the full node executes the first smart contract locally and based on predetermined rules, the full node itself sets the described Authentication information is stored in the local state tree under the first account. Referring to the above description of step S202, in one embodiment, the first transaction includes a predetermined flag (for example, the account of the first smart contract, or the text of "deposit authentication information"), which is used to indicate the first transaction. A transaction is a transaction used to deposit authentication information into the blockchain. For example, after the accounting node generates a new block based on the first transaction, it stores the block in the local block database, and spreads the block to other full nodes, so that the new block in the blockchain The authentication information of the first account is stored in the block. 5 shows a flowchart of a method for unlocking an account in a blockchain according to an embodiment of the present specification, where the blockchain is a consortium chain, and all nodes in the consortium chain are trusted nodes, and the full nodes are local Authentication information of the first account is pre-stored, wherein the authentication information includes at least two authentication items, the current state of the first account is a locked state, and the method is executed by the first account client, including: Step S502 , sending a second transaction to any of the full nodes, the second transaction is used to unlock the first account in the blockchain, and the data field of the second transaction includes the authentication information. After the methods shown in FIGS. 2 and 4 are performed as described above, the authentication information of the first account has been stored in the blockchain. In this case, after the first account is locked due to the loss or theft of the private key, the first account is prohibited from conducting any transactions except the second transaction. In the case where the first account retrieves the private key, The first account can be unlocked by sending a second transaction. In one embodiment, the second transaction is a transaction that invokes a second smart contract, and the second smart contract is a smart contract pre-deployed in the blockchain for unlocking an account. For example, the "UnLock( )" function is included in the second smart contract, which is used for the state tree in the blockchain in the case of determining that a predetermined condition is satisfied, that is, in the case of determining that the authentication information is included in the second transaction Change the lockout status of the specified account to the normal status. The specific form of the second transaction initiated by the first account to invoke the second smart contract is similar to that of the first transaction, and it also includes a sending field, a receiving field and a data field, wherein the sending field is the first account, and the receiving field is the first account. The field is the contract account of the second smart contract, and the data field is the call to the "UnLock( )" function, such as {UnLock(strings, strings), "6f8ae...", "186115..."}. As mentioned above, "6f8ae..." and "186115..." are the private key and the mobile phone number, which are two verification items. It can be understood that, similarly, the second smart contract is not limited to including the above-mentioned UnLock function, so as to modify the state of the account in the state tree by executing the function, in one embodiment, the UnLock function included in the second smart contract may not be Any operation is only used to transmit the information of unlocking the first account, so that each node of the blockchain actively modifies the state of the first account based on predetermined rules when executing the smart contract. In one embodiment, the second transaction is, for example, an ordinary transaction (such as a transfer transaction) sent by the first account to any full node, and a predetermined flag can be set in the data field of the transaction to identify The transaction is used to unlock the account, for example, the data field of the transaction includes the text "Unlock Account" and authentication information. Thus, by sending such a second transaction, after the second transaction is deposited into the block through consensus, that is, the first account propagates the information of unlocking the first account to the blockchain. FIG. 6 shows a flowchart of a method for unlocking an account in a blockchain according to an embodiment of the present specification, where the blockchain is a consortium chain, full nodes in the consortium chain are trusted nodes, and the full nodes are local Authentication information of the first account is pre-stored, wherein the authentication information includes at least two authentication items, the current state of the first account is a locked state, and the method is executed by all nodes in the blockchain, including: Step S602, receive a second transaction initiated by the first account from the blockchain, and the second transaction is used to unlock the first account in the blockchain; Step S604, obtain the first account from the local Authentication information; Step S606, based on the authentication information, verify whether the authentication information is included in the second transaction; and Step S608, if the verification is passed, unlock the first account locally. After the first account performs the method shown in FIG. 5 , that is, after the second transaction is initiated in the blockchain, an accounting node is generated in the blockchain through the consensus of the consensus nodes, so that the accounting node and its consensus node can execute the operations shown in FIG. 6 . method, the consensus nodes should be full nodes in the blockchain, that is, all blocks and account databases are included locally, so that transactions can be verified based on the content in the database. First, in step S602, a second transaction initiated by a first account is received from the blockchain, and the second transaction is used to unlock the first account in the blockchain. After the first account client sends the second transaction to any full node in the blockchain as described above, the any full node then spreads the second transaction to other full nodes. Thus, for example, the billing node may receive the second transaction directly from the second account, or may receive the second transaction from other full nodes in the block. In step S604, the authentication information of the first account is obtained locally. As described above, in one embodiment, the authentication information is stored in the local state tree of the full node, wherein acquiring the authentication information of the first account locally includes acquiring all the authentication information from the local state tree. the authentication information of the first account. In one embodiment, the authentication information is stored in a block, wherein obtaining the authentication information for the first account locally includes retrieving a transaction having the first account and a predetermined flag from a plurality of blocks locally (that is, the above-mentioned first transaction), thereby obtaining the authentication information of the first account. After the full node receives the second transaction and obtains the authentication information, it first uses the public key of the first account to verify the digital signature of the transaction. In addition, in Ethereum, for example, the full node also verifies the digital signature of the first account. The remaining fuel is verified, etc., which are not listed here. After the above-mentioned conventional verification is performed, in one embodiment, the second transaction is a transaction that invokes the second smart contract, so that the full node starts to execute the above-mentioned Unlock( ) function in the smart contract, so that by executing the function The following steps S606-S608 are automatically performed. In one embodiment, as described above, the second transaction includes a predetermined flag, which is used to indicate that the second transaction is a transaction for unlocking an account, so that the full node locally executes the following steps S606-S608 . In step S606, based on the authentication information, it is verified whether the authentication information is included in the second transaction. After the authentication information is acquired, it can be determined whether the authentication information is included in the second transaction by comparing the authentication information with the information included in the second transaction. For example, if the authentication information includes two authentication items, a private key and a mobile phone number, the obtained private key and mobile phone number can be compared with the private key and the mobile phone number included in the data field of the second transaction respectively, so that It is determined whether the second transaction includes the authentication information. In step S608, if the verification is passed, the first account is unlocked locally. In one embodiment, the second transaction is a transaction that invokes a second smart contract. As mentioned above, the second smart contract is a smart contract pre-deployed in the blockchain for unlocking an account, so that accounting The node unlocks the first account by executing the second smart contract locally, that is, by executing the above-mentioned "UnLock( )" function, and executing step S606, in the case of passing the verification, automatically The locked state of the first account is changed to the normal state. In one embodiment, the second transaction is an ordinary transaction, as described above, which transmits the information of unlocking the first account to the accounting node, so that the accounting node can transfer the first account in the local state tree when the verification is passed. The locked state of an account is changed to an unlocked state. After the accounting node modifies the local state tree, the second transaction is packaged into a block and sent to other full nodes, thereby storing the block in the blockchain. After receiving the block including the second transaction, other nodes can similarly modify the state of the first account in the local state tree based on the second transaction, so as to achieve data consistency of all nodes. FIG. 7 shows an apparatus 700 for storing authentication information of an account in a blockchain according to an embodiment of the present specification. The blockchain is a consortium chain, and all nodes in the consortium chain are trusted nodes. The The device is deployed on the first account client in the blockchain, and includes: a transaction initiating unit 71, configured to send a first transaction to any of the full nodes, where the first transaction is used to deposit in the blockchain Authentication information of the first account, the authentication information is included in the data field of the first transaction, and the authentication information is used to unlock the first account after the first account is locked, wherein the authentication The information includes at least two authentication items. In one embodiment, the transaction initiating unit is further configured to send the first transaction to any of the full nodes through a gateway provided by a trusted platform, wherein the gateway is connected to the blockchain. FIG. 8 shows an apparatus 800 for storing authentication information of an account in a blockchain according to an embodiment of the present specification. The blockchain is a consortium chain, and all nodes in the consortium chain are trusted nodes. The The device is deployed on a full node in the blockchain, and includes: a receiving unit 81, configured to receive, from the blockchain, a first transaction initiated by a first account, where the first transaction is used to deposit in the blockchain Authentication information of the first account, the authentication information is included in the data field of the first transaction, and the authentication information is used to unlock the first account after the first account is locked, wherein the authentication The information includes at least two authentication items; and a depositing unit 82 configured to locally deposit the authentication information of the first account based on the first transaction. In one embodiment, the first transaction is a transaction that invokes a first smart contract, and the first smart contract is a smart contract pre-deployed in the blockchain for depositing authentication information of an account, wherein the The depositing unit 82 is further configured to store the authentication information under the first account in the local state tree by executing the first smart contract locally. FIG. 9 shows an apparatus 900 for unlocking an account in a blockchain according to an embodiment of the present specification, where the blockchain is a consortium chain, and all nodes in the consortium chain are trusted nodes, and the full nodes have a local The authentication information of the first account is stored, wherein the authentication information includes at least two authentication items, the current state of the first account is a locked state, the device is deployed on the client of the first account, and includes: a transaction initiation unit 91. Configure to send a second transaction to any of the full nodes, where the second transaction is used to unlock the first account in the blockchain, and the data field of the second transaction includes the authentication News. In one embodiment, the second transaction is a transaction that invokes a second smart contract, and the second smart contract is a smart contract pre-deployed in the blockchain for unlocking an account. FIG. 10 shows an apparatus 1000 for unlocking an account in a blockchain according to an embodiment of the present specification. The blockchain is a consortium chain, and all nodes in the consortium chain are trusted nodes. The authentication information of the first account is stored, wherein the authentication information includes at least two authentication items, the current state of the first account is a locked state, and the device is deployed on a full node in the blockchain, including: receiving The unit 101 is configured to receive, from the blockchain, a second transaction initiated by the first account, where the second transaction is used to unlock the first account in the blockchain; the obtaining unit 102 is configured to receive from the local Obtain the authentication information of the first account; the verification unit 103 is configured to, based on the authentication information, verify whether the authentication information is included in the second transaction; and the unlocking unit 104 is configured to, if the verification is passed , the unlocking of the first account is performed locally. In one embodiment, the second transaction is a transaction that invokes a second smart contract, and the second smart contract is a smart contract pre-deployed in the blockchain for unlocking an account, wherein the unlocking unit 104 further is configured to perform the unlocking of the first account by locally executing the second smart contract. In one embodiment, the authentication information is stored in the local state tree of the full node, wherein the obtaining unit 102 is further configured to obtain the authentication information of the first account from the local state tree. Another aspect of the present specification provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed in a computer, the computer is made to execute any one of the above methods. Another aspect of the present specification provides a computing device, including a memory and a processor, wherein executable code is stored in the memory, and when the processor executes the executable code, any one of the above methods is implemented . Compared with the problem that the user's account cannot be unfrozen after being frozen in the traditional blockchain platform, this scheme adopts the multi-authentication item authentication method, and the user pre-stores the authentication information set by himself in the blockchain, so that the user needs When unfreezing, you can perform a safe and convenient account unfreezing operation based on the authentication information. Improved usability of the blockchain platform. It should be understood that the descriptions of "first", "second" and so on herein are only for the simplicity of description to distinguish similar concepts, and have no other limiting effect. Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, as for the system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and for related parts, please refer to the partial descriptions of the method embodiments. The foregoing describes specific embodiments of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. Additionally, the processes depicted in the figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multiplexing and parallel processing are also possible or may be advantageous. Those of ordinary skill in the art should further realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To illustrate the interchangeability of hardware and software, the above description has generally described the composition and steps of each example in terms of functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Persons of ordinary skill in the art may use different methods of implementing the described functionality for each particular application, but such implementations should not be considered beyond the scope of this application. The steps of a method or algorithm described in connection with the embodiments disclosed herein may be implemented in hardware, a software module executed by a processor, or a combination of the two. Software modules can be placed in random access memory (RAM), memory, read only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, scratchpad, hard disk, removable disk, CD - ROM, or any other form of storage medium known in the art. The specific embodiments described above further describe the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above descriptions are only specific embodiments of the present invention, and are not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

100:區塊鏈系統 11:聯盟鏈 12:閘道 1~4:共識節點 S202:方法步驟 S402~S404:方法步驟 S502:方法步驟 S602~S608:方法步驟 700:裝置 71:交易發起單元 800:裝置 81:接收單元 82:存入單元 900:裝置 91:交易發起單元 1000:裝置 101:接收單元 102:獲取單元 103:驗證單元 104:解鎖單元100: Blockchain System 11: Alliance Chain 12: Gateway 1~4: Consensus nodes S202: method steps S402~S404: method steps S502: method steps S602~S608: method steps 700: Device 71: Transaction initiation unit 800: Device 81: Receiver unit 82: Deposit unit 900: Device 91: Transaction initiation unit 1000: Device 101: Receiving unit 102: Get Unit 103: Verification Unit 104: Unlock unit

通過結合附圖描述本說明書實施例,可以使得本說明書實施例更加清楚: [圖1]示出根據本說明書實施例的區塊鏈系統100的示意圖; [圖2]示出根據本說明書實施例的一種在區塊鏈中存入帳戶的認證資訊的方法流程圖; [圖3]示出了第一交易的示意形式; [圖4]示出根據本說明書實施例的一種在區塊鏈中存入帳戶的認證資訊的方法流程圖; [圖5]示出根據本說明書實施例的一種在區塊鏈中解鎖帳戶的方法流程圖; [圖6]示出根據本說明書實施例的一種在區塊鏈中解鎖帳戶的方法流程圖; [圖7]示出根據本說明書實施例的一種在區塊鏈中存入帳戶的認證資訊的裝置700; [圖8]示出根據本說明書實施例的一種在區塊鏈中存入帳戶的認證資訊的裝置800; [圖9]示出根據本說明書實施例的一種在區塊鏈中解鎖帳戶的裝置900; [圖10]示出根據本說明書實施例的一種在區塊鏈中解鎖帳戶的裝置1000。 By describing the embodiments of the present specification in conjunction with the accompanying drawings, the embodiments of the present specification can be made clearer: [ FIG. 1 ] A schematic diagram showing a blockchain system 100 according to an embodiment of the present specification; [Fig. 2] shows a flowchart of a method for depositing authentication information of an account in a blockchain according to an embodiment of the present specification; [Fig. 3] shows the schematic form of the first transaction; [Fig. 4] shows a flowchart of a method for depositing authentication information of an account in a blockchain according to an embodiment of the present specification; [Fig. 5] shows a flowchart of a method for unlocking an account in a blockchain according to an embodiment of the present specification; [Fig. 6] shows a flowchart of a method for unlocking an account in a blockchain according to an embodiment of the present specification; [Fig. 7] shows a device 700 for storing authentication information of an account in a blockchain according to an embodiment of the present specification; [Fig. 8] shows a device 800 for storing authentication information of an account in a blockchain according to an embodiment of the present specification; [Fig. 9] shows a device 900 for unlocking an account in a blockchain according to an embodiment of the present specification; [Fig. 10] shows an apparatus 1000 for unlocking an account in a blockchain according to an embodiment of the present specification.

Claims (22)

一種在區塊鏈中存入帳戶的認證資訊的方法,該區塊鏈為聯盟鏈,該聯盟鏈中的全節點為可信節點,該方法由區塊鏈中的第一帳戶客戶端執行,包括:向任一該全節點發送第一交易,該第一交易用於在區塊鏈的狀態樹中存入第一帳戶的認證資訊,該第一交易的資料欄位中包括該認證資訊,該認證資訊用於在該第一帳戶被鎖定之後,任一該全節點接收到包含該認證資訊的第二交易時基於本地狀態樹對該認證資訊驗證通過之後解鎖該第一帳戶,其中,該認證資訊包括由該第一帳戶之用戶自身確定的至少兩個認證項。 A method for storing authentication information of an account in a blockchain, the blockchain is a consortium chain, and all nodes in the consortium chain are trusted nodes, the method is executed by a first account client in the blockchain, Including: sending a first transaction to any of the full nodes, the first transaction is used to store the authentication information of the first account in the state tree of the blockchain, and the data field of the first transaction includes the authentication information, The authentication information is used to unlock the first account after the first account is locked, when any one of the full nodes receives a second transaction containing the authentication information based on the local state tree after verifying the authentication information, wherein the The authentication information includes at least two authentication items determined by the user of the first account himself. 根據請求項1所述的方法,其中,該第一交易為調用第一智慧合約的交易,該第一智慧合約為區塊鏈中預先部署的用於存入帳戶的認證資訊的智慧合約。 The method according to claim 1, wherein the first transaction is a transaction that invokes a first smart contract, and the first smart contract is a smart contract pre-deployed in the blockchain for depositing authentication information of an account. 根據請求項1所述的方法,其中,該認證資訊包括兩個認證項,該兩個認證項為以下多項中的任意兩項:私鑰、密碼、手機號。 The method according to claim 1, wherein the authentication information includes two authentication items, and the two authentication items are any two of the following items: a private key, a password, and a mobile phone number. 根據請求項1所述的方法,其中,向任一該全節點發送第一交易包括,通過可信平台提供的閘道向任一該全節點發送第一交易,其中,該閘道與該區塊鏈連接。 The method according to claim 1, wherein sending the first transaction to any of the full nodes includes sending the first transaction to any of the full nodes through a gateway provided by a trusted platform, wherein the gateway and the zone Blockchain connection. 一種在區塊鏈中存入帳戶的認證資訊的方法,該區塊鏈為聯盟鏈,該聯盟鏈中的全節點為可信節點,該方法由區塊鏈中的全節點執行,包括: 從區塊鏈中接收由第一帳戶發起的第一交易,該第一交易用於在區塊鏈的狀態樹中存入第一帳戶的認證資訊,該第一交易的資料欄位中包括該認證資訊,該認證資訊用於在該第一帳戶被鎖定之後,任一該全節點接收到包含該認證資訊的第二交易時基於本地狀態樹對該認證資訊驗證通過之後解鎖該第一帳戶,其中,該認證資訊包括由該第一帳戶之用戶自身確定的至少兩個認證項;以及基於該第一交易,在本地狀態樹存入該第一帳戶的認證資訊。 A method for storing authentication information of an account in a blockchain, where the blockchain is a consortium chain, and all nodes in the consortium chain are trusted nodes, and the method is executed by all nodes in the blockchain, including: Receive the first transaction initiated by the first account from the blockchain, the first transaction is used to store the authentication information of the first account in the state tree of the blockchain, and the data field of the first transaction includes the authentication information, the authentication information is used to unlock the first account after the first account is locked, when any of the full nodes receives a second transaction containing the authentication information based on the local state tree after verifying the authentication information, Wherein, the authentication information includes at least two authentication items determined by the user of the first account; and based on the first transaction, the authentication information of the first account is stored in the local state tree. 根據請求項5所述的方法,其中,該第一交易為調用第一智慧合約的交易,該第一智慧合約為區塊鏈中預先部署的用於存入帳戶的認證資訊的智慧合約,其中,基於該第一交易,在本地存入該第一帳戶的認證資訊包括,通過在本地執行該第一智慧合約而將該認證資訊存入本地的狀態樹中的第一帳戶下。 The method according to claim 5, wherein the first transaction is a transaction calling a first smart contract, and the first smart contract is a smart contract pre-deployed in the blockchain for depositing authentication information of an account, wherein , based on the first transaction, locally depositing the authentication information of the first account includes storing the authentication information under the first account in the local state tree by executing the first smart contract locally. 一種在區塊鏈中解鎖帳戶的方法,該區塊鏈為聯盟鏈,該聯盟鏈中的全節點為可信節點,該全節點的本地狀態樹預先儲存有第一帳戶的認證資訊,其中,該認證資訊包括由該第一帳戶之用戶自身確定的至少兩個認證項,該第一帳戶的當前狀態為鎖定狀態,該方法由第一帳戶客戶端執行,包括:向任一該全節點發送第二交易,該第二交易用於在區塊鏈中解鎖該第一帳戶,該第二交易的資料欄位中包括該認證資訊。 A method for unlocking an account in a blockchain, the blockchain is a consortium chain, all nodes in the consortium chain are trusted nodes, and the local state tree of the full node pre-stores the authentication information of the first account, wherein, The authentication information includes at least two authentication items determined by the user of the first account, the current state of the first account is a locked state, and the method is executed by the first account client, including: sending to any of the full nodes The second transaction, the second transaction is used to unlock the first account in the blockchain, and the data field of the second transaction includes the authentication information. 根據請求項7所述的方法,其中,該第二交易為調用第二智慧合約的交易,該第二智慧合約為區塊鏈中預先部署的用於解鎖帳戶的智慧合約。 The method according to claim 7, wherein the second transaction is a transaction that invokes a second smart contract, and the second smart contract is a smart contract pre-deployed in the blockchain for unlocking an account. 一種在區塊鏈中解鎖帳戶的方法,該區塊鏈為聯盟鏈,該聯盟鏈中的全節點為可信節點,該全節點的本地狀態樹預先儲存有第一帳戶的認證資訊,其中,該認證資訊包括由該第一帳戶之用戶自身確定的至少兩個認證項,該第一帳戶的當前狀態為鎖定狀態,該方法由區塊鏈中的全節點執行,包括:從區塊鏈中接收由第一帳戶發起的第二交易,該第二交易用於在區塊鏈中解鎖該第一帳戶;從本地狀態樹獲取該第一帳戶的認證資訊;基於該認證資訊,驗證該第二交易中是否包括該認證資訊;以及在驗證通過的情況中,在本地進行對第一帳戶的解鎖。 A method for unlocking an account in a blockchain, the blockchain is a consortium chain, all nodes in the consortium chain are trusted nodes, and the local state tree of the full node pre-stores the authentication information of the first account, wherein, The authentication information includes at least two authentication items determined by the user of the first account, the current state of the first account is a locked state, and the method is executed by all nodes in the blockchain, including: from the blockchain Receive a second transaction initiated by the first account, the second transaction is used to unlock the first account in the blockchain; obtain the authentication information of the first account from the local state tree; based on the authentication information, verify the second account Whether the authentication information is included in the transaction; and if the verification is passed, unlock the first account locally. 根據請求項9所述的方法,其中,該第二交易為調用第二智慧合約的交易,該第二智慧合約為區塊鏈中預先部署的用於解鎖帳戶的智慧合約,其中,在本地進行對第一帳戶的解鎖包括,通過在本地執行該第二智慧合約而進行對第一帳戶的解鎖。 The method according to claim 9, wherein the second transaction is a transaction that invokes a second smart contract, and the second smart contract is a smart contract pre-deployed in the blockchain for unlocking an account, wherein the local The unlocking of the first account includes performing the unlocking of the first account by locally executing the second smart contract. 一種在區塊鏈中存入帳戶的認證資訊的裝置,該區塊鏈為聯盟鏈,該聯盟鏈中的全節點為可信節點,該裝置部署於區塊鏈中的第一帳戶客戶端,包括: 交易發起單元,配置為,向任一該全節點發送第一交易,該第一交易用於在區塊鏈的狀態樹中存入第一帳戶的認證資訊,該第一交易的資料欄位中包括該認證資訊,該認證資訊用於在該第一帳戶被鎖定之後,任一該全節點接收到包含該認證資訊的第二交易時基於本地狀態樹對該認證資訊驗證通過之後解鎖該第一帳戶,其中,該認證資訊包括由該第一帳戶之用戶自身確定的至少兩個認證項。 A device for storing authentication information of an account in a blockchain, the blockchain is a consortium chain, and all nodes in the consortium chain are trusted nodes, the device is deployed on the first account client in the blockchain, include: A transaction initiation unit, configured to send a first transaction to any of the full nodes, the first transaction is used to store the authentication information of the first account in the state tree of the blockchain, and the data field of the first transaction is Including the authentication information, the authentication information is used to unlock the first account after the first account is locked, when any of the full nodes receives a second transaction containing the authentication information based on the local state tree after the authentication information is verified and passed account, wherein the authentication information includes at least two authentication items determined by the user of the first account. 根據請求項11所述的裝置,其中,該第一交易為調用第一智慧合約的交易,該第一智慧合約為區塊鏈中預先部署的用於存入帳戶的認證資訊的智慧合約。 The device according to claim 11, wherein the first transaction is a transaction that invokes a first smart contract, and the first smart contract is a smart contract pre-deployed in the blockchain for depositing authentication information of an account. 根據請求項11所述的裝置,其中,該認證資訊包括兩個認證項,該兩個認證項為以下多項中的任意兩項:私鑰、密碼、手機號。 The device according to claim 11, wherein the authentication information includes two authentication items, and the two authentication items are any two of the following items: a private key, a password, and a mobile phone number. 根據請求項11所述的裝置,其中,該交易發起單元還配置為,通過可信平台提供的閘道向任一該全節點發送第一交易,其中,該閘道與該區塊鏈連接。 The device according to claim 11, wherein the transaction initiating unit is further configured to send the first transaction to any one of the full nodes through a gateway provided by the trusted platform, wherein the gateway is connected to the blockchain. 一種在區塊鏈中存入帳戶的認證資訊的裝置,該區塊鏈為聯盟鏈,該聯盟鏈中的全節點為可信節點,該裝置部署於區塊鏈中的全節點,包括:接收單元,配置為,從區塊鏈中接收由第一帳戶發起的第一交易,該第一交易用於在區塊鏈的狀態樹中存入第一帳戶的認證資訊,該第一交易的資料欄位中包括該認證資訊,該認證資訊用於在該第一帳戶被鎖定之後,任一該全節點接收到包含該認證資訊的第二交易時基於本地狀態 樹對該認證資訊驗證通過之後解鎖該第一帳戶,其中,該認證資訊包括由該第一帳戶之用戶自身確定的至少兩個認證項;以及存入單元,配置為,基於該第一交易,在本地狀態樹存入該第一帳戶的認證資訊。 A device for storing authentication information of an account in a blockchain, the blockchain is a consortium chain, and all nodes in the consortium chain are trusted nodes, the device is deployed on all nodes in the blockchain, including: receiving a unit configured to receive, from the blockchain, a first transaction initiated by the first account, the first transaction is used to store the authentication information of the first account in the state tree of the blockchain, the data of the first transaction The authentication information is included in the field, and the authentication information is used after the first account is locked, when any of the full nodes receives a second transaction containing the authentication information based on the local state The tree unlocks the first account after passing the authentication information, wherein the authentication information includes at least two authentication items determined by the user of the first account; and the depositing unit is configured to, based on the first transaction, The authentication information of the first account is stored in the local state tree. 根據請求項15所述的裝置,其中,該第一交易為調用第一智慧合約的交易,該第一智慧合約為區塊鏈中預先部署的用於存入帳戶的認證資訊的智慧合約,其中,該存入單元還配置為,通過在本地執行該第一智慧合約而將該認證資訊存入本地的狀態樹中的第一帳戶下。 The device according to claim 15, wherein the first transaction is a transaction that invokes a first smart contract, and the first smart contract is a smart contract pre-deployed in the blockchain for depositing authentication information of an account, wherein , the depositing unit is further configured to store the authentication information under the first account in the local state tree by executing the first smart contract locally. 一種在區塊鏈中解鎖帳戶的裝置,該區塊鏈為聯盟鏈,該聯盟鏈中的全節點為可信節點,該全節點的本地狀態樹預先儲存有第一帳戶的認證資訊,其中,該認證資訊包括由該第一帳戶之用戶自身確定的至少兩個認證項,該第一帳戶的當前狀態為鎖定狀態,該裝置部署於第一帳戶客戶端,包括:交易發起單元,配置為,向任一該全節點發送第二交易,該第二交易用於在區塊鏈中解鎖該第一帳戶,該第二交易的資料欄位中包括該認證資訊。 A device for unlocking an account in a blockchain, the blockchain is a consortium chain, all nodes in the consortium chain are trusted nodes, and the local state tree of the full node pre-stores authentication information of a first account, wherein, The authentication information includes at least two authentication items determined by the user of the first account, the current state of the first account is a locked state, the device is deployed on the client of the first account, and includes: a transaction initiation unit configured to: Send a second transaction to any of the full nodes, the second transaction is used to unlock the first account in the blockchain, and the data field of the second transaction includes the authentication information. 根據請求項17所述的裝置,其中,該第二交易為調用第二智慧合約的交易,該第二智慧合約為區塊鏈中預先部署的用於解鎖帳戶的智慧合約。 The device according to claim 17, wherein the second transaction is a transaction that invokes a second smart contract, and the second smart contract is a smart contract pre-deployed in the blockchain for unlocking an account. 一種在區塊鏈中解鎖帳戶的裝置,該區塊鏈為聯盟鏈,該聯盟鏈中的全節點為可信節點,該全節 點的本地狀態樹預先儲存有第一帳戶的認證資訊,其中,該認證資訊包括由該第一帳戶之用戶自身確定的至少兩個認證項,該第一帳戶的當前狀態為鎖定狀態,該裝置部署於區塊鏈中的全節點,包括:接收單元,配置為,從區塊鏈中接收由第一帳戶發起的第二交易,該第二交易用於在區塊鏈中解鎖該第一帳戶;獲取單元,配置為,從本地狀態樹獲取該第一帳戶的認證資訊;驗證單元,配置為,基於該認證資訊,驗證該第二交易中是否包括該認證資訊;以及解鎖單元,配置為,在驗證通過的情況中,在本地進行對第一帳戶的解鎖。 A device for unlocking an account in a blockchain, the blockchain is a consortium chain, the full nodes in the consortium chain are trusted nodes, and the full node The local state tree of the node pre-stores the authentication information of the first account, wherein the authentication information includes at least two authentication items determined by the user of the first account, the current state of the first account is a locked state, the device A full node deployed in the blockchain includes: a receiving unit configured to receive a second transaction initiated by the first account from the blockchain, where the second transaction is used to unlock the first account in the blockchain an acquisition unit, configured to obtain the authentication information of the first account from the local state tree; a verification unit, configured to, based on the authentication information, verify whether the authentication information is included in the second transaction; and an unlocking unit, configured as, In the case of passing the verification, the unlocking of the first account is performed locally. 根據請求項19所述的裝置,其中,該第二交易為調用第二智慧合約的交易,該第二智慧合約為區塊鏈中預先部署的用於解鎖帳戶的智慧合約,其中,該解鎖單元還配置為,通過在本地執行該第二智慧合約而進行對第一帳戶的解鎖。 The device according to claim 19, wherein the second transaction is a transaction calling a second smart contract, and the second smart contract is a smart contract pre-deployed in the blockchain for unlocking an account, wherein the unlocking unit It is also configured to perform the unlocking of the first account by locally executing the second smart contract. 一種電腦可讀儲存媒體,其上儲存有電腦程式,當該電腦程式在電腦中執行時,令電腦執行根據請求項1-10中任一項所述的方法。 A computer-readable storage medium on which a computer program is stored, and when the computer program is executed in a computer, makes the computer execute the method according to any one of claim 1-10. 一種計算設備,包括記憶體和處理器,其特徵在於,該記憶體中儲存有可執行代碼,該處理器執行該可執行代碼時,實現根據請求項1-10中任一項所述的 方法。A computing device, comprising a memory and a processor, wherein executable code is stored in the memory, and when the processor executes the executable code, the processing according to any one of claim 1-10 is implemented. method.
TW109109960A 2019-06-12 2020-03-25 Method and apparatus for unlocking an account in a blockchain TWI770486B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910507859.4A CN110415114A (en) 2019-06-12 2019-06-12 A kind of method and apparatus of the unlocking account in block chain
CN201910507859.4 2019-06-12

Publications (2)

Publication Number Publication Date
TW202046208A TW202046208A (en) 2020-12-16
TWI770486B true TWI770486B (en) 2022-07-11

Family

ID=68358973

Family Applications (1)

Application Number Title Priority Date Filing Date
TW109109960A TWI770486B (en) 2019-06-12 2020-03-25 Method and apparatus for unlocking an account in a blockchain

Country Status (3)

Country Link
CN (1) CN110415114A (en)
TW (1) TWI770486B (en)
WO (1) WO2020248656A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110415114A (en) * 2019-06-12 2019-11-05 阿里巴巴集团控股有限公司 A kind of method and apparatus of the unlocking account in block chain
CN113762963A (en) * 2021-08-27 2021-12-07 中国银联股份有限公司 Transaction processing method, device, equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106920080A (en) * 2017-02-15 2017-07-04 捷德(中国)信息科技有限公司 The account management method and system of digital cash
CN107067255A (en) * 2017-02-27 2017-08-18 腾讯科技(深圳)有限公司 The treating method and apparatus of account in block chain
CN107623569A (en) * 2017-09-30 2018-01-23 矩阵元技术(深圳)有限公司 Block chain key escrow and restoration methods, device based on Secret sharing techniques
US20180262337A1 (en) * 2017-03-10 2018-09-13 Jim Zubov Virally connected network of people as a means to recover encrypted data should the encryption key become lost
CN108810137A (en) * 2018-06-11 2018-11-13 西安纸贵互联网科技有限公司 A kind of alliance's block catenary system
TW201901480A (en) * 2017-05-12 2019-01-01 香港商阿里巴巴集團服務有限公司 Data processing method and device based on blockchain

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2572088A (en) * 2016-12-14 2019-09-18 Walmart Apollo Llc Controlling access to a locked space using cryptographic keys stored on a blockchain
CN108647964B (en) * 2018-05-02 2023-07-28 郑杰骞 Block chain data processing method and device and computer readable storage medium
CN108777684B (en) * 2018-05-30 2021-07-13 招商银行股份有限公司 Identity authentication method, system and computer readable storage medium
CN108830577A (en) * 2018-06-07 2018-11-16 北京连琪科技有限公司 The account of block chain is established and restoration methods
CN109035012B (en) * 2018-06-11 2020-11-17 西安纸贵互联网科技有限公司 Cross-chain processing method of block chain system and computer readable storage medium
CN110415114A (en) * 2019-06-12 2019-11-05 阿里巴巴集团控股有限公司 A kind of method and apparatus of the unlocking account in block chain

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106920080A (en) * 2017-02-15 2017-07-04 捷德(中国)信息科技有限公司 The account management method and system of digital cash
CN107067255A (en) * 2017-02-27 2017-08-18 腾讯科技(深圳)有限公司 The treating method and apparatus of account in block chain
US20180262337A1 (en) * 2017-03-10 2018-09-13 Jim Zubov Virally connected network of people as a means to recover encrypted data should the encryption key become lost
TW201901480A (en) * 2017-05-12 2019-01-01 香港商阿里巴巴集團服務有限公司 Data processing method and device based on blockchain
CN107623569A (en) * 2017-09-30 2018-01-23 矩阵元技术(深圳)有限公司 Block chain key escrow and restoration methods, device based on Secret sharing techniques
CN108810137A (en) * 2018-06-11 2018-11-13 西安纸贵互联网科技有限公司 A kind of alliance's block catenary system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
網路文獻How to Unlock My Account BINANCE網站 2018/04/13 https://www.binance.com/zh-TC/support/faq/360002673851 *

Also Published As

Publication number Publication date
CN110415114A (en) 2019-11-05
TW202046208A (en) 2020-12-16
WO2020248656A1 (en) 2020-12-17

Similar Documents

Publication Publication Date Title
US11496310B2 (en) Methods and systems for universal storage and access to user-owned credentials for trans-institutional digital authentication
CN110537346B (en) Safe decentralized domain name system
US9635000B1 (en) Blockchain identity management system based on public identities ledger
EP3506557B1 (en) Method of key exchange via a smart contract deployed over a blockchain
TWI690824B (en) Method, device, terminal equipment and system for authentication
US10826882B2 (en) Network-based key distribution system, method, and apparatus
KR102237014B1 (en) System and method for blockchain-based authentication
US10432600B2 (en) Network-based key distribution system, method, and apparatus
CN110958110A (en) Block chain private data management method and system based on zero knowledge proof
US10375084B2 (en) Methods and apparatuses for improved network communication using a message integrity secure token
Patel et al. DAuth: A decentralized web authentication system using Ethereum based blockchain
US20200204338A1 (en) Securing public key cryptographic algorithms
TWI770486B (en) Method and apparatus for unlocking an account in a blockchain
Amrutiya et al. Trustless two-factor authentication using smart contracts in blockchains
US20200202349A1 (en) Multiple asset transactions
CN108121904B (en) Unlocking method, device, electronic equipment and server
US11646897B2 (en) Method and apparatus for utilizing off-platform-resolved data as an input to code execution on a decentralized platform
Homoliak et al. An air-gapped 2-factor authentication for smart-contract wallets
US20200202344A1 (en) Private asset transactions
US20220237595A1 (en) Cryptocurrency key management
Naganuma et al. New secret key management technology for blockchains from biometrics fuzzy signature
US11669833B1 (en) Blockchain endpoint protection
WO2020248657A1 (en) Method and apparatus for locking account in blockchain
KR20210069865A (en) REST API Based Cryptocurrency Trading System
Dule et al. Privacy preservation modelling for securing image data using novel ethereum-based ecosystem