The content of the invention
In view of this, the invention provides a kind of digital asset method of commerce, to solve in the prior art once numeral
Transaction in assets center is broken down or attacked, the problem of security of data cannot be ensured.Concrete scheme is as follows:
A kind of method of commerce of digital asset, including:
It is pair corresponding with the transaction request according to default proof rule when receiving the transaction request of both parties
Transaction data package verified in both parties;
When receiving the signal being proved to be successful, judge whether the data to be transacted in the transaction data package meet transaction
Rule;
If meeting, the transaction data package is write in the block where current transaction terminal, by the addition of the block
Request is sent to each node server corresponding with the block;
Feedback signal of each the described node server to the addition request is received, the feedback signal is saved in
Signal buffer area, if allowing the feedback signal of addition and whole feedback signals in signal caching in the signal buffer area
When ratio meets preset ratio, in the block chain that the block is added to each node server, form distributed
Account book, completes transaction.
Above-mentioned method, it is preferred that right according to default proof rule when receiving the transaction request of both parties
Transaction data package corresponding with the transaction request carries out checking in both parties to be included:
The transaction data package is sent into seller terminal to be encrypted;
Obtain the digital signature of the transaction data package;
The transaction data package and the digital signature are sent into buyer terminal to be verified.
Above-mentioned method, it is preferred that by the transaction data package be sent to seller terminal be encrypted including:
The first summary of the transaction data package is calculated according to hash function;
The described first summary is encrypted using the private key of the seller terminal, digital signature is formed.
Above-mentioned method, it is preferred that the transaction data package and the digital signature are sent to buyer terminal and tested
Card includes:
The first summary of the transaction data package is calculated according to the hash function;
The digital signature is decrypted using the public key of the seller terminal, the second summary is obtained;
When the described first summary is identical with the described second summary, transmission is proved to be successful signal.
Above-mentioned method, it is preferred that when receiving the signal being proved to be successful, judges that treating in the transaction data package is handed over
Whether easy data, which meet trading rules, includes:
Search and the corresponding trading rules of the transaction;
The data to be transacted in the transaction data package are obtained, according to the trading rules, the data to be transacted are judged
Whether the trading rules are met.
A kind of transaction system of digital asset, including:
Authentication module, for when receiving the transaction request of both parties, according to default proof rule, pair with it is described
The corresponding transaction data package of transaction request is verified in both parties;
Judge module, for when receiving the signal being proved to be successful, judging the number to be transacted in the transaction data package
According to whether meeting trading rules;
Sending module, if for meeting, the transaction data package is write in the block where current transaction terminal, by institute
The addition request for stating block is sent to each node server corresponding with the block;
Add module, will be described for receiving feedback signal of each the described node server to the addition request
Feedback signal is saved in signal buffer area, if in allowing feedback signal and the signal caching of addition in the signal buffer area
When the ratio of whole feedback signals meets preset ratio, the block is added to the block chain of each node server
In, distributed account book is formed, transaction is completed.
Above-mentioned system, it is preferred that the authentication module includes:
Ciphering unit, is encrypted for the transaction data package to be sent into seller terminal;
Acquiring unit, the digital signature for obtaining the transaction data package;
Authentication unit, is verified for the transaction data package and the digital signature to be sent into buyer terminal.
Above-mentioned system, it is preferred that the ciphering unit includes:
First computation subunit, the first summary for calculating the transaction data package according to hash function;
Encryption sub-unit operable, is encrypted to the described first summary for the private key using the seller terminal, forms numeral
Signature.
Above-mentioned system, it is preferred that the authentication unit includes:
Second computation subunit, the first summary for calculating the transaction data package according to the hash function;
Subelement is decrypted, the digital signature is decrypted for the public key using the seller terminal, second is obtained
Summary;
Transmission sub-unit, for when the described first summary is identical with the described second summary, transmission to be proved to be successful signal.
Above-mentioned system, it is preferred that the judge module includes:
Searching unit, for searching and the corresponding trading rules of the transaction;
Judging unit, for obtaining the data to be transacted in the transaction data package, according to the trading rules, judges institute
State whether data to be transacted meet the trading rules.
Compared with prior art, the present invention includes advantages below:
The invention provides a kind of digital asset method of commerce, including:When both parties, which just merchandise, to reach common understanding, it can send out
Transaction request is sent, when receiving the transaction request, according to default proof rule, pair friendship corresponding with the transaction request
Easy packet is verified in both parties;When receiving the signal being proved to be successful, treating in the transaction data package is judged
Whether transaction data meets trading rules;If meeting, the transaction data package is write in the block where current transaction terminal,
The addition request of the block is sent to each node server corresponding with the block;Receive each described node
Server is saved in the signal buffer area where the current transaction terminal, if described to the feedback signal of the addition request
The ratio of the feedback signal and whole feedback signals in signal caching of addition is allowed to meet preset ratio in signal buffer area
When, in the block chain that the block is added to each node server, distributed account book is formed, transaction is completed.On
The method stated, forms distributed account book according to block chain technology, though some node server receive attack be tampered or
Break down, because to data, by the way of distributed storage, the data also will not be tampered or lose, and improve number
According to the security of storage.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.It is based on
Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not made
Embodiment, belongs to the scope of protection of the invention.
The foregoing description of the disclosed embodiments, enables professional and technical personnel in the field to realize or using the present invention.
A variety of modifications to these embodiments will be apparent for those skilled in the art, as defined herein
General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, it is of the invention
The embodiments shown herein is not intended to be limited to, and is to fit to and principles disclosed herein and features of novelty phase one
The most wide scope caused.
The invention provides a kind of digital asset method of commerce, methods described is applied to the transaction terminal of digital asset, institute
It can be computer, mobile phone etc. to state terminal, and the executive agent of methods described is merchandised for the processor or digital asset of the terminal
Platform.In the raw embodiment of the present invention, so that executive agent is digital asset transaction platform as an example, methods described is illustrated.Institute
The flow chart of method is stated, as shown in figure 1, including step:
In the embodiment of the present invention, when the establishment process of the digital asset is against regulation, the digital asset is abandoned
Establishment.
S101, when receiving the transaction request of both parties, according to default proof rule, pair with the transaction request
Corresponding transaction data package is verified in both parties;
In the embodiment of the present invention, when the transaction terminal of both parties is concluded the transaction with regard to Object of Transaction and turnover knows together,
Transaction request can be sent, it is pair corresponding with the transaction request according to default proof rule when receiving the transaction request
Transaction data package verified in both parties.
S102, when receiving the signal being proved to be successful, judge whether data to be transacted in the transaction data package full
Sufficient trading rules;
In the embodiment of the present invention, when receive be proved to be successful signal when, obtain the number to be transacted in the transaction data package
According to the trading rules that foundation is matched with the transaction data package judge whether the data to be transacted in the transaction data package are full
The foot trading rules.
If S103, meeting, the transaction data package is write in the block where current transaction terminal, by the block
Addition request is sent to each node server corresponding with the block;
In the embodiment of the present invention, when the transaction data package meets the trading rules, the transaction of digital asset is generated
Record, the transaction data package is write in the block where current transaction terminal, can also be by the digital asset transaction record
Also write in the lump in the block where the current transaction terminal, and the addition request of the block is sent to and the block
Each corresponding node server.
The feedback signal that S104, each described node server of reception are asked the addition, by the feedback signal
Signal buffer area is saved in, if allowing the feedback signal of addition in the signal buffer area with all being fed back in signal caching
When the ratio of signal meets preset ratio, in the block chain that the block is added to each node server, formed
Distributed account book, completes transaction.
In the embodiment of the present invention, feedback signal of each the described node server to the addition request is received, and protect
It is stored in the corresponding signal buffering area of the current transaction terminal.The buffer area signal has two types:Allow to add and refuse
Addition absolutely, if allowing the ratio of the feedback signal and whole feedback signals in signal caching of addition in the signal buffer area
When meeting preset ratio, the number of the corresponding node server of the digital asset transaction platform, usually multiple, this hair are searched
Illustrated in bright embodiment exemplified by 6, the block is separately sent to and the digital asset transaction platform corresponding 6
Individual node server, each described home electronics server verified to the block, it is necessary to verify the block head of the block,
Whether the information such as block body, timestamp and hash value mark meet the corresponding node server pair of the digital asset transaction platform
The requirement of block, when demanded, allows the signal of addition to the corresponding terminal feedback of the digital asset transaction platform, when
Receive it is described allow addition signal when meeting certain proportion, be required to meet 2/3 in the embodiment of the present invention, the block added
It is added in the block chain with each node server, is stored between each accounting nodes, forms distributed account book, complete institute
State the transaction of digital asset.
In the embodiment of the present invention, if allowing the feedback signal of addition complete in being cached with the signal in the signal buffer area
There is the following two kinds situation when meeting preset ratio in the ratio of portion's feedback signal:
After the feedback signal having each node server corresponding with the block is received, judging described more
Allow the ratio of the feedback signal and whole feedback signals in signal caching of addition in signal buffer area;
Node servers all in each node server corresponding with the block are withouted waiting for send instead
Feedback signal, on the premise of node server quantity corresponding with the block is known, it is only necessary to judge to allow the quantity of addition
With the ratio of the quantity of the node server.
In the embodiment of the present invention, preferably above-mentioned second method and default ratio are contrasted, and can improve digital money
Produce the speed of transaction.
During the present invention is implemented, the digital asset transaction record includes:Merchandise Hash, exchange hour, assets title, described
The seller terminal address of digital asset, the buyer terminal address of the digital asset, the address of the current transaction terminal and friendship
The quantity of easy assets.Attribute information for recording the transaction in process of exchange, is easy to the inquiry to the transaction.The transaction
Hash value is an ident value of difference and other transaction, with uniqueness, and the process of exchange of each assets all corresponds to one
Hash value, in queries asset transaction data, the transaction hash value provided according to input contrasts the hash values of historical trading, entered
The inquiry of row Transaction Details.
In the embodiment of the present invention, the process of exchange of the digital asset also includes:The intelligent contract of clearance clearing, whether foundation
Settle accounts calculation condition is met, assets, data, payment, expense, the profit of both parties described in the digital asset process of exchange is triggered
Profit is divided into and the clearance clearing such as account.
The establishment process of the digital asset in digital asset process of exchange described in the embodiment of the present invention is as follows:User
The information such as the title of digital asset, quantity, measurement unit, assets description and assets LOGO are input to digital asset transaction flat
Platform;Whether the digital asset transaction platform meets regulation to the digital asset is tested, and examines the digital asset
Whether the description data of the assets such as title, quantity, measurement unit, assets description and assets LOGO is complete, the digital asset
Whether establishment process meets the requirement of the digital asset transaction platform;When the establishment process of the digital asset meets regulation
When, digital asset record is firstly generated, then the digital asset, which is packed, writes presently described digital asset transaction platform
It is described after the block of the packing write-in digital asset transaction platform, in addition it is also necessary to which the block is identified in block
A hash value is designated, with uniqueness, for the differentiation to each block in the digital asset transaction platform.It is described
The method that block adds node server corresponding with the block is identical with the process of exchange of digital asset, no longer goes to live in the household of one's in-laws on getting married herein
State.
The invention provides a kind of digital asset method of commerce, including:When both parties, which just merchandise, to reach common understanding, it can send out
Transaction request is sent, when receiving the transaction request, according to default proof rule, pair friendship corresponding with the transaction request
Easy packet is verified in both parties;When receiving the signal being proved to be successful, treating in the transaction data package is judged
Whether transaction data meets trading rules;If meeting, the transaction data package is write in the block where current transaction terminal,
The addition request of the block is sent to each node server corresponding with the block;Receive each described node
Server is saved in the signal buffer area where the current transaction terminal, if described to the feedback signal of the addition request
The ratio of the feedback signal and whole feedback signals in signal caching of addition is allowed to meet preset ratio in signal buffer area
When, in the block chain that the block is added to each node server, distributed account book is formed, transaction is completed.On
The method stated, forms distributed account book according to block chain technology, though some node server receive attack be tampered or
Break down, because to data, by the way of distributed storage, the data also will not be tampered or lose, and improve number
According to the security of storage.
In the embodiment of the present invention, when receiving the transaction request of both parties, according to default proof rule, pair and institute
Method flow diagram that the corresponding transaction data package of transaction request verified in both parties is stated as shown in Fig. 2 including step:
S201, the transaction data package is sent to seller terminal be encrypted;
In the embodiment of the present invention, the transaction data package is sent to the seller terminal processor, is encrypted.
S202, the digital signature for obtaining the transaction data package;
In the embodiment of the present invention, the transmitting terminal of the seller terminal signal is scanned in real time, it is whole when receiving the seller
During the signal that the encryption that end is sent is completed, the digital signature of the transaction data package is obtained.
S203, the transaction data package and the digital signature are sent to buyer terminal verified;
In the embodiment of the present invention, the digital signature received and the transaction data package are sent to buyer terminal and entered
Row checking, verifies whether be stored with buyer terminal transaction data to be transacted and the transaction of the transaction data package
The correctness of data.The transmitting terminal of buyer terminal signal described in real time scan, receives the buyer terminal to the transaction data
The result of bag.
In the embodiment of the present invention, the transaction data package is sent to the method flow diagram that seller terminal is encrypted
As shown in figure 3, including step:
S301, foundation hash function calculate the first summary of the transaction data package;
In the embodiment of the present invention, the hash function is the important component of modern password system, and hash function has
Irreversible guarantee data validity, prevents reverse-engineering, and the characteristics of preventing from denying is widely used in field of digital signature.Utilize
The hash function generates the first summary from the transaction data package.
S302, using the seller terminal private key to described first summary be encrypted, formed digital signature.
In the embodiment of the present invention, the described first summary is encrypted using the private key of the seller terminal, digital signature,
The digital signature is sent to the transmitting terminal of the seller terminal.
In the embodiment of the present invention, the transaction data package and the digital signature are sent to what buyer terminal was verified
Method flow diagram is as shown in figure 4, including step:
S401, the first summary for calculating according to the hash function transaction data package;
In the embodiment of the present invention, foundation calculates the first of the transaction data package with the S301 identicals operating method
Summary.
S402, using the public key of the seller terminal digital signature is decrypted, obtains the second summary;
In the embodiment of the present invention, the public key of the seller terminal is obtained, the public key according to the seller terminal is to the number
Word signature is decrypted, and obtains the second summary.
S403, when described first summary with described second summary be identical when, transmission be proved to be successful signal.
In the embodiment of the present invention, when the described first summary is identical with the described second summary, transmission is proved to be successful signal.
When both are identical, illustrate that the demand to transaction data and the buyer terminal in the transaction data package is coincide, Ke Yiji
It is continuous to be traded.When differing, illustrate that the transaction data package transmission is wrong, be not inconsistent with the demand of the buyer terminal, directly
Termination is connect this time to merchandise.The result of the checking is sent to the transmitting terminal of the seller terminal.
In the embodiment of the present invention, when receiving the signal being proved to be successful, judge to be transacted in the transaction data package
Whether data meet the method flow diagram of trading rules as shown in figure 5, including step:
S501, lookup and the corresponding trading rules of the transaction;
In the embodiment of the present invention, when receiving the signal being proved to be successful, in the corresponding transaction of the current transaction terminal
Merchandised then corresponding with the transaction is searched on platform.It is illustrated, is first looked for and the product with accumulated point exchanging
Point exchange corresponding accumulated point exchanging rule, the trading rules of even described accumulated point exchanging be able to may also exist it is multiple, it is necessary to according to
Specific trading rules are selected according to specific transaction data.
S502 obtains the data to be transacted in the transaction data package, according to the trading rules, judges described to be transacted
Whether data meet the trading rules.
In the embodiment of the present invention, the data to be transacted of the transaction data package are obtained, the data to be transacted include institute
State seller terminal and the seller terminal is applied to the digital asset of this transaction, according to the trading rules obtained, judge
Whether digital asset and the buyer asset of the seller applied to this transaction is met in the trading rules
Transaction-based requirements.
Corresponding with the above method, present invention also offers a kind of transaction system of digital asset, the knot of the system
Structure block diagram as shown in fig. 6, including:
Authentication module 601, judge module 602, sending module 603 and add module 604.
Wherein,
The authentication module 601, for when receiving the transaction request of both parties, according to default proof rule,
Pair transaction data package corresponding with the transaction request is verified in both parties;
The judge module 602, for when receiving the signal being proved to be successful, judging treating in the transaction data package
Whether transaction data meets trading rules;
The sending module 603, if for meeting, the block transaction data package write where current transaction terminal
In, the addition request of the block is sent to each node server corresponding with the block;
The add module 604, for receiving feedback signal of each the described node server to the addition request,
The feedback signal is saved in signal buffer area, if allowing the feedback signal and the signal of addition in the signal buffer area
When the ratio of whole feedback signals meets preset ratio in caching, the block is added to each node server
In block chain, distributed account book is formed, transaction is completed.
The invention provides a kind of digital asset transaction system, including:When both parties, which just merchandise, to reach common understanding, it can send out
Transaction request is sent, when receiving the transaction request, according to default proof rule, pair friendship corresponding with the transaction request
Easy packet is verified in both parties;When receiving the signal being proved to be successful, treating in the transaction data package is judged
Whether transaction data meets trading rules;If meeting, the transaction data package is write in the block where current transaction terminal,
The addition request of the block is sent to each node server corresponding with the block;Receive each described node
Server is saved in the signal buffer area where the current transaction terminal, if described to the feedback signal of the addition request
The ratio of the feedback signal and whole feedback signals in signal caching of addition is allowed to meet preset ratio in signal buffer area
When, in the block chain that the block is added to each node server, distributed account book is formed, transaction is completed.On
The method stated, forms distributed account book according to block chain technology, though some node server receive attack be tampered or
Break down, because to data, by the way of distributed storage, the data also will not be tampered or lose, and improve number
According to the security of storage.
In the embodiment of the present invention, the structured flowchart of the authentication module 601 as shown in fig. 7, comprises:
Ciphering unit 605, acquiring unit 606 and authentication unit 607
Wherein,
The ciphering unit 605, is encrypted for the transaction data package to be sent into seller terminal;
The acquiring unit 606, the digital signature for obtaining the transaction data package;
The authentication unit 607, is carried out for the transaction data package and the digital signature to be sent into buyer terminal
Checking;
In the embodiment of the present invention, the structured flowchart of the ciphering unit 605 as shown in fig. 7, comprises:
First computation subunit 608 and encryption sub-unit operable 609.
Wherein,
First computation subunit 608, the first summary for calculating the transaction data package according to hash function;
The encryption sub-unit operable 609, the described first summary is encrypted for the private key using the seller terminal, shape
Into digital signature.
In the embodiment of the present invention, the structured flowchart of the authentication unit 607 as shown in fig. 7, comprises:
Second computation subunit 610, decryption subelement 611 and transmission sub-unit 612.
Wherein,
Second computation subunit 610, for calculating the first of the transaction data package according to the hash function
Summary;
The decryption subelement 611, is decrypted to the digital signature for the public key using the seller terminal, obtains
To the second summary;
The transmission sub-unit 612, for when the described first summary is identical with the described second summary, transmission to be verified into
Function signal.
In the embodiment of the present invention, the structured flowchart of the judge module 602 as shown in fig. 7, comprises:
Searching unit 613 and judging unit 614.
Wherein,
The searching unit 613, for searching and the corresponding trading rules of the transaction;
The judging unit 614, for obtaining the data to be transacted in the transaction data package, according to the transaction rule
Then, judge whether the data to be transacted meet the trading rules.
It should be noted that each embodiment in this specification is described by the way of progressive, each embodiment weight
Point explanation be all between difference with other embodiment, each embodiment identical similar part mutually referring to.
For device class embodiment, because it is substantially similar to embodiment of the method, so description is fairly simple, related part is joined
See the part explanation of embodiment of the method.
Finally, in addition it is also necessary to explanation, in this application, such as first and second or the like relational terms are used merely to
One entity or operation are made a distinction with another entity or operation, and not necessarily require or imply these entities or behaviour
There is any this actual relation or order between work.Moreover, term " comprising ", "comprising" or its any other variant
Including for nonexcludability is intended to, so that process, method, article or equipment including a series of key elements not only include
Those key elements, but also other key elements including being not expressly set out, or also include for this process, method, article or
The intrinsic key element of person's equipment.In the absence of more restrictions, the key element limited by sentence "including a ...", not
Also there is other identical element in the process including the key element, method, article or equipment in exclusion.
The foregoing description of the disclosed embodiments, enables those skilled in the art to realize or using the present invention.To this
A variety of modifications of a little embodiments will be apparent for a person skilled in the art, and generic principles defined herein can
Without departing from the spirit or scope of the present invention, to realize in other embodiments.Therefore, the present invention will not be limited
It is formed on the embodiments shown herein, and is to fit to consistent with features of novelty with principles disclosed herein most wide
Scope.
Described above is only the preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art
For member, under the premise without departing from the principles of the invention, some improvements and modifications can also be made, these improvements and modifications also should
It is considered as protection scope of the present invention.