WO2022078398A1 - 基于区块链的子账户交易处理方法、系统、设备及介质 - Google Patents

基于区块链的子账户交易处理方法、系统、设备及介质 Download PDF

Info

Publication number
WO2022078398A1
WO2022078398A1 PCT/CN2021/123563 CN2021123563W WO2022078398A1 WO 2022078398 A1 WO2022078398 A1 WO 2022078398A1 CN 2021123563 W CN2021123563 W CN 2021123563W WO 2022078398 A1 WO2022078398 A1 WO 2022078398A1
Authority
WO
WIPO (PCT)
Prior art keywords
account
sub
user
address
account address
Prior art date
Application number
PCT/CN2021/123563
Other languages
English (en)
French (fr)
Inventor
李宁
薄辰龙
Original Assignee
深圳壹账通智能科技有限公司
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 深圳壹账通智能科技有限公司 filed Critical 深圳壹账通智能科技有限公司
Publication of WO2022078398A1 publication Critical patent/WO2022078398A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3825Use of electronic signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management

Definitions

  • the present application relates to the field of blockchain technology, and relates to a sub-account transaction processing method, system, computer equipment and storage medium based on blockchain.
  • a private key corresponds to an account.
  • the transfer amount and the destination account address are signed with the private key, and the signature and the public key corresponding to the private key are carried in the transfer request.
  • the blockchain node decrypts the signature in the transfer request through the public key carried in the transfer request to obtain the transfer amount and the destination account address.
  • the public key is calculated by an asymmetric encryption algorithm to obtain the user's account address, and then the transfer amount is transferred from the user's account address, and the transfer amount is transferred to the destination account address.
  • This application proposes a blockchain-based sub-account transaction processing method, system, computer equipment and storage medium, which constructs multiple user accounts into one main account and multiple sub-accounts, and the sub-account addresses include the main account address. Multiple accounts use the same private key to avoid mixing or forgetting multiple private keys. Determine whether the sub-account is an account owned by the user according to the sub-account address and the main account address, and can identify in time if the account is stolen to avoid user losses.
  • the embodiment of the first aspect of the present application proposes a blockchain-based sub-account transaction processing method, which is applied to a terminal, including:
  • the transfer information includes the sub-account address corresponding to the sub-account, and the sub-account address includes the main account address corresponding to the user's main account;
  • a second aspect of the present application provides a computer device including a memory, a processor, and computer-readable instructions stored on the memory and executable on the processor, the processor executing the computer-readable instructions When implementing the following steps:
  • the transfer information includes the sub-account address corresponding to the sub-account, and the sub-account address includes the main account address corresponding to the user's main account;
  • a third aspect of the present application provides a computer-readable storage medium, where computer instructions are stored in the computer-readable storage medium, and when the computer instructions are executed on a computer, the computer is caused to perform the following steps:
  • the transfer information includes the sub-account address corresponding to the sub-account, and the sub-account address includes the main account address corresponding to the user's main account;
  • a fourth aspect of this application proposes a blockchain-based sub-account transaction processing system, including: the terminal and a blockchain node:
  • the terminal is configured to receive the private key submitted by the user and transfer information corresponding to the sub-account, where the transfer information includes the sub-account address corresponding to the sub-account, and the sub-account address includes the address corresponding to the main account of the user. address of the main account; sign the transfer information with the private key to obtain the ciphertext of the transfer information; send the transfer request corresponding to the sub-account to the blockchain node, where the transfer request includes the encrypted transfer information document and pre-stored public key;
  • the blockchain node is configured to receive the transfer request; obtain the sub-account address corresponding to the sub-account and the main account address of the user according to the transfer request; The account address is used to determine whether the sub-account is a sub-account owned by the user; if it is determined that the sub-account is a sub-account owned by the user, transfer processing is performed on the transfer request.
  • multiple accounts owned by the user are constructed in the form of one main account and multiple sub-accounts, and the sub-account addresses corresponding to the sub-accounts include the main account addresses corresponding to the main account.
  • Users only need to memorize the private key corresponding to the main account. Through a private key, combined with the address of the main account and the address of the sub-account, the operation of the sub-account can be realized. Therefore, there is no need to distinguish the key between multiple accounts of the user.
  • Multiple accounts can use the same key. The user only needs to remember one private key, and through this private key, he can operate any of his own sub-accounts. Avoid mixing or forgetting multiple keys.
  • the blockchain node obtains the sub-account address and the user's main account address according to the transfer request, and determines whether the current sub-account is a sub-account owned by the user according to the sub-account address and the main account address. Only after it is determined that the sub-account is a sub-account owned by the user, the transfer process is performed, so that the user's account can be identified in time if the user's account is stolen by others, and the loss of the user's account balance can be avoided.
  • FIG. 1 shows a schematic flowchart of a blockchain-based sub-account transaction processing method provided by an embodiment of the present application
  • FIG. 2 shows a schematic structural diagram of a blockchain-based sub-account transaction processing system provided by an embodiment of the present application
  • FIG. 3 shows a schematic structural diagram of a computer device provided by an embodiment of the present application
  • FIG. 4 shows a schematic diagram of a storage medium provided by an embodiment of the present application.
  • Some embodiments of the present application provide a blockchain-based sub-account transaction processing method, in which multiple accounts owned by a user are constructed in the form of one main account and multiple sub-accounts, and the sub-accounts corresponding to the sub-accounts
  • the address includes the address of the main account corresponding to the main account. Users only need to memorize the private key corresponding to the main account. Through a private key, combined with the address of the main account and the address of the sub-account, the operation of the sub-account can be realized. Therefore, there is no need to distinguish the private key between multiple accounts of the user. Multiple accounts can use the same private key. The user only needs to remember one private key, and through this private key, he can operate any of his own sub-accounts. Avoid mixing or forgetting multiple private keys.
  • the user's sub-account is first created in the blockchain through the operations of the following steps S1-S4, which specifically includes:
  • Step S1 The terminal acquires the primary account address corresponding to the primary account of the user.
  • the user can submit his own main account address to the terminal, and the main account address can be the account number of the main account selected by the user.
  • the terminal receives the master account address submitted by the user.
  • Step S2 The terminal generates a sub-account address according to the main account address.
  • the sub-account address is generated according to the main account address, so that in subsequent sub-account transfers, it can be determined whether the sub-account is indeed an account owned by the user who initiated the transfer request according to the main account address and the sub-account address. Therefore, when the user's account is stolen by others, it can be identified in time to avoid loss to the user's account balance.
  • the terminal specifically generates the sub-account address through the operations of the following steps S21 and S22, including:
  • Step S21 The terminal generates a temporary character string.
  • a random number may be generated by a random number generator, and the random number may be determined as a temporary character string.
  • the user inputs random information into the terminal, and the random information may be user information such as the user's name, nickname, phone number, and address, or a character sequence randomly input by the user, or the like. Just make sure that the random information that the user enters when creating each sub-account is different.
  • the terminal obtains the random information input by the user, performs a hash operation on the random information, and obtains a temporary string.
  • a random number can be generated each time as a temporary string, or a temporary string can be obtained by hashing the random information input by the user. This ensures that the account address of each sub-account of the user is different.
  • Step S22 The terminal adds a temporary character string at the preset position of the character sequence of the main account address to obtain the sub-account address.
  • the terminal After the temporary character string is generated by step S21, the terminal adds the temporary character string at a preset position of the character sequence of the main account address, and the preset position may be the start position, end position or middle position of the character sequence of the main account address. After adding the temporary string to the main account address, a new address is obtained, and the new address is used as the sub-account address corresponding to the sub-account that needs to be created.
  • the sub-account address is generated by adding a temporary string to the main account address, so that the sub-account address includes the main account address, so that in subsequent sub-account transfers, it can be determined whether the sub-account is genuine according to the main account address and the sub-account address. Is the account owned by the user who initiated the transfer request. After the sub-account address is generated, the sub-account is created in the blockchain through the following steps S3.
  • Step S3 The terminal sends an account creation request to the blockchain node, where the account creation request includes the above-generated sub-account address.
  • the terminal After the terminal generates the sub-account address, it sends an account creation request to the blockchain node, and the account creation request carries the above-generated sub-account address.
  • Step S4 The blockchain node receives the account creation request sent by the terminal, and creates the user's sub-account in the blockchain.
  • the blockchain node receives the account creation request sent by the terminal, and the account creation request includes one or more of the user's name, phone number, URL (Uniform Resource Locator, Uniform Resource Locator) and other user information, and includes the above generated information. sub-account address. The corresponding relationship between the sub-account address and user information is stored in each blockchain point. The sub-account creation process is completed by storing the correspondence between the sub-account address and user information in the blockchain node, and the blockchain node can return a notification of successful creation to the terminal.
  • the terminal when the user needs to create a sub-account in the blockchain, the terminal can also directly send an account creation request to the blockchain node after obtaining the main account address corresponding to the user's main account.
  • the account creation request includes the user's primary account address and user information.
  • the blockchain node After the blockchain node receives the account creation request, the blockchain node generates a sub-account address according to the method of step S2, and then. The corresponding relationship between the sub-account address and user information is stored in each blockchain point, the sub-account creation process is completed, and the sub-account address corresponding to the sub-account is returned to the user's terminal.
  • Each sub-account owned by the user can complete the creation of the sub-account in the blockchain through the above method.
  • the user After creating a sub-account, the user can transfer money to the sub-account. Referring to FIG. 1 , the transfer operation is performed on the sub-account through the operations of the following steps S101-S106.
  • Step S101 The terminal receives the private key submitted by the user and transfer information corresponding to the sub-account, where the transfer information includes the sub-account address corresponding to the sub-account, and the sub-account address includes the main account address corresponding to the user's main account.
  • the terminal when a user creates a master account, the terminal generates a key pair according to the user's master account address through a preset asymmetric encryption algorithm, and stores the public key included in the key pair in the terminal.
  • the private key is remembered by the user himself.
  • the preset asymmetric encryption algorithm can be RSA (RSA algorithm), DSA (Digital Signature Algorithm, digital signature algorithm), ECC (Elliptic curve cryptography, elliptic encryption algorithm), etc.
  • the terminal When the user needs to transfer money from the sub-account to other accounts, the terminal will display the transfer interface.
  • the transfer interface the user submits the sub-account address, destination account address and transfer amount corresponding to the sub-account, and enters the user's private key.
  • the above-mentioned transfer information may include sub-account address, destination account address and transfer amount.
  • Step S102 The terminal signs the transfer information through the private key submitted by the user, and obtains the ciphertext of the transfer information.
  • the terminal encrypts the transfer information such as the sub-account address, destination account address, and transfer amount through the private key input by the user, and obtains the ciphertext of the transfer information.
  • Step S103 The terminal sends a transfer request corresponding to the sub-account to the blockchain node, where the transfer request includes the ciphertext of the transfer information and the pre-stored public key.
  • the terminal obtains a pre-stored public key locally, generates a transfer request according to the public key and the ciphertext of the transfer information generated in step S102, and sends the transfer request to the blockchain node.
  • Step S104 The blockchain node receives the transfer request corresponding to the sub-account sent by the user's terminal, and obtains the sub-account address corresponding to the sub-account and the user's main account address according to the transfer request.
  • sub-account address and the main account address are obtained through the operations of the following steps S1041-S1043:
  • Step S1041 The blockchain node obtains the public key and the ciphertext of the transfer information from the transfer request.
  • Step S1042 The blockchain node decrypts the ciphertext of the transfer information through the public key to obtain transfer information, where the transfer information includes the sub-account address.
  • the blockchain node decrypts the ciphertext of the transfer information through the public key, and obtains transfer information such as the sub-account address, destination account address, and transfer amount.
  • Step S1043 The blockchain node operates on the public key through a preset asymmetric encryption algorithm to obtain the user's main account address.
  • the user's main account address can be obtained by performing the reverse operation on the public key through the preset asymmetric encryption algorithm.
  • the sub-account address corresponding to the transfer request and the user's main account address can be obtained through the transfer request, so as to subsequently determine whether the current sub-account is an account owned by the user according to the sub-account address and the main account address.
  • Step S105 The blockchain node determines whether the sub-account is a sub-account owned by the user according to the sub-account address and the main account address.
  • the blockchain node compares the sub-account address and the main account address, and determines whether the sub-account address includes the main account address. Specifically, the blockchain node traverses from the first character of the sub-account address, compares whether the first character of the sub-account address is the same as the first character of the main account address, and if so, compares the first character of the sub-account address. Whether the two characters are the same as the second character of the main account address. If the first character of the sub-account address is not the same as the first character of the main account address, compare whether the second character of the sub-account address is the same as the first character of the main account address.
  • the characters of the sub-account address and the main account address are traversed in turn. If the sub-account address includes all characters in the main account address, it is determined that the sub-account address includes the main account address, and then the sub-account is determined to be owned by the user. sub-account. If it is determined that the sub-account address does not include all characters of the main account address, it is determined that the sub-account is not a sub-account owned by the user.
  • This embodiment of the present application can determine whether the sub-account is a sub-account owned by the current user. Therefore, when the user's account is stolen by others, it can be identified in time to avoid loss to the user's account balance.
  • the address of each sub-account of the user includes the user's main account address. Therefore, by determining the address of the sub-account that currently initiates the account request Whether the address of the user's main account is included in the sub-account can be determined whether the sub-account is a sub-account owned by the current user. Therefore, when the user's account is stolen by others, it can be identified in time to avoid loss to the user's account balance.
  • Step S106 If the blockchain node determines that the sub-account is a sub-account owned by the user, it will perform transfer processing on the transfer request.
  • the transfer can be made. Specifically, according to the sub-account address and the transfer amount included in the transfer information obtained in step S1042, the transfer amount is subtracted from the account balance corresponding to the sub-account address. And, according to the destination account address and the transfer amount included in the transfer information, the transfer amount is added from the account balance corresponding to the destination account address.
  • a successful transfer notification is generated according to the address of the sub-account, the transfer amount and the address of the destination account. For the prompt message indicating that the transfer is successful. Send a successful transfer notification to the user's terminal, so that the user can know the balance change of the sub-account in real time.
  • a transfer record corresponding to the transfer request is also generated according to the transfer amount, the destination account address, and the sub-account address.
  • the correspondence between sub-account addresses and transfer records is stored in each blockchain node. Based on the traceability and non-tampering characteristics of the blockchain, the transfer records of the sub-accounts are stored in the blockchain nodes, which can ensure the authenticity of the transfer records of the sub-accounts and avoid account book fraud.
  • the blockchain node may also obtain the URL of the real user of the sub-account from the account information corresponding to the sub-account address according to the sub-account address.
  • the warning information is used to prompt the real user that someone else tries to transfer money from the sub-account, so as to remind the user that the sub-account has security risks, so that the user can
  • the sub-account takes the freezing operation in time, or transfers the balance in the sub-account, or modifies its own key, etc., so as to avoid losses to the user's account balance when the sub-account is stolen.
  • multiple accounts owned by the user are constructed in the form of one main account and multiple sub-accounts, and the sub-account addresses corresponding to the sub-accounts include the main account addresses corresponding to the main account.
  • Users only need to memorize the private key corresponding to the main account. Through a private key, combined with the address of the main account and the address of the sub-account, the operation of the sub-account can be realized. Therefore, there is no need to distinguish the key between multiple accounts of the user.
  • Multiple accounts can use the same key. The user only needs to remember one private key, and through this private key, he can operate any of his own sub-accounts. Avoid mixing or forgetting multiple keys.
  • the blockchain node obtains the sub-account address and the user's main account address according to the transfer request, and determines whether the current sub-account is a sub-account owned by the user according to the sub-account address and the main account address. Only after it is determined that the sub-account is a sub-account owned by the user, the transfer process is performed, so that the user's account can be identified in time if the user's account is stolen by others, and the loss of the user's account balance can be avoided.
  • an embodiment of the present application provides a blockchain-based sub-account transaction system, which includes: a terminal 201 and a blockchain node 202 .
  • the terminal 201 may be a user's mobile phone or a computer or the like. Only three blockchain nodes 202 are schematically drawn in FIG. 2 , and there may be any number of blockchain nodes 202 in practical applications.
  • the terminal 201 is configured to receive the private key submitted by the user and transfer information corresponding to the sub-account, the transfer information includes the sub-account address corresponding to the sub-account, and the sub-account address includes the main account address corresponding to the user's main account; transfer through the private key pair The information is signed, and the ciphertext of the transfer information is obtained; the transfer request corresponding to the sub-account is sent to the blockchain node 202, and the transfer request includes the ciphertext of the transfer information and the pre-stored public key;
  • the blockchain node 202 is used to receive a transfer request; obtain the sub-account address corresponding to the sub-account and the user's main account address according to the transfer request; determine whether the sub-account is a sub-account owned by the user according to the sub-account address and the main account address ; If it is determined that the sub-account is a sub-account owned by the user, the transfer request will be processed.
  • the terminal 201 is specifically configured to obtain the main account address corresponding to the user's main account; generate the sub-account address according to the main account address; send an account creation request to the blockchain node 202, where the account creation request includes the sub-account address.
  • the terminal 201 is specifically used for generating a temporary character string; adding the temporary character string at a preset position of the character sequence of the main account address to obtain the sub-account address.
  • the terminal 201 is specifically configured to generate a random number through a random number generator, and determine the random number as a temporary string; or, obtain random information input by a user; perform a hash operation on the random information to obtain a temporary string.
  • the blockchain node 202 is specifically used to obtain the public key and the ciphertext of the transfer information from the transfer request; decrypt the ciphertext of the transfer information by using the public key to obtain the transfer information, and the transfer information includes the sub-account address; through a preset asymmetric encryption algorithm Calculate the public key to get the user's main account address.
  • the blockchain node 202 is specifically configured to determine whether the sub-account address includes the main account address; if so, determine that the sub-account is a sub-account owned by the user; if not, determine that the sub-account is not a sub-account owned by the user.
  • multiple accounts owned by the user are constructed in the form of one main account and multiple sub-accounts, and the sub-account addresses corresponding to the sub-accounts include the main account addresses corresponding to the main account.
  • Users only need to memorize the private key corresponding to the main account. Through a private key, combined with the address of the main account and the address of the sub-account, the operation of the sub-account can be realized. Therefore, there is no need to distinguish the key between multiple accounts of the user.
  • Multiple accounts can use the same key. The user only needs to remember one private key, and through this private key, he can operate any of his own sub-accounts. Avoid mixing or forgetting multiple keys.
  • the blockchain node obtains the sub-account address and the user's main account address according to the transfer request, and determines whether the current sub-account is a sub-account owned by the user according to the sub-account address and the main account address. Only after it is determined that the sub-account is a sub-account owned by the user, the transfer process is performed, so that the user's account can be identified in time if the user's account is stolen by others, and the loss of the user's account balance can be avoided.
  • the embodiment of the present application provides a computer device, and the computer device may be a terminal such as a mobile phone or a computer, or the computer device may be a blockchain node device.
  • the computer device includes a processor, a non-volatile storage medium, a memory, and a network interface connected through a system bus.
  • the non-volatile storage medium of the computer device stores an operating system, a database and computer-readable instructions
  • the database may store a sequence of control information.
  • the processor can realize a A blockchain-based sub-account transaction processing method.
  • the processor of the computer device is used to provide computing and control capabilities and support the operation of the entire computer device.
  • Computer-readable instructions may be stored in the memory of the computer device, and when executed by the processor, the computer-readable instructions may cause the processor to execute a blockchain-based sub-account transaction processing method.
  • the network interface of the computer equipment is used for communication with the terminal connection.
  • the computer device When the computer device is a terminal, the computer device includes a memory, a processor, and a computer program stored in the memory and running on the processor.
  • the processor executes the computer program, the following steps are implemented: receiving the private key and sub-key submitted by the user.
  • Transfer information corresponding to the account the transfer information includes the sub-account address corresponding to the sub-account, and the sub-account address includes the main account address corresponding to the user's main account; the transfer information is signed by the private key to obtain the ciphertext of the transfer information; send the sub-account
  • the corresponding transfer request is sent to the blockchain node, and the transfer request includes the ciphertext of the transfer information and the pre-stored public key.
  • the processor executes the computer program, the following steps may be specifically implemented: obtaining the main account address corresponding to the main account of the user; generating the sub-account address according to the main account address; sending an account creation request to the blockchain node, where the account creation request includes the sub-account address.
  • the following steps may also be implemented: generating a temporary character string; adding the temporary character string at a preset position of the character sequence of the main account address to obtain the sub-account address.
  • the following steps may also be implemented: generating a random number through a random number generator, and determining the random number as a temporary string; or, acquiring random information input by the user; performing hash operation on the random information to obtain a temporary string.
  • the computer device When the computer device is a blockchain node device, the computer device includes a memory, a processor, and a computer program stored on the memory and running on the processor, and the processor implements the following steps when executing the computer program: receiving the user's terminal Send the transfer request corresponding to the sub-account; obtain the sub-account address corresponding to the sub-account and the user's main account address according to the transfer request; determine whether the sub-account is a sub-account owned by the user according to the sub-account address and the main account address; If the sub-account is a sub-account owned by the user, the transfer request is processed.
  • the processor executes the computer program, the following steps may also be implemented: obtaining the public key and the ciphertext of the transfer information from the transfer request; decrypting the ciphertext of the transfer information by using the public key to obtain the transfer information, and the transfer information includes the sub-account address;
  • the symmetric encryption algorithm operates on the public key to obtain the user's main account address.
  • the processor executes the computer program, the following steps may also be implemented: determining whether the address of the sub-account includes the address of the main account; if so, determining that the sub-account is a sub-account owned by the user; if not, determining that the sub-account is not a sub-account owned by the user .
  • An embodiment of the present application further provides a storage medium storing computer-readable instructions.
  • the one or more processors when the computer-readable instructions are executed by one or more processors, the one or more processors perform the following steps : Receive the private key submitted by the user and the transfer information corresponding to the sub-account, where the transfer information includes the sub-account address corresponding to the sub-account, and the sub-account address includes the main account address corresponding to the user's main account; The private key signs the transfer information to obtain the ciphertext of the transfer information; sends a transfer request corresponding to the sub-account to the blockchain node, and the transfer request includes the ciphertext of the transfer information and a pre-stored public key.
  • the processor may also perform the following steps: obtaining the main account address corresponding to the user's main account; generating a sub-account address according to the main account address; sending an account creation request to the blockchain node, where the account creation request includes the sub-account address.
  • the processor may also perform the following steps: generating a temporary character string; adding the temporary character string at a preset position of the character sequence of the main account address to obtain the sub-account address.
  • the processor may further perform the following steps: generate a random number through a random number generator, and determine the random number as a temporary string; or, obtain random information input by the user; perform a hash operation on the random information to obtain a temporary string.
  • the one or more processors can also be made to perform the following steps: receiving a transfer request corresponding to the sub-account sent by the user's terminal; obtaining a transfer request corresponding to the sub-account according to the transfer request The sub-account address and the user's main account address; according to the sub-account address and the main account address, determine whether the sub-account is a sub-account owned by the user; if it is determined that the sub-account is a sub-account owned by the user, transfer the transfer request.
  • the processor may also perform the following steps: obtaining the public key and the ciphertext of the transfer information from the transfer request; decrypting the ciphertext of the transfer information by using the public key to obtain the transfer information, the transfer information including the sub-account address; The public key is operated to obtain the user's main account address.
  • the processor may further perform the following steps: determining whether the sub-account address includes the main account address; if so, determining that the sub-account is a sub-account owned by the user; if not, determining that the sub-account is not a sub-account owned by the user.
  • the realization of all or part of the processes in the methods of the above embodiments can be accomplished by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the program is During execution, it may include the processes of the embodiments of the above-mentioned methods.
  • the aforementioned storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only storage memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM) or the like.

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Computer Security & Cryptography (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

一种基于区块链的子账户交易处理方法、系统、计算机设备及存储介质,终端接收用户的私钥及包括子账户地址的转账信息,子账户地址包括主账户地址;通过私钥对转账信息签名,得到转账信息密文;发送包括转账信息密文及公钥的转账请求给区块链节点。区块链节点根据转账请求,获取对应的子账户地址和主账户地址;根据子账户地址和主账户地址,确定子账户是否为用户的子账户。该方法将用户的多个账户构建为一个主账户和多个子账户,子账户地址包括主账户地址。多个账户采用相同的私钥,避免多个私钥记混或忘记的情况。根据子账户地址和主账户地址确定子账户是否为用户拥有的账户,在账户被盗取的情况下能及时识别出来,避免用户损失。

Description

基于区块链的子账户交易处理方法、系统、设备及介质
本申请要求于2020年10月14日提交中国专利局、申请号为202011098399.3、发明名称为“基于区块链的子账户交易处理方法、系统及设备”的中国专利申请的优先权,其全部内容通过引用结合在申请中。
技术领域
本申请涉及区块链技术领域,涉及了一种基于区块链的子账户交易处理方法、系统、计算机设备及存储介质。
背景技术
目前,区块链账户中,一个私钥对应一个账户,用户发起转账请求时,通过私钥对转账金额和目的账户地址进行签名,在转账请求中携带该签名以及私钥对应的公钥。区块链节点接收到该转账请求后,通过该转账请求携带的公钥对转账请求中的签名进行解密,得到转账金额及目的账户地址。然后通过非对称加密算法对该公钥进行运算,得到用户的账户地址,然后从用户的账户地址中转出该转账金额,并在目的账户地址中转入该转账金额。
发明人意识到由于一个私钥对应一个账户,若用户具有多个账户,则用户需要记住多个私钥,容易记混或者丢失。
发明内容
本申请提出一种基于区块链的子账户交易处理方法、系统、计算机设备及存储介质,将用户的多个账户构建为一个主账户和多个子账户,子账户地址包括主账户地址。多个账户采用相同的私钥,避免多个私钥记混或忘记的情况。根据子账户地址和主账户地址确定子账户是否为用户拥有的账户,在账户被盗取的情况下能及时识别出来,避免用户损失。
本申请第一方面实施例提出了一种基于区块链的子账户交易处理方法,应用于终端,包括:
接收用户提交的私钥及子账户对应的转账信息,所述转账信息包括所述子账户对应的子账户地址,所述子账户地址中包括所述用户的主账户对应的主账户地址;
通过所述私钥对所述转账信息进行签名,得到转账信息密文;
发送所述子账户对应的转账请求给区块链节点,所述转账请求包括所述转账信息密文及预存的公钥。
本申请第二方面提供了一种计算机设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:
接收用户提交的私钥及子账户对应的转账信息,所述转账信息包括所述子账户对应的子账户地址,所述子账户地址中包括所述用户的主账户对应的主账户地址;
通过所述私钥对所述转账信息进行签名,得到转账信息密文;
发送所述子账户对应的转账请求给区块链节点,所述转账请求包括所述转账信息密文及预存的公钥。
本申请第三方面提供了一种计算机可读存储介质,所述计算机可读存储介质中存储计算机指令,当所述计算机指令在计算机上运行时,使得计算机执行如下步骤:
接收用户提交的私钥及子账户对应的转账信息,所述转账信息包括所述子账户对应的子账户地址,所述子账户地址中包括所述用户的主账户对应的主账户地址;
通过所述私钥对所述转账信息进行签名,得到转账信息密文;
发送所述子账户对应的转账请求给区块链节点,所述转账请求包括所述转账信息密文及预存的公钥。
本申请第四方面提出了一种基于区块链的子账户交易处理系统,包括:所述终端和区块链节点:
所述终端,用于接收用户提交的私钥及子账户对应的转账信息,所述转账信息包括所述子账户对应的子账户地址,所述子账户地址中包括所述用户的主账户对应的主账户地址;通过所述私钥对所述转账信息进行签名,得到转账信息密文;发送所述子账户对应的转账请求给所述区块链节点,所述转账请求包括所述转账信息密文及预存的公钥;
所述区块链节点,用于接收所述转账请求;根据所述转账请求,获取所述子账户对应的子账户地址和所述用户的主账户地址;根据所述子账户地址和所述主账户地址,确定所述子账户是否为所述用户拥有的子账户;若确定所述子账户为所述用户拥有的子账户,则对所述转账请求进行转账处理。
本申请实施例中提供的技术方案,至少具有如下技术效果或优点:
在本申请实施例中,将用户拥有的多个账户构建为一个主账户和多个子账户的形式,子账户对应的子账户地址中包括主账户对应的主账户地址。用户只需要记忆主账户对应的私钥,通过一个私钥,结合主账户地址和子账户地址,可以实现对子账户的操作。因此用户的多个账户之间无需再进行密钥的区分,多个账户可以采用相同的密钥,用户只需记住一个私钥,通过这一个私钥可以对自己的任意子账户进行操作,避免了多个密钥记混或忘记的情况。区块链节点根据转账请求获取子账户地址和用户的主账户地址,根据子账户地址和主账户地址确定当前的子账户是否为用户拥有的子账户。只有确定该子账户为用户拥有的子账户后才进行转账处理,从而在用户的账户被其他人盗取的情况下能够及时识别出来,避免给用户的账户余额造成损失。
附图说明
图1示出了本申请一实施例所提供的一种基于区块链的子账户交易处理方法的流程示意图;
图2示出了本申请一实施例所提供的一种基于区块链的子账户交易处理系统的结构示意图;
图3示出了本申请一实施例所提供的一种计算机设备的结构示意图;
图4示出了本申请一实施例所提供的一种存储介质的示意图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
可以理解,本申请所使用的术语“第一”、“第二”等可在本文中用于描述各种元件,但这些元件不受这些术语限制。这些术语仅用于将第一个元件与另一个元件区分。
本申请的一些实施例提供了一种基于区块链的子账户交易处理方法,在该方法中将用户拥有的多个账户构建为一个主账户和多个子账户的形式,子账户对应的子账户地址中包括主账户对应的主账户地址,用户只需要记忆主账户对应的私钥,通过一个私钥,结合主账户地址和子账户地址,可以实现对子账户的操作。因此用户的多个账户之间无需再进行私钥的区分,多个账户可以采用相同的私钥,用户只需记住一个私钥,通过这一个私钥可以对自己的任意子账户进行操作,避免了多个私钥记混或忘记的情况。
通过本申请实施例提供的方法进行子账户交易处理之前,首先通过如下步骤S1-S4的操作在区块链中创建用户的子账户,具体包括:
步骤S1:终端获取用户的主账户对应的主账户地址。
当用户需要在区块链中创建子账户时,用户可以向终端提交自己的主账户地址,主账户地址可以为用户选定的主账户的账号。终端接收用户提交的主账户地址。
步骤S2:终端根据主账户地址,生成子账户地址。
根据主账户地址来生成子账户地址,以便后续进行子账户转账时可以根据主账户地址 和子账户地址来确定该子账户是否确实是发起转账请求的用户拥有的账户。从而在用户的账户被其他人盗取的情况下能够及时识别出来,避免给用户的账户余额造成损失。
终端具体通过如下步骤S21和S22的操作来生成子账户地址,具体包括:
步骤S21:终端生成一个临时字符串。
本申请实施例可以通过随机数生成器生成一个随机数,将该随机数确定为临时字符串。或者,用户向终端输入随机信息,该随机信息可以为用户的姓名、昵称、电话、住址等用户信息,或者用户随机输入的字符序列等。只要确保创建每个子账户时用户输入的随机信息各不相同即可。终端获取用户输入的随机信息,对该随机信息进行哈希运算,得到临时字符串。
可以每次生成一个随机数作为临时字符串,或者对用户输入的随机信息进行哈希运算得到临时字符串。如此确保用户的每个子账户的账户地址均不相同。
步骤S22:终端在主账户地址的字符序列的预设位置处添加临时字符串,得到子账户地址。
通过步骤S21生成临时字符串之后,终端在主账户地址的字符序列的预设位置处添加该临时字符串,预设位置可以为主账户地址的字符序列的开始位置、结束位置或者中间位置等。将临时字符串添加到主账户地址中后得到一个新的地址,将该新的地址作为当前需要创建的子账户对应的子账户地址。
通过在主账户地址中添加临时字符串的形式生成子账户地址,使得子账户地址中包括主账户地址,从而使得后续进行子账户转账时可以根据主账户地址和子账户地址来确定该子账户是否确实是发起转账请求的用户拥有的账户。生成子账户地址后,通过如下步骤S3的操作在区块链中创建子账户。
步骤S3:终端发送账户创建请求给区块链节点,该账户创建请求包括上述生成的子账户地址。
终端生成子账户地址后,发送账户创建请求给区块链节点,在该账户创建请求中携带上述生成的子账户地址。
步骤S4:区块链节点接收终端发送的账户创建请求,在区块链中创建用户的子账户。
区块链节点接收终端发送的账户创建请求,该账户创建请求中包括用户的姓名、电话、URL(Uniform Resource Locator,统一资源定位系统)等用户信息中的一种或多种,以及包括上述生成的子账户地址。在各个区块链点中存储该子账户地址与用户信息的对应关系。将子账户地址与用户信息的对应关系存储在区块链节点中就完成了该子账户的创建过程,区块链节点可以向终端返回创建成功通知。
在本申请的另一些实施例中,当用户需要在区块链中创建子账户时,终端获取用户的主账户对应的主账户地址之后,也可以直接发送账户创建请求给区块链节点,该账户创建请求包括用户的主账户地址及用户信息。区块链节点接收到该账户创建请求之后,由区块链节点按照步骤S2的方式生成一个子账户地址,然后。在各个区块链点中存储该子账户地址与用户信息的对应关系,完成子账户的创建过程,并将子账户对应的子账户地址返回给用户的终端。
用户拥有的每个子账户都可以通过上述方式在区块链中完成子账户的创建。创建子账户之后,用户即可以对该子账户进行转账操作。参见图1,具体地通过如下步骤S101-S106的操作来对子账户进行转账操作。
步骤S101:终端接收用户提交的私钥及子账户对应的转账信息,该转账信息包括子账户对应的子账户地址,子账户地址中包括用户的主账户对应的主账户地址。
在本申请实施例中,用户在创建主账户时,终端根据用户的主账户地址,通过预设非对称加密算法生成了一个密钥对,并在终端存储了该密钥对包括的公钥。私钥由用户自己记 住。预设非对称加密算法可以为RSA(RSA algorithm)、DSA(Digital Signature Algorithm,数字签名算法)、ECC(Elliptic curve cryptography,椭圆加密算法)等。
当用户需要从子账户往其他账户转账时,终端显示转账界面,用户在转账界面中提交子账户对应的子账户地址、目的账户地址及转账金额,以及输入用户的私钥。上述转账信息可以包括子账户地址、目的账户地址及转账金额。
步骤S102:终端通过用户提交的私钥对转账信息进行签名,得到转账信息密文。
终端通过用户输入的私钥对子账户地址、目的账户地址及转账金额等转账信息进行加密,得到转账信息密文。
步骤S103:终端发送子账户对应的转账请求给区块链节点,该转账请求包括转账信息密文及预存的公钥。
终端从本地获取预先存储的公钥,根据该公钥和步骤S102生成的转账信息密文,生成转账请求,将该转账请求发送给区块链节点。
步骤S104:区块链节点接收用户的终端发送的子账户对应的转账请求,根据该转账请求,获取子账户对应的子账户地址和用户的主账户地址。
具体通过如下步骤S1041-S1043的操作来获取子账户地址和主账户地址:
步骤S1041:区块链节点从转账请求中获取公钥和转账信息密文。
步骤S1042:区块链节点通过公钥对转账信息密文解密,得到转账信息,该转账信息包括子账户地址。
区块链节点通过公钥对转账信息密文解密,得到子账户地址、目的账户地址及转账金额等转账信息。
步骤S1043:区块链节点通过预设非对称加密算法对公钥进行运算,得到用户的主账户地址。
由于公钥是通过预设非对称加密算法对用户的主账户地址进行运算得到的,因此通过预设非对称加密算法对公钥进行反向运行,能够得到用户的主账户地址。
通过转账请求能够获得该转账请求对应的子账户地址及用户的主账户地址,以便后续根据子账户地址和主账户地址确定当前的子账户是否为用户拥有的账户。
步骤S105:区块链节点根据子账户地址和主账户地址,确定该子账户是否为用户拥有的子账户。
区块链节点比较子账户地址和主账户地址,确定子账户地址中是否包括主账户地址。具体地,区块链节点从子账户地址的第一个字符开始遍历,比较子账户地址的第一个字符是否与主账户地址的第一个字符相同,如果是,则比较子账户地址的第二个字符是否与主账户地址的第二个字符相同。如果子账户地址的第一个字符与主账户地址的第一个字符不相同,则比较子账户地址的第二个字符是否与主账户地址的第一个字符相同。如此依次遍历子账户地址和主账户地址的字符,若遍历出子账户地址中包括主账户地址中的所有字符,则确定子账户地址中包括主账户地址,进而确定该子账户为该用户拥有的子账户。如果确定出子账户地址中并不包括主账户地址的全部字符,则确定子账户不是用户拥有的子账户。
通过上述操作能够准确地确定出当前发起转账请求的子账户是否是当前用户拥有的子账户,若确定出该子账户不是该用户拥有的子账户,则表明该用户想要从其他人的子账户中转账,则将损害其他人的财产安全。本申请实施例能够确定出该子账户是否为当前用户拥有的子账户。从而在用户的账户被其他人盗取的情况下能够及时识别出来,避免给用户的账户余额造成损失。
由于用户的子账户地址都是通过主账户地址加临时字符串的形式,所以用户的每个子账户的地址中都包括该用户的主账户地址,因此通过确定当前发起账户请求的该子账户的地址中是否包括用户的主账户地址,能够确定出该子账户是否为当前用户拥有的子账户。从 而在用户的账户被其他人盗取的情况下能够及时识别出来,避免给用户的账户余额造成损失。
步骤S106:区块链节点若确定子账户为用户拥有的子账户,则对该转账请求进行转账处理。
若区块链节点确定该子账户为用户拥有的子账户,则可以进行转账。具体地,根据步骤S1042中获得的转账信息中包括的子账户地址和转账金额,从该子账户地址对应的账户余额中减去该转账金额。以及,根据转账信息包括的目的账户地址和转账金额,从该目的账户地址对应的账户余额中加上该转账金额。
通过上述方式从该子账户向目的账户转账之后,根据该子账户地址、转账金额和目的账户地址,生成转账成功通知,该转账成功通知中包括该子账户地址、转账金额、目的账户地址以及用于提示转账成功的提示信息。向该用户的终端发送转账成功通知,以便用户能实时获知该子账户的余额变动情况。
通过上述方式完成子账户的转账之后,还根据转账金额、目的账户地址、子账户地址,生成该转账请求对应的转账记录。在各个区块链节点中存储子账户地址与转账记录的对应关系。基于区块链的可追溯、不可篡改的特性,将子账户的转账记录存储在区块链节点中,能够确保子账户的转账记录的真实性,避免账本作假。
若区块链节点确定该子账户不是该用户拥有的子账户,则不能进行转账操作,丢弃该转账请求,并发送转账失败通知给该用户的终端。本申请实施例中,区块链节点还可以根据该子账户地址,从该子账户地址对应的账户信息中获取该子账户的真实用户的URL。根据获取的URL,向该子账户的真实用户发送警示信息,该警示信息用于提示该真实用户有其他人尝试从该子账户转账,以便提示用户该子账户存在安全风险,以使该用户对该子账户及时采取冻结操作,或者将子账户中的余额转走,或者修改自己的密钥等,从而在发生子账户被盗取时避免给用户的账户余额造成损失。
在本申请实施例中,将用户拥有的多个账户构建为一个主账户和多个子账户的形式,子账户对应的子账户地址中包括主账户对应的主账户地址。用户只需要记忆主账户对应的私钥,通过一个私钥,结合主账户地址和子账户地址,可以实现对子账户的操作。因此用户的多个账户之间无需再进行密钥的区分,多个账户可以采用相同的密钥,用户只需记住一个私钥,通过这一个私钥可以对自己的任意子账户进行操作,避免了多个密钥记混或忘记的情况。区块链节点根据转账请求获取子账户地址和用户的主账户地址,根据子账户地址和主账户地址确定当前的子账户是否为用户拥有的子账户。只有确定该子账户为用户拥有的子账户后才进行转账处理,从而在用户的账户被其他人盗取的情况下能够及时识别出来,避免给用户的账户余额造成损失。
如图2所示,本申请实施例提供了基于区块链的子账户交易系统,该系统包括:终端201和区块链节点202。终端201可以为用户的手机或电脑等。图2中仅示意性地画出了3个区块链节点202,实际应用中可以有任意数量的区块链节点202。
终端201,用于接收用户提交的私钥及子账户对应的转账信息,转账信息包括子账户对应的子账户地址,子账户地址中包括用户的主账户对应的主账户地址;通过私钥对转账信息进行签名,得到转账信息密文;发送子账户对应的转账请求给区块链节点202,转账请求包括转账信息密文及预存的公钥;
区块链节点202,用于接收转账请求;根据转账请求,获取子账户对应的子账户地址和用户的主账户地址;根据子账户地址和主账户地址,确定子账户是否为用户拥有的子账户;若确定子账户为用户拥有的子账户,则对转账请求进行转账处理。
终端201,具体用于获取用户的主账户对应的主账户地址;根据主账户地址,生成子账户地址;发送账户创建请求给区块链节点202,账户创建请求包括子账户地址。
终端201,具体用于生成一个临时字符串;在主账户地址的字符序列的预设位置处添加临时字符串,得到子账户地址。
终端201,具体用于通过随机数生成器生成一个随机数,将随机数确定为临时字符串;或者,获取用户输入的随机信息;对随机信息进行哈希运算,得到临时字符串。
区块链节点202,具体用于从转账请求中获取公钥和转账信息密文;通过公钥对转账信息密文解密,得到转账信息,转账信息包括子账户地址;通过预设非对称加密算法对公钥进行运算,得到用户的主账户地址。
区块链节点202,具体用于确定子账户地址中是否包括主账户地址;如果是,则确定子账户为用户拥有的子账户;如果否,则确定子账户不是用户拥有的子账户。
在本申请实施例中,将用户拥有的多个账户构建为一个主账户和多个子账户的形式,子账户对应的子账户地址中包括主账户对应的主账户地址。用户只需要记忆主账户对应的私钥,通过一个私钥,结合主账户地址和子账户地址,可以实现对子账户的操作。因此用户的多个账户之间无需再进行密钥的区分,多个账户可以采用相同的密钥,用户只需记住一个私钥,通过这一个私钥可以对自己的任意子账户进行操作,避免了多个密钥记混或忘记的情况。区块链节点根据转账请求获取子账户地址和用户的主账户地址,根据子账户地址和主账户地址确定当前的子账户是否为用户拥有的子账户。只有确定该子账户为用户拥有的子账户后才进行转账处理,从而在用户的账户被其他人盗取的情况下能够及时识别出来,避免给用户的账户余额造成损失。
本申请实施例提供了一种计算机设备,该计算机设备可以为手机或电脑等终端,或者该计算机设备可以为区块链节点设备。如图3所示,该计算机设备包括通过系统总线连接的处理器、非易失性存储介质、存储器和网络接口。其中,该计算机设备的非易失性存储介质存储有操作系统、数据库和计算机可读指令,数据库中可存储有控件信息序列,该计算机可读指令被处理器执行时,可使得处理器实现一种基于区块链的子账户交易处理方法。该计算机设备的处理器用于提供计算和控制能力,支撑整个计算机设备的运行。该计算机设备的存储器中可存储有计算机可读指令,该计算机可读指令被处理器执行时,可使得处理器执行一种基于区块链的子账户交易处理方法。该计算机设备的网络接口用于与终端连接通信。本领域技术人员可以理解,图3中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
当该计算机设备为终端时,该计算机设备包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器执行计算机程序时实现以下步骤:接收用户提交的私钥及子账户对应的转账信息,转账信息包括子账户对应的子账户地址,子账户地址中包括用户的主账户对应的主账户地址;通过私钥对转账信息进行签名,得到转账信息密文;发送子账户对应的转账请求给区块链节点,转账请求包括转账信息密文及预存的公钥。
处理器执行计算机程序时还可以具体实现以下步骤:获取用户的主账户对应的主账户地址;根据主账户地址,生成子账户地址;发送账户创建请求给区块链节点,账户创建请求包括子账户地址。
处理器执行计算机程序时还可以实现以下步骤:生成一个临时字符串;在主账户地址的字符序列的预设位置处添加临时字符串,得到子账户地址。
处理器执行计算机程序时还可以实现以下步骤:通过随机数生成器生成一个随机数,将随机数确定为临时字符串;或者,获取用户输入的随机信息;对随机信息进行哈希运算,得到临时字符串。
当该计算机设备为区块链节点设备时,该计算机设备包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器执行计算机程序时实现以下步骤:接收 用户的终端发送的子账户对应的转账请求;根据转账请求,获取子账户对应的子账户地址和用户的主账户地址;根据子账户地址和主账户地址,确定子账户是否为用户拥有的子账户;若确定子账户为用户拥有的子账户,则对转账请求进行转账处理。
处理器执行计算机程序时还可以实现以下步骤:从转账请求中获取公钥和转账信息密文;通过公钥对转账信息密文解密,得到转账信息,转账信息包括子账户地址;通过预设非对称加密算法对公钥进行运算,得到用户的主账户地址。
处理器执行计算机程序时还可以实现以下步骤:确定子账户地址中是否包括主账户地址;如果是,则确定子账户为用户拥有的子账户;如果否,则确定子账户不是用户拥有的子账户。
本申请实施例还提出了一种存储有计算机可读指令的存储介质,如图4所示,该计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:接收用户提交的私钥及子账户对应的转账信息,所述转账信息包括所述子账户对应的子账户地址,所述子账户地址中包括所述用户的主账户对应的主账户地址;通过所述私钥对所述转账信息进行签名,得到转账信息密文;发送所述子账户对应的转账请求给区块链节点,所述转账请求包括所述转账信息密文及预存的公钥。
处理器还可以执行以下步骤:获取用户的主账户对应的主账户地址;根据主账户地址,生成子账户地址;发送账户创建请求给区块链节点,账户创建请求包括子账户地址。
处理器还可以执行以下步骤:生成一个临时字符串;在主账户地址的字符序列的预设位置处添加临时字符串,得到子账户地址。
处理器还可以执行以下步骤:通过随机数生成器生成一个随机数,将随机数确定为临时字符串;或者,获取用户输入的随机信息;对随机信息进行哈希运算,得到临时字符串。
该计算机可读指令被一个或多个处理器执行时,还可以使得一个或多个处理器执行以下步骤:接收用户的终端发送的子账户对应的转账请求;根据转账请求,获取子账户对应的子账户地址和用户的主账户地址;根据子账户地址和主账户地址,确定子账户是否为用户拥有的子账户;若确定子账户为用户拥有的子账户,则对转账请求进行转账处理。
处理器还可以执行以下步骤:从转账请求中获取公钥和转账信息密文;通过公钥对转账信息密文解密,得到转账信息,转账信息包括子账户地址;通过预设非对称加密算法对公钥进行运算,得到用户的主账户地址。
处理器还可以执行以下步骤:确定子账户地址中是否包括主账户地址;如果是,则确定子账户为用户拥有的子账户;如果否,则确定子账户不是用户拥有的子账户。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,该计算机程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,前述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等非易失性存储介质,或随机存储记忆体(Random Access Memory,RAM)等。
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (20)

  1. 一种基于区块链的子账户交易处理方法,其中,应用于终端,包括:
    接收用户提交的私钥及子账户对应的转账信息,所述转账信息包括所述子账户对应的子账户地址,所述子账户地址中包括所述用户的主账户对应的主账户地址;
    通过所述私钥对所述转账信息进行签名,得到转账信息密文;
    发送所述子账户对应的转账请求给区块链节点,所述转账请求包括所述转账信息密文及预存的公钥。
  2. 根据权利要求1所述的方法,其中,所述接收用户提交的私钥及子账户对应的转账信息之前,还包括:
    获取用户的主账户对应的主账户地址;
    根据所述主账户地址,生成子账户地址;
    发送账户创建请求给区块链节点,所述账户创建请求包括所述子账户地址。
  3. 根据权利要求2所述的方法,其中,所述根据所述主账户地址,生成子账户地址,包括:
    生成一个临时字符串;
    在所述主账户地址的字符序列的预设位置处添加所述临时字符串,得到子账户地址。
  4. 根据权利要求3所述的方法,其中,所述生成一个临时字符串,包括:
    通过随机数生成器生成一个随机数,将所述随机数确定为临时字符串;或者,
    获取所述用户输入的随机信息;对所述随机信息进行哈希运算,得到临时字符串。
  5. 一种基于区块链的子账户交易处理方法,其中,应用于区块链节点,包括:
    接收用户的终端发送的子账户对应的转账请求;
    根据所述转账请求,获取所述子账户对应的子账户地址和所述用户的主账户地址;
    根据所述子账户地址和所述主账户地址,确定所述子账户是否为所述用户拥有的子账户;
    若确定所述子账户为所述用户拥有的子账户,则对所述转账请求进行转账处理。
  6. 根据权利要求5所述的方法,其中,所述根据所述转账请求,获取所述子账户对应的子账户地址和所述用户的主账户地址,包括:
    从所述转账请求中获取公钥和转账信息密文;
    通过所述公钥对所述转账信息密文解密,得到转账信息,所述转账信息包括子账户地址;
    通过预设非对称加密算法对所述公钥进行运算,得到所述用户的主账户地址。
  7. 根据权利要求5所述的方法,其中,所述根据所述子账户地址和所述主账户地址,确定所述子账户是否为所述用户拥有的子账户,包括:
    确定所述子账户地址中是否包括所述主账户地址;
    如果是,则确定所述子账户为所述用户拥有的子账户;
    如果否,则确定所述子账户不是所述用户拥有的子账户。
  8. 一种计算机设备,应用于终端,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:
    接收用户提交的私钥及子账户对应的转账信息,所述转账信息包括所述子账户对应的子账户地址,所述子账户地址中包括所述用户的主账户对应的主账户地址;
    通过所述私钥对所述转账信息进行签名,得到转账信息密文;
    发送所述子账户对应的转账请求给区块链节点,所述转账请求包括所述转账信息密文及预存的公钥。
  9. 根据权利要求8所述的计算机设备,所述处理器执行所述计算机程序时还实现以下步骤:
    获取用户的主账户对应的主账户地址;
    根据所述主账户地址,生成子账户地址;
    发送账户创建请求给区块链节点,所述账户创建请求包括所述子账户地址。
  10. 根据权利要求9所述的计算机设备,所述处理器执行所述计算机程序时还实现以下步骤:
    生成一个临时字符串;
    在所述主账户地址的字符序列的预设位置处添加所述临时字符串,得到子账户地址。
  11. 根据权利要求10所述的计算机设备,所述处理器执行所述计算机程序时还实现以下步骤:
    通过随机数生成器生成一个随机数,将所述随机数确定为临时字符串;或者,
    获取所述用户输入的随机信息;对所述随机信息进行哈希运算,得到临时字符串。
  12. 一种计算机设备,应用于区块链节点,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:
    接收用户的终端发送的子账户对应的转账请求;
    根据所述转账请求,获取所述子账户对应的子账户地址和所述用户的主账户地址;
    根据所述子账户地址和所述主账户地址,确定所述子账户是否为所述用户拥有的子账户;
    若确定所述子账户为所述用户拥有的子账户,则对所述转账请求进行转账处理。
  13. 根据权利要求12所述的计算机设备,所述处理器执行所述计算机程序时还实现以下步骤:
    从所述转账请求中获取公钥和转账信息密文;
    通过所述公钥对所述转账信息密文解密,得到转账信息,所述转账信息包括子账户地址;
    通过预设非对称加密算法对所述公钥进行运算,得到所述用户的主账户地址。
  14. 根据权利要求12所述的计算机设备,所述处理器执行所述计算机程序时还实现以下步骤:
    确定所述子账户地址中是否包括所述主账户地址;
    如果是,则确定所述子账户为所述用户拥有的子账户;
    如果否,则确定所述子账户不是所述用户拥有的子账户。
  15. 一种计算机可读存储介质,应用于终端,所述计算机可读存储介质中存储计算机指令,当所述计算机指令在计算机上运行时,使得计算机执行如下步骤:
    接收用户提交的私钥及子账户对应的转账信息,所述转账信息包括所述子账户对应的子账户地址,所述子账户地址中包括所述用户的主账户对应的主账户地址;
    通过所述私钥对所述转账信息进行签名,得到转账信息密文;
    发送所述子账户对应的转账请求给区块链节点,所述转账请求包括所述转账信息密文及预存的公钥。
  16. 根据权利要求15所述的计算机可读存储介质,所述处理器执行所述计算机程序时还实现以下步骤:
    获取用户的主账户对应的主账户地址;
    根据所述主账户地址,生成子账户地址;
    发送账户创建请求给区块链节点,所述账户创建请求包括所述子账户地址。
  17. 根据权利要求16所述的计算机可读存储介质,所述处理器执行所述计算机程序时还实现以下步骤:
    生成一个临时字符串;
    在所述主账户地址的字符序列的预设位置处添加所述临时字符串,得到子账户地址。
  18. 根据权利要求17所述的计算机可读存储介质,所述处理器执行所述计算机程序时还实现以下步骤:
    通过随机数生成器生成一个随机数,将所述随机数确定为临时字符串;或者,
    获取所述用户输入的随机信息;对所述随机信息进行哈希运算,得到临时字符串。
  19. 一种计算机可读存储介质,应用于区块链节点,所述计算机可读存储介质中存储计算机指令,当所述计算机指令在计算机上运行时,使得计算机执行如下步骤:
    接收用户的终端发送的子账户对应的转账请求;
    根据所述转账请求,获取所述子账户对应的子账户地址和所述用户的主账户地址;
    根据所述子账户地址和所述主账户地址,确定所述子账户是否为所述用户拥有的子账户;
    若确定所述子账户为所述用户拥有的子账户,则对所述转账请求进行转账处理。
  20. 一种基于区块链的子账户交易系统,其中,包括:终端和区块链节点;
    所述终端,用于接收用户提交的私钥及子账户对应的转账信息,所述转账信息包括所述子账户对应的子账户地址,所述子账户地址中包括所述用户的主账户对应的主账户地址;通过所述私钥对所述转账信息进行签名,得到转账信息密文;发送所述子账户对应的转账请求给所述区块链节点,所述转账请求包括所述转账信息密文及预存的公钥;
    所述区块链节点,用于接收所述转账请求;根据所述转账请求,获取所述子账户对应的子账户地址和所述用户的主账户地址;根据所述子账户地址和所述主账户地址,确定所述子账户是否为所述用户拥有的子账户;若确定所述子账户为所述用户拥有的子账户,则对所述转账请求进行转账处理。
PCT/CN2021/123563 2020-10-14 2021-10-13 基于区块链的子账户交易处理方法、系统、设备及介质 WO2022078398A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011098399.3A CN112184229A (zh) 2020-10-14 2020-10-14 基于区块链的子账户交易处理方法、系统及设备
CN202011098399.3 2020-10-14

Publications (1)

Publication Number Publication Date
WO2022078398A1 true WO2022078398A1 (zh) 2022-04-21

Family

ID=73950116

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/123563 WO2022078398A1 (zh) 2020-10-14 2021-10-13 基于区块链的子账户交易处理方法、系统、设备及介质

Country Status (2)

Country Link
CN (1) CN112184229A (zh)
WO (1) WO2022078398A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114971610A (zh) * 2022-04-22 2022-08-30 中移互联网有限公司 转账管理方法及装置
CN114971611A (zh) * 2022-05-07 2022-08-30 中国工商银行股份有限公司 账户的热点均衡处理方法、装置、处理器以及电子设备
CN117808602A (zh) * 2024-03-01 2024-04-02 联动优势电子商务有限公司 基于子账户扩展的热点账户记账方法及相关装置

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112184229A (zh) * 2020-10-14 2021-01-05 深圳壹账通智能科技有限公司 基于区块链的子账户交易处理方法、系统及设备
CN113011882A (zh) * 2021-04-23 2021-06-22 上海和数软件有限公司 一种基于区块链的电力数据信息查询系统、电子设备及介质
CN113269642B (zh) * 2021-05-24 2023-03-28 深圳壹账通智能科技有限公司 基于区块链的交易处理方法、装置、设备及存储介质
CN117057806B (zh) * 2023-10-11 2024-01-30 腾讯科技(深圳)有限公司 基于区块链的数据处理方法、装置及相关设备

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108712395A (zh) * 2018-04-27 2018-10-26 腾讯科技(深圳)有限公司 基于区块链的账号管理方法、装置、服务器及存储介质
CN109428722A (zh) * 2017-08-30 2019-03-05 上海策赢网络科技有限公司 一种内容发布方法及装置
WO2019147477A1 (en) * 2018-01-26 2019-08-01 Alibaba Group Holding Limited Blockchain system and data processing method for blockchain system
CN110417561A (zh) * 2018-04-28 2019-11-05 华为技术有限公司 一种基于区块链的分布式计费方法、装置和系统
CN110942301A (zh) * 2019-11-22 2020-03-31 腾讯科技(深圳)有限公司 基于区块链的数据处理方法、装置、计算机以及存储介质
CN111104688A (zh) * 2019-11-13 2020-05-05 上海链颉科技有限公司 基于区块链的公私钥权限代理方法、系统及存储介质
CN112184229A (zh) * 2020-10-14 2021-01-05 深圳壹账通智能科技有限公司 基于区块链的子账户交易处理方法、系统及设备

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109120597B (zh) * 2018-07-18 2020-09-01 阿里巴巴集团控股有限公司 身份校验、登录方法、装置及计算机设备
CN109583887B (zh) * 2018-10-26 2024-04-05 创新先进技术有限公司 一种区块链的交易方法和装置
CN109523243A (zh) * 2018-11-19 2019-03-26 济南浪潮高新科技投资发展有限公司 一种雾计算环境下基于区块链的数据存储方法
KR102162763B1 (ko) * 2019-05-31 2020-10-07 넷마블 주식회사 계정 이동 방법
US11233658B2 (en) * 2019-08-14 2022-01-25 OX Labs Inc. Digital transaction signing for multiple client devices using secured encrypted private keys
CN111027035B (zh) * 2019-11-06 2022-04-08 香农数据有限公司 一种基于区块链的多重身份认证方法及系统

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109428722A (zh) * 2017-08-30 2019-03-05 上海策赢网络科技有限公司 一种内容发布方法及装置
WO2019147477A1 (en) * 2018-01-26 2019-08-01 Alibaba Group Holding Limited Blockchain system and data processing method for blockchain system
CN108712395A (zh) * 2018-04-27 2018-10-26 腾讯科技(深圳)有限公司 基于区块链的账号管理方法、装置、服务器及存储介质
CN110417561A (zh) * 2018-04-28 2019-11-05 华为技术有限公司 一种基于区块链的分布式计费方法、装置和系统
CN111104688A (zh) * 2019-11-13 2020-05-05 上海链颉科技有限公司 基于区块链的公私钥权限代理方法、系统及存储介质
CN110942301A (zh) * 2019-11-22 2020-03-31 腾讯科技(深圳)有限公司 基于区块链的数据处理方法、装置、计算机以及存储介质
CN112184229A (zh) * 2020-10-14 2021-01-05 深圳壹账通智能科技有限公司 基于区块链的子账户交易处理方法、系统及设备

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114971610A (zh) * 2022-04-22 2022-08-30 中移互联网有限公司 转账管理方法及装置
CN114971611A (zh) * 2022-05-07 2022-08-30 中国工商银行股份有限公司 账户的热点均衡处理方法、装置、处理器以及电子设备
CN117808602A (zh) * 2024-03-01 2024-04-02 联动优势电子商务有限公司 基于子账户扩展的热点账户记账方法及相关装置

Also Published As

Publication number Publication date
CN112184229A (zh) 2021-01-05

Similar Documents

Publication Publication Date Title
WO2022078398A1 (zh) 基于区块链的子账户交易处理方法、系统、设备及介质
CN108292402B (zh) 用于信息的安全交换的公共秘密的确定和层级确定性密钥
US10805085B1 (en) PKI-based user authentication for web services using blockchain
CN110958110B (zh) 一种基于零知识证明的区块链隐私数据管理方法和系统
US9985782B2 (en) Network bound decryption with offline encryption
US10911538B2 (en) Management of and persistent storage for nodes in a secure cluster
CN111431713B (zh) 一种私钥存储方法、装置和相关设备
KR20180114182A (ko) 비밀 공유를 위한 타원 곡선 암호를 사용하는 개인용 장치 보안
CN111064569B (zh) 可信计算集群的集群密钥获取方法及装置
JP6950745B2 (ja) 鍵交換装置、鍵交換システム、鍵交換方法、及び鍵交換プログラム
WO2020253108A1 (zh) 信息隐匿方法、装置、设备及存储介质
WO2022078396A1 (zh) 基于区块链的账户属性处理方法、设备及存储介质
CN111835526B (zh) 一种生成匿名凭证的方法及系统
US20210241270A1 (en) System and method of blockchain transaction verification
CN111444551A (zh) 账户的注册与登录方法、装置、电子设备及可读存储介质
CN112039892B (zh) 一种数据共享方法以及相关装置
CN111865582A (zh) 基于零知识证明的私钥离线存储方法、系统及存储介质
CN107395627B (zh) 一种基于单向函数的轻量级认证协议
CN110719172A (zh) 区块链系统中的签名方法、签名系统以及相关设备
WO2022095426A1 (zh) 基于区块链的联合账户创建方法、系统、设备及存储介质
US11146594B2 (en) Security incident blockchain
WO2020248656A1 (zh) 一种在区块链中解锁账户的方法和装置
JP7367443B2 (ja) 本人確認プログラム、管理装置及び本人確認方法
CN110784318B (zh) 群密钥更新方法、装置、电子设备、存储介质及通信系统
CN104917763B (zh) 一种pin码缓存方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21879441

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 18/07/2023)

122 Ep: pct application non-entry in european phase

Ref document number: 21879441

Country of ref document: EP

Kind code of ref document: A1