CN111080452A - Hierarchical transaction method suitable for energy source block chain - Google Patents

Hierarchical transaction method suitable for energy source block chain Download PDF

Info

Publication number
CN111080452A
CN111080452A CN201911301441.4A CN201911301441A CN111080452A CN 111080452 A CN111080452 A CN 111080452A CN 201911301441 A CN201911301441 A CN 201911301441A CN 111080452 A CN111080452 A CN 111080452A
Authority
CN
China
Prior art keywords
transaction
chain
main chain
sub
main
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911301441.4A
Other languages
Chinese (zh)
Other versions
CN111080452B (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.)
Sichuan Can Trust Polytron Technologies Inc
University of Electronic Science and Technology of China
Original Assignee
Sichuan Can Trust Polytron Technologies Inc
University of Electronic Science and Technology of China
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 Sichuan Can Trust Polytron Technologies Inc, University of Electronic Science and Technology of China filed Critical Sichuan Can Trust Polytron Technologies Inc
Priority to CN201911301441.4A priority Critical patent/CN111080452B/en
Publication of CN111080452A publication Critical patent/CN111080452A/en
Application granted granted Critical
Publication of CN111080452B publication Critical patent/CN111080452B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • G06F16/278Data partitioning, e.g. horizontal or vertical partitioning
    • 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
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/06Energy or water supply
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/52Network services specially adapted for the location of the user terminal

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Economics (AREA)
  • General Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Computing Systems (AREA)
  • Marketing (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Accounting & Taxation (AREA)
  • Signal Processing (AREA)
  • General Business, Economics & Management (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Water Supply & Treatment (AREA)
  • Tourism & Hospitality (AREA)
  • Primary Health Care (AREA)
  • Development Economics (AREA)
  • Technology Law (AREA)
  • Human Resources & Organizations (AREA)
  • Public Health (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Medical Informatics (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a hierarchical transaction method suitable for an energy source block chain, which is used for carrying out partition division according to the geographical positions of participating nodes; all participating nodes in one block commonly maintain a sub-chain account book, and the participating nodes are energy production and marketing persons; virtually setting a common account for each parcel, wherein the sum of the common accounts is the sum of the accounts of all the participating nodes in the parcel; selecting 1 of the participating nodes in each partition as a child chain master node, and taking the rest participating nodes as slave nodes; the sub-chain main nodes of all the fragment areas form a main chain, and 1 sub-chain main node is selected from the main chain as a main chain main node; all master nodes maintain a master chain ledger together. According to the method, the bookkeeping content is limited in a few nodes with the highest association degree aiming at the special transaction of the energy block chain according to the distribution characteristics of the geographic positions, so that the storage space is greatly saved; the two-layer transaction has better stability, flexibility, simplicity and high practicability.

Description

Hierarchical transaction method suitable for energy source block chain
Technical Field
The invention relates to an energy blockchain technology, in particular to an energy blockchain transaction technology based on a hierarchical blockchain.
Background
Energy is the basis of social operation, and energy innovation is promoting social development. In recent years, distributed power generation technology based on renewable energy has been rapidly developed. Different from the traditional 'large unit, large power plant and large power grid' of the power system, the distributed energy has the characteristics of small scale, large fluctuation, wide distribution and the like. The traditional large power grid is difficult to fully utilize the advantages of distributed energy, and local consumption of distributed power generation is needed. Due to the fact that the transaction of the distributed energy resources is usually characterized by small transaction scale and frequent transaction, the traditional centralized transaction mechanism usually considers that the transaction of the distributed energy resources is not profitable, credit endorsements are refused to be provided, and a credible bilateral transaction mechanism is urgently needed for the transaction of the distributed energy resources.
Since 2008, this clever proposed "bit coin: an electronic cash currency "started completely by point-to-point technology, and the blockchain technology is gaining increasing attention. The block chain has the characteristics of decentralization, distribution, point-to-point and the like, and can use the block chain technology for distributed energy transactions. With the development of block chain technology, various consensus mechanisms such as POW, POS, DPOS, PBFT, RAFT, etc. are developed, and these consensus mechanisms are optimized differently for different application ranges, with the objective of improving the consensus efficiency as much as possible while solving the problem of the general of the byzantine.
In the current consensus algorithm, the Paxos algorithm and the Raft algorithm are classic distributed consistency algorithms and are also algorithms with fast consensus among the distributed algorithms, but the Paxos algorithm and the Raft algorithm do not solve the problem of Byzantine and do not consider malicious nodes in the nodes, and once the malicious nodes send false messages, the whole system is affected.
The PBFT algorithm can effectively solve the byzantine problem and can tolerate node failures not exceeding (n-1)/3, but the PBFT requires multiple broadcasts, the traffic volume increases quadratically with the increase of nodes, and such high traffic volume is intolerable for distributed energy transactions involving a large number of nodes. Moreover, the PBFT consensus mechanism requires the nodes to store the full amount of ledger information, and occupies a large amount of storage space.
Disclosure of Invention
The invention aims to solve the technical problem of providing a geographical position-based hierarchical transaction method suitable for distributed energy transaction based on a PBFT algorithm aiming at the characteristics of the distributed energy transaction.
The technical scheme adopted by the invention for solving the technical problems is that the layered transaction method suitable for the energy source block chain is characterized by comprising the following steps:
1) building a blockchain of hierarchical transactions: searching an IP geographic information base according to the IP addresses of the participating nodes and dividing the IP geographic information base into segments according to the geographic positions of the participating nodes; all participating nodes in a district commonly maintain a sub-chain account book, the sub-chain account book records all transactions related to the district, and the participating nodes are energy production and marketing persons; virtually setting a common account for each parcel, wherein the sum of the common accounts is the sum of the accounts of all the participating nodes in the parcel; selecting 1 of the participating nodes in each partition as a child chain master node, and taking the rest participating nodes as slave nodes; the sub-chain main nodes of all the fragment areas form a main chain, and 1 sub-chain main node is selected from the main chain as a main chain main node; all the main nodes maintain a main chain account book together;
2) the client sends a transaction request: after searching the affiliated sub-area according to the IP address of the client, the client sends a transaction request to the affiliated sub-chain main node, and the sub-chain main node diffuses the transaction request to the participation point in the sub-area through a practical Byzantine fault-tolerant algorithm PBFT algorithm;
3) the participation node in the parcel records the transaction into the transaction pool after the PBFT consensus is achieved;
4) when the sub-chain accounting period arrives, the sub-chain master node accounts the transaction:
4-1) the sub-chain master node selects transactions from the own transaction pool according to the time sequence of the access pool, packages the selected transaction records into blocks and broadcasts the blocks to all slave nodes in the blocks; when a block is packaged, if the IP address of the client of the opposite party in transaction is not in the current block, cross-zone transaction occurs, the block is searched according to the IP address of the client of the opposite party, on one hand, a sub-chain main node constructs virtual transaction transferred into or out of a common account in the block according to the cross-zone transfer amount, and packages the virtual transaction into the block after the virtual transaction associated transaction record is recorded; on the other hand, a main chain transaction request for generating virtual transaction is broadcasted to all slave nodes in the parcel;
4-2) after the block broadcasted by the sub-chain master node achieves the consensus in the block area through PBFT, each participating node saves the block to a local sub-chain account book; when a main chain transaction request of the virtual transaction broadcasted during the cross-region transaction is signed and replied by the slave nodes above 2/3 in the region, the sub-chain master node reconstructs a main chain transaction related to the virtual transaction and broadcasts the main chain transaction in the main chain; the account of the main chain transaction is a common account of a chip area where a sub-chain main node initiating the main chain transaction is located;
5) backbone collection backbone transaction: after each main chain node receives the broadcasted main chain transaction request, the main chain transaction related to the sub-chain virtual transaction is stored in a transaction pool of the main chain node;
6) when the main chain accounting period is reached, the main chain main node accounts the collected main chain transaction records: the main chain main node selects main chain transactions from a transaction pool of the main chain main node according to the time sequence of the main chain main node entering the pool, packages the selected main chain transaction records into blocks and broadcasts the blocks on the main chain; after the block broadcasted by the main chain main node reaches consensus in the main chain by a practical Byzantine fault-tolerant algorithm PBFT, each participating node stores the block into a local main chain account book.
The method has the advantages that based on the geographical location district characteristics of the electricity purchase of the distributed power grid, the bookkeeping content is limited in a few nodes with the highest relevance degree according to the geographical location distribution characteristics aiming at the specific transaction of the energy block chain. The storage space is greatly saved; and the two-layer transaction network can have better stability, and the whole block chain network is difficult to attack by malicious attack, so that the method has the characteristics of flexibility, simplicity and high practicability.
Drawings
Fig. 1 is a structure of an energy source block chain according to the present invention.
FIG. 2 is a block diagram of a hierarchical block chain structure according to the present invention.
Fig. 3 illustrates a transaction process according to the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It should be understood that the scope of the above-described subject matter is not limited to the following examples, and any techniques implemented based on the disclosure of the present invention are within the scope of the present invention.
Referring to fig. 1, the architecture related to the layered consensus mechanism of the present invention includes the following layers:
1: an application layer: the system comprises a client, a server and a server, wherein the client is used for receiving a distributed power grid transaction request from the client;
2: a transaction layer: for the transaction mechanism, the synchronous updating of the account book is achieved among the nodes through a consensus mechanism;
3: a storage layer: according to the book storage scheme, a large number of blocks are stored in different areas according to the characteristics of area storage.
Referring to fig. 2, the relationship between the consensus machine subchain and the main chain of the present invention has the following characteristics:
1: a plurality of sub-chains (chip regions) are arranged, and nodes among the sub-chains are not overlapped with each other;
2: the sub-chain and the main chain maintain respective accounts;
3: the main chain participation node is a sub-chain main node;
4: accounts in the main chain are shared by the sub-chain chip areas, and specific account information is recorded in the sub-chains.
The specific implementation method is shown in fig. 3:
1) building a blockchain of hierarchical transactions: searching an IP geographic information base according to the IP addresses of the participating nodes and dividing the IP geographic information base into segments according to the geographic positions of the participating nodes; all participating nodes in a district commonly maintain a sub-chain account book, the sub-chain account book records all transactions related to the district, and the participating nodes are energy production and marketing persons; virtually setting a common account for each parcel, wherein the sum of the common accounts is the sum of the accounts of all the participating nodes in the parcel; selecting 1 of the participating nodes in each partition as a child chain master node, and taking the rest participating nodes as slave nodes; the sub-chain main nodes of all the fragment areas form a main chain, and 1 sub-chain main node is selected from the main chain as a main chain main node; all the main nodes maintain a main chain account book together; when the node in the fragment area changes, the sub-chain main node broadcasts the node change to the main chain;
2) the client sends a transaction request: after searching the affiliated district according to the IP address of the client, the client sends the generated transaction request to the affiliated district main node; the client can inquire the basic information of the main chain and the participating nodes of other sub-chains (chip regions) by a sub-chain master node thereof, wherein the basic information comprises a public key, an IP address and the like;
3) collecting the transaction of the client by the nodes in the subarea: the participating nodes in the parcel agree on the transaction through a PBFT algorithm, and the transaction is stored in a transaction pool maintained by the nodes;
4) when the sub-chain accounting period arrives, the sub-chain master node accounts the transaction:
4-1) the sub-chain master node selects transactions from the own transaction pool according to the time sequence of the access pool, packages the selected transaction records into blocks and broadcasts the blocks to all slave nodes in the blocks; when a block is packaged, if the IP address of the client of the opposite party in transaction is not in the current block, cross-zone transaction occurs, the block is searched according to the IP address of the client of the opposite party, on one hand, a sub-chain main node constructs virtual transaction transferred into or out of a common account in the block according to the cross-zone transfer amount, and packages the virtual transaction into the block after the virtual transaction associated transaction record is recorded; on the other hand, a main chain transaction request for generating virtual transaction is broadcasted to all slave nodes in the parcel;
4-2) after the blocks broadcasted by the sub-chain master node reach consensus in the block area through a practical Byzantine fault-tolerant algorithm PBFT, each participating node saves the blocks to a local sub-chain account book; when a main chain transaction request of the virtual transaction broadcasted during the cross-region transaction is signed and replied by the slave nodes above 2/3 in the region, the sub-chain master node reconstructs a main chain transaction related to the virtual transaction and broadcasts the main chain transaction in the main chain; the account of the main chain transaction is a common account of a chip area where a sub-chain main node initiating the main chain transaction is located;
5) backbone collection backbone transaction: after each main chain node receives the broadcasted main chain transaction request, the main chain transaction related to the sub-chain virtual transaction is stored in a transaction pool of the main chain node;
6) when the main chain accounting period is reached, the main chain main node accounts the collected main chain transaction records: the main chain main node selects main chain transactions from a transaction pool of the main chain main node according to the time sequence of the main chain main node entering the pool, packages the selected main chain transaction records into blocks and broadcasts the blocks on the main chain; after the block broadcasted by the main chain main node reaches consensus in the main chain by a practical Byzantine fault-tolerant algorithm PBFT, each participating node stores the block into a local main chain account book.
7) Client query step:
when the client inquires the transaction in the parcel:
7-1) the client broadcasts a transaction inquiry request to the area;
7-2) after the participating nodes in the segment area receive the transaction query request, searching whether the transaction record is stored in a local sub-chain account book, if so, signing the query result and returning the result to the client, and if not, returning the query failure to the client;
7-3) the client receives the signed inquiry result of the participation node number above 2/3 in the parcel and considers the transaction successful.
When a client inquires cross-region transaction:
7-1) the client broadcasts a transaction inquiry request to the area;
7-2) after the participating nodes in the block area receive the transaction inquiry request, searching whether the transaction record is stored in a local sub-chain account book or not; if yes, and the transaction record is associated with the virtual transaction, returning a signed transaction query result and the virtual transaction in the local area from the node to the client;
7-3) the sub-chain main node of the client broadcasts a main chain transaction query request to the main chain, after receiving the main chain transaction query request, the participating nodes in the main chain search whether the main chain transaction record is stored in a local main chain account book, if so, a signed main chain transaction query result is returned;
7-4) the sub-chain master node of the client forwards the signed main chain transaction query result returned by the participating node in the main chain to the client; after receiving the signed main chain transaction query result of which the main chain participation node number is more than 2/3, the sub-chain master node sends a chip area transaction query request to the sub-chain master node of the chip area where the opposite client is located;
7-5) after a sub-chain main node of the opposite client receives a zone transaction query request, broadcasting the zone transaction query request in the zone; after receiving a chip area transaction query request, a participating node in a chip area searches whether a local sub-chain account book stores the transaction record, if so, returns a signature query result and a virtual transaction to a sub-chain master node; after receiving the signature query result and the virtual transaction of the participation node number above 2/3 in the partition, the opposite client forwards the signature query result and the virtual transaction to a child chain master node of the client; the sub-chain master node of the client forwards the signature query result and the virtual transaction from the other partition to the client;
7-6) the client judges whether the returned transaction query result and virtual transaction in the local area with the participation node number more than 2/3, the signed main chain transaction query result with the main chain participation node number more than 2/3 and the signed query result and virtual transaction with the participation node number more than 2/3 in the local area of the opposite client are received in the set time, if yes, the transaction is considered to be successful, otherwise, the transaction is considered to be unsuccessful.
The inventive solution herein involves two hash values hash. One is the block hash in the generic block chaining technique: the hash values of all transactions packed in the whole block are used for marking one block, the other type is a transaction hash, and the hash operation is carried out on the transaction parameters, wherein the only transaction is marked.
Specifically, when a client generates a transaction request, a sub-chain master node generates a hash when a virtual transaction, a main chain transaction request and a main chain transaction are generated, wherein the hash value is used for corresponding to the transaction by using identity identifications of transaction parties, a timestamp, a transaction amount and a digital signature of a transaction initiating end;
the method for associating the transaction records with the virtual transaction is that the hash of the transaction request generated by the client is stored in the block of the virtual transaction; the main chain transaction related virtual transaction method is that the hash of the sub chain main node in the virtual transaction is stored in the block of the main chain transaction; when a sub-chain main node of a client broadcasts a main chain transaction query request to a main chain, the main chain transaction query request comprises a hash of main chain transaction; and the sub-chain master node of the client sends a zone transaction query request to the sub-chain master node of the client of the other side, wherein the zone transaction query request comprises a hash corresponding to the main chain transaction.
A typical client transaction request goes through the following process:
1: the client sends a transaction request to the host node, all the participating nodes reach a consensus through a PBFT process, and after the consensus is reached, all the participating nodes place the transaction into the respective transaction pools of the nodes.
2. And the main node returns the result to the client after the PBFT process is finished, and the client stores the transaction hash for checking.
3: after the accounting period begins, the main node captures a plurality of transactions from the transaction pool, packages the transactions into blocks, adds information such as timestamps, abstracts and current participating nodes into the blocks, sends the blocks to the slave nodes, and the participating nodes achieve consensus through PBFT;
4 all nodes save the block in the local account book
5: and the client asynchronously checks the account through the transaction hash to verify whether the transaction is packed into the block.
Example 1
A process that does not involve cross-parcel transactions: assume that clients A, B are all in parcel one, transferring from A to B.
1. Firstly, the client A, B sends the transaction request after respective signature to a host node of the parcel;
2. after receiving the transaction request, the master node of the parcel achieves consensus through PBFT, and the transaction is put into a transaction pool;
3. when the next accounting period is reached, a master node of a segment packs the transaction into a block, and the block is stored in a sub-chain account book maintained by each participating node in the segment through PBFT consensus;
4. the client A, B queries the parcel one for the transaction;
5. each participating node of the zone I finds the transaction from the sub-chain account book, and returns a query result without involving a cross-zone;
6. the client A, B verifies that the transaction was successful by receiving the query result for parcel one.
Example 2
One scenario involves a cross-parcel transaction, with A in parcel one, B in parcel two, and A transferring to B.
1. The client A, B signs the transaction request and sends the signature to the master nodes of the first and second areas;
2. after receiving the transaction request, the master nodes in the first and second areas reach consensus through PBFT and are placed into respective transaction pools;
3. after the next accounting period is reached, discovering that both transaction parties relate to cross-region transaction by the first region and the second region, constructing virtual transaction, constructing an account A for the first region to transfer into common account transaction, constructing an account B for the second region to acquire balance transaction from the common account, and associating the virtual transaction with actual transaction;
4. the method comprises the steps that the total transfer amount is counted in a first zone and a second zone, a main chain transaction is constructed, specifically, a main node of the first zone calculates all transaction statistics related to transfer with the second zone, the statistical method is that the total amount transferred to the first zone from the first zone is subtracted from the total amount transferred to the second zone from the second zone, the amount of money transferred from a common account is calculated, a transaction request transferred to the second zone from the first zone is constructed, virtual transactions in a sub chain are associated, and the association method is that virtual transaction hashes of all the first zone to the second zone are packaged into the main chain transaction request. The main node sends the main chain transaction request to all nodes, the nodes sign the main chain transaction request after verification, and the main node sends the signed request to the main chain after signing the main node and most of the slave nodes in the fragment;
5. after receiving a main chain request, a main chain node puts a transaction into a main chain transaction pool;
6. after the accounting period of the main chain is reached, the main chain firstly records the current block hash of each block into a block header, and then packs the main chain transaction and the related virtual transaction;
7. the client A searches the transaction, firstly, an inquiry request is sent to a first parcel, after the first parcel receives the inquiry request, the virtual transaction is found, which means the cross-link transaction, and an inquiry result is returned;
8. the main node in the first partition sends a query request to the main chain, and the main chain finds out actual cross-chain transaction according to the virtual transaction and returns a query result;
9. the main node of the first partition finds that the purpose of cross-link transaction is a second partition, sends a query request to the second partition, searches out the associated virtual transaction through the main-chain transaction of the second partition, and returns a query result;
10. and the client A verifies whether the whole transaction is successful or not through the query results of the first partition and the second partition and the query result of the main chain transaction.

Claims (4)

1. A hierarchical transaction method suitable for an energy source block chain is characterized by comprising the following steps:
1) building a blockchain of hierarchical transactions: searching an IP geographic information base according to the IP addresses of the participating nodes and dividing the IP geographic information base into segments according to the geographic positions of the participating nodes; all participating nodes in a district commonly maintain a sub-chain account book, the sub-chain account book records all transactions related to the district, and the participating nodes are energy production and marketing persons; virtually setting a common account for each parcel, wherein the sum of the common accounts is the sum of the accounts of all the participating nodes in the parcel; selecting 1 of the participating nodes in each partition as a child chain master node, and taking the rest participating nodes as slave nodes; the sub-chain main nodes of all the fragment areas form a main chain, and 1 sub-chain main node is selected from the main chain as a main chain main node; all the main nodes maintain a main chain account book together;
2) the client sends a transaction request: after searching the affiliated sub-area according to the IP address of the client, the client sends a transaction request to the affiliated sub-chain main node, and the sub-chain main node diffuses the transaction request to the participation point in the sub-area through a practical Byzantine fault-tolerant algorithm PBFT algorithm;
3) the participation node in the parcel records the transaction into the transaction pool after the PBFT consensus is achieved;
4) when the sub-chain accounting period arrives, the sub-chain master node accounts the transaction:
4-1) the sub-chain master node selects transactions from the own transaction pool according to the time sequence of the access pool, packages the selected transaction records into blocks and broadcasts the blocks to all slave nodes of the partition; when blocks are packaged, if the IP address of the client of the opposite party of the transaction is not in the current partition, cross-partition transaction occurs, the partition is searched according to the IP address of the client of the opposite party, on one hand, the sub-chain master node constructs virtual transaction transferred into or out of a common account in the block according to the cross-partition transfer amount, and packages the virtual transaction into the blocks after the virtual transaction associated transaction records; on the other hand, a main chain transaction request for generating virtual transaction is broadcasted to all the slave nodes of the partition;
4-2) after the blocks broadcasted by the sub-chain master node reach consensus in the block area through a practical Byzantine fault-tolerant algorithm PBFT, each participating node saves the blocks to a local sub-chain account book; when a main chain transaction request of the virtual transaction broadcasted during the cross-region transaction is signed and replied by the slave nodes above 2/3 in the region, the sub-chain master node reconstructs a main chain transaction related to the virtual transaction and broadcasts the main chain transaction in the main chain; the account of the main chain transaction is a common account of a chip area where a sub-chain main node initiating the main chain transaction is located;
5) backbone collection backbone transaction: after each main chain node receives the broadcasted main chain transaction request, the main chain transaction related to the sub-chain virtual transaction is stored in a transaction pool of the main chain node;
6) when the main chain accounting period is reached, the main chain main node accounts the collected main chain transaction records: the main chain main node selects main chain transactions from a transaction pool of the main chain main node according to the time sequence of the main chain main node entering the pool, packages the selected main chain transaction records into blocks and broadcasts the blocks on the main chain; after the block broadcasted by the main chain main node reaches consensus in the main chain by a practical Byzantine fault-tolerant algorithm PBFT, each participating node stores the block into a local main chain account book.
2. The method of claim 1, further comprising querying transactions within the parcel by the client:
7-1) the client broadcasts a transaction inquiry request to the partition where the client is located;
7-2) after the participating nodes in the partitions receive the transaction query request, searching whether the transaction record is stored in a local sub-chain account book, if so, signing the query result and returning the result to the client, and if not, returning the query failure to the client;
7-3) the client receives the signed query result of the number of the participating nodes in the partition above 2/3, and the transaction is considered successful.
3. The method of claim 2, wherein when the client queries for a cross-region transaction:
7-1) the client broadcasts a transaction inquiry request to the partition where the client is located;
7-2) after the participating nodes in the subareas receive the transaction inquiry request, searching whether the local sub-chain account book stores the transaction record; if the transaction record is associated with the virtual transaction, returning a signed transaction query result and the virtual transaction in the partition from the node to the client;
7-3) the sub-chain main node of the client broadcasts a main chain transaction query request to the main chain, after receiving the main chain transaction query request, the participating nodes in the main chain search whether the main chain transaction record is stored in a local main chain account book, if so, a signed main chain transaction query result is returned;
7-4) the sub-chain master node of the client forwards the signed main chain transaction query result returned by the participating node in the main chain to the client; after receiving the signed main chain transaction query result of the main chain participation node number above 2/3, the sub-chain master node sends a partition transaction query request to the sub-chain master node of the partition in which the opposite client is located;
7-5) after the sub-chain master node of the opposite client receives the partition transaction query request, broadcasting the partition transaction query request in the partition; after receiving a partition transaction query request, the participating nodes in the partition search whether the transaction record is stored in a local sub-chain account book, and if so, return a signature query result and a virtual transaction to the sub-chain master node; after receiving the signature query result and the virtual transaction of the participation node number above 2/3 in the partition, the opposite client forwards the signature query result and the virtual transaction to a child chain master node of the client; the sub-chain master node of the client forwards the signature query result and the virtual transaction from the other partition to the client;
7-6) the client judges whether the returned transaction query result and virtual transaction in the local partition with the participation node number of more than 2/3, the signed main chain transaction query result with the main chain participation node number of more than 2/3 and the signed query result and virtual transaction with the participation node number of more than 2/3 in the partition where the opposite client is located are received within the set time, if so, the transaction is considered to be successful, otherwise, the transaction is considered to be unsuccessful.
4. The method of claim 1, wherein the client generates a hash value when generating the transaction request, the child chain master node generates a virtual transaction, the master chain transaction request and the master chain transaction, and the hash value is used for corresponding to the transaction by using the transaction party identity, the timestamp, the transaction amount and the digital signature of the transaction initiating end;
the method for associating the transaction records with the virtual transaction is that the hash value of the transaction request generated by the client is stored in the block of the virtual transaction;
the main chain transaction related virtual transaction method is that the hash value of the sub chain main node in the virtual transaction is stored in the block of the main chain transaction;
when a sub-chain main node of a client broadcasts a main chain transaction query request to a main chain, the main chain transaction query request comprises a hash value of main chain transaction;
and the sub-chain master node of the client sends a partition transaction query request to the sub-chain master node of the opposite client, wherein the partition transaction query request comprises a hash value corresponding to the main chain transaction.
CN201911301441.4A 2019-12-17 2019-12-17 Hierarchical transaction method suitable for energy block chain Active CN111080452B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911301441.4A CN111080452B (en) 2019-12-17 2019-12-17 Hierarchical transaction method suitable for energy block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911301441.4A CN111080452B (en) 2019-12-17 2019-12-17 Hierarchical transaction method suitable for energy block chain

Publications (2)

Publication Number Publication Date
CN111080452A true CN111080452A (en) 2020-04-28
CN111080452B CN111080452B (en) 2023-12-29

Family

ID=70315023

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911301441.4A Active CN111080452B (en) 2019-12-17 2019-12-17 Hierarchical transaction method suitable for energy block chain

Country Status (1)

Country Link
CN (1) CN111080452B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111680050A (en) * 2020-05-25 2020-09-18 杭州趣链科技有限公司 Fragmentation processing method, device and storage medium for alliance link data
CN112788139A (en) * 2021-01-12 2021-05-11 北京工业大学 Block chain storage capacity optimization method and system
CN113095940A (en) * 2021-04-29 2021-07-09 平安科技(深圳)有限公司 Isomorphic multilink-based transaction processing method, blockchain system, device and medium
CN113259453A (en) * 2021-06-02 2021-08-13 支付宝(杭州)信息技术有限公司 Cross-chain interaction method and device
CN113259460A (en) * 2021-06-02 2021-08-13 支付宝(杭州)信息技术有限公司 Cross-chain interaction method and device
CN113742417A (en) * 2020-05-29 2021-12-03 同方威视技术股份有限公司 Multi-level distributed consensus method and system, electronic device and computer readable medium
CN113922971A (en) * 2021-06-02 2022-01-11 支付宝(杭州)信息技术有限公司 Cross-chain interaction method and device

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105809420A (en) * 2016-03-08 2016-07-27 杭州复杂美科技有限公司 Liquidation method of multi-layer block chain
CN107147735A (en) * 2017-05-12 2017-09-08 北京博晨技术有限公司 A kind of distributed account book system based on hierarchy
CN108616596A (en) * 2018-05-09 2018-10-02 南京邮电大学 It is adaptively known together method based on the block chain that dynamic authorization and network environment perceive
CN108900321A (en) * 2018-06-06 2018-11-27 广州链块科技有限公司 The method that a kind of block chain by stages carries out real-time atom transaction
CN108960823A (en) * 2018-03-30 2018-12-07 杭州复杂美科技有限公司 A kind of block chain multichain concurrent transaction system
CN109462587A (en) * 2018-11-09 2019-03-12 四川虹微技术有限公司 Block chain is layered common recognition method, block chain network system and block chain node
KR20190086298A (en) * 2018-01-12 2019-07-22 인제대학교 산학협력단 Involvement Control System of Block Chain Controller based on Transaction Value
US20190251199A1 (en) * 2018-02-14 2019-08-15 Ivan Klianev Transactions Across Blockchain Networks
US20190354518A1 (en) * 2018-05-01 2019-11-21 Michael Zochowski Chain mesh network for decentralized transaction systems
CN110570202A (en) * 2019-09-02 2019-12-13 杭州趣链科技有限公司 Hybrid consensus method based on fragmentation technology

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105809420A (en) * 2016-03-08 2016-07-27 杭州复杂美科技有限公司 Liquidation method of multi-layer block chain
CN107147735A (en) * 2017-05-12 2017-09-08 北京博晨技术有限公司 A kind of distributed account book system based on hierarchy
KR20190086298A (en) * 2018-01-12 2019-07-22 인제대학교 산학협력단 Involvement Control System of Block Chain Controller based on Transaction Value
US20190251199A1 (en) * 2018-02-14 2019-08-15 Ivan Klianev Transactions Across Blockchain Networks
CN108960823A (en) * 2018-03-30 2018-12-07 杭州复杂美科技有限公司 A kind of block chain multichain concurrent transaction system
US20190354518A1 (en) * 2018-05-01 2019-11-21 Michael Zochowski Chain mesh network for decentralized transaction systems
CN108616596A (en) * 2018-05-09 2018-10-02 南京邮电大学 It is adaptively known together method based on the block chain that dynamic authorization and network environment perceive
CN108900321A (en) * 2018-06-06 2018-11-27 广州链块科技有限公司 The method that a kind of block chain by stages carries out real-time atom transaction
CN109462587A (en) * 2018-11-09 2019-03-12 四川虹微技术有限公司 Block chain is layered common recognition method, block chain network system and block chain node
CN110570202A (en) * 2019-09-02 2019-12-13 杭州趣链科技有限公司 Hybrid consensus method based on fragmentation technology

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
刘德林;: "区块链智能合约技术在金融领域的研发应用现状、问题及建议", 海南金融, no. 10, pages 27 - 31 *
张栋珀: "基于区块链的电能交易平台设计与实现" *

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111680050A (en) * 2020-05-25 2020-09-18 杭州趣链科技有限公司 Fragmentation processing method, device and storage medium for alliance link data
CN111680050B (en) * 2020-05-25 2023-09-26 杭州趣链科技有限公司 Fragment processing method, device and storage medium for alliance chain data
CN113742417A (en) * 2020-05-29 2021-12-03 同方威视技术股份有限公司 Multi-level distributed consensus method and system, electronic device and computer readable medium
CN113742417B (en) * 2020-05-29 2024-06-07 同方威视技术股份有限公司 Multistage distributed consensus method and system, electronic equipment and computer readable medium
CN112788139A (en) * 2021-01-12 2021-05-11 北京工业大学 Block chain storage capacity optimization method and system
CN113095940A (en) * 2021-04-29 2021-07-09 平安科技(深圳)有限公司 Isomorphic multilink-based transaction processing method, blockchain system, device and medium
WO2022227172A1 (en) * 2021-04-29 2022-11-03 平安科技(深圳)有限公司 Homogeneous multi-chain-based transaction processing method, blockchain system, device, and medium
CN113095940B (en) * 2021-04-29 2024-05-10 平安科技(深圳)有限公司 Isomorphic multi-chain based transaction processing method, blockchain system, equipment and medium
CN113259453A (en) * 2021-06-02 2021-08-13 支付宝(杭州)信息技术有限公司 Cross-chain interaction method and device
CN113259460A (en) * 2021-06-02 2021-08-13 支付宝(杭州)信息技术有限公司 Cross-chain interaction method and device
CN113259453B (en) * 2021-06-02 2021-10-15 支付宝(杭州)信息技术有限公司 Cross-chain interaction method and device
CN113922971A (en) * 2021-06-02 2022-01-11 支付宝(杭州)信息技术有限公司 Cross-chain interaction method and device
CN113922971B (en) * 2021-06-02 2023-10-27 支付宝(杭州)信息技术有限公司 Cross-chain interaction method and device

Also Published As

Publication number Publication date
CN111080452B (en) 2023-12-29

Similar Documents

Publication Publication Date Title
CN111080452A (en) Hierarchical transaction method suitable for energy source block chain
Bano et al. SoK: Consensus in the age of blockchains
Zhou et al. Solutions to scalability of blockchain: A survey
CN110945853B (en) Method for generating and managing multimode identification network based on alliance chain voting consensus algorithm
CN109165945B (en) Representative node device election method and device, computer device and storage medium
Hong et al. Pyramid: A layered sharding blockchain system
Wang et al. Sok: Sharding on blockchain
US11177939B2 (en) Blockchain system including a distributed network of a plurality of nodes and a method for achieving an agreement between the plurality of nodes executed by processors of the block chain system
CN109360100B (en) Transaction rapid confirmation method and device based on block chain technology
CN109150972B (en) Working method of consensus mechanism of double-layer partitioned efficient block chain
Bano et al. Consensus in the age of blockchains
CN113395363B (en) Data processing method, device and equipment based on block chain and storage medium
US20230315891A1 (en) Transaction data processing method and apparatus, computer device and storage medium
CN110570308B (en) Block chain-based electronic warehouse receipt transaction system with incentive mechanism
CN104008152A (en) Distributed file system architectural method supporting mass data access
US20230017790A1 (en) Graphic-blockchain-orientated hybrid consensus implementation apparatus and implementation method thereof
Li et al. Achieving scalability and load balance across blockchain shards for state sharding
Jiang et al. A cross-chain solution to integration of iot tangle for data access management
Xi et al. [Retracted] A Comprehensive Survey on Sharding in Blockchains
Hoepman Distributed double spending prevention
CN113570365A (en) Community discovery-based DAG network topology construction method and trading method
Li et al. Scalable blockchain storage mechanism based on two-layer structure and improved distributed consensus
CN113448694A (en) Block chain consensus method for improving transaction processing capability
Xu et al. Improved PBFT algorithm based on vague sets
Tochner et al. On search friction of route discovery in offchain networks

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