CN109361661B - Block chain consensus device depending on related chain computing power - Google Patents

Block chain consensus device depending on related chain computing power Download PDF

Info

Publication number
CN109361661B
CN109361661B CN201811165471.2A CN201811165471A CN109361661B CN 109361661 B CN109361661 B CN 109361661B CN 201811165471 A CN201811165471 A CN 201811165471A CN 109361661 B CN109361661 B CN 109361661B
Authority
CN
China
Prior art keywords
transaction
block
chain
hash value
service
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
CN201811165471.2A
Other languages
Chinese (zh)
Other versions
CN109361661A (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.)
XI'AN ZHIGUI INTERNET TECHNOLOGY Co.,Ltd.
Original Assignee
Putian Zhuhuo 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 Zhuhuo Information Technology Co ltd filed Critical Putian Zhuhuo Information Technology Co ltd
Priority to CN201811165471.2A priority Critical patent/CN109361661B/en
Publication of CN109361661A publication Critical patent/CN109361661A/en
Application granted granted Critical
Publication of CN109361661B publication Critical patent/CN109361661B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • H04L63/123Applying verification of the received information received data contents, e.g. message integrity
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/04Payment circuits
    • G06Q20/06Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme
    • G06Q20/065Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme using e-cash
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Computer Security & Cryptography (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Theoretical Computer Science (AREA)
  • Strategic Management (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Economics (AREA)
  • Power Engineering (AREA)
  • Marketing (AREA)
  • Development Economics (AREA)
  • Technology Law (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Storage Device Security (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a block chain consensus device depending on related chain computing power, which relates to the field of block chains and comprises the following components: the service hash acquisition module is used for carrying out hash solution on the service data to obtain a first service hash value; the main chain transaction generation and recording module is used for generating a first transaction on a first related block chain according to the first service hash value; the main chain transaction monitoring module is used for detecting whether the first transaction is confirmed or not at regular time; and the second block recording module is used for recording transaction recording information on a second block of the block chain network in response to the first transaction being confirmed, marking the first service hash value as a known hash value and writing the common hash value into the second block. 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

Block chain consensus device depending on related chain computing power
Technical Field
The invention relates to the field of block chains, in particular to a block chain consensus device depending on 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 Bibi at the end of eight months of this year is 50.13EH/s, the total difficulty of the network is about 6.73T, and the number of unacknowledged transactions is 1500, i.e. the number of hash algorithms executable per second is 5 × 1016Next, the process is carried out. 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 device of a block chain attached with related chain computing power, a block chain network formed based on the consensus device can reduce the possibility of being attacked by computing power without higher computing power infrastructure, and the capability of preventing the falsification of the data of the block chain network by the computing power attack is improved.
To achieve the above object, the present invention provides a consensus device for a blockchain that depends on a correlation chain algorithm, the device comprising:
the system comprises a service hash acquisition module, a service hash acquisition module and a service hash acquisition module, wherein the service hash acquisition module is used for receiving at least one group of service data in a first time period of the block chain network and solving through hash operation to acquire a first service hash value matched with the service data;
the main chain transaction generating and recording module is used for 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;
the main chain transaction monitoring module is used for detecting whether the first transaction on the first related block chain is confirmed or not at regular time according to the first service hash value;
the second block recording module is used for collecting the transaction record information of the first transaction in response to the first transaction is confirmed, recording the transaction record information on a second block of the block chain 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.
In a specific embodiment, the service hash obtaining module 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.
In a specific embodiment, the apparatus further comprises: a first block recording module, configured to record the service unit or the service data in the first block.
In one embodiment, the main-chain transaction monitoring module 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.
In a specific embodiment, the apparatus further comprises:
the transaction record acquisition module is used for acquiring the transaction record information of the first transaction after the first transaction is confirmed;
and the first transaction record changing module is used for changing the transaction record information on the second block of the local block chain network into the changed transaction record information of the first transaction in response to the change of the transaction record information of the first transaction.
In a specific embodiment, the apparatus further comprises:
the transaction record acquisition module is used for acquiring the transaction record information of the first transaction after the first transaction is confirmed;
the second transaction record changing module is used for responding to the change of the transaction record information of the first transaction and sending a link data changing 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 a specific embodiment, the apparatus further comprises:
and the block data modification module is used for responding 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 the subsequent block hash value.
In a specific embodiment, the apparatus further comprises:
the first hash list management module is used for 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 apparatus further comprises:
and the second hash list management module is used for 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 block XG L1000 of the first related link network 200, in a time period, the service data initiated by the client of the local block link network 100 is collected, and a service hash value 1 is generated, and a first transaction 1 is generated on the first related link network 200, and further a first transaction 2 and a first transaction 3 are initiated on the first related link network 200, and the first transaction 1 and the second transaction 2 are confirmed on the block XG L1001 of the first related link network 200, and 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 recorded on the block BQK L1001-1 of the local 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.
First, the block XG L1001 of the first correlation chain is changed, and the confirmation of the original first transaction 3 occurs from the block XG L1001 to the block XG L1002, and accordingly, the transaction record information 2, the block BQK L1001-1 and the block BQK L1001-2 in the original blockchain network are modified accordingly, and at this time, the nodes of the blockchain network modify the information.
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. An apparatus for learning from a blockchain of related chain computing power, the apparatus comprising:
the system comprises a service hash acquisition module, a service hash acquisition module and a service hash acquisition module, wherein the service hash acquisition module is used for receiving at least one group of service data in a first time period of the block chain network and solving through hash operation to acquire a first service hash value matched with the service data;
the main chain transaction generating and recording module is used for 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;
the main chain transaction monitoring module is used for detecting whether the first transaction on the first related block chain is confirmed or not at regular time according to the first service hash value;
the second block recording module is used for collecting the transaction record information of the first transaction in response to the first transaction is confirmed, recording the transaction record information on a second block of the block chain 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 associated blockchain.
2. The apparatus for learning knowledge about blockchains depending on associative link power of claim 1, wherein the service hash obtaining module further comprises:
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.
3. The apparatus for learning knowledge about blockchains depending on the associated chain computing power of claim 2, wherein the apparatus further comprises: a first block recording module, configured to record the service unit or the service data in the first block.
4. The apparatus of claim 1, wherein the main chain transaction monitoring module further comprises:
a multi-node transaction confirmation unit, configured to communicate with main chain nodes of at least three different networks on the first related block chain, and periodically detect whether the first transaction of the main chain nodes of the 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.
5. The apparatus for learning knowledge about blockchains depending on the associated chain computing power of claim 1, wherein the apparatus further comprises:
the transaction record acquisition module is used for acquiring the transaction record information of the first transaction after the first transaction is confirmed;
and the first transaction record changing module is used for changing the transaction record information on the second block of the local block chain network into the changed transaction record information of the first transaction in response to the change of the transaction record information of the first transaction.
6. The apparatus for learning knowledge about blockchains depending on the associated chain computing power of claim 1, wherein the apparatus further comprises:
the transaction record acquisition module is used for acquiring the transaction record information of the first transaction after the first transaction is confirmed;
the second transaction record changing module is used for responding to the change of the transaction record information of the first transaction and sending a link data changing request to a link internal node of the block link network; after receiving the chain data change request, the intra-chain node requests second transaction record information of the first transaction from a main chain node of the first related block chain corresponding to the intra-chain 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 apparatus of claim 1, wherein the plurality of nodes of the local blockchain network are connected to the network of the first correlation blockchain at the same time as the local blockchain network.
8. The apparatus for learning knowledge about blockchains depending on the associated chain computing power as claimed in claim 6 or 7, further comprising:
and the block data modification module is used for responding 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 the subsequent block hash value.
9. The apparatus for learning knowledge about blockchains depending on the associated chain computing power of claim 1, wherein the apparatus further comprises:
the first hash list management module is used for 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 apparatus for learning knowledge about blockchains dependent on associative link power as claimed in claim 9, wherein the apparatus further comprises:
and the second hash list management module is used for writing the first service hash value matched with all the identified service data into a second hash list.
CN201811165471.2A 2018-10-08 2018-10-08 Block chain consensus device depending on related chain computing power Active CN109361661B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811165471.2A CN109361661B (en) 2018-10-08 2018-10-08 Block chain consensus device depending on related chain computing power

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811165471.2A CN109361661B (en) 2018-10-08 2018-10-08 Block chain consensus device depending on related chain computing power

Publications (2)

Publication Number Publication Date
CN109361661A CN109361661A (en) 2019-02-19
CN109361661B true CN109361661B (en) 2020-07-10

Family

ID=65348473

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811165471.2A Active CN109361661B (en) 2018-10-08 2018-10-08 Block chain consensus device depending on related chain computing power

Country Status (1)

Country Link
CN (1) CN109361661B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112988751B (en) * 2019-04-22 2024-08-23 网易(杭州)网络有限公司 Timing task scheduling method and device based on block chain
US11949691B2 (en) 2019-05-24 2024-04-02 International Business Machines Corporation Malicious peer identification
CN110222095B (en) * 2019-06-18 2021-06-22 北京瑞策科技有限公司 E-commerce data query method applied to block chain and user equipment
CN110661867B (en) * 2019-09-25 2021-07-23 东北大学 Block chain consensus method based on improved workload certification and equity certification
CN111444270B (en) * 2020-02-25 2023-09-08 吴燕琼 Method and system for controlling harmful information based on block chain

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9749297B2 (en) * 2014-11-12 2017-08-29 Yaron Gvili Manicoding for communication verification
US20170236123A1 (en) * 2016-02-16 2017-08-17 Blockstack Inc. Decentralized processing of global naming systems
CN106157142A (en) * 2016-06-30 2016-11-23 惠众商务顾问(北京)有限公司 A kind of block chain common recognition and synchronous method, system and device
US10158479B2 (en) * 2017-02-06 2018-12-18 Northern Trust Corporation Systems and methods for generating, uploading and executing code blocks within distributed network nodes
US10225078B2 (en) * 2017-02-09 2019-03-05 International Business Machines Corporation Managing a database management system using a blockchain database
CN107040582B (en) * 2017-02-17 2020-08-14 创新先进技术有限公司 Data processing method and device
CN107801059B (en) * 2017-09-26 2018-09-04 武汉斗鱼网络科技有限公司 A kind of method for authenticating and server
CN108133420B (en) * 2018-01-10 2020-09-11 杭州复杂美科技有限公司 Committee consensus method of block chain

Also Published As

Publication number Publication date
CN109361661A (en) 2019-02-19

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
Sukhwani et al. Performance modeling of PBFT consensus process for permissioned blockchain network (hyperledger fabric)
CN110442652B (en) Cross-chain data processing method and device based on block chain
CN110597907B (en) Cross-block-chain data information synchronization method, device, equipment and medium
CN103413094B (en) A kind of remote measurement encryption system being applicable to spacecraft CTU
CN106294644B (en) A kind of magnanimity time series data collection and treatment device and method based on big data technology
CN109413178B (en) Block chain data receiving and recording method and data receiving and recording system based on Internet of things
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
CN106296196A (en) Digital cash transaction signature method and system and digital cash transaction system thereof
CN113132392B (en) Industrial control network flow abnormity detection method, device and system
CN112039926B (en) Method for realizing double-layer chain type architecture of block chain
CN110457337A (en) Link aggregation method, system and equipment
WO2019105331A1 (en) Computational system and corresponding electronic apparatus
CN110363663A (en) Batch data processing method, device, equipment and storage medium based on block chain
CN108665272A (en) Block chain data processing method, device, equipment and storage medium
Cole et al. Modeling the energy consumption of blockchain consensus algorithms
CN109410055B (en) Block chain consensus method based on computational power parasitism
CN113360321B (en) Micro-service retry calling method and device, electronic equipment and storage medium
Liu et al. Using blockchain technology in IoT manufacture environment for intelligence prediction
CN112288566A (en) Cross-chain transaction abnormity detection and early warning method and system based on deep neural network
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
TR01 Transfer of patent right

Effective date of registration: 20210317

Address after: 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.