Block chain assets disposition method and relevant device based on more asset models
Technical field
The present invention relates to block chain art field more particularly to a kind of block chain assets processing sides based on more asset models
Method, device, computer equipment and storage medium.
Background technique
Under UTXO (Unspent Transaction Output, the transaction output not spent) asset model, Yong Huke
To there is more UTXO assets, the transaction under UTXO asset model can be executed concurrently, therefore more efficient.However UTXO assets mould
It is very difficult that type, which is directly realized by the complete intelligent contract of figure spirit,.
Account asset model is applied on block chain, the complete virtual machine of figure spirit easy to accomplish, and supported with figure
The complete language of spirit goes to develop distributed application program (Decentralized Application, DApp), can allow block chain
More complicated function is provided.However user's assets are conceptualized as an Account object, therefore nothing under Account asset model
Method concurrently executes more transactions.
Therefore, it is necessary to a kind of new block chain assets processing scheme be provided, to solve the money under single asset model
Treatment effeciency is produced compared with slow or less function technical problem.
Summary of the invention
The block chain assets disposition method that the main purpose of the present invention is to provide a kind of based on more asset models, device,
Computer equipment and storage medium, it is intended to which the assets treatment effeciency under single asset model is asked compared with slow or less function technology
Topic.
To achieve the above object, the first aspect of the present invention provides a kind of block chain assets processing based on more asset models
Method, which comprises
Receive the request that user creates digital asset account;
It generates the first private key of the first account of the user, and is calculated according to first private key and to generate corresponding described the
First account address of one account;
The second private key of the second account of the user is generated, and is calculated according to second private key and generates corresponding second account
The second account address at family, wherein second account is from first account based on different asset models;
When getting digital asset, the digital asset that is got using first account and/or the second account storage.
Second private key of an alternative embodiment according to the present invention, second account for generating the user includes:
Mapping calculation is carried out to first private key using scheduled mapping algorithm, obtains second private key;Alternatively,
The second random number is generated as second private key using scheduled Generating Random Number.
An alternative embodiment according to the present invention, described calculated according to first private key generate corresponding first account
The first account address at family includes:
It is calculated according to first private key and generates the first public key;
The first cryptographic Hash of first public key is calculated using the first hash function;
Using first cryptographic Hash as the first account address of first account.
An alternative embodiment according to the present invention, described calculated according to second private key generate corresponding second account
Second account address includes:
It is calculated according to second private key and generates the second public key;
The second cryptographic Hash of first public key is calculated using the second hash function;
Using second cryptographic Hash as the second account address of second account.
An alternative embodiment according to the present invention, it is described when getting digital asset, using first account and/
Or second the digital asset that gets of account storage include:
Show first account and second account;
When receiving selected operation of the user to first account and second account, the account that user is selected is made
For target account;
Utilize the digital asset got described in target account storage.
An alternative embodiment according to the present invention, first account are Account account, and second account is
UTXO account;Alternatively, first account is UTXO account, second account is Account account.
An alternative embodiment according to the present invention, the method also includes:
Timing Synchronization subscribes to data block newly-generated in the block chain network;
When the assets in the data block are UTXO, filtered out using private key corresponding with the UTXO account described
UTXO in newly-generated data block, and the UTXO that will filter out is added to the UTXO account;
When the assets in the data block are Account, obtain in the newly-generated data block
Account, and the Account that will acquire is added in the Account account;
Show the face amount of the UTXO account or the amount of money of the Account account.
An alternative embodiment according to the present invention, the method also includes:
It is when Timing Synchronization or when subscribing to data block newly-generated in the block chain network, the data block is wide
Cast to other common recognition nodes in the block chain network;
The node that preset threshold whether is had more than in other described common recognition nodes of verifying knows together to the data block;
And
It is known together, is determined to the data block when having more than the node of preset threshold in other described common recognition nodes
The data block common recognition is completed;Or
It knows together, determines to the data block when being not above the node of preset threshold in other described common recognition nodes
The data block common recognition failure.
To achieve the above object, the second aspect of the present invention provides a kind of block chain assets processing based on more asset models
Device, described device include:
Request receiving module creates the request of digital asset account for receiving user;
First computing module, the first private key of the first account for generating the user, and according to first private key
Calculate the first account address for generating corresponding first account;
Second computing module, the second private key of the second account for generating the user, and according to second private key
The the second account address for generating corresponding second account is calculated, wherein second account is from first account based on different money
Produce model;
Asset store module, for being stored using first account and/or the second account when getting digital asset
The digital asset got.
To achieve the above object, the third aspect of the present invention provides a kind of computer equipment, and the computer equipment includes
Memory and processor are stored with the block chain based on more asset models that can be run on the processor on the memory
The downloading program of the downloading program of assets processing, the block chain assets processing based on more asset models is held by the processor
The block chain assets disposition method based on more asset models is realized when row.
To achieve the above object, the fourth aspect of the present invention provides a kind of computer readable storage medium, the computer
The downloading program of the block chain assets processing based on more asset models is stored on readable storage medium storing program for executing, it is described to be based on more assets moulds
The downloading program of the block chain assets processing of type can be executed by one or more processor with described in realizing based on more assets
The block chain assets disposition method of model.
Block chain assets disposition method, device, computer equipment described in the embodiment of the present invention based on more asset models
And storage medium can merge the advantage of every kind of asset model by the account generation account address for different asset models,
Allow user to be used in mixed way a variety of assets of oneself, realize the functions such as assets privacy transaction, more asset models by set expandability more
By force, better trading experiencing is brought for user.
Detailed description of the invention
Fig. 1 is the process signal of the block chain assets disposition method based on more asset models of first embodiment of the invention
Figure;
Fig. 2 is that the functional module of the block chain assets processing unit based on more asset models of second embodiment of the invention is shown
It is intended to;
Fig. 3 is the schematic diagram of internal structure of the computer equipment of third embodiment of the invention.
The object of the invention is realized, the embodiments will be further described with reference to the accompanying drawings for functional characteristics and advantage.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right
The present invention is further elaborated.It should be appreciated that described herein, specific examples are only used to explain the present invention, not
For limiting the present invention.Based on the embodiments of the present invention, those of ordinary skill in the art are not before making creative work
Every other embodiment obtained is put, shall fall within the protection scope of the present invention.
The description and claims of this application and the term " first " in above-mentioned attached drawing, " second " are for distinguishing class
As object, without being used to describe a particular order or precedence order.It should be understood that the data used in this way are in appropriate situation
Under can be interchanged, so that the embodiments described herein can be real with the sequence other than the content for illustrating or describing herein
It applies.In addition, term " includes " and " having " and their any deformation, it is intended that cover it is non-exclusive include, for example, packet
The process, method, system, product or equipment for having contained a series of steps or units those of be not necessarily limited to be clearly listed step or
Unit, but may include other steps being not clearly listed or intrinsic for these process, methods, product or equipment or
Unit.
It should be noted that the description for being related to " first ", " second " etc. in the present invention is used for description purposes only, and cannot
It is interpreted as its relative importance of indication or suggestion or implicitly indicates the quantity of indicated technical characteristic.Define as a result, " the
One ", the feature of " second " can explicitly or implicitly include at least one of the features.In addition, the skill between each embodiment
Art scheme can be combined with each other, but must be based on can be realized by those of ordinary skill in the art, when technical solution
Will be understood that the combination of this technical solution is not present in conjunction with there is conflicting or cannot achieve when, also not the present invention claims
Protection scope within.
Embodiment one
As shown in fig.1, the block chain assets processing side based on more asset models disclosed for first embodiment of the invention
The flow chart of method.
The block chain assets disposition method based on more asset models is applied in block catenary system, the block linkwork
System may include multiple common recognition nodes, and the common recognition node refers to the common recognition node device for participating in block chain data block common recognition.
It can be attached by communication link between each common recognition node, for example wired communications links or wireless communication link can be passed through
Road is attached, and multiple common recognition nodes have collectively constituted block chain network.It should be understood that the number of figure common recognition node is only
Schematically.According to needs are realized, any number of common recognition node can have.
Block chain assets disposition method based on multi-model provided by the embodiment of the present invention is generally by block chain network
Common recognition node execute, correspondingly, the block chain assets processing unit based on multi-model is generally positioned in block chain network
In common recognition node.
As shown in Figure 1, the block chain assets disposition method based on more asset models, specifically includes following steps, root
According to different demands, the sequence of step be can change in the flow chart, and certain steps can be omitted.
S11 receives the request that user creates digital asset account.
In the present embodiment, block chain digital wallet is installed in node of knowing together, the block chain digital wallet is a soft
Part program can generate and save key and the digital wallet address of block chain, can access common recognition node in block chain network, energy
The transaction of block chain is sent and received, and can be digitally signed with the block chain transaction message that key pair user sends.Number
Wallet address represents a unique public key broadcasts to all nodes in block catenary system, and private key is then stored in common recognition node
In.
User can create at least two digital asset accounts, at least two numbers money in block chain digital wallet
Producing account includes two or more digital asset account, and different digital asset accounts corresponds to different asset models.It is exemplary,
User creates two digital asset accounts: the first account and the second account in block chain digital wallet.First account
For Account account, then second account is UTXO account;Alternatively, first account is UTXO account, then described second
Account is Account account.The Account account is based on Account asset model, and the UTXO account is based on UTXO assets
Model.The total assets of user is the assets summation under owned asset model, can utilize a variety of moneys individually or simultaneously
Production goes to be traded accordingly.
S12 generates the first private key of the first account of the user, and is calculated according to first private key and generate corresponding institute
State the first account address of the first account.
In the present embodiment, when user creates the first account by the block chain digital wallet, the block chain number money
Packet can generate a private key at random.Knowing together node can be according to the private key generated at random with calculating the account for generating the first account
Location.
In an alternative embodiment, described calculated according to first private key generates the of corresponding first account
One account address includes:
It is calculated according to first private key and generates the first public key;
The first cryptographic Hash of first public key is calculated using the first hash function;
Using first cryptographic Hash as the first account address of first account.
In the optional embodiment, common recognition node can call SECP256K1 packet to carry out calculating generation to the private key
Public key.SECP256K1 refers to (the Elliptic Curve Digital of elliptic curve digital signature algorithm used in bit coin
Signature Algorithm, ECDSA), by the way that public key can be calculated when a known private key, and when known to public key
Can not retrospectively calculate go out private key, ensured the safety of bit coin.
Specifically, described include: using first cryptographic Hash as the first account address of first account
Using RACE raw integrity verification message abstract (RACE Integrity Primitives Evaluation
Message Digest, RIPEMD) algorithm to it is described altogether key carry out calculate generate public key Hash, by the address version of a byte
It number is connected to the head of public key Hash, Hash (for example, SHA256) operation twice then is carried out to public key Hash, before result
Check value of 4 bytes as public key Hash, is connected to the tail portion of public key Hash, reuses bit coin BASE58 and is encoded, i.e.,
Account address can be obtained.
The SECP256K1, described RIPEMD, BASE58 etc. are the prior art, and in this not go into detail by the present invention.
S13, generates the second private key of the second account of the user, and is calculated according to second private key and to generate corresponding the
Second account address of two accounts.
In the present embodiment, when user creates the second account by the block chain digital wallet, the block chain number money
Packet can also generate a private key at random.Node of knowing together can calculate the account for generating the second account according to the private key generated at random
Address.
In an alternative embodiment, the second private key of second account for generating the user includes:
Mapping calculation is carried out to first private key using scheduled mapping algorithm, obtains second private key;Alternatively,
The second random number is generated as second private key using scheduled Generating Random Number.
In the optional embodiment, common recognition node can use mapping algorithm, for example, Hash mapping, to described first
Private key is mapped, and obtains a new private key as the second private key.Private key is mapped to obtain a new private key, is existing
There is technology, the present invention no longer illustrates.Common recognition node can also generate at random a several conduct by the block chain digital wallet
Second private key.
In an alternative embodiment, described that the second account for generating corresponding second account is calculated according to second private key
Family address includes:
It is calculated according to second private key and generates the second public key;
The second cryptographic Hash of first public key is calculated using the second hash function;
Using second cryptographic Hash as the second account address of second account.
Calculated according to second private key generate the process of the second account address of corresponding second account with according to described the
One private key calculate generate the first account address of corresponding first account process be it is identical, the present invention is to private according to described second
The process that key calculates the second account address of corresponding second account of generation no longer elaborates, and for details, reference can be made to according to described first
Private key calculates the process and its associated description for generating the first account address of corresponding first account.
S14, when getting digital asset, the number that is got using first account and/or the second account storage
Assets.
In the present embodiment, the digital asset may include digging the reward of digging mine and hand over facile transaction fee that mine obtains
With common recognition node is stored after getting digital asset.
In an alternative embodiment, described when getting digital asset, utilize first account and/or second
The digital asset that account storage is got includes:
Show first account and second account;
When receiving selected operation of the user to first account and second account, the account that user is selected is made
For target account;
Utilize the digital asset got described in target account storage.
In the optional embodiment, all accounts of creation can be shown to by common recognition node in the form of list option
User, the account for the digital asset that user selects an account accessed as storage in list option.Illustratively, false
If creation has UTXO account and Account account in common recognition node, if user has selected UTXO account as acquired in storage
After the account of the digital asset arrived, the digital asset that common recognition node will acquire is stored in described with UTXO or Account
In UTXO account;After if user has selected the account of the Account account digital asset accessed as storage, common recognition section
The digital asset that point will acquire is stored in the Account account with UTXO or Account.
In an alternative embodiment, the method also includes:
Timing Synchronization subscribes to data block newly-generated in the block chain network;
When the assets in the data block are UTXO, filtered out using private key corresponding with the UTXO account described
UTXO in newly-generated data block, and the UTXO that will filter out is added to the UTXO account;
When the assets in the data block are Account, obtain in the newly-generated data block
Account, and the Account that will acquire is added in the Account account;
Show the face amount of the UTXO account or the amount of money of the Account account.
In the optional embodiment, a data block is divided into two parts, is " block head " and " block body " respectively,
Middle block head be used to record it is some illustrate information, and block body is the list for recording " transaction ".Block head includes six words
Section, is version number, the cryptographic Hash of previous block, Mei Keergen, preset difficulty value, timestamp, the random number to be found respectively.
Digging mine process is exactly to carry out a series of conversion, connection and Hash operation to this above six fields, and successfully search out one
Meet the random number of condition: the value after Hash operation, the cryptographic Hash than default difficulty value is small, then digging mine success.It is described
Common recognition node carries out digging mine in block chain network, and successfully take the data block newly-generated into block chain network it
Afterwards, the data block is stored.Block catenary system can successfully know together a certain amount of token of node granting as digging mine prize to mine is dug
It encourages.Node know together in addition to obtaining digging mine reward, tranaction costs corresponding to All Activity information in data block can also be obtained.
The data block generated after previous subsynchronous or subscription data block is determined as newly-generated data block, institute
Stating block chain digital wallet can be with data block newly-generated on Timing Synchronization or subscription block chain and execution.Described in display
The amount of money of the face amount of UTXO account or the Account account is to user, in order to be convenient for user management assets, it is known that
How many assets can do what transaction etc..
In an alternative embodiment, the method also includes:
It is when Timing Synchronization or when subscribing to data block newly-generated in the block chain network, the data block is wide
Cast to other common recognition nodes in the block chain network;
The node that preset threshold whether is had more than in other described common recognition nodes of verifying knows together to the data block;
And
It is known together, is determined to the data block when having more than the node of preset threshold in other described common recognition nodes
The data block common recognition is completed;Or
It knows together, determines to the data block when being not above the node of preset threshold in other described common recognition nodes
The data block common recognition failure.
In the optional embodiment, the preset threshold is pre-set to evaluate whether data block has known together
At critical value.In different block catenary systems, the quantity of common recognition node required for completing to data block common recognition is different
, that is, preset threshold is arranged according to block catenary system.For example, participating in the common recognition node of common recognition in bit coin system
Quantity has reached the 51% of entire common recognition node, can think to know together to data block and complete;Otherwise, when the common recognition for participating in common recognition
When the quantity of node is less than the 51% of entire common recognition node, then it is assumed that know together and fail to data block.For another example, in digital currency
In (DigiFinex Token, DFT) system, the quantity for participating in the common recognition node of common recognition has reached the 2/3 of entire common recognition node,
It can think to know together to data block and complete;Otherwise, when the quantity for the common recognition node for participating in common recognition is less than entire common recognition node
When 2/3, then it is assumed that know together and fail to data block.Data block is broadcast to other common recognitions in block chain network by common recognition node
Whether node knows together to the data block by other common recognition nodes, effective to verify the data block.Work as data
Block common recognition is completed, and shows that the data block is effective, then the common recognition node stores the data block.When data block is total
Know failure, shows that the data block is invalid, the common recognition node does not store the data block.
In other embodiments, during storing the data block or after storing the data block, common recognition section
Whether point can be failed in write-in memory space with the transaction data in detection data block, be stored if transaction data is written
Space failure, then can re-write.
It should be understood that when user needs to trade, can be selected from above-mentioned a variety of accounts it is one or two kinds of or with
On account as producing account, signature transaction is carried out to the assets produced in account, being transferred to account can be the side of being transferred to
The address Account or the address UTXO.
It should be noted that due to the Account in the ether mill virtual machine that figure spirit can be supported complete and running thereon
The complete intelligent contract of figure spirit, therefore the contract address of this block catenary system is using the address Account.For Account
The transaction of account directly executes intelligent contract;Transaction or UTXO account for UTXO account mix Account account
Transaction needs first to be converted to the transaction of UTXO account the input message of intelligent contract, then execute intelligent conjunction when calling contract
About.When executing intelligent contract, the service charge run out of can then return Account account in the form of Account or UTXO
Family or UTXO account.
Block chain assets disposition method described in the present embodiment based on more asset models, by for different asset models
Account generate account address, the advantage of every kind of asset model can be merged, user is allowed to be used in mixed way a variety of assets of oneself, it is real
The functions such as existing assets privacy transaction, more asset models are stronger by set expandability, bring better trading experiencing for user.
Embodiment two
As shown in fig.2, the block chain assets processing unit based on more asset models disclosed for the embodiment of the present invention three
The functional block diagram.
In some embodiments, the block chain assets processing unit 20 based on more asset models runs on resource service
In device.The block chain assets processing unit 20 based on more asset models may include multiple as composed by program code segments
Functional module.The program code of each program segment in the block chain assets processing unit 20 based on more asset models can be with
It is stored in the memory of computer equipment, and as performed by least one described processor, it is right with execution (being detailed in Fig. 1 description)
The processing of intelligent contract.
In the present embodiment, the function of the block chain assets processing unit 20 according to performed by it based on more asset models
Can, multiple functional modules can be divided into.The functional module may include: request receiving module 201, the first computing module
202, the second computing module 203, asset store module 204, block obtain module 205, assets refresh module 206, assets and show
Module 207 and block common recognition module 208.The so-called module of the present invention refers to that one kind can be performed by least one processor simultaneously
And the series of computation machine program segment of fixed function can be completed, storage is in memory.In the present embodiment, about each mould
The function of block will be described in detail in subsequent embodiment.
Request receiving module 201 creates the request of digital asset account for receiving user.
In the present embodiment, block chain digital wallet is installed in node of knowing together, the block chain digital wallet is a soft
Part program can generate and save key and the digital wallet address of block chain, can access common recognition node in block chain network, energy
The transaction of block chain is sent and received, and can be digitally signed with the block chain transaction message that key pair user sends.Number
Wallet address represents a unique public key broadcasts to all nodes in block catenary system, and private key is then stored in common recognition node
In.
User can create at least two digital asset accounts, at least two numbers money in block chain digital wallet
Producing account includes two or more digital asset account, and different digital asset accounts corresponds to different asset models.It is exemplary,
User creates two digital asset accounts: the first account and the second account in block chain digital wallet.First account
For Account account, then second account is UTXO account;Alternatively, first account is UTXO account, then described second
Account is Account account.The Account account is based on Account asset model, and the UTXO account is based on UTXO assets
Model.The total assets of user is the assets summation under owned asset model, can utilize a variety of moneys individually or simultaneously
Production goes to be traded accordingly.
First computing module 202, the first private key of the first account for generating the user, and it is private according to described first
Key calculates the first account address for generating corresponding first account.
In the present embodiment, when user creates the first account by the block chain digital wallet, the block chain number money
Packet can generate a private key at random.Knowing together node can be according to the private key generated at random with calculating the account for generating the first account
Location.
In an alternative embodiment, first computing module 202 is calculated to generate according to first private key and be corresponded to
First account address of first account includes:
It is calculated according to first private key and generates the first public key;
The first cryptographic Hash of first public key is calculated using the first hash function;
Using first cryptographic Hash as the first account address of first account.
In the optional embodiment, common recognition node can call SECP256K1 packet to carry out calculating generation to the private key
Public key.SECP256K1 refers to (the Elliptic Curve Digital of elliptic curve digital signature algorithm used in bit coin
Signature Algorithm, ECDSA), by the way that public key can be calculated when a known private key, and when known to public key
Can not retrospectively calculate go out private key, ensured the safety of bit coin.
Specifically, described include: using first cryptographic Hash as the first account address of first account
Using RACE raw integrity verification message abstract (RACE Integrity Primitives Evaluation
Message Digest, RIPEMD) algorithm to it is described altogether key carry out calculate generate public key Hash, by the address version of a byte
It number is connected to the head of public key Hash, Hash (for example, SHA256) operation twice then is carried out to public key Hash, before result
Check value of 4 bytes as public key Hash, is connected to the tail portion of public key Hash, reuses bit coin BASE58 and is encoded, i.e.,
Account address can be obtained.
The SECP256K1, described RIPEMD, BASE58 etc. are the prior art, and in this not go into detail by the present invention.
Second computing module 203, the second private key of the second account for generating the user, and it is private according to described second
Key calculates the second account address for generating corresponding second account.
In the present embodiment, when user creates the second account by the block chain digital wallet, the block chain number money
Packet can also generate a private key at random.Node of knowing together can calculate the account for generating the second account according to the private key generated at random
Address.
In an alternative embodiment, second computing module 203 generates the second of the second account of the user
Private key includes:
Mapping calculation is carried out to first private key using scheduled mapping algorithm, obtains second private key;Alternatively,
The second random number is generated as second private key using scheduled Generating Random Number.
In the optional embodiment, common recognition node can use mapping algorithm, for example, Hash mapping, to described first
Private key is mapped, and obtains a new private key as the second private key.Private key is mapped to obtain a new private key, is existing
There is technology, the present invention no longer illustrates.Common recognition node can also generate at random a several conduct by the block chain digital wallet
Second private key.
In an alternative embodiment, second computing module 203 is calculated to generate according to second private key and be corresponded to
Second account address of the second account includes:
It is calculated according to second private key and generates the second public key;
The second cryptographic Hash of first public key is calculated using the second hash function;
Using second cryptographic Hash as the second account address of second account.
Calculated according to second private key generate the process of the second account address of corresponding second account with according to described the
One private key calculate generate the first account address of corresponding first account process be it is identical, the present invention is to private according to described second
The process that key calculates the second account address of corresponding second account of generation no longer elaborates, and for details, reference can be made to according to described first
Private key calculates the process and its associated description for generating the first account address of corresponding first account.
Asset store module 204, for utilizing first account and/or the second account when getting digital asset
Store the digital asset got.
In the present embodiment, the digital asset may include digging the reward of digging mine and hand over facile transaction fee that mine obtains
With common recognition node is stored after getting digital asset.
In an alternative embodiment, the asset store module 204 utilizes described when getting digital asset
The digital asset that one account and/or the second account storage are got includes:
Show first account and second account;
When receiving selected operation of the user to first account and second account, the account that user is selected is made
For target account;
Utilize the digital asset got described in target account storage.
In the optional embodiment, all accounts of creation can be shown to by common recognition node in the form of list option
User, the account for the digital asset that user selects an account accessed as storage in list option.Illustratively, false
If creation has UTXO account and Account account in common recognition node, if user has selected UTXO account as acquired in storage
After the account of the digital asset arrived, the digital asset that common recognition node will acquire is stored in described with UTXO or Account
In UTXO account;After if user has selected the account of the Account account digital asset accessed as storage, common recognition section
The digital asset that point will acquire is stored in the Account account with UTXO or Account.
In an alternative embodiment, the block chain assets processing unit 20 based on more asset models further include:
Block obtains module 205, for Timing Synchronization or subscribes to data block newly-generated in the block chain network;
Assets refresh module 206, for when the assets in the data block be UTXO when, using with the UTXO account
Corresponding private key filters out the UTXO in the newly-generated data block, and the UTXO that will filter out is added to the UTXO account
Family;
Assets refresh module 206 is also used to obtain the new life when the assets in the data block are Account
At data block in Account, and the Account that will acquire is added in the Account account;
Assets display module 207, for showing the face amount of the UTXO account or the amount of money of the Account account.
In the optional embodiment, a data block is divided into two parts, is " block head " and " block body " respectively,
Middle block head be used to record it is some illustrate information, and block body is the list for recording " transaction ".Block head includes six words
Section, is version number, the cryptographic Hash of previous block, Mei Keergen, preset difficulty value, timestamp, the random number to be found respectively.
Digging mine process is exactly to carry out a series of conversion, connection and Hash operation to this above six fields, and successfully search out one
Meet the random number of condition: the value after Hash operation, the cryptographic Hash than default difficulty value is small, then digging mine success.It is described
Common recognition node carries out digging mine in block chain network, and successfully take the data block newly-generated into block chain network it
Afterwards, the data block is stored.Block catenary system can successfully know together a certain amount of token of node granting as digging mine prize to mine is dug
It encourages.Node know together in addition to obtaining digging mine reward, tranaction costs corresponding to All Activity information in data block can also be obtained.
The data block generated after previous subsynchronous or subscription data block is determined as newly-generated data block, institute
Stating block chain digital wallet can be with data block newly-generated on Timing Synchronization or subscription block chain and execution.Described in display
The amount of money of the face amount of UTXO account or the Account account is to user, in order to be convenient for user management assets, it is known that
How many assets can do what transaction etc..
In an alternative embodiment, the block chain assets processing unit 20 based on more asset models further include:
Block common recognition module 208, is used for:
It is when Timing Synchronization or when subscribing to data block newly-generated in the block chain network, the data block is wide
Cast to other common recognition nodes in the block chain network;
The node that preset threshold whether is had more than in other described common recognition nodes of verifying knows together to the data block;
And
It is known together, is determined to the data block when having more than the node of preset threshold in other described common recognition nodes
The data block common recognition is completed;Or
It knows together, determines to the data block when being not above the node of preset threshold in other described common recognition nodes
The data block common recognition failure.
In the optional embodiment, the preset threshold is pre-set to evaluate whether data block has known together
At critical value.In different block catenary systems, the quantity of common recognition node required for completing to data block common recognition is different
, that is, preset threshold is arranged according to block catenary system.For example, participating in the common recognition node of common recognition in bit coin system
Quantity has reached the 51% of entire common recognition node, can think to know together to data block and complete;Otherwise, when the common recognition for participating in common recognition
When the quantity of node is less than the 51% of entire common recognition node, then it is assumed that know together and fail to data block.For another example, in digital currency
In (DigiFinex Token, DFT) system, the quantity for participating in the common recognition node of common recognition has reached the 2/3 of entire common recognition node,
It can think to know together to data block and complete;Otherwise, when the quantity for the common recognition node for participating in common recognition is less than entire common recognition node
When 2/3, then it is assumed that know together and fail to data block.Data block is broadcast to other common recognitions in block chain network by common recognition node
Whether node knows together to the data block by other common recognition nodes, effective to verify the data block.Work as data
Block common recognition is completed, and shows that the data block is effective, then the common recognition node stores the data block.When data block is total
Know failure, shows that the data block is invalid, the common recognition node does not store the data block.
In other embodiments, during storing the data block or after storing the data block, common recognition section
Whether point can be failed in write-in memory space with the transaction data in detection data block, be stored if transaction data is written
Space failure, then can re-write.
It should be understood that when user needs to trade, can be selected from above-mentioned a variety of accounts it is one or two kinds of or with
On account as producing account, signature transaction is carried out to the assets produced in account, being transferred to account can be the side of being transferred to
The address Account or the address UTXO.
It should be noted that due to the Account in the ether mill virtual machine that figure spirit can be supported complete and running thereon
The complete intelligent contract of figure spirit, therefore the contract address of this block catenary system is using the address Account.For Account
The transaction of account directly executes intelligent contract;Transaction or UTXO account for UTXO account mix Account account
Transaction needs first to be converted to the transaction of UTXO account the input message of intelligent contract, then execute intelligent conjunction when calling contract
About.When executing intelligent contract, the service charge run out of can then return Account account in the form of Account or UTXO
Family or UTXO account.
Block chain assets processing unit described in the present embodiment based on more asset models, by for different asset models
Account generate account address, the advantage of every kind of asset model can be merged, user is allowed to be used in mixed way a variety of assets of oneself, it is real
The functions such as existing assets privacy transaction, more asset models are stronger by set expandability, bring better trading experiencing for user.
Embodiment three
Fig. 3 is the schematic diagram of internal structure for the computer equipment that the embodiment of the present invention discloses.
In the present embodiment, computer equipment 3 can be common recognition node, be also possible to Resource Server, can also be it
His electronic equipment.
The computer equipment 3 may include memory 31, processor 32 and bus 33.
Wherein, memory 31 include at least a type of readable storage medium storing program for executing, the readable storage medium storing program for executing include flash memory,
Hard disk, multimedia card, card-type memory (for example, SD or DX memory etc.), magnetic storage, disk, CD etc..Memory 31
It can be the internal storage unit of the computer equipment 3, such as the hard disk of the computer equipment 3 in some embodiments.
Memory 31 is also possible to the External memory equipment of the computer equipment 3, such as the computer in further embodiments
The plug-in type hard disk being equipped in equipment 3, intelligent memory card (Smart Media Card, SMC), secure digital (Secure
Digital, SD) card, flash card (Flash Card) etc..Further, memory 31 can also both include that the computer is set
Standby 3 internal storage unit also includes External memory equipment.Memory 31 can be not only used for storage and be installed on the computer
The application application program and Various types of data of equipment 3, such as the code of the block chain assets processing unit 20 based on more asset models
Deng and modules, can be also used for temporarily storing the data that has exported or will export.
Processor 32 can be in some embodiments a central processing unit (Central Processing Unit,
CPU), controller, microcontroller, microprocessor or other data processing chips, the program for being stored in run memory 31
Code or processing data.
The bus 33 can be Peripheral Component Interconnect standard (peripheral component interconnect, PCI)
Bus or expanding the industrial standard structure (extended industry standard architecture, EISA) bus etc..It should
Bus can be divided into address bus, data/address bus, control bus etc..Only to be indicated with a thick line in Fig. 3 convenient for indicating, but
It is not offered as only a bus or a type of bus.
Further, the computer equipment 3 can also include network interface, and network interface optionally may include wired
Interface and/or wireless interface (such as WI-FI interface, blue tooth interface), commonly used in the computer equipment 3 and other computers
Communication connection is established between equipment.
Optionally, which can also include user interface, and user interface may include display
(Display), input unit such as keyboard (Keyboard), optional user interface can also include standard wireline interface,
Wireless interface.Optionally, in some embodiments, it is aobvious to can be light-emitting diode display, liquid crystal display, touch control type LCD for display
Show that device and Organic Light Emitting Diode (Organic Light-Emitting Diode, OLED) touch device etc..Wherein, display
Appropriate it can also be known as display screen or display unit, for being shown in the message handled in the computer equipment and being used for
Show visual user interface.
Fig. 3 illustrates only the computer equipment 3 with component 31-33, it will be appreciated by persons skilled in the art that
Structure shown in Fig. 3 does not constitute the restriction to the computer equipment 3, either bus topology, is also possible to star
Structure, the computer equipment 3 can also include than illustrate less perhaps more components perhaps combine certain components or
Different component layouts.Other electronic products that are existing or being likely to occur from now on are such as adaptable to the present invention, should also be included in
Within protection scope of the present invention, and it is incorporated herein by reference.
In the above-described embodiments, can come wholly or partly by application program, hardware, firmware or any combination thereof
It realizes.When being realized using application program, can entirely or partly realize in the form of a computer program product.
The computer program product includes one or more computer instructions.Load and execute on computers the meter
When calculation machine program instruction, entirely or partly generate according to process or function described in the embodiment of the present invention.The computer can
To be general purpose computer, special purpose computer, computer network or other programmable devices.The computer instruction can be deposited
Storage in a computer-readable storage medium, or from a computer readable storage medium to another computer readable storage medium
Transmission, for example, the computer instruction can pass through wired (example from a web-site, computer, server or data center
Such as, coaxial cable, optical fiber, Digital Subscriber Line) or wireless (for example, infrared, wireless, microwave etc.) mode to another website station
Point, computer, server or data center are transmitted.The computer readable storage medium can be computer and can store
Any usable medium either include that the data storages such as one or more usable mediums integrated server, data center are set
It is standby.The usable medium can be magnetic medium (for example, floppy disk, hard disk, tape), optical medium (for example, DVD), or partly lead
Body medium (for example, solid state hard disk (Solid State Disk, SSD)) etc..
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description,
The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed system, device and method can be with
It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit
It divides, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components
It can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown or
The mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, the indirect coupling of device or unit
It closes or communicates to connect, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.Some or all of unit therein can be selected to realize the scheme in the present embodiment according to the actual needs
Purpose.
It, can also be in addition, each functional unit in each embodiment of the application can integrate in one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also be realized in the form of function of application unit.
If the integrated unit realized in the form of function of application unit and as independent product sale or
In use, can store in a computer readable storage medium.Based on this understanding, the technical solution sheet of the application
The all or part of the part that contributes to existing technology or the technical solution can be produced in other words with application program in matter
The form of product embodies, which is stored in a storage medium, including some instructions are to make
It obtains a computer equipment (can be personal computer, server or the network equipment etc.) and executes each embodiment of the application
The all or part of the steps of the method.And storage medium above-mentioned includes: USB flash disk, hard disk, read-only memory (Read-Only
Memory, ROM), random access memory (Random Access Memory, RAM), magnetic or disk etc. is various to deposit
Store up the medium of program code.
It should be noted that the serial number of the above embodiments of the invention is only for description, do not represent the advantages or disadvantages of the embodiments.And
The terms "include", "comprise" herein or any other variant thereof is intended to cover non-exclusive inclusion, so that packet
Process, article or the method for including a series of elements not only include those elements, but also other including being not explicitly listed
Element, or further include for this process, article or the intrinsic element of method.In the absence of more restrictions,
The element limited by sentence "including a ...", it is not excluded that also deposited in process, article or the method for including the element
In other identical element.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair
Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills
Art field, is included within the scope of the present invention.