CN109379396A - Method, medium, device and the block catenary system of hard bifurcation are prevented in block catenary system - Google Patents
Method, medium, device and the block catenary system of hard bifurcation are prevented in block catenary system Download PDFInfo
- Publication number
- CN109379396A CN109379396A CN201810969344.1A CN201810969344A CN109379396A CN 109379396 A CN109379396 A CN 109379396A CN 201810969344 A CN201810969344 A CN 201810969344A CN 109379396 A CN109379396 A CN 109379396A
- Authority
- CN
- China
- Prior art keywords
- catenary system
- node
- block
- block catenary
- production
- 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
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/104—Peer-to-peer [P2P] networks
- H04L67/1044—Group management mechanisms
- H04L67/1048—Departure or maintenance mechanisms
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/104—Peer-to-peer [P2P] networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/104—Peer-to-peer [P2P] networks
- H04L67/1061—Peer-to-peer [P2P] networks using node-based peer discovery mechanisms
- H04L67/1065—Discovery involving distributed pre-established resource-based relationships among peers, e.g. based on distributed hash tables [DHT]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/104—Peer-to-peer [P2P] networks
- H04L67/1074—Peer-to-peer [P2P] networks for supporting data block transmission mechanisms
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
- H04L41/0813—Configuration setting characterised by the conditions triggering a change of settings
- H04L41/082—Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Theoretical Computer Science (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses method, medium, device and block catenary systems that hard bifurcation is prevented in a kind of block catenary system;Method obtains current line node sum N, and the current block of production node production is numbered the following steps are included: when production node carries out current block production;The line node sum Nm of block catenary system when by parsing the content of m-th of block to obtain m-th of block production;The difference between Nm and N is obtained, and judges whether difference is less than N/2;If difference is less than N/2, control continues current block production;If difference is more than or equal to N/2, controls and stop current block production, and down state is in by currently production node broadcasts block catenary system;Upgrade situation by line node quantity in monitoring block catenary system, and according to line node quantity judgement system to realize, and controls block catenary system state, the generation of the hard bifurcation of block catenary system caused by preventing because of block catenary system according to differentiating.
Description
Technical field
The present invention relates to block chain technical field, in particular to hard bifurcation is prevented in a kind of block catenary system
Method, medium, device and block catenary system.
Background technique
Block catenary system, be it is a kind of by decentralization, go to trust in a manner of safeguard the technical solution in authentic data library;Because of it
Decentralization, the characteristics of going trust formula and data to be difficult to tamper with and widely applied.
In existing block catenary system, when block catenary system will carry out Function Extension or other demands needs to composition
Node when being upgraded, often will appear part of nodes and do not receive the case where upgrading, and then the part is caused not receive
The node of upgrading carries out the production of block still on old block catenary system, and the node after upgrading is in new block linkwork
The production of block is carried out on system, so that hard bifurcated occurs in block catenary system, and then is caused to exist while two edition systems and be caused
It is split user.
Summary of the invention
The present invention is directed to solve one of the technical problem in above-mentioned technology at least to a certain extent.For this purpose, of the invention
One purpose is to propose a kind of method that hard bifurcation is prevented in block catenary system, can be realized by monitoring block
Line node quantity in catenary system, and situation is upgraded according to line node quantity judgement system, and control block according to differentiating
Catenary system state, the generation of the hard bifurcation of block catenary system caused by preventing because of block catenary system.
Second object of the present invention is to propose a kind of computer readable storage medium.
Third object of the present invention is to propose to prevent the device of hard bifurcation in a kind of block catenary system.
Fourth object of the present invention is to propose a kind of block catenary system.
In order to achieve the above objectives, first aspect present invention embodiment, which proposes, prevents hard point in a kind of block catenary system
The method for pitching phenomenon, comprising the following steps: whenever producing node progress current block production in the block catenary system, obtain
The current line node sum N of the block catenary system, and the current block of the production node production is numbered;Pass through
The line node sum Nm of block catenary system when parsing the content of m-th of block to obtain m-th of block production, wherein m
=u-i, u are the number of current block, and i is less than u and is preset value, and u, i and Nm are positive integer;Obtain the difference between Nm and N
Value, and judge whether the difference is less than N/2;If the difference is less than N/2, controls current production node and continue to work as
Preceding block production;If the difference is more than or equal to N/2, controls current production node and stop current block production, and pass through
Current production node the whole network broadcasts the block catenary system and is currently at down state.
The method that hard bifurcation is prevented in block catenary system according to an embodiment of the present invention, firstly, whenever block
When producing node progress current block production in catenary system, the current line node sum N of block catenary system is obtained, and to production
The current block of node production is numbered;Then, when by parsing the content of m-th of block obtaining m-th of block production
The line node sum Nm of block catenary system, wherein m=u-i, u are the number of current block, and i is less than u and is preset value, u, i
It is positive integer with Nm;Then, the difference between Nm and N is obtained, and judges whether difference is less than N/2;Then, if difference is small
In N/2, then the current production node of control continues current block production;Then, it if difference is more than or equal to N/2, controls
Currently production node stops current block production, and being currently at by currently production node the whole network broadcast block catenary system can not
Use state;To realize by line node quantity in monitoring block catenary system, and according to line node quantity judgement system liter
Grade situation, and block catenary system state is controlled according to differentiating, prevent block catenary system caused by upgrading because of block catenary system
The generation of hard bifurcation.
In addition, preventing the method for hard bifurcation also in the block catenary system proposed according to that above embodiment of the present invention
It can have following additional technical characteristic:
Optionally, when any one node receives new node access request in the block catenary system, to the company of new node
Ground connection location is monitored to judge whether the new node is connected into the block catenary system, and is connected into the area in the new node
The whole network broadcast is carried out when block catenary system, so that the production node carries out the line node sum of the block catenary system to add 1
Operation.
Optionally, also by being monitored each address of node in the block catenary system to judge the block chain
It whether there is offline node in system, and wide there are the whole network is carried out when any one offline node in the block catenary system
It broadcasts, so that the production node carries out subtracting 1 operation to the line node sum of the block catenary system.
Optionally, it is currently at not when any one node in the block catenary system receives the block catenary system
When the broadcast of available mode, into dormant state.
In order to achieve the above objectives, second aspect of the present invention embodiment proposes a kind of computer readable storage medium, thereon
It is stored with the program for preventing hard bifurcation in block catenary system, prevents hard bifurcation in the block catenary system
The method that hard bifurcation is prevented in above-mentioned block catenary system is realized when program is executed by processor.
In order to achieve the above objectives, third aspect present invention embodiment, which proposes, prevents hard point in a kind of block catenary system
Pitch the device of phenomenon, comprising: module is obtained, for whenever production node progress current block production in the block catenary system
When, the current line node sum N of the block catenary system is obtained, and compile to the current block of the production node production
Number;Parsing module, block catenary system when for the content by m-th of block of parsing to obtain m-th of block production
Line node sum Nm, wherein m=u-i, u are the number of current block, and i is less than u and is preset value, and u, i and Nm are positive whole
Number;Control module for obtaining the difference between Nm and N, and judges whether the difference is less than N/2, wherein if the difference
Value is less than N/2, then the current production node of control continues current block production;If the difference is more than or equal to N/2, control
The current production node of system stops current block production, and broadcasts the block catenary system by currently production node the whole network and currently locate
In down state.
The device of hard bifurcation is prevented in block catenary system according to an embodiment of the present invention, is obtained module, is used for
Whenever producing node progress current block production in block catenary system, the current line node sum N of block catenary system is obtained,
And the current block of production node production is numbered;Parsing module, for the content by m-th of block of parsing to obtain
The line node sum Nm of block catenary system when m-th of block production, wherein m=u-i, u are the number of current block, and i is less than u
And be preset value, u, i and Nm are positive integer;Whether control module for obtaining the difference between Nm and N, and judges difference
Less than N/2, wherein if difference is less than N/2, controls current production node and continue current block production;If difference
More than or equal to N/2, then the current production node of control stops current block production, and broadcasts block by currently production node the whole network
Catenary system is currently at down state;To realize by line node quantity in monitoring block catenary system, and according to online
Number of nodes judgement system upgrades situation, and controls block catenary system state according to differentiating, prevents from upgrading because of block catenary system
Caused by the hard bifurcation of block catenary system generation.
In addition, preventing the device of hard bifurcation also in the block catenary system proposed according to that above embodiment of the present invention
It can have following additional technical characteristic:
Optionally, the acquisition module is also used to, when any one node receives new node access in the block catenary system
When request, the link address of new node is monitored to judge whether the new node is connected into the block catenary system, and
The new node carries out the whole network broadcast when being connected into the block catenary system, so that the production node is to the block catenary system
Line node sum carries out plus 1 operation.
Optionally, the acquisition module is also used to, by supervising to each address of node in the block catenary system
It listens to judge in the block catenary system with the presence or absence of offline node, and that there are any one is offline in the block catenary system
The whole network broadcast is carried out when node, so that the production node carries out subtracting 1 operation to the line node sum of the block catenary system.
Optionally, it is currently at not when any one node in the block catenary system receives the block catenary system
When the broadcast of available mode, into dormant state.
In order to achieve the above objectives, fourth aspect present invention embodiment proposes a kind of block catenary system, including above-mentioned area
The device of hard bifurcation is prevented in block catenary system.
Detailed description of the invention
Fig. 1 is to be illustrated according to the process for the method for preventing hard bifurcation in the block catenary system of the embodiment of the present invention
Figure;
Fig. 2 is the flow diagram according to the line node statistical method of the embodiment of the present invention;
Fig. 3 is the block diagram according to the device for preventing hard bifurcation in the block catenary system of the embodiment of the present invention.
Specific embodiment
The embodiment of the present invention is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end
Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached
The embodiment of figure description is exemplary, it is intended to is used to explain the present invention, and is not considered as limiting the invention.
In existing block catenary system, when block catenary system will carry out Function Extension or other demands needs to composition
When node is upgraded, the generation of the hard bifurcation of block catenary system often will lead to;Block chain according to an embodiment of the present invention
The method that hard bifurcation is prevented in system, firstly, carrying out current block production whenever producing node in block catenary system
When, the current line node sum N of block catenary system is obtained, and the current block of production node production is numbered;Then,
The line node sum Nm of block catenary system when by parsing the content of m-th of block to obtain m-th of block production, wherein m
=u-i, u are the number of current block, and i is less than u and is preset value, and u, i and Nm are positive integer;Then, it obtains between Nm and N
Difference, and judge whether difference is less than N/2;Then, it if difference is less than N/2, controls current production node and continues
Current block production;Then, it if difference is more than or equal to N/2, controls current production node and stops current block production, and lead to
Production node the whole network broadcast block catenary system is currently at down state before excessive;To realize through monitoring block catenary system
Middle line node quantity, and situation is upgraded according to line node quantity judgement system, and control block catenary system according to differentiating
State prevents the generation of the hard bifurcation of block catenary system caused by upgrading because of block catenary system.
In order to better understand the above technical scheme, the exemplary reality that the present invention will be described in more detail below with reference to accompanying drawings
Apply example.Although showing exemplary embodiment of the present invention in attached drawing, it being understood, however, that may be realized in various forms this hair
It is bright and should not be limited by the embodiments set forth herein.It is to be able to thoroughly understand this on the contrary, providing these embodiments
Invention, and the scope of the present invention can be fully disclosed to those skilled in the art.
In order to better understand the above technical scheme, in conjunction with appended figures and specific embodiments to upper
Technical solution is stated to be described in detail.
Fig. 1 is the process that the method for hard bifurcation is prevented in the block catenary system proposed according to the embodiment of the present invention
Schematic diagram, as shown in Figure 1, the method for hard bifurcation is prevented in the block catenary system the following steps are included:
S101 obtains the current online of block catenary system whenever producing node progress current block production in block catenary system
Node total number N, and the current block of production node production is numbered.
Wherein, there are many modes for obtaining the current line node sum N of block catenary system, for example, passing through block linkwork
Arbitrary node sends inquiry packet to the node that itself connects every preset time in system, with the state of inquiry itself connecting node,
After receiving inquiry packet, itself node serial number is returned to sending node, sends the node of inquiry packet in the section for receiving return
After point number, which is broadcasted, so as to the block chain producer according to the node serial number of broadcast to current online
Number of nodes counted;Alternatively, the system interior nodes being connected directly with new node are to new when there is new node access system
Node is monitored (for example, the address ip of the ping new node at regular intervals), and snoop results are carried out the whole network broadcast,
So that the producer in block catenary system counts current line node quantity.
S102, the line node of block catenary system when by parsing the content of m-th of block to obtain m-th of block production
Total Nm, wherein m=u-i, u are the number of current block, and i is less than u and is preset value, and u, i and Nm are positive integer.
That is, the content of m-th of block is parsed, to obtain the when producing node and producing to u-th of block
The line node sum Nm of block catenary system when m block production;Wherein, m=u-i, u be current block number, i be less than u and
For preset value, u, i and Nm are positive integer.
As an example, when the corresponding producer of u-th of block generates in block catenary system, or when u-th of area
The working condition of block reaches, i.e., when will produce to u-th of block;The corresponding producer of u-th of block passes through inquiry system
Design variables i, and calculated according to design variables i and current block number u and obtain m, and m-th of block is carried out according to m
The line node sum Nm of block catenary system when parsing is to obtain m-th of block production;In order to subsequent according to Nm and current
The judgement of block chain line node sum progress block catenary system state.
S103 obtains the difference between Nm and N, and judges whether difference is less than N/2.
That is, the line node sum Nm of block catenary system and block catenary system when calculating m-th of block production
Difference between current line node sum N, and judge whether the difference is less than N/2.
S104 controls current production node and continues current block production if difference is less than N/2.
S105 controls current production node and stops current block production, and by working as if difference is more than or equal to N/2
Preceding production node the whole network broadcast block catenary system is currently at down state.
That is, controlling current production node if the difference of Nm and N is less than N/2 and continuing current block production;
If the difference of Nm and N is greater than N/2, controls current production node and stop current block production, and is complete by currently production node
Net broadcast block catenary system is currently at down state;
As an example, when any one node in block catenary system of the difference of the Nm and N greater than N/2 is receiving area
Block catenary system is currently at after the broadcast of down state, stops the production of block, into dormant state to prevent block chain
The generation of bifurcation.
In conclusion the method that hard bifurcation is prevented in block catenary system according to an embodiment of the present invention, firstly,
Whenever producing node progress current block production in block catenary system, the current line node sum N of block catenary system is obtained,
And the current block of production node production is numbered;Then, by parsing the content of m-th of block to obtain m-th of area
The line node sum Nm of block catenary system when block produces, wherein m=u-i, u are the number of current block, and i is less than u and is pre-
If value, u, i and Nm are positive integer;Then, the difference between Nm and N is obtained, and judges whether difference is less than N/2;Then, such as
Fruit difference is less than N/2, then the current production node of control continues current block production;Then, if difference is more than or equal to N/
2, then the current node that produces of control stops current block production, and current by currently production node the whole network broadcast block catenary system
In down state;To realize through line node quantity in monitoring block catenary system, and sentenced according to line node quantity
Other system upgrade situation, and block catenary system state is controlled according to differentiating, prevent area caused by upgrading because of block catenary system
The generation of the hard bifurcation of block catenary system.
As shown in Fig. 2, in some embodiments, preventing hard bifurcated in the block catenary system that the embodiment of the present invention proposes
In the method for phenomenon, when there is new node to need to access block catenary system, hard bifurcation is prevented in the block catenary system
Method it is further comprising the steps of:
S201 receives the access request of new node by any one node in block catenary system.
That is, the new node for needing to be added block catenary system can be to block after the building of block catenary system is completed
Any one node initiation access request enters block catenary system with chain in catenary system.
S202 monitors the link address of new node to judge whether new node is connected into block catenary system.
That is, block catenary system receive new node initiation access request after, according to access request to new
The link address of node is monitored to judge whether new node is connected into block catenary system.
Wherein, there are many modes monitored the link address of new node.For example, the area being directly connected to new node
Node in block catenary system every the address connection ip of the preset time ping new node, with judge the new node whether with itself
Successful connection, and after operating successfully, judge the new node and itself successful connection, and confirm that the new node is connected into block
Catenary system;Alternatively, firstly, being sent out every preset time to node connected to it by any one node in block catenary system
Inquiry packet is sent, then, the node for receiving inquiry packet returns to the corresponding number of own node and online mark to the inquiry packet
Carry out response;Then, the arbitrary node for receiving the number of node transmission and identifying online carries out the number and online mark
The whole network broadcast, so that the producer counts line node after receiving the number and online mark.
As an example, also each address of node in block catenary system is monitored, to judge block catenary system
In whether there is offline node, and there are the whole network broadcast is carried out when any one offline node in block catenary system, to give birth to
It produces node and carries out subtracting 1 operation to the line node sum of block catenary system.
S203, when the judgment result is yes, the message for being connected into block catenary system to new node carry out the whole network broadcast, to give birth to
Node is produced the line node sum of block catenary system is carried out to add 1 operation.
That is, when determining that new node is connected into block catenary system, to new node be connected into the message of block catenary system into
The broadcast of row the whole network carries out line node sum to add 1 after such a message has been received, to online section currently to produce node
Point sum is counted.
In conclusion the method that hard bifurcation is prevented in the block catenary system that the embodiment of the present invention proposes, firstly,
The access request of new node is received by any one node in block catenary system;Then, the link address of new node is carried out
It monitors to judge whether new node is connected into block catenary system;Then, when the judgment result is yes, block linkwork is connected into new node
The message of system carries out the whole network broadcast, and to produce, node carries out the line node sum of block catenary system plus 1 operates;Thus
When block catenary system has new node to be added, current line node is counted, convenient for subsequent block catenary system to current shape
The judgement of state.
In order to realize above-described embodiment, the embodiment of the present invention also proposed a kind of calculating readable storage medium storing program for executing, store thereon
There is the program for preventing hard bifurcation in block catenary system, the program of hard bifurcation is prevented in the block catenary system
The method that hard bifurcation is prevented in above-mentioned block catenary system is realized when being executed by processor.
As shown in figure 3, in order to realize above-described embodiment, the embodiment of the present invention also proposed to be prevented in a kind of block catenary system
There is the device of hard bifurcation, comprising: obtain module 10, parsing module 20 and control module 30.
Module 10 is obtained, for obtaining block chain whenever producing node progress current block production in block catenary system
The current line node sum N of system, and the current block of production node production is numbered.
Parsing module 20, block catenary system when for the content by m-th of block of parsing to obtain m-th of block production
Line node sum Nm, wherein m=u-i, u be current block number, i be less than u and be preset value, u, i and Nm are positive
Integer.
Control module 30 for obtaining the difference between Nm and N, and judges whether difference is less than N/2, wherein if poor
Value is less than N/2, then the current production node of control continues current block production;If difference is more than or equal to N/2, control is worked as
Preceding production node stops current block production, and is currently at by currently production node the whole network broadcast block catenary system unavailable
State.
In conclusion preventing the device of hard bifurcation in block catenary system according to an embodiment of the present invention, obtain
Module, for obtaining the current online of block catenary system whenever producing node progress current block production in block catenary system
Node total number N, and the current block of production node production is numbered;Parsing module, for passing through m-th of block of parsing
The line node sum Nm of block catenary system when content is to obtain m-th of block production, wherein m=u-i, u are current block
Number, i are less than u and are preset value, and u, i and Nm are positive integer;Control module for obtaining the difference between Nm and N, and is sentenced
Whether offset value is less than N/2, wherein if difference is less than N/2, controls current production node and continues current block life
It produces;If difference is more than or equal to N/2, controls current production node and stop current block production, and by currently producing node
The whole network broadcast block catenary system is currently at down state;To realize through line node number in monitoring block catenary system
Amount, and situation is upgraded according to line node quantity judgement system, and control block catenary system state according to differentiating, it prevents because of area
The generation of the hard bifurcation of block catenary system caused by the upgrading of block catenary system.
In some embodiments, the device of hard bifurcation is prevented in the block catenary system that the embodiment of the present invention proposes
In, it obtains module 10 and is also used to, when any one node receives new node access request in block catenary system, to new node
Link address monitored to judge whether new node is connected into block catenary system, and when new node is connected into block catenary system into
The broadcast of row the whole network, to produce, node carries out the line node sum of block catenary system plus 1 operates.
In some embodiments, the device of hard bifurcation is prevented in the block catenary system that the embodiment of the present invention proposes
In, it obtains module 10 and is also used to, by being monitored each address of node in block catenary system to judge block catenary system
In whether there is offline node, and there are the whole network broadcast is carried out when any one offline node in block catenary system, to give birth to
It produces node and carries out subtracting 1 operation to the line node sum of block catenary system.
In some embodiments, the device of hard bifurcation is prevented in the block catenary system that the embodiment of the present invention proposes
In, when any one node in block catenary system, which receives block catenary system, is currently at the broadcast of down state, into
Enter dormant state.
It should be noted that the above-mentioned description about the method for preventing hard bifurcation in Fig. 1 in block catenary system
It is equally applicable to prevent the device of hard bifurcation in the block catenary system, this will not be repeated here.
In order to realize above-described embodiment, the embodiment of the present invention also proposed a kind of block catenary system, including above-mentioned block
The device of hard bifurcation is prevented in catenary system.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program
Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention
Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more,
The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces
The form of product.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions
The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs
Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real
The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
It should be noted that in the claims, any reference symbol between parentheses should not be configured to power
The limitation that benefit requires.Word "comprising" does not exclude the presence of component or step not listed in the claims.Before component
Word "a" or "an" does not exclude the presence of multiple such components.The present invention can be by means of including several different components
It hardware and is realized by means of properly programmed computer.In the unit claims listing several devices, these are filled
Several in setting, which can be, to be embodied by the same item of hardware.The use of word first, second, and third is not
Indicate any sequence.These words can be construed to title.
Although preferred embodiments of the present invention have been described, it is created once a person skilled in the art knows basic
Property concept, then additional changes and modifications may be made to these embodiments.So it includes excellent that the following claims are intended to be interpreted as
It selects embodiment and falls into all change and modification of the scope of the invention.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art
Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies
Within, then the present invention is also intended to include these modifications and variations.
In the description of the present invention, it is to be understood that, term " first ", " second " are used for description purposes only, and cannot
It is interpreted as indication or suggestion relative importance or implicitly indicates the quantity of indicated technical characteristic.Define as a result, " the
One ", the feature of " second " can explicitly or implicitly include one or more of the features.In the description of the present invention,
The meaning of " plurality " is two or more, unless otherwise specifically defined.
In the present invention unless specifically defined or limited otherwise, term " installation ", " connected ", " connection ", " fixation " etc.
Term shall be understood in a broad sense, for example, it may be being fixedly connected, may be a detachable connection, or integral;It can be mechanical connect
It connects, is also possible to be electrically connected;It can be directly connected, can also can be in two elements indirectly connected through an intermediary
The interaction relationship of the connection in portion or two elements.It for the ordinary skill in the art, can be according to specific feelings
Condition understands the concrete meaning of above-mentioned term in the present invention.
In the present invention unless specifically defined or limited otherwise, fisrt feature in the second feature " on " or " down " can be with
It is that the first and second features directly contact or the first and second features pass through intermediary mediate contact.Moreover, fisrt feature exists
Second feature " on ", " top " and " above " but fisrt feature be directly above or diagonally above the second feature, or be merely representative of
First feature horizontal height is higher than second feature.Fisrt feature can be under the second feature " below ", " below " and " below "
One feature is directly under or diagonally below the second feature, or is merely representative of first feature horizontal height less than second feature.
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show
The description of example " or " some examples " etc. means specific features, structure, material or spy described in conjunction with this embodiment or example
Point is included at least one embodiment or example of the invention.In the present specification, schematic expression of the above terms are not
It is interpreted as that identical embodiment or example must be directed to.Moreover, particular features, structures, materials, or characteristics described
It may be combined in any suitable manner in any one or more of the embodiments or examples.In addition, without conflicting with each other, this
The technical staff in field can be by the spy of different embodiments or examples described in this specification and different embodiments or examples
Sign is combined.
Although the embodiments of the present invention has been shown and described above, it is to be understood that above-described embodiment is example
Property, it is not considered as limiting the invention, those skilled in the art within the scope of the invention can be to above-mentioned
Embodiment is changed, modifies, replacement and variant.
Claims (10)
1. preventing the method for hard bifurcation in a kind of block catenary system, which comprises the following steps:
Whenever in the block catenary system produce node carry out current block production when, obtain the block catenary system it is current
Line node total number N, and the current block of the production node production is numbered;
The line node sum of block catenary system when by parsing the content of m-th of block to obtain m-th of block production
Nm, wherein m=u-i, u are the number of current block, and i is less than u and is preset value, and u, i and Nm are positive integer;
The difference between Nm and N is obtained, and judges whether the difference is less than N/2;
If the difference is less than N/2, controls current production node and continue current block production;
If the difference is more than or equal to N/2, controls current production node and stop current block production, and by currently producing
Node the whole network broadcasts the block catenary system and is currently at down state.
2. preventing the method for hard bifurcation in block catenary system as described in claim 1, which is characterized in that when described
When any one node receives new node access request in block catenary system, the link address of new node is monitored to sentence
Whether the new node that breaks is connected into the block catenary system, and the whole network is carried out when the new node is connected into the block catenary system
Broadcast, so that the production node carries out the line node sum of the block catenary system to add 1 operation.
3. preventing the method for hard bifurcation in block catenary system as described in claim 1, which is characterized in that also pass through
Each address of node in the block catenary system is monitored to judge in the block catenary system with the presence or absence of offline section
Point, and there are the whole network broadcast is carried out when any one offline node in the block catenary system, so as to the production node pair
The line node sum of the block catenary system carries out subtracting 1 operation.
4. the method for preventing hard bifurcation in block catenary system as claimed in any one of claims 1-3, feature
It is, is currently at down state when any one node in the block catenary system receives the block catenary system
When broadcast, into dormant state.
5. a kind of computer readable storage medium, which is characterized in that be stored thereon in block catenary system and prevent hard bifurcated
The program of phenomenon prevents in the block catenary system when program of hard bifurcation is executed by processor and realizes such as claim
The method of hard bifurcation is prevented in block catenary system described in any one of 1-4.
6. preventing the device of hard bifurcation in a kind of block catenary system characterized by comprising
Module is obtained, for obtaining the block whenever producing node progress current block production in the block catenary system
The current line node sum N of catenary system, and the current block of the production node production is numbered;
Parsing module, block catenary system when for the content by m-th of block of parsing to obtain m-th of block production
Line node sum Nm, wherein m=u-i, u are the number of current block, and i is less than u and is preset value, and u, i and Nm are positive whole
Number;
Control module for obtaining the difference between Nm and N, and judges whether the difference is less than N/2, wherein
If the difference is less than N/2, controls current production node and continue current block production;
If the difference is more than or equal to N/2, controls current production node and stop current block production, and by currently producing
Node the whole network broadcasts the block catenary system and is currently at down state.
7. preventing the device of hard bifurcation in block catenary system as claimed in claim 6, which is characterized in that described to obtain
Modulus block is also used to, when any one node receives new node access request in the block catenary system, to new node
Link address is monitored to judge whether the new node is connected into the block catenary system, and is connected into the new node described
The whole network broadcast is carried out when block catenary system, so that the production node adds the line node sum of the block catenary system
1 operation.
8. preventing the device of hard bifurcation in block catenary system as claimed in claim 6, which is characterized in that described to obtain
Modulus block is also used to, by being monitored each address of node in the block catenary system to judge the block catenary system
In whether there is offline node, and there are carrying out the whole network broadcast when any one offline node in the block catenary system, with
Toilet states production node and carries out subtracting 1 operation to the line node sum of the block catenary system.
9. preventing the device of hard bifurcation, feature in the block catenary system as described in any one of claim 6-8
It is, is currently at down state when any one node in the block catenary system receives the block catenary system
When broadcast, into dormant state.
10. a kind of block catenary system, which is characterized in that including in the block catenary system as described in any one of claim 6-9
Prevent the device of hard bifurcation.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810969344.1A CN109379396B (en) | 2018-08-23 | 2018-08-23 | Method, medium, device and block chain system for preventing hard branching phenomenon in block chain system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810969344.1A CN109379396B (en) | 2018-08-23 | 2018-08-23 | Method, medium, device and block chain system for preventing hard branching phenomenon in block chain system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109379396A true CN109379396A (en) | 2019-02-22 |
CN109379396B CN109379396B (en) | 2021-06-29 |
Family
ID=65404461
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810969344.1A Active CN109379396B (en) | 2018-08-23 | 2018-08-23 | Method, medium, device and block chain system for preventing hard branching phenomenon in block chain system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109379396B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112114852A (en) * | 2020-09-18 | 2020-12-22 | 山大地纬软件股份有限公司 | Block chain link point upgrading system and method for avoiding block chain bifurcation |
CN112256798A (en) * | 2020-11-03 | 2021-01-22 | 公安部第三研究所 | Block chain system and method for realizing decentralized block chain data structure and avoiding data bifurcation based on introduction of space coordinates |
WO2021204181A1 (en) * | 2020-04-09 | 2021-10-14 | 堡垒科技有限公司 | Method and device for preventing forking of blockchain |
CN113672680A (en) * | 2021-07-19 | 2021-11-19 | 哈尔滨工业大学(深圳) | Lightweight probability verification method and device in block chain, block chain node and medium |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP4221068A1 (en) * | 2022-01-31 | 2023-08-02 | Siemens Aktiengesellschaft | System and method for writing and retrieval of data in blockchain |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106878000A (en) * | 2017-03-06 | 2017-06-20 | 中钞***产业发展有限公司北京智能卡技术研究院 | A kind of alliance's chain common recognition method and system |
US20180006807A1 (en) * | 2016-06-29 | 2018-01-04 | Intel Corporation | Energy-efficient bitcoin mining hardware accelerators |
US20180103013A1 (en) * | 2016-10-11 | 2018-04-12 | Fujitsu Limited | Edge server, encryption communication control method thereof, and terminal |
CN108269090A (en) * | 2018-01-19 | 2018-07-10 | 中国科学院软件研究所 | Based on the common recognition method and apparatus for block catenary system drawn lots at random without negotiation |
-
2018
- 2018-08-23 CN CN201810969344.1A patent/CN109379396B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20180006807A1 (en) * | 2016-06-29 | 2018-01-04 | Intel Corporation | Energy-efficient bitcoin mining hardware accelerators |
US20180103013A1 (en) * | 2016-10-11 | 2018-04-12 | Fujitsu Limited | Edge server, encryption communication control method thereof, and terminal |
CN106878000A (en) * | 2017-03-06 | 2017-06-20 | 中钞***产业发展有限公司北京智能卡技术研究院 | A kind of alliance's chain common recognition method and system |
CN108269090A (en) * | 2018-01-19 | 2018-07-10 | 中国科学院软件研究所 | Based on the common recognition method and apparatus for block catenary system drawn lots at random without negotiation |
Non-Patent Citations (1)
Title |
---|
王健: "比特币区块链分叉研究", 《通信技术》 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021204181A1 (en) * | 2020-04-09 | 2021-10-14 | 堡垒科技有限公司 | Method and device for preventing forking of blockchain |
CN112114852A (en) * | 2020-09-18 | 2020-12-22 | 山大地纬软件股份有限公司 | Block chain link point upgrading system and method for avoiding block chain bifurcation |
CN112256798A (en) * | 2020-11-03 | 2021-01-22 | 公安部第三研究所 | Block chain system and method for realizing decentralized block chain data structure and avoiding data bifurcation based on introduction of space coordinates |
CN113672680A (en) * | 2021-07-19 | 2021-11-19 | 哈尔滨工业大学(深圳) | Lightweight probability verification method and device in block chain, block chain node and medium |
Also Published As
Publication number | Publication date |
---|---|
CN109379396B (en) | 2021-06-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109379396A (en) | Method, medium, device and the block catenary system of hard bifurcation are prevented in block catenary system | |
CN109937406B (en) | Method, system and apparatus for dynamically facilitating borderless, high availability system management | |
CN102789529B (en) | Fault prediction method, device, system and equipment | |
CN109639516A (en) | Monitoring method, device, equipment and the storage medium of distributed network system (DNS) | |
CN103221891A (en) | Intelligent interface for a distributed control system | |
CN114584539B (en) | Cloud upgrading method and system for industrial field device | |
CN110430225A (en) | A kind of industrial equipment monitoring and managing method, device, equipment and readable storage medium storing program for executing | |
CN109218408A (en) | Common recognition mechanism implementation method, medium, computer equipment and the block catenary system of block catenary system | |
CN110750343B (en) | Cluster system timing task scheduling control method and cluster system | |
US20060026276A1 (en) | Automatic planning of network configurations | |
CN103078914B (en) | Service providing method and device | |
CN106383770A (en) | Server monitoring management method and server | |
CN104657467A (en) | Data pushing framework with subscription/release for real-time main memory database | |
CN108810157A (en) | The connection method of block chain network, medium, apparatus and system | |
CN114896166A (en) | Scene library construction method and device, electronic equipment and storage medium | |
CN103827831A (en) | Live module diagnostic testing | |
CN102141996A (en) | Data access method and configuration management database system | |
CN112884177A (en) | Communication management system defect order assigning method and device | |
CN110298031A (en) | A kind of Directory Service system and model version consistency allocator | |
CN109981345A (en) | A kind of mapping method of virtual network for distribution communication network fault self-recovery | |
CN104136354A (en) | Elevator group management device | |
CN105515714A (en) | Network upgrading perception protection method | |
CN109327349A (en) | Method for limiting, medium, apparatus and system when block chain account creation | |
CN114880079A (en) | Kubernetes cluster scale adjustment method, system and equipment based on reinforcement learning | |
Bounou et al. | Performance indicators for spare parts and maintenance management: an analytical study |
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 | ||
CP03 | Change of name, title or address | ||
CP03 | Change of name, title or address |
Address after: 361000 B1F-065, Zone A, Huaxun Building, Software Park, Xiamen Torch Hi-tech Zone, Huli District, Xiamen City, Fujian Province Patentee after: Ke'an (Xiamen) Technology Co.,Ltd. Address before: B1f-065, zone a, Huaxun building, software park, torch hi tech Zone, Xiamen City, Fujian Province, 361000 Patentee before: TAILIAN (XIAMEN) TECHNOLOGY Co.,Ltd. |