CN108989043A - Block processes method, apparatus and block chain node - Google Patents
Block processes method, apparatus and block chain node Download PDFInfo
- Publication number
- CN108989043A CN108989043A CN201810555792.7A CN201810555792A CN108989043A CN 108989043 A CN108989043 A CN 108989043A CN 201810555792 A CN201810555792 A CN 201810555792A CN 108989043 A CN108989043 A CN 108989043A
- Authority
- CN
- China
- Prior art keywords
- block
- cryptographic hash
- average value
- time
- time stamp
- 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
- H04L9/3297—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving time stamps, e.g. generation of time stamps
-
- 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
-
- 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/20—Network architectures or network communication protocols for network security for managing network security; network security policies in general
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
- H04L9/3236—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
- H04L9/3247—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
Abstract
The embodiment of the present invention provides a kind of block processes method, apparatus and block chain node.This method comprises: block chain node receives the second block receiving in the preset time after the first block, the identification information of first block is identical with the identification information of second block, first block includes stabbing at the first time, and second block includes the second timestamp;If the first time stamp is less than second timestamp, the block chain node determines that first block is effective;If second timestamp is stabbed less than the first time, the block chain node determines that second block is effective;Wherein, it when first time stamp is that time stamp server receives first block corresponding first cryptographic Hash, is determined according to the receiving time of first cryptographic Hash.The embodiment of the present invention guarantees that block chain does not have bifurcated, to effectively prevent honeysuckle attack, improves the safety of block chain network.
Description
Technical field
The present embodiments relate to field of communication technology more particularly to a kind of block processes method, apparatus and block chain links
Point.
Background technique
In block chain network, the book keeping operation of a certain Transaction Information is got temporary when digging mine node, which can will
The Transaction Information is recorded in block, and the block is broadcast in the block chain network.
If two different digging mine nodes have got the book keeping operation power of the same Transaction Information, then this two different digging mines
Node the same Transaction Information can be recorded in different blocks, and the different block is broadcast to the block link network
In network, the same bit coin is caused to come into force in transaction twice, i.e., so-called honeysuckle attack, so as to cause the block chain network
Safety reduce.
Summary of the invention
The embodiment of the present invention provides a kind of block processes method, apparatus and block chain node, to prevent honeysuckle from attacking, thus
Improve the safety of block chain network.
In a first aspect, the embodiment of the present invention provides a kind of block processes method, comprising:
Block chain node receives the second block receiving in the preset time after the first block, first block
Identification information is identical with the identification information of second block, and first block includes stabbing at the first time, second block
Including the second timestamp;
If the first time stamp is less than second timestamp, the block chain node determines that first block has
Effect;
If second timestamp is stabbed less than the first time, the block chain node determines that second block has
Effect;
Wherein, the first time stamp is that time stamp server receives corresponding first cryptographic Hash of first block
When, it is determined according to the receiving time of first cryptographic Hash;
When second timestamp is that the time stamp server receives second block corresponding second cryptographic Hash,
It is determined according to the receiving time of second cryptographic Hash.
Second aspect, the embodiment of the present invention provide a kind of block processes method, comprising:
Block chain node receives the second block receiving in the preset time after the first block, first block
Identification information is identical with the identification information of second block, and first block includes stabbing multiple first times, and described second
Block includes multiple second timestamps;
The block chain node calculates the first average value and the multiple second timestamp of the multiple first time stamp
The second average value;
If first average value is less than second average value, the block chain node determines that first block has
Effect;
If second average value is less than first average value, the block chain node determines that second block has
Effect;
Wherein, the multiple first time stamp is that each time stamp server in multiple time stamp servers receives institute
When stating corresponding first cryptographic Hash of the first block, determined according to the receiving time of first cryptographic Hash;
The multiple second timestamp is that each time stamp server in multiple time stamp servers receives described
When corresponding second cryptographic Hash of two blocks, determined according to the receiving time of second cryptographic Hash.
The third aspect, the embodiment of the present invention provide a kind of block processes device, comprising:
Receiving module, for receiving the second block in the preset time after the first block receiving, firstth area
The identification information of block is identical with the identification information of second block, and first block includes stabbing at the first time, and described second
Block includes the second timestamp;
Determining module, for determining that first block has when the first time, stamp was less than second timestamp
Effect;When second timestamp, which is less than the first time, to be stabbed, determine that second block is effective;
Wherein, the first time stamp is that time stamp server receives corresponding first cryptographic Hash of first block
When, it is determined according to the receiving time of first cryptographic Hash;
When second timestamp is that the time stamp server receives second block corresponding second cryptographic Hash,
It is determined according to the receiving time of second cryptographic Hash.
Fourth aspect, the embodiment of the present invention provide a kind of block processes device, comprising:
Receiving module, for receiving the second block in the preset time after the first block receiving, firstth area
The identification information of block is identical with the identification information of second block, and first block includes multiple first time stamps, described
Second block includes multiple second timestamps;
Computing module, for calculating the first average value and the multiple second timestamp of the multiple first time stamp
Second average value;
Determining module, for determining that first block has when first average value is less than second average value
Effect;When second average value is less than first average value, determine that second block is effective;
Wherein, the multiple first time stamp is that each time stamp server in multiple time stamp servers receives institute
When stating corresponding first cryptographic Hash of the first block, determined according to the receiving time of first cryptographic Hash;
The multiple second timestamp is that each time stamp server in multiple time stamp servers receives described
When corresponding second cryptographic Hash of two blocks, determined according to the receiving time of second cryptographic Hash.
5th aspect, the embodiment of the present invention provide a kind of block chain node, comprising:
Memory;
Processor;And
Computer program;
Wherein, the computer program stores in the memory, and is configured as being executed by the processor with reality
Method described in existing first aspect or second aspect.
6th aspect, the embodiment of the present invention provide a kind of computer readable storage medium, are stored thereon with computer program,
The computer program is executed by processor to realize method described in first aspect or second aspect.
Block processes method, apparatus provided in an embodiment of the present invention and block chain node, when block chain node is receiving
When receiving the second block in the preset time after the first block, if the identification information of first block and second block
Identification information is identical, which includes stabbing at the first time, which includes the second timestamp, then the block chain node
Effective block is determined according to first time stamp and the second timestamp, guarantees that block chain does not have bifurcated, to effectively prevent
Honeysuckle attack, improves the safety of block chain network.
Detailed description of the invention
Fig. 1 is a kind of schematic diagram of application scenarios provided in an embodiment of the present invention;
Fig. 2 is block processes method flow diagram provided in an embodiment of the present invention;
Fig. 3 is the schematic diagram of another application scenarios provided in an embodiment of the present invention;
Fig. 4 is the schematic diagram of another application scenarios provided in an embodiment of the present invention;
Fig. 5 be another embodiment of the present invention provides block processes method flow diagram;
Fig. 6 be another embodiment of the present invention provides block processes method flow diagram;
Fig. 7 be another embodiment of the present invention provides block processes method flow diagram;
Fig. 8 be another embodiment of the present invention provides block processes method flow diagram;
Fig. 9 is the structural schematic diagram of block processes device provided in an embodiment of the present invention;
Figure 10 be another embodiment of the present invention provides block processes device structural schematic diagram;
Figure 11 is the structural schematic diagram of block chain node provided in an embodiment of the present invention.
Through the above attached drawings, it has been shown that the specific embodiment of the disclosure will be hereinafter described in more detail.These attached drawings
It is not intended to limit the scope of this disclosure concept by any means with verbal description, but is by referring to specific embodiments
Those skilled in the art illustrate the concept of the disclosure.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to
When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment
Described in embodiment do not represent all implementations consistent with this disclosure.On the contrary, they be only with it is such as appended
The example of the consistent device and method of some aspects be described in detail in claims, the disclosure.
Block processes method provided by the invention, can be adapted for communication system shown in FIG. 1.As shown in Figure 1, the communication
System includes: access network equipment 11, terminal device 12 and server 13.It should be noted that communication system shown in FIG. 1 can
To be suitable for different network formats, for example, can be adapted for global system for mobile telecommunications (Global System of Mobi le
Communication, abbreviation GSM), CDMA (Code Division Multiple Access, abbreviation CDMA), broadband
CDMA (Wideband Code Division Multiple Access, abbreviation WCDMA), TD SDMA
(Time Division-Synchronous Code Division Multiple Access, abbreviation TD-SCDMA), it drills for a long time
Into network formats such as the 5G in (Long Term Evolution, abbreviation LTE) system and future.Optionally, above-mentioned communication system can
Think highly reliable low time delay communication (Ultra-Reliable and Low Latency in 5G communication system
Communications, abbreviation URLLC) transmission scene in system.
So optionally, above-mentioned access network equipment 11 can be base station (the Base Transceiver in GSM or CDMA
Station, abbreviation BTS) and/or base station controller, it is also possible to base station (NodeB, abbreviation NB) in WCDMA and/or wireless
Network controller (Radio Network Controller, abbreviation RNC), can also be the evolved base station in LTE
(Evolutional Node B, abbreviation eNB or eNodeB) perhaps base in relay station or access point or future 5G network
Stand (gNB) etc., and the present invention does not limit herein.
Above-mentioned terminal device 12 can be wireless terminal and be also possible to catv terminal.Wireless terminal can be directed to user and mention
For voice and/or the equipment of other business datum connectivity, there is the handheld device of wireless connecting function or be connected to wireless
Other processing equipments of modem.Wireless terminal can be through wireless access network (Radio Access Network, abbreviation
RAN it) is communicated with one or more equipments of the core network, wireless terminal can be mobile terminal, as mobile phone (or is
" honeycomb " phone) and computer with mobile terminal, for example, it may be portable, pocket, hand-held, built-in computer
Or vehicle-mounted mobile device, they exchange language and/or data with wireless access network.For another example wireless terminal can be with
It is personal communication service (Personal Communication Service, abbreviation PCS) phone, wireless phone, session setup
Agreement (Session Initiation Protocol, abbreviation SIP) phone, wireless local loop (Wireless Local
Loop, abbreviation WLL) it stands, the equipment such as personal digital assistant (Personal Digital Assistant, abbreviation PDA).It is wireless whole
End is referred to as system, subscriber unit (Subscriber Unit), subscriber station (Subscriber Station), movement station
(Mobile Station), mobile station (Mobile), distant station (Remote Station), remote terminal (Remote
Terminal), access terminal (Access Terminal), user terminal (User Terminal), user agent (User
Agent), user equipment (User Device or User Equipment), is not limited thereto.Optionally, above-mentioned terminal is set
Standby 12 can also be the equipment such as smartwatch, tablet computer.In the present embodiment, terminal device 12 and server 13 can be area
Node in block chain network.
Block processes method provided by the invention, it is intended to solve the technical problem as above of the prior art.
How to be solved with technical solution of the specifically embodiment to technical solution of the present invention and the application below above-mentioned
Technical problem is described in detail.These specific embodiments can be combined with each other below, for the same or similar concept
Or process may repeat no more in certain embodiments.Below in conjunction with attached drawing, the embodiment of the present invention is described.
Fig. 2 is block processes method flow diagram provided in an embodiment of the present invention.The embodiment of the present invention is for the prior art
Technical problem as above provides block processes method, and specific step is as follows for this method:
Step 201 digs mine node according to the block of generation, calculates the corresponding cryptographic Hash of the block.
As shown in figure 3, including digging mine node 31, digging mine node 32, other nodes 33, time-stamping service in block chain network
Device 41 and time stamp server 42;It only schematically illustrates herein, does not limit the specific structure of the block chain network.In addition,
Time stamp server 41 and the clock of time stamp server 42 can synchronize can also be different step.Optionally, the block chain network
In all nodes for example dig mine node 31, dig the mark that mine node 32, other nodes 33 are stored with time stamp server 41
Information, IP address and public key information, and dig mine node 31, digging mine node 32, other nodes 33 and be stored with time-stamping service
Identification information, IP address and the public key information of device 42.
When digging the one new block A of generation of mine node 31, the corresponding cryptographic Hash of block A is calculated.Similarly, when digging mine section
When point 32 generates a new block B, the corresponding cryptographic Hash of block B is calculated.
The cryptographic Hash is sent at least one time stamp server by step 202, the digging mine node so that it is described extremely
A few time stamp server determines the corresponding timestamp of the block according to the receiving time of the cryptographic Hash.
Block A corresponding cryptographic Hash can be sent to time stamp server 41 and/or timestamp clothes by digging mine node 31
Business device 42, it is assumed that dig mine node 31 for the corresponding cryptographic Hash of block A and be sent to time stamp server 41.Work as time stamp server
41 when receiving the corresponding cryptographic Hash of block A, determines the corresponding timestamp of block A according to the receiving time of the cryptographic Hash.
Similarly, time stamp server 41 and/or time can be sent to for the corresponding cryptographic Hash of block B by digging mine node 32
Stab server 42, it is assumed that dig mine node 32 for the corresponding cryptographic Hash of block B and be sent to time stamp server 42.When timestamp takes
When business device 42 receives block B corresponding cryptographic Hash, the block B corresponding time is determined according to the receiving time of the cryptographic Hash
Stamp.
In other embodiments, the corresponding cryptographic Hash of respective block can be sent to by digging mine node 31 and digging mine node 32
Server is stabbed at the same time.
Optionally, the corresponding timestamp of the block is that at least one described time stamp server connects the cryptographic Hash
It is obtained after being signed between time receiving.
The corresponding cryptographic Hash of block A is denoted as the first cryptographic Hash by the present embodiment, and the corresponding cryptographic Hash of block B is denoted as second
Cryptographic Hash.
For example, the receiving time of first cryptographic Hash is recorded when time stamp server 41 receives the first cryptographic Hash, and
First time after being signed using the private key of oneself to the receiving time of first cryptographic Hash is stabbed, after the signature
First time stamp be the corresponding timestamp of block A.
Similarly, when time stamp server 42 receives the second cryptographic Hash, the receiving time of second cryptographic Hash is recorded, and
The second timestamp after being signed using the private key of oneself to the receiving time of second cryptographic Hash, after the signature
The second timestamp be the corresponding timestamp of block B.
Step 203, the block for digging mine node reception at least one time stamp server transmission are corresponding
Timestamp.
First time stamp after the signature is sent to and digs mine node 31 by time stamp server 41.Similarly, time-stamping service
The second timestamp after the signature is sent to and digs mine node 32 by device 42.
The block and the corresponding timestamp of the block are broadcast to block chain network by step 204, the digging mine node
In.
It, can be by block A and the label when digging mine node 31 receives the first time stamp after signing from time stamp server 41
First time stamp after name is broadcast in block chain network, other nodes 33 in the block chain network can receive block A
With the first time stamp after the signature.Optionally, the first time stamp after the signature can carry in block A.
Similarly, dig mine node 32 from time stamp server 42 receive signature after the second timestamp when, can by block B and
The second timestamp after the signature is broadcast in block chain network, other nodes 33 in the block chain network can receive the area
Block B and the second timestamp after the signature.Optionally, the second timestamp after the signature can carry in block B.
In some embodiments, digging mine node 31 can send out i.e. the first cryptographic Hash of the corresponding cryptographic Hash of block A simultaneously
Multiple time stamp servers are given, as shown in figure 4, digging mine node 31 can be sent to the corresponding cryptographic Hash of block A simultaneously
Time stamp server 41, time stamp server 42 and time stamp server 43;When time stamp server 41, time stamp server 42
When receiving first cryptographic Hash with time stamp server 43, reception of the private key of oneself to first cryptographic Hash can be respectively adopted
Time signed after first time stamp, for example, the time that time stamp server 41 receives first cryptographic Hash be
T11, the first time after time stamp server 41 signs to t11 using the private key of oneself stab;Time stamp server
42 times for receiving first cryptographic Hash were t12, and time stamp server 42 signs to t12 using the private key of oneself
First time stamp afterwards;The time that time stamp server 43 receives first cryptographic Hash is t13, and time stamp server 43 uses
First time after the private key of oneself signs to t13 stabs;It is appreciated that t11, t12, t13 can be identical, it can not
Together, the corresponding timestamp of block A includes that time stamp server 41, time stamp server 42 and time stamp server 43 obtain respectively
First time stamp after the signature arrived, time stamp server 41, time stamp server 42 and time stamp server 43 respectively obtain
Signature after first time stamp may be the same or different.
Similarly, timestamp can also be sent to for the corresponding cryptographic Hash of block B i.e. the second cryptographic Hash simultaneously by digging mine node 32
Server 41, time stamp server 42 and time stamp server 43;Time stamp server 41, time stamp server 42 and timestamp
The private key that oneself is respectively adopted in server 43 signed to the receiving time of second cryptographic Hash after the second timestamp.
In the present embodiment, the book keeping operation power of the same Transaction Information may be got by digging mine node 31 and digging mine node 32,
Further digging mine node 31 and dig mine node 32, the same Transaction Information can be recorded in different blocks, for example, digging mine
The Transaction Information is recorded in block A node 31, digs mine node 32 and the Transaction Information is recorded in block B, dig mine node
31 timestamps for needing to be approved for block A application one by entire block chain network dig mine node 32 and are also required to as block B application
One timestamp approved by entire block chain network, the block number of block A and the block number of block B may be it is identical, by
It is smaller in the probability that stamp server at the same time receives the identical block of two blocks number simultaneously, and stab at the same time
Server is the identical probability of the timestamp also very little that different blocks generate, therefore, when other nodes 33 receive block A and area
When block B, effective block can be determined according to block A and the corresponding timestamp of block B, without by block A and block B
It is determined as effective block, honeysuckle attack is avoided the occurrence of, to improve the safety of the block chain network.
The embodiment of the present invention calculates the corresponding cryptographic Hash of the block by digging mine node according to the block of generation;By the Kazakhstan
Uncommon value is sent at least one time stamp server, when so that at least one time stamp server is according to the reception of the cryptographic Hash
Between determine the corresponding timestamp of the block;When the digging mine node receives the block pair of at least one time stamp server transmission
When the timestamp answered, block timestamp corresponding with the block is broadcast in block chain network, so that in block chain network
Other nodes when receiving the block of same zone block number, can determine effective area according to the corresponding timestamp of each block
Block avoids the occurrence of honeysuckle attack, to improve the area without the block of same zone block number is determined as effective block
The safety of block chain network.
Fig. 5 be another embodiment of the present invention provides block processes method flow diagram.On the basis of the above embodiments, originally
The block processes method that embodiment provides specifically comprises the following steps:
Step 501, time stamp server, which receive, digs the corresponding cryptographic Hash of block that mine node is sent.
As shown in figure 3, time stamp server 41, which receives, digs the corresponding cryptographic Hash of block A that mine node 31 is sent.Timestamp
Server 42, which receives, digs the corresponding cryptographic Hash of block B that mine node 32 is sent.
When step 502, the time stamp server determine that the block is corresponding according to the receiving time of the cryptographic Hash
Between stab.
It is true according to the receiving time of the cryptographic Hash when time stamp server 41 receives the corresponding cryptographic Hash of block A
The fixed corresponding timestamp of block A.When time stamp server 42 receives the corresponding cryptographic Hash of block B, according to the Hash
The receiving time of value determines the corresponding timestamp of block B.
Optionally, the time stamp server determines the block corresponding time according to the receiving time of the cryptographic Hash
Stamp, comprising: the time stamp server carries out the receiving time of the cryptographic Hash using the private key of the time stamp server
Signature obtains the corresponding timestamp of the block.
For example, the receiving time of first cryptographic Hash is recorded when time stamp server 41 receives the first cryptographic Hash, and
First time after being signed using the private key of oneself to the receiving time of first cryptographic Hash is stabbed, after the signature
First time stamp be the corresponding timestamp of block A.
Similarly, when time stamp server 42 receives the second cryptographic Hash, the receiving time of second cryptographic Hash is recorded, and
The second timestamp after being signed using the private key of oneself to the receiving time of second cryptographic Hash, after the signature
The second timestamp be the corresponding timestamp of block B.
The corresponding timestamp of the block is sent to the digging mine node by step 503, the time stamp server.
First time stamp after the signature is sent to and digs mine node 31 by time stamp server 41.Similarly, time-stamping service
The second timestamp after the signature is sent to and digs mine node 32 by device 42.
The embodiment of the present invention receives the corresponding cryptographic Hash of block digging mine node and sending by time stamp server;According to institute
The receiving time for stating cryptographic Hash determines the corresponding timestamp of the block;And the corresponding timestamp of the block is sent to described
Mine node is dug, when so that other nodes in block chain network receiving the block of same zone block number, can be distinguished according to each block
Corresponding timestamp determines effective block, without the block of same zone block number is determined as effective block, avoids
There is honeysuckle attack, to improve the safety of the block chain network.
Fig. 6 be another embodiment of the present invention provides block processes method flow diagram.On the basis of the above embodiments, originally
The block processes method that embodiment provides specifically comprises the following steps:
Step 601, block chain node receive the second block receiving in the preset time after the first block, and described
The identification information of one block is identical with the identification information of second block, and first block includes stabbing at the first time, described
Second block includes the second timestamp.
In the present embodiment, block chain node specifically can be other nodes 33 as shown in Figure 3.Assuming that other nodes 33
The block B for receiving in the preset time after digging the block A that mine node 31 is sent and digging mine node 32 and sending is being received, this is default
Time is denoted as Tmax, and Tmax indicates call duration time farthest in block chain network, and Tmax is within the scope of some time threshold.Block
The block number of A is identical as the block number of block B, carries in block A and stabs at the first time, and block B carries the second timestamp.?
In the present embodiment, block A is denoted as the first block, block B is denoted as the second block.
Wherein, the first time stamp is that time stamp server receives corresponding first cryptographic Hash of first block
When, it is determined according to the receiving time of first cryptographic Hash;Second timestamp is that the time stamp server receives
When corresponding second cryptographic Hash of second block, determined according to the receiving time of second cryptographic Hash.In the present embodiment
In, the first time stamp and second timestamp are identical as the explanation in above-described embodiment, and details are not described herein again.
Optionally, time stamp server 41 sign to the receiving time of first cryptographic Hash using the private key of oneself
First time stamp after to signature is Tn+1, time stamp server 42 using the private key of oneself to the reception of second cryptographic Hash when
Between signed after the second timestamp be Tn+1 '.
If step 602, first time stamp are less than second timestamp, the block chain node determines described the
One block is effective.
If the first time stamp Tn+1 after signature is less than the second time stamp T n+1 ' after signature, other nodes 33 are true
It is effective for determining block A.
If step 603, second timestamp are stabbed less than the first time, the block chain node determines described the
Two blocks are effective.
If the second time stamp T n+1 ' after signature is less than the first time stamp Tn+1 after signature, other nodes 33 are true
It is effective for determining block B.
In addition, the block chain node obtains described first if first time stamp is equal to second timestamp
Corresponding first cryptographic Hash of block and corresponding second cryptographic Hash of second block;If first block corresponding first is breathed out
Uncommon value is less than corresponding second cryptographic Hash of second block, then the block chain node determines that first block is effective;If
Corresponding second cryptographic Hash of second block is less than corresponding first cryptographic Hash of first block, then the block chain node
Determine that second block is effective.
If the clock accuracy of time stamp server 41 and time stamp server 42 is relatively low, it is possible that after signature
First time stamp Tn+1 be equal to the second time stamp T n+1 ' after signature, at this point, other available block A of node 33 are corresponding
Cryptographic Hash and the corresponding cryptographic Hash of block B, the corresponding cryptographic Hash of further comparison blocks A and the corresponding cryptographic Hash of block B, such as
The corresponding cryptographic Hash of fruit block A is less than the corresponding cryptographic Hash of block B, then other nodes 33 determine that block A is effective;If area
The corresponding cryptographic Hash of block B is less than the corresponding cryptographic Hash of block A, then other nodes 33 determine that block B is effective.That is,
When only the corresponding timestamp of block A timestamp corresponding with block B is identical, the corresponding cryptographic Hash of ability comparison blocks A and block B
Corresponding cryptographic Hash, in this way can be to avoid malice miner has been look for the smallest cryptographic Hash and influences the running of block chain.
Other nodes 33 obtain the corresponding cryptographic Hash of block A and the corresponding cryptographic Hash of block B may include following several feasible
Implementation:
One kind is feasible to be achieved in that: other nodes 33 use preset hash algorithm, are generated according to the content of block A
The corresponding cryptographic Hash of block A and other nodes 33 use preset hash algorithm, generate B pairs of block according to the content of block B
The cryptographic Hash answered.
Another kind is feasible to be achieved in that: other nodes 33 disappear to digging mine node 31 and the digging transmission of mine node 32 respectively
Breath, to receive the corresponding cryptographic Hash of block B from mine node 32 is dug from the corresponding cryptographic Hash of the reception of mine node 31 block A is dug.
The embodiment of the present invention receives the second block in preset time after receiving the first block when block chain node
When, if the identification information of first block is identical with the identification information of second block, which includes at the first time
Stamp, second block include the second timestamp, then the block chain node has been determined according to first time stamp and the second timestamp
The block of effect guarantees that block chain does not have bifurcated, to effectively prevent honeysuckle attack, improves the safety of block chain network.
Fig. 7 be another embodiment of the present invention provides block processes method flow diagram.On the basis of the above embodiments, originally
The block processes method that embodiment provides specifically comprises the following steps:
Step 701, block chain node receive the second block receiving in the preset time after the first block, and described
The identification information of one block is identical with the identification information of second block, and first block includes multiple first time stamps,
Second block includes multiple second timestamps.
In the present embodiment, block chain node specifically can be other nodes 33 as shown in Figure 4.Assuming that other nodes 33
The block B for receiving in the preset time after digging the block A that mine node 31 is sent and digging mine node 32 and sending is being received, this is default
Time is denoted as Tmax, and Tmax indicates call duration time farthest in block chain network, and Tmax is within the scope of some time threshold.Block
The block number of A is identical as the block number of block B, and multiple first time stamps are carried in block A, and block B carries multiple second
Timestamp.In the present embodiment, block A is denoted as the first block, block B is denoted as the second block, the corresponding cryptographic Hash of block A
It is denoted as the first cryptographic Hash, the corresponding cryptographic Hash of block B is denoted as the second cryptographic Hash.
Wherein, the multiple first time stamp is that each time stamp server in multiple time stamp servers receives institute
When stating corresponding first cryptographic Hash of the first block, determined according to the receiving time of first cryptographic Hash;The multiple second
Timestamp is that each time stamp server in multiple time stamp servers receives corresponding second Hash of second block
When value, determined according to the receiving time of second cryptographic Hash.
Optionally, time stamp server 41 sign to the receiving time of first cryptographic Hash using the private key of oneself
First time stamp after to signature is Tn+1, time stamp server 42 using the private key of oneself to the reception of first cryptographic Hash when
Between signed after first time stamp be Tn+2, time stamp server 43 using oneself private key to this first breathe out
First time stamp after the receiving time of uncommon value is signed is Tn+3.Optionally, carried in block A Tn+1,
Tn+2 and Tn+3.
Time stamp server 41 signs to the receiving time of second cryptographic Hash using the private key of oneself
The second timestamp afterwards is Tn+1 ', time stamp server 42 using oneself private key to the receiving time of second cryptographic Hash into
The second timestamp after row is signed is Tn+2 ', and time stamp server 43 is using the private key of oneself to second Hash
The second timestamp after the receiving time of value is signed is Tn+3 '.Optionally, carried in block B Tn+1 ',
Tn+2 ' and Tn+3 '.
Step 702, the block chain node calculate the first average value and the multiple the of the multiple first time stamp
Second average value of two timestamps.
Other nodes 33 calculate the average value of Tn+1, Tn+2 and Tn+3, which is denoted as the first average value;In addition, its
His node 33 calculates the average value of Tn+1 ', Tn+2 ' and Tn+3 ', which is denoted as the second average value.
If step 703, first average value are less than second average value, the block chain node determines described the
One block is effective.
If first average value is less than second average value, other nodes 33 determine that block A is effective.
If step 704, second average value are less than first average value, the block chain node determines described the
Two blocks are effective.
If second average value is less than first average value, other nodes 33 determine that block B is effective.
In addition, the block chain node obtains described first if first average value is equal to second average value
Corresponding first cryptographic Hash of block and corresponding second cryptographic Hash of second block;If first block corresponding first is breathed out
Uncommon value is less than corresponding second cryptographic Hash of second block, then the block chain node determines that first block is effective;If
Corresponding second cryptographic Hash of second block is less than corresponding first cryptographic Hash of first block, then the block chain node
Determine that second block is effective.
If the clock accuracy of time stamp server 41, time stamp server 42 and time stamp server 43 is relatively low,
It is possible that the first average value is equal to second average value, at this point, the corresponding Hash of the available block A of other nodes 33
It is worth corresponding with block B cryptographic Hash, the corresponding cryptographic Hash of further comparison blocks A and the corresponding cryptographic Hash of block B, if block
The corresponding cryptographic Hash of A is less than the corresponding cryptographic Hash of block B, then other nodes 33 determine that block A is effective;If B pairs of block
The cryptographic Hash answered is less than the corresponding cryptographic Hash of block A, then other nodes 33 determine that block B is effective.That is, only area
When the corresponding timestamp of block A timestamp corresponding with block B is identical, the corresponding cryptographic Hash of ability comparison blocks A and block B are corresponding
Cryptographic Hash, in this way can be to avoid malice miner has been look for the smallest cryptographic Hash and influences the running of block chain.
Compared to Fig. 3, in Fig. 4, due to the corresponding timestamp of block A and the corresponding timestamp of block B be by it is multiple when
Between stamp server determine, the reliability of the corresponding timestamp of block A and the corresponding timestamp of block B can be improved.If block A
Corresponding timestamp and the corresponding timestamp of block B are determined by a time stamp server, and the peace of the time stamp server
Full property is not high, may result in the corresponding timestamp of block A and the corresponding timestamp of block B that the time stamp server is determined
It is incredible.
The embodiment of the present invention receives the second block in preset time after receiving the first block when block chain node
When, if the identification information of first block is identical with the identification information of second block, which includes multiple first
Timestamp, second block include multiple second timestamps, then the block chain node calculates the first of multiple first time stamp
Second average value of average value and multiple second timestamp, and determined effectively according to the first average value and the second average value
Block guarantees that block chain does not have bifurcated, to effectively prevent honeysuckle attack, improves the safety of block chain network.
Fig. 8 be another embodiment of the present invention provides block processes method flow diagram.On the basis of the above embodiments, originally
The block processes method that embodiment provides specifically comprises the following steps:
Step 801, block chain node receive the second block receiving in the preset time after the first block, and described
The identification information of one block is identical with the identification information of second block, and first block includes multiple first time stamps,
Second block includes multiple second timestamps.
Wherein, the multiple first time stamp is that each time stamp server in multiple time stamp servers receives institute
When stating corresponding first cryptographic Hash of the first block, determined according to the receiving time of first cryptographic Hash;The multiple second
Timestamp is that each time stamp server in multiple time stamp servers receives corresponding second Hash of second block
When value, determined according to the receiving time of second cryptographic Hash.
Step 801 and the concrete principle of step 701 are consistent with implementation, and details are not described herein again.
Step 802, the block chain node calculate the first average value and the multiple the of the multiple first time stamp
Second average value of two timestamps.
Step 802 and the concrete principle of step 702 are consistent with implementation, and details are not described herein again.
Step 803, the block chain node calculate each the in first average value and stamp of the multiple first time
The first variance of one timestamp.
For example, after other nodes 33 calculate the first average value of Tn+1, Tn+2 and Tn+3, can also further calculate this
The variance of the variance S1 of one average value and Tn+1, the variance S2 of first average value and Tn+2 and first average value and Tn+3
S3。
Step 804, the block chain node calculate each the in second average value and the multiple second timestamp
The second variance of two timestamps.
In addition, can also be further calculated after other nodes 33 calculate the second average value of Tn+1 ', Tn+2 ' and Tn+3 '
The variance M1 of second average value and Tn+1 ', the variance M2 of second average value and Tn+2 ' and second average value and Tn+
3 ' variance M3.
Whether step 805, the block chain node determine the first variance and the second variance in default variance model
In enclosing.
Further, other nodes 33 determine S1, S2 and S3 whether within the scope of default variance, if S1, S2 and S3 exist
Within the scope of default variance, then the stamp of multiple first times for illustrating that block A includes is effective.If in S1, S2 and S3 at least
One has exceeded default variance range, then illustrates that at least one in stamp of multiple first times that block A includes is stabbed at the first time
It is invalid.
In addition, other nodes 33 also determine M1, M2 and M3 whether within the scope of default variance, if M1, M2 and M3 exist
Within the scope of default variance, then multiple second timestamps for illustrating that block B includes are effective.If in M1, M2 and M3 at least
One has exceeded default variance range, then illustrates at least one second timestamp in multiple second timestamps that block B includes
It is invalid.
In the present embodiment, presetting variance range can be according to the farthest call duration time in block chain network and communication recently
Time etc. is because usually determining.
If step 806, first average value are less than second average value, and the first variance is in default variance model
In enclosing, then the block chain node determines that first block is effective.
If first average value is less than second average value, and S1, S2 and S3 are being preset within the scope of variance, then
Other nodes 33 determine that block A is effective.
If step 807, second average value are less than first average value, and the second variance is in default variance model
In enclosing, then the block chain node determines that second block is effective.
If second average value is less than first average value, and M1, M2 and M3 are being preset within the scope of variance, then
Other nodes 33 determine that block B is effective.
In addition, the block chain node obtains described first if first average value is equal to second average value
Corresponding first cryptographic Hash of block and corresponding second cryptographic Hash of second block;If first block corresponding first is breathed out
Uncommon value is less than corresponding second cryptographic Hash of second block, then the block chain node determines that first block is effective;If
Corresponding second cryptographic Hash of second block is less than corresponding first cryptographic Hash of first block, then the block chain node
Determine that second block is effective.
The embodiment of the present invention receives the second block in preset time after receiving the first block when block chain node
When, if the identification information of first block is identical with the identification information of second block, which includes multiple first
Timestamp, second block include multiple second timestamps, then the block chain node calculates the first of multiple first time stamp
Second average value of average value and multiple second timestamp, and determined effectively according to the first average value and the second average value
Block guarantees that block chain does not have bifurcated, to effectively prevent honeysuckle attack, improves the safety of block chain network.
Fig. 9 is the structural schematic diagram of block processes device provided in an embodiment of the present invention.The block processes device specifically may be used
To be block chain node described in above-described embodiment, block processes device provided in an embodiment of the present invention can be executed at block
The process flow that embodiment of the method provides is managed, as shown in figure 9, block processes device 90 includes: receiving module 91 and determining module
92;Wherein, receiving module 91 is used to receive the second block in the preset time after the first block receiving, firstth area
The identification information of block is identical with the identification information of second block, and first block includes stabbing at the first time, and described second
Block includes the second timestamp;Determining module 92 is used to determine institute when the first time, stamp was less than second timestamp
It is effective to state the first block;When second timestamp, which is less than the first time, to be stabbed, determine that second block is effective;Its
In, when first time stamp is that time stamp server receives first block corresponding first cryptographic Hash, according to described
What the receiving time of the first cryptographic Hash determined;Second timestamp is that the time stamp server receives second block
When corresponding second cryptographic Hash, determined according to the receiving time of second cryptographic Hash
Optionally, block processes device 90 further include: obtain module 93;It obtains module 93 to be used for: when the first time
When stamp is equal to second timestamp, corresponding first cryptographic Hash of the first block and second block corresponding the are obtained
Two cryptographic Hash;Determining module 92 is also used to: when corresponding first cryptographic Hash of first block is corresponding less than second block
The second cryptographic Hash when, determine that first block is effective;When corresponding second cryptographic Hash of second block is less than described the
When corresponding first cryptographic Hash of one block, determine that second block is effective.
The block processes device of embodiment illustrated in fig. 9 can be used for executing the technical solution of above method embodiment, realize
Principle is similar with technical effect, and details are not described herein again.
Figure 10 be another embodiment of the present invention provides block processes device structural schematic diagram.Block processes device tool
Body can be block chain node described in above-described embodiment, and block processes device provided in an embodiment of the present invention can execute area
The process flow that block processing method embodiment provides, as shown in Figure 10, block processes device 100 include: receiving module 101, meter
Calculate module 102 and determining module 103;Wherein, receiving module 101 is used to receive receiving in the preset time after the first block
To the second block, the identification information of first block is identical with the identification information of second block, the first block packet
Multiple first time stamps are included, second block includes multiple second timestamps;Computing module 102 is for calculating the multiple the
Second average value of the first average value of one timestamp and the multiple second timestamp;Determining module 103 is used for when described the
When one average value is less than second average value, determine that first block is effective;When second average value is less than described the
When one average value, determine that second block is effective;Wherein, the multiple first time stamp is in multiple time stamp servers
When each time stamp server receives first block corresponding first cryptographic Hash, according to the reception of first cryptographic Hash
What the time determined;The multiple second timestamp is described in each time stamp server in multiple time stamp servers receives
When corresponding second cryptographic Hash of the second block, determined according to the receiving time of second cryptographic Hash.
Optionally, block processes device 100 further include: obtain module 104, obtain module 104 and be used for when described first is flat
When mean value is equal to second average value, obtains corresponding first cryptographic Hash of the first block and second block is corresponding
Second cryptographic Hash;Determining module 103 is also used to: when corresponding first cryptographic Hash of first block is less than second block pair
When the second cryptographic Hash answered, determine that first block is effective;Described in being less than when corresponding second cryptographic Hash of second block
When corresponding first cryptographic Hash of the first block, determine that second block is effective.
Optionally, computing module 102 is also used to: being calculated each in first average value and stamp of the multiple first time
The first variance of stamp at the first time;Calculate each second timestamp in second average value and the multiple second timestamp
Second variance;Whether determining module 103 is also used to: determining the first variance and the second variance in default variance range
It is interior.
Optionally, determining module 103 is specifically used for: and described when first average value is less than second average value
When first variance is within the scope of default variance, determine that first block is effective;When second average value is less than described first
Average value, and the second variance determines that second block is effective when presetting within the scope of variance.
The block processes device of embodiment illustrated in fig. 10 can be used for executing the technical solution of above method embodiment, realize
Principle is similar with technical effect, and details are not described herein again.
Figure 11 is the structural schematic diagram of block chain node provided in an embodiment of the present invention.Block provided in an embodiment of the present invention
Chain node can execute the process flow of block processes embodiment of the method offer, and as shown in figure 11, block chain node 110 includes depositing
Reservoir 111, processor 112, computer program and communication interface 113;Wherein, computer program is stored in memory 111, and
It is configured as executing block processes method described in above-described embodiment as processor 112.
The block chain node of embodiment illustrated in fig. 11 can be used for executing the technical solution of above method embodiment, realize former
Reason is similar with technical effect, and details are not described herein again.
In addition, the present embodiment also provides a kind of computer readable storage medium, it is stored thereon with computer program, the meter
Calculation machine program is executed by processor to realize block processes method described in above-described embodiment.
In several embodiments provided by the present invention, it should be understood that disclosed device and method can pass through it
Its mode is realized.For example, the apparatus embodiments described above are merely exemplary, for example, the division of the unit, only
Only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components can be tied
Another system is closed or is desirably integrated into, or some features can be ignored or not executed.Another point, it is shown or discussed
Mutual coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING or logical of device or unit
Letter connection can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of hardware adds SFU software functional unit.
The above-mentioned integrated unit being realized in the form of SFU software functional unit can store and computer-readable deposit at one
In storage media.Above-mentioned SFU software functional unit is stored in a storage medium, including some instructions are used so that a computer
It is each that equipment (can be personal computer, server or the network equipment etc.) or processor (processor) execute the present invention
The part steps of embodiment the method.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (Read-
Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic or disk etc. it is various
It can store the medium of program code.
Those skilled in the art can be understood that, for convenience and simplicity of description, only with above-mentioned each functional module
Division progress for example, in practical application, can according to need and above-mentioned function distribution is complete by different functional modules
At the internal structure of device being divided into different functional modules, to complete all or part of the functions described above.On
The specific work process for stating the device of description, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention., rather than its limitations;To the greatest extent
Pipe present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: its according to
So be possible to modify the technical solutions described in the foregoing embodiments, or to some or all of the technical features into
Row equivalent replacement;And these are modified or replaceed, various embodiments of the present invention technology that it does not separate the essence of the corresponding technical solution
The range of scheme.
Claims (14)
1. a kind of block processes method characterized by comprising
Block chain node receives the second block receiving in the preset time after the first block, the mark of first block
Information is identical with the identification information of second block, and first block includes stabbing at the first time, and second block includes
Second timestamp;
If the first time stamp is less than second timestamp, the block chain node determines that first block is effective;
If second timestamp is stabbed less than the first time, the block chain node determines that second block is effective;
Wherein, when first time stamp is that time stamp server receives first block corresponding first cryptographic Hash, root
It is determined according to the receiving time of first cryptographic Hash;
When second timestamp is that the time stamp server receives second block corresponding second cryptographic Hash, according to
What the receiving time of second cryptographic Hash determined.
2. the method according to claim 1, wherein the method also includes:
If the first time stamp is equal to second timestamp, it is corresponding that the block chain node obtains first block
First cryptographic Hash and corresponding second cryptographic Hash of second block;
If corresponding first cryptographic Hash of first block is less than corresponding second cryptographic Hash of second block, the block
Chain node determines that first block is effective;
If corresponding second cryptographic Hash of second block is less than corresponding first cryptographic Hash of first block, the block
Chain node determines that second block is effective.
3. a kind of block processes method characterized by comprising
Block chain node receives the second block receiving in the preset time after the first block, the mark of first block
Information is identical with the identification information of second block, and first block includes multiple first time stamps, second block
Including multiple second timestamps;
The block chain node calculate the multiple first time stamp the first average value and the multiple second timestamp the
Two average values;
If first average value is less than second average value, the block chain node determines that first block is effective;
If second average value is less than first average value, the block chain node determines that second block is effective;
Wherein, the multiple first time stamp is that each time stamp server in multiple time stamp servers receives described the
When corresponding first cryptographic Hash of one block, determined according to the receiving time of first cryptographic Hash;
The multiple second timestamp is that each time stamp server in multiple time stamp servers receives secondth area
When corresponding second cryptographic Hash of block, determined according to the receiving time of second cryptographic Hash.
4. according to the method described in claim 3, it is characterized in that, the method also includes:
If first average value is equal to second average value, it is corresponding that the block chain node obtains first block
First cryptographic Hash and corresponding second cryptographic Hash of second block;
If corresponding first cryptographic Hash of first block is less than corresponding second cryptographic Hash of second block, the block
Chain node determines that first block is effective;
If corresponding second cryptographic Hash of second block is less than corresponding first cryptographic Hash of first block, the block
Chain node determines that second block is effective.
5. the method according to claim 3 or 4, which is characterized in that when the block chain node calculates the multiple first
Between after the second average value of the first average value and the multiple second timestamp for stabbing, further includes:
The block chain node calculates the of each first time stamp in first average value and stamp of the multiple first time
One variance;
The block chain node calculates the of each second timestamp in second average value and the multiple second timestamp
Two variances;
Whether the block chain node determines the first variance and the second variance within the scope of default variance.
6. if according to the method described in claim 5, it is characterized in that, first average value is average less than described second
Value, then the block chain node determines that first block is effective, comprising:
If first average value is less than second average value, and the first variance is within the scope of default variance, then described
Block chain node determines that first block is effective;
If second average value is less than first average value, the block chain node determines that second block has
Effect, comprising:
If second average value is less than first average value, and the second variance is within the scope of default variance, then described
Block chain node determines that second block is effective.
7. a kind of block processes device characterized by comprising
Receiving module, for receiving the second block in the preset time after the first block receiving, first block
Identification information is identical with the identification information of second block, and first block includes stabbing at the first time, second block
Including the second timestamp;
Determining module, for determining that first block is effective when the first time, stamp was less than second timestamp;When
When second timestamp is less than first time stamp, determine that second block is effective;
Wherein, when first time stamp is that time stamp server receives first block corresponding first cryptographic Hash, root
It is determined according to the receiving time of first cryptographic Hash;
When second timestamp is that the time stamp server receives second block corresponding second cryptographic Hash, according to
What the receiving time of second cryptographic Hash determined.
8. block processes device according to claim 7, which is characterized in that further include: obtain module;
The acquisition module is used for: when the first time, stamp was equal to second timestamp, obtaining first block pair
The first cryptographic Hash and corresponding second cryptographic Hash of second block answered;
The determining module is also used to: when corresponding first cryptographic Hash of first block is less than second block corresponding the
When two cryptographic Hash, determine that first block is effective;When corresponding second cryptographic Hash of second block is less than firstth area
When corresponding first cryptographic Hash of block, determine that second block is effective.
9. a kind of block processes device characterized by comprising
Receiving module, for receiving the second block in the preset time after the first block receiving, first block
Identification information is identical with the identification information of second block, and first block includes stabbing multiple first times, and described second
Block includes multiple second timestamps;
Computing module, for calculating the second of the first average value and the multiple second timestamp that the multiple first time stabs
Average value;
Determining module, for determining that first block is effective when first average value is less than second average value;When
When second average value is less than first average value, determine that second block is effective;
Wherein, the multiple first time stamp is that each time stamp server in multiple time stamp servers receives described the
When corresponding first cryptographic Hash of one block, determined according to the receiving time of first cryptographic Hash;
The multiple second timestamp is that each time stamp server in multiple time stamp servers receives secondth area
When corresponding second cryptographic Hash of block, determined according to the receiving time of second cryptographic Hash.
10. block processes device according to claim 9, which is characterized in that further include:
Module is obtained, for it is corresponding to obtain first block when first average value is equal to second average value
First cryptographic Hash and corresponding second cryptographic Hash of second block;
The determining module is also used to: when corresponding first cryptographic Hash of first block is less than second block corresponding the
When two cryptographic Hash, determine that first block is effective;When corresponding second cryptographic Hash of second block is less than firstth area
When corresponding first cryptographic Hash of block, determine that second block is effective.
11. block processes device according to claim 9 or 10, which is characterized in that the computing module is also used to: calculating
The first variance of each first time stamp in first average value and stamp of the multiple first time;It is average to calculate described second
The second variance of value and each second timestamp in the multiple second timestamp;
Whether the determining module is also used to: determining the first variance and the second variance within the scope of default variance.
12. block processes device according to claim 11, which is characterized in that the determining module is specifically used for: working as institute
The first average value is stated less than second average value, and the first variance determines described first when presetting within the scope of variance
Block is effective;When second average value is less than first average value, and the second variance is within the scope of default variance,
Determine that second block is effective.
13. a kind of block chain node characterized by comprising
Memory;
Processor;And
Computer program;
Wherein, the computer program stores in the memory, and is configured as being executed by the processor to realize such as
Method described in any one of claims 1-6.
14. a kind of computer readable storage medium, which is characterized in that be stored thereon with computer program, the computer program
It is executed by processor to realize as the method according to claim 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810555792.7A CN108989043B (en) | 2018-05-31 | 2018-05-31 | Block processing method and device and block link points |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810555792.7A CN108989043B (en) | 2018-05-31 | 2018-05-31 | Block processing method and device and block link points |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108989043A true CN108989043A (en) | 2018-12-11 |
CN108989043B CN108989043B (en) | 2021-01-26 |
Family
ID=64540398
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810555792.7A Active CN108989043B (en) | 2018-05-31 | 2018-05-31 | Block processing method and device and block link points |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108989043B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109670956A (en) * | 2018-12-21 | 2019-04-23 | 成都四方伟业软件股份有限公司 | Block chain method of commerce and device |
CN110598471A (en) * | 2019-09-17 | 2019-12-20 | 深圳市网心科技有限公司 | Block chain-based timestamp generation method, device, system and storage medium |
US11283634B2 (en) | 2018-12-29 | 2022-03-22 | Advanced New Technologies Co., Ltd. | System and method for detecting replay attack |
US11323475B2 (en) | 2018-12-29 | 2022-05-03 | Advanced New Technologies Co., Ltd. | System and method for detecting replay attack |
CN116932656A (en) * | 2023-09-18 | 2023-10-24 | 中孚安全技术有限公司 | Data blood edge storage method, system, equipment and medium based on block chain |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105488675A (en) * | 2015-11-25 | 2016-04-13 | 布比(北京)网络技术有限公司 | Distributed shared general ledger construction method of block chain |
US20170075941A1 (en) * | 2016-11-28 | 2017-03-16 | Keir Finlow-Bates | Consensus system and method for adding data to a blockchain |
CN107040384A (en) * | 2017-05-08 | 2017-08-11 | 飞天诚信科技股份有限公司 | A kind of authorizing information method and device based on block chain |
CN107368259A (en) * | 2017-05-25 | 2017-11-21 | 阿里巴巴集团控股有限公司 | A kind of method and apparatus that business datum is write in the catenary system to block |
CN107493340A (en) * | 2017-08-23 | 2017-12-19 | 广州市易彩乐网络科技有限公司 | Data distribution method of calibration in block chain network, apparatus and system |
-
2018
- 2018-05-31 CN CN201810555792.7A patent/CN108989043B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105488675A (en) * | 2015-11-25 | 2016-04-13 | 布比(北京)网络技术有限公司 | Distributed shared general ledger construction method of block chain |
US20170075941A1 (en) * | 2016-11-28 | 2017-03-16 | Keir Finlow-Bates | Consensus system and method for adding data to a blockchain |
CN107040384A (en) * | 2017-05-08 | 2017-08-11 | 飞天诚信科技股份有限公司 | A kind of authorizing information method and device based on block chain |
CN107368259A (en) * | 2017-05-25 | 2017-11-21 | 阿里巴巴集团控股有限公司 | A kind of method and apparatus that business datum is write in the catenary system to block |
CN107493340A (en) * | 2017-08-23 | 2017-12-19 | 广州市易彩乐网络科技有限公司 | Data distribution method of calibration in block chain network, apparatus and system |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109670956A (en) * | 2018-12-21 | 2019-04-23 | 成都四方伟业软件股份有限公司 | Block chain method of commerce and device |
US11283634B2 (en) | 2018-12-29 | 2022-03-22 | Advanced New Technologies Co., Ltd. | System and method for detecting replay attack |
US11323475B2 (en) | 2018-12-29 | 2022-05-03 | Advanced New Technologies Co., Ltd. | System and method for detecting replay attack |
CN110598471A (en) * | 2019-09-17 | 2019-12-20 | 深圳市网心科技有限公司 | Block chain-based timestamp generation method, device, system and storage medium |
CN116932656A (en) * | 2023-09-18 | 2023-10-24 | 中孚安全技术有限公司 | Data blood edge storage method, system, equipment and medium based on block chain |
CN116932656B (en) * | 2023-09-18 | 2024-01-09 | 中孚安全技术有限公司 | Data blood edge storage method, system, equipment and medium based on block chain |
Also Published As
Publication number | Publication date |
---|---|
CN108989043B (en) | 2021-01-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108989043A (en) | Block processes method, apparatus and block chain node | |
CN108989048A (en) | Cryptographic key distribution method, device, equipment and storage medium | |
CN108810119A (en) | block chain processing method, device and block chain node | |
CN107147501B (en) | Timestamp processing method and processing device | |
CN109067724A (en) | Block chain data trade method, apparatus, equipment and storage medium | |
CN109087100A (en) | Cryptographic key distribution method, device, equipment and storage medium | |
CN108881296A (en) | Block chain real name identification method, device, equipment and storage medium | |
CN108900528A (en) | Block chain real name identification method, device, equipment and storage medium | |
CN108712506A (en) | block chain node communication method, device and block chain node | |
CN108769142A (en) | Exchange information processing method and block generate node | |
CN108566275A (en) | Identity identifying method, device and block chain node | |
CN108173915A (en) | Call chain processing method and processing device | |
CN109118360A (en) | Block chain account checking method, device, equipment and storage medium | |
CN108616532A (en) | Ballot processing method, apparatus and terminal device | |
CN109194481A (en) | Block chain real name identification method, device, equipment and storage medium | |
CN108683727B (en) | Block processing method and main node | |
EP4274184A3 (en) | Method and apparatus for transmitting and receiving data in wireless communication system | |
EP3667995B1 (en) | Synchronization signal block indication method and determining method, network device, and terminal device | |
CN109672979A (en) | Double card communication means and equipment | |
MX2021010569A (en) | Establishing a protocol data unit session. | |
CN108810120A (en) | block chain node communication method, device and block chain node | |
CN109067721A (en) | Block chain real name identification method, device, equipment and storage medium | |
WO2018171507A1 (en) | Method and device for sending and receiving preamble sequence of physical random access channel | |
CN109214648A (en) | New energy method of commerce, device, equipment and storage medium | |
CN109104285A (en) | Block chain real name identification method, device, equipment and storage medium |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |