CN110597918A - Account management method and device and computer readable storage medium - Google Patents

Account management method and device and computer readable storage medium Download PDF

Info

Publication number
CN110597918A
CN110597918A CN201910902281.2A CN201910902281A CN110597918A CN 110597918 A CN110597918 A CN 110597918A CN 201910902281 A CN201910902281 A CN 201910902281A CN 110597918 A CN110597918 A CN 110597918A
Authority
CN
China
Prior art keywords
account
block chain
nodes
blockchain
intelligent contract
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.)
Granted
Application number
CN201910902281.2A
Other languages
Chinese (zh)
Other versions
CN110597918B (en
Inventor
李茂材
周开班
王宗友
刘攀
张劲松
朱耿良
孔利
时一防
黄焕坤
刘区城
陈秋平
蓝虎
杨常青
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 CN201910902281.2A priority Critical patent/CN110597918B/en
Publication of CN110597918A publication Critical patent/CN110597918A/en
Application granted granted Critical
Publication of CN110597918B publication Critical patent/CN110597918B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The embodiment of the invention discloses an account management method, an account management device and a computer-readable storage medium, wherein the method comprises the following steps: acquiring an account management request aiming at a target block chain account, wherein the block chain account management request comprises an account identifier and an operation type of the target block chain account; broadcasting the account management request to other nodes in the plurality of nodes so that the other nodes perform consensus verification on the account management request and broadcast respective signed consensus verification results; detecting whether the consensus verification result signed by the other nodes meets the triggering condition by calling an intelligent contract; and if so, calling the intelligent contract to manage the accounts included in the block chain according to the account identification of the target block chain account and the operation type. By implementing the method, the accounts can be managed conveniently and efficiently by using the intelligent contracts, and the logic of account management can be flexibly changed.

Description

Account management method and device and computer readable storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to an account management method and apparatus, and a computer-readable storage medium.
Background
With the development of computer technology, the blockchain technology is also rapidly developed, and the blockchain technology is a decentralized distributed book technology, and information stored on a blockchain cannot be forged and tampered. A smart contract is a non-tamperproof, automatically executing computer program that runs on a blockchain. Nodes on the blockchain may implement various transactions by invoking intelligent contracts.
In the current blockchain system, the blockchain management is usually written in a native language, an account management module is built in a blockchain code, and when the account management function needs to be changed, the operation is complex and all node configurations in a blockchain network need to be restarted, which is not beneficial to upgrade and maintenance of the blockchain.
Disclosure of Invention
Embodiments of the present invention provide an account management method, an account management device, and a computer-readable storage medium, which can manage accounts conveniently and efficiently by using an intelligent contract, and can flexibly change the logic of account management.
The first aspect of the embodiment of the invention discloses an account management method, which comprises the following steps:
acquiring an account management request aiming at a target block chain account, wherein the block chain account management request comprises an account identifier and an operation type of the target block chain account;
broadcasting the account management request to other nodes in the plurality of nodes so that the other nodes perform consensus verification on the account management request and broadcast respective signed consensus verification results;
detecting whether the consensus verification result signed by the other nodes meets the triggering condition by calling an intelligent contract;
and if so, calling the intelligent contract to manage the accounts included in the block chain according to the account identification of the target block chain account and the operation type.
A second aspect of the embodiments of the present invention discloses an account management apparatus, including:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring an account management request aiming at a target block chain account, and the block chain account management request comprises an account identifier and an operation type of the target block chain account;
a broadcasting module, configured to broadcast the account management request to other nodes in the multiple nodes, so that the other nodes perform consensus verification on the account management request and broadcast consensus verification results after respective signatures;
the detection module is used for detecting whether the consensus verification result signed by the other nodes meets the trigger condition by calling an intelligent contract;
and if so, calling the intelligent contract to manage the accounts included in the block chain according to the account identification of the target block chain account and the operation type.
A third aspect of the embodiments of the present invention discloses a node device, including a processor, a memory, and a network interface, where the processor, the memory, and the network interface are connected to each other, where the memory is used to store a computer program, the computer program includes program instructions, and the processor is configured to call the program instructions to execute the method of the first aspect.
A fourth aspect of the present invention discloses a computer-readable storage medium, wherein the computer storage medium stores a computer program, the computer program includes program instructions, and the program instructions, when executed by a processor, cause the processor to execute the method of the first aspect.
In the embodiment of the invention, a node of a block chain network acquires an account management request aiming at a target block chain account, the block chain account management request comprises an account identifier and an operation type of the target block chain account, the node of the block chain network broadcasts the account management request to other nodes in a plurality of nodes so that the other nodes perform consensus verification on the account management request and broadcast consensus verification results after respective signatures, further, the node of the block chain network detects whether the consensus verification results after the signatures of the other nodes meet a trigger condition by calling an intelligent contract, and if so, the intelligent contract is called to manage the account included in the block chain according to the account identifier and the operation type of the target block chain account. By implementing the method, the accounts can be managed conveniently and efficiently by using the intelligent contracts, and the logic of account management can be flexibly changed.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1a is a schematic diagram of an account management system according to an embodiment of the present invention;
fig. 1b is a schematic structural diagram of a block chain according to an embodiment of the present invention;
FIG. 1c is a schematic diagram of a process for generating a new block according to an embodiment of the present invention;
FIG. 1d is a schematic diagram of a deployment of an account management contract according to an embodiment of the present invention;
FIG. 1e is a schematic illustration of a deployment of an account management module as disclosed in the prior art;
fig. 2 is a flowchart illustrating an account management method according to an embodiment of the present invention;
FIG. 3 is a flow chart illustrating another account management method according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of an account management apparatus according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a node device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Aiming at the problems of complicated operation, low efficiency and the like commonly existing in the current account management function change, the embodiment of the invention provides an account management method, which can conveniently and efficiently manage accounts by utilizing intelligent contracts and can flexibly change the logic of account management.
Referring to fig. 1a, it is a schematic structural diagram of an account management system according to an embodiment of the present invention, where the account management system includes a blockchain network 10 and a user terminal 102, where:
the blockchain network 10 refers to a network for performing data sharing between nodes, and a plurality of nodes 101 may be included in the blockchain network. Each node 101 may receive input information and maintain shared data (i.e., blockchains) within the blockchain network based on the received input information while operating normally. In order To ensure information intercommunication in the blockchain network, each node may have information connection, and any two nodes may implement Peer-To-Peer (P2P) communication, and specifically may perform P2P communication through a wired communication link or a wireless communication link. For example, when any node in the blockchain network receives input information, other nodes acquire the input information according to a consensus algorithm, and store the input information as data in shared data, so that the data stored on all nodes in the blockchain network are consistent.
The user terminal 102 may access the blockchain network and may communicate with nodes in the blockchain network, e.g., initiate account management requests to the nodes, etc. The user terminal 102 may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a vehicle-mounted smart terminal, and the like.
It should be noted that the number of nodes shown in fig. 1a is only illustrative, and any number of nodes may be deployed according to actual needs.
Each node in the blockchain network has a corresponding node identifier, and each node in the blockchain network can store node identifiers of other nodes in the blockchain network, so that the generated block can be broadcast to other nodes in the blockchain network according to the node identifiers of other nodes. Each node may maintain a node identifier list as shown in the following table, and store the node name and the node identifier in the node identifier list correspondingly. The node identifier may be an Internet Protocol (IP) address or any other information that can be used to identify the node, and the table is described by taking the IP address as an example.
Node name Node identification
Node 1 117.114.151.174
Node 2 117.116.189.145
Node N 119.123.789.258
Each node in the blockchain network stores one identical blockchain. The block chain is composed of a plurality of blocks, referring to fig. 1b, the block chain is composed of a plurality of blocks, the starting block comprises a block head and a block main body, the block head stores an input information characteristic value, a version number, a timestamp and a difficulty value, and the block main body stores input information; the next block of the starting block takes the starting block as a parent block, the next block also comprises a block head and a block main body, the block head stores the input information characteristic value of the current block, the block head characteristic value of the parent block, the version number, the timestamp and the difficulty value, and the like, so that the block data stored in each block in the block chain is associated with the block data stored in the parent block, and the safety of the input information in the block is ensured.
When each block in the block chain is generated, referring to fig. 1c, when a node where the block chain is located receives input information, the input information is verified, after the verification is completed, the input information is stored in a memory pool, and a hash tree used for recording the input information is updated; and then, updating the updating time stamp to the time when the input information is received, trying different random numbers, and calculating the characteristic value for multiple times, so that the calculated characteristic value can meet the following formula:
SHA256(SHA256(version+prev_hash+merkle_root+ntime+nbits+x))<TARGET
wherein, SHA256 is a characteristic value algorithm used for calculating a characteristic value; version is version information of the relevant block protocol in the block chain; prev _ hash is a block head characteristic value of a parent block of the current block; merkle _ root is a characteristic value of the input information; ntime is the update time of the update timestamp; nbits is the current difficulty, is a fixed value within a period of time, and is determined again after exceeding a fixed time period; x is a random number; TARGET is a feature threshold, which can be determined from nbits.
Therefore, when the random number meeting the formula is obtained through calculation, the information can be correspondingly stored, and the block head and the block main body are generated to obtain the current block. And then, the node where the block chain is located respectively sends the newly generated blocks to other nodes in the block chain network where the newly generated blocks are located according to the node identifications of the other nodes in the block chain network, the newly generated blocks are verified by the other nodes, and the newly generated blocks are added to the block chain stored in the newly generated blocks after the verification is completed.
The intelligent contract can be operated on the nodes of the block chain network, the intelligent contract is realized by codes executed when a certain condition is met, developers can define contract logic through a programming language, issue the contract logic to the block chain (intelligent contract registration), and call keys or other events to trigger execution according to the logic of contract terms to complete the contract logic and simultaneously provide the functions of upgrading and cancelling the intelligent contract.
In some possible embodiments, a node 101 of a blockchain network may obtain an account management request for a target blockchain account, where the blockchain account management request includes an account identifier and an operation type of the target blockchain account, the node 101 broadcasts the account management request to other nodes in the plurality of nodes, so that the other nodes perform consensus verification on the account management request and broadcast respective signed consensus verification results, and the node 101 detects whether the other node signed consensus verification results satisfy a trigger condition by invoking an intelligent contract, and if so, the node 101 invokes the intelligent contract to manage accounts included in a blockchain according to the account identifier of the target blockchain account and the operation type, so that the accounts can be managed conveniently and efficiently by using the intelligent contract, and the logic of account management can be flexibly changed.
In some feasible embodiments, the node 101 of the block chain network decrypts the signed consensus verification result broadcasted by each node by using the public key corresponding to each node in the other nodes to obtain the consensus verification result of each node, and detects whether the consensus verification result of each node meets the trigger condition by invoking an intelligent contract, so that each consensus verification result has a private key signature, thereby effectively preventing tampering and ensuring the validity and traceability of the verification result.
In some possible embodiments, as shown in fig. 1d, in the embodiment of the present invention, management of blockchain accounts is implemented by account management contracts (i.e., intelligent contracts), which can run on virtual machines of nodes, and compared with the prior art as shown in fig. 1e, an account management module for account management is deployed in blockchain code and written in a native language of a blockchain, and when the function of the account management module is changed, configuration of all nodes needs to be restarted.
The implementation details of the technical scheme of the embodiment of the invention are explained in detail as follows:
please refer to fig. 2, which is a flowchart illustrating an account management method provided by the account management system shown in fig. 1a according to an embodiment of the present invention, where the account management method is mainly described from a node side, the account management method is applied to a blockchain network, the blockchain network includes a plurality of nodes, and the account management method includes the following steps:
201: the node acquires an account management request aiming at a target block chain account, wherein the block chain account management request comprises an account identification and an operation type of the target block chain account.
The blockchain account records the amount of resources held by the user, such as bitcoin, bank deposit, held bond/stock, and other properties.
Specifically, a node of the blockchain network may obtain an account management request for a target blockchain account, where the account management request includes an account identifier and an operation type of the target blockchain account. The account identifier of the target blockchain account is used to indicate the target blockchain account in the blockchain, the operation type of the target blockchain account may be to add an account, delete an account, adjust account permissions, or query account information, and the node may be any one of a plurality of nodes included in the blockchain network.
202: the node broadcasts the account management request to other nodes in the plurality of nodes, so that the other nodes perform consensus verification on the account management request and broadcast the consensus verification results after respective signatures.
Specifically, when a node of the blockchain network acquires an account management request for a target blockchain account, the account management request is broadcast to other nodes in the plurality of nodes of the blockchain network at the same time, so that the other nodes perform consensus verification on the account management request and respectively use the corresponding private keys for signature, and each node in the other nodes broadcasts a consensus verification result after each signature in the blockchain network.
203: and the node detects whether the consensus verification result signed by other nodes meets the trigger condition by calling an intelligent contract.
Specifically, a node of the block chain network invokes an intelligent contract, detects whether the consensus verification result signed by all other nodes meets a trigger condition, and judges whether to manage an account included in the block chain according to whether the consensus verification result meets the trigger condition. The triggering condition may be that the number of nodes passing verification reaches a preset value, for example, the number of nodes in the blockchain network is N (N may be greater than or equal to 2), and the number of nodes passing verification may be set to be greater than or equal to N/2 or N × 2/3.
204: and if so, the node calls an intelligent contract to manage the accounts included in the block chain according to the account identification and the operation type of the target block chain account.
Specifically, when the node detects that the consensus verification result obtained after the signature of other nodes meets the trigger condition by invoking the intelligent contract, the node invokes the intelligent contract to manage the accounts included in the block chain according to the account identifier and the operation type of the target block chain account. For example, if the operation type of the blockchain account management request is to add an account, calling an intelligent contract to add a target blockchain account into the blockchain according to the account identifier of the target blockchain account; if the operation type of the block chain account management request is account deletion, calling an intelligent contract to delete the target block chain account from the block chain according to the account identification of the target block chain account; if the operation type of the block chain account management request is the adjustment account authority, calling an intelligent contract to adjust the authority of the target block chain account recorded in the block chain according to the account identifier of the target block chain account; and if the operation type of the block chain account management request is the inquiry account information, calling an intelligent contract to inquire the account information of the target block chain account from the block chain according to the account identification of the target block chain account.
In some feasible embodiments, when the account management logic needs to be changed, a new intelligent contract is directly broadcasted to the blockchain network, and the new intelligent contract is used for replacing the original intelligent contract, so that the blockchain accounts are managed according to the account management logic corresponding to the new intelligent contract, and the configuration of all nodes does not need to be restarted.
In the embodiment of the invention, a node of a block chain network acquires an account management request aiming at a target block chain account, the block chain account management request comprises an account identifier and an operation type of the target block chain account, the node of the block chain network broadcasts the account management request to other nodes in a plurality of nodes so that the other nodes perform consensus verification on the account management request and broadcast consensus verification results after respective signatures, further, the node of the block chain network detects whether the consensus verification results after the signatures of the other nodes meet a trigger condition by calling an intelligent contract, and if so, the intelligent contract is called to manage the account included in the block chain according to the account identifier and the operation type of the target block chain account. By implementing the method, the accounts can be managed conveniently and efficiently by using the intelligent contracts, and the logic of account management can be flexibly changed.
Please refer to fig. 3, which is a flowchart illustrating another account management method provided by the account management system shown in fig. 1a according to an embodiment of the present invention, where the account management method is mainly described from a node side, and the account management method is applied to a blockchain network, where the blockchain network includes a plurality of nodes, and the account management method includes the following steps:
301: the node acquires an account management request aiming at a target block chain account, wherein the block chain account management request comprises an account identification and an operation type of the target block chain account.
In some possible embodiments, the obtaining, by the node of the blockchain network, the account management request for the target blockchain account may be an account status of each blockchain account included in the intelligent contract detection blockchain, and the account management request for the target blockchain account is generated by determining the target blockchain account from each blockchain account according to the account status of each blockchain account. Determining the target blockchain account from the blockchain accounts according to the account status of each blockchain account may be determining a blockchain account with an abnormal account status from the blockchain accounts according to the account status of each blockchain account, where the abnormal account status may be a malicious account, an inoperative account, or the like, and using the blockchain account with the abnormal account status as the target blockchain account, where the operation type is to delete an account or adjust account permissions.
In some possible embodiments, the obtaining, by a node of the blockchain network, an account management request for the target blockchain account may be receiving an account management request for the target blockchain account submitted by a user terminal.
302: the node broadcasts the account management request to other nodes in the plurality of nodes, so that the other nodes perform consensus verification on the account management request and broadcast the consensus verification results after respective signatures.
303: and the nodes decrypt the signed consensus verification result broadcasted by each node by using the public key corresponding to each node in other nodes to obtain the consensus verification result of each node.
Specifically, the node of the block chain network decrypts the signed consensus verification result broadcasted by each node by using the public key corresponding to each node in other nodes, so as to obtain the consensus verification result of each node.
304: the nodes detect whether the consensus verification result of each node meets the triggering condition or not by calling an intelligent contract.
Specifically, the nodes of the block chain network invoke the intelligent contract, detect whether the consensus verification result of each node meets the trigger condition, and judge whether to manage the account included in the block chain according to whether the consensus verification result of each node meets the trigger condition.
In some possible embodiments, the nodes of the blockchain network receive the broadcasted intelligent contract before acquiring the account management request for the target blockchain account, the intelligent contract indicates the trigger condition, and the intelligent contract is executed on the virtual machine after the other nodes agree on the intelligent contract.
305: and if so, the node calls an intelligent contract to manage the accounts included in the block chain according to the account identification and the operation type of the target block chain account.
Specifically, the specific implementation manners of steps 302, 304, and 305 may refer to the related descriptions of steps 202, 203, and 204 in the above embodiments, and are not described herein again.
In the embodiment of the invention, a node of a block chain network acquires an account management request aiming at a target block chain account, the block chain account management request comprises an account identifier and an operation type of the target block chain account, the node of the block chain network broadcasts the account management request to other nodes in the plurality of nodes, so that the other nodes carry out consensus verification on the account management request and broadcast the consensus verification result after respective signature, and further, the nodes of the block chain network decrypt the signed consensus verification result broadcasted by each node by using the public key corresponding to each node in other nodes, to obtain the result of the consensus verification of each node, and to detect whether the result of the consensus verification of each node satisfies the triggering condition by invoking an intelligent contract, if so, the intelligent contract is invoked to manage the accounts included in the blockchain according to the account identification and the operation type of the target blockchain account. By implementing the method, the accounts can be managed conveniently and efficiently by using the intelligent contracts, and the logic of account management can be flexibly changed.
Fig. 4 is a schematic structural diagram of an account management device according to an embodiment of the present invention. The account management device includes:
an obtaining module 401, configured to obtain an account management request for a target blockchain account, where the account management request includes an account identifier and an operation type of the target blockchain account;
a broadcasting module 402, configured to broadcast the account management request to other nodes in the plurality of nodes, so that the other nodes perform consensus verification on the account management request and broadcast respective signed consensus verification results;
a detecting module 403, configured to detect whether the consensus verification result obtained after the signature of the other node meets a trigger condition by invoking an intelligent contract;
and if so, invoking the intelligent contract to manage the accounts included in the block chain according to the account identifier of the target block chain account and the operation type.
In some possible embodiments, the management module 404 is specifically configured to:
if the operation type is the added account, calling the intelligent contract to add the target block chain account into a block chain according to the account identification of the target block chain account;
if the operation type is account deletion, calling the intelligent contract to delete the target block chain account from the block chain according to the account identification of the target block chain account;
if the operation type is the adjustment of the account authority, the intelligent contract is called to adjust the authority of the target block chain account recorded in the block chain according to the account identification of the target block chain account;
and if the operation type is the inquiry account information, calling the intelligent contract to inquire the account information of the target block chain account from the block chain according to the account identification of the target block chain account.
In some possible embodiments, the detection module 403 is specifically configured to:
decrypting the signed consensus verification result broadcasted by each node by using a public key corresponding to each node in the other nodes to obtain the consensus verification result of each node;
and detecting whether the consensus verification result of each node meets the triggering condition or not by calling an intelligent contract.
In some possible embodiments, the obtaining module 401 is specifically configured to:
calling the intelligent contract to detect the account state of each block chain account included in the block chain;
determining a target blockchain account from the blockchain accounts according to the account state of each blockchain account;
generating an account management request for the target blockchain account.
In some possible embodiments, the obtaining module 401 is specifically configured to:
determining a blockchain account with an abnormal account state from the blockchain accounts according to the account state of each blockchain account;
taking the block chain account with the abnormal account state as a target block chain account;
and the operation type is to delete the account or adjust the account authority.
In some possible embodiments, the obtaining module 401 is specifically configured to:
and receiving an account management request which is submitted by a user terminal and aims at the target block chain account.
In some possible embodiments, the obtaining module 401 is further configured to:
receiving the broadcasted intelligent contract, the intelligent contract indicating the trigger condition;
and after the other nodes pass the consensus of the intelligent contract, running the intelligent contract on a virtual machine.
In some possible embodiments, the triggering condition includes that the number of nodes passing the verification reaches a preset value.
In this embodiment of the present invention, an obtaining module 401 obtains an account management request for a target blockchain account, where the blockchain account management request includes an account identifier and an operation type of the target blockchain account, a broadcasting module 402 broadcasts the account management request to other nodes in the plurality of nodes, so that the other nodes perform consensus verification on the account management request and broadcast consensus verification results after respective signatures, further, a detecting module 403 detects whether the consensus verification results after signatures of the other nodes satisfy a trigger condition by invoking an intelligent contract, and if so, a managing module 404 invokes the intelligent contract to manage accounts included in a blockchain according to the account identifier and the operation type of the target blockchain account. By implementing the method, the accounts can be managed conveniently and efficiently by using the intelligent contracts, and the logic of account management can be flexibly changed.
Fig. 5 is a schematic structural diagram of a node device according to an embodiment of the present invention. The node device described in this embodiment includes: a processor 501, a memory 502, and a network interface 503. The processor 501, the memory 502, and the network interface 503 may exchange data with each other.
The Processor 501 may be a Central Processing Unit (CPU), and may also be other general purpose processors, Digital Signal Processors (DSP), Application Specific Integrated Circuits (ASIC), Field-Programmable Gate arrays (FPGA) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and so on. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 502 may include both read-only memory and random access memory, and provides program instructions and data to the processor 501. A portion of the memory 502 may also include non-volatile random access memory. Wherein, the processor 501, when calling the program instruction, is configured to perform:
acquiring an account management request aiming at a target block chain account, wherein the block chain account management request comprises an account identifier and an operation type of the target block chain account;
broadcasting the account management request to other nodes in the plurality of nodes so that the other nodes perform consensus verification on the account management request and broadcast respective signed consensus verification results;
detecting whether the consensus verification result signed by the other nodes meets the triggering condition by calling an intelligent contract;
and if so, calling the intelligent contract to manage the accounts included in the block chain according to the account identification of the target block chain account and the operation type.
In some possible embodiments, the processor 501 is specifically configured to:
if the operation type is the added account, calling the intelligent contract to add the target block chain account into a block chain according to the account identification of the target block chain account;
if the operation type is account deletion, calling the intelligent contract to delete the target block chain account from the block chain according to the account identification of the target block chain account;
if the operation type is the adjustment of the account authority, the intelligent contract is called to adjust the authority of the target block chain account recorded in the block chain according to the account identification of the target block chain account;
and if the operation type is the inquiry account information, calling the intelligent contract to inquire the account information of the target block chain account from the block chain according to the account identification of the target block chain account.
In some possible embodiments, the processor 501 is specifically configured to:
decrypting the signed consensus verification result broadcasted by each node by using a public key corresponding to each node in the other nodes to obtain the consensus verification result of each node;
and detecting whether the consensus verification result of each node meets the triggering condition or not by calling an intelligent contract.
In some possible embodiments, the processor 501 is specifically configured to:
calling the intelligent contract to detect the account state of each block chain account included in the block chain;
determining a target blockchain account from the blockchain accounts according to the account state of each blockchain account;
generating an account management request for the target blockchain account.
In some possible embodiments, the processor 501 is specifically configured to:
determining a blockchain account with an abnormal account state from the blockchain accounts according to the account state of each blockchain account;
taking the block chain account with the abnormal account state as a target block chain account;
and the operation type is to delete the account or adjust the account authority.
In some possible embodiments, the processor 501 is specifically configured to:
and receiving an account management request which is submitted by a user terminal and aims at the target block chain account.
In some possible embodiments, the processor 501 is further configured to:
receiving the broadcasted intelligent contract, the intelligent contract indicating the trigger condition;
and after the other nodes pass the consensus of the intelligent contract, running the intelligent contract on a virtual machine.
In some possible embodiments, the triggering condition includes that the number of nodes passing the verification reaches a preset value.
In a specific implementation, the processor 501, the memory 502, and the network interface 503 described in this embodiment of the present invention may execute the implementation manner described in the account management method provided in fig. 2 or fig. 3 in the embodiment of the present invention, and may also execute the implementation manner of the account management apparatus described in fig. 4 in the embodiment of the present invention, which is not described herein again.
In the embodiment of the present invention, the processor 501 obtains an account management request for a target blockchain account, where the blockchain account management request includes an account identifier and an operation type of the target blockchain account, broadcasts the account management request to other nodes in the plurality of nodes, so that the other nodes perform consensus verification on the account management request, and broadcasts a consensus verification result after each signature, further, detects whether the consensus verification result obtained after the signature of the other nodes meets a trigger condition by invoking an intelligent contract, and if so, invokes the intelligent contract to manage accounts included in a blockchain according to the account identifier and the operation type of the target blockchain account. By implementing the method, the accounts can be managed conveniently and efficiently by using the intelligent contracts, and the logic of account management can be flexibly changed.
An embodiment of the present invention further provides a computer storage medium, where program instructions are stored in the computer storage medium, and when the program is executed, the computer storage medium may include some or all of the steps of the account management method in the embodiment corresponding to fig. 2 or fig. 3.
It should be noted that, for simplicity of description, the above-mentioned embodiments of the method are described as a series of acts or combinations, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The account management method, the account management device, and the computer-readable storage medium according to the embodiments of the present invention are described in detail above, and a specific example is applied in the description to explain the principles and the embodiments of the present invention, and the description of the above embodiments is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. An account management method applied to a blockchain network, wherein the blockchain network comprises a plurality of nodes, the method comprising:
acquiring an account management request aiming at a target block chain account, wherein the block chain account management request comprises an account identifier and an operation type of the target block chain account;
broadcasting the account management request to other nodes in the plurality of nodes so that the other nodes perform consensus verification on the account management request and broadcast respective signed consensus verification results;
detecting whether the consensus verification result signed by the other nodes meets the triggering condition by calling an intelligent contract;
and if so, calling the intelligent contract to manage the accounts included in the block chain according to the account identification of the target block chain account and the operation type.
2. The method of claim 1, wherein invoking the smart contract to manage accounts included in a blockchain according to the account identification of the target blockchain account and the operation type comprises:
if the operation type is the added account, calling the intelligent contract to add the target block chain account into a block chain according to the account identification of the target block chain account;
if the operation type is account deletion, calling the intelligent contract to delete the target block chain account from the block chain according to the account identification of the target block chain account;
if the operation type is the adjustment of the account authority, the intelligent contract is called to adjust the authority of the target block chain account recorded in the block chain according to the account identification of the target block chain account;
and if the operation type is the inquiry account information, calling the intelligent contract to inquire the account information of the target block chain account from the block chain according to the account identification of the target block chain account.
3. The method according to claim 1, wherein the detecting whether the signed consensus verification result of the other node meets the trigger condition by invoking an intelligent contract comprises:
decrypting the signed consensus verification result broadcasted by each node by using a public key corresponding to each node in the other nodes to obtain the consensus verification result of each node;
and detecting whether the consensus verification result of each node meets the triggering condition or not by calling an intelligent contract.
4. The method of any one of claims 1 to 3, wherein the obtaining an account management request for a target blockchain account comprises:
calling the intelligent contract to detect the account state of each block chain account included in the block chain;
determining a target blockchain account from the blockchain accounts according to the account state of each blockchain account;
generating an account management request for the target blockchain account.
5. The method of claim 4, wherein determining a target blockchain account from the respective blockchain accounts based on the account status of the respective blockchain account comprises:
determining a blockchain account with an abnormal account state from the blockchain accounts according to the account state of each blockchain account;
taking the block chain account with the abnormal account state as a target block chain account;
and the operation type is to delete the account or adjust the account authority.
6. The method of claim 1, wherein obtaining an account management request for a target blockchain account comprises:
and receiving an account management request which is submitted by a user terminal and aims at the target block chain account.
7. The method of claim 1, wherein prior to obtaining the account management request for the target blockchain account, the method further comprises:
receiving the broadcasted intelligent contract, the intelligent contract indicating the trigger condition;
and after the other nodes pass the consensus of the intelligent contract, running the intelligent contract on a virtual machine.
8. The method of claim 1, wherein the triggering condition comprises that the number of nodes passing the verification reaches a preset value.
9. An account management apparatus, the apparatus comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring an account management request aiming at a target block chain account, and the block chain account management request comprises an account identifier and an operation type of the target block chain account;
a broadcasting module, configured to broadcast the account management request to other nodes in the multiple nodes, so that the other nodes perform consensus verification on the account management request and broadcast consensus verification results after respective signatures;
the detection module is used for detecting whether the consensus verification result signed by the other nodes meets the trigger condition by calling an intelligent contract;
and if so, calling the intelligent contract to manage the accounts included in the block chain according to the account identification of the target block chain account and the operation type.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program comprising program instructions that, when executed by a processor, cause the processor to carry out the method according to any one of claims 1-8.
CN201910902281.2A 2019-09-23 2019-09-23 Account management method, account management device and computer readable storage medium Active CN110597918B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910902281.2A CN110597918B (en) 2019-09-23 2019-09-23 Account management method, account management device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910902281.2A CN110597918B (en) 2019-09-23 2019-09-23 Account management method, account management device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN110597918A true CN110597918A (en) 2019-12-20
CN110597918B CN110597918B (en) 2024-05-28

Family

ID=68862425

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910902281.2A Active CN110597918B (en) 2019-09-23 2019-09-23 Account management method, account management device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110597918B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111369246A (en) * 2020-03-02 2020-07-03 万翼科技有限公司 Calling authentication method and device of intelligent contract, electronic equipment and storage medium
CN111506901A (en) * 2020-04-16 2020-08-07 腾讯科技(深圳)有限公司 Data processing method based on block chain, terminal and storage medium
CN112104705A (en) * 2020-08-21 2020-12-18 达闼机器人有限公司 Identification generation method and device, storage medium and electronic equipment
CN112561460A (en) * 2020-04-02 2021-03-26 北京京东振世信息技术有限公司 Information processing method, system, equipment and computer storage medium
CN112819468A (en) * 2021-02-24 2021-05-18 浙江蓝景科技有限公司 Intelligent contract processing method and device and electronic equipment
CN112822159A (en) * 2020-12-28 2021-05-18 杭州趣链科技有限公司 Permission control method and device for block chain account, electronic equipment and storage medium
CN113487315A (en) * 2021-07-12 2021-10-08 网易(杭州)网络有限公司 Account contract processing method, device, equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107332701A (en) * 2017-06-26 2017-11-07 中国人民银行数字货币研究所 The method and system of management node
CN107993149A (en) * 2017-12-18 2018-05-04 深圳前海微众银行股份有限公司 Account information management method, system and readable storage medium storing program for executing
WO2018175540A1 (en) * 2017-03-24 2018-09-27 Alibaba Group Holding Limited Method and apparatus for consensus verification
CN109523385A (en) * 2018-12-07 2019-03-26 深圳市智税链科技有限公司 Method, accounting nodes and the medium of Transaction Information are inquired in block chain network
KR101975213B1 (en) * 2019-02-14 2019-05-07 해치랩스 주식회사 System for performing verification of block chain smart contract basis transaction
CN109831425A (en) * 2019-01-25 2019-05-31 中国联合网络通信集团有限公司 Block chain common recognition method, apparatus, equipment and computer readable storage medium
WO2019120326A2 (en) * 2019-03-29 2019-06-27 Alibaba Group Holding Limited Managing sensitive data elements in a blockchain network
TW201935299A (en) * 2018-02-12 2019-09-01 林俊良 Blockchain system, node server and method for processing strategy model scripts of financial assets

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018175540A1 (en) * 2017-03-24 2018-09-27 Alibaba Group Holding Limited Method and apparatus for consensus verification
CN107332701A (en) * 2017-06-26 2017-11-07 中国人民银行数字货币研究所 The method and system of management node
CN107993149A (en) * 2017-12-18 2018-05-04 深圳前海微众银行股份有限公司 Account information management method, system and readable storage medium storing program for executing
TW201935299A (en) * 2018-02-12 2019-09-01 林俊良 Blockchain system, node server and method for processing strategy model scripts of financial assets
CN109523385A (en) * 2018-12-07 2019-03-26 深圳市智税链科技有限公司 Method, accounting nodes and the medium of Transaction Information are inquired in block chain network
CN109831425A (en) * 2019-01-25 2019-05-31 中国联合网络通信集团有限公司 Block chain common recognition method, apparatus, equipment and computer readable storage medium
KR101975213B1 (en) * 2019-02-14 2019-05-07 해치랩스 주식회사 System for performing verification of block chain smart contract basis transaction
WO2019120326A2 (en) * 2019-03-29 2019-06-27 Alibaba Group Holding Limited Managing sensitive data elements in a blockchain network

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
呼阳;陈亮;: "基于区块链的生产线数据共享方案研究", 国外电子测量技术, no. 05 *
呼阳;陈亮;: "基于区块链的生产线数据共享方案研究", 国外电子测量技术, no. 05, 15 May 2019 (2019-05-15) *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111369246A (en) * 2020-03-02 2020-07-03 万翼科技有限公司 Calling authentication method and device of intelligent contract, electronic equipment and storage medium
CN112561460A (en) * 2020-04-02 2021-03-26 北京京东振世信息技术有限公司 Information processing method, system, equipment and computer storage medium
CN111506901A (en) * 2020-04-16 2020-08-07 腾讯科技(深圳)有限公司 Data processing method based on block chain, terminal and storage medium
CN111506901B (en) * 2020-04-16 2023-09-05 腾讯科技(深圳)有限公司 Block chain-based data processing method, terminal and storage medium
CN112104705A (en) * 2020-08-21 2020-12-18 达闼机器人有限公司 Identification generation method and device, storage medium and electronic equipment
CN112104705B (en) * 2020-08-21 2023-10-24 达闼机器人股份有限公司 Identification generation method and device, storage medium and electronic equipment
CN112822159A (en) * 2020-12-28 2021-05-18 杭州趣链科技有限公司 Permission control method and device for block chain account, electronic equipment and storage medium
CN112819468A (en) * 2021-02-24 2021-05-18 浙江蓝景科技有限公司 Intelligent contract processing method and device and electronic equipment
CN113487315A (en) * 2021-07-12 2021-10-08 网易(杭州)网络有限公司 Account contract processing method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN110597918B (en) 2024-05-28

Similar Documents

Publication Publication Date Title
CN110661658B (en) Node management method and device of block chain network and computer storage medium
CN110597918B (en) Account management method, account management device and computer readable storage medium
WO2021036545A1 (en) Smart contract-based data processing method, and device and storage medium
CN110569251A (en) Data processing method, related equipment and computer readable storage medium
CN111523890B (en) Block chain-based data processing method, device, storage medium and equipment
CN111343142A (en) Data processing method and device based on block chain network and storage medium
CN111464353B (en) Block link point management method, device, computer and readable storage medium
CN111698315B (en) Data processing method and device for block and computer equipment
CN111460458B (en) Data processing method, related device and computer storage medium
CN110008665B (en) Authority control method and device for blockchain
CN111885050B (en) Data storage method and device based on block chain network, related equipment and medium
EP3178011A1 (en) Method and system for facilitating terminal identifiers
CN111447069B (en) Low-frequency access data processing method based on block chain
EP3598333B1 (en) Electronic device update management
CN112651001A (en) Access request authentication method, device, equipment and readable storage medium
CN111488626A (en) Data processing method, device, equipment and medium based on block chain
CN111353136B (en) Method and device for processing operation request
CN113886495A (en) Method and device for verifying block chain data, electronic equipment and storage medium
CN111327680B (en) Authentication data synchronization method, device, system, computer equipment and storage medium
CN114584326B (en) Block chain data processing method and device, electronic equipment and storage medium
CN115328509A (en) Algorithm changing method, device, computer equipment and storage medium
CN114490135A (en) Task processing method and device, electronic equipment and storage medium
CN113327108B (en) Transaction processing method, related equipment and computer storage medium
US20240223390A1 (en) Blockchain system
CN115002218B (en) Traffic distribution method, traffic distribution device, computer equipment and storage medium

Legal Events

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