CN117670352A - Account management method, device, medium and electronic equipment - Google Patents

Account management method, device, medium and electronic equipment Download PDF

Info

Publication number
CN117670352A
CN117670352A CN202211013015.2A CN202211013015A CN117670352A CN 117670352 A CN117670352 A CN 117670352A CN 202211013015 A CN202211013015 A CN 202211013015A CN 117670352 A CN117670352 A CN 117670352A
Authority
CN
China
Prior art keywords
account
transaction
current account
node
blockchain
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.)
Pending
Application number
CN202211013015.2A
Other languages
Chinese (zh)
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202211013015.2A priority Critical patent/CN117670352A/en
Publication of CN117670352A publication Critical patent/CN117670352A/en
Pending legal-status Critical Current

Links

Landscapes

  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The application belongs to the technical field of blockchains, and particularly relates to an account management method, an account management device, a computer readable medium, electronic equipment and a computer program product. The account management method in the embodiment of the application comprises the following steps: freezing a current account when a first number of blockchain nodes initiate a freeze transaction for the current account; when a second number of authority nodes initiate unfreezing transaction for the current account, transferring the resources stored in the current account to a target account with the same main body attribution as the current account, wherein the second number is larger than the first number, and the authority nodes are blockchain nodes with auditing authorities for the main body attribution. The method and the device can improve the security of account management on the blockchain.

Description

Account management method, device, medium and electronic equipment
Technical Field
The application belongs to the technical field of blockchains, and particularly relates to an account management method, an account management device, a computer readable medium, electronic equipment and a computer program product.
Background
The blockchain is widely applied to the services of decentralized resource conservation, transaction and the like, the account management on the blockchain at present generally adopts a client program to carry out private key conservation, and once the private key is lost or revealed, the problems that a resource account cannot be lost, resources are difficult to recover and the like exist in a decentralized scene, and the security of account management is poor.
Disclosure of Invention
An object of the present application is to provide an account management method, an account management apparatus, a computer readable medium, an electronic device, and a computer program product for improving security of account management on a blockchain.
Other features and advantages of the present application will be apparent from the following detailed description, or may be learned in part by the practice of the application.
According to an aspect of the embodiments of the present application, there is provided an account management method, including:
freezing a current account when a first number of blockchain nodes initiate a freeze transaction for the current account;
when a second number of authority nodes initiate unfreezing transaction for the current account, transferring the resources stored in the current account to a target account with the same main body attribution as the current account, wherein the second number is larger than the first number, and the authority nodes are blockchain nodes with auditing authorities for the main body attribution.
According to an aspect of an embodiment of the present application, there is provided an account management apparatus, including:
a freeze module configured to freeze a current account when a first number of blockchain nodes initiate a freeze transaction for the current account;
And the thawing module is configured to transfer the resources stored in the current account to a target account with the same subject attribution as the current account when a second number of authority nodes initiate thawing transactions for the current account, wherein the second number is greater than the first number, and the authority nodes are blockchain nodes with auditing authorities for the subject attribution.
In some embodiments of the present application, based on the above technical solutions, the freezing module includes:
a freeze request module configured to obtain account freeze requests sent to a first number of blockchain nodes;
a freeze initiation module configured to initiate a freeze transaction for the current account according to the account freeze request and broadcast the freeze transaction over a blockchain network;
an account freeze module configured to freeze the current account on each blockchain node of the blockchain network according to the freeze transaction.
In some embodiments of the present application, based on the above technical solutions, the account freezing module includes:
the transaction analysis module is configured to analyze the frozen transaction to obtain frozen information of the current account, wherein the frozen information comprises an account identifier of the current account and a frozen identifier, and the frozen identifier is used for indicating that the current account is in a frozen state;
And the freezing information writing module is configured to write the freezing information into an intelligent contract, and the intelligent contract is used for providing inquiry service of account freezing state for each blockchain node of the blockchain network.
In some embodiments of the present application, based on the above technical solution, the account freezing module further includes:
the freezing information inquiry module is configured to call an inquiry interface of the intelligent contract to inquire the freezing information of the current account when a resource transfer request for the current account is received; the resource transfer request is used for indicating to transfer in or out resources to the current account;
the freeze information analysis module is configured to analyze the freeze information of the current account to obtain a freeze identifier of the current account;
the first execution module is configured to refuse to execute the resource transfer request if the freeze identifier of the current account indicates that the current account is in a frozen state;
and the second execution module is configured to transfer in or out resources to the current account according to the resource transfer request if the freeze identifier of the current account indicates that the current account is in an unfrozen state.
In some embodiments of the present application, based on the above technical solution, the freeze information writing module includes:
a node identification acquisition module configured to acquire a node identification of a blockchain node that initiated the frozen transaction;
the authority node judging module is configured to determine whether the blockchain node initiating the frozen transaction is an authority node according to the node identification;
and the intelligent contract writing module is configured to write the freezing information into the intelligent contract if the blockchain node initiating the freezing transaction is an authority node.
In some embodiments of the present application, based on the above technical solutions, the freeze-initiation module includes:
the freezing request analysis module is configured to analyze the account freezing request to obtain an account identifier of the current account and identity information of a freezing requester;
an identity verification module configured to verify whether the freeze requester is an account principal of the current account according to identity information of the freeze requester;
a freeze information establishing module configured to establish freeze information of the current account when verifying that the freeze requester is an account body of the current account, the freeze information including an account identifier of the current account and a freeze identifier, the freeze identifier being used to indicate that the current account is in a frozen state;
And the frozen information encryption module is configured to sign the frozen information to obtain frozen transactions aiming at the current account.
In some embodiments of the present application, based on the above technical solutions, the thawing module includes:
the thawing request module is configured to acquire account thawing requests sent to a third number of authority nodes, and the third number is larger than the second number;
a defrost initiation module configured to initiate a defrost transaction for the current account according to the account defrost request and broadcast the defrost transaction over a blockchain network;
an account acquisition module configured to acquire a target account having the same subject attribution as the current account according to the thawing transaction;
and the resource transfer module is configured to transfer the resources stored in the current account to the target account.
In some embodiments of the present application, based on the above technical solutions, the account obtaining module includes:
the freezing information inquiry module is configured to call an inquiry interface of the intelligent contract according to the thawing transaction, and inquire to obtain freezing information associated with the current account;
and the frozen information analysis module is configured to analyze the frozen information to obtain a target account with the same subject attribution as the current account.
In some embodiments of the present application, based on the above technical solutions, the thawing module further includes:
the node identification acquisition module is configured to acquire the node identification of the blockchain node initiating the unfreezing transaction when the unfreezing transaction broadcasted on the blockchain network is received;
the permission node judging module is configured to determine whether the blockchain node initiating the thawing transaction is a permission node according to the node identification of the blockchain node initiating the thawing transaction;
the node quantity updating module is configured to update the node quantity of the authority nodes for initiating the thawing transaction on the current account according to the node identification if the blockchain node initiating the thawing transaction is the authority node;
and the node number writing module is configured to write the updated node number into an intelligent contract, and the intelligent contract is used for determining whether to execute the unfreezing transaction according to the node number.
In some embodiments of the present application, based on the above technical solution, the resource transfer module is further configured to:
acquiring the node number of authority nodes initiating thawing transaction to the current account;
and when the number of the nodes is larger than the second number, transferring the resources stored in the current account to the target account.
In some embodiments of the present application, based on the above technical solution, the resource transfer module is further configured to:
invoking a query interface of the intelligent contract to query and obtain freezing information associated with the current account;
and analyzing the freezing information to obtain the node number of the authority nodes for initiating the thawing transaction to the current account.
According to an aspect of the embodiments of the present application, there is provided a computer readable medium having stored thereon a computer program which, when executed by a processor, implements an account management method as in the above technical solution.
According to an aspect of the embodiments of the present application, there is provided an electronic device including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the account management method as in the above technical solution via execution of the executable instructions.
According to an aspect of the embodiments of the present application, there is provided a computer program product comprising a computer program which, when executed by a processor, implements an account management method as in the above technical solution.
In some embodiments of the present application, the computer program product or computer program includes computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions so that the computer device performs the account management method as in the above technical solution.
In the technical scheme provided by the embodiment of the application, the freezing transaction for the current account is initiated through the first number of blockchain nodes, so that the real-time quick freezing of the account can be realized, and the timeliness of account freezing is improved; the thawing permission of the current account can be controlled by initiating thawing transaction of the current account through the permission nodes which reach the second number and exceed the first number, so that the problem that the account is wrongly thawed due to the disuse of a small number of nodes is avoided; the timeliness of account freezing and authority control of account thawing can improve the safety of account management on a blockchain.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application. It is apparent that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained from these drawings without inventive effort for a person of ordinary skill in the art.
FIG. 1 illustrates a schematic composition of a blockchain system in an embodiment of the present application.
FIG. 2 illustrates the constituent structure of a blockchain maintained on a blockchain network.
Fig. 3 shows a network architecture of a blockchain network to which the technical scheme of the present application is applied.
FIG. 4 illustrates a flow chart of steps of a method of account management in one embodiment of the present application.
FIG. 5 illustrates a flow chart of a method of freezing an account in one embodiment of the present application.
FIG. 6 illustrates an interactive flow diagram for freezing accounts based on smart contracts in one embodiment of the present application.
FIG. 7 illustrates an interactive flow diagram for freezing accounts based on account identity verification in one embodiment of the present application.
FIG. 8 illustrates an interactive flow diagram for transferring account resources based on smart contracts in one embodiment of the present application.
FIG. 9 illustrates an interactive flow diagram for thawing an account based on a smart contract in one embodiment of the present application.
FIG. 10 illustrates an interactive flow diagram for thawing an account according to the determination of a rights node in one embodiment of the present application.
Fig. 11 is a schematic diagram of a process of performing account freezing in an application scenario according to an embodiment of the present application.
Fig. 12 is a schematic diagram of a process of performing account thawing in an application scenario according to an embodiment of the present application.
Fig. 13 schematically shows a block diagram of an account management apparatus provided in an embodiment of the present application.
Fig. 14 schematically illustrates a block diagram of a computer system suitable for use in implementing embodiments of the present application.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the present application. One skilled in the relevant art will recognize, however, that the aspects of the application can be practiced without one or more of the specific details, or with other methods, components, devices, steps, etc. In other instances, well-known methods, devices, implementations, or operations are not shown or described in detail to avoid obscuring aspects of the application.
The block diagrams depicted in the figures are merely functional entities and do not necessarily correspond to physically separate entities. That is, the functional entities may be implemented in software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
The flow diagrams depicted in the figures are exemplary only, and do not necessarily include all of the elements and operations/steps, nor must they be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the order of actual execution may be changed according to actual situations.
In particular embodiments of the present application, related data such as requests, responses, etc. generated when a user applies a blockchain product are referred to, and when various embodiments of the present application are applied to a particular product or technology, user permissions or consents need to be obtained, and the collection, use, and processing of the related data is required to comply with relevant laws and regulations and standards of the relevant country and region.
Technical terms related to blockchain are referred to in the detailed description of the present application, which is explained as follows.
Blockchain: is a fake-proof, tamper-proof and traceable shared digital ledger with block chained data structure (charged-block data structure) built by transparent and trusted rules in a peer-to-peer network environment. A block chain data structure is a data structure in which transactions occurring over a period of time are stored in blocks, and the blocks are chronologically connected into a chain by a cryptographic algorithm. The ledger is distributed to all member nodes in the network, and the history of asset transactions occurring between peer nodes in the network is permanently recorded in a sequential chain of blocks linked by a hash cryptographic algorithm. All validated and verified transactions are linked from the first linear chain of chains to the most current block, thus denominating a blockchain. The blockchain may act as a single source of facts and members of the blockchain network can only view transactions that are related to them.
Intelligent contract: a computer program running on a blockchain that is capable of automatically executing contractual terms has event driven, value transfer, automatic execution, and the like features. Is a set of digitally defined commitments that include agreements that the contract participants can perform on the blockchain. Intelligent contracts are generally classified into system contracts and user contracts. The system contracts are embedded in the bottom layer codes of the blockchain and have specific operation modes and authorities, so that users cannot change and can only call the system contracts. The user contracts are written by the user and issued to the blockchain, and are executed by the virtual machine in charge, so that the user contracts have strict authority control.
Transaction: the basic unit of adding and deleting operations on the ledger in the blockchain is that a plurality of transactions are packed into blocks. The transaction comprises at least attributes of transaction sponsor, operation, sponsor signature, etc., and for blockchains supporting intelligent contracts, the operation is generally to call a contract method.
A transaction pool: the buffer space of unpacked transaction list is stored in the block chain node, after the node receives the transaction sent on the network, the node verifies the validity and the existence of the transaction, and if the transaction is legal and does not exist locally, the node puts the transaction into a transaction pool. After receiving a new block, the node verifies the validity of the block, and after verification, not only the local account book needs to be updated, but also the transaction contained in the new block needs to be deleted from the transaction pool.
Full node: the method refers to maintaining the complete node of the blockchain, can independently complete packaging, verification and the like of the transaction, and processes the read-write request of the client to the intelligent contract state.
Fig. 1 illustrates a schematic diagram of the components of a blockchain system in an embodiment of the present application, the blockchain system 100 may include at least one client 110 and a blockchain network 120, the blockchain network 120 including at least one blockchain node 121. The client 110 may be various electronic devices such as a smart phone, a tablet computer, a notebook computer, a desktop computer, an intelligent wearable device, an intelligent vehicle-mounted device, an intelligent payment terminal, a face recognition terminal, etc., and may provide a blockchain data service to a user by installing a corresponding client application program. The blockchain node 121 may be a terminal device or a server, for example, the blockchain node 121 may be an independent physical server, or may be a server cluster formed by a plurality of physical servers, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, and basic cloud computing services such as big data and artificial intelligence platforms.
In the blockchain network 120, each blockchain node 121 may receive input information during normal operation and maintain shared data within the blockchain network based on the received input information. To ensure information interworking, there may be information connections between the various blockchain nodes 121, and the various blockchain nodes 121 may communicate information with each other via the information connections. For example, when any blockchain node 121 in the blockchain network 120 receives input information and broadcasts the input information in the blockchain network 120, other node devices in the blockchain network 120 may obtain the input information according to a consensus algorithm and store the input information as shared data.
For each blockchain node 121 in the blockchain network 120, there is a node identification corresponding thereto, and each blockchain node 121 in the blockchain network 120 may store node identifications of other blockchain nodes in the same blockchain network for subsequent broadcasting of the generated block to other nodes in the blockchain network 120 based on the node identifications of the other blockchain nodes. The blockchain node 121 may maintain a node identifier list as shown in table 1, and store the node name and the node identifier in the node identifier list. The node identifier may be an IP (Internet Protocol, protocol of interconnection between networks) address and any other information that can be used to identify the node, and table 1 is a list of node identifiers for example of IP addresses.
TABLE 1
FIG. 2 illustrates the constituent structure of a blockchain maintained on a blockchain network. As shown in fig. 2, the blockchain is composed of a plurality of blocks connected in sequence, and whenever new data needs to be written into the blockchain, the data is summarized into a newly generated block, the newly generated block is linked to the end of the blockchain, and the newly added block on each node device 121 can be guaranteed to be identical through a consensus algorithm. The data of the current block is recorded in the block body of each block, and the Hash value (Hash) of the previous block connected with the current block is stored in the block head of each block, and if the transaction data in the previous block changes, the Hash value of the current block also changes. Therefore, the data uploaded into the blockchain network is difficult to tamper, and the reliability of the shared data can be improved.
Fig. 3 schematically illustrates a network architecture of a blockchain network to which the technical solution of the present application is applied. As shown in fig. 3, in an application scenario implementing network transactions and network payments, a transaction agent node 310, a transaction platform node 320, and a resource allocation node 330 located in a blockchain network collectively maintain one or more blockchains 340.
Transaction agent node 310 is a blockchain node that provides transaction services to users, and may be, for example, a merchant or personal seller that performs network transactions with users.
Transaction platform node 320 is a blockchain node that provides a transaction scenario for a network transaction, and may be, for example, an e-commerce website, a network mall, or various business platforms that provide network transaction services.
The resource allocation node 330 is a blockchain node that provides funds management and allocation services for network transactions, and may be, for example, a third party payment authority.
When a user performs a network transaction with the transaction subject node 310, the transaction subject node 310 may be paid for transaction funds through an account opened on the resource allocation node 330, and the transaction platform node 320 acts as a provider of the transaction scenario, requiring a certain amount of funds to be extracted from the transaction funds as platform service fees. To enable trusted funds distribution between the transaction agent node 310 and the transaction platform node 320, a corresponding intelligent contract (e.g., a ledger contract) may be made for funds distribution based on the blockchain network, and when a network transaction is generated, the resource distribution node 330 may distribute funds to various objects in the transaction scenario according to the intelligent contract.
To ensure the validity and credibility of contracts, both the process data and the result data of contracts may be stored in the uplink through blockchain 340, and the de-centralized contracts and data storage may effectively avoid trust crisis.
The following describes in detail the account management method, the account management device, the computer readable medium, the electronic device, the computer program product and other technical schemes provided in the present application with reference to the specific embodiments.
FIG. 4 illustrates a flow chart of steps of an account management method that may be performed by the client or blockchain node shown in FIG. 1 in one embodiment of the present application, which is illustrated by way of example as an account management method performed on a blockchain node. As shown in fig. 4, the account management method in the embodiment of the present application includes the following steps S410 to S420.
S410: when a first number of blockchain nodes initiate a freeze transaction for a current account, the current account is frozen.
A user may send an account freeze request to at least one blockchain node in the blockchain network through a client application installed on any terminal device such as a mobile phone, a computer, etc., where the account freeze request is used to instruct the blockchain node to initiate a freeze transaction on a current account held by the user.
The first number is a preset number having a value greater than or equal to 1, for example, when the first number has a value of 1, if any one of the blockchain nodes in the blockchain network initiates a freeze transaction for the current account, the current account may be frozen by performing the freeze transaction.
In some alternative embodiments, when a blockchain link point initiates a frozen transaction, the frozen transaction may be broadcast to some or all of the blockchain nodes on the blockchain network. The blockchain node that received the frozen transaction may keep the current account in a frozen state by performing the frozen transaction.
An account in a frozen state cannot perform a transfer-in or transfer-out operation of a resource.
S420: when the second number of authority nodes initiates thawing transaction for the current account, transferring the resources stored in the current account to a target account with the same main body attribution as the current account, wherein the second number is larger than the first number, and the authority nodes are blockchain nodes with auditing authorities for the main body attribution.
A user can send an account thawing request to at least two authority nodes in the blockchain network through a client application program installed on any terminal equipment such as a mobile phone, a computer and the like, wherein the account thawing request is used for indicating the blockchain node to initiate thawing transaction on a current account held by the user.
The second number is a preset number having a value greater than or equal to 2, and the second number has a value greater than the first number. For example, when the second number value is N, if the number of authority nodes in the blockchain network that initiate a defrost transaction for the current account reaches or exceeds N, the frozen state of the current account may be relieved by performing the defrost transaction. And if the number of authority nodes in the blockchain network for initiating the unfreezing transaction for the current account is less than N, refusing to execute the unfreezing transaction so that the current account continues to keep in a frozen state.
The method for releasing the frozen state of the current account is to transfer the resources stored in the current account to a target account with the same subject attribution as the current account. The target account and the current account belong to the same account main body, for example, when the account main body sends an account freezing request for the current account to at least one blockchain node, the blockchain node receiving the account freezing request can create a new target account for the account main body, and the target account is used for receiving resources stored in the current account after the current account is in a frozen state.
In the account management method provided by the embodiment of the application, the frozen transaction aiming at the current account is initiated through the first number of blockchain nodes, so that the real-time quick freezing of the account can be realized, and the timeliness of account freezing is improved; the thawing permission of the current account can be controlled by initiating thawing transaction of the current account through the permission nodes which reach the second number and exceed the first number, so that the problem that the account is wrongly thawed due to node disuse is avoided; the timeliness of account freezing and authority control of account thawing can improve the safety of account management on a blockchain.
The blockchain network in embodiments of the present application may include any of a public chain (Public Block Chain), a private chain (Private Block Chain), or a federated chain (Consortium Block Chain). Among them, the highest degree of decentralization is the public chain. Nodes/participants joining the public chain can read the data on the chain, issue transactions, compete for accounting rights of the new block, etc.; moreover, each node/participant is free to join and leave the public chain. The private chain is opposite, the accounting authority of the private chain is controlled by a certain organization or organization, the data reading authority is also controlled by the organization or organization, and the participants are less and can not join the private chain at will, so that the organization or organization needs to audit. The federated chain, also referred to as a community blockchain, refers to a blockchain whose consensus process is controlled by preselected nodes, which is a mix of public and private chains that can achieve "partial decentralization". Each node on the chain typically has an entity mechanism or organization corresponding to it; participants join the network by authorization and form a benefit-related federation, collectively maintaining blockchain operation. Through the coalition chain, new participants can join the formed blockchain and share data without having to build it from scratch.
FIG. 5 illustrates a flow chart of a method of freezing an account in one embodiment of the present application. The method of freezing accounts may be performed by the client or blockchain node shown in fig. 1, and embodiments of the present application are illustrated with the method performed on the blockchain node as an example. As shown in fig. 5, the method for freezing an account in the embodiment of the present application includes the following steps S510 to S530.
S510: an account freeze request sent to a first number of blockchain nodes is obtained.
The account body may send an account freeze request for the current account to at least one blockchain node via the client, the account freeze request being for instructing the blockchain node to initiate a freeze transaction for the current account.
In some alternative embodiments, the account principal may send an account freeze request to a designated blockchain link that holds its principal identity information, which may conduct an identity verification on the account principal based on the principal identity information maintained on the node. The principal identity information may be information that can be used for identity verification, such as identification card information of the user, mobile phone number information, and the like.
In some optional embodiments, the account principal may send an account freeze request to any blockchain link in the blockchain network, and if the blockchain node holds principal identity information of the account principal, the identity verification may be directly performed on the account principal; if the blockchain node does not hold the principal identity information of the account principal, the account freeze request may be forwarded to a designated blockchain node that holds the principal identity information of the account principal.
S520: and initiating a frozen transaction for the current account according to the account freezing request, and broadcasting the frozen transaction on the blockchain network.
In some optional embodiments, the account freeze request is parsed to obtain the account identifier of the current account and the identity information of the freeze requester; the account identification is a unique identification for indicating one account, and may be address information of an account, for example. Verifying whether the freezing requesting party is an account main body of the current account according to the identity information of the freezing requesting party; the identity information is proof information for identifying the identity of the subject, and may be, for example, an identification card number, a mobile phone number or biometric information of the user. When verifying that the freezing requesting party is an account main body of the current account, establishing freezing information of the current account, wherein the freezing information comprises an account identifier of the current account and a freezing identifier, and the freezing identifier is used for indicating that the current account is in a freezing state; and carrying out signature processing on the frozen information to obtain frozen transaction aiming at the current account.
S530: according to the freeze transaction, the current account is frozen at each blockchain node of the blockchain network.
By broadcasting the frozen transaction, a common uplink to the frozen transaction may be completed on each blockchain node of the blockchain network.
The blockchain nodes in the blockchain network may each maintain a transaction buffer pool for holding various transaction data generated on the blockchain network. Whenever a frozen transaction is generated or received by a blockchain link point, the frozen transaction may be saved in a transaction buffer pool awaiting uplink.
Each block constituting the block chain includes a block header and a block body for storing all data recorded in the current block. The block header is used for storing the link information of the current block and the last block, and all the blocks can be linked one by one to form a complete block chain by utilizing the data stored in the block header. When the block generation condition is satisfied, the frozen transaction package stored in the transaction buffer pool can be written into the block body of the current block to be uplinked. Meanwhile, the block head data of the last block (namely the newly generated new block) in the block chain network can be obtained, and the father block characteristic value of the current block can be calculated according to the block head data. For example, the SHA256 algorithm may be used to hash the block header data of the previous block to obtain a hash value, which is used as the parent block characteristic value of the current block. The block generation condition may be that the generation time of the last block reaches a specified time threshold, or that the data stored in the transaction buffer pool reaches a specified data volume threshold, or other preset conditions for triggering generation of a new block, which is not particularly limited in the embodiment of the present application.
According to the data stored in the block body, a hash value can be obtained as the block body characteristic value of the current block. Taking hash coding as an example, all data in a region block may be saved in the region block in the form of a merck Tree (Merkle Tree). Specifically, the data can be stored in leaf nodes of the merck tree, and the hash operation is performed again after the data stored in every two adjacent leaf nodes are combined, so that the hash value stored in one child node can be obtained. By adopting the mode of carrying out hash operation on the hash values stored by the child nodes layer by layer in a pairwise combination way, a root node hash value can be finally obtained, and the root node hash value can be used as the block body characteristic value of the current block.
After the parent block characteristic value and the block body characteristic value are respectively calculated, a time stamp can be generated according to the current time, and the time stamp is used for recording the generation time of the current block. The parent block characteristic value, the block body characteristic value, and the timestamp may then be stored together in the block header of the current block. Broadcasting the current block consisting of the block header and the block body to a block chain network for consensus authentication. After passing the consensus authentication, all or part of block chain link points in the block chain network are used for storing the current block, namely, the process of the current block in the block chain is completed.
FIG. 6 illustrates an interactive flow diagram for freezing accounts based on smart contracts in one embodiment of the present application, the interactive flow being performed in concert by the client and block link points shown in FIG. 1. As shown in fig. 6, the interactive flow based on the smart contract freezing account in the embodiment of the present application includes the following steps S610 to S640.
S610: the client sends an account freeze request to a first number of blockchain nodes.
The account body may send an account freeze request for the current account to at least one blockchain node via the client, the account freeze request being for instructing the blockchain node to initiate a freeze transaction for the current account.
In some alternative embodiments, the account principal may send an account freeze request to a first number of authority nodes, which are blockchain nodes having audit authority for principal attribution of the account, through the client.
S620: when the blockchain node receives an account freeze request, a freeze transaction for the current account is initiated according to the account freeze request.
In some optional embodiments, the block link point may perform identity verification on the freezing requester of the account freezing request, and when the identity verification passes, initiate a freezing transaction for the current account according to the account freezing request; if the authentication is not passed, the response to the account freeze request is denied.
S630: frozen transactions for the current account are broadcast over the blockchain network.
The block chain link point stores the frozen transaction aiming at the current account in a transaction buffer pool maintained by the block chain link point, and meanwhile, the frozen transaction can be broadcasted on a block chain network, so that other block chain nodes on the block chain network can perform consensus authentication on the frozen transaction, and data sharing of all the block chain nodes is realized.
S640: when the blockchain node receives a frozen transaction broadcast on the blockchain network, the frozen transaction is analyzed to obtain frozen information of the current account, wherein the frozen information comprises an account identifier of the current account and a frozen identifier, and the frozen identifier is used for indicating that the current account is in a frozen state.
In some alternative embodiments, the blockchain node performing the frozen transaction may obtain a node identification of the blockchain node initiating the frozen transaction; determining whether the blockchain node initiating the frozen transaction is an authority node according to the node identification; if the blockchain node initiating the frozen transaction is the authority node, writing the frozen information into the intelligent contract; if the blockchain node that initiated the frozen transaction is not a worker node, the frozen transaction is denied.
S650: the blockchain link points write freeze information to the intelligent contracts that are used to provide query services for account freeze status to individual blockchain nodes of the blockchain network.
By writing the freeze information into the smart contract, a query service of account freeze status can be automatically performed on each blockchain node, thereby maintaining the freeze status of the current account. When a resource transfer transaction for a current account is generated on the blockchain network, whether the current account is in a frozen state or not can be inquired through an intelligent contract, and if the current account is in the frozen state, the resource transfer cannot be performed on the current account.
FIG. 7 illustrates an interactive flow diagram for freezing accounts according to account identity verification in one embodiment of the present application, the interactive flow being performed in concert by the client and block link points shown in FIG. 1. As shown in fig. 7, the interactive flow of freezing an account according to account authentication in the embodiment of the present application includes the following steps S710 to S780.
S710: the client sends an account freeze request to a first number of rights nodes.
The account principal may send an account freeze request for the current account to the at least one authority node via the client, the account freeze request being for instructing the blockchain node to initiate a freeze transaction for the current account. The authority node is a blockchain node with auditing authority for the subject attribution of the account.
S720: when the authority node receives the account freezing request, the account freezing request is analyzed to obtain the account identification of the current account and the identity information of the freezing requester.
S730: and the authority node verifies whether the freezing requesting party is the account main body of the current account according to the identity information of the freezing requesting party.
The identity information of the freezing requester and the identity information of the account body locally stored by the authority node are compared in consistency, and if the comparison result is consistent, the freezing requester is determined to be the account body of the current account.
In some optional embodiments, the identity information of the account main body may be stored in a uplink manner, when identity verification is required, the authority node may compare the identity information of the freezing requester with the identity information of the main body of the account main body stored in the blockchain, and if the comparison result is consistent, determine that the freezing requester is the account main body of the current account.
S740: when verifying that the freezing requesting party is an account main body of the current account, establishing freezing information of the current account, wherein the freezing information comprises an account identifier of the current account and a freezing identifier, and the freezing identifier is used for indicating that the current account is in a frozen state.
S750: and carrying out signature processing on the frozen information to obtain frozen transaction aiming at the current account.
And the authority node signs the frozen information by using the authority key held by the authority node to obtain frozen transaction aiming at the current account.
The authority key held by the authority node may include a public key and a private key that form an asymmetric key pair, and when signing the frozen information, the content digest may be extracted from the frozen information by a digest extraction algorithm, and then the content digest may be encrypted by the private key to form a digital signature, where the digital signature may be verified by the public key. The digital signature is associated with the freeze information to form a frozen transaction for the current account.
The content digest is a string of fixed length uniquely corresponding to a piece of data content, which is generated by acting on the data content by a one-way hash encryption function. If the data content is tampered in the network transmission process, whether the data content is changed can be judged by comparing the content summaries of the data content before and after the transmission. Thus, the integrity of the data content can be verified based on the content digest. The content digest uses a one-way hash function to map the plaintext of the data content to be transmitted into a string of ciphertext, also known as a digital fingerprint. The content summaries have a fixed length and different plaintext summaries are made into ciphertext, the result is always different, while the same plaintext has to be consistent. The Digest extraction algorithm in the embodiment of the present application may include, for example, MD (Message Digest), SHA (Secure Hash Algorithm ), MAC (Message AuthenticationCode, message authentication code algorithm), and the like.
Digital signature is a message digest algorithm with a secret key that includes a public key and a private key for verifying data integrity, authenticating data sources, and anti-repudiation, following the OSI reference model, private key signature, and public key verification. The digital signature is also a combination of an asymmetric encryption algorithm and a message digest algorithm, with alternative digital signature algorithms including RSA, DSA or ECDSA.
A pair of RSA keys can be generated firstly based on an RSA algorithm, wherein one of the RSA keys is a secret key which is stored by a service body; the other is a public key, which can be disclosed externally and even registered in a network server. To increase security, RSA keys are at least 500 bits long, and 1024 bits are generally recommended. This makes encryption computationally intensive. To reduce the amount of computation, conventional encryption methods are often used in combination with public key encryption methods in transmitting information, i.e., the information is encrypted using a modified DES or IDEA session key, and then the session key and the information digest are encrypted using an RSA key. After receiving the information, the opposite party decrypts the information by using different keys and can check the information abstract.
An important feature of DSA (Digital Signature Algorithm ) is the two prime number disclosure. In this way, when p and q of other subjects are used, it is possible to confirm whether they are randomly generated or generated by forgery or modification even if the private key is not known.
ECDSA (Elliptic Curve Digital Signature Algorithm ) is a combination of ECC (Elliptic Curves Cryptography, elliptic curve cryptography) and DSA, the whole signature process is similar to that of DSA, except that the algorithm adopted in the signature is ECC, and finally the signed value is divided into two parameters of r and s.
S760: frozen transactions for the current account are broadcast over the blockchain network.
The block chain link point stores the frozen transaction aiming at the current account in a transaction buffer pool maintained by the block chain link point, and meanwhile, the frozen transaction can be broadcasted on a block chain network, so that other block chain nodes on the block chain network can perform consensus authentication on the frozen transaction, and data sharing of all the block chain nodes is realized.
S770: when the blockchain node receives a frozen transaction broadcast on the blockchain network, the frozen transaction is analyzed to obtain frozen information of the current account, wherein the frozen information comprises an account identifier of the current account and a frozen identifier, and the frozen identifier is used for indicating that the current account is in a frozen state.
In some alternative embodiments, the blockchain node performing the frozen transaction may obtain a node identification of the blockchain node initiating the frozen transaction; determining whether the blockchain node initiating the frozen transaction is an authority node according to the node identification; if the blockchain node initiating the frozen transaction is the authority node, writing the frozen information into the intelligent contract; if the blockchain node that initiated the frozen transaction is not a worker node, the frozen transaction is denied.
S780: the blockchain link points write freeze information to the intelligent contracts that are used to provide query services for account freeze status to individual blockchain nodes of the blockchain network.
By writing the freeze information into the smart contract, a query service of account freeze status can be automatically performed on each blockchain node, thereby maintaining the freeze status of the current account. When a resource transfer transaction for a current account is generated on the blockchain network, whether the current account is in a frozen state or not can be inquired through an intelligent contract, and if the current account is in the frozen state, the resource transfer cannot be performed on the current account.
FIG. 8 illustrates an interactive flow diagram for transferring account resources based on smart contracts in one embodiment of the present application, the interactive flow being performed in concert by the client and block link points shown in FIG. 1. As shown in fig. 8, the interactive flow based on transferring account resources by intelligent contract in the embodiment of the present application includes the following steps S810 to S870.
S810: the client sends a resource transfer request to the block link for the current account, the resource transfer request indicating a transfer of resources into or out of the current account.
S820: when the blockchain node receives a resource transfer request for the current account, a query interface of the intelligent contract is called to query freezing information of the current account.
S830: and analyzing the freezing information of the current account to obtain the freezing identification of the current account.
S840: and if the freeze identifier of the current account indicates that the current account is in a frozen state, refusing to execute the resource transfer request.
S850: the blockchain node returns notification information of refusal of executing the resource transfer request to the client.
S860: and if the freeze identifier of the current account indicates that the current account is in an unfrozen state, transferring in or out of the resource to the current account according to the resource transfer request.
S870: and the blockchain node returns notification information of the resource transfer result to the client.
FIG. 9 illustrates an interactive flow diagram for thawing accounts based on smart contracts, which is performed in concert by the client and block link points shown in FIG. 1, in accordance with one embodiment of the present application. As shown in fig. 9, the interactive flow based on transferring account resources by intelligent contract in the embodiment of the present application includes the following steps S910 to S950.
S910: the client sends an account thawing request to a third number of authority nodes, and the third number is larger than the second number.
The account principal may send an account defrost request for the current account to more than a second number of authority nodes through the client, the account defrost request for instructing the blockchain node to initiate a defrost transaction for the current account. The authority node is a blockchain node with auditing authority for the subject attribution of the account.
S920: and the authority node initiates a thawing transaction for the current account according to the account thawing request.
The authority node can analyze the received account thawing request to obtain the account identification of the current account and the identity information of the thawing requesting party; verifying whether the defrosting request party is an account main body of the current account according to the identity information of the defrosting request party; when the defrosting requester is verified to be the account body of the current account, a defrosting transaction for the current account is initiated.
Before the thawing transaction for the current account is initiated, the authority node can also conduct main body attribution audit on the current account, for example, one or more different audit objects are determined according to configuration information of the authority node, and the audit objects refer to content objects which can prove that the account attribution relationship between the account main body and the current account exists, for example, operation records of the account main body executing management operation on the current account in a preset time period can be obtained. The operation records comprise at least one of transaction records and main body interaction records; the transaction record is a record of a transfer of resources through the current account, such as a record of a resource in operation and a resource out operation performed on the current account at different time nodes. The main body interaction record is a record for performing information interaction with other accounts through the current account, for example, performing transmission and receiving operations of multimedia information between different time nodes and the other accounts, wherein the multimedia information can comprise text information, image information or audio/video information.
In some alternative embodiments, multiple authority nodes that receive an account thawing request may use the same or different audit objects when conducting a principal attribution audit. Different authority nodes use different auditing objects, so that the account management security can be improved.
S930: the defrost transaction for the current account is broadcast over the blockchain network.
The authority node stores the unfreezing transaction aiming at the current account in a transaction buffer pool maintained by the authority node, and meanwhile, the unfreezing transaction can be broadcasted on the blockchain network, so that other blockchain nodes on the blockchain network can perform consensus authentication on the unfreezing transaction, and data sharing of all the blockchain nodes is realized.
S940: and acquiring a target account with the same subject attribution as the current account according to the thawing transaction.
The entitlement node may invoke a query interface of the smart contract to query for the freeze information associated with the current account based on the defrost transaction. And analyzing the freezing information to obtain the target account with the same subject attribution as the current account. The target account and the current account belong to the same account main body, for example, when the account main body sends an account freezing request for the current account to at least one blockchain node, the blockchain node receiving the account freezing request can create a new target account for the account main body, and the target account, the account identifier of the current account and the identity information of the freezing requester together form freezing information for the current account.
In some alternative embodiments, the target account is a twin account co-registered by the account principal when registering the current account, the target account having an opposite account status to the current account. For example, when the current account is in an activated state in which the resource transfer operation can be performed, the target account is in a deactivated state in which the execution of the resource transfer operation is prohibited; the target account may be placed in an active state in response to a defrost transaction for the current account while the current account is in a frozen state. Based on the mode of registering the twin account, a target account opposite to the current account state of each account main body is configured, so that main body identity verification operation for the account main body can be reduced once, repeated identity consensus authentication on the main body identity of the current account on a blockchain network is avoided, account safety is ensured, and meanwhile, the thawing efficiency of account resources is improved.
S950: and transferring the resources stored in the current account to the target account.
The resource stored in the current account has a mapping relation with the account identifier of the current account, and when the resource stored in the current account needs to be transferred to the target account, the mapping object of the resource can be updated from the account identifier of the current account to the account identifier of the target account.
In some alternative embodiments, the number of nodes of the authority node that initiates the thawing transaction to the current account may be obtained before transferring the resources held in the current account to the target account; and when the number of the nodes is judged to be larger than the second number, transferring the resources stored in the current account to the target account.
In some alternative embodiments, the blockchain node performing the defrost transaction may invoke a query interface of the smart contract to query for the freeze information associated with the current account; and analyzing the freezing information to obtain the node number of the authority nodes initiating the thawing transaction to the current account.
In some alternative embodiments, the number of nodes stored in the freeze information is the number obtained by weighting the authority nodes according to the node weights. The node weight can be a static weight fixedly set for each authority node, or can be a dynamic weight determined according to the main body attribution auditing result of the authority node.
FIG. 10 illustrates an interactive flow diagram of thawing an account according to the determination of a rights node, which is performed in conjunction with the client and block link points shown in FIG. 1, in one embodiment of the present application. As shown in fig. 10, the interactive flow based on transferring account resources by intelligent contract in the embodiment of the present application includes the following steps S1010 to S1090.
S1010: the client sends an account thawing request to a third number of authority nodes, and the third number is larger than the second number.
The account principal may send an account defrost request for the current account to more than a second number of authority nodes through the client, the account defrost request for instructing the blockchain node to initiate a defrost transaction for the current account. The authority node is a blockchain node with auditing authority for the subject attribution of the account.
S1020: and the authority node initiates a thawing transaction for the current account according to the account thawing request.
The authority node can analyze the received account thawing request to obtain the account identification of the current account and the identity information of the thawing requesting party; verifying whether the defrosting request party is an account main body of the current account according to the identity information of the defrosting request party; when the defrosting requester is verified to be the account body of the current account, a defrosting transaction for the current account is initiated.
Before the thawing transaction for the current account is initiated, the authority node can conduct main body attribution audit on the current account, for example, one or more different audit objects are determined according to configuration information of the authority node, and the audit objects refer to content objects which can prove that the account attribution relationship between the account main body and the current account is available, for example, operation records of the account main body executing management operation on the current account in a preset time period. The operation records comprise at least one of transaction records and main body interaction records; the transaction record is a record of a transfer of resources through the current account, such as a record of a resource in operation and a resource out operation performed on the current account at different time nodes. The main body interaction record is a record for performing information interaction with other accounts through the current account, for example, performing transmission and receiving operations of multimedia information between different time nodes and the other accounts, wherein the multimedia information can comprise text information, image information or audio/video information.
In some alternative embodiments, multiple authority nodes that receive an account thawing request may use the same or different audit objects when conducting a principal attribution audit. Different authority nodes use different auditing objects, so that the account management security can be improved.
S1030: the defrost transaction for the current account is broadcast over the blockchain network.
The authority node stores the unfreezing transaction aiming at the current account in a transaction buffer pool maintained by the authority node, and meanwhile, the unfreezing transaction can be broadcasted on the blockchain network, so that other blockchain nodes on the blockchain network can perform consensus authentication on the unfreezing transaction, and data sharing of all the blockchain nodes is realized.
S1040: when a defrost transaction broadcast on a blockchain network is received, a node identification of a blockchain node that initiated the defrost transaction is obtained.
S1050: and determining whether the blockchain node initiating the thawing transaction is an authority node according to the node identification of the blockchain node initiating the thawing transaction.
S1060: if the blockchain node initiating the thawing transaction is the authority node, updating the node number of the authority node initiating the thawing transaction to the current account according to the node identification.
S1070: and writing the updated node number into an intelligent contract, wherein the intelligent contract is used for determining whether to execute the unfreezing transaction according to the node number.
S1080: and acquiring a target account with the same subject attribution as the current account according to the thawing transaction.
The entitlement node may invoke a query interface of the smart contract to query for the freeze information associated with the current account based on the defrost transaction. And analyzing the freezing information to obtain the target account with the same subject attribution as the current account. The target account and the current account belong to the same account main body, for example, when the account main body sends an account freezing request for the current account to at least one blockchain node, the blockchain node receiving the account freezing request can create a new target account for the account main body, and the target account, the account identifier of the current account and the identity information of the freezing requester together form freezing information for the current account.
S1090: and transferring the resources stored in the current account to the target account.
The resource stored in the current account has a mapping relation with the account identifier of the current account, and when the resource stored in the current account needs to be transferred to the target account, the mapping object of the resource can be updated from the account identifier of the current account to the account identifier of the target account.
Fig. 11 is a schematic diagram of a process of performing account freezing in an application scenario according to an embodiment of the present application. The individual modular objects referred to therein are defined as follows.
The user: i.e., the user who lost the blockchain wallet. A blockchain wallet refers to a program or data in a blockchain system that holds a user's private key to prove ownership of a user to some of the resources on the chain at the time of sending a transaction, consisting of a wallet application, wallet key, etc.
Blockchain nodes: i.e., the hardware node actually running the blockchain billing program, and each node holds its own rights key to implement loss reporting and freezing of the user account.
Blockchain intelligence contracts: a computer program deployed on a blockchain node that automatically executes contractual terms.
Rights key: namely, corresponding to private keys corresponding to a plurality of authoritative addresses with the qualification of the purse of the auditing user, and loading all the authoritative addresses into the intelligent contract in a pre-initialization mode.
Billing procedure: i.e., maintaining blockchain world state data, processes blockchain transactions.
Based on the above modular object, the process of performing account freeze-up with the smart contract includes the following steps.
S1101: and the user submits an account freezing request to any blockchain node to apply for freezing the current account.
When a user finds that the blockchain wallet is lost or the private key is revealed, the user can submit a freezing request to a blockchain node with the data of the user.
Form= < oldAddress, newAddress, other audit information >
Where FORM refers to a request FORM, i.e., an account freeze request, issued by a user to a blockchain node. The oldAddress is the wallet address that the user wants to loss, i.e., the current account. newAddress is the wallet address created by the user, i.e., the target account. The other audit information is audit information such as identity card information, mobile phone number information and the like for verifying the identity of the user on the node.
S1102: the block link point that received the account freeze request initiates the freeze transaction.
And the blockchain node which receives the account freezing request carries out identity checking on the user based on other checking information carried in the account freezing request, and after the checking is passed, the frozen transaction is initiated on the blockchain network through the authority key signature of the node.
The blockchain node may initiate a freeze transaction by calling a lost () function in the smart contract.
The parameters of the lost () function include the current account oldAddress and the target account newAddress submitted by the user in the account freeze request.
The smart contract checks whether the initiator of the frozen transaction is the address to which the authoritative key corresponds. After the determination, the smart contract creates a freeze message onefile. The freezing identifier isFrozen is true, the number of approved cnt is initialized to 0, the new address newAccount after the approved number is approved, and the freezing timestamp of the last account freezing trigger are included.
S1103: and verifying whether the blockchain node initiating the frozen transaction has authority to audit the loss and confirming the frozen account.
After any blockchain node initiates a frozen transaction by calling a lost () function and is uplink, the blockchain link point independently verifies the frozen transaction according to the blockchain protocol, namely, the blockchain node initiating the frozen transaction is independently verified to have qualification of checking loss through the lost () function of the intelligent contract, and if the frozen transaction is successfully executed, the frozen account is confirmed.
When all blockchain nodes in the blockchain (such as all wallet service nodes in the alliance chain) execute transactions of account addresses, the intelligent contract can be called to check whether the current account is in a frozen state according to a freezing identifier freezeOf [ address ] and isFrozen associated with the current account, and meanwhile, whether the freezing time is overtime can be verified through a timestamp freezeOf [ address ]. Timestamp. And confirming the freezing state of the account through the intelligent contracts, and providing a query interface of the freezing state for all intelligent contracts on the blockchain through the freezeOf address.
Based on the scheme of the application scene, the embodiment of the application can realize real-time loss reporting of the account. According to the intelligent contract-based blockchain wallet loss reporting technology, by adding loss reporting information authority control in the intelligent contract, real-time loss reporting of any authority node to the user blockchain wallet is achieved, and the safety of assets on the user blockchain is improved.
Fig. 12 is a schematic diagram of a process of performing account thawing in an application scenario according to an embodiment of the present application. Based on the application scenario shown in fig. 11, the embodiment of the application may report the blockchain wallet through the frozen account, the blockchain resources stored in the wallet will also be frozen, and the user needs to independently submit account thawing requests to the plurality of authority nodes with auditing qualification, so as to transfer the resources in the frozen account to a new wallet.
As shown in fig. 12, the process of performing account thawing using smart contracts includes the following steps.
S1201: and the user submits account thawing requests to a plurality of authority nodes, and applies for transferring the resources in the frozen current account to a new target account number.
After the user freezes the account, a request for recovering the asset to the new account is initiated to each authority node, and the data such as identity certification, running certification, social certification and the like which can prove the ownership of the old account is submitted according to the business requirements of each authority node. In a blockchain (alliance chain) scenario, each authority node may independently determine whether to pass a user initiated account thawing request according to the auditing result. If the audit is passed, step S1202 is performed.
S1202: the entitlement node independently initiates a defrost transaction for the current account.
As shown in the figure, after any authority node audits that the data submitted by the user is valid, a thawing transaction for the current account can be initiated through the authority key signature of the authority node itself, and an app () function in the blockchain intelligent contract is called.
The parameter of the apprvoe () function is the user's old wallet address oldAccount.
The smart contract checks whether the initiator of the defrost transaction is an address corresponding to the authority key. The approveCnt count in the freeze information frezeof corresponding to the old wallet address may then be incremented by one. The approveCnt is used to indicate the number of authority nodes that initiate a defrost transaction for the current account.
The intelligent contract checks whether the approveCnt of the wallet address satisfies the required number of nodes for the need for the new_cnt, and if the number of nodes to be brushed exceeds the required number of the need for the new_cnt, a resource restore function restore () in the intelligent contract may be executed.
In the resource recovery function restore (), the new wallet address newAccount of the user is first obtained, and the asset in the old wallet address oldAccount of the user is transferred to the new wallet address.
S1203: and after verifying the node authority, recovering the resources to the new account.
The thawing transaction initiated by any authority node for the current account is verified in all blockchain nodes, whether the authority of the blockchain node address for initiating the thawing transaction is legal or not is verified, and whether the node number of the authority node for initiating the thawing transaction meets the minimum number requirement of the needscnt or not. If so, restoring the blockchain asset under the old account of the user to be under the new account in the ledger of the blockchain node.
Based on the application scene, the embodiment of the application can realize the security recovery of the account asset. According to the blockchain wallet recovery technology based on the authority node independent auditing, the user qualification is audited through the plurality of authority nodes which are decentralised, and the wallet asset is recovered through the intelligent contract.
It should be noted that although the steps of the methods in the present application are depicted in the accompanying drawings in a particular order, this does not require or imply that the steps must be performed in that particular order, or that all illustrated steps be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform, etc.
The following describes an embodiment of an apparatus of the present application, which may be used to perform the account management method in the above-described embodiments of the present application.
Fig. 13 schematically shows a block diagram of an account management apparatus provided in an embodiment of the present application.
As shown in fig. 13, an account management apparatus 1300 in the embodiment of the present application includes:
a freeze module 1310 configured to freeze a current account when a first number of blockchain nodes initiate a freeze transaction for the current account;
the thawing module 1320 is configured to transfer the resource stored in the current account to a target account having the same principal attribution as the current account when a second number of authority nodes initiates a thawing transaction for the current account, the second number being greater than the first number, the authority nodes being blockchain nodes having auditing authorities for the principal attribution.
In some embodiments of the present application, based on the above technical solutions, the freezing module 1310 may further include:
a freeze request module configured to obtain account freeze requests sent to a first number of blockchain nodes;
a freeze initiation module configured to initiate a freeze transaction for the current account according to the account freeze request and broadcast the freeze transaction over a blockchain network;
An account freeze module configured to freeze the current account on each blockchain node of the blockchain network according to the freeze transaction.
In some embodiments of the present application, based on the above technical solutions, the account freezing module includes:
the transaction analysis module is configured to analyze the frozen transaction to obtain frozen information of the current account, wherein the frozen information comprises an account identifier of the current account and a frozen identifier, and the frozen identifier is used for indicating that the current account is in a frozen state;
and the freezing information writing module is configured to write the freezing information into an intelligent contract, and the intelligent contract is used for providing inquiry service of account freezing state for each blockchain node of the blockchain network.
In some embodiments of the present application, based on the above technical solution, the account freezing module further includes:
the freezing information inquiry module is configured to call an inquiry interface of the intelligent contract to inquire the freezing information of the current account when a resource transfer request for the current account is received; the resource transfer request is used for indicating to transfer in or out resources to the current account;
The freeze information analysis module is configured to analyze the freeze information of the current account to obtain a freeze identifier of the current account;
the first execution module is configured to refuse to execute the resource transfer request if the freeze identifier of the current account indicates that the current account is in a frozen state;
and the second execution module is configured to transfer in or out resources to the current account according to the resource transfer request if the freeze identifier of the current account indicates that the current account is in an unfrozen state.
In some embodiments of the present application, based on the above technical solution, the freeze information writing module includes:
a node identification acquisition module configured to acquire a node identification of a blockchain node that initiated the frozen transaction;
the authority node judging module is configured to determine whether the blockchain node initiating the frozen transaction is an authority node according to the node identification;
and the intelligent contract writing module is configured to write the freezing information into the intelligent contract if the blockchain node initiating the freezing transaction is an authority node.
In some embodiments of the present application, based on the above technical solutions, the freeze-initiation module includes:
The freezing request analysis module is configured to analyze the account freezing request to obtain an account identifier of the current account and identity information of a freezing requester;
an identity verification module configured to verify whether the freeze requester is an account principal of the current account according to identity information of the freeze requester;
a freeze information establishing module configured to establish freeze information of the current account when verifying that the freeze requester is an account body of the current account, the freeze information including an account identifier of the current account and a freeze identifier, the freeze identifier being used to indicate that the current account is in a frozen state;
and the frozen information encryption module is configured to sign the frozen information to obtain frozen transactions aiming at the current account.
In some embodiments of the present application, based on the above technical solutions, the thawing module 1320 includes:
the thawing request module is configured to acquire account thawing requests sent to a third number of authority nodes, and the third number is larger than the second number;
a defrost initiation module configured to initiate a defrost transaction for the current account according to the account defrost request and broadcast the defrost transaction over a blockchain network;
An account acquisition module configured to acquire a target account having the same subject attribution as the current account according to the thawing transaction;
and the resource transfer module is configured to transfer the resources stored in the current account to the target account.
In some embodiments of the present application, based on the above technical solutions, the account obtaining module includes:
the freezing information inquiry module is configured to call an inquiry interface of the intelligent contract according to the thawing transaction, and inquire to obtain freezing information associated with the current account;
and the frozen information analysis module is configured to analyze the frozen information to obtain a target account with the same subject attribution as the current account.
In some embodiments of the present application, based on the above technical solutions, the thawing module further includes:
the node identification acquisition module is configured to acquire the node identification of the blockchain node initiating the unfreezing transaction when the unfreezing transaction broadcasted on the blockchain network is received;
the permission node judging module is configured to determine whether the blockchain node initiating the thawing transaction is a permission node according to the node identification of the blockchain node initiating the thawing transaction;
The node quantity updating module is configured to update the node quantity of the authority nodes for initiating the thawing transaction on the current account according to the node identification if the blockchain node initiating the thawing transaction is the authority node;
and the node number writing module is configured to write the updated node number into an intelligent contract, and the intelligent contract is used for determining whether to execute the unfreezing transaction according to the node number.
In some embodiments of the present application, based on the above technical solution, the resource transfer module is further configured to:
acquiring the node number of authority nodes initiating thawing transaction to the current account;
and when the number of the nodes is larger than the second number, transferring the resources stored in the current account to the target account.
In some embodiments of the present application, based on the above technical solution, the resource transfer module is further configured to:
invoking a query interface of the intelligent contract to query and obtain freezing information associated with the current account;
and analyzing the freezing information to obtain the node number of the authority nodes for initiating the thawing transaction to the current account.
Specific details of the account management device provided in each embodiment of the present application have been described in the corresponding method embodiments, and are not described herein.
Fig. 14 schematically shows a block diagram of a computer system for implementing an electronic device according to an embodiment of the present application.
It should be noted that, the computer system 1400 of the electronic device shown in fig. 14 is only an example, and should not impose any limitation on the functions and the application scope of the embodiments of the present application.
As shown in fig. 14, the computer system 1400 includes a central processing unit 1401 (Central Processing Unit, CPU) that can execute various appropriate actions and processes according to a program stored in a Read-Only Memory 1402 (ROM) or a program loaded from a storage section 1408 into a random access Memory 1403 (Random Access Memory, RAM). In the random access memory 1403, various programs and data necessary for the system operation are also stored. The cpu 1401, the rom 1402, and the ram 1403 are connected to each other via a bus 1404. An Input/Output interface 1405 (Input/Output interface, i.e., I/O interface) is also connected to bus 1404.
The following components are connected to the input/output interface 1405: an input section 1406 including a keyboard, a mouse, and the like; an output portion 1407 including a Cathode Ray Tube (CRT), a liquid crystal display (Liquid Crystal Display, LCD), and a speaker; a storage section 1408 including a hard disk or the like; and a communication section 1409 including a network interface card such as a local area network card, a modem, and the like. The communication section 1409 performs communication processing via a network such as the internet. The drive 1410 is also connected to the input/output interface 1405 as needed. Removable media 1411, such as magnetic disks, optical disks, magneto-optical disks, semiconductor memory, and the like, is installed as needed on drive 1410 so that a computer program read therefrom is installed as needed into storage portion 1408.
In particular, according to embodiments of the present application, the processes described in the various method flowcharts may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network via the communication portion 1409 and/or installed from the removable medium 1411. The computer programs, when executed by the central processor 1401, perform the various functions defined in the system of the present application.
It should be noted that, the computer readable medium shown in the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-Only Memory (ROM), an erasable programmable read-Only Memory (Erasable Programmable Read Only Memory, EPROM), flash Memory, an optical fiber, a portable compact disc read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present application, however, a computer-readable signal medium may include a data signal that propagates in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
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 application. 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 or flowchart illustration, and combinations of blocks in the block diagrams 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.
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functions of two or more modules or units described above may be embodied in one module or unit, in accordance with embodiments of the present application. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a usb disk, a mobile hard disk, etc.) or on a network, and includes several instructions to cause a computing device (may be a personal computer, a server, a touch terminal, or a network device, etc.) to perform the method according to the embodiments of the present application.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains.
It is to be understood that the present application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (15)

1. An account management method, comprising:
freezing a current account when a first number of blockchain nodes initiate a freeze transaction for the current account;
when a second number of authority nodes initiate unfreezing transaction for the current account, transferring the resources stored in the current account to a target account with the same main body attribution as the current account, wherein the second number is larger than the first number, and the authority nodes are blockchain nodes with auditing authorities for the main body attribution.
2. The account management method of claim 1, wherein freezing the current account comprises:
obtaining account freeze requests sent to a first number of blockchain nodes;
initiating a frozen transaction for the current account according to the account freezing request, and broadcasting the frozen transaction on a blockchain network;
and freezing the current account on each blockchain node of the blockchain network according to the freezing transaction.
3. The account management method of claim 2, wherein freezing the current account on each blockchain node of the blockchain network comprises:
Analyzing the frozen transaction to obtain frozen information of the current account, wherein the frozen information comprises an account identifier of the current account and a frozen identifier, and the frozen identifier is used for indicating that the current account is in a frozen state;
and writing the freezing information into an intelligent contract, wherein the intelligent contract is used for providing inquiry service of account freezing state for each blockchain node of the blockchain network.
4. The account management method of claim 3, wherein after writing the freeze information to a smart contract, the method further comprises:
when a resource transfer request aiming at the current account is received, a query interface of the intelligent contract is called to query freezing information of the current account; the resource transfer request is used for indicating to transfer in or out resources to the current account;
analyzing the freezing information of the current account to obtain a freezing identification of the current account;
if the freeze identifier of the current account indicates that the current account is in a frozen state, refusing to execute the resource transfer request;
and if the freezing identification of the current account indicates that the current account is in an unfrozen state, transferring in or out resources to the current account according to the resource transfer request.
5. The account management method of claim 3, wherein writing the freeze information to a smart contract comprises:
acquiring a node identifier of a blockchain node initiating the frozen transaction;
determining whether a blockchain node initiating the frozen transaction is an authority node according to the node identification;
and if the blockchain node initiating the frozen transaction is a permission node, writing the frozen information into an intelligent contract.
6. The account management method of claim 2, wherein initiating a freeze transaction for the current account in accordance with the account freeze request comprises:
analyzing the account freezing request to obtain the account identification of the current account and the identity information of the freezing requester;
verifying whether the freezing requesting party is an account main body of the current account according to the identity information of the freezing requesting party;
when verifying that the freezing requesting party is an account main body of the current account, establishing freezing information of the current account, wherein the freezing information comprises an account identifier of the current account and a freezing identifier, and the freezing identifier is used for indicating that the current account is in a freezing state;
And carrying out signature processing on the frozen information to obtain frozen transaction aiming at the current account.
7. The account management method according to claim 1, wherein transferring the resource held in the current account to a target account having the same subject attribution as the current account includes:
obtaining account thawing requests sent to a third number of authority nodes, wherein the third number is greater than the second number;
initiating a defrosting transaction for the current account according to the account defrosting request, and broadcasting the defrosting transaction on a blockchain network;
acquiring a target account with the same subject attribution as the current account according to the thawing transaction;
and transferring the resources stored in the current account to the target account.
8. The account management method of claim 7, wherein obtaining a target account having the same principal attribution as the current account from the defrost transaction comprises:
invoking a query interface of an intelligent contract according to the thawing transaction, and querying to obtain freezing information associated with the current account;
and analyzing the freezing information to obtain a target account with the same subject attribution as the current account.
9. The account management method of claim 7, wherein after broadcasting the defrost transaction over a blockchain network, the method further comprises:
when a unfreezing transaction broadcasted on a blockchain network is received, acquiring a node identifier of a blockchain node initiating the unfreezing transaction;
determining whether the blockchain node initiating the thawing transaction is an authority node according to the node identification of the blockchain node initiating the thawing transaction;
if the blockchain node initiating the thawing transaction is an authority node, updating the node number of the authority node initiating the thawing transaction to the current account according to the node identification;
and writing the updated node number into an intelligent contract, wherein the intelligent contract is used for determining whether to execute the unfreezing transaction according to the node number.
10. The account management method of claim 7, wherein transferring the resources held in the current account to the target account comprises:
acquiring the node number of authority nodes initiating thawing transaction to the current account;
and when the number of the nodes is larger than the second number, transferring the resources stored in the current account to the target account.
11. The account management method of claim 10, wherein obtaining the number of nodes of the authority node that initiates the defrosting transaction to the current account comprises:
invoking a query interface of the intelligent contract to query and obtain freezing information associated with the current account;
and analyzing the freezing information to obtain the node number of the authority nodes for initiating the thawing transaction to the current account.
12. An account management device, comprising:
a freeze module configured to freeze a current account when a first number of blockchain nodes initiate a freeze transaction for the current account;
and the thawing module is configured to transfer the resources stored in the current account to a target account with the same subject attribution as the current account when a second number of authority nodes initiate thawing transactions for the current account, wherein the second number is greater than the first number, and the authority nodes are blockchain nodes with auditing authorities for the subject attribution.
13. A computer readable medium, characterized in that the computer readable medium has stored thereon a computer program which, when executed by a processor, implements the account management method of any of claims 1 to 11.
14. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to cause the electronic device to perform the account management method of any one of claims 1 to 11 via execution of the executable instructions.
15. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the account management method of any of claims 1 to 11.
CN202211013015.2A 2022-08-23 2022-08-23 Account management method, device, medium and electronic equipment Pending CN117670352A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211013015.2A CN117670352A (en) 2022-08-23 2022-08-23 Account management method, device, medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211013015.2A CN117670352A (en) 2022-08-23 2022-08-23 Account management method, device, medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN117670352A true CN117670352A (en) 2024-03-08

Family

ID=90082968

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211013015.2A Pending CN117670352A (en) 2022-08-23 2022-08-23 Account management method, device, medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN117670352A (en)

Similar Documents

Publication Publication Date Title
US11533164B2 (en) System and method for blockchain-based cross-entity authentication
US11025435B2 (en) System and method for blockchain-based cross-entity authentication
EP3788523B1 (en) System and method for blockchain-based cross-entity authentication
WO2021000419A1 (en) System and method for blockchain-based cross-entity authentication
CN112235420B (en) Data synchronization method, system and related equipment based on block chain
CN112560072B (en) Key management method, device, medium and equipment based on block chain
CN113255014B (en) Data processing method based on block chain and related equipment
CN114978635A (en) Cross-domain authentication method and device, and user registration method and device
CN113129008B (en) Data processing method, device, computer readable medium and electronic equipment
CN114666060A (en) Electronic data preservation method and system based on HyperLegger Fabric
CN114519197A (en) Data storage architecture and method based on block chain and cloud service
CN111915302B (en) Associated data processing method and device, electronic equipment and computer readable medium
US20230245111A1 (en) Systems and methods for requesting secure, encrypted communications across distributed computer networks for authorizing use of cryptography-based digital repositories in order to perform blockchain operations in decentralized applications
CN117221337A (en) Block chain consensus method, device, medium and electronic equipment
CN117670352A (en) Account management method, device, medium and electronic equipment
CN115375312B (en) Digital wallet data recording method and data verification method for electronic payment
CN116541874A (en) Digital asset management method and related products
CN117376366A (en) Block chain transaction processing method, device, medium and electronic equipment
CN117078262A (en) Transaction processing method, device, medium and equipment based on blockchain
CN115996131A (en) Key processing method, device, medium and electronic equipment based on blockchain
CN113300853A (en) Financial credit investigation information management method and device, electronic equipment and storage medium
CN117544312A (en) Cross-domain digital signature method based on attribute encryption and related equipment thereof

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