CN109389502B - consensus method of block chains depending on related chain computing power - Google Patents

consensus method of block chains depending on related chain computing power Download PDF

Info

Publication number
CN109389502B
CN109389502B CN201811165491.XA CN201811165491A CN109389502B CN 109389502 B CN109389502 B CN 109389502B CN 201811165491 A CN201811165491 A CN 201811165491A CN 109389502 B CN109389502 B CN 109389502B
Authority
CN
China
Prior art keywords
transaction
hash value
block
service
chain
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.)
Active
Application number
CN201811165491.XA
Other languages
Chinese (zh)
Other versions
CN109389502A (en
Inventor
林锑杭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lingjing Digital (Beijing) Technology Co.,Ltd.
Original Assignee
Putian City Fire Information Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Putian City Fire Information Technology Co Ltd filed Critical Putian City Fire Information Technology Co Ltd
Priority to CN201811165491.XA priority Critical patent/CN109389502B/en
Publication of CN109389502A publication Critical patent/CN109389502A/en
Application granted granted Critical
Publication of CN109389502B publication Critical patent/CN109389502B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/57Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities

Abstract

the invention discloses a block chain consensus method depending on relative chain computing power, which relates to the field of block chains and comprises the following steps: firstly, receiving at least one group of service data in a first time period of the block chain network, and solving through Hash operation to obtain a first service Hash value matched with the service data; then, according to the first service hash value, generating and announcing a first transaction matched with the first service hash value on a first relevant block chain outside the block chain network; then, regularly detecting whether the first transaction on the first related blockchain is confirmed or not; and in response to the first transaction being confirmed, acquiring transaction record information of the first transaction, and recording the transaction record information on a second block of the local blockchain network. In the invention, the block chain network depends on the computing power of the related block chain, and only the capability of defending the computing power attack of the related block chain is needed to be higher, so that the capability of defending the computing power attack of the block chain is also improved, and the capability of defending the computing power attack of the block chain is improved.

Description

Consensus method of block chains depending on related chain computing power
Technical Field
The invention relates to the field of block chains, in particular to a block chain consensus method attaching to related chain computing power.
background
the non-computing block chain network only carries out Hash solution on a block head containing the Hash value of a previous block to obtain the Hash value of the block, the Hash value is used as a component of a next block head to form a chain type account book structure, each block only carries out one-time Hash value solution, and if the number of the whole blocks is 100 thousands, an ore machine with computing power of 1GH/s for breaking the non-computing block chain network can break the block chain network only in one second.
com data shows that the total calculation power of bitcoin at the end of eight months in this year is 50.13EH/s, the total network difficulty is about 6.73T, and the number of unacknowledged transactions is 1500, i.e., the number of executed hash algorithms per second is 5 × 1016 times. Even if the power of 1 per mill of the block chain network is possessed, the block chain network which is not power can be easily broken.
As blockchain technology evolves, more and more blockchain projects are emerging, and each blockchain project has spacious and mining machines responsible for mining. Then, a major larger blockchain network (e.g., bitcoin, ether house), etc. has been created, which has aggregated more computing resources. Compared with the computing power of a large blockchain network, on one hand, the computing power of a small emerging blockchain item has no defense capability on the large emerging blockchain item, and when the small emerging blockchain item is attacked by the large blockchain network, the small blockchain network is instantly broken down; on the other hand, if more and more small-scale blockchain networks are developed into large-scale blockchain networks, social computing resources are further lost, and waste of power resources and hydraulic resources is caused.
disclosure of Invention
In view of some defects of the prior art, the technical problem to be solved by the present invention is that, in the prior art, initiating a stable blockchain network requires a large amount of computational resources, and there is a possibility of being attacked by the computationally intensive blockchain network and a risk of computational attack. The invention aims to provide a consensus method for a block chain attached with related chain computing power, a block chain network formed based on the consensus method can reduce the possibility of being attacked by computing power without higher computing power infrastructure, and the capability of preventing the falsification of the block chain network data by the computing power attack is improved.
in order to achieve the above object, the present invention provides a consensus method for a blockchain that depends on a correlation chain computation power, the method comprising:
receiving at least one group of service data in a first time period of the block chain network, and solving through Hash operation to obtain a first service Hash value matched with the service data;
Generating and announcing a first transaction matched with the first service hash value on a first relevant block chain outside the block chain network according to the first service hash value; marking the first service hash value as an unconfirmed hash value and writing the unconfirmed hash value into a first block of the block chain network;
detecting whether the first transaction on the first related blockchain is confirmed or not at regular time according to the first service hash value;
In response to the first transaction is confirmed, collecting transaction record information of the first transaction, recording the transaction record information on a second block of the local block chain network, marking the first service hash value as a common identification hash value and writing the common identification hash value into the second block; the transaction record information includes a block number of the first transaction on the first correlation chain.
In a specific embodiment, the receiving at least one set of service data in a first time period of the local blockchain network, and solving by a hash operation to obtain a first service hash value matching the service data, further includes:
Acquiring each service unit of the block chain network received in a first time period; the at least one group of service data is composed of the service units;
Solving the unit hash value of each service unit;
And generating a top hash value of the Mercker tree according to each unit hash value and the Mercker tree algorithm, and taking the top hash value of the Mercker tree as the first service hash value.
In a specific embodiment, the method further comprises: and recording the service unit or the service data in the first block.
In one embodiment, the periodically detecting whether the first transaction on the first associated blockchain is confirmed according to the first service hash value further includes:
Communicating with backbone nodes of at least three different networks on the first associative chain, periodically detecting whether the first transaction of the backbone nodes of at least three different networks is confirmed; the number of the main chain links is odd;
in all of the main chain nodes, if the first transaction is confirmed by more than half of the main chain nodes, the first transaction is considered to be confirmed.
in a specific embodiment, the method further comprises:
after the first transaction is confirmed, collecting the transaction record information of the first transaction;
and in response to the change of the transaction record information of the first transaction, changing the transaction record information on a second block of the local blockchain network into the changed transaction record information of the first transaction.
in a specific embodiment, the method further comprises:
After the first transaction is confirmed, collecting the transaction record information of the first transaction;
responding to the change of the transaction record information of the first transaction, and sending a link data change request to a link internal node of the block link network; after receiving the chain data change request, the chain internal node requests second transaction record information of the first transaction from the main chain node of the first related chain corresponding to the chain internal node, and changes the transaction record information in response to the fact that the second transaction record information is not matched with the original transaction record information.
In a specific embodiment, a plurality of nodes of the local blockchain network are connected to the network of the first relevant chain while being connected to the local blockchain network.
In one embodiment, the previous block hash value of the network block chain is used as an input parameter for solving the next block hash value, and the method further includes:
And in response to the change of the transaction record information of the first transaction, re-solving the second block hash value of the second block, replacing the second block hash value into a block behind the second block, and correspondingly solving a subsequent block hash value.
in an embodiment, before the marking the first service hash value as an unknown hash value is written into the first block of the blockchain network, the method further includes:
Writing the first service hash value into a first hash list; the first hash list is used for storing the service hash value matched with all the service data which are not identified together in the block chain network.
In a specific embodiment, the method further comprises:
And writing the first service hash value matched with all the identified service data into a second hash list.
the invention has the beneficial effects that: the block chain network is attached to another related block chain network, the hash value of the service data of the block is recorded on the related block chain in a transaction form, and after the transaction is confirmed, the node of the block chain network writes the transaction information of the service into the block chain after receiving the information that the transaction is confirmed, so that the service data is confirmed, and common identification is realized; the block chain network depends on the computing power of the related block chain, and only the defense computing power attack capability of the related block chain is required to be higher, so that the defense computing power attack capability of the block chain is improved, and the defense computing power attack capability of the block chain is improved. In addition, the block chain technology provided by the invention does not need to build a calculation force foundation by a self network, thereby saving social cost.
Drawings
FIG. 1 is a flow chart illustrating a block chain consensus method for attaching correlation chain computing power according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of data transmission of a block chain consensus method for attaching correlation chain computing power according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating a Mercker tree-based generation of service hash values for a block chain consensus method of attaching correlation chain computing power according to an embodiment of the present invention;
fig. 4 is a diagram of an association structure between a first association chain network and a local blockchain network according to an embodiment of the present invention;
Fig. 5 is a schematic diagram of data transmission during block data change in a block chain consensus method of attaching correlation chain computing power according to an embodiment of the present invention.
Fig. 6 is a block diagram of a consensus device for a blockchain of dependent link power according to an embodiment of the present invention.
Detailed Description
the invention is further illustrated by the following examples in conjunction with the accompanying drawings:
in a first embodiment of the present invention, as shown in fig. 1-5, a consensus method for attaching a blockchain of related chain computing power is provided, the method comprising:
Step S1, receiving at least one group of service data in a first time period of the block chain network, and solving through Hash operation to obtain a first service Hash value matched with the service data;
It is worth mentioning that the generation of the first service hash value may be to perform hash operation on one or more groups of service data as a whole; the first service hash value may also be generated by performing hash operation on each service data in a merkel tree form, and then generating two superior hash values in pairs until a merkel tree top hash value is solved, where the merkel tree top hash value is the first service hash value;
in this embodiment, the length of the first time period of the local blockchain network is not limited, and optionally, the first time period is a block generation period of the local blockchain network; optionally, the first time period is independent of a block generation period of the blockchain network.
Step S2, according to the first service hash value, generating and announcing a first transaction matched with the first service hash value on a first relevant block chain outside the block chain network; marking the first service hash value as an unconfirmed hash value and writing the unconfirmed hash value into a first block of the block chain network;
In the embodiment, a plurality of or all service data in a first time period are packed as a whole into a hash value and issued in a transaction form on a first correlation chain; it should be noted that the first time period is unrelated to the block generation period of the first correlation chain, in this embodiment, only the first transaction needs to be issued to the first correlation chain, and the confirmation time of the transaction is related to the setting of the first correlation chain itself, so that the block chain network only needs to wait for the confirmation of the transaction. For example, in a bitcoin network, a bitcoin transaction is initiated, which can be accounted and confirmed by absenteeism in the bitcoin network after waiting a certain amount of time, and written into the blockchain.
Step S3, detecting whether the first transaction on the first relevant blockchain is confirmed at regular time according to the first service hash value;
Optionally, a plurality of nodes of the local blockchain network may perform data monitoring on the first relevant chain, so as to obtain information on whether the first transaction is confirmed; optionally, a plurality of nodes of the local blockchain network are connected to the local blockchain network and also connected to the first related chain network;
The first initiator of the first transaction receives the confirmation information of the first transaction relatively timely. Optionally, receiving first confirmation information that a first initiator of the first transaction is confirmed about the first transaction; the first initiator is connected with a local block network, and the first initiator is connected with a first related chain network;
step S4, in response to the first transaction is confirmed, collecting transaction record information of the first transaction, recording the transaction record information on a second block of the local blockchain network, marking the first service hash value as a consensus hash value, and writing the consensus hash value into the second block; the transaction record information includes a block number of the first transaction on the first correlation chain.
The present embodiment provides a block chain consensus technique, wherein when the hash value of the related service data is confirmed on the first related chain, the related service data is considered to be not easily tampered and be known. Meanwhile, after the first transaction is confirmed, the related transaction information, such as the first service hash value of the service data, may be confirmed in which block of the block chain.
In practical application, the number of the service data packed at one time is set according to the number of the service data of the block chain, transaction handling fee and the throughput capacity of the first related chain network; it is worth mentioning that when a higher single service data packing amount is set, the commission fee for issuing the first transaction on the first related block chain can be reduced, and the load of the first related block chain is reduced, and on the other hand, when the single service data packing amount is less, the transaction confirmation speed can be effectively improved.
In this embodiment, the receiving at least one group of service data in a first time period of the local blockchain network, and solving through a hash operation to obtain a first service hash value matching the service data, further includes:
acquiring each service unit of the block chain network received in a first time period; the at least one group of service data is composed of the service units;
Solving the unit hash value of each service unit;
and generating a top hash value of the Mercker tree according to each unit hash value and the Mercker tree algorithm, and taking the top hash value of the Mercker tree as the first service hash value.
it is worth mentioning that when the hash value of a certain layer of the merkel tree is odd, a single hash value that cannot be paired two by two can solve the hash on itself to obtain the hash value of the previous layer.
In this embodiment, optionally, the method further includes: and recording the service unit or the service data in the first block.
alternatively, the service unit or the service data may be written into the block of the local blockchain network.
In this embodiment, the periodically detecting whether the first transaction on the first relevant blockchain is confirmed according to the first service hash value further includes:
communicating with backbone nodes of at least three different networks on the first associative chain, periodically detecting whether the first transaction of the backbone nodes of at least three different networks is confirmed; the number of the main chain links is odd;
in all of the main chain nodes, if the first transaction is confirmed by more than half of the main chain nodes, the first transaction is considered to be confirmed.
By setting different main chain nodes, connection with a single main chain node is avoided, the first transaction confirmation of the block chain network is determined by the main chain node, and when the node is broken, the data of the block chain is not credible. Meanwhile, by the adoption of the plurality of main chain nodes, data of different main chain nodes can be compared in time, transaction results confirmed by more nodes can be selected, the phenomenon that main chain branches cannot be found early due to a single main chain node is avoided, and the influence of first related chain branches on the block chain network is reduced.
in a practical application scenario, the main chain node of the first related chain may be set at different mines. Because the same mine field generally excavates the ore collectively, and the time delay of dredging the network is few, and the data in the mine field is relatively unanimous, so can select the different main chain nodes of different mine fields in order to obtain the transaction record information of first transaction.
In this embodiment, optionally, the method further includes:
After the first transaction is confirmed, collecting the transaction record information of the first transaction;
And in response to the change of the transaction record information of the first transaction, changing the transaction record information on a second block of the local blockchain network into the changed transaction record information of the first transaction.
inevitably, the divergence of the first related link may cause the network data of the local block link to need backtracking change, and at this time, the related transaction record information of the first transaction is changed. If the block chain network employs chain-connected blocks, hash operations need to be performed on all blocks after the changed block, and the data of each block needs to be determined again.
in this embodiment, optionally, the method further includes:
after the first transaction is confirmed, collecting the transaction record information of the first transaction;
Responding to the change of the transaction record information of the first transaction, and sending a link data change request to a link internal node of the block link network; after receiving the chain data change request, the chain internal node requests second transaction record information of the first transaction from the main chain node of the first related chain corresponding to the chain internal node, and changes the transaction record information in response to the fact that the second transaction record information is not matched with the original transaction record information.
It is worth mentioning that in the algorithm-based block chain technique, such as bitcoin blocks, which are generated by miners performing mathematical operations continuously, each block must refer to a block thereon, so that the longest chain is also the most difficult to overturn and tamper, and therefore, the node always considers that the longest chain is the valid block chain, and only miners who dig mines on the longest chain can obtain rewards, which is the most common bitcoin longest chain principle. When two or more nodes account at almost the same time, bifurcation occurs, at this time, two accounting modes are temporarily reserved, and finally, a longer chain block is used as a final accounting book.
In an alternative embodiment, when the first correlation chain has a bifurcation and the node of the local blockchain network performs billing according to whether the first transaction is confirmed, the node follows one of the bifurcations, and if the transaction record information of the first transaction of the local blockchain network changes due to the fact that the first correlation chain selects another bifurcation, the node can modify the transaction record information and correspondingly modify the local blockchain.
It should be noted that, when the blocks of the local block chain are connected in a chain manner, that is, when the hash value of the previous block is stored in the next block, the hash value of the block needs to be solved again in response to the change of the first transaction record information, and the hash value after the change is modified at the same time, it is worth mentioning that, for example, the bitcoin network needs 6 times of confirmation to ensure that the data of the block chain is not tampered, so that only the chain connection between the blocks of the local block chain network within 6 block periods of the first related chain needs to be modified, and the computational requirement is not high.
in this embodiment, optionally, a plurality of nodes of the local blockchain network are connected to the network of the first relevant chain while being connected to the local blockchain network.
Based on the data information, the data information related to the first transaction can be rapidly provided for the local blockchain network.
in a typical blockchain example, the previous blockhash value of the network blockchain is used as an input parameter for solving the next blockhash value, so as to solve the next blockhash value.
In this embodiment, optionally, the previous hash value of the network block chain is used as an input parameter for solving the next hash value, and the method further includes:
and in response to the change of the transaction record information of the first transaction, re-solving the second block hash value of the second block, replacing the second block hash value into a block behind the second block, and correspondingly solving a subsequent block hash value.
in this embodiment, optionally, before the step of marking the first service hash value as the non-consensus hash value and writing the first service hash value into the first block of the blockchain network, the method further includes:
writing the first service hash value into a first hash list; the first hash list is used for storing the service hash value matched with all the service data which are not identified together in the block chain network.
By setting the first hash list, the service hash value which is not commonly known is convenient to be consulted.
In this embodiment, optionally, the method further includes:
And writing the first service hash value matched with all the identified service data into a second hash list.
and the second hash list is arranged, so that the service hash value which is known commonly can be consulted conveniently.
it should be noted that, as shown in fig. 2, after the completion of the blockchain XGL1000 of the first correlation chain network 200, in a time period, the service data initiated by the client of the blockchain network 100 is collected, and a service hash value 1 is generated, and a first transaction 1 is generated on the first correlation chain network 200; and further initiates a first transaction 2, a first transaction 3 on the first correlation link network 200; moreover, the first transaction 1 and the second transaction 2 are confirmed on the block XGL1001 of the first related link network 200, the block is monitored to obtain the transaction record 2, and the transaction record information of the first transaction 1 and the first transaction 2 is reported to be recorded on the block BQKL1001-1 of the block link network 100, that is, the common identification of the service hash value 1 and the service hash value 2 is completed.
As shown in fig. 3, the service data 1-7 are paired pairwise to generate a first-level service hash value, and finally form a first service hash value.
As in fig. 4, there are two common nodes for the present blockchain network 100 and the first correlation chain network 200.
as shown in fig. 5, the first correlation chain in the graph has a bifurcation, and the block chain network adopts the accounting result of the upper half graph when recording the service data for the first time, and then changes to the accounting result of the lower graph due to the bifurcation and recognization of the first correlation chain. First, the blocky XGL1001 of the first associative chain is altered and the confirmation of the original first transaction 3 occurs from within blocky XGL1001 to within blocky XGL 1002. Accordingly, the original transaction record information 2, the block BQKL1001-1 and the block BQKL1001-2 in the blockchain network are modified accordingly, and the nodes of the blockchain network modify the information accordingly. It should be noted that the reason why the other subsequent blocks are not modified is that the original block does not record the information, and the subsequent records are new data.
In a second embodiment of the present invention, as shown in fig. 6, there is provided an apparatus for learning knowledge about a blockchain of a correlation link algorithm, the apparatus comprising:
The service hash acquisition module 101 is configured to receive at least one set of service data in a first time period of the local blockchain network, and solve through hash operation to obtain a first service hash value matched with the service data;
It is worth mentioning that the generation of the first service hash value may be to perform hash operation on one or more groups of service data as a whole; the first service hash value may also be generated by performing hash operation on each service data in a merkel tree form, and then generating two superior hash values in pairs until a merkel tree top hash value is solved, where the merkel tree top hash value is the first service hash value;
in this embodiment, the length of the first time period of the local blockchain network is not limited, and optionally, the first time period is a block generation period of the local blockchain network; optionally, the first time period is independent of a block generation period of the blockchain network.
the main chain transaction generating and recording module 102 is configured to generate and announce a first transaction matching the first service hash value on a first relevant blockchain outside the blockchain network according to the first service hash value; marking the first service hash value as an unconfirmed hash value and writing the unconfirmed hash value into a first block of the block chain network;
In the embodiment, a plurality of or all service data in a first time period are packed as a whole into a hash value and issued in a transaction form on a first correlation chain; it should be noted that the first time period is unrelated to the block generation period of the first correlation chain, in this embodiment, only the first transaction needs to be issued to the first correlation chain, and the confirmation time of the transaction is related to the setting of the first correlation chain itself, so that the block chain network only needs to wait for the confirmation of the transaction. For example, in a bitcoin network, a bitcoin transaction is initiated, which can be accounted and confirmed by absenteeism in the bitcoin network after waiting a certain amount of time, and written into the blockchain.
a main chain transaction monitoring module 103, configured to detect whether the first transaction on the first relevant blockchain is confirmed at regular time according to the first service hash value;
Optionally, a plurality of nodes of the local blockchain network may perform data monitoring on the first relevant chain, so as to obtain information on whether the first transaction is confirmed; optionally, a plurality of nodes of the local blockchain network are connected to the local blockchain network and also connected to the first related chain network;
the first initiator of the first transaction receives the confirmation information of the first transaction relatively timely. Optionally, receiving first confirmation information that a first initiator of the first transaction is confirmed about the first transaction; the first initiator is connected with a local block network, and the first initiator is connected with a first related chain network;
A second block recording module 104, configured to collect transaction record information of the first transaction in response to that the first transaction is confirmed, record the transaction record information on a second block of the local blockchain network, mark the first service hash value as a consensus hash value, and write the consensus hash value into the second block; the transaction record information includes a block number of the first transaction on the first correlation chain.
the present embodiment provides a block chain consensus technique, wherein when the hash value of the related service data is confirmed on the first related chain, the related service data is considered to be not easily tampered and be known. Meanwhile, after the first transaction is confirmed, the related transaction information, such as the first service hash value of the service data, may be confirmed in which block of the block chain.
in practical application, the number of the service data packed at one time is set according to the number of the service data of the block chain, transaction handling fee and the throughput capacity of the first related chain network; it is worth mentioning that when a higher single service data packing amount is set, the commission fee for issuing the first transaction on the first related block chain can be reduced, and the load of the first related block chain is reduced, and on the other hand, when the single service data packing amount is less, the transaction confirmation speed can be effectively improved.
In this embodiment, optionally, the service hash obtaining module 101 further includes:
The sub-service receiving unit is used for acquiring each service unit of the block chain network received in a first time period; the at least one group of service data is composed of the service units;
the sub-hash value solving unit is used for solving the unit hash value of each service unit;
And the service hash solving unit is used for generating a top hash value of the Mercker tree according to each unit hash value and the Mercker tree algorithm, and taking the top hash value of the Mercker tree as the first service hash value.
It is worth mentioning that when the hash value of a certain layer of the merkel tree is odd, a single hash value that cannot be paired two by two can solve the hash on itself to obtain the hash value of the previous layer.
alternatively, the service unit or the service data may be written into the block of the local blockchain network.
In this embodiment, optionally, the apparatus further includes: a first block recording module 105, configured to record the service unit or the service data in the first block.
optionally, the local blockchain network monitors a main chain node of the first opposite chain so as to obtain confirmation information of the first transaction or change of transaction record information.
In this embodiment, optionally, the main chain transaction monitoring module 103 further includes:
A multi-node transaction confirmation unit for communicating with the main chain nodes of at least three different networks on the first correlation chain, and regularly detecting whether the first transaction of the main chain nodes of at least three different networks is confirmed; the number of the main chain links is odd;
A multi-node transaction consensus unit, configured to consider the first transaction as confirmed if the first transaction is confirmed by more than half of the main-chain nodes in all the main-chain nodes.
by setting different main chain nodes, connection with a single main chain node is avoided, the first transaction confirmation of the block chain network is determined by the main chain node, and when the node is broken, the data of the block chain is not credible. Meanwhile, by the adoption of the plurality of main chain nodes, data of different main chain nodes can be compared in time, transaction results confirmed by more nodes can be selected, the phenomenon that main chain branches cannot be found early due to a single main chain node is avoided, and the influence of first related chain branches on the block chain network is reduced.
in a practical application scenario, the main chain node of the first related chain may be set at different mines. Because the same mine field generally excavates the ore collectively, and the time delay of dredging the network is few, and the data in the mine field is relatively unanimous, so can select the different main chain nodes of different mine fields in order to obtain the transaction record information of first transaction.
in this embodiment, optionally, the apparatus further includes:
A transaction record collecting module 109, configured to collect the transaction record information of the first transaction after the first transaction is confirmed;
A first transaction record changing module 110, configured to change, in response to that the transaction record information of the first transaction is changed, the transaction record information on the second block of the local blockchain network to the changed transaction record information of the first transaction.
inevitably, the divergence of the first related link may cause the network data of the local block link to need backtracking change, and at this time, the related transaction record information of the first transaction is changed. If the block chain network employs chain-connected blocks, hash operations need to be performed on all blocks after the changed block, and the data of each block needs to be determined again.
In this embodiment, optionally, the apparatus further includes:
A transaction record collecting module 109, configured to collect the transaction record information of the first transaction after the first transaction is confirmed;
a second transaction record changing module 111, configured to send a link data change request to a link internal node of the local block link network in response to that the transaction record information of the first transaction is changed; after receiving the chain data change request, the chain internal node requests second transaction record information of the first transaction from the main chain node of the first related chain corresponding to the chain internal node, and changes the transaction record information in response to the fact that the second transaction record information is not matched with the original transaction record information.
it is worth mentioning that in the algorithm-based block chain technique, such as bitcoin blocks, which are generated by miners performing mathematical operations continuously, each block must refer to a block thereon, so that the longest chain is also the most difficult to overturn and tamper, and therefore, the node always considers that the longest chain is the valid block chain, and only miners who dig mines on the longest chain can obtain rewards, which is the most common bitcoin longest chain principle. When two or more nodes account at almost the same time, bifurcation occurs, at this time, two accounting modes are temporarily reserved, and finally, a longer chain block is used as a final accounting book.
In an alternative embodiment, when the first correlation chain has a bifurcation and the node of the local blockchain network performs billing according to whether the first transaction is confirmed, the node follows one of the bifurcations, and if the transaction record information of the first transaction of the local blockchain network changes due to the fact that the first correlation chain selects another bifurcation, the node can modify the transaction record information and correspondingly modify the local blockchain.
It should be noted that, when the blocks of the local block chain are connected in a chain manner, that is, when the hash value of the previous block is stored in the next block, the hash value of the block needs to be solved again in response to the change of the first transaction record information, and the hash value after the change is modified at the same time, it is worth mentioning that, for example, the bitcoin network needs 6 times of confirmation to ensure that the data of the block chain is not tampered, so that only the chain connection between the blocks of the local block chain network within 6 block periods of the first related chain needs to be modified, and the computational requirement is not high.
in this embodiment, optionally, a plurality of nodes of the local blockchain network are connected to the network of the first relevant chain while being connected to the local blockchain network.
Based on the data information, the data information related to the first transaction can be rapidly provided for the local blockchain network.
in a typical blockchain example, the previous blockhash value of the network blockchain is used as an input parameter for solving the next blockhash value, so as to solve the next blockhash value.
in this embodiment, optionally, the apparatus further includes: the block data modification module 106 is configured to re-solve the second block hash value of the second block in response to the change of the transaction record information of the first transaction, replace the second block hash value into a block after the second block, and correspondingly solve a subsequent block hash value.
In this embodiment, optionally, the apparatus further includes:
A first hash list management module 107, configured to write the first service hash value into a first hash list; the first hash list is used for storing the service hash value matched with all the service data which are not identified together in the block chain network.
By setting the first hash list, the service hash value which is not commonly known is convenient to be consulted.
In this embodiment, optionally, the apparatus further includes:
and the second hash list management module 108 is configured to write the first service hash value matching all the identified service data into a second hash list.
And the second hash list is arranged, so that the service hash value which is known commonly can be consulted conveniently.
the foregoing detailed description of the preferred embodiments of the invention has been presented. It should be understood that numerous modifications and variations could be devised by those skilled in the art in light of the present teachings without departing from the inventive concepts. Therefore, the technical solutions available to those skilled in the art through logic analysis, reasoning and limited experiments based on the prior art according to the concept of the present invention should be within the scope of protection defined by the claims.

Claims (10)

1. A method for consensus on a blockchain of correlation-link algorithms, the method comprising:
receiving at least one group of service data in a first time period of the block chain network, and solving through Hash operation to obtain a first service Hash value matched with the service data;
Generating and announcing a first transaction matched with the first service hash value on a first relevant block chain outside the block chain network according to the first service hash value; marking the first service hash value as an unconfirmed hash value and writing the unconfirmed hash value into a first block of the block chain network;
Detecting whether the first transaction on the first related blockchain is confirmed or not at regular time according to the first service hash value;
In response to the first transaction is confirmed, collecting transaction record information of the first transaction, recording the transaction record information on a second block of the local block chain network, marking the first service hash value as a common identification hash value and writing the common identification hash value into the second block; the transaction record information includes a block number of the first transaction on the first correlation chain.
2. the method as claimed in claim 1, wherein the receiving at least one set of service data in a first time period of the local blockchain network, and performing hash solving to obtain a first service hash value matching the service data, further comprises:
acquiring each service unit of the block chain network received in a first time period; the at least one group of service data is composed of the service units;
solving the unit hash value of each service unit;
And generating a top hash value of the Mercker tree according to each unit hash value and the Mercker tree algorithm, and taking the top hash value of the Mercker tree as the first service hash value.
3. The method of claim 2, wherein the method further comprises: and recording the service unit or the service data in the first block.
4. The method as claimed in claim 1, wherein the step of periodically detecting whether the first transaction on the first associated blockchain is acknowledged according to the first service hash value further comprises:
Communicating with backbone nodes of at least three different networks on the first associative chain, periodically detecting whether the first transaction of the backbone nodes of at least three different networks is confirmed; the number of the main chain links is odd;
in all of the main chain nodes, if the first transaction is confirmed by more than half of the main chain nodes, the first transaction is considered to be confirmed.
5. The method of claim 1, wherein the method further comprises:
After the first transaction is confirmed, collecting the transaction record information of the first transaction;
And in response to the change of the transaction record information of the first transaction, changing the transaction record information on a second block of the local blockchain network into the changed transaction record information of the first transaction.
6. the method of claim 1, wherein the method further comprises:
after the first transaction is confirmed, collecting the transaction record information of the first transaction;
Responding to the change of the transaction record information of the first transaction, and sending a link data change request to a link internal node of the block link network; after receiving the chain data change request, the chain internal node requests second transaction record information of the first transaction from the main chain node of the first related chain corresponding to the chain internal node, and changes the transaction record information in response to the fact that the second transaction record information is not matched with the original transaction record information.
7. the method as claimed in claim 1, wherein the plurality of nodes of the local blockchain network are connected to the network of the first correlation chain at the same time as the local blockchain network.
8. the method as claimed in claim 6 or 7, wherein the previous hash value of the network blockchain is used as an input parameter for solving the next hash value, and the method further comprises:
And in response to the change of the transaction record information of the first transaction, re-solving the second block hash value of the second block, replacing the second block hash value into a block behind the second block, and correspondingly solving a subsequent block hash value.
9. the method as claimed in claim 1, wherein before the step of marking the first service hash value as an unrecognized hash value to be written into the first block of the local blockchain network, the method further comprises:
writing the first service hash value into a first hash list; the first hash list is used for storing the service hash value matched with all the service data which are not identified together in the block chain network.
10. The method of claim 9, wherein the method further comprises:
and writing the first service hash value matched with all the identified service data into a second hash list.
CN201811165491.XA 2018-10-08 2018-10-08 consensus method of block chains depending on related chain computing power Active CN109389502B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811165491.XA CN109389502B (en) 2018-10-08 2018-10-08 consensus method of block chains depending on related chain computing power

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811165491.XA CN109389502B (en) 2018-10-08 2018-10-08 consensus method of block chains depending on related chain computing power

Publications (2)

Publication Number Publication Date
CN109389502A CN109389502A (en) 2019-02-26
CN109389502B true CN109389502B (en) 2019-12-06

Family

ID=65419274

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811165491.XA Active CN109389502B (en) 2018-10-08 2018-10-08 consensus method of block chains depending on related chain computing power

Country Status (1)

Country Link
CN (1) CN109389502B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2019207310A1 (en) * 2019-04-26 2020-11-12 Advanced New Technologies Co., Ltd. Anti-replay attack authentication protocol
CN112036874A (en) * 2019-06-03 2020-12-04 厦门本能管家科技有限公司 Method and system for avoiding garbage transaction for block chain
JP7215581B2 (en) * 2019-07-02 2023-01-31 株式会社デンソー Supply chain management method, supply chain management program, transaction record accumulation method, transaction record accumulation program, transaction record display method, and transaction record display program
CN110599174B (en) * 2019-09-20 2023-11-24 腾讯科技(深圳)有限公司 Block chain information processing method and related equipment
CN111127017B (en) * 2019-12-27 2022-11-08 四川星际荣威科技有限公司 Block chain full-fragmentation method and device based on P2P storage network and multilayer architecture
CN111598567B (en) * 2020-05-07 2023-11-10 深圳创客区块链技术有限公司 Method, device and storage medium for preventing blockchain powerful attack
CN111538791B (en) * 2020-05-07 2023-09-22 深圳创客区块链技术有限公司 Block chain multiple-cross-chain mutual protection method, device and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107423961A (en) * 2017-07-11 2017-12-01 北京泛融科技有限公司 A kind of optimization common recognition method based on random correlation analysis
CN108009824A (en) * 2017-11-28 2018-05-08 北京博晨技术有限公司 Data common recognition method, apparatus and electronic equipment
CN108492103A (en) * 2018-02-07 2018-09-04 北京大学深圳研究生院 A kind of alliance's block chain common recognition method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180240191A1 (en) * 2017-02-03 2018-08-23 Terry Aronson System and Method for asset backed crypto-currency
CN107886388B (en) * 2017-09-22 2020-11-03 杭州云象网络技术有限公司 Transportation credit and safety service platform for realizing polycentricity based on alliance chain and operation method thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107423961A (en) * 2017-07-11 2017-12-01 北京泛融科技有限公司 A kind of optimization common recognition method based on random correlation analysis
CN108009824A (en) * 2017-11-28 2018-05-08 北京博晨技术有限公司 Data common recognition method, apparatus and electronic equipment
CN108492103A (en) * 2018-02-07 2018-09-04 北京大学深圳研究生院 A kind of alliance's block chain common recognition method

Also Published As

Publication number Publication date
CN109389502A (en) 2019-02-26

Similar Documents

Publication Publication Date Title
CN109389502B (en) consensus method of block chains depending on related chain computing power
CN109361661B (en) Block chain consensus device depending on related chain computing power
CN109214817B (en) Block chain consensus device based on computational power parasitism
CN108829350A (en) Data migration method and device based on block chain
CN107301536A (en) Resource transfers method and device
CN106294644B (en) A kind of magnanimity time series data collection and treatment device and method based on big data technology
CN110011974A (en) Bookkeeping methods, device, terminal and the computer readable storage medium of block chain
CN109218348A (en) The determination method and node device of block in a kind of block chain
CN107579814A (en) Device, computing chip, the digging ore deposit machine of the computational methods of proof of work
CN104063293A (en) Data backup method and streaming computing system
Cole et al. Modeling the energy consumption of blockchain consensus algorithms
CN105677691A (en) Massive streaming data real-time processing method and device and application system thereof
CN109255057A (en) Block generation method, device, equipment and storage medium
CN113132392B (en) Industrial control network flow abnormity detection method, device and system
CN105138650A (en) Hadoop data cleaning method and system based on outlier mining
CN105743699A (en) Fault early warning method and system for virtual environment
CN110363663A (en) Batch data processing method, device, equipment and storage medium based on block chain
CN109410055B (en) Block chain consensus method based on computational power parasitism
CN113536054A (en) Business monitoring method, device, equipment and storage medium based on graph data
CN106650496A (en) Data processing method and device
CN112288566B (en) Cross-chain transaction anomaly detection and early warning method and system based on deep neural network
CN111988321B (en) Alliance chain abnormity detection system based on machine learning and detection method thereof
Liu et al. Using blockchain technology in IoT manufacture environment for intelligence prediction
CN101634939B (en) Fast addressing device and method thereof
CN107204856B (en) A kind of method and device detecting elliptic curve loophole

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
TR01 Transfer of patent right

Effective date of registration: 20210319

Address after: Room 1a201 and 1g201, No.12, Gaoxin 2nd Road, Zhangba Street office, Gaoxin District, Xi'an City, Shaanxi Province, 710065

Patentee after: XI'AN ZHIGUI INTERNET TECHNOLOGY Co.,Ltd.

Address before: 351139 Hualin Industrial Park, Xiagao village, Huating Town, Chengxiang District, Putian City, Fujian Province

Patentee before: PUTIAN ZHUHUO INFORMATION TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20231204

Address after: 101318 Building 6-185, Ronghuiyuan, Lingkong Economic Core Zone, Shunyi District, Beijing

Patentee after: Lingjing Digital (Beijing) Technology Co.,Ltd.

Address before: Room 1a201 and 1g201, No.12, Gaoxin 2nd Road, Zhangba Street office, Gaoxin District, Xi'an City, Shaanxi Province, 710065

Patentee before: XI'AN ZHIGUI INTERNET TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right