CN110597918B - Account management method, account management device and computer readable storage medium - Google Patents

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

Info

Publication number
CN110597918B
CN110597918B CN201910902281.2A CN201910902281A CN110597918B CN 110597918 B CN110597918 B CN 110597918B CN 201910902281 A CN201910902281 A CN 201910902281A CN 110597918 B CN110597918 B CN 110597918B
Authority
CN
China
Prior art keywords
account
blockchain
nodes
intelligent contract
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910902281.2A
Other languages
Chinese (zh)
Other versions
CN110597918A (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 for a target blockchain account, wherein the blockchain account management request comprises an account identifier and an operation type of the target blockchain 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 broadcasting the consensus verification results after the respective signatures; detecting whether the signed consensus verification result of other nodes meets the triggering condition or not by calling an intelligent contract; and if yes, calling the intelligent contract to manage the account included in the blockchain according to the account identifier of the target blockchain account and the operation type. By implementing the method, the account can be managed conveniently and efficiently by utilizing the intelligent contract, and the logic of account management can be flexibly changed.

Description

Account management method, account management device and computer readable storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and apparatus for account management, 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 decentralised distributed ledger technology, and information stored on a blockchain cannot be forged and tampered. A smart contract is a non-tamperable, automatically executing computer program that runs on a blockchain. Nodes on the blockchain may implement various transactions by invoking smart contracts.
In the current blockchain system, the blockchain account management is usually written in a native language, and an account management module is built in a blockchain code, so that when the account management function needs to be changed, the operation is complex, all node configurations in the blockchain network need to be restarted, and the upgrading and maintenance of the blockchain are not facilitated.
Disclosure of Invention
The embodiment of the invention provides an account management method, an account management device and a computer readable storage medium, which can conveniently and efficiently manage accounts by utilizing intelligent contracts and 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 for a target blockchain account, wherein the blockchain account management request comprises an account identifier and an operation type of the target blockchain 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 broadcasting the consensus verification results after the respective signatures;
Detecting whether the signed consensus verification result of other nodes meets the triggering condition or not by calling an intelligent contract;
And if yes, calling the intelligent contract to manage the account included in the blockchain according to the account identifier of the target blockchain account and the operation type.
The second aspect of the embodiment of the invention discloses an account management device, which comprises:
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 blockchain account, and the blockchain account management request comprises an account identifier and an operation type of the target blockchain account;
The broadcasting module is used for 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 the consensus verification result after the signature;
The detection module is used for detecting whether the signed consensus verification result of the other nodes meets the triggering condition or not by calling the intelligent contract;
And the management module is used for calling the intelligent contract to manage the account included in the blockchain according to the account identifier of the target blockchain account and the operation type if the target blockchain account is the same as the target blockchain account.
A third aspect of the embodiments of the present invention discloses a node device, comprising a processor, a memory and a network interface, the processor, the memory and the network interface being connected to each other, wherein the memory is configured to store a computer program, the computer program comprising program instructions, the processor being configured to invoke the program instructions to perform the method of the first aspect.
A fourth aspect of the embodiments of the present invention discloses a computer readable storage medium, characterized in that the computer storage medium stores a computer program comprising program instructions which, when executed by a processor, cause the processor to perform the method of the first aspect described above.
In the embodiment of the invention, a node of a blockchain network acquires an account management request aiming at a target blockchain account, wherein the blockchain account management request comprises an account identifier and an operation type of the target blockchain account, the node of the blockchain 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 the respective signed consensus verification results, and further, the node of the blockchain network detects whether the signed consensus verification results of the other nodes meet a triggering condition by calling an intelligent contract, and if yes, the node of the blockchain network calls the intelligent contract to manage the account included in the blockchain according to the account identifier and the operation type of the target blockchain account. By implementing the method, the account can be managed conveniently and efficiently by utilizing the intelligent contract, and the logic of account management can be flexibly changed.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1a is a schematic diagram of an account management system according to an embodiment of the present invention;
FIG. 1b is a block chain architecture diagram according to an embodiment of the present invention;
FIG. 1c is a schematic diagram illustrating a process of generating a new block according to an embodiment of the present invention;
FIG. 1d is a schematic deployment diagram of an account management contract provided by an embodiment of the present invention;
FIG. 1e is a schematic deployment diagram of an account management module as disclosed in the prior art;
FIG. 2 is a schematic flow chart of an account management method according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating another account management method according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of an account management device according to an embodiment of the present invention;
Fig. 5 is a schematic structural diagram of a node device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Aiming at the problems of complex operation, low efficiency and the like commonly existing in the prior art of changing account management functions, the embodiment of the invention provides an account management method which can conveniently and efficiently manage accounts by utilizing intelligent contracts and flexibly change the logic of account management.
Referring to fig. 1a, an architecture diagram of an account management system according to an embodiment of the present invention includes a blockchain network 10 and a user terminal 102, wherein:
the blockchain network 10 refers to a network for data sharing from node to node, and a plurality of nodes 101 may be included in the blockchain network. Each node 101 may receive input information while operating normally and maintain shared data (i.e., blockchains) within the blockchain network based on the received input information. In order To ensure information intercommunication in the blockchain network, information connection can exist between every two nodes, point-To-point (P2P) communication can be realized between any two nodes, and particularly P2P communication can be performed 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, an on-board smart terminal, etc., which is not limited in the embodiment of the present invention.
It should be noted that the number of nodes shown in fig. 1a is merely illustrative, and any number of nodes may be deployed according to actual needs.
Each node in the blockchain network has a node identifier corresponding to the node identifier, and each node in the blockchain network can store the node identifiers of other nodes in the blockchain network, so that the generated blocks can be broadcast to other nodes in the blockchain network according to the node identifiers of the other nodes. Each node can maintain a node identification list shown in the following table, and the node names and the node identifications are correspondingly stored in the node identification list. The node identifier may be an internet protocol (Internet Protocol, IP) address, or any other information that can be used to identify the node, and the table is described only by way of example as an IP address.
Wherein each node in the blockchain network stores one and the same blockchain. The blockchain is composed of a plurality of blocks, see fig. 1b, the blockchain 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 time stamp 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 father 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 father 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 are associated with the block data stored in the father block, and the safety of the input information in the block is ensured.
When each block in the blockchain is generated, referring to fig. 1c, when the node where the blockchain is located receives input information, checking the input information, after the checking is completed, storing the input information into a memory pool, and updating a hash tree used for recording the input information; then, updating the update time stamp to the time of receiving the input information, trying different random numbers, and calculating the characteristic value for a plurality of times, so that the calculated characteristic value can meet the following formula:
Wherein SHA256 is a eigenvalue algorithm used to calculate eigenvalues; version (version number) is version information of the related block protocol in the block chain; the prev_hash is the block header characteristic value of the parent block of the current block; merkle _root is a characteristic value of input information; ntime is the update time of the update timestamp; the nbits is the current difficulty, is a fixed value in a period of time, and is determined again after exceeding a fixed period of time; x is a random number; TARGET is a eigenvalue threshold that can be determined from nbits.
Thus, when the random number meeting the formula is calculated, the information can be correspondingly stored to generate the block head and the block main body, and the current block is obtained. And then, the node where the blockchain is located sends the newly generated blocks to other nodes in the blockchain network where the newly generated blocks are located according to the node identifications of other nodes in the blockchain network, the other nodes verify the newly generated blocks, and the newly generated blocks are added into the blockchain stored in the newly generated blocks after the verification is completed.
The intelligent contract is a code implementation for executing when a certain condition is met, a developer can define contract logic through a programming language, issue the contract logic to a blockchain (intelligent contract registration), call a key or trigger execution according to the logic of contract clauses to complete the contract logic, and simultaneously provide functions of upgrading and logging off the intelligent contract.
In some possible embodiments, the node 101 of the 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, and 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, broadcast a respective signed consensus verification result, and the node 101 detects whether the signed consensus verification result of the other nodes meets a triggering condition by invoking an intelligent contract, if yes, the node 101 invokes the intelligent contract to manage an account included in the blockchain according to the account identifier and the operation type of the target blockchain account, thereby managing the account conveniently and efficiently by using the intelligent contract, and flexibly changing logic of account management.
In some possible embodiments, the node 101 of the blockchain network decrypts the signed consensus verification result broadcast 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 triggering condition by calling the 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 implementations, as shown in fig. 1d, in the embodiment of the present invention, the management of the blockchain account is implemented by an account management contract (i.e., an intelligent contract), which may run on a virtual machine of a node, and compared with the prior art as shown in fig. 1e, in which an account management module for account management is deployed in blockchain code and written in a native language of the blockchain, when the function of the account management module is changed, the configuration of all the nodes needs to be restarted, while in the embodiment of the present invention, the account management can be implemented in the form of the intelligent contract, on one hand, the account management can be conveniently and efficiently managed, and on the other hand, the account management logic can be flexibly changed by issuing a new contract, without restarting the configuration of all the nodes.
The implementation details of the technical scheme of the embodiment of the invention are described in detail below:
Referring to fig. 2, a flow chart of an account management method provided by the account management system shown in fig. 1a according to an embodiment of the present invention 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 obtains an account management request for a target blockchain account, the blockchain account management request including an account identification and an operation type of the target blockchain account.
Where the blockchain account records the amount of resources held by the user, such as bitcoin, bank deposit, bond/stock held, and the like.
Specifically, a node of the blockchain network may obtain an account management request for a target blockchain account, the blockchain account management request including an account identification and an operation type of the target blockchain account. The account identifier of the target blockchain account is used for indicating the target blockchain account in the blockchain, and the operation type of the target blockchain account can be adding an account, deleting an account, adjusting account authority or inquiring account information, and the node can be any one of a plurality of nodes included in the blockchain network.
202: The node broadcasts an 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 result after the signature.
Specifically, when a node of the blockchain network obtains an account management request for a target blockchain account, the account management request is broadcast to other nodes in a 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 sign the account management request by using private keys corresponding to the other nodes respectively, and each node in the other nodes broadcasts a consensus verification result after signing the account management request in the blockchain network.
203: And the node detects whether the signed consensus verification result of other nodes meets the triggering condition by calling the intelligent contract.
Specifically, the nodes of the blockchain network call the intelligent contract, detect whether the common identification verification result signed by all other nodes meets the triggering condition, and judge whether to manage accounts included in the blockchain according to whether the triggering condition is met. Wherein 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), the number of nodes passing verification may be set to be greater than or equal to N/2 or
204: If yes, the node calls the intelligent contract to manage the accounts included in the blockchain according to the account identification and the operation type of the target blockchain account.
Specifically, when the node detects that the common identification verification result signed by other nodes meets the triggering condition by calling the intelligent contract, the node calls the intelligent contract to manage the account included in the blockchain according to the account identifier and the operation type of the target blockchain account. For example, if the operation type of the blockchain account management request is an add account, invoking the intelligent contract to add the target blockchain account to the blockchain according to the account identification of the target blockchain account; if the operation type of the blockchain account management request is a deletion account, calling an intelligent contract to delete the target blockchain account from the blockchain according to the account identifier of the target blockchain account; if the operation type of the blockchain account management request is the adjustment account authority, invoking an intelligent contract to adjust the authority of a target blockchain account recorded in the blockchain according to the account identifier of the target blockchain account; and if the operation type of the blockchain account management request is the inquiring account information, invoking the intelligent contract to inquire the account information of the target blockchain account from the blockchain according to the account identification of the target blockchain account.
In some possible embodiments, when the account management logic needs to be changed, a new intelligent contract is directly broadcast to the blockchain network, and the new intelligent contract is used for replacing the original intelligent contract, so that the blockchain account is 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 blockchain network acquires an account management request aiming at a target blockchain account, wherein the blockchain account management request comprises an account identifier and an operation type of the target blockchain account, the node of the blockchain 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 the respective signed consensus verification results, and further, the node of the blockchain network detects whether the signed consensus verification results of the other nodes meet a triggering condition by calling an intelligent contract, and if yes, the node of the blockchain network calls the intelligent contract to manage the account included in the blockchain according to the account identifier and the operation type of the target blockchain account. By implementing the method, the account can be managed conveniently and efficiently by utilizing the intelligent contract, and the logic of account management can be flexibly changed.
Referring to fig. 3, a flow chart of another account management method provided by the account management system shown in fig. 1a according to an embodiment of the present invention 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:
301: the node obtains an account management request for a target blockchain account, the blockchain account management request including an account identification and an operation type of the target blockchain account.
In some possible embodiments, the obtaining, by the node of the blockchain network, an account management request for the target blockchain account may be a call to an intelligent contract to detect an account state of each blockchain account included in the blockchain, determine, from each blockchain account, the target blockchain account according to the account state of each blockchain account, and generate the account management request for the target blockchain account. Determining the target blockchain account from the blockchain accounts according to the account states of the blockchain accounts may be determining a blockchain account with abnormal account states from the blockchain accounts according to the account states of the blockchain accounts, wherein the abnormal account states may be malicious accounts, non-working accounts and the like, and taking the blockchain account with abnormal account states as the target blockchain account, wherein the operation type is to delete the account or adjust the account authority.
In some possible implementations, the node of the blockchain network obtaining the account management request for the target blockchain account may be receiving an account management request submitted by the user terminal for the target blockchain account.
302: The node broadcasts an 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 result after the signature.
303: And the node decrypts the signed consensus verification result broadcast 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 nodes of the blockchain network decrypt the signed consensus verification result broadcast by each node by using the public key corresponding to each node in other nodes to obtain the consensus verification result of each node.
304: The node detects whether the consensus verification result of each node meets the triggering condition by calling the intelligent contract.
Specifically, nodes of the blockchain network call intelligent contracts, whether the common identification verification result of each node meets the triggering conditions is detected, and whether accounts included in the blockchain are to be managed is judged according to whether the triggering conditions are met.
In some possible implementations, a node of the blockchain network receives a broadcasted smart contract before acquiring an account management request for a target blockchain account, the smart contract indicating a trigger condition, and runs the smart contract on the virtual machine after other nodes have passed the smart contract consensus.
305: If yes, the node calls the intelligent contract to manage the accounts included in the blockchain according to the account identification and the operation type of the target blockchain account.
Specifically, for the specific implementation of steps 302, 304, 305, reference may be made to the descriptions related to steps 202, 203, 204 in the above embodiments, which are not repeated herein.
In the embodiment of the invention, a node of a blockchain network acquires an account management request aiming at a target blockchain account, wherein the blockchain account management request comprises an account identifier and an operation type of the target blockchain account, the node of the blockchain 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 the respective signed consensus verification results, and further, the node of the blockchain network decrypts the signed consensus verification results broadcast by the nodes by utilizing public keys corresponding to the nodes in the other nodes to obtain the consensus verification results of the nodes, and detects whether the consensus verification results of the nodes meet triggering conditions or not by calling intelligent contracts, if yes, the intelligent contracts are called to manage the accounts included in the blockchain according to the account identifier and the operation type of the target blockchain account. By implementing the method, the account can be managed conveniently and efficiently by utilizing the intelligent contract, 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 blockchain 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 a consensus verification result after each signature;
a detection module 403, configured to detect whether the signed consensus verification result of the other nodes meets a triggering condition by invoking an intelligent contract;
And the management module 404 is configured to, if yes, invoke the intelligent contract to manage the account included in the blockchain according to the account identifier of the target blockchain account and the operation type.
In some possible embodiments, the management module 404 is specifically configured to:
if the operation type is an added account, calling the intelligent contract to add the target blockchain account into a blockchain according to the account identifier of the target blockchain account;
if the operation type is the deletion account, calling the intelligent contract to delete the target blockchain account from the blockchain according to the account identifier of the target blockchain account;
If the operation type is the adjustment account authority, invoking the intelligent contract to adjust the authority of the target blockchain account recorded in the blockchain according to the account identifier of the target blockchain account;
and if the operation type is inquiring account information, invoking the intelligent contract to inquire the account information of the target blockchain account from the blockchain according to the account identifier of the target blockchain account.
In some possible embodiments, the detection module 403 is specifically configured to:
decrypting the signed consensus verification result broadcast 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 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:
Invoking the intelligent contract to detect account states of all blockchain accounts included in the blockchain;
determining a target blockchain account from the blockchain accounts according to the account states of the blockchain accounts;
an account management request is generated for the target blockchain account.
In some possible embodiments, the obtaining module 401 is specifically configured to:
determining blockchain accounts with abnormal account states from the blockchain accounts according to the account states of the blockchain accounts;
taking the blockchain account with abnormal account state as a target blockchain account;
The operation type is to delete an account or adjust account authority.
In some possible embodiments, the obtaining module 401 is specifically configured to:
and receiving an account management request for the target blockchain account submitted by the user terminal.
In some possible embodiments, the obtaining module 401 is further configured to:
receiving the broadcasted smart contract, the smart contract indicating the trigger condition;
and after the other nodes pass the intelligent contract consensus, the intelligent contract is operated on a virtual machine.
In some possible embodiments, the triggering condition includes verifying that the number of passing nodes reaches a preset value.
In the embodiment of the present invention, the 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, the broadcasting module 402 broadcasts 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 the signed consensus verification result, and further, the detecting module 403 detects whether the signed consensus verification result of the other nodes meets a triggering condition by invoking an intelligent contract, if yes, the managing module 404 invokes the intelligent contract to manage the account included in the blockchain according to the account identifier and the operation type of the target blockchain account. By implementing the method, the account can be managed conveniently and efficiently by utilizing the intelligent contract, and the logic of account management can be flexibly changed.
Referring to fig. 5, a schematic structural diagram of a node device is provided in an embodiment of the present invention. The node apparatus described in the present embodiment includes: a processor 501, a memory 502 and a network interface 503. Data may be interacted between the processor 501, the memory 502, and the network interface 503.
The Processor 501 may be a central processing unit (Central Processing Unit, CPU), which may also be other general purpose processors, digital signal processors (DIGITAL SIGNAL Processor, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), off-the-shelf Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 502 may include read only memory and random access memory and provides program instructions and data to the processor 501. A portion of memory 502 may also include non-volatile random access memory. Wherein the processor 501, when calling the program instructions, is configured to execute:
acquiring an account management request for a target blockchain account, wherein the blockchain account management request comprises an account identifier and an operation type of the target blockchain 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 broadcasting the consensus verification results after the respective signatures;
Detecting whether the signed consensus verification result of other nodes meets the triggering condition or not by calling an intelligent contract;
And if yes, calling the intelligent contract to manage the account included in the blockchain according to the account identifier of the target blockchain account and the operation type.
In some possible embodiments, the processor 501 is specifically configured to:
if the operation type is an added account, calling the intelligent contract to add the target blockchain account into a blockchain according to the account identifier of the target blockchain account;
if the operation type is the deletion account, calling the intelligent contract to delete the target blockchain account from the blockchain according to the account identifier of the target blockchain account;
If the operation type is the adjustment account authority, invoking the intelligent contract to adjust the authority of the target blockchain account recorded in the blockchain according to the account identifier of the target blockchain account;
and if the operation type is inquiring account information, invoking the intelligent contract to inquire the account information of the target blockchain account from the blockchain according to the account identifier of the target blockchain account.
In some possible embodiments, the processor 501 is specifically configured to:
decrypting the signed consensus verification result broadcast 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 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:
Invoking the intelligent contract to detect account states of all blockchain accounts included in the blockchain;
determining a target blockchain account from the blockchain accounts according to the account states of the blockchain accounts;
an account management request is generated for the target blockchain account.
In some possible embodiments, the processor 501 is specifically configured to:
determining blockchain accounts with abnormal account states from the blockchain accounts according to the account states of the blockchain accounts;
taking the blockchain account with abnormal account state as a target blockchain account;
The operation type is to delete an account or adjust account authority.
In some possible embodiments, the processor 501 is specifically configured to:
and receiving an account management request for the target blockchain account submitted by the user terminal.
In some possible embodiments, the processor 501 is further configured to:
receiving the broadcasted smart contract, the smart contract indicating the trigger condition;
and after the other nodes pass the intelligent contract consensus, the intelligent contract is operated on a virtual machine.
In some possible embodiments, the triggering condition includes verifying that the number of passing nodes reaches a preset value.
In specific implementation, the processor 501, the memory 502 and the network interface 503 described in the embodiment of the present invention may perform the implementation described in the account management method provided in fig. 2 or fig. 3, and may also perform the implementation of the account management device described in fig. 4, which are not described herein.
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 multiple nodes, so that the other nodes perform consensus verification on the account management request, broadcast the respective signed consensus verification results, and further, detect whether the signed consensus verification results of the other nodes meet a triggering condition by calling an intelligent contract, if yes, call the intelligent contract to manage the account included in the blockchain according to the account identifier and the operation type of the target blockchain account. By implementing the method, the account can be managed conveniently and efficiently by utilizing the intelligent contract, and the logic of account management can be flexibly changed.
The embodiment of the invention also provides a computer storage medium, and the computer storage medium stores program instructions, and the program can include part or all of the steps of the account management method in the corresponding embodiment of fig. 2 or fig. 3 when being executed.
It should be noted that, for simplicity of description, the foregoing method embodiments are all expressed as a series of action combinations, but it should be understood by those skilled in the art that the present application is not limited by the order of action described, as some steps may be performed in other order or simultaneously according to the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required for the present application.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be implemented by a program to instruct related hardware, the program may be stored in a computer readable storage medium, and the storage medium may include: flash disk, read-Only Memory (ROM), random-access Memory (Random Access Memory, RAM), magnetic disk or optical disk, etc.
The foregoing has described in detail the methods, apparatuses and computer readable storage medium for account management according to embodiments of the present invention, and specific examples have been applied to illustrate the principles and implementations of the present invention, where the foregoing examples are provided to assist in understanding the methods and core ideas of the present invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.

Claims (8)

1. An account management method applied to a blockchain network, the blockchain network including a plurality of nodes, the method comprising:
acquiring an account management request for a target blockchain account, wherein the blockchain account management request comprises an account identifier and an operation type of the target blockchain 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 broadcasting the consensus verification results after the respective signatures;
Detecting whether the signed consensus verification result of other nodes meets the triggering condition or not by calling an intelligent contract;
if yes, calling the intelligent contract to manage the account included in the blockchain according to the account identifier of the target blockchain account and the operation type;
The obtaining the account management request for the target blockchain account includes:
Invoking the intelligent contract to detect account states of all blockchain accounts included in the blockchain; the blockchain account is used for recording the resource quantity held by a user;
determining a target blockchain account from the blockchain accounts according to the account states of the blockchain accounts;
generating an account management request for the target blockchain account;
The step of detecting whether the common identification verification result signed by the other nodes meets the triggering condition by calling an intelligent contract comprises the following steps:
decrypting the signed consensus verification result broadcast 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 detecting whether the consensus verification result of each node meets the triggering condition or not by calling an intelligent contract.
2. The method of claim 1, wherein the invoking the intelligent contract to manage accounts included in a blockchain based on account identification of the target blockchain account and the operation type comprises:
if the operation type is an added account, calling the intelligent contract to add the target blockchain account into a blockchain according to the account identifier of the target blockchain account;
if the operation type is the deletion account, calling the intelligent contract to delete the target blockchain account from the blockchain according to the account identifier of the target blockchain account;
If the operation type is the adjustment account authority, invoking the intelligent contract to adjust the authority of the target blockchain account recorded in the blockchain according to the account identifier of the target blockchain account;
and if the operation type is inquiring account information, invoking the intelligent contract to inquire the account information of the target blockchain account from the blockchain according to the account identifier of the target blockchain account.
3. The method of claim 1, wherein the determining the target blockchain account from the blockchain accounts according to the account status of the blockchain accounts comprises:
determining blockchain accounts with abnormal account states from the blockchain accounts according to the account states of the blockchain accounts;
taking the blockchain account with abnormal account state as a target blockchain account;
The operation type is to delete an account or adjust account authority.
4. The method of claim 1, wherein the obtaining an account management request for a target blockchain account comprises:
and receiving an account management request for the target blockchain account submitted by the user terminal.
5. The method of claim 1, wherein prior to the obtaining the account management request for the target blockchain account, the method further comprises:
receiving the broadcasted smart contract, the smart contract indicating the trigger condition;
and after the other nodes pass the intelligent contract consensus, the intelligent contract is operated on a virtual machine.
6. The method of claim 1, wherein the trigger condition comprises verifying that the number of passing nodes reaches a preset value.
7. 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 blockchain account, and the blockchain account management request comprises an account identifier and an operation type of the target blockchain account;
The broadcasting module is used for 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 the consensus verification result after the signature;
The detection module is used for detecting whether the signed consensus verification result of the other nodes meets the triggering condition or not by calling the intelligent contract;
The management module is used for calling the intelligent contract to manage the account included in the blockchain according to the account identifier of the target blockchain account and the operation type if the target blockchain account is the same as the target blockchain account;
The acquiring module is specifically configured to:
Invoking the intelligent contract to detect account states of all blockchain accounts included in the blockchain; the blockchain account is used for recording the resource quantity held by a user;
determining a target blockchain account from the blockchain accounts according to the account states of the blockchain accounts;
generating an account management request for the target blockchain account;
the detection module is specifically configured to:
decrypting the signed consensus verification result broadcast 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 detecting whether the consensus verification result of each node meets the triggering condition or not by calling an intelligent contract.
8. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program comprising program instructions which, when executed by a processor, cause the processor to perform the method of any of claims 1-6.
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 CN110597918A (en) 2019-12-20
CN110597918B true 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)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111369246B (en) * 2020-03-02 2023-06-06 万翼科技有限公司 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
CN111506901B (en) * 2020-04-16 2023-09-05 腾讯科技(深圳)有限公司 Block chain-based data processing method, terminal and storage medium
CN112104705B (en) * 2020-08-21 2023-10-24 达闼机器人股份有限公司 Identification generation method and device, storage medium and electronic equipment
CN112822159B (en) * 2020-12-28 2022-08-16 杭州趣链科技有限公司 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

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
呼阳 ; 陈亮 ; .基于区块链的生产线数据共享方案研究.国外电子测量技术.2019,(第05期),全文. *
基于区块链的生产线数据共享方案研究;呼阳;陈亮;;国外电子测量技术(第05期);全文 *

Also Published As

Publication number Publication date
CN110597918A (en) 2019-12-20

Similar Documents

Publication Publication Date Title
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
US11501533B2 (en) Media authentication using distributed ledger
CN108985757B (en) Information processing method, device and system, storage medium and electronic equipment
CN110348242B (en) Service request processing method and device
WO2020258846A1 (en) Method and apparatus for sending certifiable messages across chains
CN110661658B (en) Node management method and device of block chain network and computer storage medium
EP3545665B1 (en) System and method for detecting replay attack
WO2018112940A1 (en) Service execution method and device for blockchain node, and node device
US11308194B2 (en) Monitoring device components using distributed ledger
CN110569251A (en) Data processing method, related equipment and computer readable storage medium
US10924281B2 (en) Method and apparatus for inter-blockchain transmission of authenticable message
CN112800129B (en) Block state updating method, device, system and electronic equipment
WO2021072861A1 (en) Application service processing method and apparatus, and terminal and storage medium
CN109981279B (en) Block chain system, communication method, device, equipment and medium
CN110784495B (en) Block chain-based discovery and configuration information management method for big data cluster system
EP3178011A1 (en) Method and system for facilitating terminal identifiers
JP2024505692A (en) Data processing methods, devices and computer equipment based on blockchain networks
EP3598333B1 (en) Electronic device update management
CN110222535B (en) Processing device, method and storage medium for block chain configuration file
CN112714158A (en) Transaction processing method, relay network, cross-link gateway, system, medium, and device
CN113886495B (en) Method, device, electronic equipment and storage medium for verifying blockchain data
CN114363162A (en) Block chain log generation method and device, electronic equipment and storage medium
CN110417567B (en) Configuration method and device of Internet of things equipment
CN111866044A (en) Data acquisition method, device, equipment and computer readable 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