WO2022121346A1 - Wallet retrieval method and device, and storage medium - Google Patents

Wallet retrieval method and device, and storage medium Download PDF

Info

Publication number
WO2022121346A1
WO2022121346A1 PCT/CN2021/111852 CN2021111852W WO2022121346A1 WO 2022121346 A1 WO2022121346 A1 WO 2022121346A1 CN 2021111852 W CN2021111852 W CN 2021111852W WO 2022121346 A1 WO2022121346 A1 WO 2022121346A1
Authority
WO
WIPO (PCT)
Prior art keywords
wallet
transaction
retrieval
account
retrieving
Prior art date
Application number
PCT/CN2021/111852
Other languages
French (fr)
Chinese (zh)
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 WO2022121346A1 publication Critical patent/WO2022121346A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0876Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint
    • 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/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/36Payment architectures, schemes or protocols characterised by the use of specific devices or networks using electronic wallets or electronic money safes
    • G06Q20/367Payment architectures, schemes or protocols characterised by the use of specific devices or networks using electronic wallets or electronic money safes involving electronic purses or money safes
    • G06Q20/3672Payment architectures, schemes or protocols characterised by the use of specific devices or networks using electronic wallets or electronic money safes involving electronic purses or money safes initialising or reloading thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures

Definitions

  • FIG. 2 is a flowchart of another wallet retrieval method provided by an embodiment of the present invention.
  • S12 In response to retrieving several assets in the second account of the second public key back into the first account of the first public key, generate a first wallet retrieval transaction; wherein the signature information of the first wallet retrieval transaction is Including wallet retrieval ID, delay information, first public key, second public key;
  • node A executes tx1: Transfer 1000MM of mining contract assets from addr(A) to addr(B);
  • Executing the first wallet retrieval transaction includes:
  • the wallet retrieval judgment rule can also be configured according to actual needs, for example, it is configured as 3:50%, where 3 means that at least three signature data need to be obtained, and 50% means that at least 3 signature data need to be obtained. Having 2 signatures (round up of 1.5) data is correct and achieves the same technical effect. It should be understood by those skilled in the art that the multi-signature rule can be configured not only according to the quantity, but also according to the weight or other parameters according to the actual requirements, so as to achieve the same technical effect.
  • the current blockchain only supports some basic signature types such as secp.
  • the blockchain can support more types of signatures according to actual needs. ⁇ , ⁇ secp ⁇ 0xFFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFE BAAE DCE6 AF48 A03B BFD2 5E8C D036 4140, ⁇ bls ⁇ 0x73eda753299d7d483339d80809a1d80553bda402fffe5bfefffffffff00000001, ⁇ When the wallet retrieves each signature data of the transaction, it also needs to be verified according to the signature type specified by the signature data.
  • the blockchain node does not provide storage services for multi-signature transactions with delayed information for free, but needs to charge a certain handling fee.
  • the above embodiment can prevent the client from sending a large number of multi-signatures with delayed information. , which occupies a large amount of local storage space of the blockchain node, thereby enhancing the security of the blockchain network.
  • the first moment when tx2 is packaged is 0:00:00 on November 24, 2020, the first duration is 7 days, and the generation time of the block generated by A is 0:00 on December 30, 2020: 00;
  • the blockchain node stores tx1 locally, and stores the correspondence between hash(tx2) and hash(tx1);
  • S22 Receive the first wallet retrieval transaction; wherein the first wallet retrieval transaction is generated by the client in response to retrieving several assets in the second account of the second public key back into the first account of the first public key,
  • the signature information of the first wallet retrieval transaction includes the wallet retrieval identifier, delay information, the first public key, and the second public key;
  • Executing the first wallet retrieval transaction includes:
  • the present application also provides a computer-readable storage medium.
  • the computer-readable storage medium may be a computer-readable storage medium included in the apparatus of the foregoing embodiment; A computer-readable storage medium in a device.
  • the computer-readable storage medium stores one or more programs that are used by one or more processors to perform the methods described in the present application.

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Accounting & Taxation (AREA)
  • Signal Processing (AREA)
  • Finance (AREA)
  • Power Engineering (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Computer Hardware Design (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

Provided are a wallet retrieval method and device, and a storage medium, wherein same relate to the technical field of blockchains, etc. The method comprises: in response to retrieving a number of assets in a second account of a second public key to a first account of a first public key, generating a first wallet retrieval transaction (S12); and sending the first wallet retrieval transaction to a blockchain network (S14), such that a blockchain node: caches the first wallet retrieval transaction, and determines a starting packaging moment according to delay information; executes the first wallet retrieval transaction when the starting packaging moment is reached and a packaging right of the latest first block after the starting packaging moment is obtained; transfers a number of assets from the second account to the first account; and broadcasts the first block comprising the first wallet retrieval transaction to the other blockchain nodes, such that the other blockchain nodes delete the local first wallet retrieval transaction. Therefore, any asset can be retrieved.

Description

钱包找回方法、设备和存储介质Wallet recovery method, device and storage medium 技术领域technical field
本申请涉及区块链技术领域,具体涉及一种钱包找回方法、设备和存储介质。The present application relates to the field of blockchain technology, in particular to a wallet retrieval method, device and storage medium.
背景技术Background technique
在现有的配置有账户模型的区块链,要实现钱包找回功能,首先需要将若干资产转至钱包找回合约,即,只有钱包找回合约中的资产是可以被找回的。上述机制使得,不是钱包找回合约中的资产无法被找回。In the existing blockchain configured with an account model, to realize the wallet retrieval function, it is necessary to first transfer several assets to the wallet retrieval contract, that is, only the assets in the wallet retrieval contract can be retrieved. The above mechanism makes it impossible to retrieve the assets in the contract that are not retrieved by the wallet.
发明内容SUMMARY OF THE INVENTION
鉴于现有技术中的上述缺陷或不足,期望提供一种能够找回任意资产的钱包找回方法、设备和存储介质。In view of the above-mentioned defects or deficiencies in the prior art, it is desirable to provide a wallet recovery method, device and storage medium capable of recovering any assets.
第一方面,本发明提供一种适用于客户端的钱包找回方法,区块链配置有账户模型,上述方法包括:In the first aspect, the present invention provides a method for retrieving a wallet suitable for a client. The blockchain is configured with an account model, and the above method includes:
响应于将第二公钥的第二账户中的若干资产找回到第一公钥的第一账户中,生成第一钱包找回交易;其中,第一钱包找回交易的签名信息中包括钱包找回标识、延时信息、第一公钥、第二公钥;In response to retrieving several assets in the second account of the second public key back into the first account of the first public key, a first wallet retrieval transaction is generated; wherein the signature information of the first wallet retrieval transaction includes the wallet Retrieve identification, delay information, first public key, second public key;
将第一钱包找回交易发送至区块链网络,以供区块链节点:Send the first wallet retrieval transaction to the blockchain network for the blockchain node:
缓存第一钱包找回交易,并根据延时信息确定起始打包时刻;Cache the first wallet to retrieve the transaction, and determine the starting packaging time according to the delay information;
在到达起始打包时刻,且拥有起始打包时刻后的最新的第一区块的打包权时,执行第一钱包找回交易:将若干资产从第二账户划转至第一账户;以及,When the initial packaging time is reached and the packaging right of the latest first block after the initial packaging time is reached, execute the first wallet retrieval transaction: transfer a number of assets from the second account to the first account; and,
将包括第一钱包找回交易的第一区块广播至其它区块链节点,以供其它区块链节点删除本地的第一钱包找回交易。Broadcast the first block including the first wallet retrieval transaction to other blockchain nodes, so that other blockchain nodes can delete the local first wallet retrieval transaction.
第二方面,本发明提供一种适用于区块链节点的钱包找回方法, 区块链配置有账户模型,上述方法包括:In a second aspect, the present invention provides a method for retrieving a wallet suitable for a blockchain node. The blockchain is configured with an account model, and the above method includes:
接收第一钱包找回交易;其中,第一钱包找回交易由客户端响应于将第二公钥的第二账户中的若干资产找回到第一公钥的第一账户中生成,第一钱包找回交易的签名信息中包括钱包找回标识、延时信息、第一公钥、第二公钥;Receive the first wallet retrieval transaction; wherein, the first wallet retrieval transaction is generated by the client in response to recovering several assets in the second account of the second public key to the first account of the first public key, and the first The signature information of wallet retrieval transaction includes wallet retrieval identification, delay information, first public key, and second public key;
缓存第一钱包找回交易,并根据延时信息确定起始打包时刻;Cache the first wallet to retrieve the transaction, and determine the starting packaging time according to the delay information;
在到达起始打包时刻,且拥有起始打包时刻后的最新的第一区块的打包权时,执行第一钱包找回交易:将若干资产从第二账户划转至第一账户;When the initial packaging time is reached and the packaging right of the latest first block is obtained after the initial packaging time, the first wallet retrieval transaction is executed: several assets are transferred from the second account to the first account;
将包括第一钱包找回交易的第一区块广播至其它区块链节点,以供其它区块链节点删除本地的第一钱包找回交易。Broadcast the first block including the first wallet retrieval transaction to other blockchain nodes, so that other blockchain nodes can delete the local first wallet retrieval transaction.
第三方面,本发明还提供一种设备,包括一个或多个处理器和存储器,其中存储器包含可由该一个或多个处理器执行的指令以使得该一个或多个处理器执行根据本发明各实施例提供的钱包找回方法。In a third aspect, the present invention also provides an apparatus comprising one or more processors and a memory, wherein the memory contains instructions executable by the one or more processors to cause the one or more processors to perform various functions according to the present invention. The wallet retrieval method provided by the embodiment.
第四方面,本发明还提供一种存储有计算机程序的存储介质,该计算机程序使计算机执行根据本发明各实施例提供的钱包找回方法。In a fourth aspect, the present invention further provides a storage medium storing a computer program, and the computer program enables a computer to execute the wallet retrieval method provided according to each embodiment of the present invention.
本发明诸多实施例提供的钱包找回方法、设备和存储介质通过响应于将第二公钥的第二账户中的若干资产找回到第一公钥的第一账户中,生成第一钱包找回交易;其中,第一钱包找回交易的签名信息中包括钱包找回标识、延时信息、第一公钥、第二公钥;将第一钱包找回交易发送至区块链网络,以供区块链节点:缓存第一钱包找回交易,并根据延时信息确定起始打包时刻;在到达起始打包时刻,且拥有起始打包时刻后的最新的第一区块的打包权时,执行第一钱包找回交易:将若干资产从第二账户划转至第一账户的方法,使得能够找回任意资产。The wallet retrieval method, device and storage medium provided by various embodiments of the present invention generate a first wallet retrieval method in response to retrieving several assets in the second account of the second public key back into the first account of the first public key. return transaction; wherein, the signature information of the first wallet recovery transaction includes the wallet recovery identification, delay information, the first public key, and the second public key; the first wallet recovery transaction is sent to the blockchain network for For blockchain nodes: cache the first wallet to retrieve the transaction, and determine the start packaging time according to the delay information; when the start packaging time arrives and has the packaging right of the latest first block after the start packaging time, Perform a first wallet retrieval transaction: a method of transferring a number of assets from a second account to a first account, enabling the retrieval of any asset.
附图说明Description of drawings
通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本申请的其它特征、目的和优点将会变得更明显:Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
图1为本发明一实施例提供的一种钱包找回方法的流程图。FIG. 1 is a flowchart of a method for retrieving a wallet according to an embodiment of the present invention.
图2为本发明一实施例提供的另一种钱包找回方法的流程图。FIG. 2 is a flowchart of another wallet retrieval method provided by an embodiment of the present invention.
图3为本发明一实施例提供的一种设备的结构示意图。FIG. 3 is a schematic structural diagram of a device according to an embodiment of the present invention.
具体实施方式Detailed ways
下面结合附图和实施例对本申请作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释相关发明,而非对该发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与发明相关的部分。The present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the related invention, but not to limit the invention. In addition, it should be noted that, for the convenience of description, only the parts related to the invention are shown in the drawings.
需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本申请。It should be noted that the embodiments in the present application and the features of the embodiments may be combined with each other in the case of no conflict. The present application will be described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
在现有的配置有账户模型的区块链中,都是基于虚拟机和合约实现业务逻辑。为了保证安全,一个合约不能调用另一合约的资产。如果A合约可以调用B合约中的资产,则A合约就是超级管理员,会破坏B合约的业务逻辑:例如,B合约是交易合约,有一笔交易,该交易为某用户冻结了100MM,如果另一用户给他10NN,他就给对方100MM。此时,如果A合约直接把B合约中的100MM给解冻并找回,就会引起给了10NN的用户无法收到100MM。In the existing blockchains configured with an account model, business logic is implemented based on virtual machines and contracts. For security, one contract cannot call another contract's assets. If contract A can call assets in contract B, then contract A is a super administrator, which will destroy the business logic of contract B: for example, contract B is a transaction contract, and there is a transaction that freezes 100MM for a user. Once the user gives him 10NN, he will give the other party 100MM. At this time, if contract A directly unfreezes and retrieves the 100MM in contract B, it will cause users who have given 10NN to not receive 100MM.
因此在现有技术中,要实现钱包找回功能,首先需要将若干资产转至钱包找回合约,即,只有钱包找回合约中的资产是可以被找回的。Therefore, in the prior art, in order to realize the wallet retrieval function, it is necessary to first transfer several assets to the wallet retrieval contract, that is, only the assets in the wallet retrieval contract can be retrieved.
图1为本发明一实施例提供的一种钱包找回方法的流程图。如图1所示,在本实施例中,适用于客户端的钱包找回方法,区块链配置有账户模型,上述方法包括:FIG. 1 is a flowchart of a method for retrieving a wallet according to an embodiment of the present invention. As shown in FIG. 1, in this embodiment, the wallet retrieval method applicable to the client is configured with an account model on the blockchain, and the above method includes:
S12:响应于将第二公钥的第二账户中的若干资产找回到第一公钥的第一账户中,生成第一钱包找回交易;其中,第一钱包找回交易的签名信息中包括钱包找回标识、延时信息、第一公钥、第二公钥;S12: In response to retrieving several assets in the second account of the second public key back into the first account of the first public key, generate a first wallet retrieval transaction; wherein the signature information of the first wallet retrieval transaction is Including wallet retrieval ID, delay information, first public key, second public key;
S14:将第一钱包找回交易发送至区块链网络,以供区块链节点:S14: Send the first wallet retrieval transaction to the blockchain network for the blockchain node:
缓存第一钱包找回交易,并根据延时信息确定起始打包时刻;Cache the first wallet to retrieve the transaction, and determine the starting packaging time according to the delay information;
在到达起始打包时刻,且拥有起始打包时刻后的最新的第一区块的打包权时,执行第一钱包找回交易:将若干资产从第二账户划 转至第一账户;以及,When the initial packaging time is reached and the packaging right of the latest first block after the initial packaging time is reached, the first wallet retrieval transaction is executed: several assets are transferred from the second account to the first account; and,
将包括第一钱包找回交易的第一区块广播至其它区块链节点,以供其它区块链节点删除本地的第一钱包找回交易。Broadcast the first block including the first wallet retrieval transaction to other blockchain nodes, so that other blockchain nodes can delete the local first wallet retrieval transaction.
具体地,以将打算挖矿的挖矿合约资产1000MM从addr(A)找回到addr(B)为例;假设延时信息为2021年1月1日0:00:00;Specifically, take the example of retrieving 1000MM of mining contract assets to be mined from addr(A) to addr(B); assuming that the delay information is 0:00:00 on January 1, 2021;
响应于将打算挖矿的挖矿合约资产1000MM从addr(A)找回到addr(B),客户端执行步骤S12,生成钱包找回交易tx1,tx1的签名信息中包括{uwallet:公钥(A):公钥(B):2021年1月1日0:00:00:sigdata1};其中,uwallet是钱包找回标识,2021年1月1日0:00:00是延时信息,addr(B)是公钥(B)的账户,addr(A)是公钥(A)的账户,sigdata1为交易发起方根据所持有的私钥对tx1的交易内容进行签名后获得的签名数据;In response to retrieving 1000MM of mining contract assets to be mined from addr(A) to addr(B), the client performs step S12 to generate a wallet retrieval transaction tx1, where the signature information of tx1 includes {uwallet:public key( A): Public key (B): January 1, 2021 0:00:00: sigdata1}; among them, uwallet is the wallet retrieval ID, January 1, 2021 0:00:00 is the delay information, addr (B) is the account of the public key (B), addr(A) is the account of the public key (A), and sigdata1 is the signature data obtained after the transaction initiator signs the transaction content of tx1 according to the private key held;
客户端执行步骤S14,将tx1发送至区块链网络;The client performs step S14, and sends tx1 to the blockchain network;
区块链节点缓存tx1,并确定tx1的起始打包时刻,起始打包时刻为2021年1月1日0:00:00;The blockchain node caches tx1 and determines the starting packaging time of tx1, which is 0:00:00 on January 1, 2021;
假设区块链节点A在达到2021年1月1日0:00:00,且拥有2021年1月1日0:00:00后的最新区块block(100)的打包权,则节点A执行tx1:将挖矿合约资产1000MM从addr(A)划转至addr(B);Assuming that blockchain node A reaches 0:00:00 on January 1, 2021, and has the packaging right of the latest block (100) after 0:00:00 on January 1, 2021, node A executes tx1: Transfer 1000MM of mining contract assets from addr(A) to addr(B);
区块链节点A将包括tx1的block(100)至其它区块链节点,其它区块链节点在收到block(100)后,删除本地的tx1。Blockchain node A will include block(100) of tx1 to other blockchain nodes, and other blockchain nodes will delete the local tx1 after receiving block(100).
在更多实施例中,延时信息还可以根据实际需求配置为第二时长,相应的,起始打包时刻应当根据额外设定的时间起始点、第二时长确定,例如将“缓存第一钱包找回交易,并根据延时信息确定起始打包时刻”配置为“缓存第一钱包找回交易,并根据第一钱包找回交易的生成时刻、第二时长确定起始打包时刻”,可实现相同的技术效果。In more embodiments, the delay information can also be configured as a second duration according to actual requirements. Correspondingly, the start packing time should be determined according to the additionally set time starting point and second duration. For example, "cache the first wallet" Retrieve the transaction, and determine the starting packaging time according to the delay information" is configured as "cache the first wallet retrieval transaction, and determine the starting packaging time according to the generation time and the second duration of the first wallet retrieval transaction", which can be achieved The same technical effect.
本领域技术人员应当理解,1000MM属于挖矿合约,是因为tx1指定了挖矿合约执行器,若tx1未指定合约,则是将全局资产1000MM从addr(A)划转至addr(B)。Those skilled in the art should understand that 1000MM is a mining contract because tx1 specifies a mining contract executor. If tx1 does not specify a contract, the global asset 1000MM is transferred from addr(A) to addr(B).
本领域技术人员应当理解,公钥(A)和公钥(B)可以属于同一个用户,也可以属于不同用户。Those skilled in the art should understand that the public key (A) and the public key (B) may belong to the same user, or may belong to different users.
本领域技术人员应当理解“,将若干资产从第二账户划转至第一账户”中的若干资产应当为活动的资产,若上述若干资产为冻结状态,则先解冻上述若干资产,再将解冻的若干资产从第二账户划转至第一账户。Those skilled in the art should understand that several assets in "transferring several assets from the second account to the first account" should be active assets. If the above-mentioned several assets are in a frozen state, the above-mentioned several assets shall be unfrozen first, and then the above-mentioned several assets shall be unfrozen. A number of assets are transferred from the second account to the first account.
上述实施例使得任意资产都可以被找回。The above-described embodiments allow any asset to be retrieved.
优选地,签名信息中还包括可以对第二公钥进行管理的各第三账户的第三公钥、可以成功执行第一钱包找回交易的钱包找回判断规则、若干第四账户根据所持有的私钥对第一钱包找回交易的交易内容进行签名获得的第一签名数据;Preferably, the signature information also includes third public keys of each third account that can manage the second public key, wallet retrieval judgment rules that can successfully execute the first wallet retrieval transaction, and several fourth accounts according to the Some private keys are the first signature data obtained by signing the transaction content of the first wallet retrieval transaction;
执行第一钱包找回交易包括:Executing the first wallet retrieval transaction includes:
判断签名信息中的各第一签名数据是否符合钱包找回判断规则:Determine whether each first signature data in the signature information conforms to the wallet retrieval judgment rule:
是,则执行第一钱包找回交易。If yes, execute the first wallet retrieval transaction.
具体地,以钱包找回判断规则包括至少应当收到的第一签名数据的第一数量,及,正确签名的第一签名数据的第二数量;判断签名信息中的各第一签名数据是否符合钱包找回判断规则包括“判断签名信息中第一签名数据的数量是否不少于第一数量:是,则判断签名信息中签名正确的第一签名数据的数量是否不少于第二数量”为例;假设可以对公钥(A)进行管理的账户的公钥有公钥(N1)~公钥(N4);tx1的签名信息中包括{uwallet:addr(A):addr(B):3:2:2021年1月1日0:00:00:sigdata1:sigdata2:sigdata3};其中,3:2为找回判断规则,3表示最少需要获得3个签名数据,该3个签名数据对应的公钥应当包括于公钥(N1)~公钥(N4),2表示3个签名数据中至少有2个签名数据是正确的;sigdata1:sigdata2:sigdata3为签名数据,且在当前实施例中,假设sigdata1:sigdata2:sigdata3均为正确的签名数据,且对应的公钥均包括于公钥(N1)~公钥(N4);Specifically, the wallet retrieval judgment rule includes at least the first quantity of first signature data that should be received, and the second quantity of correctly signed first signature data; it is judged whether each first signature data in the signature information conforms to The wallet retrieval judgment rules include "judging whether the number of the first signature data in the signature information is not less than the first number: yes, then determine whether the number of the first signature data with correct signatures in the signature information is not less than the second number" as follows: For example; it is assumed that the public key of the account that can manage the public key (A) includes the public key (N1) ~ the public key (N4); the signature information of tx1 includes {uwallet:addr(A):addr(B):3 :2:January 1, 2021 0:00:00:sigdata1:sigdata2:sigdata3}; among them, 3:2 is the retrieval judgment rule, 3 means that at least 3 signature data need to be obtained, the corresponding 3 signature data The public key should be included in the public key (N1) to the public key (N4), and 2 indicates that at least two of the three signature data are correct; sigdata1:sigdata2:sigdata3 are signature data, and in the current embodiment, Assume that sigdata1:sigdata2:sigdata3 are all correct signature data, and the corresponding public keys are included in public key (N1) ~ public key (N4);
由于sigdata1:sigdata2:sigdata3均为正确的签名数据,且对应的公钥均包括于公钥(N1)~公钥(N4),符合tx1中的钱包找回判断规则“3:2”,节点A执行tx1:将挖矿合约资产1000MM从addr(A)划转至addr(B)。Since sigdata1:sigdata2:sigdata3 are all correct signature data, and the corresponding public key is included in the public key (N1) ~ public key (N4), it conforms to the wallet retrieval judgment rule "3:2" in tx1, node A Execute tx1: Transfer 1000MM of mining contract assets from addr(A) to addr(B).
在更多实施例中,钱包找回判断规则还可以根据实际需求进行配 置,例如配置为,3:50%,其中3表示最少需要获得从3个签名数据,50%表示3个签名数据中至少有2个签名(1.5的向上取整)数据是正确的,可实现相同的技术效果。且本领域技术人员应当理解,多重签名规则不仅可以根据数量进行配置,还可以根据实际需求根据权重或其它参数进行配置,可实现相同的技术效果。In more embodiments, the wallet retrieval judgment rule can also be configured according to actual needs, for example, it is configured as 3:50%, where 3 means that at least three signature data need to be obtained, and 50% means that at least 3 signature data need to be obtained. Having 2 signatures (round up of 1.5) data is correct and achieves the same technical effect. It should be understood by those skilled in the art that the multi-signature rule can be configured not only according to the quantity, but also according to the weight or other parameters according to the actual requirements, so as to achieve the same technical effect.
进一步的,判断签名信息中的各第一签名数据是否符合钱包找回判断规则包括:Further, judging whether each first signature data in the signature information conforms to the wallet retrieval judgment rule includes:
判断各第四账户是否均属于第三账户:Determine whether each fourth account belongs to the third account:
是,则判断签名信息中第一签名数据的数量是否不少于第一数量。If yes, then judge whether the quantity of the first signature data in the signature information is not less than the first quantity.
在一些区块链***中,钱包找回交易中的签名数据对应的公钥应当均属于第三账户,在另一些区块链***中,钱包找回交易的签名数据对应的公钥可以不全属于第三账户,只要对应的公钥属于第三账户的数量或权重或其它参数符合钱包找回判断规则即可。In some blockchain systems, the public keys corresponding to the signature data in the wallet retrieval transaction should all belong to the third account. In other blockchain systems, the public keys corresponding to the signature data in the wallet retrieval transaction may not all belong to the third account. For the third account, as long as the corresponding public key belongs to the number or weight of the third account or other parameters meet the wallet retrieval judgment rules.
本领域技术人员应当理解,在收到第一钱包找回交易时,应当先判断该第一钱包找回交易是否同时为多重签名交易,即该钱包找回交易的签名信息中不应该缺少以下任意参数“对第二公钥进行管理的各第三账户的第三公钥、可以成功执行第一钱包找回交易的钱包找回判断规则、若干第四账户根据所持有的私钥对第一钱包找回交易的交易内容进行签名获得的第一签名数据”;若缺少上述任意参数,则根据实际需求处理该钱包找回交易,例如,不执行该钱包找回交易。Those skilled in the art should understand that when receiving a first wallet retrieval transaction, it should first determine whether the first wallet retrieval transaction is a multi-signature transaction at the same time, that is, the signature information of the wallet retrieval transaction should not lack any of the following Parameter "The third public key of each third account that manages the second public key, the wallet recovery judgment rule that can successfully execute the first wallet recovery transaction, and several fourth accounts based on the private key held by the first wallet. The first signature data obtained by signing the transaction content of the wallet retrieval transaction"; if any of the above parameters are missing, the wallet retrieval transaction will be processed according to actual needs, for example, the wallet retrieval transaction will not be executed.
本领域技术人员应当理解,区块链支持多种签名类型。It should be understood by those skilled in the art that a blockchain supports a variety of signature types.
在现有技术中,当前区块链仅支持一些例如secp的基础签名类型,在本申请中,区块链可以根据实际需求支持更多种类的签名类型。不同的签名类型的密钥空间不同,例如secp的密钥空间是0xFFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFE BAAE DCE6 AF48 A03B BFD2 5E8C D036 4140,而bls的密钥空间是0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000001,则区块链节点在验证钱包找回交易的各签名数据时,还需要根据签名数据指定的签名类型进行验证。In the prior art, the current blockchain only supports some basic signature types such as secp. In this application, the blockchain can support more types of signatures according to actual needs.不同的签名类型的密钥空间不同,例如secp的密钥空间是0xFFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFE BAAE DCE6 AF48 A03B BFD2 5E8C D036 4140,而bls的密钥空间是0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000001,则区块链节点在验证When the wallet retrieves each signature data of the transaction, it also needs to be verified according to the signature type specified by the signature data.
进一步的,钱包找回判断规则包括至少应当收到的第一签名数据 的第一数量,及,正确签名的第一签名数据的第二数量;Further, the wallet retrieval judgment rule includes at least the first quantity of the first signature data that should be received, and the second quantity of the correctly signed first signature data;
判断签名信息中的各第一签名数据是否符合钱包找回判断规则包括:Judging whether each first signature data in the signature information conforms to the wallet retrieval judgment rules includes:
判断签名信息中第一签名数据的数量是否不少于第一数量:Determine whether the quantity of the first signature data in the signature information is not less than the first quantity:
是,则判断签名信息中签名正确的第一签名数据的数量是否不少于第二数量。If yes, then determine whether the number of correctly signed first signature data in the signature information is not less than the second number.
上述实施例的钱包找回原理可参考图1所示的一种优选实施方式的方法,此处不再赘述。For the wallet retrieval principle in the above embodiment, reference may be made to the method of a preferred embodiment shown in FIG. 1 , and details are not repeated here.
优选地,生成第一钱包找回交易包括:Preferably, generating the first wallet retrieval transaction includes:
生成包括第一钱包找回交易的第一钱包找回存证交易;其中,第一钱包找回交易包括于第一钱包找回存证交易的payload中;generating a first wallet retrieving deposit certificate transaction including the first wallet retrieving transaction; wherein, the first wallet retrieving transaction is included in the payload of the first wallet retrieving deposit certificate transaction;
缓存第一钱包找回交易,并根据延时信息确定起始打包时刻包括:Cache the first wallet to retrieve the transaction, and determine the starting packaging time according to the delay information, including:
扣除第一钱包找回存证交易的手续费,将第一钱包找回存证交易存证在区块链上;Deduct the handling fee of the first wallet to retrieve the deposit certificate transaction, and store the first wallet to retrieve the deposit certificate transaction certificate on the blockchain;
缓存第一钱包找回交易,并根据延时信息确定起始打包时刻。The first wallet is cached to retrieve the transaction, and the starting packaging time is determined according to the delay information.
具体地,tx1包括于钱包找回存证交易tx2的payload中;Specifically, tx1 is included in the payload of the wallet retrieval deposit certificate transaction tx2;
区块链节点扣除tx2的手续费,将tx2存证在区块链上;The blockchain node deducts the handling fee of tx2 and stores the tx2 certificate on the blockchain;
区块链节点将tx2的payload中的tx1缓存,并根据tx1的延时信息确定tx1的起始打包时刻。The blockchain node caches tx1 in the payload of tx2, and determines the starting packaging time of tx1 according to the delay information of tx1.
在上述实施例中,区块链节点不免费为有延时信息的多重签名交易提供存储服务,而是需要收取一定的手续费,上述实施例可以避免客户端发送大量有延时信息的多重签名,大量占用区块链节点本地的存储空间,从而增强了区块链网络的安全性。In the above embodiment, the blockchain node does not provide storage services for multi-signature transactions with delayed information for free, but needs to charge a certain handling fee. The above embodiment can prevent the client from sending a large number of multi-signatures with delayed information. , which occupies a large amount of local storage space of the blockchain node, thereby enhancing the security of the blockchain network.
进一步的,延时信息为钱包找回交易所需延长的第一时长;缓存第一钱包找回交易,并根据延时信息确定起始打包时刻包括:Further, the delay information is the first time duration required for the wallet to retrieve the transaction; cache the first wallet to retrieve the transaction, and determine the start packing time according to the delay information, including:
根据第一钱包找回存证交易被打包的第一时刻、第一时长确定第一钱包找回交易的起始打包时刻;According to the first moment and the first duration when the first wallet retrieval transaction is packaged, determine the initial packaging moment of the first wallet retrieval transaction;
将第一钱包找回交易存储到本地,并存储第一钱包找回存证交易的第一哈希值与第一钱包找回交易的第二哈希值的第一对应关系;Store the first wallet retrieval transaction locally, and store the first correspondence between the first hash value of the first wallet retrieval transaction and the second hash value of the first wallet retrieval transaction;
其中,第一对应关系用于供其它区块链节点:Among them, the first correspondence is used for other blockchain nodes:
在执行第一钱包找回交易时,根据第二哈希值找到第一钱包找回存证交易,并根据第一钱包找回存证交易被打包的第一时刻、第一时长确定第一钱包找回交易的起始打包时刻;When executing the first wallet retrieval transaction, the first wallet retrieval certificate transaction is found according to the second hash value, and the first wallet is determined according to the first moment and the first duration when the first wallet retrieval certificate transaction is packaged Retrieve the starting packaging moment of the transaction;
判断第一钱包找回交易的打包时刻是否不早于起始打包时刻:Determine whether the packaging time of the first wallet retrieval transaction is not earlier than the initial packaging time:
否,则第一钱包找回交易执行不成功。If not, the first wallet retrieval transaction is unsuccessful.
具体地,假设tx2被打包的第一时刻为2020年11月24日0:00:00,第一时长为7天,A生成的区块的生成时间为2020年12月30日0:00:00;Specifically, it is assumed that the first moment when tx2 is packaged is 0:00:00 on November 24, 2020, the first duration is 7 days, and the generation time of the block generated by A is 0:00 on December 30, 2020: 00;
区块链节点根据tx2被打包的时刻2020年11月24日0:00:00、7天确定tx1的起始打包时刻,tx1的起始打包时刻为2021年1月1日0:00:00;The blockchain node determines the starting packaging time of tx1 according to the time when tx2 was packaged at 0:00:00 on November 24, 2020 and 7 days, and the starting packaging time of tx1 is at 0:00:00 on January 1, 2021 ;
区块链节点将tx1存储到本地,并存储hash(tx2)和hash(tx1)的对应关系;The blockchain node stores tx1 locally, and stores the correspondence between hash(tx2) and hash(tx1);
其它区块链节点在收到A生成的区块,在执行到tx1时,根据hash(tx1)找到tx2,并根据tx1被打包的时刻2020年11月24日0:00:00、第一时长7天确定tx1的起始打包时刻,tx1的起始打包时刻为2021年1月1日0:00:00;When other blockchain nodes receive the block generated by A, when tx1 is executed, they will find tx2 according to hash(tx1), and according to the time when tx1 was packaged at 0:00:00 on November 24, 2020, the first duration 7 days to determine the starting packing time of tx1, the starting packing time of tx1 is 0:00:00 on January 1, 2021;
其它区块链节点判断2020年12月30日0:00:00是否不早于起始打包时刻2021年1月1日0:00:00;Other blockchain nodes judge whether 0:00:00 on December 30, 2020 is not earlier than the start packaging time at 0:00:00 on January 1, 2021;
由于2020年12月30日0:00:00早于起始打包时刻2021年1月1日0:00:00,其它区块链节点执行tx1失败。Since 0:00:00 on December 30, 2020 is earlier than the start packaging time at 0:00:00 on January 1, 2021, other blockchain nodes fail to execute tx1.
由于大多数节点执行tx1失败,将导致区块链节点A生成的错误区块成为侧链上的区块,最终使得addr(A)的资产的安全性得到保障。Since most nodes fail to execute tx1, the erroneous block generated by blockchain node A will become the block on the side chain, and finally the security of addr(A) assets will be guaranteed.
图2为本发明一实施例提供的另一种钱包找回方法的流程图。如图2所示,在本实施例中,本发明提供一种适用于区块链节点的钱包找回方法,区块链配置有账户模型,上述方法包括:FIG. 2 is a flowchart of another wallet retrieval method provided by an embodiment of the present invention. As shown in Figure 2, in this embodiment, the present invention provides a wallet retrieval method suitable for blockchain nodes, the blockchain is configured with an account model, and the above method includes:
S22:接收第一钱包找回交易;其中,第一钱包找回交易由客户端响应于将第二公钥的第二账户中的若干资产找回到第一公钥的第一账户中生成,第一钱包找回交易的签名信息中包括钱包找回标识、延时 信息、第一公钥、第二公钥;S22: Receive the first wallet retrieval transaction; wherein the first wallet retrieval transaction is generated by the client in response to retrieving several assets in the second account of the second public key back into the first account of the first public key, The signature information of the first wallet retrieval transaction includes the wallet retrieval identifier, delay information, the first public key, and the second public key;
S24:缓存第一钱包找回交易,并根据延时信息确定起始打包时刻;S24: Cache the first wallet to retrieve the transaction, and determine the start packing time according to the delay information;
S26:在到达起始打包时刻,且拥有起始打包时刻后的最新的第一区块的打包权时,执行第一钱包找回交易:将若干资产从第二账户划转至第一账户;S26: When the initial packaging time is reached and the packaging right of the latest first block after the initial packaging time is reached, execute the first wallet retrieval transaction: transfer a number of assets from the second account to the first account;
S28:将包括第一钱包找回交易的第一区块广播至其它区块链节点,以供其它区块链节点删除本地的第一钱包找回交易。S28: Broadcast the first block including the first wallet retrieval transaction to other blockchain nodes, so that other blockchain nodes can delete the local first wallet retrieval transaction.
上述实施例的钱包找回原理可参考图1所示的方法,此处不再赘述。For the wallet retrieval principle of the above-mentioned embodiment, reference may be made to the method shown in FIG. 1 , which will not be repeated here.
优选地,签名信息中还包括可以对第二公钥进行管理的各第三账户的第三公钥、可以成功执行第一钱包找回交易的钱包找回判断规则、若干第四账户根据所持有的私钥对第一钱包找回交易的交易内容进行签名获得的第一签名数据;Preferably, the signature information also includes third public keys of each third account that can manage the second public key, wallet retrieval judgment rules that can successfully execute the first wallet retrieval transaction, and several fourth accounts according to the Some private keys are the first signature data obtained by signing the transaction content of the first wallet retrieval transaction;
执行第一钱包找回交易包括:Executing the first wallet retrieval transaction includes:
判断签名信息中的各第一签名数据是否符合钱包找回判断规则:Determine whether each first signature data in the signature information conforms to the wallet retrieval judgment rule:
是,则执行第一钱包找回交易。If yes, execute the first wallet retrieval transaction.
上述实施例的钱包找回原理可参考图1所示的一种优选实施方式的方法,此处不再赘述。For the wallet retrieval principle in the above embodiment, reference may be made to the method of a preferred embodiment shown in FIG. 1 , and details are not repeated here.
进一步的,钱包找回判断规则包括至少应当收到的第一签名数据的第一数量,及,正确签名的第一签名数据的第二数量;Further, the wallet retrieval judgment rule includes at least the first quantity of the first signature data that should be received, and the second quantity of the correctly signed first signature data;
判断签名信息中的各第一签名数据是否符合钱包找回判断规则包括:Judging whether each first signature data in the signature information conforms to the wallet retrieval judgment rules includes:
判断签名信息中第一签名数据的数量是否不少于第一数量:Determine whether the quantity of the first signature data in the signature information is not less than the first quantity:
是,则判断签名信息中签名正确的第一签名数据的数量是否不少于第二数量。If yes, then determine whether the number of correctly signed first signature data in the signature information is not less than the second number.
上述实施例的钱包找回原理可参考图1所示的一种优选实施方式的方法,此处不再赘述。For the wallet retrieval principle in the above embodiment, reference may be made to the method of a preferred embodiment shown in FIG. 1 , and details are not repeated here.
优选地,生成第一钱包找回交易包括:Preferably, generating the first wallet retrieval transaction includes:
生成包括第一钱包找回交易的第一钱包找回存证交易;其中,第一钱包找回交易包括于第一钱包找回存证交易的payload中;generating a first wallet retrieving deposit certificate transaction including the first wallet retrieving transaction; wherein, the first wallet retrieving transaction is included in the payload of the first wallet retrieving deposit certificate transaction;
缓存第一钱包找回交易,并根据延时信息确定起始打包时刻包括:Cache the first wallet to retrieve the transaction, and determine the starting packaging time according to the delay information, including:
扣除第一钱包找回存证交易的手续费,将第一钱包找回存证交易存证在区块链上;Deduct the handling fee of the first wallet to retrieve the deposit certificate transaction, and store the first wallet to retrieve the deposit certificate transaction certificate on the blockchain;
缓存第一钱包找回交易,并根据延时信息确定起始打包时刻。The first wallet is cached to retrieve the transaction, and the starting packaging time is determined according to the delay information.
上述实施例的钱包找回原理可参考图1所示的一种优选实施方式的方法,此处不再赘述。For the wallet retrieval principle in the above embodiment, reference may be made to the method of a preferred embodiment shown in FIG. 1 , and details are not repeated here.
进一步的,延时信息为第一钱包找回交易所需延长的第一时长;缓存第一钱包找回交易,并根据延时信息确定起始打包时刻包括:Further, the delay information is the first time duration required for the first wallet to retrieve the transaction; caching the first wallet to retrieve the transaction, and determining the start packing time according to the delay information includes:
根据第一钱包找回存证交易被打包的第一时刻、第一时长确定第一钱包找回交易的起始打包时刻;According to the first moment and the first duration when the first wallet retrieval transaction is packaged, determine the initial packaging moment of the first wallet retrieval transaction;
将第一钱包找回交易存储到本地,并存储第一钱包找回存证交易的第一哈希值与第一钱包找回交易的第二哈希值的第一对应关系;Store the first wallet retrieval transaction locally, and store the first correspondence between the first hash value of the first wallet retrieval transaction and the second hash value of the first wallet retrieval transaction;
其中,第一对应关系用于供其它区块链节点:Among them, the first correspondence is used for other blockchain nodes:
在执行第一钱包找回交易时,根据第二哈希值找到第一钱包找回存证交易,并根据第一钱包找回存证交易被打包的第一时刻、第一时长确定第一钱包找回交易的起始打包时刻;When executing the first wallet retrieval transaction, the first wallet retrieval certificate transaction is found according to the second hash value, and the first wallet is determined according to the first moment and the first duration when the first wallet retrieval certificate transaction is packaged Retrieve the starting packaging moment of the transaction;
判断第一钱包找回交易的打包时刻是否不早于起始打包时刻:Determine whether the packaging time of the first wallet retrieval transaction is not earlier than the initial packaging time:
否,则第一钱包找回交易执行不成功。If not, the first wallet retrieval transaction is unsuccessful.
上述实施例的钱包找回原理可参考图1所示的一种优选实施方式的方法,此处不再赘述。For the wallet retrieval principle in the above embodiment, reference may be made to the method of a preferred embodiment shown in FIG. 1 , and details are not repeated here.
图3为本发明一实施例提供的一种设备的结构示意图。FIG. 3 is a schematic structural diagram of a device according to an embodiment of the present invention.
如图3所示,作为另一方面,本申请还提供了一种设备,包括一个或多个3央处理单元(CPU)301,其可以根据存储在只读存储器(ROM)302中的程序或者从存储部分308加载到随机访问存储器(RAM)303中的程序而执行各种适当的动作和处理。在RAM303中,还存储有设备300操作所需的各种程序和数据。CPU301、ROM302以及RAM303通过总线304彼此相连。输入/输出(I/O)接口305也连接至总线304。As shown in FIG. 3 , as another aspect, the present application also provides a device, comprising one or more central processing units (CPUs) 301 , which can operate according to a program stored in a read only memory (ROM) 302 or Various appropriate actions and processes are executed from the program loaded into the random access memory (RAM) 303 from the storage section 308 . In the RAM 303, various programs and data necessary for the operation of the device 300 are also stored. The CPU 301 , the ROM 302 , and the RAM 303 are connected to each other through a bus 304 . An input/output (I/O) interface 305 is also connected to bus 304 .
以下部件连接至I/O接口305:包括键盘、鼠标等的输入部分306; 包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分307;包括硬盘等的存储部分308;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分309。通信部分309经由诸如因特网的网络执行通信处理。驱动器310也根据需要连接至I/O接口305。可拆卸介质311,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器310上,以便于从其上读出的计算机程序根据需要被安装入存储部分308。The following components are connected to the I/O interface 305: an input section 306 including a keyboard, a mouse, etc.; an output section 307 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 308 including a hard disk, etc. ; and a communication section 309 including a network interface card such as a LAN card, a modem, and the like. The communication section 309 performs communication processing via a network such as the Internet. A drive 310 is also connected to the I/O interface 305 as needed. A removable medium 311, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is mounted on the drive 310 as needed so that a computer program read therefrom is installed into the storage section 308 as needed.
特别地,根据本公开的实施例,上述任一实施例描述的方法可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括有形地包含在机器可读介质上的计算机程序,所述计算机程序包含用于执行上述任一方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分309从网络上被下载和安装,和/或从可拆卸介质311被安装。In particular, according to an embodiment of the present disclosure, the method described in any of the above embodiments may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program containing program code for performing any of the methods described above. In such an embodiment, the computer program may be downloaded and installed from the network via the communication portion 309 and/or installed from the removable medium 311 .
作为又一方面,本申请还提供了一种计算机可读存储介质,该计算机可读存储介质可以是上述实施例的装置中所包含的计算机可读存储介质;也可以是单独存在,未装配入设备中的计算机可读存储介质。计算机可读存储介质存储有一个或者一个以上程序,该程序被一个或者一个以上的处理器用来执行描述于本申请提供的方法。As yet another aspect, the present application also provides a computer-readable storage medium. The computer-readable storage medium may be a computer-readable storage medium included in the apparatus of the foregoing embodiment; A computer-readable storage medium in a device. The computer-readable storage medium stores one or more programs that are used by one or more processors to perform the methods described in the present application.
附图中的流程图和框图,图示了按照本发明各种实施例的***、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这根据所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以通过执行规定的功能或操作的专用的基于硬件的***来实现,或者可以通过专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more logical functions for implementing the specified functions executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by dedicated hardware-based systems that perform the specified functions or operations , or can be implemented by a combination of dedicated hardware and computer instructions.
描述于本申请实施例中所涉及到的单元或模块可以通过软件的方 式实现,也可以通过硬件的方式来实现。所描述的单元或模块也可以设置在处理器中,例如,各所述单元可以是设置在计算机或移动智能设备中的软件程序,也可以是单独配置的硬件装置。其中,这些单元或模块的名称在某种情况下并不构成对该单元或模块本身的限定。The related units or modules described in the embodiments of the present application may be implemented in a software manner, and may also be implemented in a hardware manner. The described units or modules may also be provided in the processor, for example, each of the units may be a software program provided in a computer or a mobile smart device, or may be a separately configured hardware device. Wherein, the names of these units or modules do not constitute limitations on the units or modules themselves under certain circumstances.
以上描述仅为本申请的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本申请中所涉及的发明范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离本申请构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本申请中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。The above description is only a preferred embodiment of the present application and an illustration of the applied technical principles. It should be understood by those skilled in the art that the scope of the invention involved in this application is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features. Other technical solutions formed by any combination of its equivalent features. For example, a technical solution is formed by replacing the above-mentioned features with the technical features disclosed in this application (but not limited to) with similar functions.

Claims (12)

  1. 一种钱包找回方法,其特征在于,区块链配置有账户模型,所述方法适用于客户端,所述方法包括:A wallet retrieval method, characterized in that the blockchain is configured with an account model, the method is applicable to a client, and the method includes:
    响应于将第二公钥的第二账户中的若干资产找回到第一公钥的第一账户中,生成第一钱包找回交易;其中,所述第一钱包找回交易的签名信息中包括钱包找回标识、延时信息、所述第一公钥、所述第二公钥;In response to retrieving several assets in the second account of the second public key back into the first account of the first public key, a first wallet retrieval transaction is generated; wherein the signature information of the first wallet retrieval transaction is Including wallet retrieval identification, delay information, the first public key, the second public key;
    将所述第一钱包找回交易发送至区块链网络,以供区块链节点:Send the first wallet retrieval transaction to the blockchain network for the blockchain node to:
    缓存所述第一钱包找回交易,并根据所述延时信息确定起始打包时刻;Cache the first wallet to retrieve the transaction, and determine the start packing time according to the delay information;
    在到达所述起始打包时刻,且拥有所述起始打包时刻后的最新的第一区块的打包权时,执行所述第一钱包找回交易:将所述若干资产从所述第二账户划转至所述第一账户;以及,When the initial packaging time is reached and the packaging right of the latest first block after the initial packaging time is reached, execute the first wallet retrieval transaction: transfer the several assets from the second account transfer to said first account; and,
    将包括所述第一钱包找回交易的所述第一区块广播至其它区块链节点,以供其它区块链节点删除本地的所述第一钱包找回交易。Broadcasting the first block including the first wallet retrieval transaction to other blockchain nodes for other blockchain nodes to delete the local first wallet retrieval transaction.
  2. 根据权利要求1所述的方法,其特征在于,所述签名信息中还包括可以对所述第二公钥进行管理的各第三账户的第三公钥、可以成功执行所述第一钱包找回交易的钱包找回判断规则、若干第四账户根据所持有的私钥对所述第一钱包找回交易的交易内容进行签名获得的第一签名数据;The method according to claim 1, wherein the signature information further includes third public keys of each third account that can manage the second public key, and can successfully execute the first wallet search. The wallet retrieval judgment rule of the transaction, and the first signature data obtained by signing the transaction content of the first wallet retrieval transaction according to the private key held by several fourth accounts;
    所述执行所述第一钱包找回交易包括:The executing the first wallet retrieval transaction includes:
    判断所述签名信息中的各所述第一签名数据是否符合所述钱包找回判断规则:Determine whether each of the first signature data in the signature information conforms to the wallet retrieval judgment rule:
    是,则执行所述第一钱包找回交易。If yes, execute the first wallet retrieval transaction.
  3. 根据权利要求2所述的方法,其特征在于,所述钱包找回判断规则包括至少应当收到的第一签名数据的第一数量,及,正确签名的第一签名数据的第二数量;The method according to claim 2, wherein the wallet retrieval judgment rule includes at least a first quantity of first signature data that should be received, and a second quantity of correctly signed first signature data;
    所述判断所述签名信息中的各所述第一签名数据是否符合所述钱包找回判断规则包括:The judging whether each of the first signature data in the signature information complies with the wallet retrieval judgment rule includes:
    判断所述签名信息中所述第一签名数据的数量是否不少于所述第一数量:Determine whether the quantity of the first signature data in the signature information is not less than the first quantity:
    是,则判断所述签名信息中签名正确的第一签名数据的数量是否不少于所述第二数量。If yes, then determine whether the number of correctly signed first signature data in the signature information is not less than the second number.
  4. 根据权利要求1所述的方法,其特征在于,所述生成第一钱包找回交易包括:The method according to claim 1, wherein the generating the first wallet retrieval transaction comprises:
    生成包括所述第一钱包找回交易的第一钱包找回存证交易;其中,所述第一钱包找回交易包括于所述第一钱包找回存证交易的payload中;generating a first wallet retrieving deposit certificate transaction including the first wallet retrieving transaction; wherein the first wallet retrieving transaction is included in the payload of the first wallet retrieving deposit certificate transaction;
    所述缓存所述第一钱包找回交易,并根据所述延时信息确定起始打包时刻包括:The caching of the first wallet to retrieve the transaction, and determining the start packing time according to the delay information includes:
    扣除所述第一钱包找回存证交易的手续费,将所述第一钱包找回存证交易存证在区块链上;Deducting the handling fee for the transaction of retrieving the certificate of deposit from the first wallet, and storing the certificate of the transaction of retrieving the certificate of deposit from the first wallet on the blockchain;
    缓存所述第一钱包找回交易,并根据所述延时信息确定起始打包时刻。Cache the first wallet to retrieve the transaction, and determine the start packing time according to the delay information.
  5. 根据权利要求4所述的方法,其特征在于,所述延时信息为所述钱包找回交易所需延长的第一时长;所述缓存所述第一钱包找回交易,并根据所述延时信息确定起始打包时刻包括:The method according to claim 4, wherein the delay information is a first time period that is required for the wallet to retrieve the transaction; the cached first wallet retrieves the transaction, and according to the delay The time information to determine the start packing time includes:
    根据所述第一钱包找回存证交易被打包的第一时刻、所述第一时长确定所述第一钱包找回交易的起始打包时刻;Determine the initial packaging moment of the first wallet retrieval transaction according to the first moment when the first wallet retrieval transaction is packaged and the first duration;
    将所述第一钱包找回交易存储到本地,并存储所述第一钱包找回存证交易的第一哈希值与所述第一钱包找回交易的第二哈希值的第一对应关系;Store the first wallet retrieval transaction locally, and store the first correspondence between the first hash value of the first wallet retrieval transaction and the second hash value of the first wallet retrieval transaction relation;
    其中,所述第一对应关系用于供其它区块链节点:Wherein, the first correspondence is used for other blockchain nodes:
    在执行所述第一钱包找回交易时,根据所述第二哈希值找到所述第一钱包找回存证交易,并根据所述第一钱包找回存证交易被打 包的第一时刻、所述第一时长确定所述第一钱包找回交易的起始打包时刻;When executing the first wallet retrieval transaction, the first wallet retrieval certificate transaction is found according to the second hash value, and the first moment when the deposit certificate transaction is packaged is retrieved according to the first wallet , the first duration determines the initial packaging moment of the first wallet retrieval transaction;
    判断所述第一钱包找回交易的打包时刻是否不早于所述起始打包时刻:Determine whether the packaging time of the first wallet retrieval transaction is not earlier than the initial packaging time:
    否,则所述第一钱包找回交易执行不成功。If not, the execution of the first wallet retrieval transaction is unsuccessful.
  6. 一种钱包找回方法,其特征在于,区块链配置有账户模型,所述方法适用于区块链节点,所述方法包括:A wallet retrieval method, characterized in that a blockchain is configured with an account model, the method is applicable to blockchain nodes, and the method includes:
    接收第一钱包找回交易;其中,所述第一钱包找回交易由客户端响应于将第二公钥的第二账户中的若干资产找回到第一公钥的第一账户中生成,所述第一钱包找回交易的签名信息中包括钱包找回标识、延时信息、所述第一公钥、所述第二公钥;receiving a first wallet retrieval transaction; wherein, the first wallet retrieval transaction is generated by the client in response to retrieving several assets in the second account of the second public key back into the first account of the first public key, The signature information of the first wallet retrieval transaction includes a wallet retrieval identifier, delay information, the first public key, and the second public key;
    缓存所述第一钱包找回交易,并根据所述延时信息确定起始打包时刻;Cache the first wallet to retrieve the transaction, and determine the start packing time according to the delay information;
    在到达所述起始打包时刻,且拥有所述起始打包时刻后的最新的第一区块的打包权时,执行所述第一钱包找回交易:将所述若干资产从所述第二账户划转至所述第一账户;When the initial packaging time is reached and the packaging right of the latest first block after the initial packaging time is reached, execute the first wallet retrieval transaction: transfer the several assets from the second account transfer to said first account;
    将包括所述第一钱包找回交易的所述第一区块广播至其它区块链节点,以供其它区块链节点删除本地的所述第一钱包找回交易。Broadcasting the first block including the first wallet retrieval transaction to other blockchain nodes for other blockchain nodes to delete the local first wallet retrieval transaction.
  7. 根据权利要求6所述的方法,其特征在于,所述签名信息中还包括可以对所述第二公钥进行管理的各第三账户的第三公钥、可以成功执行所述第一钱包找回交易的钱包找回判断规则、若干第四账户根据所持有的私钥对所述第一钱包找回交易的交易内容进行签名获得的第一签名数据;The method according to claim 6, wherein the signature information further includes third public keys of each third account that can manage the second public key, and can successfully execute the first wallet search. The wallet retrieval judgment rule of the transaction, and the first signature data obtained by signing the transaction content of the first wallet retrieval transaction according to the private key held by several fourth accounts;
    所述执行所述第一钱包找回交易包括:The executing the first wallet retrieval transaction includes:
    判断所述签名信息中的各所述第一签名数据是否符合所述钱包找回判断规则:Determine whether each of the first signature data in the signature information conforms to the wallet retrieval judgment rule:
    是,则执行所述第一钱包找回交易。If yes, execute the first wallet retrieval transaction.
  8. 根据权利要求7所述的方法,其特征在于,所述钱包找回判断规则包括至少应当收到的第一签名数据的第一数量,及,正确签名的第一签名数据的第二数量;The method according to claim 7, wherein the wallet retrieval judgment rule includes at least a first quantity of first signature data that should be received, and a second quantity of correctly signed first signature data;
    所述判断所述签名信息中的各所述第一签名数据是否符合所述钱包找回判断规则包括:The judging whether each of the first signature data in the signature information complies with the wallet retrieval judgment rule includes:
    判断所述签名信息中所述第一签名数据的数量是否不少于所述第一数量:Determine whether the quantity of the first signature data in the signature information is not less than the first quantity:
    是,则判断所述签名信息中签名正确的第一签名数据的数量是否不少于所述第二数量。If yes, then determine whether the number of correctly signed first signature data in the signature information is not less than the second number.
  9. 根据权利要求6所述的方法,其特征在于,所述生成第一钱包找回交易包括:The method according to claim 6, wherein the generating the first wallet retrieval transaction comprises:
    生成包括所述第一钱包找回交易的第一钱包找回存证交易;其中,所述第一钱包找回交易包括于所述第一钱包找回存证交易的payload中;generating a first wallet retrieving deposit certificate transaction including the first wallet retrieving transaction; wherein the first wallet retrieving transaction is included in the payload of the first wallet retrieving deposit certificate transaction;
    所述缓存所述第一钱包找回交易,并根据所述延时信息确定起始打包时刻包括:The caching of the first wallet to retrieve the transaction, and determining the start packing time according to the delay information includes:
    扣除所述第一钱包找回存证交易的手续费,将所述第一钱包找回存证交易存证在区块链上;Deducting the handling fee for the transaction of retrieving the certificate of deposit from the first wallet, and storing the certificate of the transaction of retrieving the certificate of deposit from the first wallet on the blockchain;
    缓存所述第一钱包找回交易,并根据所述延时信息确定起始打包时刻。Cache the first wallet to retrieve the transaction, and determine the start packing time according to the delay information.
  10. 根据权利要求9所述的方法,其特征在于,所述延时信息为所述第一钱包找回交易所需延长的第一时长;所述缓存所述第一钱包找回交易,并根据所述延时信息确定起始打包时刻包括:The method according to claim 9, characterized in that the delay information is a first time duration required to retrieve the transaction from the first wallet; The delay information to determine the start packing time includes:
    根据所述第一钱包找回存证交易被打包的第一时刻、所述第一时长确定所述第一钱包找回交易的起始打包时刻;Determine the initial packaging moment of the first wallet retrieval transaction according to the first moment when the first wallet retrieval transaction is packaged and the first duration;
    将所述第一钱包找回交易存储到本地,并存储所述第一钱包找回存证交易的第一哈希值与所述第一钱包找回交易的第二哈希值的第一对应关系;Store the first wallet retrieval transaction locally, and store the first correspondence between the first hash value of the first wallet retrieval transaction and the second hash value of the first wallet retrieval transaction relation;
    其中,所述第一对应关系用于供其它区块链节点:Wherein, the first correspondence is used for other blockchain nodes:
    在执行所述第一钱包找回交易时,根据所述第二哈希值找到所述第一钱包找回存证交易,并根据所述第一钱包找回存证交易被打包的第一时刻、所述第一时长确定所述第一钱包找回交易的起始打包时刻;When executing the first wallet retrieval transaction, the first wallet retrieval certificate transaction is found according to the second hash value, and the first moment when the deposit certificate transaction is packaged is retrieved according to the first wallet , the first duration determines the initial packaging moment of the first wallet retrieval transaction;
    判断所述第一钱包找回交易的打包时刻是否不早于所述起始打包时刻:Determine whether the packaging time of the first wallet retrieval transaction is not earlier than the initial packaging time:
    否,则所述第一钱包找回交易执行不成功。If not, the execution of the first wallet retrieval transaction is unsuccessful.
  11. 一种计算机设备,其特征在于,所述设备包括:A computer device, characterized in that the device comprises:
    一个或多个处理器;one or more processors;
    存储器,用于存储一个或多个程序,memory for storing one or more programs,
    当所述一个或多个程序被所述一个或多个处理器执行时,使得所述一个或多个处理器执行如权利要求1-10中任一项所述的方法。The one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-10.
  12. 一种存储有计算机程序的存储介质,其特征在于,该程序被处理器执行时实现如权利要求1-10中任一项所述的方法。A storage medium storing a computer program, characterized in that, when the program is executed by a processor, the method according to any one of claims 1-10 is implemented.
PCT/CN2021/111852 2020-12-09 2021-08-10 Wallet retrieval method and device, and storage medium WO2022121346A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011426902.3 2020-12-09
CN202011426902.3A CN112583811B (en) 2020-12-09 2020-12-09 Wallet finding method, equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2022121346A1 true WO2022121346A1 (en) 2022-06-16

Family

ID=75127958

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/111852 WO2022121346A1 (en) 2020-12-09 2021-08-10 Wallet retrieval method and device, and storage medium

Country Status (2)

Country Link
CN (1) CN112583811B (en)
WO (1) WO2022121346A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112600664B (en) * 2020-12-09 2022-06-24 杭州复杂美科技有限公司 Delayed transaction generation method, delayed transaction execution device and storage medium
CN112583811B (en) * 2020-12-09 2023-04-14 杭州复杂美科技有限公司 Wallet finding method, equipment and storage medium
CN113222576B (en) * 2021-05-25 2022-09-16 杭州复杂美科技有限公司 Delayed transfer method, computer device and storage medium
CN113592643B (en) * 2021-06-29 2023-11-28 杭州复杂美科技有限公司 Asset periodic thawing method, computer device and storage medium
CN113379549A (en) * 2021-06-29 2021-09-10 杭州复杂美科技有限公司 Asset extraction method, computer device, and storage medium
CN113888329A (en) * 2021-10-04 2022-01-04 杭州复杂美科技有限公司 Universal wallet retrieving method, computer device and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109345259A (en) * 2018-09-29 2019-02-15 腾讯科技(深圳)有限公司 Virtual resource transfer method, device, medium and electronic equipment based on block chain
CN109377358A (en) * 2018-08-09 2019-02-22 杭州复杂美科技有限公司 A kind of assets method for retrieving, equipment and storage medium
US20200027080A1 (en) * 2018-07-18 2020-01-23 Regal RA DMCC Scalable reconciliation of crypto assets in a blockchain network
US20200127813A1 (en) * 2017-04-24 2020-04-23 Blocksettle Ab Method and system for creating a user identity
CN111210217A (en) * 2020-01-02 2020-05-29 腾讯科技(深圳)有限公司 Data processing method, device and storage medium
CN112583811A (en) * 2020-12-09 2021-03-30 杭州复杂美科技有限公司 Wallet retrieving method, equipment and storage medium

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105469510B (en) * 2014-10-12 2018-01-09 吴思进 The encryption currency wallet that delay pays or given for change can be predicted
CN107609876A (en) * 2017-08-18 2018-01-19 北京云知科技有限公司 A kind of method and system for recovering block chain assets
WO2020009718A1 (en) * 2018-07-03 2020-01-09 Esmart Tech, Inc. Cryptocurrency wallet with secure backup and restore
US10790976B1 (en) * 2018-08-01 2020-09-29 Bloomio Ag System and method of blockchain wallet recovery
CN111161056A (en) * 2018-11-07 2020-05-15 新明华区块链技术(深圳)有限公司 Method, system and equipment for improving transaction security of digital assets
CN111159774B (en) * 2019-12-11 2022-07-15 马上游科技股份有限公司 Decentralized intelligent contract escrow wallet method and system
CN111242614A (en) * 2020-01-12 2020-06-05 杭州复杂美科技有限公司 Wallet account asset retrieving method, collection guarantee method, equipment and storage medium
CN111369242B (en) * 2020-03-06 2023-05-16 上海简苏网络科技有限公司 Method for recovering blockchain assets through intelligent contracts, wallet and blockchain nodes
CN111476571B (en) * 2020-04-02 2023-09-15 百度国际科技(深圳)有限公司 Asset processing method, device, equipment and storage medium based on blockchain

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200127813A1 (en) * 2017-04-24 2020-04-23 Blocksettle Ab Method and system for creating a user identity
US20200027080A1 (en) * 2018-07-18 2020-01-23 Regal RA DMCC Scalable reconciliation of crypto assets in a blockchain network
CN109377358A (en) * 2018-08-09 2019-02-22 杭州复杂美科技有限公司 A kind of assets method for retrieving, equipment and storage medium
CN109345259A (en) * 2018-09-29 2019-02-15 腾讯科技(深圳)有限公司 Virtual resource transfer method, device, medium and electronic equipment based on block chain
CN111210217A (en) * 2020-01-02 2020-05-29 腾讯科技(深圳)有限公司 Data processing method, device and storage medium
CN112583811A (en) * 2020-12-09 2021-03-30 杭州复杂美科技有限公司 Wallet retrieving method, equipment and storage medium

Also Published As

Publication number Publication date
CN112583811A (en) 2021-03-30
CN112583811B (en) 2023-04-14

Similar Documents

Publication Publication Date Title
WO2022121346A1 (en) Wallet retrieval method and device, and storage medium
US10698885B2 (en) Method and device for writing service data in block chain system
US20210326867A1 (en) Fork-Tolerant Consensus Protocol
WO2022121348A1 (en) Delayed transaction generation method, delayed transaction execution method, and device and storage medium
US20210258154A1 (en) Node group managing device and computing device for configuring group key-based dual signature transaction structure in blockchain network
US8738964B2 (en) Disk-free recovery of XA transactions for in-memory data grids
JP2020505799A (en) System and method for replay attack detection
CN107766080B (en) Transaction message processing method, device, equipment and system
WO2023045620A1 (en) Transaction data processing method and apparatus, computer device and storage medium
US9589153B2 (en) Securing integrity and consistency of a cloud storage service with efficient client operations
US10031948B1 (en) Idempotence service
CN111597567B (en) Data processing method, data processing device, node equipment and storage medium
WO2022174735A1 (en) Data processing method and apparatus based on distributed storage, device, and medium
CN111226206B (en) Taking a snapshot of blockchain data
WO2022206438A1 (en) Method and apparatus for providing cross-chain message
WO2020098817A2 (en) Taking snapshots of blockchain data
CN111242614A (en) Wallet account asset retrieving method, collection guarantee method, equipment and storage medium
CN111047444A (en) Data transaction method and device based on block chain network
CN116977067A (en) Block chain-based data processing method, device, equipment and readable storage medium
CN107038617B (en) Pre-creation method and device of payment order
CN113592653B (en) Proxy delay transaction method, computer device and storage medium
WO2022021768A1 (en) Parallel chain transaction group execution method, and device and storage medium
CN113592652B (en) Delay transaction method, computer device and storage medium
CN111581446B (en) Graph relation generation method, device, system, equipment and storage medium
CN113379542B (en) Block chain transaction query method, device, medium and electronic equipment

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21902056

Country of ref document: EP

Kind code of ref document: A1