Block chain intelligent account management method and device, computer equipment and storage medium

By directly decoding and calling smart contracts in the blockchain to create users' smart accounts, it solves the problems of low execution performance and high consumption in traditional solutions, achieves efficient smart account management, and is suitable for large-scale applications.

CN118709173AActive Publication Date: 2024-09-27HANGZHOU HIGH-TECH ZONE (BINJIANG) INSTITUTE OF BLOCKCHAIN & DATA SECURITY
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410642799.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-22
Publication Date
2024-09-27
Estimated Expiration
2044-05-22

AI Technical Summary

Technical Problem

Traditional blockchain account management solutions require the intervention of virtual machines, resulting in low execution performance and high consumption, making it difficult to apply on a large scale.

Method used

By obtaining the user's management request, setting the initialization parameters in the parameter information, including calling the contract address and owner address, decoding and calling the smart contract directly in the blockchain, creating the user's smart account to avoid virtual machine intervention.

Benefits of technology

It improves execution performance and reduces consumption, making the creation and management of smart accounts suitable for large-scale applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118709173A
    Figure CN118709173A
Patent Text Reader

Abstract

The invention relates to a block chain intelligent account management method and device, computer equipment and a storage medium, and the method comprises the steps: obtaining a management request of a user; when the management request is a creation request, setting an initialization parameter in the parameter information based on the creation request; the creation request comprises a contract calling address, an owner address and a parameter value; receiving and decoding the parameter information in the block chain to obtain a first decoding result; calling a corresponding smart contract according to a contract calling address in the first decoding result; and under the smart contract, creating a smart account of the user according to the owner address and the parameter value in the first decoding result. Through the method and the device, the problems of low execution performance, high consumption and difficulty in large-scale application in related technologies are solved, creation of the intelligent account can be completed without intervention of a virtual machine, the execution performance is improved, and the consumption is reduced; the method is suitable for large-scale application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of blockchain technology, and in particular to management methods, devices, computer equipment and storage media for blockchain smart accounts. Background Art

[0002] Traditionally, blockchain account management is controlled by externally owned accounts (EQA); for example, creating accounts, sending transactions, etc. Later, the technology of abstract accounts was proposed, and account contracts were written through solidity smart contracts to achieve rich functions. The current implementation plan for blockchain account creation is to write solidity smart contracts; when actually executing, convert the solidity smart contracts into bytecodes, and execute the bytecodes through a virtual machine to create accounts. The problem with this solution is that it requires a virtual machine to intervene to read the bytecode and execute it, resulting in low execution performance, high consumption, and difficulty in large-scale application.

[0003] There is currently no effective solution to the problems of low execution performance, high consumption, and difficulty in large-scale application in related technologies. Summary of the invention

[0004] In this embodiment, a blockchain smart account management method, device, computer equipment and storage medium are provided to solve the problems of low execution performance, high consumption and difficulty in large-scale application in related technologies.

[0005] In the first aspect, a method for managing a blockchain smart account is provided in this embodiment, including:

[0006] Get the user's management request;

[0007] When the management request is a creation request, the initialization parameters in the parameter information are set based on the creation request; the creation request includes the calling contract address, the owner address and the parameter value;

[0008] The parameter information is received and decoded in the blockchain to obtain a first decoding result; a corresponding smart contract is called according to the calling contract address in the first decoding result; and under the smart contract, a smart account of the user is created according to the owner address and the parameter value in the first decoding result.

[0009] In some of the embodiments, under the smart contract, creating the user's smart account according to the owner address and the parameter value in the first decoding result includes:

[0010] Under the smart contract, a smart account address of the smart account is generated according to the owner address and the parameter value to complete the creation of the smart account of the user;

[0011] Set the calling method parameter in the parameter information to be empty.

[0012] In some embodiments, the method further comprises:

[0013] After obtaining the first decoding result, determining whether the initialization parameter is empty;

[0014] If the initialization parameter is empty, the corresponding bytecode is read through the virtual machine based on the calling contract address in the creation request; based on the bytecode, the user's smart account is created.

[0015] In some embodiments, the method further comprises:

[0016] After creating the user's smart account, the smart account address and the owner address of the smart account are stored in the blockchain; and the smart account address is kept unchanged.

[0017] In some embodiments, the method further comprises:

[0018] When the management request is a use request, setting the calling method parameters and the signature parameters in the parameter information according to the use request and the key corresponding to the user;

[0019] Receiving and decoding the parameter information in the blockchain to obtain a second decoding result;

[0020] Performing signature authentication on the use request according to the signature parameter in the second decoding result;

[0021] After the signature authentication is passed, the corresponding smart contract is called according to the calling method parameters in the second decoding result; under the smart contract, the user's smart account is used.

[0022] In some embodiments, the method further comprises:

[0023] When the management request is an upgrade request, setting the calling method parameter and the signature parameter in the parameter information according to the upgrade request and the key corresponding to the user;

[0024] Receiving and decoding the parameter information in the blockchain to obtain a third decoding result;

[0025] Performing signature authentication on the upgrade request according to the signature parameter in the third decoding result;

[0026] After the signature authentication is passed, the corresponding smart contract is called according to the calling method parameters in the third decoding result; under the smart contract, the user's smart account is upgraded.

[0027] In some of the embodiments, the management request is a compound request; the compound request includes at least a creation request, and at least one or more of a use request and an upgrade request.

[0028] In a second aspect, in this embodiment, a management device for a blockchain smart account is provided, including:

[0029] The acquisition module is used to obtain the user's management request;

[0030] A setting module, used for setting the initialization parameters in the parameter information based on the creation request when the management request is a creation request; the creation request includes the calling contract address, the owner address and the parameter value;

[0031] A management module is used to receive and decode the parameter information in the blockchain to obtain a first decoding result; call the corresponding smart contract according to the calling contract address in the first decoding result; and create the user's smart account under the smart contract according to the owner address and the parameter value in the first decoding result.

[0032] In a third aspect, a computer device is provided in this embodiment, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for managing blockchain smart accounts described in the first aspect above is implemented.

[0033] In a fourth aspect, in this embodiment, a storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method for managing blockchain smart accounts described in the first aspect above is implemented.

[0034] Compared with the related art, the management method, apparatus, computer equipment and storage medium of the blockchain smart account provided in this embodiment obtain the user's management request; when the management request is a creation request, the initialization parameters in the parameter information are set based on the creation request; the creation request includes a calling contract address, an owner address and a parameter value; the parameter information is received and decoded in the blockchain to obtain a first decoding result; the corresponding smart contract is called according to the calling contract address in the first decoding result; under the smart contract, the user's smart account is created according to the owner address and parameter value in the first decoding result, which solves the problems of low execution performance, high consumption and difficulty in large-scale application in the related art, and the creation of the smart account can be completed without the intervention of a virtual machine, thereby improving execution performance and reducing consumption; thus, it is suitable for large-scale applications.

[0035] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0037] Figure 1 It is a hardware structure block diagram of a terminal device of a blockchain smart account management method provided in one embodiment of the present application;

[0038] Figure 2 It is a flowchart of a method for managing a blockchain smart account provided by an embodiment of the present application;

[0039] Figure 3 This is a flowchart of using a smart account provided by an embodiment of the present application;

[0040] Figure 4 It is a flowchart of a smart account upgrade provided by an embodiment of the present application;

[0041] Figure 5 It is a flowchart of smart account usage upgrade provided by an embodiment of the present application;

[0042] Figure 6 This is a structural block diagram of a blockchain smart account management device provided in one embodiment of the present application.

[0043] In the figure: 102, processor; 104, memory; 106, transmission device; 108, input and output device; 210, acquisition module; 220, setting module; 230, management module. DETAILED DESCRIPTION

[0044] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments.

[0045] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the", "these" and the like in this application do not represent quantitative restrictions, and they can be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether directly or indirectly. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships. For example, "A and / or B" can mean: A exists alone, A and B exist at the same time, and B exists alone. Usually, the character " / " indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.

[0046] The method embodiment provided in this embodiment can be executed in a terminal, a computer or a similar computing device. For example, running on a terminal, Figure 1 : is a hardware structure diagram of a terminal of the blockchain smart account management method of this embodiment. Figure 1 As shown, the terminal may include one or more ( Figure 1 Only one is shown in the figure) processor 102 and memory 104 for storing data, wherein processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA. The above terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0047] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the management method of the blockchain smart account in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0048] The transmission device 106 is used to receive or send data via a network. The above network includes a wireless network provided by the communication provider of the terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.

[0049] In this embodiment, a method for managing a blockchain smart account is provided. Figure 2 is a flowchart of the method for managing blockchain smart accounts of this embodiment, such as Figure 2 As shown, the process includes the following steps:

[0050] Step S210, obtaining a user's management request;

[0051] Step S220, when the management request is a create request, the initialization parameters in the parameter information are set based on the create request; the create request includes the calling contract address, the owner address and the parameter value;

[0052] Step S230, receiving and decoding parameter information in the blockchain to obtain a first decoding result; calling the corresponding smart contract according to the calling contract address in the first decoding result; under the smart contract, creating the user's smart account according to the owner address and parameter value in the first decoding result.

[0053] It should be noted that a management request refers to a request initiated by a user, which may be a request related to the management of a smart account, including but not limited to a creation request, a use request, and an upgrade request. Among them, a use request includes but is not limited to a transfer request, a recharge request, and a transaction request. There is no restriction on the specific form of a management request, for example, a management request may also include an account recovery request, a temporary key application request, etc.

[0054] The management of smart accounts in the blockchain can be divided into creation, use, and upgrade. Among them, the creation of smart accounts is the basis, and the use and upgrade are based on the successful creation of smart accounts.

[0055] The process of creating a smart account can be: obtaining a user's creation request; based on the creation request, setting the initialization parameters in the parameter information. Among them, the creation request includes the calling contract address, the owner address and the parameter value. The initialization parameter (initCode) is determined by the calling contract address, the owner address and the parameter value; for example: the format of the initialization parameter is the format of the Ethereum bytecode (Application Binary Interface, ABI), and the creation request is encoded in the format of the Ethereum ABI to obtain the initialization parameter; the first 20 bytes of the initialization parameter are the calling contract address, followed by the owner address (which can also be 20 bytes) and the parameter value. After completing the setting of the parameter information, the blockchain decodes the incoming parameter information according to the Ethereum bytecode to obtain the first decoding result; the first decoding result contains the calling contract address, the owner address and the parameter value; then the corresponding smart contract can be called based on the calling contract address; for example: the smart contract address is the address of the factory contract, the factory contract is called through the smart contract address, and then the smart account address is generated with the owner address and the parameter value, thereby completing the creation of the user's smart account.

[0056] In the related art, the implementation scheme for blockchain account creation is: write a solidity smart contract; when actually executing, convert the solidity smart contract into bytecode, and execute the bytecode through a virtual machine to create an account. Since a virtual machine needs to intervene to read the bytecode and execute it, the execution performance is low, the consumption is high, and it is difficult to apply it on a large scale. In this embodiment, by obtaining the user's management request; when the management request is a creation request, the initialization parameters in the parameter information are set based on the creation request; the creation request includes the call contract address, the owner address, and the parameter value; the parameter information is received and decoded in the blockchain to obtain a first decoding result; the corresponding smart contract is called according to the call contract address in the first decoding result; under the smart contract, the user's smart account is created according to the owner address and parameter value in the first decoding result, which solves the problems of low execution performance, high consumption, and difficulty in large-scale application in the related art, and completes the creation of the smart account by setting parameter information without the intervention of the virtual machine, thereby improving the execution performance and reducing consumption; thus, it is suitable for large-scale applications.

[0057] In some embodiments, under a smart contract, creating a user's smart account according to the owner address and parameter value in the first decoding result includes the following steps:

[0058] Step S231, under the smart contract, a smart account address of the smart account is generated according to the owner address and parameter values ​​to complete the creation of the user's smart account;

[0059] Step S232, setting the calling method parameter in the parameter information to empty.

[0060] Specifically, a smart contract is just a program running on the Ethereum chain and cannot be manipulated by humans. It is a series of codes (functions) and data (status) located at a specific address on the Ethereum blockchain. Among them, a smart contract is an Ethereum account, which can be considered a smart contract account. It has a balance and can be the object of transactions. Users can interact with smart contracts by submitting management requests to execute a function of the smart contract. Smart contracts can define rules like regular contracts and automatically enforce them through code. By default, smart contracts cannot be deleted and interactions with smart contracts are irreversible.

[0061] Based on the characteristics of the above-mentioned smart contract, in the blockchain, the smart account address of the smart account can be directly generated according to the owner address and the parameter value, thereby completing the creation of the smart contract account corresponding to the user; and no virtual machine intervention is required to improve execution performance and reduce consumption. Among them, the parameter value can be a salt value, which is a random value generated by combining with the user password. In other embodiments, the parameter value can be a random value obtained by other means, which is not limited to this.

[0062] After the creation of the user's smart account, the smart account address remains unchanged after generation to improve security. And set the call method parameter in the parameter information to empty. If the call method parameter is an empty contract, the receive method and fallback method are implemented by default, so as to accept the native points of the blockchain, and facilitate subsequent management requests to set the corresponding parameter information for the newly created smart contract account, so as to improve the execution efficiency of the use request or upgrade request.

[0063] In some embodiments, the method for managing a blockchain smart account includes the following steps:

[0064] After obtaining the first decoding result, determining whether the initialization parameter is empty;

[0065] If the initialization parameter is empty, the corresponding bytecode is read through the virtual machine based on the calling contract address in the creation request; based on the bytecode, the user's smart account is created.

[0066] Specifically, in order to avoid the situation where the parameter information is not set successfully and affects the creation of the smart account; when the initialization parameters are empty, the creation request can be read by the virtual machine, and the calling contract address can be parsed from the creation request; the corresponding bytecode is read and executed based on the calling contract address; the smart account address of the smart account is generated according to the owner address and parameter value to complete the creation of the user's smart account.

[0067] Through this embodiment, when the initialization parameters are empty, a virtual machine is used to complete the creation of a smart account, thereby improving the stability of operation without the user's awareness.

[0068] Here, the complete solution is implemented as follows:

[0069] Get the user's management request;

[0070] When the management request is a create request, the initialization parameters in the parameter information are set based on the create request; the create request includes the calling contract address, the owner address and the parameter value;

[0071] Receiving and decoding parameter information in the blockchain to obtain a first decoding result;

[0072] Determine whether the initialization parameter is empty;

[0073] If the initialization parameter is empty, the corresponding bytecode is read through the virtual machine based on the calling contract address in the creation request; based on the bytecode, the user's smart account is created.

[0074] If the initialization parameter is not empty, the corresponding smart contract is called according to the calling contract address in the first decoding result; under the smart contract, the user's smart account is created according to the owner address and parameter value in the first decoding result.

[0075] In some of the embodiments, the method for managing a blockchain smart account further includes the following steps:

[0076] After the user's smart account is created, the smart account address and owner address of the smart account are stored in the blockchain; the smart account address remains unchanged.

[0077] Specifically, the smart account address is generated based on the owner address and salt value. After generation, the smart account address is stored in the blockchain and remains unchanged. The owner address can be determined by the user's key, for example: the user's owner address is derived from the user's key. If the user's key is lost and the key is re-applied, a new owner address can be derived from the newly applied key. However, the smart account address will not change.

[0078] Through this embodiment, after the key is lost, the user only needs to apply for a new key, which will not affect the use of the smart account.

[0079] It should be noted that for management requests such as usage requests and upgrade requests, the blockchain will execute these requests after receiving such management requests from users. Obviously, the blockchain can use smart accounts to initiate calls to smart account addresses. However, there may be malicious users who may deliberately give some incorrect requests, thereby wasting gas fees. Therefore, these requests need to be signed and authenticated. In order to complete the above logic in a standardized manner, an "entry point" contract (EntryPoint) is introduced as the entry point for blockchain calls. EntryPoint will check whether the user's request is legal and then execute it truthfully. In other words, the management request sent to the blockchain can call the handleOps method of the EntryPoint system contract, which is used as the entry contract for using smart accounts. The use or upgrade of smart accounts calls this contract to enter.

[0080] The following describes the case where a management request is a usage request:

[0081] In some of the embodiments, Figure 3 As shown, the management method of blockchain smart account also includes the following steps:

[0082] Step S310, when the management request is a use request, the calling method parameters and signature parameters in the parameter information are set according to the use request and the key corresponding to the user;

[0083] Step S320, receiving and decoding parameter information in the blockchain to obtain a second decoding result;

[0084] Step S330, performing signature authentication on the use request according to the signature parameter in the second decoding result;

[0085] Step S340, after the signature authentication is passed, the corresponding smart contract is called according to the calling method parameters in the second decoding result; under the smart contract, the user's smart account is used.

[0086] Specifically, the key may be applied for in advance by the user, and after the user applies for it through the terminal, it is stored in the terminal. In addition to the initialization parameters, the parameter information also includes the calling method parameters (callData) and the signature parameters (signature).

[0087] Among them, the calling method parameters are used to use the smart account; they can be set based on the use request. For example: the creation request is a transfer request, and the transfer request includes the recipient address and the transfer amount; the transfer request is encoded into the calling method parameters according to the Ethereum ABI format; the first four bytes of the calling method parameters are the signature id of the function; the first four bytes of the calling method parameters are followed by the actual parameters of the calling function. The signature id of the function is obtained by calculating the function name and all input parameter types through an encryption algorithm. The function and parameter types are related to the request; for the transfer request, the function is transfer; the parameter types are address type (recipient address) and uint256 type (transfer amount). Here, the function and parameter types are not given one by one. Among them, the signature parameter is used to sign and authenticate the use request. The owner address (which can be derived from the key at the time of the request) is encrypted by the private key in the key, and the encryption result is used as the signature parameter.

[0088] Receive and decode parameter information in the blockchain to obtain the second decoding result. The second decoding result includes the calling method parameters (recipient address and transfer amount) and signature parameters; use the public key in the key to decrypt the signature parameters to obtain the owner address, and then verify the decrypted owner address with the owner address in the blockchain. If they are consistent, the signature authentication is considered to be passed and the corresponding smart contract is called; under the smart contract, the user's smart account is used according to the recipient address and transfer amount.

[0089] It should be noted that when using a smart account, if the smart account has not been upgraded, all methods are pre-defined, and the corresponding smart contract can be called directly through the method. If the smart account is upgraded, the method involved may be a user-defined bytecode. Before calling the corresponding smart contract, the pre-defined method will be traversed based on the calling method parameters. If the pre-defined method is traversed, the method will be called using the ABI method, and the user's smart account will be used according to the use request. If the pre-defined method is not traversed, the virtual machine will be used to traverse. If it is traversed through the virtual machine, the user's smart account will be used according to the use request; if it is not traversed through the virtual machine, an error will be returned and the use will fail; thereby avoiding the situation where the normal use of the upgraded smart account is affected by the user-defined bytecode.

[0090] Among them, the encryption algorithm used by the EntryPoint system contract is consistent with the encryption algorithm used when setting parameter information, which can improve compatibility; the encryption algorithm includes but is not limited to the hash algorithm, etc., and there is no restriction on this.

[0091] Through this embodiment, the security of using smart accounts can be improved, and the execution performance and scalability of the blockchain can be balanced.

[0092] The following describes the situation where the management request is an upgrade request:

[0093] In some of the embodiments, Figure 4 As shown, the management method of blockchain smart account also includes the following steps:

[0094] Step S410, when the management request is an upgrade request, the calling method parameters and signature parameters in the parameter information are set according to the upgrade request and the key corresponding to the user;

[0095] Step S420, receiving and decoding parameter information in the blockchain to obtain a third decoding result;

[0096] Step S430, performing signature authentication on the upgrade request according to the signature parameter in the third decoding result;

[0097] Step S440, after the signature authentication is passed, the corresponding smart contract is called according to the calling method parameters in the third decoding result; under the smart contract, the user's smart account is upgraded.

[0098] In this embodiment, the calling method parameter is used to upgrade the smart account; it can be set based on the upgrade request. For the upgrade request, the function is upgrade; the parameter type is bytes. Among them, the signature parameter is used to sign and authenticate the upgrade request. The owner address (which can be derived from the key at the time of the request) is encrypted by the private key in the key, and the encryption result is used as the signature parameter.

[0099] Receive and decode parameter information in the blockchain to obtain a third decoding result. The third decoding result includes the calling method parameters and signature parameters; use the public key in the key to decrypt the signature parameters to obtain the owner address, and then verify the decrypted owner address with the owner address in the blockchain. If they are consistent, the signature authentication is considered to be passed, and the corresponding smart contract is called; under the smart contract, the user's smart account is upgraded according to the upgrade request.

[0100] Through this embodiment, the security of using smart accounts can be improved, and the execution performance and scalability of the blockchain can be balanced.

[0101] It should be noted that a management request is a compound request; a management request is a compound request; a compound request is at least two of a creation request, a use request, and an upgrade request.

[0102] For example, management requests include creation requests and use requests (create use requests); creation requests and upgrade requests (create upgrade requests); creation requests, use requests and upgrade requests (create use upgrade requests); use requests and upgrade requests (use upgrade requests), etc. In this way, high performance and customizable development of smart accounts for different management requests are guaranteed, supporting user-defined account functions.

[0103] The following uses the creation of a management request for a usage request as an example:

[0104] In some of the embodiments, Figure 5 As shown, the management method of blockchain smart account also includes the following steps:

[0105] Step S510, when the management request is a create use request, the initialization parameters, calling method parameters and signature parameters in the parameter information are set according to the create use request and the key corresponding to the user; the create use request includes a create request and a use request;

[0106] Step S520, receiving and decoding parameter information in the blockchain to obtain a fourth decoding result;

[0107] Step S530, creating a smart account of the user according to the initialization parameters in the fourth decoding result;

[0108] Step S540, performing signature authentication on the use request according to the signature parameter in the fourth decoding result;

[0109] Step S550, after the signature authentication is passed, the corresponding smart contract is called according to the calling method parameters in the fourth decoding result; under the smart contract, the user's smart account is used.

[0110] Specifically, the initialization parameters are set based on the creation request; the calling method parameters are set based on the usage request; and the signature parameters are set based on the key. In other words, for complex management requests, the parameter information will be set at one time to save execution time. The specific setting process will not be repeated here.

[0111] Receive and decode the parameter information in the blockchain to obtain a fourth decoding result. The fourth decoding result includes initialization parameters, calling method parameters, and signature parameters.

[0112] The corresponding smart contract is called according to the calling contract address of the initialization parameter in the fourth decoding result; under the smart contract, the user's smart account is created according to the owner address and parameter value in the fourth decoding result, and the creation of the smart account is completed. After that, the signature parameter is decrypted with the public key in the key to obtain the owner address, and then the decrypted owner address is verified with the owner address in the blockchain. If they are consistent, the signature authentication is considered to be passed, and the corresponding smart contract is called; under the smart contract, the user's smart account is upgraded according to the upgrade request.

[0113] The following uses the management request of the upgrade request as an example:

[0114] In some of the embodiments, the method for managing a blockchain smart account further includes the following steps:

[0115] When the management request is a usage upgrade request, the calling method parameters and signature parameters in the parameter information are set according to the usage upgrade request and the key corresponding to the user; creating a usage request includes a usage request and an upgrade request;

[0116] Receiving and decoding parameter information in the blockchain to obtain a fifth decoding result;

[0117] Performing signature authentication on the usage upgrade request according to the signature parameter in the fifth decoding result;

[0118] After the signature authentication is passed, the corresponding smart contract is called according to the calling method parameters in the fifth decoding result; under the smart contract, the user's smart account is used.

[0119] After the signature authentication is passed, the corresponding smart contract is called according to the calling method parameters in the fifth decoding result; under the smart contract, the user's smart account is upgraded.

[0120] In other embodiments, similar principles may be used to implement other forms of composite requests, which are not described one by one here.

[0121] Through this embodiment, Gas consumption can be greatly reduced, different user requirements for smart contracts can be met, and performance and flexibility can be improved.

[0122] It should be noted that the steps shown in the above process or the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0123] In this embodiment, a management device for a blockchain smart account is also provided, which is used to implement the above embodiments and preferred implementations, and will not be repeated for what has been described. The terms "module", "unit", "subunit", etc. used below can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0124] Figure 6 This is a structural block diagram of the management device of the blockchain smart account of this embodiment. Figure 6 As shown, the device comprises:

[0125] An acquisition module 210 is used to acquire a management request from a user;

[0126] The setting module 220 is used to set the initialization parameters in the parameter information based on the creation request when the management request is a creation request; the creation request includes the calling contract address, the owner address and the parameter value;

[0127] The management module 230 is used to receive and decode parameter information in the blockchain to obtain a first decoding result; call the corresponding smart contract according to the calling contract address in the first decoding result; and create a user's smart account under the smart contract according to the owner address and parameter value in the first decoding result.

[0128] Through the above device, the problems of low execution performance, high consumption and difficulty in large-scale application in related technologies are solved. The creation of smart accounts can be completed without the intervention of virtual machines, which improves execution performance and reduces consumption; thus, it is suitable for large-scale applications.

[0129] In some of the embodiments, the management module 230 is further used to generate a smart account address of the smart account according to the owner address and the parameter value under the smart contract to complete the creation of the user's smart account;

[0130] Set the calling method parameters in the parameter information to empty.

[0131] In some of the embodiments, the management device of the blockchain smart account further includes:

[0132] A judging module, used for judging whether the initialization parameter is empty after obtaining the first decoding result;

[0133] If the initialization parameter is empty, the corresponding bytecode is read through the virtual machine based on the calling contract address in the creation request; based on the bytecode, the user's smart account is created.

[0134] In some of the embodiments, the management device of the blockchain smart account further includes:

[0135] The storage module is used to store the smart account address and owner address of the smart account in the blockchain after creating the user's smart account; keeping the smart account address unchanged.

[0136] In some of the embodiments, the management device of the blockchain smart account further includes:

[0137] A first execution module; used for setting the calling method parameters and signature parameters in the parameter information according to the key corresponding to the use request and the user when the management request is a use request;

[0138] Receiving and decoding parameter information in the blockchain to obtain a second decoding result;

[0139] Performing signature authentication on the use request according to the signature parameter in the second decoding result;

[0140] After the signature authentication is passed, the corresponding smart contract is called according to the calling method parameters in the second decoding result; under the smart contract, the user's smart account is used.

[0141] In some of the embodiments, the blockchain smart account management device further includes:

[0142] The second execution module is used to set the calling method parameters and signature parameters in the parameter information according to the upgrade request and the key corresponding to the user when the management request is an upgrade request;

[0143] Receiving and decoding parameter information in the blockchain to obtain a third decoding result;

[0144] Performing signature authentication on the upgrade request according to the signature parameter in the third decoding result;

[0145] After the signature authentication is passed, the corresponding smart contract is called according to the calling method parameters in the third decoding result; under the smart contract, the user's smart account is upgraded.

[0146] In some of the embodiments, the blockchain smart account management device further includes:

[0147] The third execution module is used to set the initialization parameters, calling method parameters and signature parameters in the parameter information according to the key corresponding to the create use request and the user when the management request is a create use request; the create use request includes a create request and a use request;

[0148] Receiving and decoding parameter information in the blockchain to obtain a fourth decoding result;

[0149] Creating a smart account for the user according to the initialization parameters in the fourth decoding result;

[0150] Performing signature authentication on the use request according to the signature parameter in the fourth decoding result;

[0151] After the signature authentication is passed, the corresponding smart contract is called according to the calling method parameters in the fourth decoding result; under the smart contract, the user's smart account is used.

[0152] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.

[0153] In this embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0154] Optionally, the computer device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0155] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0156] S1, obtain the user's management request;

[0157] S2, when the management request is a create request, set the initialization parameters in the parameter information based on the create request; the create request includes the calling contract address, the owner address and the parameter value;

[0158] S3, receiving and decoding parameter information in the blockchain to obtain a first decoding result; calling the corresponding smart contract according to the calling contract address in the first decoding result; under the smart contract, creating the user's smart account according to the owner address and parameter value in the first decoding result.

[0159] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and will not be repeated in this embodiment.

[0160] In addition, in combination with the blockchain smart account management method provided in the above embodiments, a storage medium can also be provided in this embodiment to implement. The storage medium stores a computer program; when the computer program is executed by the processor, any blockchain smart account management method in the above embodiments is implemented.

[0161] It should be understood that the specific embodiments described herein are only used to explain the application, rather than to limit it. Based on the embodiments provided in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of this application.

[0162] Obviously, the drawings are only some examples or embodiments of the present application. For ordinary technicians in the field, the present application can also be applied to other similar situations based on these drawings without creative work. In addition, it is understandable that although the work done in this development process may be complicated and lengthy, for ordinary technicians in the field, certain changes in design, manufacturing or production based on the technical content disclosed in this application are only conventional technical means and should not be regarded as insufficient content disclosed in this application.

[0163] The term "embodiment" in this application refers to a specific feature, structure or characteristic described in conjunction with the embodiment that can be included in at least one embodiment of the present application. The appearance of this phrase in various locations in the specification does not necessarily mean the same embodiment, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. It is clearly or implicitly understood by those of ordinary skill in the art that the embodiments described in this application can be combined with other embodiments without conflict.

[0164] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of patent protection. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the attached claims.

Claims

1. A method for managing a blockchain smart account, characterized in that: include: Get the user's management request; When the management request is a creation request, setting the initialization parameters in the parameter information based on the creation request; The creation request includes the calling contract address, owner address and parameter value; Receiving and decoding the parameter information in the blockchain to obtain a first decoding result; calling the corresponding smart contract according to the calling contract address in the first decoding result; Under the smart contract, a smart account of the user is created according to the owner address and the parameter value in the first decoding result.

2. The method for managing blockchain smart accounts according to claim 1, characterized in that: Under the smart contract, according to the owner address and the parameter value in the first decoding result, creating the user's smart account, including: Under the smart contract, a smart account address of the smart account is generated according to the owner address and the parameter value to complete the creation of the smart account of the user; Set the calling method parameter in the parameter information to be empty.

3. The method for managing blockchain smart accounts according to claim 1, characterized in that: The method further comprises: After obtaining the first decoding result, determining whether the initialization parameter is empty; If the initialization parameter is empty, the corresponding bytecode is read through the virtual machine based on the calling contract address in the creation request; based on the bytecode, the user's smart account is created.

4. The method for managing a blockchain smart account according to claim 1 or 3, characterized in that: The method further comprises: After creating the user's smart account, the smart account address and the owner address of the smart account are stored in the blockchain; and the smart account address is kept unchanged.

5. The method for managing blockchain smart accounts according to claim 1, characterized in that: The method further comprises: When the management request is a use request, setting the calling method parameters and the signature parameters in the parameter information according to the use request and the key corresponding to the user; Receiving and decoding the parameter information in the blockchain to obtain a second decoding result; Performing signature authentication on the use request according to the signature parameter in the second decoding result; After the signature authentication is passed, the corresponding smart contract is called according to the calling method parameters in the second decoding result; under the smart contract, the user's smart account is used.

6. The method for managing blockchain smart accounts according to claim 1, characterized in that: The method further comprises: When the management request is an upgrade request, setting the calling method parameters and the signature parameters in the parameter information according to the upgrade request and the key corresponding to the user; Receiving and decoding the parameter information in the blockchain to obtain a third decoding result; Performing signature authentication on the upgrade request according to the signature parameter in the third decoding result; After the signature authentication is passed, the corresponding smart contract is called according to the calling method parameters in the third decoding result; under the smart contract, the user's smart account is upgraded.

7. The method for managing blockchain smart accounts according to claim 1, characterized in that: The management request is a compound request; the compound request is at least two of a creation request, a use request and an upgrade request.

8. A blockchain smart account management device, characterized in that: include: The acquisition module is used to obtain the user's management request; A setting module, configured to set the initialization parameters in the parameter information based on the creation request when the management request is a creation request; the creation request includes a calling contract address, an owner address, and a parameter value; A management module, configured to receive and decode the parameter information in the blockchain to obtain a first decoding result; and call a corresponding smart contract according to the calling contract address in the first decoding result; Under the smart contract, a smart account of the user is created according to the owner address and the parameter value in the first decoding result.

9. A computer device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps of the blockchain smart account management method described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the blockchain smart account management method described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Method for deploying smart contract, blockchain node and storage medium

    CN111768200A

  • Method for deploying smart contract, blockchain node and storage medium

    CN111815330A

  • Joint account creation method, system and device based on blockchain, and storage medium

    CN112330449A

  • Entitlement management system

    US20180314809A1