CN110232634A - Block chain common recognition method, block chain common recognition system and computer readable storage medium - Google Patents
Block chain common recognition method, block chain common recognition system and computer readable storage medium Download PDFInfo
- Publication number
- CN110232634A CN110232634A CN201910488474.8A CN201910488474A CN110232634A CN 110232634 A CN110232634 A CN 110232634A CN 201910488474 A CN201910488474 A CN 201910488474A CN 110232634 A CN110232634 A CN 110232634A
- Authority
- CN
- China
- Prior art keywords
- block chain
- node
- block
- common recognition
- transaction
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 55
- 238000012795 verification Methods 0.000 claims abstract description 18
- 238000001914 filtration Methods 0.000 claims description 9
- 230000000977 initiatory effect Effects 0.000 claims description 4
- 238000012549 training Methods 0.000 claims description 4
- 238000012856 packing Methods 0.000 abstract description 16
- 238000004364 calculation method Methods 0.000 abstract description 9
- 238000005265 energy consumption Methods 0.000 abstract description 7
- 238000012423 maintenance Methods 0.000 abstract description 5
- 238000005457 optimization Methods 0.000 abstract description 5
- 238000010586 diagram Methods 0.000 description 7
- 230000008901 benefit Effects 0.000 description 5
- RTZKZFJDLAIYFH-UHFFFAOYSA-N ether Substances CCOCC RTZKZFJDLAIYFH-UHFFFAOYSA-N 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 4
- 239000000463 material Substances 0.000 description 4
- 238000012546 transfer Methods 0.000 description 4
- 230000009977 dual effect Effects 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 239000003999 initiator Substances 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 241000208340 Araliaceae Species 0.000 description 1
- 201000004569 Blindness Diseases 0.000 description 1
- 235000005035 Panax pseudoginseng ssp. pseudoginseng Nutrition 0.000 description 1
- 235000003140 Panax quinquefolius Nutrition 0.000 description 1
- 230000001154 acute effect Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 230000005284 excitation Effects 0.000 description 1
- 235000008434 ginseng Nutrition 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000012797 qualification Methods 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 230000003252 repetitive effect Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q40/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/04—Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/12—Applying verification of the received information
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Computer Security & Cryptography (AREA)
- Finance (AREA)
- Accounting & Taxation (AREA)
- Development Economics (AREA)
- Marketing (AREA)
- Computer Networks & Wireless Communication (AREA)
- General Engineering & Computer Science (AREA)
- Computing Systems (AREA)
- Computer Hardware Design (AREA)
- Economics (AREA)
- Signal Processing (AREA)
- Strategic Management (AREA)
- Technology Law (AREA)
- Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
This application discloses block chain common recognition method, block chain common recognition system and computer readable storage mediums.Block chain includes multiple nodes, and block chain common recognition method includes: that each node obtains whole nodes about the score information currently traded;Each node determines book keeping operation person and verifier according to score information from whole nodes;Current transaction is packaged as block and block is sent to verifier by book keeping operation person;Verifier verifies to be verified result block after receiving block;Verifier handles block according to verification result.So, book keeping operation person and verifier are determined by score information, and the block of book keeping operation person's packing is verified using verifier, guarantee the same account book of node maintenance in block chain to ensure to trade integrality, correctness while, a large amount of calculation power of competition book keeping operation power consumption between node can be saved, handling capacity, optimization performance is improved and reduce energy consumption.
Description
Technical field
This application involves block chain technical fields, and in particular to a kind of block chain common recognition method, block chain common recognition system and
Computer readable storage medium.
Background technique
The relevant technologies use proof of work (Proof of Work, POW) common recognition algorithm generally to compete book keeping operation power.POW
The core concept of common recognition algorithm is that each node competes book keeping operation power by proving the calculation power of oneself.POW common recognition algorithm can be protected
The consistency of card account book can guarantee the correctness of the account book of account book in the case where the calculation power of malicious node is less than 50%, prevent
Only the problems such as dual payment.However, in practical applications, POW common recognition algorithm, which can generate to calculate power and compete, leads to centralization mine pond
The problems such as generation, energy consumption, low handling capacity.
Summary of the invention
This application provides a kind of block chain common recognition method, block chain common recognition system and computer readable storage mediums.
The application embodiment provides a kind of block chain common recognition method.The block chain includes multiple nodes, the block
Chain common recognition method include:
Each node obtains whole nodes about the score information currently traded;
Each node determines book keeping operation person and verifier from all nodes according to institute's scoring information;
The current transaction is packaged as block and the block is sent to the verifier by the book keeping operation person;
The verifier verifies to be verified result the block after receiving the block;
The verifier handles the block according to the verification result.
The application embodiment provides a kind of block chain common recognition system.The block chain includes multiple nodes, the block
Chain common recognition system includes processor and the memory that is connected to the processor, and the memory is stored with block chain common recognition journey
Sequence, the block chain common recognition program realize above-mentioned block chain common recognition method when being executed by the processor.
The application embodiment provides a kind of computer readable storage medium.It is stored on the computer readable storage medium
There is block chain common recognition program, the block chain common recognition program realizes above-mentioned block chain common recognition method when being executed by processor.
Block chain common recognition method, block chain common recognition system and the computer readable storage medium of the application embodiment, lead to
Score information is crossed to determine book keeping operation person and verifier, and verifies the block of book keeping operation person's packing using verifier, is guaranteeing block
The same account book of node maintenance in chain with ensure to trade integrality, correctness while, can save and compete book keeping operation between node
A large amount of calculation power of consumption are weighed, handling capacity, optimization performance are improved and reduce energy consumption.
The additional aspect and advantage of presently filed embodiment will be set forth in part in the description, partially will be from following
Description in become obvious, or recognized by the practice of presently filed embodiment.
Detailed description of the invention
The above-mentioned and/or additional aspect and advantage of the application is from combining in description of the following accompanying drawings to embodiment by change
It obtains obviously and is readily appreciated that, in which:
Fig. 1 is the flow diagram of the block chain common recognition method of the application embodiment;
Fig. 2 is the flow diagram of the block chain common recognition method of another embodiment of the application;
Fig. 3 is the flow diagram of the block chain common recognition method of the another embodiment of the application;
Fig. 4 is the flow diagram of the block chain common recognition method of the application a further embodiment;
Fig. 5 is the flow diagram of the block chain common recognition method of another embodiment of the application;
Fig. 6 is the flow diagram of the block chain common recognition method of the another embodiment of the application;
Fig. 7 is the flow diagram of the block chain common recognition method of the application a further embodiment.
Main element symbol description:
Block chain common recognition system 100, processor 101, memory 102.
Specific embodiment
Presently filed embodiment is described below in detail, the example of the embodiment is shown in the accompanying drawings, wherein from beginning
Same or similar element or element with the same or similar functions are indicated to same or similar label eventually.Below by ginseng
The embodiment for examining attached drawing description is exemplary, and is only used for explaining the application, and should not be understood as the limitation to the application.
In the description of the present application, term " first ", " second " are used for description purposes only, and should not be understood as instruction or dark
Show relative importance or implicitly indicates the quantity of indicated technical characteristic.The feature of " first ", " second " is defined as a result,
It can explicitly or implicitly include one or more feature.In the description of the present application, the meaning of " plurality " is
Two or more, unless otherwise specifically defined.
In the description of the present application, it should be noted that unless otherwise clearly defined and limited, term " installation ", " phase
Even ", " connection " shall be understood in a broad sense, for example, it may be being fixedly connected, may be a detachable connection, or be integrally connected;It can
To be mechanical connection, it is also possible to be electrically connected or can be in communication with each other;It can be directly connected, it can also be by between intermediary
It connects connected, can be the connection inside two elements or the interaction relationship of two elements.For the ordinary skill of this field
For personnel, the concrete meaning of above-mentioned term in this application can be understood as the case may be.
Following disclosure provides many different embodiments or example is used to realize the different structure of the application.In order to
Simplify disclosure herein, hereinafter the component of specific examples and setting are described.Certainly, they are merely examples, and
And purpose does not lie in limitation the application.In addition, the application can in different examples repeat reference numerals and/or reference letter,
This repetition is for purposes of simplicity and clarity, itself not indicate between discussed various embodiments and/or setting
Relationship.In addition, this application provides various specific techniques and material example, but those of ordinary skill in the art can be with
Recognize the application of other techniques and/or the use of other materials.
Referring to Fig. 1, the application embodiment provides a kind of block chain common recognition method.Block chain includes multiple nodes, area
Block chain common recognition method include:
Step S12: each node obtains whole nodes about the score information currently traded;
Step S14: each node determines book keeping operation person and verifier according to score information from whole nodes;
Step S16: current transaction is packaged as block and block is sent to verifier by book keeping operation person;
Step S18: verifier verifies to be verified result block after receiving block;
Step S19: verifier handles block according to verification result.
The block chain common recognition method of the application embodiment, book keeping operation person and verifier, and benefit are determined by score information
The block that book keeping operation person's packing is verified with verifier is guaranteeing that the same account book of node maintenance in block chain is complete with ensure to trade
While whole property, correctness, a large amount of calculation power, raising handling capacity, the optimization performance of competition book keeping operation power consumption between node can be saved
With reduction energy consumption.
In application present embodiment, block chain is alliance's chain.It is appreciated that in other implementations, block chain
It can be publicly-owned chain, privately owned chain or other kinds of block chain.The concrete form of block chain is not defined herein.
Specifically, it since the concept that therefrom this acute hearing (Nakamoto) proposes bit coin, has been recorded and has been handed over " block " and " chain "
Easy mode just enters the visual field of people.The essence of block chain is to pass through point-to-point transaction record in a network specifically
Algorithm generates one " block ", then by cryptological technique, these " blocks " are chained up, so that the block ring that front and back generates
Ring is engaged, therefore is referred to as block chain by image.But there is no the definition for clearly proposing block chain, bit coin to exist by Nakamoto
It is at that time also a kind of point-to-point electronic cash system.2013, Vita benefit Ke Butelin (Vitalik Buterin) was mentioned
A kind of next-generation encryption currency and decentralization application platform --- ether mill (Ethereum) out, announce to be based on block chain skill
The intelligent contract epoch of art arrive.The concept of " block chain " starts more and more to be referred to, application is also more and more extensive.
In block chain technology, the problem of most critical is how to guarantee that the block chain of thousands of node storage is identical
, i.e., all nodes all maintain a common account book, keep identical attitude to same transaction.Solve the algorithm of this problem
Just it is called common recognition algorithm.At present in bit coin and ether mill network, use proof of work (Proof of Work, POW)
Common recognition algorithm, core concept are that each node competes book keeping operation power by proving the calculation power of oneself.Specifically it is divided into following
Several steps: (1) system leads to the problem of one and is difficult to calculate but be easily verified that its correctness, that is, finds a character string, make
The prefix of its cryptographic Hash has the 0 of designated length;(2) node of competition book keeping operation power is participated in Merkle root Hash and other correlations
Field is assembled into block head, by non-repetitive random number (the Number used of 80 bytes of block head being only used once
Once, nonce) input of the field as proof of work;(3) ceaselessly convert the numerical value of nonce, and to each change after
Block head do dual SHA256 operation, end value and current network target value are compared, if it is less than target value, then worked
Amount proves to complete.
POW common recognition algorithm can guarantee that the consistency of account book can in the case where the calculation power of malicious node is less than 50%
Guarantee the correctness of the account book of account book, the problems such as preventing dual payment.However, in practical applications, POW knows together algorithm with such as
Lower defect: (1) calculating power competition leads to the generation in centralization mine pond.Although POW is the decentralization in order to guarantee block catenary system,
But bit coin system, which is run to, have now been formed the pond centralization degree very high five great Kuang, monopolize 90% or more calculation
Power, this has violated the principle of block chain technology;(2) energy consumption caused by power competes is calculated.Since competition book keeping operation power needs to carry out
A large amount of Hash operation, these calculate without generating any scientific value, consume a large amount of electric power resource instead, cause tight
The waste of weight;(3) handling capacity is low.Since POW common recognition algorithm competes book keeping operation power firstly the need of a difficult math question is solved, this is led
Cause system can not handle a large amount of transaction business, and handling capacity is very low.In bit coin system, the friendship per second that about 7 can only be carried out
Easily, ether mill is 10-20 per second.
Based on this, the block chain of the application embodiment is known together method, by score information, rather than proof of work, come
It determines book keeping operation person and verifier, and verifies the block of book keeping operation person's packing using verifier, guaranteeing the node dimension in block chain
Protect same account book with ensure to trade integrality, correctness while, a large amount of of competition book keeping operation power consumption between node can be saved
Power is calculated, handling capacity, optimization performance are improved and reduces energy consumption.
The block chain common recognition method of the application embodiment can be carried out according to certain time interval.For example, every default
Duration trades to a batch and is packaged book keeping operation, this batch of transaction is current transaction.During the book keeping operation of every wheel, the quantity currently traded
It can be one, can also be multiple.In other words, every wheel book keeping operation may include repeatedly trading.
During the book keeping operation of every wheel, each node can score other nodes in a current transaction, can also be another
It is scored in one transaction by other nodes.In step S12, whole nodes that each node obtains are about the scoring letter currently traded
It ceases, refers to during the book keeping operation of every wheel, all score informations that whole nodes generate.
Every wheel book keeping operation can be divided into three phases: transactional stage, scoring stage and book keeping operation stage.
In transactional stage, the both sides' node traded every time can be divided into ISP (Provider) and scoring person
(Rater).Wherein, ISP is the initiator of this transaction, and scoring person is the recipient of this transaction.
In one example, node a requests primary transaction to node b, this transaction is transfer operation, then the hair traded
Rise side (that is to say node a) as ISP, the recipient of transaction (that is to say node b) as scoring person to node a into
Row evaluation.
In another example, node c requests primary transaction to node d, this transaction is a letter in intelligent contract
Number calls, then the initiator to trade (that is to say node c) as ISP, the recipient of transaction (that is to say node d)
Node c is evaluated as scoring person.
In the scoring stage, scoring person will be attached to this to the score information of ISP after completing this transaction
Transaction Information after, be broadcast to the whole network, remaining node stores the score information after receiving score information.In other words, every
It takes turns the transactional stage of book keeping operation and after the scoring stage, the transaction of completion enters the trading pit of block chain, had accumulated in trading pit
Several are traded wait be packaged, and each node naturally also just has received several other nodes to the scoring of oneself (if oneself is filled
If having served as ISP) and other nodes between mutual scoring.In addition, each node can also know himself pair
The scoring of other nodes.Therefore, each node is available to whole score informations, these score informations are all about epicycle
Currently trading in book keeping operation.
Specifically, this Transaction Information includes ISP ID, the content of request, the cryptographic Hash for providing data, clothes
Business supplier signature and timestamp.The score information of scoring person's broadcast includes scoring person ID, prestige scoring, timestamp, receives
The cryptographic Hash of data and scoring person's signature.This specific data structure of Transaction Information and score information is as shown in table 1 below:
Table 1
In the book keeping operation stage, each node according to the whole score informations got determined from whole nodes book keeping operation person with
Verifier.Current transaction is packaged as block and block is sent to verifier by book keeping operation person.Verifier is right after receiving block
Block is verified to be verified result;Verifier handles block according to verification result.
It is appreciated that the block chain in the block chain common recognition method of the application embodiment, each node is equality.
Specifically, since each node can get score information whole in epicycle book keeping operation, and, each node is believed according to scoring
It ceases and determines book keeping operation person, therefore, each node is owned by the qualification of the competition book keeping operation person of equality.
In addition, also block is added when current transaction to be packaged as block and block is sent to verifier by book keeping operation person
Public account book.Each node of block chain can be regarded as a computer, and block is added public account book and can be regarded as by book keeping operation person
Block is stored in hard disk by book keeping operation person.
Referring to Fig. 2, in some embodiments, block chain common recognition method includes:
Step S11: training whole node, so that each node, which has, treats scoring node according to the current transaction received
The ability to score, the current transaction received are initiated by partial node to be evaluated.
In this way, the ability for making whole nodes in block chain all have scoring.Specifically, supervised learning algorithm can be used
Whole nodes in block chain are trained.Further, can the data characteristics of node be extracted and is classified first, number
It include but is not limited to handling capacity, the round-trip delay etc. of node according to feature.Then K- nearest neighbor algorithm (k-Nearest is used
Neighbors, KNN) training node.
Each node treats scoring node according to the data characteristics of partial node to be evaluated and scores.In other words, data are special
Sign is that each node treats the project investigated when scoring node is scored.
The thinking of K- nearest neighbor algorithm is: if k of the sample in feature space it is most like (i.e. in feature space most
It is neighbouring) sample in it is most of belong to some classification, then the sample also belongs to this classification.In other words, K- can be used
Nearest neighbor algorithm is trained node, so that node can judge each data currently traded according to the current transaction received
Classification locating for feature scores to realize and treat scoring node.In this way, trained node can more accurately
It scores for partial node to be evaluated, book keeping operation person caused by scoring this avoid blindness lifts unfair.
In addition, step S11 when the block chain of the application embodiment knows together system starting can once, be not required to
The beginning of every wheel transaction is wanted all to carry out.
Referring to Fig. 3, in some embodiments, the trading pit of block chain includes multiple wait be packaged transaction, step S12
Include:
Step S122: each node is filtered wait be packaged transaction currently to be traded and score information.
In this way, realizing that each node obtains whole nodes about the score information currently traded.As previously mentioned, remembering in every wheel
The transactional stage of account and after the scoring stage, the transaction of completion enter the trading pit of block chain, have accumulated in trading pit several
Item waits being packaged transaction.These, which wait being packaged transaction, may be because that a variety of causes is not appropriate for being packaged, and therefore, treat packing transaction
It is filtered to obtain the current transaction of this packing, to ensure this safety being packaged.It is appreciated that being obtained by filtration
Current transaction, can be obtained the score information currently traded.
Specifically, transaction filter can be set on each node, and transaction filter is a kind of algorithm of filtering.It is being packaged
Before, each node can be screened using the current transaction that transaction filter is packaged this.The specific mistake of transaction filter
Filtering method is discussed in detail in next embodiment.
Optionally, block chain common recognition method includes: initialization transaction filter;With test initialization whether correctly to check
Whether transaction filter is correctly arranged.It is appreciated that initialization transaction filter need to only carry out once.
In addition, can also check node training to guarantee that node has scoring when whether test initialization is correct
Ability.
Referring to Fig. 4, in some embodiments, step S122 includes:
Step S1222: the identity state of the initiation node of transaction to be packaged is determined;
Step S1224: it is waited being packaged transaction according to identity state packet filter.
In this way, realizing that each node is filtered wait be packaged transaction currently to be traded and score information.Specifically, in step
In S1222, identity state includes: to belong to this block chain and be not belonging to this block chain.In step S1224, wait be packaged transaction
Initiation node identity state be not belonging to this block chain in the case where, not by this wait be packaged transaction be selected into current transaction.?
The identity state of the initiation node of transaction to be packaged is to wait being packaged transaction in the case where belonging to this block chain for this and be selected into current friendship
Easily.It scores it is appreciated that can prevent the malicious node outside block chain from sending transaction in this way, upsets the application embodiment party
The block chain common recognition method of formula.
Referring to Fig. 5, in some embodiments, step S122 includes:
Step S1226: the repeat mode of the scoring of transaction to be packaged is determined;
Step S1228: the scoring of transaction to be packaged is handled according to repeat mode.
In this way, realizing that each node is filtered wait be packaged transaction currently to be traded and score information.Specifically, in step
In S1226, repeat mode includes: repetition scoring and does not repeat to score.It repeats scoring and refers to that the scoring between two nodes is taken turns one
Occur in transaction multiple.It is primary that the scoring scored refer between two nodes appearance in a wheel transaction is not repeated.
It is appreciated that under normal circumstances, in a wheel transaction, the scoring between certain two node is answered in a wheel transaction
It is primary when only occurring.Therefore, in step S1228, in the case where repeat mode attaches most importance to and reexamines point, according to commenting for last time
The scoring for treating and being packaged and trading is divided to be updated.In step S1228, in the case where repeat mode attaches most importance to and reexamines point, then not
The scoring for being packaged and trading is treated to be updated.It can prevent from repeating to brush in this way dividing.
In one example, transaction to be packaged is node a to a node b transfer operation of request, and node b is as scoring person
Node a is evaluated.Have and scores three times, the repeat mode of the scoring of the transfer operation are as follows: repeat to score.Specifically, first
Secondary scoring is 8 points, and secondary scoring is 5 points, and the scoring of third time is 7 points.The scoring for transfer operation is then allocated as with 7.
It in one example, is function call of the node c into the primary intelligent contract of node d request, section wait be packaged transaction
Point d evaluates node c as scoring person.It only once scores: 8 points.The repeat mode of the scoring of the function call are as follows: non-
It repeats to score.8 points are not updated then.
It, can will treated that transaction to be packaged is selected into addition, being handled after the scoring for being packaged transaction according to repeat mode
Current transaction.
Referring to Fig. 6, in some embodiments, step S122 includes:
Step S1221: the numbers of states currently traded is determined;
Step S1223: it is filtered according to numbers of states wait be packaged transaction.
In this way, realizing that each node is filtered wait be packaged transaction currently to be traded and score information.Specifically, in step
In S1221, numbers of states includes: to reach preset threshold and not up to preset threshold.In step S1223, it is in numbers of states
In the case where reaching preset threshold, this is not waited being packaged transaction and be selected into current transaction.It is to be not up to preset threshold in numbers of states
In the case where, this is waited being packaged transaction and is selected into current transaction.
Further, preset threshold can input for user, the result that can also be calculated for other computation models.Preset threshold can
It is stored in block chain common recognition system.User can modify to preset threshold.Herein not to the specific source of preset threshold into
Row limits.
It is appreciated that as previously mentioned, the block chain common recognition method of the application embodiment can be according to certain time interval
It carries out.For example, trading every preset duration to a batch is packaged book keeping operation, this batch of transaction is current transaction.From trading pit to
When being packaged selection currently transaction in transaction, filtered by the numbers of states currently traded wait be packaged transaction, it is ensured that every
The quantity currently traded that preset duration is packaged is fixed, to guarantee the normalization of block.Remaining transaction in trading pit
It can stay in trading pit and wait the packing of next round.
In one example, preset threshold is 10, is filtering when being packaged transaction A, is having chosen 7 transaction as current
Transaction, the numbers of states currently traded are to be not up to preset threshold, then will be selected into current transaction wait be packaged transaction A.Then, it filters
Wait be packaged transaction B, 8 transaction have been had chosen at this time as current transaction, the numbers of states currently traded is not up to default threshold
Value then will be selected into current transaction wait be packaged transaction B.Then, it filters wait be packaged transaction C, has had chosen 9 transaction at this time and be used as and worked as
Preceding transaction, the numbers of states currently traded are to be not up to preset threshold, then can will be selected into current transaction wait be packaged transaction C.Then,
It filters wait be packaged transaction D, has had chosen 10 transaction at this time as current transaction, the numbers of states currently traded is to reach default
Threshold value then will not be selected into current transaction wait be packaged transaction D, the packing of next round is waited wait be packaged transaction D.
Note that can be in step S1222 and step S1224, step S1226 and step S1228, step S1221 and step
It selects one group of step to treat packing transaction in this three groups of steps of rapid S1223 to be filtered;It can be selected in above-mentioned three groups of steps
Two groups of steps are treated packing transaction and are filtered;Also can choose above-mentioned three groups of steps treat packing transaction be filtered.
When two groups of steps of selection are treated packing transaction and are filtered, two groups of steps can be executed in a certain order,
Two groups of steps can also be executed in a random order.It similarly, can when three groups of steps of selection are treated packing transaction and are filtered
To execute three groups of steps in a certain order, three groups of steps can also be executed in a random order.
Herein not to step S1222 and step S1224, step S1226 and step S1228, step S1221 and step
Physical relationship between S1223 is defined.
In the application embodiment, according to step S1222 and step S1224, step S1226 and step S1228, step
The sequence of S1221 and step S1223 are treated packing transaction and are filtered.Pseudocode hereafter can specifically be joined:
Input: a series of transaction, with T={ tiIndicate
Output: filtered transaction
Referring to Fig. 7, in some embodiments, step S14 includes:
Step S142: the prestige ranking of whole nodes is calculated according to score information;
Step S144: the node for determining that prestige ranking is first is book keeping operation person;
Step S146: the node for determining that prestige ranking is non-first is verifier.
In this way, realizing that each node determines book keeping operation person and verifier according to score information from whole nodes.Specifically, exist
In step S142, the credit value for removing each node can be calculated according to score information;And it is determined according to the credit value of each node complete
The prestige ranking of portion's node.
Further, the score information of each node can be added up, to obtain the overall score of each node, and will be total
Scoring is used as credit value.Certainly, the score information of each node can also be added up, to obtain the overall score of each node,
Overall score is obtained into average score divided by the quantity of the score information of the node again, and using average score as credit value.?
This is not defined the concrete mode of determining credit value.
In one example, node a is 2 to the scoring of node x, and node b is 4 to the scoring of node x, and node c is to node
The scoring of x is 6, and the general comment for acquiring node x is divided into 12, and is used as credit value for 12.
In another example, node a is 2 to the scoring of node x, and node b is 4 to the scoring of node x, and node c is to section
The scoring of point x is 6, and the average score for acquiring node x is 4, and is used as credit value for 4.
In step S144 and step S146, the node for determining that prestige ranking is first is book keeping operation person, determines prestige ranking
Node for non-first is verifier.In other words, in whole nodes of block chain, the node that prestige ranking is first is note
Account person, other nodes are verifier.
In one example, prestige ranking are as follows: node x, node a, node b.Then determine node x be book keeping operation person, node a and
Node b is verifier.
In some embodiments, step S18 includes:
Step S182: the current transaction in verifying block is to obtain the sub- result of the first verifying;
Step S184: whether the node for being first by prestige ranking is packaged to obtain the second verifying sub- result verifying block;
Step S186: verification result is determined according to the sub- result of the first verifying and the second sub- result of verifying;
Verification result includes the first result and second as a result, step S19 includes:
Step S192: in the case where verification result is the first result, verifier's memory block;
Step S194: in the case where verification result is the second result, verifier abandons block.
In this way, realizing that verifier verifies block after receiving block and handles block according to verification result.Tool
Body, in step S182, verifying the current transaction in block may include verifying the correctness for including transaction operation, signature just
Whether true property, signer belong to block chain member etc..In addition, since each node can calculate prestige ranking, in step
In rapid S184, each verifier can verify whether block is first by prestige ranking according to the prestige ranking that oneself is calculated
Node is packaged.
In the application embodiment, the first sub- result of verifying be pass through and the second sub- result of verifying be also by feelings
Under condition, determine that verification result is to pass through.It is appreciated that in other implementations, being also possible in the first sub- result of verifying
In the case where passing through at least one of second sub- result of verifying, determine that verification result is to pass through.Herein not to according to first
It verifies sub- result and the second sub- result of verifying determines that the concrete mode of verification result is defined.
In the application embodiment, the first result is " passing through ", and the second result is " not passing through ".Certainly, in others
In embodiment, the first result is " 1 ", indicates to pass through, and the second result is " 0 ", and expression does not pass through;Or, the first result is " 0 ",
Expression passes through, and the second result is " 1 ", and expression does not pass through;Or, the first result is "true", indicating to pass through, the second result is "false",
Expression does not pass through;Or, the first result is "false", indicate to pass through, the second result is "true", and expression does not pass through.Herein not to first
As a result the concrete form with the second result is defined.
It is appreciated that the memory block in the case where being verified, abandons block in the case where verifying unsanctioned situation, can protect
Demonstrate,prove the accuracy and safety of block.
In addition, the verifying of each node be it is independent, do not interfere with other nodes, do not influenced by other nodes yet.
In one example, node a is verified block, and block is stored the hard disk to node a by node a;Node b is to block
Verifying do not pass through, node b abandon block.The verifying of node a and node b do not influence each other.
In step S192, verifier's memory block can refer to the block public account book is added, and block chain, deposit is written
In the hard disk of the verifier.In this way, if each node in block chain all in accordance with rule process data, can be reached altogether
Know, maintains global, unification a, distributed account book.
The application embodiment provides a kind of block chain common recognition system 100.Block chain includes multiple nodes, block chain common recognition
System 100 includes processor 101 and the memory 102 connecting with processor 101, and memory 102 is stored with block chain common recognition journey
Sequence, block chain, which is known together, realizes the block chain common recognition method of any of the above-described embodiment when program is executed by processor 101.
The embodiment of the present application also proposes a kind of computer readable storage medium, is stored with area on computer readable storage medium
Block chain common recognition program, block chain know together and realize that the block chain of any of the above-described embodiment is known together when program is executed by processor 101
Method.
The block chain common recognition system and computer readable storage medium of the application embodiment, are determined by score information
Book keeping operation person and verifier, and the block of book keeping operation person's packing is verified using verifier, guaranteeing that the node maintenance in block chain is same
One account book with ensure to trade integrality, correctness while, can save a large amount of calculation power of competition book keeping operation power consumption between node,
It improves handling capacity, optimization performance and reduces energy consumption.
Each embodiment of the specific embodiment of the application computer readable storage medium and above-mentioned block chain common recognition method
Essentially identical, this will not be repeated here.
In summary, it the block chain common recognition method of the application embodiment, block chain common recognition system and computer-readable deposits
Storage media improves existing block chain common recognition method, and each node, which is no longer consumed, calculates power competition book keeping operation power, but adopts
With the algorithm of machine learning, it is that ISP scores by scoring person, is kept accounts by the top ranked node of prestige.
Block chain common recognition method, the reality of block chain common recognition system and computer readable storage medium of the application embodiment
Now include three main points: (1) safeguarding the consistent of global account book.To make the same public account book of whole node maintenances, it is necessary to
Determine the node for being responsible for book keeping operation.This method chooses in a wheel transaction the top ranked node of prestige as book keeping operation person, other
Node is verified as block of the verifier to packing.(2) driving node issues block.In the bit coin network of the relevant technologies
Common recognition algorithm in, use service charge (bit coin) as miner compete book keeping operation power excitation.In the area of the application embodiment
Block chain is known together in method, block chain common recognition system and computer readable storage medium, and being packaged block does not have service charge, but uses
Credit value is as reward.Credit value cannot be consumed or be traded, and the high node of credit value is meant to provide better service,
Being packaged block can be improved the credit value of publisher's totality.(3) guarantee the correctness of transaction and block.In alliance's chain, each
Participant is owned by the public key of other all nodes, and malicious node can not launch a offensive to alliance's chain by forged identity.
Block chain common recognition method, block chain common recognition system and the computer readable storage medium of the application embodiment have
Below the utility model has the advantages that between (1) node account book book keeping operation power in block chain can be competed in a manner of lightweight;It (2) can be efficient
Processing transaction, realize higher handling capacity;(3) by the scoring of node feeding back alternatively accounting nodes the considerations of factor, subtract
The centralization of few system;(4) node credit value can be judged with more perfect model;(5) can greatly reduce by
The common recognition bring wasting of resources of block chain.
In the description of this specification, reference term " certain embodiments ", " embodiment ", " some embodiment party
The description of formula ", " exemplary embodiment ", " example ", " specific example " or " some examples " etc. mean to combine embodiment or
Example particular features, structures, materials, or characteristics described are contained at least one embodiment or example of the application.?
In this specification, schematic expression of the above terms are not necessarily referring to identical embodiment or example.Moreover, description
Particular features, structures, materials, or characteristics can be in any one or more embodiments or example in an appropriate manner
In conjunction with.
Although presently filed embodiment has been shown and described above, it is to be understood that above embodiment is
Illustratively, it should not be understood as the limitation to the application, those skilled in the art within the scope of application can be right
Above embodiment is changed, modifies, replacement and variant, and scope of the present application is defined by the claims and their equivalents.
Claims (10)
- A kind of method 1. block chain is known together, which is characterized in that the block chain includes multiple nodes, the block chain common recognition method Include:Each node obtains whole nodes about the score information currently traded;Each node determines book keeping operation person and verifier from all nodes according to institute's scoring information;The current transaction is packaged as block and the block is sent to the verifier by the book keeping operation person;The verifier verifies to be verified result the block after receiving the block;The verifier handles the block according to the verification result.
- The method 2. block chain as described in claim 1 is known together, which is characterized in that the trading pit of the block chain include it is multiple to It is packaged transaction, each node obtains whole nodes about the score information currently traded, comprising:Each node filtering is described to trade wait be packaged to obtain the current transaction and institute's scoring information.
- The method 3. block chain as claimed in claim 2 is known together, which is characterized in that each node filtering is described to hand over wait be packaged Easily to obtain the current transaction and institute's scoring information, comprising:Determine the identity state of the initiation node of the transaction to be packaged;Wait be packaged transaction according to the identity state packet filter.
- The method 4. block chain as claimed in claim 2 is known together, which is characterized in that each node filtering is described to hand over wait be packaged Easily to obtain the current transaction and institute's scoring information, comprising:Determine the repeat mode of the scoring of the transaction to be packaged;The scoring of the transaction to be packaged is handled according to the repeat mode.
- The method 5. block chain as claimed in claim 2 is known together, which is characterized in that each node filtering is described to hand over wait be packaged Easily to obtain the current transaction and institute's scoring information, comprising:Determine the numbers of states currently traded;It is described wait be packaged transaction according to numbers of states filtering.
- The method 6. block chain as described in claim 1 is known together, which is characterized in that each node is according to institute's scoring information Book keeping operation person and verifier are determined from all nodes, comprising:The prestige ranking of all nodes is calculated according to institute's scoring information;The node for determining that the prestige ranking is first is the book keeping operation person;The node for determining that the prestige ranking is non-first is the verifier.
- The method 7. block chain as claimed in claim 6 is known together, which is characterized in that the verifier is after receiving the block The block is verified to be verified result, comprising:The current transaction in the block is verified to obtain the sub- result of the first verifying;Verifying the block, whether the node for being first by the prestige ranking is packaged to obtain the sub- result of the second verifying;The verification result is determined according to the sub- result of first verifying and the sub- result of second verifying;The verification result includes the first result and second as a result, the verifier handles the area according to the verification result Block, comprising:In the case where the verification result is first result, the verifier stores the block;In the case where the verification result is second result, the verifier abandons the block.
- The method 8. block chain as described in claim 1 is known together, which is characterized in that the block chain common recognition method includes:The whole nodes of training, so that each node, which has, treats scoring node according to the current transaction received The ability to score, the current transaction received are initiated by the partial node to be evaluated.
- The system 9. a kind of block chain is known together, which is characterized in that the block chain includes multiple nodes, the block chain common recognition system Including processor and the memory being connected to the processor, the memory is stored with block chain common recognition program, the block Chain common recognition program is realized when being executed by the processor such as block chain described in any item of the claim 1 to 8 common recognition method.
- 10. a kind of computer readable storage medium, which is characterized in that be stored with block chain on the computer readable storage medium Common recognition program, the block chain common recognition program realize such as block described in any item of the claim 1 to 8 when being executed by processor Chain common recognition method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910488474.8A CN110232634A (en) | 2019-06-05 | 2019-06-05 | Block chain common recognition method, block chain common recognition system and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910488474.8A CN110232634A (en) | 2019-06-05 | 2019-06-05 | Block chain common recognition method, block chain common recognition system and computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110232634A true CN110232634A (en) | 2019-09-13 |
Family
ID=67859332
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910488474.8A Pending CN110232634A (en) | 2019-06-05 | 2019-06-05 | Block chain common recognition method, block chain common recognition system and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110232634A (en) |
Cited By (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110674217A (en) * | 2019-09-23 | 2020-01-10 | 百度在线网络技术(北京)有限公司 | Block chain data processing method, device, equipment and medium |
CN111104460A (en) * | 2019-12-02 | 2020-05-05 | 远光软件股份有限公司 | Block chain consensus method, system, electronic equipment and storage medium |
CN111242718A (en) * | 2019-12-18 | 2020-06-05 | 深圳大学 | Block chain-based data transaction method, device, equipment and medium |
CN111242630A (en) * | 2019-12-19 | 2020-06-05 | 广州宏算信息科技有限公司 | Settlement method and device based on block chain and storage medium |
CN111292098A (en) * | 2020-01-15 | 2020-06-16 | 北京航空航天大学 | Trusted service supply chain-oriented block chain consensus mechanism construction method |
CN111314436A (en) * | 2020-01-20 | 2020-06-19 | 柏建华 | Hierarchical block chain system and implementation method |
CN111402079A (en) * | 2020-03-24 | 2020-07-10 | 中国南方电网有限责任公司 | Method and device for acquiring power block, computer equipment and storage medium |
CN111786772A (en) * | 2019-12-10 | 2020-10-16 | 深圳启元信息服务有限公司 | Non-deterministic selection method and system based on block chain determination and storage medium |
CN111866162A (en) * | 2020-07-28 | 2020-10-30 | 中国联合网络通信集团有限公司 | Service distribution method and device |
CN112632186A (en) * | 2020-12-23 | 2021-04-09 | 远光软件股份有限公司 | Block chain consensus method, computer equipment and block chain system |
WO2021233048A1 (en) * | 2020-05-21 | 2021-11-25 | 腾讯科技(深圳)有限公司 | Blockchain-based data detection method and device, and computer-readable storage medium |
CN113949742A (en) * | 2021-09-18 | 2022-01-18 | 深圳时空云科技有限公司 | Method and device for improving throughput of block chain |
CN113965326A (en) * | 2021-09-26 | 2022-01-21 | 北京岸思信息科技有限公司 | Lightweight block chain system for resisting parallel attack |
CN114140118A (en) * | 2021-12-01 | 2022-03-04 | 浪潮云信息技术股份公司 | Distributed accounting method and device and computer readable medium |
CN116361385A (en) * | 2022-09-01 | 2023-06-30 | 矩阵时光数字科技有限公司 | Block chain consensus method and system |
CN117035785A (en) * | 2023-08-09 | 2023-11-10 | 云海链控股股份有限公司 | Block chain consensus method, device, equipment and computer readable storage medium |
CN117610063A (en) * | 2023-09-21 | 2024-02-27 | 深圳市智策科技有限公司 | Dual-cycle election method based on block chain |
-
2019
- 2019-06-05 CN CN201910488474.8A patent/CN110232634A/en active Pending
Cited By (25)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110674217B (en) * | 2019-09-23 | 2022-07-22 | 百度在线网络技术(北京)有限公司 | Block chain data processing method, device, equipment and medium |
CN110674217A (en) * | 2019-09-23 | 2020-01-10 | 百度在线网络技术(北京)有限公司 | Block chain data processing method, device, equipment and medium |
CN111104460A (en) * | 2019-12-02 | 2020-05-05 | 远光软件股份有限公司 | Block chain consensus method, system, electronic equipment and storage medium |
CN111104460B (en) * | 2019-12-02 | 2023-09-19 | 远光软件股份有限公司 | Block chain consensus method, system, electronic equipment and storage medium |
CN111786772B (en) * | 2019-12-10 | 2024-05-07 | 北京铭泰恒通信息技术有限公司 | Non-deterministic selection method, system and storage medium based on determination of blockchain |
CN111786772A (en) * | 2019-12-10 | 2020-10-16 | 深圳启元信息服务有限公司 | Non-deterministic selection method and system based on block chain determination and storage medium |
CN111242718A (en) * | 2019-12-18 | 2020-06-05 | 深圳大学 | Block chain-based data transaction method, device, equipment and medium |
CN111242718B (en) * | 2019-12-18 | 2024-01-19 | 深圳大学 | Block chain-based data transaction method, device, equipment and medium |
CN111242630A (en) * | 2019-12-19 | 2020-06-05 | 广州宏算信息科技有限公司 | Settlement method and device based on block chain and storage medium |
CN111292098A (en) * | 2020-01-15 | 2020-06-16 | 北京航空航天大学 | Trusted service supply chain-oriented block chain consensus mechanism construction method |
CN111314436A (en) * | 2020-01-20 | 2020-06-19 | 柏建华 | Hierarchical block chain system and implementation method |
CN111402079A (en) * | 2020-03-24 | 2020-07-10 | 中国南方电网有限责任公司 | Method and device for acquiring power block, computer equipment and storage medium |
WO2021233048A1 (en) * | 2020-05-21 | 2021-11-25 | 腾讯科技(深圳)有限公司 | Blockchain-based data detection method and device, and computer-readable storage medium |
CN111866162A (en) * | 2020-07-28 | 2020-10-30 | 中国联合网络通信集团有限公司 | Service distribution method and device |
CN112632186A (en) * | 2020-12-23 | 2021-04-09 | 远光软件股份有限公司 | Block chain consensus method, computer equipment and block chain system |
CN113949742B (en) * | 2021-09-18 | 2023-11-10 | 深圳时空云科技有限公司 | Method and device for improving throughput of block chain |
CN113949742A (en) * | 2021-09-18 | 2022-01-18 | 深圳时空云科技有限公司 | Method and device for improving throughput of block chain |
WO2023045962A1 (en) * | 2021-09-26 | 2023-03-30 | 北京岸思信息科技有限公司 | Anti-parallel-attack lightweight blockchain system |
CN113965326A (en) * | 2021-09-26 | 2022-01-21 | 北京岸思信息科技有限公司 | Lightweight block chain system for resisting parallel attack |
CN114140118A (en) * | 2021-12-01 | 2022-03-04 | 浪潮云信息技术股份公司 | Distributed accounting method and device and computer readable medium |
CN116361385A (en) * | 2022-09-01 | 2023-06-30 | 矩阵时光数字科技有限公司 | Block chain consensus method and system |
CN116361385B (en) * | 2022-09-01 | 2024-07-23 | 矩阵时光数字科技有限公司 | Block chain consensus method and system |
CN117035785A (en) * | 2023-08-09 | 2023-11-10 | 云海链控股股份有限公司 | Block chain consensus method, device, equipment and computer readable storage medium |
CN117035785B (en) * | 2023-08-09 | 2024-05-14 | 云海链控股股份有限公司 | Block chain consensus method, device, equipment and computer readable storage medium |
CN117610063A (en) * | 2023-09-21 | 2024-02-27 | 深圳市智策科技有限公司 | Dual-cycle election method based on block chain |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110232634A (en) | Block chain common recognition method, block chain common recognition system and computer readable storage medium | |
CN109544334B (en) | Method for realizing network extensible block chain | |
CN108985732A (en) | The common recognition and account book data organization method and system of DAG technology based on no block | |
CN110868441B (en) | Block chain public link maintenance method and device, node and block chain public link | |
Maggi | The role of multilateral institutions in international trade cooperation | |
Bastiaan | Preventing the 51%-attack: a stochastic analysis of two phase proof of work in bitcoin | |
CN105488675B (en) | Block chain distributed shared general ledger construction method | |
CN108647965B (en) | Cross-chain transaction method and device, storage medium and electronic equipment | |
CN110009498A (en) | Resource allocation methods and device based on block chain | |
CN109921909A (en) | The block chain common recognition method and device proved based on contribution | |
CN108352009A (en) | Block chain generating means, block chain generation method, block chain verification device, block chain verification method and program | |
CN108292395A (en) | Block chain generating means, block chain generation method, block chain verification device, block chain verification method and program | |
CN110046480A (en) | Works copyright distribution method and device based on block chain | |
CN109493062A (en) | A kind of block chain common recognition method proved based on prestige equity | |
CN110351067A (en) | For the block chain common recognition mechanism of principal and subordinate's multichain | |
CN110011974A (en) | Bookkeeping methods, device, terminal and the computer readable storage medium of block chain | |
CN107977340A (en) | A kind of importance ranking method of block chain trade network node | |
CN109934662A (en) | Shared resource rent method, device and computer equipment based on block chain | |
CN109981690A (en) | A kind of anti-tamper timing data security transmission method based on block chain intelligence contract | |
Belotti et al. | Bitcoin pool-hopping detection | |
CN108596586A (en) | Block chain operation method and book keeping operation power node | |
Zhang et al. | Code will speak: Early detection of Ponzi smart contracts on Ethereum | |
Ramezan et al. | A strong adaptive, strategic double-spending attack on blockchains | |
CN109544157A (en) | Transaction processing method, device and system | |
CN109345311A (en) | The method and device that credit is mutually known between different financial institution |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190913 |
|
RJ01 | Rejection of invention patent application after publication |