CN113256424A - Transaction data processing method, device, equipment and storage medium - Google Patents

Transaction data processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN113256424A
CN113256424A CN202110657918.3A CN202110657918A CN113256424A CN 113256424 A CN113256424 A CN 113256424A CN 202110657918 A CN202110657918 A CN 202110657918A CN 113256424 A CN113256424 A CN 113256424A
Authority
CN
China
Prior art keywords
transaction
block
node
auction
consensus
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
CN202110657918.3A
Other languages
Chinese (zh)
Other versions
CN113256424B (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202111215409.1A priority Critical patent/CN113935835B/en
Priority to CN202110657918.3A priority patent/CN113256424B/en
Publication of CN113256424A publication Critical patent/CN113256424A/en
Application granted granted Critical
Publication of CN113256424B publication Critical patent/CN113256424B/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
    • 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
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/08Auctions
    • 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/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3239Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
    • 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/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3297Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving time stamps, e.g. generation of time stamps

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Marketing (AREA)
  • Development Economics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Technology Law (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The embodiment of the application discloses a transaction data processing method, a device, equipment and a storage medium, which comprises the following steps: the first consensus node obtains a block N from a block chain of a core consensus networkiFor block NiPerforming transaction identification on the transaction; if block N is identifiediIf there is an auction transaction, the block N is usediThe auction transaction in (1) is used as a first auction transaction, and the block N to be packaged is identified based on a first node in the first auction transactioni+1Determining a first type of block associated with a first node identification; acquiring the related service transaction of the first service node based on the transaction packaging quantity specified by the first auction transaction; generating a block N based on the associated business transactioni+1Block Ni+1Second consensus broadcast into core consensus networkNodes such that the second identified node is coupled to block Ni+1Block consensus is performed. By adopting the embodiment of the application, the safety of data storage and the transaction processing efficiency of the same service node can be improved.

Description

Transaction data processing method, device, equipment and storage medium
Technical Field
The present application relates to the field of blockchain technologies, and in particular, to a method, an apparatus, a device, and a storage medium for processing transaction data.
Background
In a conventional blockchain network, each service node in the blockchain network may broadcast the generated transaction to the consensus node, so that the consensus node stores the transaction in the node transaction pool and packages the transaction onto a blockchain of the blockchain network. Because the transactions in the node transaction pool are sent by a plurality of service nodes in the blockchain network, during the process of packaging to obtain a new block, the common identification nodes (e.g., the common identification node a) with the block outlet function can indiscriminately acquire the transactions of the service nodes from the node transaction pool, and can package the transactions of the service nodes into the same block according to the acquired transaction sequence of the transactions, so that the generated new block can have transactions of different service nodes.
In addition, since the number of transactions that can be accommodated by the block is limited, once the transactions of different service nodes are packed into the same block, there is a phenomenon that the transactions of the same service node may be stored in different blocks in a scattered manner. Therefore, during the uplink process of the common node for the transaction of a certain service node in the blocks, the common node needs to spend a long common time, thereby reducing the transaction processing efficiency of the same service node.
Disclosure of Invention
The embodiment of the application provides a transaction data processing method, a transaction data processing device and a transaction data processing storage medium, which can improve the security of data storage and improve the transaction processing efficiency of the same service node.
In one aspect, an embodiment of the present invention provides a transaction data processing method, which is performed by a first consensus node in a core consensus network, and includes:
obtaining block N from block chain of core consensus networkiFor block NiPerforming transaction identification on the transaction; block NiThe block with the largest generation time stamp on the block chain is obtained; i is positiveAn integer number;
if block N is identifiediIf there is an auction transaction, the block N is usediThe auction transaction in (1) is used as a first auction transaction, and the block N to be packaged is identified based on a first node in the first auction transactioni+1Determining a first type of block associated with a first node identification; the first auction transaction is forwarded by a first service node corresponding to the first node identification through the proxy node; the agent node is used for carrying out network isolation on the core consensus network and the service network where the first service node is located;
acquiring the related service transaction of the first service node based on the transaction packaging quantity specified by the first auction transaction;
generating a block N based on the associated business transactioni+1Block Ni+1Broadcast to a second consensus node in the core consensus network, such that the second consensus node is directed to block Ni+1Block consensus is performed.
In one aspect, an embodiment of the present application provides a transaction data processing method, where the method is performed by a second consensus node in a core consensus network, and the method includes:
receiving a block N broadcasted by a first consensus node in a core consensus networki+1(ii) a Block Ni+1Block N on a blockchain identifying a core consensus network for a first consensus nodeiWhen a first auction transaction exists, generating a first type block based on a first node identifier in the first auction transaction and a transaction packaging quantity; block NiThe block with the largest generation time stamp on the block chain is obtained; i is a positive integer; the first auction transaction is received by the first consensus node and forwarded by the first service node corresponding to the first node identifier through the proxy node; the agent node is used for carrying out network isolation on the core consensus network and the service network where the first service node is located;
obtaining block N from block chainiFor block NiPerforming transaction identification on the transaction;
if block N is identifiediIf there is an auction transaction, the block N is usediThe auction transaction in (1) is used as a target auction transaction and is based onTarget auction transaction pair block Ni+1Carrying out block consensus to obtain a block consensus result returned to the first consensus node; the block consensus result is used to indicate the first consensus node to associate the block N with the first consensus nodei+1The block chain is written.
An aspect of an embodiment of the present application provides a transaction data processing apparatus, including:
a transaction identification module for obtaining a block N from a block chain of the core consensus networkiFor block NiPerforming transaction identification on the transaction; block NiThe block with the largest generation time stamp on the block chain is obtained; i is a positive integer;
a first type block determination module for identifying the block NiIf there is an auction transaction, the block N is usediThe auction transaction in (1) is used as a first auction transaction, and the block N to be packaged is identified based on a first node in the first auction transactioni+1Determining a first type of block associated with a first node identification; the first auction transaction is forwarded by a first service node corresponding to the first node identification through the proxy node; the agent node is used for carrying out network isolation on the core consensus network and the service network where the first service node is located;
the associated service transaction acquisition module is used for acquiring the associated service transaction of the first service node based on the transaction packaging quantity specified by the first auction transaction;
a first block broadcasting module for generating a block N according to the associated service transactioni+1Block Ni+1Broadcast to a second consensus node in the core consensus network, such that the second consensus node is directed to block Ni+1Block consensus is performed.
Wherein the first type block determination module comprises:
a node identifier obtaining unit for identifying the block NiIf there is an auction transaction, the block N is usediThe auction transaction in the first auction transaction is used as a first auction transaction, and a first node identifier in the first auction transaction is obtained;
the service node searching unit is used for acquiring a node identification list maintained by a block chain network where the core consensus network is located, searching a service node matched with the first node identification based on the node identification list, and taking the searched service node as a first service node;
a block type determination unit for determining a block N to be packedi+1A first type of block associated with the first service node is determined.
The node transaction pool of the first common node comprises first type transactions of the first service node and second type transactions of the first service node; the packing priority of the first type of transaction is higher than that of the second type of transaction;
the associated service transaction acquisition module comprises:
a transaction packing quantity acquisition unit for acquiring a transaction packing quantity designated by the first auction transaction; transaction packing number used to indicate block Ni+1A maximum transaction number of service transactions of the accommodated first service node;
the key transaction quantity counting unit is used for counting the first key transaction quantity of the first type of transaction of the first service node in the node transaction pool based on the packaging priority of the first type of transaction;
the first-class transaction obtaining unit is used for obtaining the first-class transactions of the first service node which are consistent with the counted first key transaction quantity from the node transaction pool if the counted first key transaction quantity is smaller than the transaction packaging quantity;
the second-class transaction acquisition unit is used for determining a quantity difference between the transaction packaging quantity and the counted first key transaction quantity, determining the quantity difference as a quantity to be added, and counting a second key transaction quantity of the second-class transaction of the first service node in the node transaction pool;
and the associated service transaction determining unit is used for acquiring a second type of transaction of the first service node corresponding to the quantity to be added from the node transaction pool when the counted second key transaction quantity is greater than the quantity to be added, and taking the acquired first type of transaction and the acquired second type of transaction as the associated service transaction of the first service node.
Wherein, the first block broadcasting module comprises:
the asset transfer transaction generating unit is used for generating an auction asset transfer transaction aiming at the first auction transaction based on the intelligent contract on the block chain after the associated business transaction is obtained;
a pending transaction determining unit for obtaining auction transaction packaging conditions associated with the core consensus network, and determining to package to block N based on the associated business transaction, auction asset transfer transaction and auction transaction packaging conditionsi+1The pending transaction in (1);
a block broadcasting unit for packing the transaction to be processed to obtain a block Ni+1Block Ni+1Broadcast to a second consensus node in the core consensus network.
Wherein the pending transaction determination unit comprises:
the packaging condition acquisition subunit is used for acquiring auction transaction packaging conditions associated with the core consensus network; the auction transaction packaging condition comprises a threshold number of contiguous tiles associated with the first type of tile;
a block number counting subunit for counting the number of the blocks NiAs a traversal starting block, counting the number of blocks of the first type of blocks continuously appearing on the block chain based on the traversal index direction indicated by the block chain and the traversal starting block;
a first determining subunit, configured to determine the block N if the counted number of blocks reaches the threshold of the number of consecutive blocksi+1Not satisfying auction transaction packaging conditions, and regarding the associated business transaction and auction asset transfer transaction as packaging to block Ni+1To-be-processed transaction in (1).
Wherein the pending transaction determination unit further comprises:
a condition satisfaction determining subunit, configured to determine the block N if the counted number of blocks does not reach the threshold of the number of consecutive blocksi+1Meeting the packaging condition of the auction transaction;
an auction transaction screening subunit, configured to screen auction transactions in the node transaction pool based on the first consensus node, the auction transactions being packed into the block Ni+1Second auction ofTrading; the second auction transaction is used for indicating the block Ni+1The next block of (a) is a first type block associated with a second service node in the service network; the second service node is a service node corresponding to the second node identifier in the second auction transaction;
a second determining subunit for taking the associated business transaction, the auction asset transfer transaction and the second auction transaction as data for packaging into the block Ni+1To-be-processed transaction in (1).
Wherein, this auction transaction filters subunit includes:
the auction asset determination subunit is used for acquiring X auction transactions stored in a node transaction pool of the first consensus node and determining auction assets of each auction transaction in the X auction transactions; the X auction transactions are forwarded by the service nodes in the service network through the proxy nodes; x is a positive integer;
the screening subunit is used for screening the auction transaction with the largest auction asset from the X auction transactions based on the auction assets of each auction transaction, and taking the screened auction transaction as the auction transaction to be verified;
the transaction verification subunit is used for performing transaction verification on the auction transaction to be verified to obtain a transaction verification result;
an auction transaction determining subunit, configured to, when the transaction verification result indicates that the verification is successful, package the auction transaction to be verified into the block Ni+1The second auction transaction of (1).
Wherein the transaction verification subunit is further configured to:
acquiring transaction signature information carried by the auction transaction to be verified; the transaction signature information is a second service node corresponding to a second node identifier in the auction transaction to be verified, and is obtained by performing signature processing on the auction transaction to be verified based on a node private key of the second service node;
acquiring a node public key of a second service node, and verifying the transaction signature information based on the node public key to obtain a signature verification result;
when the signature verification result indicates that the verification is successful, determining the validity of the second service node based on the intelligent contract and an illegal node list associated with the service network;
and determining a transaction verification result of the auction transaction to be verified based on the validity of the second service node.
Wherein, the device still includes:
a second type block determination module for identifying the block NiIf no auction transaction exists, the block N to be packedi+1Determining as a second type block; the second type block is different from the first type block;
the transaction acquisition module is used for acquiring a second type of transaction sent by a service node in a service network through a proxy node from a node transaction pool of the first consensus node;
a second block broadcasting module for generating a block N according to the obtained second type transactioni+1Block Ni+1Broadcast to a second consensus node in the core consensus network, such that the second consensus node is directed to block Ni+1Block consensus is performed.
An aspect of an embodiment of the present application provides a transaction data processing apparatus, including:
a block receiving module for receiving a block N broadcasted by a first common node in a core common networki+1(ii) a Block Ni+1Block N on a blockchain identifying a core consensus network for a first consensus nodeiWhen a first auction transaction exists, generating a first type block based on a first node identifier in the first auction transaction and a transaction packaging quantity; block NiThe block with the largest generation time stamp on the block chain is obtained; i is a positive integer; the first auction transaction is received by the first consensus node and forwarded by the first service node corresponding to the first node identifier through the proxy node; the agent node is used for carrying out network isolation on the core consensus network and the service network where the first service node is located;
a block obtaining module, configured to obtain a block N from a block chainiFor block NiPerforming transaction identification on the transaction;
a block consensus module for identifying a block NiIf there is an auction transaction, thenBlock NiThe auction transaction in (1) is used as a target auction transaction, and the block N is paired based on the target auction transactioni+1Carrying out block consensus to obtain a block consensus result returned to the first consensus node; the block consensus result is used to indicate the first consensus node to associate the block N with the first consensus nodei+1The block chain is written.
Wherein, the block consensus module comprises:
a target auction transaction determination unit for identifying the block NiIf there is an auction transaction, the block N is usediThe auction transaction in (1) is used as a target auction transaction; the target auction transaction comprises a target node identifier and a target packaging number;
a comparison unit for counting the block Ni+1The target node marks the corresponding business transaction quantity of the associated business transaction, and compares the counted business transaction quantity with the target packaging quantity to obtain a comparison result;
a matching unit for identifying the target node and the block Ni+1Each transaction in the associated business transaction is respectively matched to obtain a matching result;
and the consensus result determining unit is used for determining a block consensus result returned to the first consensus node based on the comparison result and the matching result.
An aspect of an embodiment of the present application provides a computer device, including: a processor and a memory;
the processor is connected with the memory, wherein the memory is used for storing a computer program, and the computer program causes the computer device to execute the method provided by the embodiment of the application when being executed by the processor.
An aspect of the embodiments of the present application provides a computer-readable storage medium, which stores a computer program, where the computer program is adapted to be loaded and executed by a processor, so as to enable a computer device having the processor to execute the method provided by the embodiments of the present application.
An aspect of an embodiment of the present application provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to execute the method provided by the embodiment of the application.
In the embodiment of the application, a first consensus node in a core consensus network generates a block Ni+1Before this new block, it needs to obtain the block N with the largest generation timestamp from the block chain of the core consensus networkiWhere i is a positive integer. Further, the first common node can identify block NiWhether there is an auction transaction. If the first common node identifies block NiIf the auction transaction exists, the first common identification node may determine the block N to be generated according to the identified node identifier (i.e., the first node identifier) in the auction transaction (i.e., the first auction transaction)i+1For a first type of block (e.g., an exclusive block) associated with a first node identification, an associated service transaction for the first service node may then be obtained based on a transaction packing quantity specified for the first auction transaction to generate block N for broadcasting to a second consensus node in the core consensus networki+1. Wherein, since block Ni+1The transaction in (1) is related to the first service node corresponding to the first node identification in the first auction transaction, and no transaction related to other service nodes exists, so that the safety of data storage can be improved. In addition, since the first common identification node can rapidly pack the related business transactions of the first business node to the block N in batch according to the transaction packing quantity specified by the first auction transactioni+1Therefore, the consensus time of the first consensus node for the transaction of the same service node is reduced, and the transaction processing efficiency of the same service node is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic diagram of a hierarchical structure of a blockchain network according to an embodiment of the present disclosure;
fig. 2 is a schematic view of a scenario for performing data interaction according to an embodiment of the present application;
FIG. 3 is a schematic flow chart diagram illustrating a transaction data processing method according to an embodiment of the present disclosure;
fig. 4 is a schematic view of a scenario for acquiring a related service transaction according to an embodiment of the present application;
FIG. 5 is a schematic diagram illustrating a scenario for determining a second auction transaction according to an embodiment of the present application;
fig. 6 is a schematic view of a scenario in which a second consensus node performs block consensus on new blocks according to an embodiment of the present application;
FIG. 7 is a schematic flow chart diagram illustrating a transaction data processing method according to an embodiment of the present disclosure;
fig. 8 is a system architecture diagram in a block chain electronic ticket scenario according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a transaction data processing device according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a transaction data processing device according to an embodiment of the present application;
FIG. 11 is a schematic diagram of a computer device provided by an embodiment of the present application;
fig. 12 is a schematic structural diagram of a data processing system according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, fig. 1 is a schematic diagram of a hierarchical structure of a blockchain network according to an embodiment of the present disclosure. The hierarchical structure of the blockchain network in the embodiment of the present application may be the blockchain network 1W shown in fig. 1, and the complete blockchain service system corresponding to the blockchain network 1W may be composed of the service network, the core consensus network, and the routing agent network shown in fig. 1.
It should be understood that the number of nodes of the proxy node in the routing proxy network shown in fig. 1 may be one or more, and is not limited herein. In the embodiment of the present application, taking the proxy node 10D shown in fig. 1 as an example, the proxy node 10D may be used to perform network isolation between a service network and a core consensus network. The proxy node 10D may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a network service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), a big data and artificial intelligence platform, which is not limited herein. The proxy node 10D may perform network layering on a Peer-To-Peer (Peer To Peer, abbreviated as P2P) network To form a layered structure such as a "service network-core consensus network", so as To improve the confidentiality and security of data on a block chain.
The block-link-point system (i.e., the first block-link-point system) corresponding to the service network (i.e., witness network) shown in fig. 1 may include one or more block link nodes, and the number of nodes in the first block-link-point system is not limited herein. For example, the first block link point system may specifically include node 110a, node 110b, node 110c, …, and node 110 n. It should be understood that, in the embodiments of the present application, a block link node in a service network may be referred to as a service node, and the service node does not need to participate in the accounting consensus and is mainly used for executing a transaction service to obtain a transaction associated with the transaction service. The service node may be a full-volume node including a complete blockchain database, or may be a lightweight node storing part of data in a blockchain database, which is not limited herein. To reduce the waste of storage space of the service node, the service node in the embodiment of the present application may take a lightweight node (SPV) as an example, and the service node does not need to store complete transaction data, but obtains the block header data and the partial authorization visible block data (for example, a transaction associated with the service node itself) from the core consensus network shown in fig. 1 through the proxy node 10D.
The block-link-point system (i.e., the second block-link-point system) corresponding to the core consensus network shown in fig. 1 may also include one or more block link nodes, where the number of nodes in the second block-link-point system is not limited herein. For example, the second tile link point system may specifically include node 120a, node 120b, node 120c, …, and node 120 m. It should be understood that the embodiments of the present application may refer to the node in the core consensus network as a consensus node (i.e., a billing node), and the consensus node may run a block chain consensus protocol.
It should be understood that the proxy node, the service node, and the consensus node may be collectively referred to as a blockchain node in the blockchain network 1W in the present embodiment. The blockchain node may be a server accessing the blockchain network 1W, or may be a user terminal accessing the blockchain network 1W, where the specific form of the blockchain node is not limited herein. It is understood that the service network and the core consensus network shown in fig. 1 may be in different network environments, for example, generally, the service node is deployed in the service network in a public network, and the consensus node running the block chain consensus protocol is deployed in a private core consensus network, and the two may interact through a routing boundary.
In the embodiment of the present application, a type of consensus node with a block outlet function in the core consensus network may be referred to as a first consensus node, and a type of node performing block consensus on a generated new block in the core consensus network may be referred to as a second consensus node. The first common node may receive the transaction forwarded by the service node in the service network through the proxy node 10D, and store the received transaction in the node transaction pool of the first common node to wait for a subsequent block with the largest generation timestamp based on the blockchain, and perform a packing process on the transaction in the node transaction pool, thereby generating a new block. The service node in the service network may send three types of transactions, which may specifically include a first type of transaction (e.g., an exclusive transaction), a second type of transaction (e.g., a normal transaction), and an auction transaction. The first type of transaction here is a service transaction carrying an exclusive identifier generated by a service node in the service network, and the first type of transaction may be stored to a first type of block carrying the exclusive identifier (e.g., an exclusive block). The second type of transaction is a service transaction which is generated by a service node in a service network and does not carry an exclusive identifier, and the second type of transaction may be stored in a first type block carrying the exclusive identifier or a second type block (e.g., a normal block) not carrying the exclusive identifier. The auction transaction refers to a transaction generated by a service node in a service network for auctioning a new block when a certain number of transactions to be linked are accumulated. And the packing priority of the first type of transaction of the same service node is higher than that of the second type of transaction.
For convenience of understanding, in the core consensus network shown in fig. 1, an consensus node (node 120a shown in fig. 1) may be selected as the first consensus node in the core consensus network according to the embodiment of the present application. The node 120a may obtain the block with the largest generation timestamp (e.g., block N) from the block chain of the cni) And for the block NiThe node 120a can perform transaction identification according to the block N to obtain a transaction identification resultiGenerating the block N according to the transaction identification resultiNext block (e.g., block N)i+1) Further, the block N can be divided intoi+1Broadcast to a second consensus node (e.g., node 120b of fig. 1) in the core consensus network, such that the node 120b is aligned with the block Ni+1Block consensus is performed.
Wherein the transaction identification result obtained by the node 120a indicates the block NiIf no auction transaction exists, node 120a may select tile N to be generatedi+1Is determined as a second type block (e.g., a normal block), and block N is generatedi+1Then, the block N is divided intoi+1Broadcast to node 120 b. Optionally, if the transaction identification result obtained by the node 120a indicates the block NiIf an auction transaction exists, node 120a may identify a first node of the auction transaction (i.e., the first auction transaction) to be generated based on the first node identification of the identified auction transactioni+1A first type of block (e.g., an exclusive block) associated with the first node identification is determined. That is, the block Ni+1Identify the exclusive block that the corresponding first service node competes for the first node, and thus, the block Ni+1Will be used to place the associated service transaction of the first service node (e.g., node 110a in the service network shown in fig. 1), but not to place the associated service transaction of other service nodes in the service network except the first service node, thereby improving the security of data storage. In addition, since node 120a may quickly group the associated business transactions of the first business node into block N in bulk based on the transaction grouping amount specified by the first auction transactioni+1So as to reduce the consensus time of the node 120a for the transaction of the same service node, thereby improving the transaction processing efficiency of the same service node.
For easy understanding, please refer to fig. 2, and fig. 2 is a schematic diagram of a scenario for performing data interaction according to an embodiment of the present application. As shown in fig. 2, the consensus node 220A in the embodiment of the present application may be a first consensus node with a block-out function in a core consensus network, and the consensus node 220A may be any one of the consensus nodes in the core consensus network shown in fig. 1, for example, the node 120A. The consensus node 220B in this embodiment may be a second consensus node in the core consensus network, and the consensus node 220B may be another consensus node in the core consensus network shown in fig. 1, for example, the node 120B.
It should be understood that each service node in the service network may execute the transaction service, and further may generate a transaction (i.e., a transaction to be broadcasted) for broadcasting to the core consensus network according to a transaction execution result of the transaction service. For example, the transaction service may be an asset transfer service, wherein the asset transfer service may be used to transfer virtual assets such as game gold, game diamonds, electronic tickets, and the like. When a to-be-broadcast transaction (a first-type transaction, a second-type transaction, or an auction transaction) sent by a service node is received by a proxy node, a consensus node (e.g., the consensus node 220A) in the core consensus network may verify the received to-be-broadcast transaction, and then when the verification is successful, store the received to-be-broadcast transaction in a node transaction pool of the consensus node 220A. The proxy node can be used for performing network isolation on the core consensus network and the service network so as to improve the confidentiality and the security of data on the block chain.
It is understood that the number of nodes of the service node in the service network may be N, where N is a positive integer, and for convenience of illustration, in this embodiment of the present application, the number of nodes of the service node in the service network may be 4 as an example, and specifically may include the service node 210A, the service node 210B, the service node 210C, and the service node 210D. Based on this, the node transaction pool (e.g., node transaction pool 2000 shown in fig. 2) of the consensus node 220A may store transactions forwarded by the 4 service nodes through the proxy nodes, respectively. As shown in fig. 2, the node transaction pool 2000 may include 4 transaction sets, and one transaction set corresponds to one service node in the service network. For example, transaction set 10g may include a plurality (e.g., 20) of transactions generated by traffic node 210A in the traffic network, which may specifically include transaction 1a, transaction 2a, …, transaction 20A. The transaction set 20g may include a plurality (e.g., 30) of transactions generated by the service node 210B in the service network, which may specifically include transaction 1B, transaction 2B, …, and transaction 30B. Transaction set 30g may include a plurality (e.g., 15) of transactions generated by traffic node 210C in the traffic network, which may specifically include transaction 1C, transaction 2C, …, transaction 15C. Transaction set 40g may include a plurality (e.g., 25) of transactions generated by service node 210D in the service network, which may specifically include transaction 1D, transaction 2D, …, transaction 25D.
The blockchain 2q shown in fig. 2 may be an identical blockchain shared by each common node in the core common network where the common node 220A is located, and each common node may obtain the data information stored in the blockchain 2 q. It should be understood that the block chain 2q may include a plurality of blocks (for example, 100 blocks), specifically, block 1, block 2, …, and block 100.
As shown in fig. 2, when generating a new block, the consensus node 220A may obtain the block with the largest generation timestamp (e.g., the block 100 shown in fig. 2) from the blockchain 2q shown in fig. 2, and may perform transaction identification on the transaction in the block 100 to determine whether the next block of the block 100 is the first type block (e.g., the exclusive block carrying the exclusive id). If the consensus node 220A identifies that an auction transaction (e.g., auction transaction 2j shown in fig. 2) exists in the sector 100, the consensus node 220A may take the auction transaction 2j in the sector 100 as the first auction transaction. Further, the consensus node 220A may obtain a node identifier (i.e., a first node identifier, e.g., node identifier 2s shown in fig. 2) in the auction transaction 2j, and may determine a next block (e.g., block 101) of the block 100 to be packed as a first type block (e.g., exclusive block) associated with the node identifier 2s based on the node identifier 2 s. The auction transaction 2j is forwarded by a service node (e.g., service node 210A in the service network) corresponding to the node identifier 2s through a proxy node, which means that the block 101 to be packaged is an exclusive block that the service node 210A auctions in a location auction manner, that is, the consensus node 220A can quickly obtain the associated service transactions of the service node 210A from the node transaction pool 2000 and package the associated service transactions into the block 101 in a batched manner.
It is to be appreciated that the consensus node 220A may determine a transaction set (e.g., transaction set 10 g) associated with the service node 210A from the node transaction pool 2000 based on a transaction packing quantity (e.g., 4) specified by the auction transaction 2 j. Since the transaction set 10g may store a first type of transaction (e.g., an exclusive transaction, that is, a transaction carrying an exclusive identifier) and a second type of transaction (e.g., a normal transaction, that is, a transaction not carrying an exclusive identifier) sent by the service node 210A, and a packing priority of the first type of transaction is higher than a packing priority of the second type of transaction, the consensus node 220A may obtain an associated service transaction of the service node 210A from the transaction set 10g according to a transaction packing priority of each transaction in the transaction set 10 g. For example, the associated service transactions of service node 210A acquired by service node 210A may be transaction 1a, transaction 5a, transaction 8a, and transaction 16a screened from transaction set 10 g.
Further, the common node 220A may generate the block 101 according to the associated service transaction of the service node 210A, and further may send the block 101 to the common node 220B shown in fig. 2, so that the common node 220B performs block common identification on the block 101. The block 101 may carry an exclusive identifier, and the exclusive identifier may indicate that the block 101 is an exclusive block that is contended by the service node 210A. It is understood that, when receiving the block 101 carrying the exclusive identifier, the common node 220B may obtain the block 100 from the blockchain 2q shown in fig. 2, and may further perform transaction identification on the transaction in the block 100. If the consensus node 220B identifies that there is an auction transaction in the sector 100, the consensus node 220B may use the auction transaction in the sector 100 (e.g., auction transaction 2 j) as a target auction transaction and perform a sector consensus on the received sector 101 based on the target auction transaction to obtain a sector consensus result for returning to the consensus node 220A. It is understood that the consensus node 220A may take the block 101 as the next block of the block 100 to be written into the blockchain 2q shown in fig. 2 based on the received block consensus result.
As can be seen, when the consensus node 220A in the core consensus network generates a new block, i.e. the block 101, it needs to determine, according to the auction transaction 2j existing in the block 100 on the block chain 2q, that the block 101 to be generated is the first type block associated with the node identifier 2s in the auction transaction. This means that the tile 101 is an exclusive tile that is bid by a service node (e.g., service node 210A) corresponding to the node identifier 2s, and then the transaction in this tile 101 refers to the associated service transaction of the service node 210A, and there is no associated service transaction of other service nodes, so that the security of data storage can be improved. Further, the consensus node 220A may obtain the related service transactions of the service node 210A in batch from the node transaction pool 2000 quickly based on the transaction packing quantity specified by the auction transaction 2j, so as to quickly pack the obtained related service transactions to the block 101, so as to improve the transaction processing efficiency of the same service node.
Wherein the first consensus node in the core consensus network is based on block N on the blockchaini(Block with maximum Generation timestamp) identified auction transaction, generating Block NiNext block (block N)i+1I.e., the first type of tile associated with the node identification in the auction transaction) may be found in the embodiments corresponding to fig. 3-8 described below.
Further, please refer to fig. 3, wherein fig. 3 is a schematic flow chart of a transaction data processing method according to an embodiment of the present application. As shown in fig. 3, the method may be performed by a first common node in a core common network, where the first common node may be a server accessed to the core common network or a user terminal accessed to the core common network, and a specific form of the first common node is not limited herein. The first common node may be any one of the common nodes in the core common network shown in fig. 1, for example, the node 120 a. The method may comprise at least the following steps S101-S104:
step S101, obtaining a block N from a block chain of a core consensus networkiFor block NiThe transaction of (1) performs a transaction identification.
In particular, the first consensus node may obtain the block with the largest generation timestamp from the block chain of the core consensus network when generating the new block (e.g., the first consensus node may obtain the block with the largest generation timestamp from the block chain of the core consensus networkBlock Ni) And further can be applied to the block NiThe transaction in (1) is subjected to transaction identification to determine a block NiWhether there is an auction transaction, thereby determining the block NiThe next block (e.g., block N)i+1) Whether it is a block carrying an exclusive identity (i.e., a first type of block, e.g., an exclusive block) or a block not carrying an exclusive identity (i.e., a second type of block, e.g., a normal block).
The block chain of the core consensus network is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a string of data blocks associated by using cryptography, and each data block contains a batch of transactions generated by service nodes in a service network for verifying the validity of information (anti-counterfeiting) and generating a next block.
It should be understood that each service node in the service network may execute a transaction service to generate a service transaction according to a transaction execution result. Here, a first service node may be taken as an example, where if the first service node needs to separately store a generated service transaction (for example, transaction 1) to a first type block that the first service node auction in a slot auction manner, the first service node needs to assign an exclusive identifier to the transaction 1, and at this time, the transaction 1 assigned with the exclusive identifier may be referred to as a first type transaction of the first service node, that is, an exclusive transaction of the first service node. Optionally, if the first service node does not concern that the generated service transaction (for example, transaction 2) is written into the storage location on the blockchain, the first service node does not need to assign an exclusive identifier to the transaction 2, and at this time, the transaction 2 that is not assigned an exclusive identifier may be referred to as a second type of transaction of the first service node, that is, a normal transaction of the first service node. This means that transaction 2 can be written to either the exclusive sector that the first service node competes for, or to the normal sector on the blockchain. For the service transactions of the same service node, the transaction packing priority of the service transaction carrying the exclusive identifier is higher than the packing priority of the service transaction not carrying the exclusive identifier, that is, the transaction packing priority of the first type of transaction is higher than the packing priority of the second type of transaction.
It can be understood that each service node in the service network may count the transaction cumulative number of the service transactions (i.e. pending uplink transactions) that are generated by itself and are not written into the block chain, and further may store the transaction cumulative number in its node cache. It should be understood that each service node may obtain auction transaction generation conditions associated with the service network, and upon detecting that the transaction cumulative quantity reaches a transaction cumulative quantity threshold (e.g., 1000) in the auction transaction generation conditions, may generate an auction transaction for auctioning the first-type zone based on its node identification, the designated transaction packing quantity, and the auction assets.
For example, when a first service node of the service network detects that the transaction accumulated amount in its node cache is 1001, the first service node may determine that the transaction accumulated amount reaches the transaction accumulated amount threshold (for example, 1000), that is, the auction transaction generation condition is satisfied. At this time, the first service node may generate an auction transaction for auctioning the first type sector based on the node identification of the first service node, the transaction packing number (e.g., 500) specified by the first service node, and the auction asset determined by the first service node. The auction assets in the auction transactions are determined by the waiting time of the to-be-uplink transactions of the first service node, that is, the longer the waiting time of the to-be-uplink transactions is, the smaller the auction assets determined by the first service node are, otherwise, the shorter the waiting time of the to-be-uplink transactions is, the larger the auction assets determined by the first service node are.
The first type of transaction, the second type of transaction and the auction transaction generated by the first service node can be referred to as a to-be-broadcast transaction of the first service node. In order to effectively ensure the authenticity and the security of the transaction to be broadcasted of the first service node, after the transaction to be broadcasted is generated by the first service node, the transaction to be broadcasted may be signed based on the node private key of the first service node, so as to obtain signature information. Further, the first service node may send the generated transaction to be broadcasted and the signature information to the proxy node having the routing service together, so that the proxy node may perform authority verification (for example, verification of the signature information, validity verification of the first service node, transaction format verification of the transaction to be broadcasted, and the like) on the first service node to obtain an authority verification result. If the permission verification result is an illegal verification result, the proxy node may determine that the first service node is an illegal node, and at this time, the proxy node does not need to forward the transaction to be broadcasted of the first service node to the core consensus network. Optionally, if the permission verification result is a legal verification result, the proxy node may determine that the first service node is a legal node, and at this time, the proxy node may broadcast the transaction to be broadcasted, which carries the signature information, to the core consensus network to wait for the consensus node in the core consensus network to uplink the same. In order to improve data security of the transaction to be broadcasted when being forwarded to the core consensus network, the proxy node may further obtain a system public key of the core consensus network, encrypt the transaction to be broadcasted and the signature information together to obtain encrypted data information, and further broadcast the encrypted data information to a consensus node (for example, a first consensus node) in the core consensus network, so that the first consensus node decrypts the encrypted data information based on a system private key of the core consensus network, thereby obtaining the transaction to be broadcasted of the first service node and the signature information of the transaction to be broadcasted.
When the first common identification node acquires the transaction to be broadcasted and the signature information of the transaction to be broadcasted, the transaction to be broadcasted can be verified. Transaction verification here may include balance verification, double payment determination, etc. For example, in an electronic ticket scenario, the transaction to be broadcast may be generated by service node a (i.e., a first service node) when transferring an electronic ticket to service node B (i.e., a second service node in the service network). Then, the first consensus node needs to search the historical transaction information of the electronic ticket in the blockchain in the core consensus network, for example, determine whether the electronic ticket exists in the account of the service node a, whether the accounts of the service node a and the service node B are wrong, the source of the electronic ticket owned by the service node a, and so on.
When the verification fails, the first common identification node may determine that the transaction to be broadcasted is an illegal transaction, and further may send an uplink failure notification to the first service node to notify the first service node that the transaction to be broadcasted cannot be successfully written into the block chain. When the verification is successful, the first common node may add the transaction to be broadcast carrying the signature information to a node transaction pool (e.g., the node transaction pool 2000 shown in fig. 2) of the first common node, so as to perform a subsequent packaging process to obtain a new block.
Step S102, if the block N is identifiediIf there is an auction transaction, the block N is usediThe auction transaction in (1) is used as a first auction transaction, and the block N to be packaged is identified based on a first node in the first auction transactioni+1A first type of block associated with a first node identification is determined.
Specifically, if the first common node identifies block NiIf there is an auction transaction, the first common node can connect the block NiThe auction transaction in (1) is used as a first auction transaction, and further the node identification in the first auction transaction can be obtained. In this embodiment, the first common node may be located in the block NiThe node identification of the auction transaction identified in (1) is referred to as the first node identification. Further, the first common identification node may obtain a node identifier list maintained by a block chain network where the core common identification network is located, and then may search for a service node matching the first node identifier based on the node identifier list, and use the searched service node as the first service node. At this time, the first common node may pack the block N to be packedi+1A block of the first type (i.e. a block carrying an exclusive identity) determined to be associated with the first service node, and the exclusive identity may indicate block Ni+1An exclusive sector bid for the first service node).
Each blockchain node in a blockchain network (e.g., the blockchain network 1W shown in fig. 1) in which the core consensus network is located has a node identifier corresponding thereto, and each blockchain node may store a node identifier of another blockchain node in the blockchain node system, so that the generated block is broadcast to another blockchain node in the blockchain network according to the node identifiers of the other blockchain nodes in the subsequent process. Each blockchain node may maintain a node identifier list as shown in the following table, and store the node name and the node identifier in the node identifier list correspondingly. The node identifier may be an IP (Internet Protocol ) address and any other information that can be used to identify the node, and the node identifier in table 1 may be described by taking the IP address as an example. For ease of understanding, please refer to table 1, where table 1 is a node identification list provided in the embodiments of the present application. As shown in table 1:
TABLE 1
Figure 731442DEST_PATH_IMAGE001
The node identifier list shown in table 1 may be a node identifier list maintained by the blockchain network shown in fig. 1. The table 1 may include three types of block link nodes, and specifically may include a service node in a service network, a consensus node in a core consensus network, and a proxy node in a routing proxy network. The number of nodes included in the three sub-networks, i.e., the service network, the core consensus network, and the routing agent network, may be one or more, and is not limited herein.
For example, the first consensus node in the core consensus network is from block NiThe first node identifier obtained in the first auction transaction in (a) may be the node identifier s (for example, the node identifier s may be "117.114.161.174"), and at this time, the first consensus node may search for a service node matching the node identifier s in the node identifier list shown in table 1. When the first common node is looked up in Table 1When a service node (e.g., service node 110 a) matching the node identification s is found, the first common node may take the found service node 110a as the first service node. Further, the first common node may be configured to pack the block N to be packedi+1Is determined as a first type of block, block N, associated with the service node 110ai+1The exclusive sector bid for the service node 110 a.
Step S103, acquiring the related service transaction of the first service node based on the transaction packaging quantity specified by the first auction transaction.
The node transaction pool of the first common node may include a first type of transaction of the first service node and a second type of transaction of the first service node. Specifically, the first consensus node may obtain a transaction packing number specified by the first auction transaction, where the transaction packing number is used to indicate the block Ni+1A maximum transaction amount of the accommodated traffic transactions of the first traffic node. Further, since the packing priority of the first type of transaction of the first service node is higher than that of the second type of transaction of the first service node, the first common node may preferentially count the first critical transaction amount of the first type of transaction of the first service node in the node transaction pool based on the packing priority of the first type of transaction. It should be understood that, if the counted first key transaction quantity is greater than or equal to the transaction packing quantity, the first common node may obtain, from the node transaction pool, a first type of transaction of the first service node that matches the transaction packing quantity, and may further use the obtained first type of transaction as an associated service transaction of the first service node. Optionally, if the counted first key transaction quantity is smaller than the transaction packing quantity, the first common node may obtain, from the node transaction pool, the first type transaction of the first service node that matches the counted first key transaction quantity. Further, the first common node may determine a quantity difference between the transaction packing quantity and the counted first key transaction quantity, and further may determine the quantity difference as a quantity to be added, and in the node transaction pool, count again the second type of transaction of the first service nodeThe second key transaction amount of the transaction. When the counted second key transaction quantity is greater than or equal to the quantity to be added, the first common node may obtain, from the node transaction pool, the second type of transaction of the first service node that matches the quantity to be added. At this time, the first common node may use the obtained first type of transaction and the obtained second type of transaction as associated service transactions of the first service node.
For ease of understanding, please refer to fig. 4, where fig. 4 is a schematic view of a scenario for acquiring a related service transaction according to an embodiment of the present application. As shown in fig. 4, the node transaction pool 4000 in the embodiment of the present application may be a node transaction pool of a first common node in a core common node, and the node transaction pool 4000 may include a traffic transaction of each traffic node in a traffic network. For example, the node transaction pool 4000 may include a first type of transaction (e.g., exclusive transaction) for a first service node and a second type of transaction (e.g., normal transaction) for the first service node, where the first service node may identify a corresponding service node for a first node in a first auction transaction. In the electronic bill scenario, the first service node may be a tax office node corresponding to the area a, for example, the tax office node may be a computer device corresponding to XX tax office.
The area 41L shown in fig. 4 may include exclusive transactions of the first service node, specifically, may include exclusive transaction 1, exclusive transaction 2, …, and exclusive transaction x. The area 42L shown in fig. 4 may include normal transactions of the first service node, and specifically may include normal transaction 1, normal transaction 2, …, and normal transaction y.
It can be understood that the first common identification node needs to obtain the transaction packaging number K (for example, 1000) specified by the first auction transaction from the identified first auction transactions before obtaining the associated service transactions of the first service node, where the transaction packaging number K here can be used to indicate the maximum transaction number of the service transactions of the first service node that the first common identification node can obtain from the node transaction pool 4000.
Wherein, due to the first service nodeIs higher than the packing priority of the second type of transaction of the first service node. In other words, the packing priority of the exclusive transaction of the first service node is higher than that of the ordinary transaction of the first service node, so that the first common node needs to count the first critical transaction number of the exclusive transaction of the first service node (for example, the first critical transaction number H shown in fig. 4) in the node transaction pool 4000 first1) Further, the first key transaction amount H can be determined1And whether the number of the transaction packages is less than the transaction packing number K specified by the first auction transaction or not is determined, and whether the first consensus node needs to acquire the common transaction of the first service node or not is determined according to a judgment result obtained after judgment.
It should be understood that if the first common node counts the first critical transaction amount H1(e.g., 1500) are greater than or equal to the transaction packing number K (e.g., 1000), the first common node may obtain the exclusive transactions of the first service node corresponding to the transaction packing number K from the node transaction pool 4000, that is, obtain the exclusive transactions of 1000 first service nodes from 1500 exclusive transactions. Further, the first common node may use all the acquired exclusive transactions as associated service transactions of the first service node.
Optionally, if the first common node counts the first critical transaction amount H1(e.g., 800) less than the packed transaction amount K (e.g., 1000), the first consensus node may obtain and count a first key transaction amount H from the node transaction pool 40001The corresponding exclusive transactions of the first service node, that is, the exclusive transactions of 800 first service nodes are obtained from the node transaction pool 4000, that is, the first common node can obtain all the exclusive transactions of the first service node from the node transaction pool 4000. Further, the first consensus node needs to determine the transaction packing number K and the counted first key transaction number H1A quantity difference therebetween, which in turn may be determined as the quantity to be added (e.g., 200). At this time, the first common node may count the first traffic in the node transaction pool 4000Second Critical transaction quantity (e.g., H) of common transactions of the node2)。
It should be understood that the second critical transaction amount H is counted2When the number (e.g., 500) is greater than or equal to the number to be added (e.g., 200), the first common node may obtain the common transactions of the first service node corresponding to the number to be added from the node transaction pool 4000, that is, the first common node may filter out the common transactions of 200 first service nodes from the common transactions of 500 first service nodes in the node transaction pool 4000. Optionally, in the second key transaction amount H2(e.g., 50) are less than the amount to be added (e.g., 200), the first common node may obtain and count a second critical transaction amount H from the node transaction pool 40002The corresponding common transactions of the first service node, that is, the first common node may obtain the common transactions of 50 first service nodes from the node transaction pool 4000, that is, the first common node may obtain all the common transactions of the first service node from the node transaction pool 4000. At this time, the first common node may use the acquired exclusive transaction and the acquired common transaction as the associated service transaction of the first service node.
Step S104, generating a block N according to the related business transactioni+1Block Ni+1Broadcast to a second consensus node in the core consensus network, such that the second consensus node is directed to block Ni+1Block consensus is performed.
Specifically, after obtaining the associated business transaction, the first consensus node may generate an auction asset transfer transaction for the first auction transaction based on the intelligent contract on the blockchain. Further, the first consensus node may obtain auction transaction packaging conditions associated with the core consensus network, and may further determine to package to block N based on the associated business transaction, the auction asset transfer transaction, and the auction transaction packaging conditionsi+1To-be-processed transaction in (1). At this time, the first common node may perform a packing process on the transaction to be processed to obtain a block Ni+1And block Ni+1BroadcastingTo a second consensus node in the core consensus network.
It should be understood that the first common node may obtain the auction assets in the first auction transaction after obtaining the associated service transaction, and further needs to obtain an intelligent contract on the blockchain to determine whether the first service node has an account balance greater than or equal to the auction assets according to the intelligent contract. If the first service node has an account balance greater than or equal to the auction asset, the first consensus node may generate an auction asset transfer transaction for the first auction transaction for subsequent packaging into block Ni+1
It can be understood that, because transactions such as contract change and configuration update on the global chain need to be stored in the second type block (for example, a common block that does not carry an exclusive identifier), an auction transaction packaging condition may be set in the embodiment of the present application to solve the problem that transactions such as contract change on the block chain and configuration update on the global chain cannot be written in the block chain in time due to existence of auction transactions in the node transaction pool. In this embodiment, the auction transaction packaging condition may indicate that when a first type block (i.e. a block carrying an exclusive identifier) continuously appears with a certain threshold (e.g. 20) of the number of blocks, the next block is defined as a second type block (e.g. a block not carrying an exclusive identifier). Based on this, the first common identification node generates a block N based on the associated service transaction of the first service nodei+1In the process, not only an auction asset transfer transaction for the first auction transaction needs to be added, but also whether a new auction transaction needs to be packaged or not needs to be determined so as to indicate the block Ni+1Whether the next block of (a) is a block carrying an exclusive identity.
It should be appreciated that the first consensus node may obtain auction transaction packaging conditions associated with the core consensus network over the blockchain. Wherein the auction transaction packaging condition comprises a threshold number of contiguous tiles (e.g., 20) associated with the first type of tile. It should be appreciated that the first common node may be configured to associate block N with block NiAs a traversal start block, it can then be based on a blockchainAnd counting the number of blocks of the first type of blocks continuously appearing on the block chain by traversing the indicated index direction and the initial block.
If the counted number of blocks (e.g., 20) reaches the threshold number of consecutive blocks, the first common node may determine block Ni+1The auction transaction packaging condition is not satisfied, at this time, the first consensus node can take the associated business transaction and the auction asset transfer transaction as packaging for the block Ni+1To-be-processed transaction in (1).
Alternatively, if the counted number of blocks (e.g., 15) does not reach the threshold of the number of consecutive blocks, the first common node may determine that the block N is a block Ni+1The auction transaction packaging condition is satisfied, at this time, the first consensus node can be screened for packaging to the block N based on auction transactions in the node transaction pool of the first consensus nodei+1The second auction transaction of (2) further may be used for packaging the associated service transaction of the first service node, the auction asset transfer transaction generated for the first auction transaction, and the screened out second auction transaction into the block Ni+1To-be-processed transaction in (1). Wherein the second auction transaction can be used to indicate the sector Ni+1The next block of (a) is a first type block associated with a second service node in the service network; the second service node may identify a corresponding service node for the second node in the second auction transaction. The second service node may be the same as the first service node, or may be different from the first service node, and is not limited herein. In other words, when a business transaction of a certain business node is urgent to uplink and a full network account book is written, a first type block (e.g., an exclusive block) that the same business node competes for can continuously appear on a block chain of the core consensus network.
When the first common identification node screens the second auction transactions, X auction transactions stored in the node transaction pool of the first common identification node can be obtained, and then auction assets of each auction transaction in the X auction transactions can be determined. Wherein, the X auction transactions are forwarded by the service nodes in the service network through the proxy node, and X is a positive integer. Further, the first consensus node may screen the auction transaction with the largest auction asset from the X auction transactions based on the auction assets of each auction transaction, and may further use the screened auction transaction as the auction transaction to be verified. At this time, the first consensus node may perform transaction verification on the auction transaction to be verified to obtain a transaction verification result.
It can be understood that, in the process of transaction verification of the transaction to be verified, the first consensus node may verify whether the transaction signature information of the transaction to be verified and the second service node associated with the transaction to be verified have auction qualification. It should be understood that, after the second service node corresponding to the second node identifier in the auction transaction to be verified generates the auction transaction to be verified, in order to ensure the authenticity and security of the auction transaction to be verified in data transmission, the second service node may perform signature processing on the auction transaction to be verified based on the node private key of the second service node, so as to obtain transaction signature information corresponding to the auction transaction to be verified. When the first consensus node performs transaction verification on the auction transaction to be verified, the transaction signature information corresponding to the auction transaction to be verified can be obtained first, and then the node public key of the second service node can be obtained, and the transaction signature information is verified based on the node public key to obtain a signature verification result. When the signature verification result indicates that the verification is successful, the first common identification node can determine the validity of the second service node based on the intelligent contract and the illegal node list associated with the service network, and further can determine the transaction verification result of the to-be-verified auction transaction based on the validity of the second service node.
When the transaction verification result of the transaction to be verified indicates that the verification is successful, the first common identification node can package the transaction to be verified as the transaction to be verified to the block Ni+1The second auction transaction of (1). Optionally, when the transaction verification result of the auction transaction to be verified indicates that the verification fails, the first common node may re-screen another auction transaction in the node transaction pool as a new auction transaction to be verified until the transaction verification result of the new auction transaction to be verified indicates that the verification is successfulThen, the new auction transaction to be verified may be used as for packaging into tile Ni+1The second auction transaction of (1).
For ease of understanding, please refer to fig. 5, and fig. 5 is a schematic view illustrating a scenario of determining a second auction transaction according to an embodiment of the present application. As shown in fig. 5, the service node 510B in the embodiment of the present application may be a second service node in the service network, and the service node 510B may be any one of the service nodes in the service network shown in fig. 1, for example, the node 110B. The consensus node 520A in this embodiment may be a first consensus node in a core consensus network, and the consensus node 520A may be any one of the consensus nodes in the core consensus network shown in fig. 1, for example, the node 120A. The proxy node 50D in this embodiment may be used to perform network isolation between the service network and the core consensus network, and the proxy node 50D may be the proxy node 10D shown in fig. 1.
It should be appreciated that service node 510B in the service network may generate auction transaction 52j shown in fig. 5 upon detecting that the accumulated number of transactions in its own node cache satisfies the auction transaction generation condition. For a specific implementation of the service node 510B generating the auction transaction 52j, reference may be made to the specific implementation of the service node in the service network for generating the auction transaction, which will not be described again here. In order to effectively ensure the authenticity and security of the auction transaction 52j in data transmission, the service node 510B may perform signature processing on the auction transaction 52j based on the node private key of the service node 510B to obtain transaction signature information, and may further send the auction transaction 52j carrying the transaction signature information to the proxy node 50D shown in fig. 5. It is understood that the service node 510B may obtain a hash calculation rule for the auction transaction 52j, and the hash calculation rule may be a digest algorithm agreed in advance for the service node 510B and other blockchain nodes in the blockchain network where the service network is located. Accordingly, the service node 510B may hash the auction transaction 52j based on the hash calculation rule to obtain the summary information of the auction transaction 52 j. In this embodiment, the summary information of the auction transaction 52j determined by the service node 510B may be referred to as first summary information. Further, the service node 510B may perform signature processing on the first digest information based on a node private key of the service node 510B, so as to obtain the transaction signature information shown in fig. 5.
It is to be appreciated that the agent node 50D may verify the received auction transaction 52j carrying the transaction signature information, and upon successful verification, may forward the auction transaction 52j carrying the transaction signature information to the consensus node 520A in the core consensus network. When the consensus node 520A successfully verifies the auction transaction 52j carrying the transaction signature information, the consensus node 520A may store the auction transaction 52j carrying the transaction signature information to the node transaction pool 5000 shown in fig. 5.
In the node transaction pool 5000 shown in fig. 5, auction transactions sent by a plurality of service nodes in a service network may be included. For convenience of illustration, in the embodiment of the present application, the number of service nodes in a service network where the service node 510B is located may be 4, which may specifically include the service node 510A, the service node 510B, the service node 510C, and the service node 510D. For example, auction transaction 51j may be generated for service node 510A in the service network, auction transaction 53j may be generated for service node 510C in the service network, and auction transaction 54j may be generated for service node 510D in the service network.
It is to be appreciated that the consensus node 520A can determine the block N to be generated when the consensus node 520A counts that the number of blocks (e.g., 18) of the first type of blocks that occur consecutively on the blockchain does not reach the consecutive number of blocks threshold (e.g., 20)i+1And the packaging condition of the auction transaction is met. At this point, the consensus node 520A may take the 4 auction transactions stored by the node transaction pool 5000 and determine the auction assets for each auction transaction. For example, auction asset 51z for auction transaction 51j shown in FIG. 5 may be 10 tokens, auction asset 52z for auction transaction 52j may be 30 tokens, auction asset 53z for auction transaction 53j may be 19 tokens, and auction asset 54z for auction transaction 54j may be 21 tokens.
Further, the consensus node 520A may screen the auction transaction with the largest auction asset from the 4 auction transactions based on the auction assets of each auction transaction, and may further take the screened auction transaction as the auction transaction to be verified (e.g., auction transaction 52j shown in fig. 5). At this time, the consensus node 520A may perform transaction verification on the screened auction transaction 52j to obtain a transaction verification result of the auction transaction 52 j.
The consensus node 520A may first obtain transaction signature information corresponding to the auction transaction 52j, and further may obtain a node public key of the service node 510B, and verify the transaction signature information based on the node public key of the service node 510B to obtain a signature verification result. It can be understood that the consensus node 520A may obtain the node public key of the service node 510B, and may further verify the transaction signature information based on the node public key of the service node 510B to obtain the first digest information of the auction transaction 52 j. Meanwhile, the consensus node 520A may also obtain the same hash calculation rule as the service node 510B, and perform hash calculation on the auction transaction 52j, so as to obtain the summary information of the auction transaction 52 j. The summary information of the auction transaction 52j determined by the consensus node 520A may be referred to as second summary information in the embodiment of the present application.
At this time, the consensus node 520A may compare the first summary information with the second summary information to obtain a signature verification result, so as to determine whether the auction transaction 52j is tampered. It will be appreciated that if the first summary information is not the same as the second summary information, the consensus node 520A may determine that the signature verification indicates a verification failure, meaning that the auction transaction 52j may be tampered with. At this time, the consensus node 520A may re-screen another auction transaction in the node transaction pool 5000 as a new auction transaction to be verified, and may package the new auction transaction to be verified as a transaction for packing into the block N until the transaction verification result of the new auction transaction to be verified indicates that the verification is successfuli+1The second auction transaction of (1).
Alternatively, if the first digest information is the same as the second digest information, the consensus node 520A may determine that the signature verification result indicates a successful verification, which means that the auction transaction 52j has not been tampered with and that the auction transaction 52j was indeed sent by the service node 510B. At this point, the consensus node 520A may determine whether the service node 520B qualifies for an auction based on the intelligent contract on the blockchain. For example, in an electronic ticketing scenario, the intelligent contract may specify that a service node with administrative privileges qualifies for an auction. Here, the management authority may refer to an authority possessed by a service node having regional attributes such as province, city, district, and the like, or an authority possessed by a bouquet in a certain game play in a game scene, and is not limited herein. In addition, the consensus node 520A may also obtain a list of illegitimate nodes associated with the service network to determine the validity of the service node 510B, and may further determine a transaction verification result for the auction transaction 52j based on the validity of the service node 510B. The illegal node list may refer to a blacklist stored by the proxy node 50D, and the illegal nodes corresponding to the illegal node identifiers in the illegal node list may include detected malicious nodes, nodes reported by others, nodes that send abnormal transaction frequency for a certain period of time, and the like.
Wherein, when the transaction verification result indicates that the service node 510B is qualified for auction and the service node 510B is legal, the consensus node 520A may determine that the transaction verification transaction indication is verified successfully, and at this time, the consensus node 520A may use the auction transaction 52j as the transaction for packing into the block Ni+1The second auction transaction of (1). Optionally, when the transaction verification result indicates that the service node 510B does not have the auction qualification, or the service node 510B does not have the validity, the consensus node 520A may determine that the transaction verification transaction indication fails to be verified, at this time, the consensus node 520A may re-screen another auction transaction in the node transaction pool 5000 to serve as a new auction transaction to be verified, until the transaction verification result of the new auction transaction to be verified indicates that the verification is successful, the new auction transaction to be verified may be used for packing into the block Ni+1The second auction transaction of (1).
It should be appreciated that the first consensus node determinationFor packing to block Ni+1The pending transaction in (b) may include an associated traffic transaction of the first traffic node determined by the first consensus node in the node transaction pool for block NiThe first auction transaction generates an auction asset transfer transaction, and the first consensus node screens out a second auction transaction from the node transaction pool. It is understood that the first consensus node may perform a packing process on the determined pending transaction to obtain a block N for broadcasting to a second consensus node in the core consensus networki+1(e.g., block 101 of FIG. 2) such that the second cognate node is coupled to the received block Ni+1And performing block consensus to obtain a block consensus result.
Wherein the second common node receives the block Ni+1When block consensus is performed, block N may be determinedi+1Whether to carry an exclusive identity. When the second common node receives the block Ni+1When the first type of block (e.g. the block carrying the exclusive identity) is identified, the second consensus node may obtain the block N with the largest generation timestamp from the block chain in the core consensus networkiFurther, it can be applied to the block NiThe transaction of (1) performs a transaction identification. If the second common node identifies block NiIf there is an auction transaction, the second consensus node may connect the block NiThe auction transaction in (1) is used as a target auction transaction, and further the block N can be executed based on the target auction transactioni+1And performing block consensus to obtain a block consensus result for returning to the first consensus node.
Wherein, it can be understood that if the second common node identifies the block NiIf there is an auction transaction, the second consensus node may connect the block NiThe auction transaction in (1) is taken as a target auction transaction. Wherein the target auction transaction may include a target node identification and a target packaging quantity. Further, the second common node may count block Ni+1The target node marks the corresponding business transaction quantity of the associated business transaction, and compares the counted business transaction quantity with the target packaging quantity to obtain a comparison result. Meanwhile, the second consensus node can also identify the target node and the block Ni+1Each transaction in the associated business transaction is respectively matched to obtain a matching result. Further, the second consensus node may determine a block consensus result for returning to the first consensus node based on the comparison result and the matching result.
For easy understanding, please refer to fig. 6, wherein fig. 6 is a schematic view illustrating a scenario in which a second consensus node performs block consensus on a new block according to an embodiment of the present application. As shown in fig. 6, the consensus node 620A in the embodiment of the present application may be a first consensus node with a block extracting function in a core consensus network, and the consensus node 620A may be any one of the consensus nodes in the core consensus network shown in fig. 1, for example, the node 120A. The consensus node 620B in this embodiment may be a second consensus node in the core consensus network, and the consensus node 620B may be another consensus node in the core consensus network shown in fig. 1, for example, the node 120B.
As shown in fig. 6, after the consensus node 620A determines the pending transaction from the node transaction pool of the consensus node 620A, the pending transaction may be packaged to obtain a block NiThe next block (e.g., block 101 shown in fig. 6). The block 101 may carry an exclusive identifier, and the exclusive identifier may indicate that the block 101 is an exclusive block that is contended by a first service node in a service network. Further, the common node 620A can broadcast the block 101 carrying the exclusive id to the common node 620B shown in fig. 6.
When receiving the block 101 carrying the exclusive id, the consensus node 620B may determine that the block 101 is an exclusive block that the first service node competes for, at this time, the consensus node 620B may obtain the block (e.g., the block 100) with the largest generation timestamp from a block chain (e.g., the block chain 6 q) in the core consensus network. Further, the consensus node 620B may perform transaction identification on the transaction in the block 100 to determine whether there is an auction transaction in the block 100.
If the consensus node 620B identifies that there is no auction transaction in the block 100, the second consensus node may determine that the block 101 consensus fails, i.e., obtain a consensus failure result of the block 101, and may use the consensus failure result as a block consensus result for returning to the consensus node 620A shown in fig. 6.
Alternatively, if the consensus node 620B identifies that there is an auction transaction in the sector 100, the consensus node 620B may acquire the auction transaction in the sector 100 (e.g., auction transaction 6j shown in fig. 6), and may further use the acquired auction transaction 6j as a target auction transaction. The auction transaction 6j may include, among other things, a target node identification (e.g., node identification "117.114.161.174") and a target packaging quantity (e.g., 1000). Further, the consensus node 620B may count the number of service transactions of the associated service transactions corresponding to the target node identifier in the block 101, and compare the counted number of service transactions with the target packing number to obtain a comparison result. At the same time, the consensus node 620B may further match the target node identifier with each of the associated service transactions of the block 101, respectively, to obtain a matching result.
If the comparison result indicates that the counted number of service transactions (e.g., 900) is less than or equal to the target packing number (e.g., 1000), and the matching result indicates that each transaction in the block 101 is a transaction corresponding to the target node identifier, the consensus node 620B may determine that the block 101 consensus is successful, that is, obtain a result of the consensus successful for the block 101, and may further use the result of the consensus as a block consensus result for returning to the consensus node 620A shown in fig. 6. Optionally, if the comparison result indicates that the counted number of service transactions (e.g., 1010) is greater than the target packing number (e.g., 1000), or the matching result indicates that there are transactions corresponding to other node identifiers except the target node identifier in the block 101, the consensus node 620B may determine that the block 101 is in a consensus failure, that is, a consensus failure result of the block 101 is obtained, and then may use the consensus failure result as a block consensus result for returning to the consensus node 620A shown in fig. 6.
It should be understood that,the first consensus node may receive the block consensus result returned by the second consensus node, and may perform result analysis on the received block consensus result, and if the block consensus result exceeding a consensus threshold (e.g., 1/2 or 2/3) exists in the block consensus result indicating that the consensus is successful, the first consensus node may determine that the consensus node in the core consensus network has consensus, and may further associate the block N with the block Ni+1Writing to a blockchain in a core consensus network (e.g., blockchain 6q shown in fig. 6), i.e., writing N toi+1As block NiThe next block of the first service node, the related service transactions of the first service node can be written into the block chain in batch, so that the transaction processing efficiency of the first service node is improved. In addition, since block Ni+1Service transactions of other service nodes in the service network do not exist, and therefore the safety of data storage can be improved.
Further, please refer to fig. 7, and fig. 7 is a flowchart illustrating a transaction data processing method according to an embodiment of the present application. As shown in fig. 7, the method may be performed by a first common node in a core common network, where the first common node may be a server accessed to the core common network or a user terminal accessed to the core common network, and a specific form of the first common node is not limited herein. The first common node may be any one of the common nodes in the core common network shown in fig. 1, for example, the node 120 a. The method may comprise at least the following steps S201-S207:
step S201, obtaining a block N from a block chain of a core consensus networkiFor block NiThe transaction of (1) performs a transaction identification.
Step S202, if the block N is identifiediIf there is an auction transaction, the block N is usediThe auction transaction in (1) is used as a first auction transaction, and the block N to be packaged is identified based on a first node in the first auction transactioni+1A first type of block associated with a first node identification is determined.
Step S203, acquiring the associated service transaction of the first service node based on the transaction packing quantity specified by the first auction transaction.
Step S204, generating a block N according to the related business transactioni+1Block Ni+1Broadcast to a second consensus node in the core consensus network, such that the second consensus node is directed to block Ni+1Block consensus is performed.
Wherein the first common node generates a block N according to the associated service transactioni+1Can carry an exclusive ID, and the exclusive ID can be used to mark the block Ni+1And obtaining the exclusive blocks shot for the first service node. The embodiment of the application can enable the second consensus node pair to carry the block N with the exclusive identifieri+1The block consensus result obtained after the block consensus is performed is called a first block consensus result.
For specific implementation of steps S201 to S204, reference may be made to the description of steps S101 to S104 in the embodiment corresponding to fig. 3, which will not be described herein again.
In step S205, if the block N is identifiediIf no auction transaction exists, the block N to be packedi+1Determined to be a second type block.
Specifically, if the first common node identifies block NiIf there is no auction transaction, the first consensus node can transmit the block N to be packedi+1Determined to be a second type of block (i.e., a block that does not carry an exclusive identity, e.g., a normal block).
Step S206, the second type transaction sent by the service node in the service network through the proxy node is obtained from the node transaction pool of the first common node.
Specifically, the first common consensus node may obtain, from a node transaction pool of the first common consensus node, each transaction packaging asset belonging to a second type of transaction (e.g., a common transaction), and may further obtain, based on the obtained transaction packaging assets, from the node transaction pool for packaging to the block Ni+1The transaction of (2).
Step S207, generating a block N according to the acquired second type transactioni+1Block Ni+1Broadcasting into core consensus networksA second common node, such that the second common node is coupled to the block Ni+1Block consensus is performed.
Specifically, the first consensus node may be selected from the node trading pool for packing into block Ni+1Is determined (i.e., a third auction transaction). For a specific implementation manner of the first consensus node screening the third auction transaction, reference may be made to the above specific implementation manner of the first consensus node screening the second auction transaction, which will not be described herein again. Further, the first consensus node may determine the obtained second-type transaction and the screened third auction transaction as pending transactions, and may further perform packing processing on the determined pending transactions to obtain a block Ni+1Further, the first common node may generate a block N that does not carry an exclusive identityi+1Broadcasting to a second consensus node in the core consensus network so that the second consensus node pairs to a block N not carrying an exclusive IDi+1Block consensus is performed to obtain a block consensus result for returning to the first consensus node. In this embodiment, the second common identification node may be coupled to the block N not carrying the exclusive identifieri+1The block consensus result obtained after the block consensus is performed is called a second block consensus result.
It should be understood that the second pair of common node pairs is for block N that does not carry an exclusive identityi+1When block consensus is performed, a consensus algorithm (e.g., Paxos algorithm) may be used to perform block N that does not carry an exclusive identityi+1And performing block verification to obtain a voting result, and broadcasting the voting result to other consensus nodes in the core consensus network. At this time, each consensus node in the core consensus network may collect the block N that does not carry the exclusive identifier by the second consensus nodei+1The voting result obtained after the block verification is performed, and when a certain number (for example, 2/3) of voting results are collected, it can be determined that block N does not carry the exclusive identifieri+1Is confirmed, and a second block consensus result can be generated. For example, the second block consensus result collected at the first consensus node indicates that there are 2/3 second block consensus results indicating consensusWhen the first consensus node succeeds, the first consensus node can determine that the consensus nodes in the core consensus network achieve consensus, and further can enable the block N which does not carry the exclusive marki+1As block NiTo write to the block chain in the core consensus network.
The Paxos algorithm is a two-stage algorithm, mainly having three roles, and specifically may include a proposal initiator (promoter) for raising an issue, a proposal receiver (acceptor) for determining approval or rejection, and a learner (learner) for passively receiving an agreed-upon learner. Each of the consensus nodes in the core consensus network can simultaneously play multiple roles of three roles, which will not be described in detail herein.
For ease of understanding, please refer to fig. 8, where fig. 8 is a system architecture diagram in a context of a blockchain electronic ticket according to an embodiment of the present application. As shown in fig. 8, the service network, the routing proxy network, and the core consensus network in the embodiment of the present application constitute a whole complete blockchain service system. The core chain shown in fig. 8 may be a block chain maintained by the core consensus network that includes complete block data.
It is understood that when the blockchain is used in some scenarios of government (e.g., tax system) or commercial institutions, in order to improve the confidentiality and security of data, related data such as personal privacy or national security are involved in the blockchain system, a hierarchical blockchain structure of "service network-core consensus network" in the embodiments of the present application may be used.
The system architecture diagram can be applied to the circulation process of the electronic bill, and specifically can comprise the processes of application of the electronic bill, issuance of the electronic bill, reimbursement of the electronic bill, tax declaration of the electronic bill and the like. The making of the electronic bill is also called the generation process of the electronic bill. The whole circulation process of the electronic bill involves a supervision mechanism, a invoicing party, a reimbursement party and a tax declaring party. Therefore, the service nodes in the service network shown in fig. 8 may include terminal devices corresponding to electronic tax offices, terminal devices corresponding to enterprise users, and terminal devices corresponding to consuming users. The electronic tax bureau may refer to a monitoring organization (e.g., a computer device corresponding to a tax bureau in a province, a city, a district, etc.) in a monitoring private network, the enterprise user may be an invoicing facilitator, an reimbursement facilitator, or a retail enterprise (e.g., a KA enterprise, i.e., a large retail customer and an important retail customer enterprise) in a public cloud, and the consumer user may be a payment facilitator, a circulation facilitator, or a retail enterprise in a private cloud. The service node in the service network may generate three types of transactions to be broadcast in the process of executing the transaction service, and specifically may include a service transaction (i.e., a first type transaction) carrying an exclusive identifier, a service transaction (i.e., a second type transaction) not carrying an exclusive identifier, and an auction transaction for auctioning a first type of block (e.g., an exclusive block).
The proxy node in the routing proxy network can be used for network isolation of the service network and the core consensus network, and the proxy node can have point-to-point service (namely, P2P service), routing service, certificate caching and authentication service. It is understood that the point-to-point service refers to a service in the P2P network, and based on a specific network protocol, a central node is not required between network nodes in the P2P network to maintain the network state, but each node maintains the node state of the whole network or the connection state of its neighboring nodes through broadcast interaction with the neighboring nodes. Routing services are the basic functions of nodes and may be used for communication between nodes to provide network isolation between the traffic network and the core consensus network. The certificate cache is used for caching identity certificates of each node, where a certificate may refer to Public Key Infrastructure (PKI), and in the certificate authority, a certificate is an identification of a Public Key owner and is issued by an authority (CA). Asymmetric encryption and digital signature for information can be realized based on a public key certificate system. The public key certificate system may include public and private key passwords, x509 certificates, CA certificate issuing centers, and the like. The authentication service may be used for authentication etc. of a service node in a service network. It is understood that, in the embodiment of the present application, the proxy node may forward the transaction sent by the service node in the service network to the core consensus network, so that the consensus node in the core consensus network writes it into the blockchain.
The consensus node (i.e., the billing node) in the core consensus network may be a trusted node in the tax private network, and may determine whether a service node generating an auction transaction is qualified for auction by invoking an authority contract (e.g., an intelligent contract). The authority contract also stores circulation logic about the whole life cycle of the electronic bill, such as the bill state of the electronic bill, circulation flow, access authority of data, electronic bill claim condition, electronic bill making condition and the like. It is understood that each consensus node may receive the transaction to be broadcasted forwarded by the proxy node, verify the transaction to be broadcasted, and when the verification is successful, store the transaction to be broadcasted into a node transaction pool (i.e., the cache shown in fig. 8) of the consensus node. A consensus node (e.g., a first consensus node) in the core consensus network may be for a block N with a largest generated timestamp on the blockchainiThe transaction in (1) is subjected to transaction identification to determine a block NiWhether there is an auction transaction for auctioning the first type of tile. If block NiIf there is an auction transaction (i.e. the first auction transaction), the first common node may determine the block N to be generated based on the first node identifier in the first auction transactioni+1A first type block (for example, a block carrying an exclusive identifier) obtained by auction of a first service node corresponding to a first node identifier may be identified for the first node, and then, based on a transaction packing quantity in the first auction transaction, associated service transactions of the first service node may be quickly obtained from a node transaction pool of the first common node, and packed in batch to the block Ni+1Therefore, the transaction processing efficiency of the same service node is improved. In addition, due to the newly generated block Ni+1The related service transactions of other service nodes do not exist in the method, so that the transactions of different service nodes can be better isolated, better privacy protection is realized, and the safety of data storage is improved. In addition, the mechanism of generating new blocks through position auction not only can enable single serviceThe node controls the associated service transaction to exist in a single block in a limited way, so that the subsequent transaction audit and verification aiming at the same service node are facilitated, the block chain can effectively meet the service node with the urgent batch invoicing requirement as much as possible according to the auction assets in the auction transaction, and the efficiency and the fairness of service processing can be effectively improved.
Further, please refer to fig. 9, and fig. 9 is a schematic structural diagram of a transaction data processing apparatus according to an embodiment of the present application. The transaction data processing device 1 may be a computer program (including program code) running in a computer apparatus, e.g. the transaction data processing device 1 is an application software; the transaction data processing device 1 may be used to perform corresponding steps in the method provided by the embodiments of the present application. As shown in fig. 9, the transaction data processing apparatus 1 may operate in a first common node in a core common network, and the first common node may be the common node 220A in the embodiment corresponding to fig. 2. The transaction data processing device 1 may include: the system comprises a transaction identification module 10, a first type block determination module 20, an associated service transaction acquisition module 30, a first block broadcasting module 40, a second type block determination module 50, a transaction acquisition module 60 and a second block broadcasting module 70.
The transaction identification module 10 is used for obtaining a block N from a block chain of a core consensus networkiFor block NiPerforming transaction identification on the transaction; block NiThe block with the largest generation time stamp on the block chain is obtained; i is a positive integer;
the first type block determining module 20 is used for identifying the block NiIf there is an auction transaction, the block N is usediThe auction transaction in (1) is used as a first auction transaction, and the block N to be packaged is identified based on a first node in the first auction transactioni+1Determining a first type of block associated with a first node identification; the first auction transaction is forwarded by a first service node corresponding to the first node identification through the proxy node; the proxy node is used for carrying out network isolation on the core consensus network and the service network where the first service node is located.
The first type block determining module 20 includes: a node identifier obtaining unit 201, a service node searching unit 202 and a block type determining unit 203.
The node identifier obtaining unit 201 is configured to obtain the node identifier of the block N if the block N is identifiediIf there is an auction transaction, the block N is usediThe auction transaction in the first auction transaction is used as a first auction transaction, and a first node identifier in the first auction transaction is obtained;
the service node searching unit 202 is configured to obtain a node identifier list maintained by a block chain network in which a core consensus network is located, search a service node matched with a first node identifier based on the node identifier list, and use the searched service node as a first service node;
the block type determining unit 203 is used for determining the block N to be packedi+1A first type of block associated with the first service node is determined.
For specific implementation manners of the node identifier obtaining unit 201, the service node searching unit 202, and the block type determining unit 203, reference may be made to the description of step S102 in the embodiment corresponding to fig. 3, and details will not be described here again.
The associated service transaction obtaining module 30 is configured to obtain an associated service transaction of the first service node based on the transaction packing quantity specified by the first auction transaction.
The node transaction pool of the first common node comprises first type transactions of the first service node and second type transactions of the first service node; the packing priority of the first type of transaction is higher than that of the second type of transaction;
the associated service transaction acquiring module 30 includes: a transaction packaging amount obtaining unit 301, a key transaction amount counting unit 302, a first type transaction obtaining unit 303, a second type transaction obtaining unit 304 and an associated service transaction determining unit 305.
The transaction packaging amount obtaining unit 301 is configured to obtain a transaction packaging amount specified by a first auction transaction; transaction packing number used to indicate block Ni+1Service handing of a first service node accommodatedA maximum number of transactions that are easy;
the critical transaction quantity counting unit 302 is configured to count a first critical transaction quantity of a first type transaction of a first service node in a node transaction pool based on a packaging priority of the first type transaction;
the first type transaction obtaining unit 303 is configured to obtain, from the node transaction pool, a first type transaction of the first service node that matches the counted first key transaction amount if the counted first key transaction amount is smaller than the transaction packing amount;
the second type transaction obtaining unit 304 is configured to determine a quantity difference between the transaction packed quantity and the counted first key transaction quantity, determine the quantity difference as a quantity to be added, and count a second type transaction of the first service node in the node transaction pool;
the associated service transaction determining unit 305 is configured to, when the counted second key transaction amount is greater than the amount to be added, obtain a second type of transaction of the first service node that matches the amount to be added from the node transaction pool, and use the obtained first type of transaction and the obtained second type of transaction as the associated service transaction of the first service node.
For specific implementation manners of the transaction packing amount obtaining unit 301, the key transaction amount counting unit 302, the first-class transaction obtaining unit 303, the second-class transaction obtaining unit 304, and the associated service transaction determining unit 305, reference may be made to the description of step S103 in the embodiment corresponding to fig. 3, and details will not be further described here.
The first block broadcasting module 40 is used for generating a block N according to the related service transactioni+1Block Ni+1Broadcast to a second consensus node in the core consensus network, such that the second consensus node is directed to block Ni+1Block consensus is performed.
The first block broadcasting module 40 includes: an asset transfer transaction generation unit 401, a pending transaction determination unit 402, and a tile broadcast unit 403.
The asset transfer transaction generating unit 401 is configured to generate an auction asset transfer transaction for a first auction transaction based on an intelligent contract on a blockchain after acquiring the associated service transaction;
the pending transaction determining unit 402 is configured to obtain an auction transaction packaging condition associated with the core consensus network, and determine to package the pending transaction into a block N based on the associated business transaction, the auction asset transfer transaction, and the auction transaction packaging conditioni+1To-be-processed transaction in (1).
Wherein the pending transaction determination unit 402 comprises: a packing condition obtaining sub-unit 4021, a block number counting sub-unit 4022, a first determining sub-unit 4023, a condition satisfaction determining sub-unit 4024, an auction transaction screening sub-unit 4025 and a second determining sub-unit 4026.
The packaging condition obtaining subunit 4021 is configured to obtain an auction transaction packaging condition associated with the core consensus network; the auction transaction packaging condition comprises a threshold number of contiguous tiles associated with the first type of tile;
the block number statistics subunit 4022 is configured to count the block NiAs a traversal starting block, counting the number of blocks of the first type of blocks continuously appearing on the block chain based on the traversal index direction indicated by the block chain and the traversal starting block;
the first determining subunit 4023 is configured to determine the block N if the counted number of blocks reaches the threshold of the number of consecutive blocksi+1Not satisfying auction transaction packaging conditions, and regarding the associated business transaction and auction asset transfer transaction as packaging to block Ni+1To-be-processed transaction in (1).
The condition satisfaction determining subunit 4024 is configured to determine the block N if the counted number of blocks does not reach the threshold of the number of consecutive blocksi+1Meeting the packaging condition of the auction transaction;
the auction transaction screening subunit 4025 is configured to screen auction transactions in the node transaction pool based on the first consensus node, and pack the auction transactions into the block Ni+1A second auction transaction of (1); the second auction transaction is used for indicating the block Ni+1The next block of (a) is a first type block associated with a second service node in the service network; the second service node isAnd the second node in the second auction transaction identifies the corresponding service node.
The auction transaction screening subunit 4025 includes: an auction asset determination subunit 40251, a screening subunit 40252, a transaction verification subunit 40253, and an auction transaction determination subunit 40254.
The auction asset determination subunit 40251 is configured to acquire X auction transactions stored in the node transaction pool of the first consensus node, and determine an auction asset of each auction transaction in the X auction transactions; the X auction transactions are forwarded by the service nodes in the service network through the proxy nodes; x is a positive integer;
the screening subunit 40252 is configured to screen, based on the auction assets of each auction transaction, the auction transaction with the largest auction asset from the X auction transactions, and use the screened auction transaction as the auction transaction to be verified;
the transaction verification subunit 40253 is configured to perform transaction verification on the auction transaction to be verified to obtain a transaction verification result;
the transaction verification subunit 40253 is further configured to:
acquiring transaction signature information carried by the auction transaction to be verified; the transaction signature information is a second service node corresponding to a second node identifier in the auction transaction to be verified, and is obtained by performing signature processing on the auction transaction to be verified based on a node private key of the second service node;
acquiring a node public key of a second service node, and verifying the transaction signature information based on the node public key to obtain a signature verification result;
when the signature verification result indicates that the verification is successful, determining the validity of the second service node based on the intelligent contract and an illegal node list associated with the service network;
and determining a transaction verification result of the auction transaction to be verified based on the validity of the second service node.
The auction transaction determination subunit 40254 is configured to, when the transaction verification result indicates that the verification is successful, package the auction transaction to be verified into the block N as the transaction to be verifiedi+1The second auction transaction of (1).
For a specific implementation manner of the auction asset determination subunit 40251, the screening subunit 40252, the transaction verification subunit 40253, and the auction transaction determination subunit 40254, reference may be made to the description of the second auction transaction in the embodiment corresponding to fig. 5, which will not be further described herein.
The second determining subunit 4026 is configured to package the associated business transaction, the auction asset transfer transaction, and the second auction transaction as being used for the tile Ni+1To-be-processed transaction in (1).
For specific implementation manners of the packaging condition obtaining subunit 4021, the tile number statistics subunit 4022, the first determining subunit 4023, the condition satisfaction determining subunit 4024, the auction transaction screening subunit 4025, and the second determining subunit 4026, reference may be made to the embodiment corresponding to fig. 3 for packaging to the tile Ni+1The description of the pending transaction will not be repeated here.
The block broadcasting unit 403 is configured to perform a packing process on the transaction to be processed to obtain a block Ni+1Block Ni+1Broadcast to a second consensus node in the core consensus network.
For specific implementation manners of the asset transfer transaction generating unit 401, the pending transaction determining unit 402, and the block broadcasting unit 403, reference may be made to the description of step S104 in the embodiment corresponding to fig. 3, and details will not be further described here.
The second type block determination module 50 is used for determining if the block N is identifiediIf no auction transaction exists, the block N to be packedi+1Determining as a second type block; the second type block is different from the first type block;
the transaction obtaining module 60 is configured to obtain, from the node transaction pool of the first common node, a second type of transaction sent by the service node in the service network through the proxy node;
the second block broadcasting module 70 is configured to generate a block N according to the obtained second type transactioni+1Block Ni+1Broadcast to a second consensus node in the core consensus network to enable the second consensusNode pair block Ni+1Block consensus is performed.
For specific implementation manners of the transaction identification module 10, the first type block determination module 20, the associated service transaction acquisition module 30, the first block broadcasting module 40, the second type block determination module 50, the transaction acquisition module 60, and the second block broadcasting module 70, reference may be made to the description of step S101 to step S104 in the embodiment corresponding to fig. 3, which will not be further described herein. In addition, the beneficial effects of the same method are not described in detail.
Further, please refer to fig. 10, where fig. 10 is a schematic structural diagram of a transaction data processing apparatus according to an embodiment of the present application. The transaction data processing device 2 may be a computer program (including program code) running on a computer apparatus, e.g. the transaction data processing device 2 is an application software; the transaction data processing device 2 may be configured to perform corresponding steps in the method provided by the embodiment of the present application. As shown in fig. 10, the transaction data processing apparatus 2 may operate in a second consensus node in the core consensus network, which may be the consensus node 220B in the embodiment corresponding to fig. 2. The transaction data processing device 2 may include: the block receiving module 100, the block obtaining module 200 and the block consensus module 300.
The block receiving module 100 is used for receiving a block N broadcasted by a first common node in a core common networki+1(ii) a Block Ni+1Block N on a blockchain identifying a core consensus network for a first consensus nodeiWhen a first auction transaction exists, generating a first type block based on a first node identifier in the first auction transaction and a transaction packaging quantity; block NiThe block with the largest generation time stamp on the block chain is obtained; i is a positive integer; the first auction transaction is received by the first consensus node and forwarded by the first service node corresponding to the first node identifier through the proxy node; the agent node is used for carrying out network isolation on the core consensus network and the service network where the first service node is located;
the block acquiring module 200 forObtaining block N from block chainiFor block NiPerforming transaction identification on the transaction;
the block consensus module 300 is used for identifying a block NiIf there is an auction transaction, the block N is usediThe auction transaction in (1) is used as a target auction transaction, and the block N is paired based on the target auction transactioni+1Carrying out block consensus to obtain a block consensus result returned to the first consensus node; the block consensus result is used to indicate the first consensus node to associate the block N with the first consensus nodei+1The block chain is written.
The block consensus module 300 comprises: a target auction transaction determination unit 3010, a comparison unit 3020, a matching unit 3030, and a consensus result determination unit 3040.
The target auction transaction determination unit 3010, configured to determine if the block N is identifiediIf there is an auction transaction, the block N is usediThe auction transaction in (1) is used as a target auction transaction; the target auction transaction comprises a target node identifier and a target packaging number;
the comparison unit 3020 for counting the block Ni+1The target node marks the corresponding business transaction quantity of the associated business transaction, and compares the counted business transaction quantity with the target packaging quantity to obtain a comparison result;
the matching unit 3030 is used for identifying the target node and the block Ni+1Each transaction in the associated business transaction is respectively matched to obtain a matching result;
the consensus determining unit 3040 is configured to determine a block consensus result to be returned to the first consensus node based on the comparison result and the matching result.
The specific implementation manners of the target auction transaction determination unit 3010, the comparison unit 3020, the matching unit 3030 and the consensus result determination unit 3040 may refer to the pair of blocks N in the embodiment corresponding to fig. 6i+1The description of the block consensus is performed, and will not be repeated here.
The specific implementation manners of the block receiving module 100, the block obtaining module 200, and the block identifying module 300 may refer to the descriptions of step S201 to step S207 in the embodiment corresponding to fig. 7, and will not be further described here. In addition, the beneficial effects of the same method are not described in detail.
Further, please refer to fig. 11, where fig. 11 is a schematic diagram of a computer device according to an embodiment of the present application. As shown in fig. 11, the computer device 3000 may be the consensus node 220A in the corresponding embodiment of fig. 2, and the computer device 3000 may include: at least one processor 3001, e.g., a CPU, at least one network interface 3004, a user interface 3003, memory 3005, at least one communication bus 3002. The communication bus 3002 is used to realize connection communication between these components. The user interface 3003 may include a Display screen (Display) and a Keyboard (Keyboard), and the network interface 3004 may optionally include a standard wired interface and a wireless interface (e.g., WI-FI interface). The memory 3005 may be a high-speed RAM memory or a non-volatile memory (e.g., at least one disk memory). The storage 3005 may optionally also be at least one storage device located remotely from the aforementioned processor 3001. As shown in fig. 11, the memory 3005, which is one type of computer storage medium, may include an operating system, a network communication module, a user interface module, and a device control application program.
In the computer device 3000 shown in fig. 11, the network interface 3004 is mainly used for network communication with the second consensus node in the core consensus network and the proxy node in the routing proxy network; and the user interface 3003 is an interface mainly for providing input to the user; and the processor 3001 may be used to invoke device control applications stored in the memory 3005.
It should be understood that the computer device 3000 described in this embodiment may perform the description of the transaction data processing method in the embodiment corresponding to fig. 3 or fig. 7, and may also perform the description of the transaction data processing apparatus 1 in the embodiment corresponding to fig. 9 or the description of the transaction data processing apparatus 2 in the embodiment corresponding to fig. 10, which is not described herein again. In addition, the beneficial effects of the same method are not described in detail.
Further, here, it is to be noted that: an embodiment of the present application further provides a computer-readable storage medium, where a computer program executed by the aforementioned transaction data processing apparatus 1 or transaction data processing apparatus 2 is stored in the computer-readable storage medium, and the computer program includes program instructions, and when the processor executes the program instructions, the description of the transaction data processing method in the embodiment corresponding to fig. 3 or fig. 7 can be executed, and therefore, details are not repeated here. In addition, the beneficial effects of the same method are not described in detail. For technical details not disclosed in embodiments of the computer-readable storage medium referred to in the present application, reference is made to the description of embodiments of the method of the present application. As an example, program instructions may be deployed to be executed on one computing device or on multiple computing devices at one site or distributed across multiple sites and interconnected by a communication network, which may comprise a system of block-chain nodes.
An aspect of the application provides a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and executes the computer instruction, so that the computer device can execute the description of the transaction data processing method in the embodiment corresponding to fig. 3 or fig. 7, which is not described herein again. In addition, the beneficial effects of the same method are not described in detail.
Further, please refer to fig. 12, where fig. 12 is a schematic structural diagram of a data processing system according to an embodiment of the present application. The data processing system 3 may comprise a data processing device 1a and a data processing device 2 a. The data processing apparatus 1a may be the transaction data processing apparatus 1 in the embodiment corresponding to fig. 9, and it is understood that the data processing apparatus 1a may be integrated in the consensus node 220A in the embodiment corresponding to fig. 2, and therefore, the description thereof will not be repeated here. The data processing device 2a may be the transaction data processing device 2 in the embodiment corresponding to fig. 10, and it is understood that the data processing device 2a may be integrated in the consensus node 220B in the embodiment corresponding to fig. 2, and therefore, the description thereof will not be repeated here. In addition, the beneficial effects of the same method are not described in detail. For technical details not disclosed in the embodiments of the data processing system to which the present application relates, reference is made to the description of the embodiments of the method of the present application.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present application and is not to be construed as limiting the scope of the present application, so that the present application is not limited thereto, and all equivalent variations and modifications can be made to the present application.

Claims (15)

1. A transaction data processing method performed by a first consensus node in a core consensus network, comprising:
obtaining a block N from a block chain of the core consensus networkiFor the block NiPerforming transaction identification on the transaction; the block NiFor the block with the largest generation timestamp on the block chain; the i is a positive integer;
if the block N is identifiediIf there is an auction transaction, the block N is usediThe auction transaction in (1) is used as a first auction transaction, and the block N to be packaged is identified based on a first node in the first auction transactioni+1Is determined to be marked with the first nodeIdentifying an associated first type block; the first auction transaction is forwarded by a first service node corresponding to the first node identification through a proxy node; the proxy node is used for carrying out network isolation on the core consensus network and the service network where the first service node is located;
acquiring the related service transaction of the first service node based on the transaction packaging quantity specified by the first auction transaction;
generating the block N according to the associated service transactioni+1The block N isi+1Broadcasting to a second consensus node in the core consensus network such that the second consensus node pairs the block Ni+1Block consensus is performed.
2. The method of claim 1, wherein the block N is identified if it is identifiediIf there is an auction transaction, the block N is usediThe auction transaction in (1) is used as a first auction transaction, and the block N to be packaged is identified based on a first node in the first auction transactioni+1Determining a first type of block associated with the first node identification, comprising:
if the block N is identifiediIf there is an auction transaction, the block N is usediThe auction transaction in the auction is used as a first auction transaction, and a first node identification in the first auction transaction is obtained;
acquiring a node identification list maintained by a block chain network where the core consensus network is located, searching a service node matched with the first node identification based on the node identification list, and taking the searched service node as a first service node;
block N to be packedi+1A first type of block associated with the first service node is determined.
3. The method of claim 1, wherein the node transaction pool of the first common node comprises a first type of transaction for the first service node and a second type of transaction for the first service node; the packaging priority of the first type of transaction is higher than the packaging priority of the second type of transaction;
the obtaining of the associated service transaction of the first service node based on the transaction packing quantity specified by the first auction transaction includes:
acquiring a transaction packaging quantity specified by the first auction transaction; the transaction packing number is used for indicating the block Ni+1A maximum transaction number of accommodated traffic transactions of the first traffic node;
in the node transaction pool, counting a first key transaction quantity of the first type of transaction of the first service node based on the packaging priority of the first type of transaction;
if the counted first key transaction quantity is smaller than the transaction packaging quantity, acquiring the first type of transaction of the first service node, which is consistent with the counted first key transaction quantity, from the node transaction pool;
determining a quantity difference between the transaction packaging quantity and the counted first key transaction quantity, determining the quantity difference as a quantity to be added, and counting a second key transaction quantity of the second type of transaction of the first service node in the node transaction pool;
and when the counted second key transaction quantity is larger than the quantity to be added, acquiring the second type of transaction of the first service node corresponding to the quantity to be added from the node transaction pool, and taking the acquired first type of transaction and the acquired second type of transaction as the associated service transaction of the first service node.
4. The method of claim 1, wherein said block N is generated according to said associated business transactioni+1The block N isi+1Broadcasting to a second consensus node in the core consensus network, comprising:
after the associated business transaction is acquired, generating an auction asset transfer transaction for the first auction transaction based on an intelligent contract on the blockchain;
obtaining auction transaction packaging conditions associated with the core consensus network, and determining to package to the block N based on the associated business transaction, the auction asset transfer transaction and the auction transaction packaging conditionsi+1The pending transaction in (1);
packaging the transaction to be processed to obtain the block Ni+1The block N isi+1Broadcast to a second consensus node in the core consensus network.
5. The method of claim 4, wherein obtaining auction transaction packaging conditions associated with the core consensus network determines packaging to the block N based on the associated business transaction, the auction asset transfer transaction, and the auction transaction packaging conditionsi+1The pending transaction of (1), comprising:
acquiring auction transaction packaging conditions associated with the core consensus network; the auction transaction packaging condition comprises a threshold number of contiguous tiles associated with the first type of tile;
the block NiAs a traversal starting block, counting the number of blocks of the first type of block continuously appearing on the block chain based on the traversal index direction indicated by the block chain and the traversal starting block;
if the counted number of blocks reaches the threshold value of the number of continuous blocks, determining the block Ni+1Not satisfying the auction transaction packaging condition and treating the associated business transaction and the auction asset transfer transaction as being packaged to the block Ni+1To-be-processed transaction in (1).
6. The method of claim 5, further comprising:
if the counted number of blocks does not reach the threshold value of the number of continuous blocks, determining the block Ni+1Satisfy the auction dealEasy packaging conditions;
screening auction transactions in a node transaction pool based on the first consensus node for packaging into the block Ni+1A second auction transaction of (1); the second auction transaction is used to indicate the block Ni+1Is the first type block associated with a second service node in the service network; the second service node is a service node corresponding to a second node identifier in the second auction transaction;
taking the associated business transaction, the auction asset transfer transaction, and the second auction transaction as for packaging into the block Ni+1To-be-processed transaction in (1).
7. The method of claim 6, wherein the filtering is performed for packing to the block N based on auction transactions in a node transaction pool of the first consensus nodei+1The second auction transaction of (1), comprising:
acquiring X auction transactions stored in a node transaction pool of the first consensus node, and determining auction assets of each auction transaction in the X auction transactions; the X auction transactions are forwarded by service nodes in the service network through the proxy node; x is a positive integer;
screening the auction transaction with the largest auction asset from the X auction transactions based on the auction assets of each auction transaction, and taking the screened auction transaction as the auction transaction to be verified;
performing transaction verification on the auction transaction to be verified to obtain a transaction verification result;
when the transaction verification result indicates that the verification is successful, the auction transaction to be verified is used for packaging to the block Ni+1The second auction transaction of (1).
8. The method according to claim 7, wherein the performing transaction verification on the auction transaction to be verified to obtain a transaction verification result comprises:
acquiring transaction signature information carried by the auction transaction to be verified; the transaction signature information is a second service node corresponding to a second node identifier in the auction transaction to be verified, and is obtained by performing signature processing on the auction transaction to be verified based on a node private key of the second service node;
acquiring a node public key of the second service node, and verifying the transaction signature information based on the node public key to obtain a signature verification result;
when the signature verification result indicates that verification is successful, determining validity of the second service node based on the intelligent contract and an illegal node list associated with the service network;
and determining a transaction verification result of the auction transaction to be verified based on the validity of the second service node.
9. The method of claim 1, further comprising:
if the block N is identifiediIf no auction transaction exists, the block N to be packedi+1Determining as a second type block; the second type block is different from the first type block;
acquiring a second type of transaction sent by a service node in the service network through the proxy node from a node transaction pool of the first common node;
generating the block N according to the acquired second type transactioni+1The block N isi+1Broadcasting to a second consensus node in the core consensus network such that the second consensus node pairs the block Ni+1Block consensus is performed.
10. A transaction data processing method performed by a second consensus node in a core consensus network, comprising:
receiving a block N broadcasted by a first consensus node in the core consensus networki+1(ii) a The block Ni+1Is the first common nodeBlock N on a blockchain identifying the core consensus networkiWhen a first auction transaction exists, generating a first type block based on a first node identifier in the first auction transaction and a transaction packaging quantity; the block NiFor the block with the largest generation timestamp on the block chain; the i is a positive integer; the first auction transaction is received by the first consensus node and forwarded by the first service node corresponding to the first node identifier through the proxy node; the proxy node is used for carrying out network isolation on the core consensus network and the service network where the first service node is located;
obtaining the block N from the block chainiFor the block NiPerforming transaction identification on the transaction;
if the block N is identifiediIf there is an auction transaction, the block N is usediThe auction transaction in (1) is used as a target auction transaction, and the block N is subjected to the target auction transactioni+1Performing block consensus to obtain a block consensus result returned to the first consensus node; the block consensus result is used to instruct the first consensus node to associate the block N with the first consensus nodei+1Writing the block chain.
11. The method of claim 10 wherein the block N is identified if it is identifiediIf there is an auction transaction, the block N is usediThe auction transaction in (1) is used as a target auction transaction, and the block N is subjected to the target auction transactioni+1Performing block consensus to obtain a block consensus result for returning to the first consensus node, including:
if the block N is identifiediIf there is an auction transaction, the block N is usediThe auction transaction in (1) is used as a target auction transaction; the target auction transaction comprises a target node identifier and a target packaging number;
counting the block Ni+1The target node identifies the corresponding business transaction quantity of the associated business transaction, and the counted businessComparing the transaction quantity with the target packaging quantity to obtain a comparison result;
identifying the target node with the block Ni+1Each transaction in the associated business transaction is respectively matched to obtain a matching result;
and determining a block consensus result for returning to the first consensus node based on the comparison result and the matching result.
12. A transaction data processing apparatus, comprising:
a transaction identification module for obtaining a block N from a block chain of the core consensus networkiFor the block NiPerforming transaction identification on the transaction; the block NiFor the block with the largest generation timestamp on the block chain; the i is a positive integer;
a first type block determination module for identifying the block NiIf there is an auction transaction, the block N is usediThe auction transaction in (1) is used as a first auction transaction, and the block N to be packaged is identified based on a first node in the first auction transactioni+1Determining a first type of block associated with the first node identification; the first auction transaction is forwarded by a first service node corresponding to the first node identification through a proxy node; the proxy node is used for carrying out network isolation on the core consensus network and the service network where the first service node is located;
the associated service transaction acquisition module is used for acquiring the associated service transaction of the first service node based on the transaction packaging quantity specified by the first auction transaction;
a first block broadcasting module for generating the block N according to the associated service transactioni+1The block N isi+1Broadcasting to a second consensus node in the core consensus network such that the second consensus node pairs the block Ni+1Block consensus is performed.
13. A transaction data processing apparatus, comprising:
a block receiving module for receiving a block N broadcasted by a first common node in a core common networki+1(ii) a The block Ni+1Block N for the first consensus node on a block chain identifying the core consensus networkiWhen a first auction transaction exists, generating a first type block based on a first node identifier in the first auction transaction and a transaction packaging quantity; the block NiFor the block with the largest generation timestamp on the block chain; the i is a positive integer; the first auction transaction is received by the first consensus node and forwarded by the first service node corresponding to the first node identifier through the proxy node; the proxy node is used for carrying out network isolation on the core consensus network and the service network where the first service node is located;
a block obtaining module, configured to obtain the block N from the block chainiFor the block NiPerforming transaction identification on the transaction;
a block consensus module for identifying the block NiIf there is an auction transaction, the block N is usediThe auction transaction in (1) is used as a target auction transaction, and the block N is subjected to the target auction transactioni+1Performing block consensus to obtain a block consensus result returned to the first consensus node; the block consensus result is used to instruct the first consensus node to associate the block N with the first consensus nodei+1Writing the block chain.
14. A computer device, comprising: a processor and a memory;
the processor is connected to a memory for storing a computer program, the processor being configured to invoke the computer program to cause the computer device to perform the method of any of claims 1-11.
15. A computer-readable storage medium, in which a computer program is stored which is adapted to be loaded and executed by a processor to cause a computer device having said processor to carry out the method of any one of claims 1 to 11.
CN202110657918.3A 2021-06-15 2021-06-15 Transaction data processing method, device, equipment and storage medium Active CN113256424B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202111215409.1A CN113935835B (en) 2021-06-15 2021-06-15 Transaction data processing method, device, equipment and storage medium
CN202110657918.3A CN113256424B (en) 2021-06-15 2021-06-15 Transaction data processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110657918.3A CN113256424B (en) 2021-06-15 2021-06-15 Transaction data processing method, device, equipment and storage medium

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202111215409.1A Division CN113935835B (en) 2021-06-15 2021-06-15 Transaction data processing method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113256424A true CN113256424A (en) 2021-08-13
CN113256424B CN113256424B (en) 2021-09-24

Family

ID=77188019

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202110657918.3A Active CN113256424B (en) 2021-06-15 2021-06-15 Transaction data processing method, device, equipment and storage medium
CN202111215409.1A Active CN113935835B (en) 2021-06-15 2021-06-15 Transaction data processing method, device, equipment and storage medium

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN202111215409.1A Active CN113935835B (en) 2021-06-15 2021-06-15 Transaction data processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (2) CN113256424B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113568981A (en) * 2021-09-24 2021-10-29 腾讯科技(深圳)有限公司 Transaction data processing method, device, equipment and medium
WO2023020233A1 (en) * 2021-08-18 2023-02-23 腾讯科技(深圳)有限公司 Blockchain-based data processing method, apparatus and device, and storage medium
CN116192881A (en) * 2023-04-27 2023-05-30 天津市城市规划设计研究总院有限公司 Access control method and system for block chain data in urban planning field

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118055062A (en) * 2022-11-10 2024-05-17 中移(上海)信息通信科技有限公司 Optimization method and device for industrial blockchain network, node and storage medium
CN117579633B (en) * 2024-01-17 2024-04-09 腾讯科技(深圳)有限公司 Block election method, device, equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140123186A1 (en) * 2002-05-10 2014-05-01 Convergent Media Solutions Llc Method and apparatus for browsing using alternative linkbases
CN107766540A (en) * 2017-10-31 2018-03-06 上海分布信息科技有限公司 A kind of block chain network of subregion and its method for realizing partitioned storage
CN107800795A (en) * 2017-10-30 2018-03-13 中国联合网络通信集团有限公司 The processing method and processing device of block information
CN108711006A (en) * 2018-05-15 2018-10-26 腾讯科技(深圳)有限公司 Revenue control method, management node, system and storage device
CN109544344A (en) * 2018-12-24 2019-03-29 众安信息技术服务有限公司 The transaction processing method and equipment of block chain based on DAG
CN109670321A (en) * 2018-11-30 2019-04-23 深圳灵图慧视科技有限公司 Date storage method, data query method and device
CN109685488A (en) * 2018-12-24 2019-04-26 杭州复杂美科技有限公司 Money transfer transactions fragment processing method, equipment and storage medium
CN110717762A (en) * 2019-12-16 2020-01-21 腾讯科技(深圳)有限公司 Data processing method, data processing device, node equipment and storage medium
CN112232823A (en) * 2020-12-10 2021-01-15 腾讯科技(深圳)有限公司 Transaction processing method, device, medium and electronic equipment of block chain system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190361917A1 (en) * 2018-05-25 2019-11-28 Bao Tran Smart device
CN112685505B (en) * 2021-01-07 2022-06-24 腾讯科技(深圳)有限公司 Transaction data processing method and device, computer equipment and storage medium
CN112926982B (en) * 2021-01-20 2022-08-02 腾讯科技(深圳)有限公司 Transaction data processing method, device, equipment and storage medium
CN113190622B (en) * 2021-03-16 2022-08-09 腾讯科技(深圳)有限公司 Data processing method, device, equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140123186A1 (en) * 2002-05-10 2014-05-01 Convergent Media Solutions Llc Method and apparatus for browsing using alternative linkbases
CN107800795A (en) * 2017-10-30 2018-03-13 中国联合网络通信集团有限公司 The processing method and processing device of block information
CN107766540A (en) * 2017-10-31 2018-03-06 上海分布信息科技有限公司 A kind of block chain network of subregion and its method for realizing partitioned storage
CN108711006A (en) * 2018-05-15 2018-10-26 腾讯科技(深圳)有限公司 Revenue control method, management node, system and storage device
CN109670321A (en) * 2018-11-30 2019-04-23 深圳灵图慧视科技有限公司 Date storage method, data query method and device
CN109544344A (en) * 2018-12-24 2019-03-29 众安信息技术服务有限公司 The transaction processing method and equipment of block chain based on DAG
CN109685488A (en) * 2018-12-24 2019-04-26 杭州复杂美科技有限公司 Money transfer transactions fragment processing method, equipment and storage medium
CN110717762A (en) * 2019-12-16 2020-01-21 腾讯科技(深圳)有限公司 Data processing method, data processing device, node equipment and storage medium
CN112232823A (en) * 2020-12-10 2021-01-15 腾讯科技(深圳)有限公司 Transaction processing method, device, medium and electronic equipment of block chain system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023020233A1 (en) * 2021-08-18 2023-02-23 腾讯科技(深圳)有限公司 Blockchain-based data processing method, apparatus and device, and storage medium
CN113568981A (en) * 2021-09-24 2021-10-29 腾讯科技(深圳)有限公司 Transaction data processing method, device, equipment and medium
WO2023045617A1 (en) * 2021-09-24 2023-03-30 腾讯科技(深圳)有限公司 Transaction data processing method and apparatus, device and medium
CN116192881A (en) * 2023-04-27 2023-05-30 天津市城市规划设计研究总院有限公司 Access control method and system for block chain data in urban planning field

Also Published As

Publication number Publication date
CN113935835B (en) 2022-08-26
CN113935835A (en) 2022-01-14
CN113256424B (en) 2021-09-24

Similar Documents

Publication Publication Date Title
CN113256424B (en) Transaction data processing method, device, equipment and storage medium
CN109302415B (en) A kind of authentication method, block chain node and storage medium
Baird et al. Hedera: A public hashgraph network & governing council
JP6370016B2 (en) Hierarchical network system, node and program used therefor
CN112685505B (en) Transaction data processing method and device, computer equipment and storage medium
CN113421097B (en) Data processing method and device, computer equipment and storage medium
CN110599147A (en) Ciphertext retrieval fair payment method and system based on block chain
KR20190075771A (en) Authentication System Using Block Chain Through Distributed Storage after Separating Personal Information
KR20200032086A (en) Distributed blockchain data structure distribution through secure access restriction management
CN111476572B (en) Block chain-based data processing method, device, storage medium and equipment
CN113518005B (en) Block consensus method, device, equipment and storage medium
CN113256297B (en) Data processing method, device and equipment based on block chain and readable storage medium
CN113259130B (en) Transaction data processing method, device, equipment and medium
CN113726913B (en) Backbone node access method and block chain system
CN112801778A (en) Federated bad asset blockchain
Li et al. EdgeWatch: Collaborative investigation of data integrity at the edge based on blockchain
CN113037824B (en) Cloud computing-oriented high-performance block chain construction method
CN112995167A (en) Kafka mechanism-based power utilization information acquisition method, block chain network and user side
Dai et al. Towards Trustworthy IoT: A Blockchain‐Edge Computing Hybrid System with Proof‐of‐Contribution Mechanism
Fredriksson A distributed public key infrastructure for the web backed by a blockchain
WO2024093593A1 (en) Multi-blockchain-based data processing method and apparatus, and electronic device, computer-readable storage medium and computer program product
Zhang et al. Gemini-chain: A regulatable digital currency model based on blockchain
CN113301118B (en) Method for determining block chain consensus node, consensus method, system and equipment
CN117931933A (en) Multi-blockchain data processing method, device, equipment, system and medium
Reno et al. Implementation of Private Blockchain in Smart Card Management System

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40050034

Country of ref document: HK