Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is
A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art
Every other embodiment obtained without creative efforts, shall fall within the protection scope of the present invention.
Fig. 1 is a kind of structural schematic diagram of internet trading system of the embodiment of the present invention, as shown in Figure 1, the network trading
System includes: block chain major network 100, authentication service node 101 and certification node 102;
The block chain major network 100, for providing publicly-owned block chain network infrastructure service;
The authentication service node 101 is connected with the block chain major network 100, recognizes for providing for node 103 to be certified
Card service, to control bad node;
The certification node 102, after referring to the certification by the authentication service node 101, with the block chain major network
100 connected network nodes execute the transaction flow of the network trading for being packaged to received network trading, and
New block out, while the new block is uploaded to the block chain major network 100.
May include a few class nodes referring to FIG. 1, in the practical application of the embodiment of the present invention, as block chain major network 100,
Authentication service node 101, certification node 102, node 103 and non-authentication node 104 to be certified.Node 103 to be certified passes through
After the certification of authentication service node 101, certification node 102 is become, if unverified pass through, becomes non-authentication node 104.
Authentication service node 101 in the embodiment of the present invention, be decentralization vote by way of generate and block
A connected network node of chain major network.All applications execute the network node of network trading process, it is necessary to pass through authentication service
The calculation power of node 101 is audited, and the certification node for executing network trading process could be become;If unverified pass through, becomes non-and recognize
Demonstrate,prove node;The embodiment of the present invention is not intended to limit non-authentication node and is linked into block chain major network, only when executing transaction flow,
Non-authentication node and certification node different from.
Nodal information to be certified packing is uploaded to block by the node to be certified after passing through for certification, authentication service node
Thus chain major network, pre-authentication node become certification node, can carry out the subsequent operation such as block out.
After block chain major network updates, newly authenticating node, old certification node and non-authentication node (can be section to be certified
Point), it can all synchronize major network new data (new block).Here, the node of each synchrodata can all verify going out for major network new block
Whether block node is authentication service node or goes out block node by certification, and new block is then synchronized to node after being verified
Local data base.
Internet trading system provided in an embodiment of the present invention realizes the network of decentralization based on block chain major network
Transaction;Authentication service is provided for node to be certified by the authentication service node being connected with block chain major network, after certification passes through
Network node becomes certification node, can execute network trading process, and new block out, carries out to realize to bad node
Control, avoid using third party intermediary there are the problem of.
For dual payment, the block chain common recognition module of the embodiment of the present invention is added all transaction by way of pow
They are merged into the chain for the proof of work (proof-of-work) based on random hash that one constantly extends by timestamp
Item is as transaction record.This is also the technical characteristic place of block chain itself.
Based on the above embodiment, the authentication service node 101 provides authentication service for node to be certified, to bad
Node is controlled, and is specifically included:
The data packet that predetermined quantity is sent to node to be certified, is returned if receiving the node to be certified within a predetermined period of time
The calculated result returned, then verify the calculated result, obtains check results;
The machine performance of the node to be certified is obtained, the machine performance includes cpu performance, gpu performance, memory size
With one of hard-disk capacity or a variety of;
If the check results are to pass through, and the machine performance meets specified requirement, then certification passes through, by described wait recognize
The nodal information of card node is packed into the block chain major network, so that the node to be certified becomes certification node.
Authentication service node described in the embodiment of the present invention 101 calculate to node to be certified the certification of power audit, mainly
Including two aspects:
First, it calculates power certification: sending the data packet of predetermined quantity to node to be certified, node to be certified must be in pre- timing
Interior calculated result and the return calculated in data packet;If authentication service node receives described to be certified within a predetermined period of time
The calculated result that node returns, then verify the calculated result;Specifically, the predetermined quantity, the predetermined time,
It can set according to actual needs, the embodiment of the present invention is not construed as limiting this.
Further, node to be certified must calculate the result in data packet simultaneously by given algorithm in the given time
It returns.Optionally, which can be sort algorithm, for example, node to be certified must pass through sequence in the given time
Data in data packet are carried out ascending or descending order arrangement by algorithm, and return result to authentication service node.Optionally, it sorts
Algorithm can be quick sorting algorithm, be also possible to Bubble Sort Algorithm;Authentication service node only examines ranking results and data
It wraps from the time for being issued to ranking results return, to authenticate the calculated performance and network performance of node to be certified.
Second, performance certification: being authenticated according to the machine performance of node to be certified, and the machine performance includes cpu
One of energy, gpu performance, memory size and hard-disk capacity are a variety of, but not limited to this.Specifically, the specified requirement, it can
It is arranged according to actual needs, such as cpu performance requirement, gpu performance requirement etc. respectively reach what standard, the embodiment of the present invention pair
This is not construed as limiting.
Specifically, calculating power certification and performance certification step, there is no time sequencing relationship, processing can be set according to actual conditions
Sequentially.After the certification of above-mentioned both sides all passes through, node to be certified becomes certification node.
The node of networking is carried out calculating power audit, will be accorded with by the embodiment of the present invention in such a way that authentication service node is audited
The node of worthwhile force request is written block, is uploaded to block chain major network.The carrier of block chain major network information is block chain intelligence
Contract, since block chain possesses distributed data Sink Characteristics, once record, will the whole network it is synchronous, so node calculates power audit knot
Therefore fruit the whole network can also synchronize, result Data Consistency.
Based on any of the above-described embodiment, the certification node 102 is also used to:
After block chain major network update, progress data are synchronous, and that verifies current new block out goes out whether block node is to recognize
Demonstrate,prove service node or certification node;
If the block node out of the current new block out is authentication service node or certification node, by the current new block out
It is synchronized to local data base;Otherwise the current new block out is abandoned.
In the embodiment of the present invention, after block chain major network synchronously completes, various nodes all can be enterprising in the data synchronously completed
Row transaction can be packaged transaction, when New Transaction is broadcast to certification node when New Transaction is broadcast to non-authentication node
When, which is not packaged transaction.It authenticates node packing to complete after trading, be uploaded by new block out, while by new block
To block chain major network.Block chain major network is iterated update according to new block, and therefore all nodes carry out data synchronous.It is synchronous
When, all nodes can compare major network new block and local data base, if it find that new block goes out block person, it is not to recognize
Node is demonstrate,proved, then abandoning this block;Otherwise, data are synchronized to local.
In conclusion internet trading system provided in an embodiment of the present invention, based on block chain major network, center is gone in realization
The network trading of change;Authentication service is provided for node to be certified by the authentication service node being connected with block chain major network, is authenticated
Network node after becomes certification node, network trading process can be executed, and new block out, to realize to bad
Node is controlled, avoid using third party intermediary there are the problem of;All transaction are added into the time by way of pow
Stamp, solves the problems, such as dual payment.
Fig. 2 is a kind of network trading method authentication service nodal method flow diagram of the embodiment of the present invention.Based on above-mentioned
Any internet trading system, the embodiment of the present invention provide a kind of network trading method, and executing subject is authentication service node, packet
It includes:
200, obtain the node to be certified in network trading;The node to be certified includes all sections for accessing network for the first time
Point, or the unsanctioned node of certification (authenticating unsanctioned node can authenticate again).
201, the node to be certified is authenticated, to control bad node.Certification herein is finger counting power
Audit certification, otherwise it is bad node that the node for meeting calculation power auditing standards, which is qualified node,.
The embodiment of the present invention passes through the authentication service section being connected with block chain major network with internet trading system shown in FIG. 1
Point provides authentication service for node to be certified.Authentication service node obtains the network node of all accesses, and to the net accessed
Network node is authenticated, to judge whether it is qualified node or bad node;If certification passes through, for qualified node, if recognizing
Card does not pass through, then is bad node.Network node after certification passes through becomes certification node, can execute network trading process,
And new block out, bad node is controlled to realize, avoid using third party intermediary there are the problem of.
Based on the above embodiment, step 201, described that the node to be certified is authenticated, to be carried out to bad node
Control, specifically includes:
The data packet that predetermined quantity is sent to the node to be certified, if receiving the section to be certified within a predetermined period of time
The calculated result that point returns, then verify the calculated result, obtains check results;
The machine performance of the node to be certified is obtained, the machine performance includes cpu performance, gpu performance, memory size
With one of hard-disk capacity or a variety of;
If the check results are to pass through, and the machine performance meets specified requirement, then certification passes through, by described wait recognize
The nodal information of card node is packed into the block chain major network, so that the node to be certified becomes certification node.
In the embodiment of the present invention, calculate to node to be certified the certification of power audit, main includes two aspects:
First, it calculates power certification: sending the data packet of predetermined quantity to node to be certified, node to be certified must be in pre- timing
Interior calculated result and the return calculated in data packet;If authentication service node receives described to be certified within a predetermined period of time
The calculated result that node returns, then verify the calculated result;Specifically, the predetermined quantity, the predetermined time,
It can set according to actual needs, the embodiment of the present invention is not construed as limiting this.
Further, node to be certified must calculate the result in data packet simultaneously by given algorithm in the given time
It returns.Optionally, which can be sort algorithm, for example, node to be certified must pass through sequence in the given time
Data in data packet are carried out ascending or descending order arrangement by algorithm, and return result to authentication service node.Optionally, it sorts
Algorithm can be quick sorting algorithm, be also possible to Bubble Sort Algorithm;Authentication service node only examines ranking results and data
It wraps from the time for being issued to ranking results return, to authenticate the calculated performance and network performance of node to be certified.
Second, performance certification: being authenticated according to the machine performance of node to be certified, and the machine performance includes cpu
One of energy, gpu performance, memory size and hard-disk capacity are a variety of, but not limited to this.Specifically, the specified requirement, it can
It is arranged according to actual needs, such as cpu performance requirement, gpu performance requirement etc. respectively reach what standard, the embodiment of the present invention pair
This is not construed as limiting.
Specifically, calculating power certification and performance certification step, there is no time sequencing relationship, processing can be set according to actual conditions
Sequentially.After the certification of above-mentioned both sides all passes through, node to be certified becomes certification node.
The node of networking is carried out calculating power audit, will be accorded with by the embodiment of the present invention in such a way that authentication service node is audited
The node of worthwhile force request is written block, is uploaded to block chain major network.The carrier of block chain major network information is block chain intelligence
Contract, since block chain possesses distributed data Sink Characteristics, once record, will the whole network it is synchronous, so node calculates power audit knot
Therefore fruit the whole network can also synchronize, result Data Consistency.
Fig. 3 is that a kind of network trading method of the embodiment of the present invention authenticates nodal method flow diagram.Based on any of the above-described
Internet trading system, the embodiment of the present invention provide a kind of network trading method, and executing subject is certification node, comprising:
300, received network trading is packaged, the transaction flow of the network trading is executed;
301, after the completion of the transaction flow, new block out, while the new block is uploaded to block chain major network.
The embodiment of the present invention realizes the network trading of decentralization by block chain technology, does not need third party intermediary.It holds
The certification node of row network trading has passed through the certification of authentication service node, meets auditing standards in terms of calculating power.Authenticate node
After updating block chain major network, received network trading is packaged, the transaction flow of the network trading is executed, described
After the completion of transaction flow, new block out, while the new block is uploaded to block chain major network, solve prior art problem.
Based on the above embodiment, the network trading method further include:
After the update of block chain major network, progress data are synchronous, and that verifies current new block out goes out whether block node is certification clothes
Business node or certification node;
If the block node out of the current new block out is authentication service node or certification node, by the current new block out
It is synchronized to local data base;Otherwise the current new block out is abandoned.
As previously mentioned, newly authenticating node, old certification node and non-authentication node (can be after block chain major network updates
Node to be certified), it can all synchronize major network new data (new block).Here, it is new all to verify major network for the node of each synchrodata
Block goes out whether block node is authentication service node or passes through the block node out authenticated, then that new block is same after being verified
Walk the local data base of node.
After synchronously completing, various nodes can all trade in the data synchronously completed, when New Transaction is broadcast to certification
When node, transaction can be packaged, when New Transaction is broadcast to non-authentication node, which is not packaged transaction.
It authenticates node packing to complete after trading, is uploaded to block chain major network by new block out, while by new block.
Block chain major network is iterated update according to new block, and therefore all nodes carry out data synchronous.When synchronous, own
Node can compare major network new block and local data base, if it find that new block goes out block person, it is not certification node,
So abandon this block;Otherwise, data are synchronized to local data base.
Internet trading system provided in an embodiment of the present invention realizes the network of decentralization based on block chain major network
Transaction;Authentication service is provided for node to be certified by the authentication service node being connected with block chain major network, after certification passes through
Network node becomes certification node, can execute network trading process, and new block out, carries out to realize to bad node
Control, avoid using third party intermediary there are the problem of.
For dual payment, the block chain common recognition module of the embodiment of the present invention is added all transaction by way of pow
They are merged into the chain for the proof of work (proof-of-work) based on random hash that one constantly extends by timestamp
Item is as transaction record.This is also the technical characteristic place of block chain itself.
Fig. 4 is the entity structure schematic diagram of a kind of electronic equipment of the embodiment of the present invention, as shown in figure 4, the electronic equipment can
To include: processor (processor) 401,402, memory communication interface (Communications Interface)
(memory) 403 and communication bus 404, wherein processor 401, communication interface 402, memory 403 pass through communication bus 404
Complete mutual communication.Processor 401 can call the logical order in memory 403, to execute following method: obtaining net
Node to be certified in network transaction;The node to be certified is authenticated, to control bad node;Or it executes such as
Lower method: being packaged received network trading, executes the transaction flow of the network trading;It is completed in the transaction flow
Afterwards, new block out, while the new block is uploaded to block chain major network.
In addition, the logical order in above-mentioned memory 403 can be realized by way of SFU software functional unit and conduct
Independent product when selling or using, can store in a computer readable storage medium.Based on this understanding, originally
Substantially the part of the part that contributes to existing technology or the technical solution can be in other words for the technical solution of invention
The form of software product embodies, which is stored in a storage medium, including some instructions to
So that a computer equipment (can be personal computer, server or the network equipment etc.) executes each implementation of the present invention
The all or part of the steps of example the method.And storage medium above-mentioned include: USB flash disk, mobile hard disk, read-only memory (ROM,
Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. it is various
It can store the medium of program code.
The embodiment of the present invention discloses a kind of computer program product, and the computer program product is non-transient including being stored in
Computer program on computer readable storage medium, the computer program include program instruction, when described program instructs quilt
When computer executes, computer is able to carry out method provided by above-mentioned each method embodiment, for example, obtains network trading
In node to be certified;The node to be certified is authenticated, to control bad node;Or execute such as lower section
Method: being packaged received network trading, executes the transaction flow of the network trading;After the completion of the transaction flow,
New block out, while the new block is uploaded to block chain major network.
The embodiment of the present invention provides a kind of non-transient computer readable storage medium, the non-transient computer readable storage
Medium storing computer instruction, the computer instruction make the computer execute side provided by above-mentioned each method embodiment
Method, for example, obtain the node to be certified in network trading;The node to be certified is authenticated, to bad node
It is controlled;Or execute following method: received network trading being packaged, the transaction flow of the network trading is executed
Journey;After the completion of the transaction flow, new block out, while the new block is uploaded to block chain major network.
The apparatus embodiments described above are merely exemplary, wherein described, unit can as illustrated by the separation member
It is physically separated with being or may not be, component shown as a unit may or may not be physics list
Member, it can it is in one place, or may be distributed over multiple network units.It can be selected according to the actual needs
In some or all of the modules achieve the purpose of the solution of this embodiment.Those of ordinary skill in the art are not paying creativeness
Labour in the case where, it can understand and implement.
Through the above description of the embodiments, those skilled in the art can be understood that each embodiment can
It realizes by means of software and necessary general hardware platform, naturally it is also possible to pass through hardware.Based on this understanding, on
Stating technical solution, substantially the part that contributes to existing technology can be embodied in the form of software products in other words, should
Computer software product may be stored in a computer readable storage medium, such as ROM/RAM, magnetic disk, CD, including several fingers
It enables and using so that a computer equipment (can be personal computer, server or the network equipment etc.) executes each implementation
Method described in certain parts of example or embodiment.
Finally, it should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although
Present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: it still may be used
To modify the technical solutions described in the foregoing embodiments or equivalent replacement of some of the technical features;
And these are modified or replaceed, technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution spirit and
Range.