CN113592485B - Wallet retrieving method, computer device and storage medium - Google Patents

Wallet retrieving method, computer device and storage medium Download PDF

Info

Publication number
CN113592485B
CN113592485B CN202110881834.8A CN202110881834A CN113592485B CN 113592485 B CN113592485 B CN 113592485B CN 202110881834 A CN202110881834 A CN 202110881834A CN 113592485 B CN113592485 B CN 113592485B
Authority
CN
China
Prior art keywords
wallet
transaction
retrieving
address
retrieve
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202110881834.8A
Other languages
Chinese (zh)
Other versions
CN113592485A (en
Inventor
姜鹏
王志文
吴思进
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Fuzamei Technology Co Ltd
Original Assignee
Hangzhou Fuzamei Technology Co Ltd
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 Hangzhou Fuzamei Technology Co Ltd filed Critical Hangzhou Fuzamei Technology Co Ltd
Priority to CN202110881834.8A priority Critical patent/CN113592485B/en
Publication of CN113592485A publication Critical patent/CN113592485A/en
Application granted granted Critical
Publication of CN113592485B publication Critical patent/CN113592485B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/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
    • 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/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3821Electronic credentials
    • 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/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3825Use of electronic signatures
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02WCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO WASTEWATER TREATMENT OR WASTE MANAGEMENT
    • Y02W90/00Enabling technologies or technologies with a potential or indirect contribution to greenhouse gas [GHG] emissions mitigation

Abstract

The invention provides a wallet retrieving method, computer equipment and storage medium, relating to the technical field of blockchain and the like, wherein the method comprises the following steps: responding to the loss of a private key corresponding to the first main account address of the current user, generating a first wallet retrieving structure according to the first main account address, the first standby account address and the first delay time, and generating a first wallet retrieving address according to the first wallet retrieving structure; generating a first wallet retrieve transaction; generating a first wallet retrieving certificate transaction according to the first wallet retrieving transaction; the first wallet retrieve proof transaction is sent to a blockchain network. The wallet retrieving function is realized under the condition that the storage resources on the chain are not occupied.

Description

Wallet retrieving method, computer device and storage medium
Technical Field
The application relates to the technical field of blockchains, in particular to a wallet retrieving method, computer equipment and a storage medium.
Background
In the prior art, the wallet retrieving method comprises the following steps: by pre-associating a backup address, a user holding the backup address may initiate a transaction to retrieve the asset and transfer the associated address asset to the backup address after a period of time.
In the above mechanism, whether the wallet can retrieve depends on wallet retrieving rules on the chain that require the occupation of storage resources on the chain.
Disclosure of Invention
In view of the foregoing drawbacks or shortcomings of the prior art, it is desirable to provide a wallet retrieving method, computer device, and storage medium that do not occupy on-chain storage resources.
In a first aspect, the present invention provides a method for retrieving a wallet suitable for a client having a first standby account address, where the method includes:
responding to the loss of a private key corresponding to the first main account address of the current user, generating a first wallet retrieving structure according to the first main account address, the first standby account address and the first delay time, and generating a first wallet retrieving address according to the first wallet retrieving structure;
generating a first wallet retrieve transaction; the first wallet retrieving transaction comprises a first wallet retrieving structure body, wherein a first transaction initiator address of the first wallet retrieving transaction is a first wallet retrieving address, a first transaction receiver address of the first wallet retrieving transaction is a first standby account address;
generating a first wallet retrieving certificate transaction according to the first wallet retrieving transaction; the payload field of the first wallet retrieving the deposit card transaction comprises the first wallet retrieving the transaction;
transmitting the first wallet retrieve proof transaction to the blockchain network for the blockchain node to:
when the first wallet recovery certificate transaction is judged to be a first type transaction requiring delay recovery of the asset, deducting the commission of the first wallet recovery certificate transaction, determining the initial packaging time of the first wallet recovery transaction according to the block packaging time of a second block for packaging the first wallet recovery certificate transaction and the first delay time, and storing the first wallet recovery certificate transaction and the second hash value of the first wallet recovery transaction on a block chain; the method comprises the steps of,
storing the first wallet retrieve transaction locally; the method comprises the steps of,
when the initial packaging time is reached and the latest packaging right of the first block after the initial packaging time is possessed, generating a second wallet retrieving address according to a first wallet retrieving structure in the first wallet retrieving transaction, judging whether the second wallet retrieving address is the same as the address of a first transaction initiator, and judging whether the signature of the first wallet retrieving transaction is matched with the first standby account address in the first wallet retrieving structure in the first wallet retrieving transaction: if the judgment is yes, generating a first block comprising a first wallet retrieving transaction; the method comprises the steps of,
broadcasting the first block to other blockchain nodes for the other blockchain nodes:
generating a third wallet retrieving address according to a first wallet retrieving structure in the first wallet retrieving transaction, judging whether the third wallet retrieving address is identical to the address of a first transaction initiator, judging whether a signature of the first wallet retrieving transaction is matched with the address of a first standby account in the first wallet retrieving structure in the first wallet retrieving transaction, and judging whether the block packing time of a first block is later than the initial packing time: and deleting the local first wallet to retrieve the transaction when the judgment is yes.
In a second aspect, the present invention provides a wallet retrieving method applicable to a blockchain node, where the method includes:
receiving a first wallet retrieving the deposit card transaction; the method comprises the steps that a payload field of a first wallet retrieving license transaction comprises a first wallet retrieving transaction, the first wallet retrieving license transaction is generated according to the first wallet retrieving transaction, the first wallet retrieving license transaction and the first wallet retrieving transaction are generated by a client side with a first standby account address, the first wallet retrieving transaction comprises a first wallet retrieving structure, a first transaction initiator address of the first wallet retrieving transaction is the first wallet retrieving address, a first transaction receiver address of the first wallet retrieving transaction is the first standby account address, the first wallet retrieving structure is generated according to a first main account address of a first user, the first standby account address of the first user and a first delay time required to be prolonged by the retrieving wallet, and the first wallet retrieving address is generated according to the first wallet retrieving structure;
when the first wallet recovery certificate transaction is judged to be a first type transaction requiring delay recovery of the asset, deducting the commission of the first wallet recovery certificate transaction, determining the initial packaging time of the first wallet recovery transaction according to the block packaging time of a second block for packaging the first wallet recovery certificate transaction and the first delay time, and storing the first wallet recovery certificate transaction and the second hash value of the first wallet recovery transaction on a block chain; the method comprises the steps of,
storing the first wallet retrieve transaction locally; the method comprises the steps of,
when the initial packaging time is reached and the latest packaging right of the first block after the initial packaging time is possessed, generating a second wallet retrieving address according to a first wallet retrieving structure in the first wallet retrieving transaction, judging whether the second wallet retrieving address is the same as the address of a first transaction initiator, and judging whether the signature of the first wallet retrieving transaction is matched with the first standby account address in the first wallet retrieving structure in the first wallet retrieving transaction: if the judgment is yes, generating a first block comprising a first wallet retrieving transaction; the method comprises the steps of,
broadcasting the first block to other blockchain nodes for the other blockchain nodes:
generating a third wallet retrieving address according to a first wallet retrieving structure in the first wallet retrieving transaction, judging whether the third wallet retrieving address is identical to the address of a first transaction initiator, judging whether a signature of the first wallet retrieving transaction is matched with the address of a first standby account in the first wallet retrieving structure in the first wallet retrieving transaction, and judging whether the block packing time of a first block is later than the initial packing time: and deleting the local first wallet to retrieve the transaction when the judgment is yes.
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 the wallet retrieving method provided in accordance with embodiments of the present invention.
In a fourth aspect, the present invention also provides a storage medium storing a computer program that causes a computer to execute the wallet retrieving method provided according to the embodiments of the present invention.
According to the wallet retrieving method, the computer device and the storage medium provided by the embodiments of the invention, the first wallet retrieving structure is generated according to the first main account address, the first standby account address and the first delay time length by responding to the loss of the private key corresponding to the first main account address of the current user, and the first wallet retrieving address is generated according to the first wallet retrieving structure; generating a first wallet retrieve transaction; generating a first wallet retrieving certificate transaction according to the first wallet retrieving transaction; the method of sending the first wallet retrieving license transaction to the blockchain network enables wallet retrieving functionality to be similarly implemented without occupying on-chain storage resources.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the detailed description of non-limiting embodiments, made with reference to the following drawings, in which:
fig. 1 is a flowchart of a wallet retrieving method according to an embodiment of the present invention.
Fig. 2 is a flowchart of another wallet retrieving method according to an embodiment of the present invention.
Fig. 3 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The present application is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be noted that, for convenience of description, only the portions related to the invention are shown in the drawings.
It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be combined with each other. The present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 is a flowchart of a wallet retrieving method according to an embodiment of the present invention. As shown in fig. 1, in this embodiment, the present invention provides a wallet retrieving method suitable for a client having a first standby account address, where the method includes:
s12: responding to the loss of a private key corresponding to the first main account address of the current user, generating a first wallet retrieving structure according to the first main account address, the first standby account address and the first delay time, and generating a first wallet retrieving address according to the first wallet retrieving structure;
s14: generating a first wallet retrieve transaction; the first wallet retrieving transaction comprises a first wallet retrieving structure body, wherein a first transaction initiator address of the first wallet retrieving transaction is a first wallet retrieving address, a first transaction receiver address of the first wallet retrieving transaction is a first standby account address;
s16: generating a first wallet retrieving certificate transaction according to the first wallet retrieving transaction; the payload field of the first wallet retrieving the deposit card transaction comprises the first wallet retrieving the transaction;
s18: transmitting the first wallet retrieve proof transaction to the blockchain network for the blockchain node to:
when the first wallet recovery certificate transaction is judged to be a first type transaction requiring delay recovery of the asset, deducting the commission of the first wallet recovery certificate transaction, determining the initial packaging time of the first wallet recovery transaction according to the block packaging time of a second block for packaging the first wallet recovery certificate transaction and the first delay time, and storing the first wallet recovery certificate transaction and the second hash value of the first wallet recovery transaction on a block chain; the method comprises the steps of,
storing the first wallet retrieve transaction locally; the method comprises the steps of,
when the initial packaging time is reached and the latest packaging right of the first block after the initial packaging time is possessed, generating a second wallet retrieving address according to a first wallet retrieving structure in the first wallet retrieving transaction, judging whether the second wallet retrieving address is the same as the address of a first transaction initiator, and judging whether the signature of the first wallet retrieving transaction is matched with the first standby account address in the first wallet retrieving structure in the first wallet retrieving transaction: if the judgment is yes, generating a first block comprising a first wallet retrieving transaction; the method comprises the steps of,
broadcasting the first block to other blockchain nodes for the other blockchain nodes:
generating a third wallet retrieving address according to a first wallet retrieving structure in the first wallet retrieving transaction, judging whether the third wallet retrieving address is identical to the address of a first transaction initiator, judging whether a signature of the first wallet retrieving transaction is matched with the address of a first standby account in the first wallet retrieving structure in the first wallet retrieving transaction, and judging whether the block packing time of a first block is later than the initial packing time: and deleting the local first wallet to retrieve the transaction when the judgment is yes.
Specifically, generating a first chunk including the first wallet retrieve transaction includes "generating a first chunk including the first wallet retrieve transaction; transferring the first asset specified by the first wallet retrieve transaction from the first wallet retrieve address to the first alternate account address, deleting the local first wallet retrieve transaction including "transferring the first asset specified by the first wallet retrieve transaction from the first wallet retrieve address to the first alternate account address; deleting the local first wallet retrieve transaction as an example;
assuming that the main account address of the user a is addr (a), the standby account address is addr (a)', and the delay time is T;
the client side of the user a with the addr (a) generates a wallet retrieving structure S { addr (a), addr (a) ', T } according to the addr (a), addr (a)', T, and generates a wallet retrieving address addr (X) according to the S; it should be understood by those skilled in the art that the method for generating addr (X) according to S may be configured according to actual requirements, for example, configured to encode S according to protobuf protocol to generate a binary string, and hash the binary string to generate addr (X), or configured to encode S according to thraft protocol to generate a binary string, and hash the binary string to generate addr (X), which is not specifically limited in this application;
a client of the user a holding addr (a) generates a transfer transaction tx0 and sends the transfer transaction tx0 to the blockchain network, and a transaction receiver address of tx0 is addr (X); when the execution of tx0 is successful, the blockchain node skips the asset specified by tx0 from addr (a) to addr (X); it will be appreciated by those skilled in the art that the transfer transaction described above may also be generated by the clients of other users, or by a centralized proxy server, provided that user a sends addr (X) to the clients of other users, or by a centralized proxy server;
in response to the user a losing the private key corresponding to the addr (a), the client side of the user a holding the addr (a) ' executes step S12, generates a wallet retrieving structure S { a ddr (a), addr (a) ', T } according to the addr (a), addr (a) ', and generates a wallet retrieving address addr (X) according to S;
the client of the user a holding addr (a)' executes step S14 to generate a wallet retrieving transaction tx2; tx2 includes S, tx2 having a transaction initiator address addr (X), and tx2 having a transaction receiver address addr (a)';
the client of the addr (a)' held by the user a executes step S16, and a wallet retrieving certificate transaction tx1 is generated according to tx2; the payload field of tx1 includes tx2;
the client of the user a holding addr (a)' executes step S18 to send tx1 to the blockchain network;
when judging that tx1 is a first type transaction needing to be delayed according to the name of an executor of tx1, deducting the handling fee of tx1, determining an initial packaging time T2 of tx2 according to the block time T1 and the block time T of a block packaging tx1, wherein T2=T1+T, and storing tx1 and hash (tx 2) on a blockchain; it should be understood by those skilled in the art that the blockchain node may also determine whether tx1 is a first type of transaction according to other methods, for example, determining according to a delay identifier in the tx1 signature, so as to achieve the same technical effect;
the block link point stores tx2 locally; the method comprises the steps of,
when reaching T2 and having the packing right of the latest block after T2 (the block with the height of 100 is assumed), the blockchain node generates a wallet retrieving transfer address a ddr (X)' according to S in tx2; it will be appreciated by those skilled in the art that the method of generating addr (X) 'herein should be the same as the method of generating addr (X), for example, should be correspondingly configured to encode S in tx2 according to the protobuf protocol to generate a binary string, and then hash the binary string to generate addr (X)';
the blockchain node determines whether addr (X) 'is the same as the transaction initiator address addr (X) of tx2, and determines whether the signature of tx2 matches addr (a)' in S in tx 2:
since addr (X) ' is the same as the transaction initiator address addr (X) of tx2 and the signature of tx2 matches addr (a) ' in S in tx2 (the client-generated transaction holding addr (a) ' must go through the private key signature of the client holding addr (a) ' and thus match), then the block link point generates a block (100) including tx2 and, when executing tx2 is successful, the asset in addr (X) is scratched to addr (a) '; the method comprises the steps of,
broadcasting blocks (100) to other blockchain nodes;
other blockchain nodes generate wallet retrieving transfer addresses addr (X) ", judge whether addr (X)", which are the same as transaction initiator addresses addr (X) of tx2, judge whether signatures of tx2 are matched with addr (a)' in S of tx2, and judge whether block packing time of block (100) is later than T2:
since addr (X) ' is the same as addr (X) of the transaction initiator address of tx2, the signature of tx2 matches addr (a) ' in S in tx2, and the block packing time of block (100) is later than T2, then when tx2 execution succeeds, the asset in addr (X) is scratched to addr (a) '; the method comprises the steps of,
the local tx2 is deleted.
It will be appreciated by those skilled in the art that if tx2 performs successfully some verification in the prior art, such as verifying that addr (X) has enough token transfers, if verification fails, then if addr (X) ' is the same as the transaction initiator address of tx2, addr (X) ' matches the transaction initiator address of tx2, the signature of tx2 matches addr (a) ' in S in tx2, the block packing time of b lock (100) is later than T2, and tx2 fails to perform;
in more embodiments, the first delay time may be replaced by a fixed time T3 according to actual requirements, and the starting packaging time is T3, so that the same technical effects can be achieved.
In more embodiments, the signature information of the wallet retrieving includes a wallet retrieving transaction identifier, and the blockchain node performs the step of generating the second wallet retrieving address … … according to the first wallet retrieving structure in the first wallet retrieving transaction when the wallet retrieving transaction identifier is identified, and the other blockchain nodes perform the step of generating the third wallet retrieving address … … according to the first wallet retrieving structure in the first wallet retrieving transaction when the wallet retrieving transaction identifier is identified.
It should be understood by those skilled in the art that the first delay time length may be replaced by a delay block height parameter according to the actual requirement, and the delay block height parameter may be configured according to the actual requirement, for example, configured as a certain fixed end block height, or configured as a first block section, where the end block height is equal to the sum of the block height of the blocks packaged tx1 and the first block section, so that the same technical effect may be achieved.
It should be understood by those skilled in the art that addr (X) is not any contract address, if user a does not lose the private key corresponding to addr (a), the client side of user a holding addr (a) may invoke the asset in addr (X) with any contract, but after the transaction (including S, where the address of the sender of the transaction is addr (X)) of the asset in addr (X) generated by the client side of user a holding addr (a) is sent to the blockchain network, the blockchain node still generates a wallet retrieving address according to S in the transaction, determines whether the generated wallet retrieving address is the same as the address of the initiator of the transaction, and determines whether the signature of the transaction matches with the first main account address in S in the transaction; only if the above-mentioned decisions are yes, the transaction can be successfully executed.
In the prior art, whether the wallet can retrieve depends on wallet retrieving rules on the chain, and the rules need to occupy storage resources on the chain; in the application, any wallet retrieving rule is not recorded on the chain, only tx1 and hash (tx 2) are stored, and the wallet retrieving function can be realized without occupying storage resources on the chain.
Preferably, the depositing the first wallet recovery certificate transaction, the second hash value of the first wallet recovery transaction, onto the blockchain comprises:
depositing a first corresponding relation between a first hash value and a second hash value of the first wallet recovery certificate transaction on the blockchain;
the determining whether the second wallet retrieve address is the same as the first transaction initiator address includes:
judging whether the second wallet retrieving address is the same as the first transaction initiator address, searching whether the first wallet retrieving certificate transaction exists on the blockchain according to the first corresponding relation, and judging whether the searched first wallet retrieving certificate transaction is a first type transaction;
the determining whether the third wallet retrieve address is the same as the first transaction initiator address includes:
and judging whether the third wallet recovery address is the same as the first transaction initiator address, searching whether the first wallet recovery certificate transaction exists on the blockchain according to the first corresponding relation, and judging whether the searched first wallet recovery certificate transaction is a first type transaction.
The block chain node determines the initial packing time T2 of tx2 according to the block time T1 and the block time T of the block of packing tx1, wherein T2=T1+T;
verifying the corresponding relation between the hash (tx 1) and the hash (tx 2) on the blockchain;
the block chain node judges whether addr (X)' is the same as address addr (X) of transaction initiator of tx2, judges whether signature sig_a of tx2 is matched with pub (a) in S in tx2, searches whether tx1 exists on the chain according to the corresponding relation, and judges whether the searched tx1 is a first type transaction;
since addr (X) 'is the same as the address of the transaction initiator of tx2, the signature of tx2 is matched with addr (a)' in S in tx2, tx1 can be found on the blockchain, the found tx1 is a first type transaction, and the blockchain link point generates a first block comprising tx2; it will be appreciated by those skilled in the art that in further embodiments, addr (X)' may also be configured differently from addr (X) according to actual needs, and/or that tx1 is not found on the blockchain, and/or that tx1 is not found to be an operation of a first type of transaction, e.g., configured to not pack tx2;
other blockchain nodes are similar to the blockchain node in terms of judgment, and are not described in detail herein.
Preferably, generating the first block including the first wallet retrieve transaction includes:
generating a first block comprising a first wallet retrieve transaction;
transferring a first asset specified by the first wallet retrieve transaction from the first wallet retrieve address to a first alternate account address;
deleting the local first wallet retrieval transaction includes:
transferring a first asset specified by the first wallet retrieve transaction from the first wallet retrieve address to a first alternate account address;
the local first wallet is deleted to retrieve the transaction.
The wallet retrieving principle of the foregoing embodiment may refer to the method shown in fig. 1, and will not be described herein.
Preferably, storing the first wallet retrieval transaction locally comprises:
storing the first wallet retrieve transaction locally;
the first wallet retrieve transaction is sent to a first number of other blockchain nodes for storage of the first wallet retrieve transaction.
In the embodiment shown in FIG. 1, if the blockchain node1 stores tx2 locally, the node1 is down, resulting in tx2 not being properly packed into the blockchain; thus, if node1 also sends tx2 to a first number of other blockchain nodes, for example to nodes 2-10, then nodes 2-10 will also store tx2, and when nodes 1-10 arrive at the starting packaging time and have the packaging rights of the latest first chunk after the starting packaging time, step "generate a second wallet retrieving address … … from the first wallet retrieving structure in the first wallet retrieving transaction" will be performed; the above mechanism reduces the probability that tx2 cannot be correctly packed onto the blockchain.
In more embodiments, after the block link stores the first wallet retrieve transaction locally, the first wallet retrieve transaction may be further sent to the proxy server for storage according to actual requirements, where the proxy server has good performance and is not prone to downtime, and the proxy server may be configured to send the first wallet retrieve transaction to the blockchain network when the initial packaging time is reached.
Fig. 2 is a flowchart of a wallet retrieving method according to an embodiment of the present invention. As shown in fig. 2, in this embodiment, the present invention provides a wallet retrieving method applicable to a blockchain node, where the method includes:
s22: receiving a first wallet retrieving the deposit card transaction; the method comprises the steps that a payload field of a first wallet retrieving license transaction comprises a first wallet retrieving transaction, the first wallet retrieving license transaction is generated according to the first wallet retrieving transaction, the first wallet retrieving license transaction and the first wallet retrieving transaction are generated by a client side with a first standby account address, the first wallet retrieving transaction comprises a first wallet retrieving structure, a first transaction initiator address of the first wallet retrieving transaction is the first wallet retrieving address, a first transaction receiver address of the first wallet retrieving transaction is the first standby account address, the first wallet retrieving structure is generated according to a first main account address of a first user, the first standby account address of the first user and a first delay time required to be prolonged by the retrieving wallet, and the first wallet retrieving address is generated according to the first wallet retrieving structure;
s23: when the first wallet recovery certificate transaction is judged to be a first type transaction requiring delay recovery of the asset, deducting the commission of the first wallet recovery certificate transaction, determining the initial packaging time of the first wallet recovery transaction according to the block packaging time of a second block for packaging the first wallet recovery certificate transaction and the first delay time, and storing the first wallet recovery certificate transaction and the second hash value of the first wallet recovery transaction on a block chain; the method comprises the steps of,
s24: storing the first wallet retrieve transaction locally; the method comprises the steps of,
s25: when the initial packaging time is reached and the latest packaging right of the first block after the initial packaging time is possessed, generating a second wallet retrieving address according to a first wallet retrieving structure in the first wallet retrieving transaction, judging whether the second wallet retrieving address is the same as the address of a first transaction initiator, and judging whether the signature of the first wallet retrieving transaction is matched with the first standby account address in the first wallet retrieving structure in the first wallet retrieving transaction: if the judgment is yes, generating a first block comprising a first wallet retrieving transaction; the method comprises the steps of,
s26: broadcasting the first block to other blockchain nodes for the other blockchain nodes:
generating a third wallet retrieving address according to a first wallet retrieving structure in the first wallet retrieving transaction, judging whether the third wallet retrieving address is identical to the address of a first transaction initiator, judging whether a signature of the first wallet retrieving transaction is matched with the address of a first standby account in the first wallet retrieving structure in the first wallet retrieving transaction, and judging whether the block packing time of a first block is later than the initial packing time: and deleting the local first wallet to retrieve the transaction when the judgment is yes.
The wallet retrieving principle of the foregoing embodiment may refer to the method shown in fig. 1, and will not be described herein.
Preferably, the method further comprises:
receiving an asset extraction transaction including a second hash value generated by a client holding a first primary account address; the second transaction initiator address of the asset extraction transaction is a first wallet retrieving address, the second transaction receiver address of the asset extraction transaction is an asset extraction account address, and the asset extraction transaction comprises a first wallet retrieving structure;
generating a fourth wallet retrieving address according to the first wallet retrieving structure in the asset extraction transaction, judging whether the fourth wallet retrieving address is the same as the second transaction initiator address, judging whether the current block moment does not reach the initial packaging moment, and judging whether the signature of the asset extraction transaction is matched with the first main account address in the first wallet retrieving structure in the asset extraction transaction;
when the judgment is yes, transferring the first asset appointed by the first wallet retrieving transaction from the first wallet retrieving address to the asset extracting account address;
marking the local first wallet retrieving transaction as invalid according to the second hash value; the method comprises the steps of,
the first wallet retrieval transaction is validated while the first wallet retrieval transaction marked as invalid is performed.
It will be appreciated by those skilled in the art that when the transaction recipient address of the asset extraction transaction is the first backup account address, this indicates that the asset is previously committed to the first backup account; when the transaction recipient address of the asset extraction transaction is the first primary account address, withdrawal of the asset to the first primary account is indicated. Either way, the local first wallet retrieve transaction should be marked as a stale transaction;
in more embodiments, the method for executing the invalidated first wallet retrieving transaction may be further configured according to actual requirements, for example, configured to record the transaction hash of the invalidated first wallet retrieving transaction on the blockchain, or delete the local first wallet retrieving transaction, cache the transaction hash of the first wallet retrieving transaction, and mark the transaction hash with the invalidated identifier, where the transaction hash with the invalidated identifier is used to delete the first wallet retrieving transaction when the blockchain node receives the first wallet retrieving transaction again.
The above-described embodiments enable the early confirmation of transfers or withdrawals of assets.
Fig. 3 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
As shown in fig. 3, as another aspect, the present application also provides a computer apparatus including one or more Central Processing Units (CPUs) 301 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 302 or a program loaded from a storage section 308 into a Random Access Memory (RAM) 303. In the RAM303, various programs and data required for the operation of the computer device are also stored. The CPU301, ROM302, and RAM303 are connected to each other through a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
The following components are connected to the I/O interface 305: an input section 306 including a keyboard, a mouse, and the like; an output portion 307 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 308 including a hard disk or the like; and a communication section 309 including a network interface card such as a LAN card, a modem, or the like. The communication section 309 performs communication processing via a network such as the internet. The 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, or the like is installed on the drive 310 as needed, so that a computer program read therefrom is installed into the storage section 308 as needed.
In particular, according to embodiments 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 comprising program code for performing any of the methods described above. In such an embodiment, the computer program may be downloaded and installed from a 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, which may be a computer-readable storage medium contained in the apparatus of the above-described embodiment; or may be a computer-readable storage medium, alone, that is not assembled into a computer device. The computer readable storage medium stores one or more programs for use by one or more processors to perform the methods described herein.
The flowcharts 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, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block 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 will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present application may be implemented by software, or may be implemented by hardware. The described units or modules may also be provided in a processor, for example, each of the units may be a software program provided in a computer or a mobile smart device, or may be separately configured hardware devices. Wherein the names of the units or modules do not in some cases constitute a limitation of the units or modules themselves.
The foregoing description is only of the preferred embodiments of the present application and is presented as a description of the principles of the technology being utilized. It will be appreciated by persons skilled in the art that the scope of the invention referred to in this application is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or their equivalents without departing from the spirit of the application. Such as the above-described features and technical features having similar functions (but not limited to) disclosed in the present application are replaced with each other.

Claims (11)

1. A wallet retrieving method adapted for use with a client having a first alternate account address, the method comprising:
responding to the loss of a private key corresponding to a first main account address of a current user, generating a first wallet retrieving structure according to the first main account address, the first standby account address and a first delay time, and generating a first wallet retrieving address according to the first wallet retrieving structure;
generating a first wallet retrieve transaction; the first wallet retrieving structure body is used for retrieving the first wallet, wherein a first transaction initiator address of the first wallet retrieving transaction is the first wallet retrieving address, a first transaction receiver address of the first wallet retrieving transaction is the first standby account address, and the first wallet retrieving transaction comprises the first wallet retrieving structure body;
generating a first wallet retrieving certificate transaction according to the first wallet retrieving transaction; wherein the payload field of the first wallet retrieving the deposit card transaction includes the first wallet retrieving the transaction;
transmitting the first wallet retrieve proof transaction to a blockchain network for a blockchain node to:
when the first wallet recovery certificate transaction is judged to be a first type transaction requiring delay recovery of the asset, deducting the handling fee of the first wallet recovery certificate transaction, determining the initial packaging time of the first wallet recovery transaction according to the block packaging time of a second block for packaging the first wallet recovery certificate transaction and the first delay time, and storing the first wallet recovery certificate transaction and a second hash value of the first wallet recovery transaction on a blockchain; the method comprises the steps of,
storing the first wallet retrieve transaction locally; the method comprises the steps of,
when the initial packaging time is reached and the latest packaging right of the first block after the initial packaging time is owned, generating a second wallet retrieving address according to the first wallet retrieving structure in the first wallet retrieving transaction, judging whether the second wallet retrieving address is the same as the first transaction initiator address, and judging whether the signature of the first wallet retrieving transaction is matched with the first standby account address in the first wallet retrieving structure in the first wallet retrieving transaction: if the judgment is yes, generating a first block comprising the first wallet retrieving transaction; the method comprises the steps of,
broadcasting the first block to other blockchain nodes for other blockchain nodes:
generating a third wallet retrieving address according to the first wallet retrieving structure in the first wallet retrieving transaction, judging whether the third wallet retrieving address is the same as the first transaction initiator address, judging whether the signature of the first wallet retrieving transaction is matched with the first standby account address in the first wallet retrieving structure in the first wallet retrieving transaction, and judging whether the block packing time of the first block is later than the initial packing time: and deleting the local first wallet to find out the transaction when the judgment is yes.
2. The method of claim 1, wherein said depositing the first wallet recovery certificate transaction, the second hash value of the first wallet recovery transaction, onto a blockchain comprises:
depositing the first wallet recovery certificate transaction, and a first corresponding relation between a first hash value and the second hash value of the first wallet recovery certificate transaction on a blockchain;
the determining whether the second wallet retrieve address is the same as the first transaction initiator address comprises:
judging whether the second wallet retrieving address is the same as the first transaction initiator address, searching whether the first wallet retrieving certificate transaction exists on a blockchain according to the first corresponding relation, and judging whether the searched first wallet retrieving certificate transaction is the first type transaction;
the determining whether the third wallet retrieve address is the same as the first transaction initiator address comprises:
and judging whether the third wallet retrieving address is the same as the first transaction initiator address, searching whether the first wallet retrieving certificate transaction exists on the blockchain according to the first corresponding relation, and judging whether the searched first wallet retrieving certificate transaction is the first type transaction.
3. The method of claim 1, wherein the generating a first block comprising the first wallet retrieving a transaction comprises:
generating a first block comprising the first wallet retrieve transaction;
transferring a first asset specified by the first wallet retrieve transaction from the first wallet retrieve address to the first alternate account address;
the deleting the local first wallet retrieving transaction includes:
transferring a first asset specified by the first wallet retrieve transaction from the first wallet retrieve address to the first alternate account address;
deleting the local first wallet to retrieve the transaction.
4. A method according to any one of claims 1-3, wherein the storing the first wallet retrieval transaction locally comprises:
storing the first wallet transaction locally;
the first wallet retrieval transaction is sent to a first number of other blockchain nodes for storage of the first wallet retrieval transaction.
5. A wallet retrieving method adapted for use with blockchain nodes, the method comprising:
receiving a first wallet retrieving the deposit card transaction; the method comprises the steps that a payload field of a first wallet retrieving certificate transaction comprises a first wallet retrieving transaction, the first wallet retrieving certificate transaction is generated according to the first wallet retrieving transaction, the first wallet retrieving certificate transaction and the first wallet retrieving transaction are generated by a client with a first standby account address, the first wallet retrieving transaction comprises a first wallet retrieving structure, a first transaction initiator address of the first wallet retrieving transaction is a first wallet retrieving address, a first transaction receiver address of the first wallet retrieving transaction is the first standby account address, the first wallet retrieving structure is generated according to a first main account address of a first user, a first standby account address of the first user and a first delay time of the wallet needing to be extended, and the first wallet retrieving address is generated according to the first wallet retrieving structure;
when the first wallet recovery certificate transaction is judged to be a first type transaction requiring delay recovery of the asset, deducting the handling fee of the first wallet recovery certificate transaction, determining the initial packaging time of the first wallet recovery transaction according to the block packaging time of a second block for packaging the first wallet recovery certificate transaction and the first delay time, and storing the first wallet recovery certificate transaction and a second hash value of the first wallet recovery transaction on a blockchain; the method comprises the steps of,
storing the first wallet retrieve transaction locally; the method comprises the steps of,
when the initial packaging time is reached and the latest packaging right of the first block after the initial packaging time is owned, generating a second wallet retrieving address according to the first wallet retrieving structure in the first wallet retrieving transaction, judging whether the second wallet retrieving address is the same as the first transaction initiator address, and judging whether the signature of the first wallet retrieving transaction is matched with the first standby account address in the first wallet retrieving structure in the first wallet retrieving transaction: if the judgment is yes, generating a first block comprising the first wallet retrieving transaction; the method comprises the steps of,
broadcasting the first block to other blockchain nodes for other blockchain nodes:
generating a third wallet retrieving address according to the first wallet retrieving structure in the first wallet retrieving transaction, judging whether the third wallet retrieving address is the same as the first transaction initiator address, judging whether the signature of the first wallet retrieving transaction is matched with the first standby account address in the first wallet retrieving structure in the first wallet retrieving transaction, and judging whether the block packing time of the first block is later than the initial packing time: and deleting the local first wallet to find out the transaction when the judgment is yes.
6. The method of claim 5, wherein said depositing the first wallet recovery certificate transaction, the second hash value of the first wallet recovery transaction onto a blockchain comprises:
depositing the first wallet recovery certificate transaction, and a first corresponding relation between a first hash value and the second hash value of the first wallet recovery certificate transaction on a blockchain;
the determining whether the second wallet retrieve address is the same as the first transaction initiator address comprises:
judging whether the second wallet retrieving address is the same as the first transaction initiator address, searching whether the first wallet retrieving certificate transaction exists on a blockchain according to the first corresponding relation, and judging whether the searched first wallet retrieving certificate transaction is the first type transaction;
the determining whether the third wallet retrieve address is the same as the first transaction initiator address comprises:
and judging whether the third wallet retrieving address is the same as the first transaction initiator address, searching whether the first wallet retrieving certificate transaction exists on the blockchain according to the first corresponding relation, and judging whether the searched first wallet retrieving certificate transaction is the first type transaction.
7. The method of claim 5, wherein the generating a first block comprising the first wallet retrieving a transaction comprises:
generating a first block comprising the first wallet retrieve transaction;
transferring a first asset specified by the first wallet retrieve transaction from the first wallet retrieve address to the first alternate account address;
the deleting the local first wallet retrieving transaction includes:
transferring a first asset specified by the first wallet retrieve transaction from the first wallet retrieve address to the first alternate account address;
deleting the local first wallet to retrieve the transaction.
8. The method as recited in claim 5, further comprising:
receiving an asset extraction transaction generated by a client holding a first primary account address that includes the second hash value; the second transaction initiator address of the asset extraction transaction is the first wallet retrieving address, the second transaction receiver address of the asset extraction transaction is the asset extraction account address, and the asset extraction transaction comprises the first wallet retrieving structure;
generating a fourth wallet retrieving address according to the first wallet retrieving structure in the asset extraction transaction, judging whether the fourth wallet retrieving address is the same as the second transaction initiator address, judging whether the current block moment does not reach the initial packaging moment, and judging whether the signature of the asset extraction transaction is matched with the first main account address in the first wallet retrieving structure in the asset extraction transaction;
when the judgment is yes, transferring the first asset appointed by the first wallet retrieving transaction from the first wallet retrieving address to the asset extracting account address;
marking the local first wallet recovery transaction as invalid according to the second hash value; the method comprises the steps of,
and when the first wallet recovery transaction marked as invalid is executed, the first wallet recovery transaction is stored.
9. The method of any of claims 5-8, wherein storing the first wallet retrieval transaction locally comprises:
storing the first wallet retrieve transaction locally;
the first wallet retrieval transaction is sent to a first number of other blockchain nodes for storage of the first wallet retrieval transaction.
10. A computer device, the device comprising:
one or more processors;
a memory for storing one or more programs,
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-9.
11. A storage medium storing a computer program, characterized in that the program, when executed by a processor, implements the method according to any one of claims 1-9.
CN202110881834.8A 2021-08-02 2021-08-02 Wallet retrieving method, computer device and storage medium Active CN113592485B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110881834.8A CN113592485B (en) 2021-08-02 2021-08-02 Wallet retrieving method, computer device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110881834.8A CN113592485B (en) 2021-08-02 2021-08-02 Wallet retrieving method, computer device and storage medium

Publications (2)

Publication Number Publication Date
CN113592485A CN113592485A (en) 2021-11-02
CN113592485B true CN113592485B (en) 2023-05-30

Family

ID=78253854

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110881834.8A Active CN113592485B (en) 2021-08-02 2021-08-02 Wallet retrieving method, computer device and storage medium

Country Status (1)

Country Link
CN (1) CN113592485B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110288346A (en) * 2019-06-28 2019-09-27 杭州复杂美科技有限公司 Block chain distributed storage method for down loading, equipment and storage medium
WO2020010926A1 (en) * 2018-07-13 2020-01-16 山东小岛网络科技有限公司 Blockchain credit or digital certificate-based financing mode method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020010926A1 (en) * 2018-07-13 2020-01-16 山东小岛网络科技有限公司 Blockchain credit or digital certificate-based financing mode method
CN110288346A (en) * 2019-06-28 2019-09-27 杭州复杂美科技有限公司 Block chain distributed storage method for down loading, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
区块链技术综述;张亮;刘百祥;张如意;江斌鑫;刘一江;;计算机工程(第05期);全文 *

Also Published As

Publication number Publication date
CN113592485A (en) 2021-11-02

Similar Documents

Publication Publication Date Title
KR101781583B1 (en) File management and search system based on block chain and file management and search method
CN101009516B (en) A method, system and device for data synchronization
CN113094396B (en) Data processing method, device, equipment and medium based on node memory
CN113570466B (en) Transaction data processing method and device and readable storage medium
WO2018207064A1 (en) Systems and Methods For Parallel Verification of Blockchain Transactions
US9952940B2 (en) Method of operating a shared nothing cluster system
CN109447641B (en) Method and apparatus for transmitting blockchain data to blockchain browser
CN105812351A (en) Method and system for sharing session
CN110060161B (en) Client service implementation method and service assembly for block chain transaction repetition prevention
WO2001071523A1 (en) Transparent user and session management for web applications
CN112583811B (en) Wallet finding method, equipment and storage medium
US11494403B2 (en) Method and apparatus for storing off-chain data
CN113568981B (en) Transaction data processing method, device, equipment and medium
CN113542402A (en) File transmission method, device, system, electronic equipment and storage medium
WO2023011019A1 (en) Blockchain-based data processing method and apparatus, device, readable storage medium and computer program product
CN113592485B (en) Wallet retrieving method, computer device and storage medium
CN111865969B (en) Secure transmission method and system suitable for financial information
CN113409047A (en) Data processing method, device and equipment based on block chain and readable storage medium
CN113592653B (en) Proxy delay transaction method, computer device and storage medium
WO2023142605A1 (en) Blockchain-based data processing method and related apparatus
US20060288212A1 (en) Transparent user and session management for web applications
CN113592652B (en) Delay transaction method, computer device and storage medium
CN116977067A (en) Block chain-based data processing method, device, equipment and readable storage medium
US20220005025A1 (en) Distributed ledger management system, distributed ledger management method, and node
CN116701452A (en) Data processing method, related device, storage medium and program product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant