Disclosure of Invention
The embodiment of the application provides a blockchain-based account data processing method and related equipment, which are used for optimizing a transaction process in a blockchain system.
An embodiment of the present application provides a blockchain-based account data processing method, including:
acquiring an access instruction of a first Account, wherein the first Account comprises an Account sub-Account and/or a UTXO sub-Account which are positioned in a first blockchain system, the Account sub-Account and the UTXO sub-Account comprise at least one token, and the access instruction comprises identification information corresponding to the first Account;
when the identification information of the first account meets the preset condition, acquiring account information of the first account, wherein the account information of the first account comprises synchronized block heights;
when the synchronized block height of the first account is smaller than the highest block height of a first blockchain system, acquiring an unsynchronized block through the full quantity of nodes of the first blockchain system;
and updating account information of the first account according to the unsynchronized block.
Optionally, when determining that the first Account includes the Account sub-Account, the acquiring the Account information of the first Account includes:
Acquiring structural body information of the Account sub-Account, wherein the Account sub-Account comprises a first token;
analyzing the structural body information of the Account sub-Account to obtain Account information of the first token;
the updating the account information of the first account according to the unsynchronized block includes:
analyzing the unsynchronized block to obtain the associated transaction information with the first token;
updating account information of the first token by using the associated transaction information of the first token.
Optionally, when determining that the first account includes the UTXO sub-account, the acquiring the account information of the first account includes:
acquiring structural body information of the UTXO sub-Account, wherein the Account sub-Account comprises a second token;
analyzing the structural body information of the UTXO sub-account to obtain account information of the second token;
the updating the account information of the first account according to the unsynchronized block includes:
analyzing the unsynchronized block to obtain the associated transaction information with the second token;
updating account information of the second token with the associated transaction information of the second token.
Optionally, the access instruction further includes unlocking information, and the method further includes:
Unlocking the key file of the first account according to the unlocking information to obtain key information of the first account;
the updating the account information of the first account according to the unsynchronized block includes:
analyzing the unsynchronized block by using the key information of the first account to obtain block information to be updated;
updating account information of the first account by using the block information to be updated.
Optionally, after updating the account information of the first account according to the unsynchronized block, the method further comprises:
acquiring initial transaction information;
acquiring transaction commission from the total nodes in the first blockchain according to the initial transaction information;
signing and packaging the initial transaction information and the transaction commission by using the key information of the first account to obtain first transaction information;
and sending the first transaction information to a full-scale node of the first blockchain system, so that the full-scale node of the first blockchain system broadcasts the first transaction information.
Optionally, the acquiring the account information of the first account specifically includes:
acquiring pre-stored information of at least two accounts, wherein the at least two accounts comprise the first account, the at least two accounts correspond to at least two blockchain systems one by one, and the at least two blockchain systems comprise the first blockchain system;
Acquiring the account information of the first account from the prestored information of the at least two accounts according to the identification information of the first account.
A second aspect of an embodiment of the present application provides an asset management device comprising a memory and a processor, the memory having stored thereon a blockchain-based account data processing program executable on the processor, the blockchain-based account data processing program implementing the method of any of the first aspect and embodiments thereof when executed by the processor.
Optionally, the device is a node constituting a CDN network or a blockchain network.
A third aspect of an embodiment of the present application provides a blockchain-based account data processing system, the method including:
the first acquisition unit is used for acquiring an access instruction of a first Account, wherein the first Account comprises an Account sub-Account and/or a UTXO sub-Account which are positioned in a first blockchain system, the Account sub-Account and the UTXO sub-Account comprise at least one token, and the access instruction comprises identification information corresponding to the first Account;
the second acquisition unit is used for acquiring the account information of the first account when the identification information of the first account meets the preset condition, wherein the account information of the first account comprises the synchronized block height;
A third obtaining unit, configured to obtain, when the synchronized block height of the first account is smaller than the highest block height of the first blockchain system, an unsynchronized block through a full-scale node of the first blockchain system;
and the updating unit is used for updating the account information of the first account according to the unsynchronized block.
Optionally, when it is determined that the first Account includes the Account sub-Account, the second obtaining unit is specifically configured to:
acquiring structural body information of the Account sub-Account, wherein the Account sub-Account comprises a first token;
analyzing the structural body information of the Account sub-Account to obtain Account information of the first token;
the updating unit is specifically configured to:
analyzing the unsynchronized block to obtain the associated transaction information with the first token;
updating account information of the first token by using the associated transaction information of the first token.
Optionally, when it is determined that the first account includes the UTXO sub-account, the second obtaining unit is specifically configured to:
acquiring structural body information of the UTXO sub-Account, wherein the Account sub-Account comprises a second token;
analyzing the structural body information of the UTXO sub-account to obtain account information of the second token;
The updating unit is specifically configured to:
analyzing the unsynchronized block to obtain the associated transaction information with the second token;
updating account information of the second token with the associated transaction information of the second token.
Optionally, the access instruction further includes unlocking information, and the system further includes:
the unlocking unit is used for unlocking the key file of the first account according to the unlocking information to obtain the key information of the first account;
the updating unit is specifically configured to:
analyzing the unsynchronized block by using the key information of the first account to obtain block information to be updated;
updating account information of the first account by using the block information to be updated.
Optionally, the system further comprises:
a fourth acquisition unit configured to acquire initial transaction information;
a fifth obtaining unit, configured to obtain a transaction fee from the total nodes in the first blockchain according to the initial transaction information;
the signing unit is used for signing and packaging the initial transaction information and the transaction commission by using the key information of the first account to obtain first transaction information;
and the sending unit is used for sending the first transaction information to the full node of the first blockchain system so that the full node of the first blockchain system broadcasts the first transaction information.
Optionally, the second obtaining unit is specifically configured to:
acquiring pre-stored information of at least two accounts, wherein the at least two accounts comprise the first account, the at least two accounts correspond to at least two blockchain systems one by one, and the at least two blockchain systems comprise the first blockchain system;
acquiring the account information of the first account from the prestored information of the at least two accounts according to the identification information of the first account.
A fourth aspect of embodiments of the present application provides a computer readable storage medium having stored thereon a blockchain-based account data processing program executable by one or more processors to implement the blockchain-based account data processing method of any of the first aspect and embodiments thereof.
A fifth aspect of an embodiment of the present application provides a computer program product comprising computer instructions which, when run on a computer, enable the computer to implement a blockchain-based account data processing method as in any of the first aspect and embodiments thereof.
From the above technical solutions, the embodiment of the present application has the following advantages: acquiring an access instruction of a first Account, wherein the first Account comprises an Account sub-Account and/or a UTXO sub-Account which are positioned in a first blockchain system, the Account sub-Account and the UTXO sub-Account comprise at least one token, and the access instruction comprises identification information corresponding to the first Account; when the identification information of the first account meets the preset condition, acquiring account information of the first account, wherein the account information of the first account comprises synchronized block heights; when the synchronized block height of the first account is smaller than the highest block height of a first blockchain system, acquiring an unsynchronized block through the full quantity of nodes of the first blockchain system; and updating account information of the first account according to the unsynchronized block. The first Account comprises an Account sub-Account and/or a UTXO sub-Account which are/is located in the first blockchain system, and the Account sub-Account and the UTXO sub-Account comprise at least one token, so that the first Account can be used for carrying out asset management on the tokens of a plurality of sub-accounts in the Account.
Detailed Description
In the current blockchain system, token is the asset certification of the transaction performed by the user, and there are two main record storage modes, namely, unused transaction output (UTXO, unspent Transaction Output) mode and Account mode, when the transaction is performed, the system invokes intelligent contracts through the blockchain link points to perform the transaction on each, and the issuing number, the expansion rate and the like are specified in the intelligent contract codes. the token often also has the property of exchanging, and the process of exchanging the token between different users is also performed in a token contract (the token balance for each user is recorded in the contract). However, in the prior art, an intelligent contract corresponds to a token, and in addition, when the same user creates a plurality of accounts in the same blockchain system to respectively conduct transactions, the plurality of clients must be connected with the blockchain system and repeated login verification is needed to conduct the transactions, so that the transaction process of the user in the blockchain is too complicated, and the user experience is affected. To this end, the embodiment of the application provides a blockchain-based account data processing method and related equipment, which are used for optimizing a transaction process in a blockchain system.
Referring to fig. 1, an embodiment of a blockchain-based account data processing method according to an embodiment of the present application includes:
101. acquiring an access instruction of a first account;
in this embodiment, the asset management device obtains an access instruction of a first Account, where the first Account includes an Account sub-Account and/or a UTXO sub-Account located in a first blockchain system, where the Account sub-Account and the UTXO sub-Account each include at least one token, and the access instruction includes identification information corresponding to the first Account.
Specifically, the asset management device may be a PC (Personal Computer ), or may be a smart phone, a tablet computer, a palmtop computer, a portable computer, an intelligent router, a mining machine, or a network storage device terminal device.
A software program is run on the terminal device to perform the relevant steps in the embodiments of the application. Taking the asset management device as an example of a smart phone, the embodiment and the subsequent embodiments are only implemented by a wallet APP on the smart phone, namely, a wallet local wallet service APP. Referring specifically to the system connection architecture of fig. 5-1, a wallet local wallet service 505 communicates with a blockchain system 503 through a full volume node 504. As a preferred embodiment, this full-scale node 504 (peer node), which may be a local peer node compiled using official open source code, or a trusted third party public peer node, with which the wallet 505 process may illustratively communicate via an RPC interface.
In addition, the access instruction may include indication information corresponding to the first Account, for example, may be information related to an Account and/or a password of the first Account, where the wallet APP may use the indication information of the first Account to perform related operations such as unlocking in a subsequent step, where the first Account includes an Account sub-Account and/or a UTXO sub-Account located in the first blockchain system, where the Account sub-Account and the UTXO sub-Account each include at least one token, that is, the first Account corresponds to the first blockchain, and in a block in the first blockchain, the Account sub-Account and/or the UTXO sub-Account includes token information corresponding to the Account sub-Account, and each Account sub-Account and/or UTXO sub-Account may include one or more token accounts, for example.
102. When the identification information of the first account meets the preset condition, acquiring account information of the first account, wherein the account information of the first account comprises synchronized block heights;
specifically, the device may verify the indication information of the first account according to pre-stored data, and when the indication information of the first account matches with the pre-stored information, it may be determined that the indication information of the first account meets a preset condition. In addition, when the identification information of the first account meets the preset condition, namely, the fact that the operation related to the account access is legal is confirmed, at the moment, the account information of the first account can be loaded in the first blockchain system, namely, the account initialization operation is carried out, some data of wallet operation are loaded, and therefore the account information of the first account is obtained.
In this step, the user may specifically call the unlock_account interface of the wallet to enable the device to obtain an access instruction of the first account, where the first account includes a token account corresponding to a sub-account located in a blockchain system. In addition, the device may first obtain local data in this step, that is to say, obtain account information of the first account from a wallet local account database, where the account information of the first account includes a synchronized block height, that is to say, find a highest block in the local database for which the history has completed updating, and obtain the height of the block.
103. When the synchronized block height of the first account is smaller than the highest block height of a first blockchain system, acquiring an unsynchronized block through the full quantity of nodes of the first blockchain system;
in this embodiment, when the device finds that the block height synchronized by the first account is smaller than the highest block height of the first blockchain system, the device acquires the unsynchronized block through the full-scale nodes of the first blockchain system.
That is, the device connects with the full node in the first blockchain system through the wallet, and queries the highest block height in the full node, that is, the block height of the highest block that has achieved the consensus in the first blockchain system, and if the block height of the first account synchronized obtained in step 102 is found to be smaller than the highest block height of the first blockchain system, the unsynchronized block is obtained through the full node of the first blockchain system, that is, the unsynchronized block can be downloaded to the local area from the first blockchain system.
104. And updating account information of the first account according to the unsynchronized block.
In this embodiment, the device updates the account information of the first account according to the unsynchronized block obtained in step 103, that is, updates the account information of the first account in the local database by using the unsynchronized block, so that the highest block height corresponding to the account information of the first account in the local database is matched with the first blockchain.
In addition, as a preferred solution, the access instruction of the first account acquired in step 101 may further include unlocking information, so as to obtain the key information of the first account according to the key file for unlocking the first account. In this step, the key information of the first account may be used to parse the unsynchronized block to obtain information of a block to be updated, and then the account information of the first account is updated by using the information of the block to be updated.
In this embodiment, an access instruction of a first Account is obtained, where the first Account includes an Account sub-Account and/or a UTXO sub-Account located in a first blockchain system, where the Account sub-Account and the UTXO sub-Account each include at least one token, and the access instruction includes identification information corresponding to the first Account; when the identification information of the first account meets the preset condition, acquiring account information of the first account, wherein the account information of the first account comprises synchronized block heights; when the synchronized block height of the first account is smaller than the highest block height of a first blockchain system, acquiring an unsynchronized block through the full quantity of nodes of the first blockchain system; and updating account information of the first account according to the unsynchronized block. The first Account comprises an Account sub-Account and/or a UTXO sub-Account which are/is located in the first blockchain system, and the Account sub-Account and the UTXO sub-Account comprise at least one token, so that the first Account can be used for carrying out asset management on the tokens of a plurality of sub-accounts in the Account.
Based on the embodiment described in fig. 1, the Account information of the first Account acquired in step 102 may be further loaded according to the Account type of the sub-Account included in the first Account, that is to say the Account type of the sub-Account is identified, wherein the Account type comprises UTXO or Account, after which the Account information of the sub-Account is updated according to the unsynchronized block according to the Account type of the sub-Account. That is, the personalized Account processing is specifically performed according to at least two token types in the first Account, and for the common Account types, there are two types including UTXO and Account, and the Account data processing process of the two Account types will be described below through the specific embodiments of fig. 2 and fig. 3, respectively.
1. When the first Account is determined to comprise the Account sub-Account;
referring to fig. 2, in another embodiment of an account data processing method according to the embodiment described in fig. 1, step 102 includes:
201. acquiring structural body information of the Account sub-Account;
in this embodiment, the device obtains the structure information of the Account sub-Account, where the Account sub-Account includes a first token.
Specifically, in this embodiment, the structure information of the Account sub-Account may be acquired, and in this embodiment, the Account sub-Account may include at least one token, where one token is set as the first token.
202. Analyzing the structural body information of the Account sub-Account to obtain Account information of the first token;
in this embodiment, the device analyzes the structure information of the Account sub-Account obtained in step 201, and obtains the Account information of the first token.
Specifically, the Account information of the first token can be directly read and acquired in the token field in the structure information of the Account sub-Account,
account Account structure definition:
type Account struct{
address common. Address// Account Account Address
Nonce uint64// transaction sequence number
Token map [ common. Address ]. Big.int// preserving the map of Token's corresponding balance
}
The Account information of the Account sub-Account may store Account information of at least one token, that is, a plurality of tokens may be corresponding to the Account information of the Account sub-Account, where only the first token is taken as an example in this embodiment.
Step 104 of updating account information of the first account according to the unsynchronized block includes:
203. Analyzing the unsynchronized block to obtain the associated transaction information with the first token;
in this embodiment, the device analyzes the unsynchronized block obtained in step 103, and may obtain the related transaction information of the first token therein, that is, obtain the related transaction information such as the historical transaction record of the first account in the first token, the current balance, and the like.
204. Updating account information of the first token by using associated transaction information of the first token;
in this embodiment, the device specifically updates the Account information of the first token by using the associated transaction information of the first token, and because the Account type of the first token is an Account, the updating process may directly replace the Account information of the first Account obtained in step 202 by using the associated transaction information of the first token, so as to complete the data updating.
2. When the first account is determined to comprise the UTXO sub-account;
referring to fig. 3, in another embodiment of an account data processing method according to the embodiment of fig. 1, step 102 includes:
301. acquiring structural body information of the UTXO sub-account;
In this embodiment, the device obtains the structural information of the UTXO sub-account, where the UTXO sub-account includes a second token.
Specifically, in this embodiment, the structural information of the UTXO sub-account may be obtained, and in this embodiment, the UTXO sub-account may include at least one token, where one token is set as the second token.
302. Analyzing the structural body information of the UTXO sub-account to obtain account information of the second token;
in this embodiment, the device analyzes the structure information of the Account sub-Account obtained in step 201, and obtains the Account information of the first token.
In particular, the account information of the second token can be directly read and acquired in a token field in the structural body information of the UTXO sub-account,
UTXO account structure definition
type UTXO struct{
Address common. Address// UTXO account Address
Token map [ common. Address ]. Big.int// preserving the map of Token's corresponding balance
Transfer [ ] tctypes. UTXOUTPUtDetail// all local account related UTXO transaction array
}
Wherein,
UTXOOutputDetail transaction detail structure
type UTXOOutputDetail struct{
Block height index 64// height of transaction block
Tx UTXOTANSACTION// transaction content
TxID types.Hash// transaction Hash
OutIndexuint 64// present OUTPUT, serial number in the transaction
Global index 64// global OUTPUT sequence number
Spent pool// present OUTPUT whether it has Spent
Whether or not the Frozen pool// present OUTPUT is Frozen
SpentHeight Point 64// height spent
RKey types public Key// check Key
Key image types Key// OUTPUT globally unique identity
Mask types Key// amount proving parameter
Amount big. Int// OUTPUT
TokenID common/asset Token unique identification
Remark [32] byte// OUTPUT side information
}
Specifically, the structural information of the UTXO sub-account may store account information of at least one token, that is, a plurality of tokens may be corresponding to the structural information of the UTXO sub-account, where only the second token is taken as an example in this embodiment.
Step 104 of updating account information of the first account according to the unsynchronized block includes:
303. analyzing the unsynchronized block to obtain the associated transaction information with the second token;
in this embodiment, the device analyzes the unsynchronized block obtained in step 103, and may obtain the related transaction information of the first token therein, that is, obtain the related transaction information such as the historical transaction record of the first account in the first token, the current balance, and the like.
304. Updating account information of the second token by using the associated transaction information of the second token;
in this embodiment, the device specifically updates the account information of the first token by using the associated transaction information of the second token, and because the account type of the first token is UTXO account, the updating process needs to perform fusion calculation on the associated transaction information of the second token and the account information of the second tiger acquired in step 202, thereby calculating the account information of the first account corresponding to the second token, and completing data updating on the account information of the second token.
In the embodiment of the present application, based on the embodiments shown in fig. 1 to 3, specifically, after the account information of the first account is updated according to the unsynchronized block in step 104, that is, the device and the account information of the first account are synchronized, at this time, the first account may be used to perform a transaction, that is, operations such as transferring a token corresponding to a sub-account in the first account. Referring now to fig. 4, in another embodiment of an account data processing method based on the embodiments described in fig. 1 to 3, after updating the account information of the first account according to the unsynchronized block in step 104, the method may further include:
401. Acquiring initial transaction information;
in this embodiment, the device may directly obtain the initial transaction information by receiving the input information of the user, or may further obtain the initial transaction information by receiving information sent by other terminals, which is not limited herein. In addition, the initial transaction information may include the payee address of the first account, the transaction amount, the upper limit of the transaction amount, or other transaction related information, without limitation.
402. Acquiring transaction commission from the total nodes in the target blockchain according to the initial transaction information;
in this embodiment, the device obtains the transaction fee from the full node in the target blockchain according to the initial transaction information obtained in step 401, specifically, the wallet may establish a connection with the full node according to a standard flow, and then send the relevant content of the initial transaction information to the full node, so that the full node returns the relevant information of the transaction fee to the device according to the standard flow.
403. Signing and packaging the initial transaction information and the transaction commission by using the key information of the first account to obtain first transaction information;
In this embodiment, the device uses the key information of the first account obtained in step 104 to sign and package the initial transaction information and the transaction fee to obtain the first transaction information, so that other nodes can use the public key information published in advance to decrypt and verify the first transaction information.
404. Transmitting the first transaction information to a full-scale node of the first blockchain system;
in this embodiment, the apparatus transmits the first transaction information to a full-scale node of the first blockchain system, so that the full-scale node of the first blockchain system broadcasts the first transaction information.
Specifically, after the device sends the first transaction information to the full-quantity node in the first blockchain system, the full-quantity node can broadcast the first transaction information, further generate a hash value of the transaction state of the first transaction information according to feedback information of other nodes, and return the hash value to the device, so that the device obtains related information such as the transaction state of the first transaction information.
Referring to the transaction structure model in fig. 5-2, a wallet APP in the device may include a plurality of accounts pre-stored therein, wherein one account corresponds to one blockchain system and one account may correspond to a plurality of token in the blockchain system. In particular, referring to fig. 5, in another embodiment of an account data processing method according to the embodiment described in fig. 1, step 102 of obtaining the account information of the first account specifically includes:
501. Acquiring pre-stored information of at least two accounts;
in this embodiment, the device obtains pre-stored information of at least two accounts, where the at least two accounts include the first account, the at least two accounts correspond to at least two blockchain systems one to one, and the at least two blockchain systems include the first blockchain system.
Specifically, the device may obtain pre-stored information of the at least two accounts in its own database, where the pre-stored information may include corresponding information related to an account, a password, and the like of each account, where the at least two accounts are in one-to-one correspondence with at least two blockchain systems, and the at least two blockchain systems include the first blockchain system.
502. Acquiring the account information of the first account from the prestored information of the at least two accounts according to the identification information of the first account.
In this embodiment, the device may unlock the first account from the pre-stored information of the at least two accounts according to the identification information of the first account, that is, may determine the blockchain system corresponding to the unlock instruction according to the indication information of the first account, and determine the blockchain system according to the pre-stored information, and when determining that the inputted indication information of the first account meets the preset condition, acquire the account information of the first account from the pre-stored information of the at least two accounts, and may perform subsequent data synchronous update loading and uploading new transaction after using the account information of the first account in the subsequent step.
In this embodiment, as shown in fig. 6, the asset management device 1 may be a PC (Personal Computer ), or may be a smart phone, a tablet computer, a palm computer, a portable computer, an intelligent router, a mining machine, or a network storage device terminal device.
The device 1 may be a node constituting a CDN network or a blockchain network.
The asset management device 1 may include a memory 11, a processor 12, and a bus 13.
The memory 11 includes at least one type of readable storage medium including flash memory, a hard disk, a multimedia card, a card memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the asset management device 1, such as a hard disk of the asset management device 1. The memory 11 may in other embodiments also be an external storage device of the asset management device 1, such as a plug-in hard disk, smart Media Card (SMC), secure Digital (SD) Card, flash Card (Flash Card) or the like, provided on the asset management device 1. Further, the memory 11 may also include both an internal storage unit and an external storage device of the asset management device 1. The memory 11 may be used not only for storing application software installed in the asset management device 1 and various types of data, such as codes of the blockchain-based account data handler 01, etc., but also for temporarily storing data that has been output or is to be output.
Processor 12 may in some embodiments be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor or other data processing chip for executing program code or processing data stored in memory 11, such as executing a blockchain-based account data processing program 01 or the like.
The bus 13 may be a peripheral component interconnect standard (peripheral component interconnect, PCI) bus, or an extended industry standard architecture (extended industry standard architecture, EISA) bus, among others. The bus may be classified as an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in fig. 6, but not only one bus or one type of bus.
Further, the asset management device may also include a network interface 14 (not shown), and the network interface 14 may optionally include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), typically used to establish a communication connection between the device 1 and other electronic devices.
Optionally, the device 1 may further comprise a user interface, which may comprise a Display (Display), an input unit such as a Keyboard (Keyboard), and a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, or the like. Wherein the display may also be appropriately referred to as a display screen or display unit for displaying information processed in the asset management device 1 and for displaying a visual user interface.
Fig. 6 shows only the asset management device 1 with components 11-14 and blockchain-based account data handler 01, it will be understood by those skilled in the art that the structure shown in fig. 6 does not constitute a limitation of the asset management device 1, and may include fewer or more components than illustrated, or may combine certain components, or a different arrangement of components.
The present application will be described with reference to fig. 7, in which an account data processing system based on a blockchain in an embodiment of the present application includes:
a first obtaining unit 701, configured to obtain an access instruction of a first Account, where the first Account includes an Account sub-Account and/or a UTXO sub-Account located in a first blockchain system, where the Account sub-Account and the UTXO sub-Account each include at least one token, and the access instruction includes identification information corresponding to the first Account;
a second obtaining unit 702, configured to obtain account information of the first account when it is determined that the identification information of the first account meets a preset condition, where the account information of the first account includes a synchronized block height;
a third obtaining unit 703, configured to obtain, when the synchronized block height of the first account is less than the highest block height of the first blockchain system, an unsynchronized block through a full-scale node of the first blockchain system;
And an updating unit 704, configured to update account information of the first account according to the unsynchronized block.
In this embodiment, a first obtaining unit 701 is configured to obtain an access instruction of a first Account, where the first Account includes an Account sub-Account and/or a UTXO sub-Account located in a first blockchain system, where the Account sub-Account and the UTXO sub-Account each include at least one token, and the access instruction includes identification information corresponding to the first Account; a second obtaining unit 702, configured to obtain account information of the first account when it is determined that the identification information of the first account meets a preset condition, where the account information of the first account includes a synchronized block height; a third obtaining unit 703, configured to obtain, when the synchronized block height of the first account is less than the highest block height of the first blockchain system, an unsynchronized block through a full-scale node of the first blockchain system; and an updating unit 704, configured to update account information of the first account according to the unsynchronized block. The first Account comprises an Account sub-Account and/or a UTXO sub-Account which are/is located in the first blockchain system, and the Account sub-Account and the UTXO sub-Account comprise at least one token, so that the first Account can be used for carrying out asset management on the tokens of a plurality of sub-accounts in the Account.
As a preferred solution, when it is determined that the first Account includes the Account sub-Account, the second obtaining unit 702 is specifically configured to:
acquiring structural body information of the Account sub-Account, wherein the Account sub-Account comprises a first token;
analyzing the structural body information of the Account sub-Account to obtain Account information of the first token;
the updating unit 704 is specifically configured to:
analyzing the unsynchronized block to obtain the associated transaction information with the first token;
updating account information of the first token by using the associated transaction information of the first token.
As a preferred solution, when it is determined that the first account includes the UTXO sub-account, the second obtaining unit 702 is specifically configured to:
acquiring structural body information of the UTXO sub-Account, wherein the Account sub-Account comprises a second token;
analyzing the structural body information of the UTXO sub-account to obtain account information of the second token;
the updating unit 704 is specifically configured to:
analyzing the unsynchronized block to obtain the associated transaction information with the second token;
updating account information of the second token with the associated transaction information of the second token.
As a preferred aspect, the access instruction further includes unlocking information, and the system further includes:
an unlocking unit 705, configured to unlock the key file of the first account according to the unlocking information to obtain key information of the first account;
the updating unit 704 is specifically configured to:
analyzing the unsynchronized block by using the key information of the first account to obtain block information to be updated;
updating account information of the first account by using the block information to be updated.
Optionally, the system further comprises:
a fourth obtaining unit 706, configured to obtain initial transaction information;
a fifth obtaining unit 707 configured to obtain a transaction fee from the total nodes in the first blockchain according to the initial transaction information;
a signature unit 708, configured to sign and package the initial transaction information and the transaction fee by using the key information of the first account, so as to obtain first transaction information;
a transmitting unit 709, configured to transmit the first transaction information to a full node of the first blockchain system, so that the full node of the first blockchain system broadcasts the first transaction information.
Optionally, the second obtaining unit 702 is specifically configured to:
Acquiring pre-stored information of at least two accounts, wherein the at least two accounts comprise the first account, the at least two accounts correspond to at least two blockchain systems one by one, and the at least two blockchain systems comprise the first blockchain system;
acquiring the account information of the first account from the prestored information of the at least two accounts according to the identification information of the first account.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application.