CN114255020A - Block chain transaction processing method, device, equipment and storage medium based on multiple chains - Google Patents

Block chain transaction processing method, device, equipment and storage medium based on multiple chains Download PDF

Info

Publication number
CN114255020A
CN114255020A CN202111560522.3A CN202111560522A CN114255020A CN 114255020 A CN114255020 A CN 114255020A CN 202111560522 A CN202111560522 A CN 202111560522A CN 114255020 A CN114255020 A CN 114255020A
Authority
CN
China
Prior art keywords
chain
party
transaction
transfer
transaction processing
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.)
Pending
Application number
CN202111560522.3A
Other languages
Chinese (zh)
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.)
OneConnect Financial Technology Co Ltd Shanghai
Original Assignee
OneConnect Financial Technology Co Ltd Shanghai
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 OneConnect Financial Technology Co Ltd Shanghai filed Critical OneConnect Financial Technology Co Ltd Shanghai
Priority to CN202111560522.3A priority Critical patent/CN114255020A/en
Publication of CN114255020A publication Critical patent/CN114255020A/en
Pending legal-status Critical Current

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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/04Payment circuits
    • G06Q20/06Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme
    • G06Q20/065Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme using e-cash
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/22Payment schemes or models
    • G06Q20/223Payment schemes or models based on the use of peer-to-peer networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3825Use of electronic signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management
    • 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

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Finance (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Technology Law (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The application belongs to the field of block chains, and provides a block chain transaction processing method, a device, equipment and a storage medium based on multiple chains, wherein the method comprises the following steps: receiving a transaction processing request; respectively determining a chain identifier of a parallel chain where the transfer party is positioned and a chain identifier of a parallel chain where the transfer party is positioned according to the number of preset parallel chains, the address of the transfer party account and the address of the transfer party account; determining a processing measure to be taken for the transaction processing request according to the chain identification corresponding to the roll-out party, the chain identification corresponding to the roll-in party and the chain identification corresponding to the node equipment; and executing the transaction processing operation corresponding to the determined processing measure. According to the method and the device, multi-chain information is configured in the creation block and is broadcast to each node device, and each node device finds out neighbor nodes on each chain, so that a block chain running in a multi-chain mode is realized. Different processing processes of the same transaction can be executed in parallel on different parallel chains, so that the transaction processing time is shortened, the transaction processing efficiency is improved, and the throughput rate of the block chain is improved.

Description

Block chain transaction processing method, device, equipment and storage medium based on multiple chains
Technical Field
The application belongs to the technical field of block chains, and particularly relates to a block chain transaction processing method, device, equipment and storage medium based on multiple chains.
Background
In the related art, the blockchain is usually operated in a single chain form, and a consensus machine is combined to obtain a consistent state change consensus on the chain, however, to achieve the consistent state change consensus on the chain, the blockchain must pay a certain cost to obtain the certainty of the state or obtain the decentralization degree (or decentralization degree) of the consensus in some open systems.
Therefore, in the block chain design of all single-chain account book structures, due to the influence of factors such as network, consensus, calculation power and the like, the aspects of decentralization degree, energy consumption, throughput capability, expandability and the like of the block chain are limited by different degrees.
Disclosure of Invention
The application provides a block chain transaction processing method, a block chain transaction processing device and a block chain transaction processing storage medium based on multiple chains, so that a block chain running in multiple chains is realized, different processing processes of the same transaction can be executed in parallel on different parallel chains, the transaction processing time is shortened, the transaction processing efficiency is improved, and the block chain throughput rate is improved.
An embodiment of a first aspect of the present application provides a method for processing a blockchain transaction based on multiple chains, which is applied to a node device in a blockchain network including multiple parallel chains, and includes:
receiving a transaction processing request, wherein the transaction processing request comprises a transaction identifier, an account address of a transfer party, a transaction amount, a transaction signature, a public key and transaction expiration time;
respectively determining the chain identification of the parallel chain where the transfer party is positioned and the chain identification of the parallel chain where the transfer party is positioned according to the number of preset parallel chains, the address of the transfer party account and the address of the transfer party account;
determining a processing measure to be taken for the transaction processing request according to the chain identification corresponding to the roll-out party, the chain identification corresponding to the roll-in party and the chain identification corresponding to the node equipment;
and executing the transaction processing operation corresponding to the determined processing measure on the transaction processing request.
In some embodiments of the present application, before receiving the transaction processing request, the method further includes:
generating a creation block, and storing multi-chain configuration information in the creation block, wherein the multi-chain configuration information comprises configuration information of each parallel chain, and the configuration information of each parallel chain at least comprises a chain identifier of the parallel chain;
and broadcasting the multi-chain configuration information to each other node device in the block chain network.
In some embodiments of the present application, the method further comprises:
sending a neighbor searching request to the node equipment directly connected with the current node equipment;
receiving a neighbor node identifier returned by each directly connected node device and a corresponding parallel chain identifier;
and storing the received neighbor node identification and the corresponding chain identification in a neighbor list of the neighbor node identification.
In some embodiments of the present application, the determining, according to the preset number of parallel chains, the transfer party account address, and the transfer party account address, a chain identifier of a parallel chain where the transfer party is located and a chain identifier of a parallel chain where the transfer party is located, respectively, includes:
carrying out remainder taking operation on the number of preset parallel chains by using the account address of the transfer party, and taking the obtained remainder as a chain identifier corresponding to the parallel chain where the transfer party is located;
and carrying out remainder taking operation on the preset number of parallel chains by using the account address of the transfer party, and taking the obtained remainder as a chain identifier corresponding to the parallel chain where the transfer party is located.
In some embodiments of the present application, the determining, according to the chain identifier corresponding to the roll-out party, the chain identifier corresponding to the roll-in party, and the chain identifier corresponding to the node device itself, a processing measure to be taken for the transaction processing request includes:
judging whether the chain identification corresponding to the roll-out party is the same as the chain identification corresponding to the roll-in party or not;
if so, judging whether the chain identifiers corresponding to the roll-out party and the roll-in party are the same as the chain identifiers of the parallel chain to which the node equipment belongs;
if so, determining that the processing measures taken for the transaction processing request comprise roll-out operation and roll-in operation;
and if the chain identifiers corresponding to the roll-out party and the roll-in party are the same and are different from the chain identifiers corresponding to the node equipment, determining that the processing measure taken for the transaction processing request is to discard the transaction processing request.
In some embodiments of the present application, the method further comprises:
if the link identifier corresponding to the transfer-out party is not the same as the link identifier corresponding to the transfer-in party, judging whether the link identifier corresponding to the node equipment is the link identifier corresponding to the transfer-out party or the link identifier corresponding to the transfer-in party;
if the corresponding chain identification of the user is the corresponding chain identification of the transfer party, determining that the processing measure taken for the transaction processing request is transfer processing;
if the corresponding chain identification of the user is the corresponding chain identification of the transfer-in party, determining that the processing measure taken for the transaction processing request is transfer-in processing;
and if the corresponding chain identifier is not the chain identifier corresponding to the transfer-out party or the chain identifier corresponding to the transfer-in party, determining that the processing measure taken for the transaction processing request is to discard the transaction processing request.
In some embodiments of the present application, after performing the transaction processing operation corresponding to the determined processing measure on the transaction processing request, the method further includes:
and packaging the transaction result into a new block, and storing the new block on the parallel chain to which the node equipment belongs.
An embodiment of the second aspect of the present application provides a multi-chain-based blockchain transaction processing apparatus, applied to a node device in a blockchain network including a plurality of parallel chains, including:
the system comprises a receiving module, a transaction processing module and a processing module, wherein the receiving module is used for receiving a transaction processing request, and the transaction processing request comprises a transaction identifier, an account address of a transfer-out party, an account address of a transfer-in party, a transaction amount, a transaction signature, a public key and transaction expiration time;
the determining module is used for respectively determining the chain identifier of the parallel chain where the transfer party is located and the chain identifier of the parallel chain where the transfer party is located according to the preset number of the parallel chains, the transfer party account address and the transfer party account address; determining a processing measure to be taken for the transaction processing request according to the chain identification corresponding to the roll-out party, the chain identification corresponding to the roll-in party and the chain identification corresponding to the node equipment;
and the transaction execution module is used for executing the determined transaction processing operation corresponding to the processing measure on the transaction processing request.
Embodiments of the third aspect of the present application provide an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to implement the method of the first aspect.
An embodiment of a fourth aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, the program being executable by a processor to implement the method of the first aspect.
The technical scheme provided in the embodiment of the application at least has the following technical effects or advantages:
the method and the device for configuring the block chain have the advantages that the multi-chain information is configured in the creation block, the multi-chain configuration information is broadcast to each node device in the block chain system, and each node device finds out neighbor nodes on each chain, so that the block chain running in the multi-chain mode can be realized. The single-chain transaction can be processed through the block chain running in a multi-chain mode, cross-chain transactions involving multiple chains can be processed, the flexibility of processing the transactions by the block chain is improved, the universality of the block chain is improved, and application scenes suitable for the block chain are increased. And through multi-chain operation, different processing processes of the same transaction can be executed in parallel on different parallel chains, so that the processing time of the transaction is shortened, the processing efficiency of the blockchain on the transaction is improved, and the throughput rate of the blockchain is greatly improved. Further, for cross-chain transactions, the parallel chain executing the roll-out processing also monitors the parallel chain executing the roll-in processing in real time to acquire the execution state of the roll-in processing. After the transfer-in processing fails, the transfer-out account address is compensated by initiating the compensation transaction, so that the accuracy of the cross-chain transaction is ensured, and benefit loss caused by asynchronism of processing operations among different parallel chains is avoided.
Additional aspects and advantages of the present application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the present application.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the application. Also, like reference numerals are used to refer to like parts throughout the drawings.
In the drawings:
FIG. 1 is a schematic diagram of a creating block provided by an embodiment of the present application;
fig. 2 is a schematic diagram illustrating connections between a plurality of node devices in a blockchain network including 3 parallel chains according to an embodiment of the present application;
fig. 3 is a flowchart illustrating a method for processing a multi-chain-based blockchain transaction according to an embodiment of the present application;
fig. 4 is a schematic structural diagram illustrating a multi-chain-based blockchain transaction processing apparatus according to an embodiment of the present application;
FIG. 5 is a schematic diagram illustrating an exemplary configuration of a computer device according to an embodiment of the present application;
fig. 6 shows a schematic diagram of a storage medium provided in an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
It will be understood that, as used herein, the terms "first," "second," and the like may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another.
Some embodiments of the present application provide a method for processing a multi-chain-based blockchain transaction, which is applied to a node device in a blockchain network including a plurality of parallel chains. When generating a creation block of a blockchain, a node device in the blockchain network stores multi-chain configuration information in the creation block, wherein the multi-chain configuration information comprises configuration information of each chain, and the configuration information of each chain at least comprises a chain identifier of each chain.
For example, assuming that three chains, i.e., chain1, chain2, and chain3, are included in the blockchain, chain1 may be included in the multi-chain configuration information stored in the created block: id-123, chain 2: id-456, chain 3: id-567.
In the embodiment of the present application, there may be two or more parallel chains in the block chain system, and the application does not limit the number of parallel chains in the block chain, and the number of parallel chains may be determined according to requirements in practical applications. Only the configuration information corresponding to each chain needs to be stored in the creation block.
In this embodiment of the present application, each node device can only assume the role of one of the chains when being started, and can only serve as a node on one of the parallel chains, and when being started, the node device binds the node identifier of the node device and the chain identifier corresponding to the parallel chain to which the node device belongs together through configuration. The blocks generated by the node device in a packed mode can only be stored in the block chain corresponding to the chain to which the node device belongs.
As shown in fig. 1, chain identifications of three chains, namely chain1, chain2 and chain3, are stored in the created Block, and each chain generates a respective Block chain along with service processing, for example, a Block chain corresponding to chain1 in fig. 1 includes a Block from chain1 to Block1, a Block chain corresponding to chain2 includes three blocks from chain2 to Block1, chain2 to Block2 and chain2 to Block3, and a Block chain corresponding to chain3 includes two blocks from chain3 to Block1 and chain3 to Block 2.
In the blockchain system, the node device generating the created block broadcasts the multi-link configuration information stored in the created block to each node device in the blockchain system. Each node device is thus aware that there are multiple parallel chains in the current network.
Different node devices in the block chain system communicate with each other through a point-to-point Protocol, which may be a TCP (Transmission Control Protocol) Protocol. The node device searches its own neighbor node through a point-to-point protocol, and records the found neighbor node in its own neighbor list (neighbor table). In order to ensure that a plurality of parallel chains in a block chain system operate smoothly and orderly, each node device needs to find out at least one node of each chain when searching for a neighbor node.
Since the process of searching for the neighbor node by each node device is the same, the embodiment of the present application only uses the first node device as an example to describe the search process, and the first node device may be any node device in the blockchain system. Specifically, the first node device sends a neighbor searching request to each second node device, and the second node devices are node devices directly connected to the first node device. The second node device returns the node identifier of the neighbor node recorded in the neighbor list of the second node device and the chain identifier to which the node identifier belongs to the first node device. After the first node device receives the node identifiers and the chain identifiers of the neighbor nodes returned by each second node device, only one of the repeated node identifiers is reserved, and other repeated node identifiers are removed. And storing the rest node identifications and the corresponding chain identifications in a neighbor list of the node, and marking the node identifications of the neighbor nodes which establish the connection relation with the node identifications.
The second node device also obtains the node identifiers of the neighbor nodes from the node devices directly connected with the second node device, and all the node devices in the block chain system are directly or indirectly interconnected, so that the first node device can be ensured to obtain the node identifiers of the node devices on each chain by the above mode.
To facilitate understanding of the above process of finding neighboring nodes, the following detailed description is provided by way of example in conjunction with the accompanying drawings. As shown in fig. 2, the bidirectional arrows between different node devices in the figure indicate that a point-to-point communication connection is established between two node devices. Node 1: chain1 denotes a Node equipment Node1 on Chain1, with Node 1: chain1 is taken as an example, Node 1: chain1 is directly connected to Node2: Chain2, Node4: Chain1 and Node3: Chain 3. Node 1: chan 1 sends neighbor search request to Node2: Chan 2, Node4: Chan 1 and Node3: Chan 3 respectively. Node2, Chan 2, Node4, Chan 1 and Node3, Chan 3 all send Node identifiers and corresponding Chain identifiers in their neighbor lists to Node 1: chain 1. Finally, Node 1: the Chain1 records its own neighbor list as:
Chain1:Node4(connected),Node6
Chain2:Node2(connected),Node5,
CHain3:Node3(connected),Node7。
wherein connected represents that Node 1: the Chain1 is directly connected.
Since network resources are limited, the number of neighbor nodes to which the node device is directly connected is generally less than the number of neighbor nodes recorded in the neighbor list. Because more candidate neighbor nodes are recorded in the neighbor list, when the connection between the node device and a directly connected neighbor node is interrupted due to network instability or neighbor node failure, the node device may select a candidate neighbor node from a plurality of unconnected neighbor nodes in its own neighbor list, and send a connection request to the candidate neighbor node, so as to establish a communication connection with the candidate neighbor node. After establishing communication connection with the candidate neighbor node, a connection identifier is also marked for the node identifier corresponding to the candidate neighbor node in the neighbor list.
After the blockchain system including a plurality of parallel chains is established in the above manner, transaction processing is performed based on the blockchain system, which is shown in fig. 3, and the method specifically includes the following steps:
step 101: the node device receives a transaction processing request, wherein the transaction processing request comprises a transaction identifier, an account address of a transfer party, a transaction amount, a transaction signature, a public key and transaction expiration time.
When a user needs to perform a transaction, a transaction processing request is sent to any node device in the blockchain system. The node equipment receives a transaction processing request sent by a user, and analyzes a transaction identifier, an account address of a transfer party, a transaction amount, a transaction signature, a public key, transaction expiration time and the like from the transaction processing request. The transaction signature can be a ciphertext obtained by performing hash operation on transaction information such as a transaction identifier, an account address of a transfer party, a transaction amount, transaction expiration time and the like to obtain a transaction hash value, and then encrypting the transaction hash value by using a private key.
For example, assume that the node device receives a transaction processing request corresponding to transaction Tx0001, transaction Tx0001 contains the following information:
{"params":{"from":"addressFrom","to":"addressTo","account":100},
"signature":"sdfosdg","pubkey":"sdfsdgtt","expireTimestamp":2021/08/23 14:51:39}
wherein, the address from is the address of the transfer party account, the address to is the address of the transfer party account, the account 100 is the transaction amount, the sdfosdg is the transaction signature, the sdfsgtt is the public key, and the expireTimestamp 2021/08/2314, 51 and 39 are the transaction expiration time.
After receiving the transaction processing request, the node device first determines whether the transaction corresponding to the transaction processing request is an effective transaction based on the transaction signature.
Specifically, the node device decrypts the transaction signature by using the public key included in the transaction processing request, and obtains the transaction hash value. And carrying out hash operation on transaction information including the transaction identification, the transfer party account address, the transaction amount, the transaction expiration time and the like included in the transaction processing request to generate a transaction hash value. And comparing whether the currently generated transaction hash value is the same as the transaction hash value obtained by decryption in the transaction signature, and if the currently generated transaction hash value is the same as the transaction hash value obtained by decryption in the transaction signature, determining that the transaction corresponding to the transaction processing request is an effective transaction. Otherwise, determining that the transaction corresponding to the transaction processing request is an invalid transaction.
If a valid transaction is determined, the node device forwards the transaction processing request to a neighboring node directly connected to the node (excluding the neighboring node that forwarded the transaction processing request to the current node), and determines whether the current node device is capable of processing the transaction by the following manner of step 102. If an invalid transaction is determined, the transaction processing request is discarded.
Step 102: and the node equipment respectively determines the chain identification of the parallel chain where the transfer party is positioned and the chain identification of the parallel chain where the transfer party is positioned according to the account address of the transfer party, the account address of the transfer party and the preset number of the parallel chains.
And the node equipment utilizes the account address of the transfer party to carry out remainder taking operation on the number of the preset parallel chains, and the obtained remainder is used as the chain identification corresponding to the parallel chain where the transfer party is located. And performing remainder taking operation on the number of the preset parallel chains by using the account address of the transfer party, and taking the obtained remainder as the chain identifier corresponding to the parallel chain where the transfer party is located.
Step 103: and the node equipment determines the processing measures to be taken for the transaction processing request according to the chain identification corresponding to the roll-out party, the chain identification corresponding to the roll-in party and the chain identification corresponding to the node equipment.
And the node equipment judges whether the chain identification corresponding to the roll-out party is the same as the chain identification corresponding to the roll-in party. If the determined chain identification corresponding to the transfer-out party is the same as the chain identification corresponding to the transfer-in party, the transaction is only processed by the parallel chain corresponding to the chain identification, and the transaction belongs to single-chain transaction. In this case, the node device determines whether the chain identifier corresponding to the roll-out party and the roll-in party is the same as the chain identifier of the parallel chain to which the node device belongs, and if so, determines that the node device can process the transaction processing request, and the processing measures taken for the transaction processing request include a roll-out operation and a roll-in operation. If not, determining that the node equipment cannot process the transaction processing request, and taking a processing measure for the transaction processing request to discard the transaction processing request.
And if the chain identification corresponding to the transfer-out party is different from the chain identification corresponding to the transfer-in party, the transaction is indicated to be cooperatively processed by two different parallel chains, and the transaction belongs to cross-chain transaction. In this case, the node device determines whether the chain identifier of the parallel chain to which the node device belongs is a chain identifier corresponding to the roll-out party or a chain identifier corresponding to the roll-in party. And if the self corresponding chain identification is judged to be the chain identification corresponding to the roll-out party, determining that the node equipment can process the transaction processing request, and the processing measure is roll-out processing of roll-out transaction amount from the roll-out party account address. And if the self corresponding chain identification is judged to be the chain identification corresponding to the transfer-in party, determining that the node equipment can process the transaction processing request, and the processing measure is transfer-in processing for adding the transaction amount in the account address of the transfer-in party. And if the self corresponding chain identification is judged to be neither the chain identification corresponding to the transfer-out party nor the chain identification corresponding to the transfer-in party, determining that the node equipment cannot process the transaction processing request, wherein the processing measure is to discard the transaction processing request.
For example, suppose the node device calculates the address from% of the roll-out party account by a preset number of parallel chains chainNum, and the obtained chain identifier is id-123, i.e. the roll-out party belongs to chain 1. And calculating the address addressTo% of the account of the transfer party to preset the number of parallel chains, namely chainNum, and obtaining a chain identifier of id-456, namely that the transfer party belongs to chain 2. And if the link identifier corresponding to the node equipment is id-456, determining that the node equipment can execute the processing of increasing the transaction amount in the account address of the transfer party.
Step 104: and the node equipment executes the transaction processing operation corresponding to the determined processing measure on the transaction processing request.
If the processing measure determined in step 103 is discarding processing, the node device discards the transaction processing request and does not perform other processing except forwarding broadcast on the transaction processing request.
If the transaction is determined to be a single-chain transaction in step 103 and the determined processing measures include roll-out processing and roll-in processing, the node device first determines whether the transaction processing request has expired. Specifically, the node device acquires the timestamp of the last block from the local chain, determines whether the transaction expiration time included in the transaction processing request is earlier than the timestamp of the last block, and if so, determines that the transaction has expired, discards the transaction processing request, and does not perform subsequent processing any more.
If the transaction is judged to be not expired, the transaction amount included by the transaction processing request is subtracted from the transfer-out account address included by the transaction processing request, and the transaction amount is added to the transfer-in account address. The node device packages the transaction results into a new block after processing is complete and stores the new block on the local link. The local chain of the node device is a block chain corresponding to the parallel chain to which the node device, the roll-out party and the roll-in party belong.
After the uplink storage, the node device further sends the new block to each of the other node devices belonging to the same parallel chain in the block chain system, so that each of the other node devices stores the new block in the respective local chain.
If it is determined in step 103 that the transaction is a cross-link transaction and the determined processing measure includes roll-out processing, the node device also determines whether the transaction processing request is expired according to the above-mentioned manner, and the specific determination process is not described herein again. If the transaction processing request is not expired, the transaction amount included in the transaction processing request is subtracted from the roll-out account address included in the transaction processing request. The node apparatus packs a new block after the out-of-process is completed, and stores the new block in the local chain. The local chain of the node device is a block chain corresponding to a parallel chain to which the node device and the forwarding party belong.
After the uplink storage, the node device further sends the new block to each of the other node devices belonging to the same parallel chain in the block chain system, so that each of the other node devices stores the new block in the respective local chain.
If it is determined in step 103 that the transaction is a cross-link transaction and the determined processing measure includes a transfer-to-process, the node device also determines whether the transaction processing request is expired according to the above-mentioned manner, and the specific determination process is not described herein again. And if the transaction processing request is not expired, adding the transaction amount included in the transaction processing request from the transfer-in account address included in the transaction processing request. The node apparatus packs a new block after the transfer process is completed, and stores the new block in the local chain. The local chain of the node device is a block chain corresponding to a parallel chain to which the node device and the transfer-in party belong.
After the uplink storage, the node device further sends the new block to each of the other node devices belonging to the same parallel chain in the block chain system, so that each of the other node devices stores the new block in the respective local chain.
In the application scenario of the cross-chain transaction, there may be a case where the parallel chain responsible for executing the roll-out process has completed the roll-out process, and the parallel chain responsible for executing the roll-in process fails to execute the roll-in process. When this occurs, a compensation operation needs to be performed on the roll-out account address to re-transfer the amount of the transaction that has been rolled out to the roll-out account address.
In order to deal with the above situation, in the embodiment of the present application, if the processing measure determined in step 103 is roll-out processing, the node device needs to perform real-time monitoring on a parallel chain executing the roll-in operation while executing the roll-out operation according to the above manner, so as to determine whether the roll-in operation is successfully executed.
Specifically. And the node equipment determines the node identifier corresponding to the link identifier from the neighbor list of the node equipment according to the link identifier corresponding to the transfer party. If the node identifier marked with the connection identifier exists in the node identifiers corresponding to the chain identifiers, the node device periodically sends a monitoring request to the neighbor node device marked with the connection identifier and corresponding to the node identifier, and the monitoring request carries the transaction identifier corresponding to the transaction processing request. If the node identifier marked with the connection identifier does not exist in the node identifier corresponding to the chain identifier of the transfer-in party in the neighbor list, the node device firstly randomly selects one node identifier from the node identifiers corresponding to the chain identifier of the transfer-in party, establishes communication connection between the node device and the neighbor node device corresponding to the selected node identifier, and then periodically sends a monitoring request to the neighbor node device. After receiving the monitoring request, the neighbor node device searches whether a block corresponding to the transaction identifier is included in the local chain according to the transaction identifier included in the monitoring request.
Since there is a block rollback in the blockchain, since consensus in the blockchain is delayed, it usually takes 15-20 blocks to confirm 99.9999999% success in Taifang. The number of security blocks for each parallel chain, which may be 6, 10, 15, or 20, etc., may be set according to the consensus policy of each parallel chain itself.
The neighbor node device may calculate a difference value by subtracting the number of security blocks corresponding to the parallel chain in which the neighbor node device is located from the total number of current blocks. And searching whether the block corresponding to the transaction identifier is included in the previous difference blocks in the local chain. If yes, the transfer-in processing is determined to be successful, and a transfer-in success notification is sent to the current node equipment executing the transfer-out processing. If not, determining that the transfer-in processing fails, and sending a transfer-in failure notice to the current node equipment.
And after receiving a transfer-in failure notification returned by the neighbor node device, the current node device sends a transaction failure message to the user, wherein the transaction failure message is used for prompting the user to reinitiate a compensation transaction request corresponding to the transaction, and the compensation transaction request comprises a transaction signature, a public key and a transaction identifier corresponding to the transaction processing request.
For example, compensation transactions include the following:
{"params":{"from":"addressFrom","compensate_tx":"Tx0001"},"signature": "sdfosdg","pubkey":"sdfsdgtt"}
wherein, addressFrom is the transfer account address, Tx0001 is the transaction identifier, sdfosdg is the transaction signature, and sdfsdgtt is the public key.
After receiving the compensation transaction request, the node device first determines whether the compensation transaction request is valid based on a transaction signature included in the compensation transaction request. The specific determination process is the same as the process of determining whether the transaction processing request is valid in step 101, and is not described herein again.
If the compensation transaction request is judged to be valid, the compensation transaction request is forwarded to the adjacent node directly connected with the compensation transaction request (wherein the transaction processing request is not forwarded to the adjacent node of the current node), so that other node devices can synchronously process the compensation transaction request.
And then the node equipment performs remainder operation on the number of the preset parallel chains by using the account address of the transfer party included in the compensation transaction request, and the obtained remainder is used as the chain identifier corresponding to the parallel chain where the transfer party is located. And searching a block corresponding to the transaction identifier in the local chain according to the transaction identifier included in the compensation transaction request. And acquiring the transferred account address and the transaction amount from the searched block, performing remainder taking operation on the number of the preset parallel chains by using the transferred party account address, and taking the obtained remainder as the chain identifier corresponding to the parallel chain where the transferred party is located. And according to the chain identifier corresponding to the transfer-in party, determining the neighbor node equipment corresponding to the chain identifier for establishing communication connection from the neighbor list. And determining whether the transfer-in operation corresponding to the transaction identifier fails to be processed from the neighbor node device according to the monitoring mode. And after the transfer-in operation processing is determined to fail, adding the transaction amount corresponding to the transaction identification in the transfer-out account address.
The node equipment packages the new block after processing the supplementary transaction and stores the new block on the local link. And the local chain of the node equipment is a block chain corresponding to the parallel chain to which the node equipment and the roll-out party belong.
After the uplink storage, the node device further sends the new block to each of the other node devices belonging to the same parallel chain in the block chain system, so that each of the other node devices stores the new block in the respective local chain.
The method and the device for configuring the block chain have the advantages that the multi-chain information is configured in the creation block, the multi-chain configuration information is broadcast to each node device in the block chain system, and each node device finds out neighbor nodes on each chain, so that the block chain running in the multi-chain mode can be realized. The single-chain transaction can be processed through the block chain running in a multi-chain mode, cross-chain transactions involving multiple chains can be processed, the flexibility of processing the transactions by the block chain is improved, the universality of the block chain is improved, and application scenes suitable for the block chain are increased. And through multi-chain operation, different processing processes of the same transaction can be executed in parallel on different parallel chains, so that the processing time of the transaction is shortened, the processing efficiency of the blockchain on the transaction is improved, and the throughput rate of the blockchain is greatly improved. Further, for cross-chain transactions, the parallel chain executing the roll-out processing also monitors the parallel chain executing the roll-in processing in real time to acquire the execution state of the roll-in processing. After the transfer-in processing fails, the transfer-out account address is compensated by initiating the compensation transaction, so that the accuracy of the cross-chain transaction is ensured, and benefit loss caused by asynchronism of processing operations among different parallel chains is avoided.
An embodiment of the present application provides a multi-chain-based blockchain transaction processing apparatus, configured to execute the multi-chain-based blockchain transaction processing method according to any of the foregoing embodiments, as shown in fig. 4, the apparatus includes:
the receiving module 401 is configured to receive a transaction processing request, where the transaction processing request includes a transaction identifier, an account address of a transfer-out party, an account address of a transfer-in party, a transaction amount, a transaction signature, a public key, and transaction expiration time;
a determining module 402, configured to determine, according to the preset number of parallel chains, the transfer party account address, and the transfer party account address, a chain identifier of a parallel chain in which the transfer party is located and a chain identifier of a parallel chain in which the transfer party is located, respectively; determining a processing measure to be taken for the transaction processing request according to the chain identification corresponding to the transfer-out party, the chain identification corresponding to the transfer-in party and the chain identification corresponding to the node equipment;
and a transaction executing module 403, configured to execute a transaction processing operation corresponding to the determined processing measure on the transaction processing request.
The device also includes: the creation block generation module is used for generating a creation block and storing multi-chain configuration information in the creation block, wherein the multi-chain configuration information comprises configuration information of each parallel chain, and the configuration information of each parallel chain at least comprises a chain identifier of the parallel chain; and broadcasting the multi-chain configuration information to each other node device in the block chain network.
The device also includes: the neighbor searching module is used for sending a neighbor searching request to the node equipment directly connected with the current node equipment; receiving a neighbor node identifier returned by each directly connected node device and a corresponding parallel chain identifier; and storing the received neighbor node identification and the corresponding chain identification in a neighbor list of the neighbor node identification.
A determining module 402, configured to perform remainder fetching on a preset number of parallel chains by using a transfer party account address, and use an obtained remainder as a chain identifier corresponding to a parallel chain where the transfer party is located; and carrying out remainder taking operation on the number of the preset parallel chains by using the account address of the transfer party, and taking the obtained remainder as the chain identifier corresponding to the parallel chain where the transfer party is located.
A determining module 402, configured to determine whether a chain identifier corresponding to the roll-out party is the same as a chain identifier corresponding to the roll-in party; if so, judging whether the chain identifiers corresponding to the roll-out party and the roll-in party are the same as the chain identifier of the parallel chain to which the node equipment belongs; if so, determining that the processing action taken on the transaction processing request comprises a roll-out operation and a roll-in operation; and if the chain identifiers corresponding to the roll-out party and the roll-in party are the same and are different from the chain identifiers corresponding to the node equipment, determining that the processing measure taken for the transaction processing request is the transaction processing request to be discarded.
A determining module 402, configured to determine whether a link identifier corresponding to a node device is a link identifier corresponding to an egress or an ingress if a link identifier corresponding to an egress is different from a link identifier corresponding to an ingress; if the corresponding chain identification is the corresponding chain identification of the transfer party, determining that the processing measure taken for the transaction processing request is transfer processing; if the corresponding chain identification of the transaction processing request is the chain identification corresponding to the transfer-in party, determining that the processing measure taken for the transaction processing request is transfer-in processing; and if the corresponding chain identification is not the chain identification corresponding to the transfer-out party or the chain identification corresponding to the transfer-in party, determining that the processing measure taken for the transaction processing request is the transaction processing request to be discarded.
The device also includes: and the packaging module is used for packaging the transaction result into a new block and storing the new block on the parallel chain to which the node equipment belongs.
The method and the device for configuring the block chain have the advantages that the multi-chain information is configured in the creation block, the multi-chain configuration information is broadcast to each node device in the block chain system, and each node device finds out neighbor nodes on each chain, so that the block chain running in the multi-chain mode can be realized. The single-chain transaction can be processed through the block chain running in a multi-chain mode, cross-chain transactions involving multiple chains can be processed, the flexibility of processing the transactions by the block chain is improved, the universality of the block chain is improved, and application scenes suitable for the block chain are increased. And through multi-chain operation, different processing processes of the same transaction can be executed in parallel on different parallel chains, so that the processing time of the transaction is shortened, the processing efficiency of the blockchain on the transaction is improved, and the throughput rate of the blockchain is greatly improved. Further, for cross-chain transactions, the parallel chain executing the roll-out processing also monitors the parallel chain executing the roll-in processing in real time to acquire the execution state of the roll-in processing. After the transfer-in processing fails, the transfer-out account address is compensated by initiating the compensation transaction, so that the accuracy of the cross-chain transaction is ensured, and benefit loss caused by asynchronism of processing operations among different parallel chains is avoided.
The embodiment of the application provides computer equipment. As shown in fig. 5, the computer apparatus includes a processor, a storage medium, a memory, and a network interface connected through a device bus. The storage medium of the computer device stores an operating device, a database and computer readable instructions, the database can store control information sequences, and the computer readable instructions when executed by the processor can enable the processor to realize a multi-chain-based block chain transaction processing method. The processor of the computer device is used for providing calculation and control capability and supporting the operation of the whole computer device. The memory of the computer device may have stored therein computer readable instructions that, when executed by the processor, may cause the processor to perform a method of processing a multi-chain based blockchain transaction. The network interface of the computer device is used for connecting and communicating with the terminal. Those skilled in the art will appreciate that the configuration shown in fig. 5 is a block diagram of only a portion of the configuration associated with the disclosed aspects and does not constitute a limitation on the computing devices to which the disclosed aspects apply, as a particular computing device may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
The computer device includes a memory, a processor, and a computer program stored on the memory and executable on the processor. The processor, when executing the computer program, implements the steps of: receiving a transaction processing request, wherein the transaction processing request comprises a transaction identifier, an account address of a transfer party, a transaction amount, a transaction signature, a public key and transaction expiration time; respectively determining a chain identifier of a parallel chain where the transfer party is positioned and a chain identifier of a parallel chain where the transfer party is positioned according to the number of preset parallel chains, the address of the transfer party account and the address of the transfer party account; determining a processing measure to be taken for the transaction processing request according to the chain identification corresponding to the roll-out party, the chain identification corresponding to the roll-in party and the chain identification corresponding to the node equipment; and executing the transaction processing operation corresponding to the determined processing measure on the transaction processing request.
The processor, when executing the computer program, implements the steps of: generating a creation block, and storing multi-chain configuration information in the creation block, wherein the multi-chain configuration information comprises configuration information of each parallel chain, and the configuration information of each parallel chain at least comprises a chain identifier of the parallel chain; and broadcasting the multi-chain configuration information to each other node device in the block chain network.
The processor, when executing the computer program, implements the steps of: sending a neighbor searching request to the node equipment directly connected with the current node equipment; receiving a neighbor node identifier returned by each directly connected node device and a corresponding parallel chain identifier; and storing the received neighbor node identification and the corresponding chain identification in the neighbor list of the neighbor node identification.
The processor, when executing the computer program, implements the steps of: carrying out remainder operation on the number of the preset parallel chains by using the account address of the transfer party, and taking the obtained remainder as a chain identifier corresponding to the parallel chain where the transfer party is located; and carrying out remainder taking operation on the number of the preset parallel chains by using the account address of the transfer party, and taking the obtained remainder as the chain identifier corresponding to the parallel chain where the transfer party is located.
The processor, when executing the computer program, implements the steps of: judging whether the chain identification corresponding to the roll-out party is the same as the chain identification corresponding to the roll-in party; if so, judging whether the chain identifiers corresponding to the roll-out party and the roll-in party are the same as the chain identifier of the parallel chain to which the node equipment belongs; if so, determining that the processing measures taken for the transaction processing request comprise roll-out operation and roll-in operation; and if the chain identifiers corresponding to the roll-out party and the roll-in party are the same and are different from the chain identifiers corresponding to the node equipment, determining that the processing measure adopted for the transaction processing request is the lost transaction processing request.
The processor, when executing the computer program, implements the steps of: if the link identification corresponding to the roll-out party is different from the link identification corresponding to the roll-in party, judging whether the link identification corresponding to the node equipment is the link identification corresponding to the roll-out party or the link identification corresponding to the roll-in party; if the corresponding chain identification is the corresponding chain identification of the transfer party, determining that the processing measure taken for the transaction processing request is transfer processing; if the corresponding chain identification is the chain identification corresponding to the transfer party, determining that the processing measure taken for the transaction processing request is transfer processing; and if the corresponding chain identification is not the chain identification corresponding to the transfer-out party or the chain identification corresponding to the transfer-in party, determining that the processing measure taken for the transaction processing request is the transaction processing request to be discarded.
The processor, when executing the computer program, implements the steps of: and packaging the transaction result into a new block, and storing the new block on the parallel chain to which the node equipment belongs.
Embodiments of the present application also provide a storage medium storing computer-readable instructions, as shown in fig. 6, which when executed by one or more processors, cause the one or more processors to perform the following steps: receiving a transaction processing request, wherein the transaction processing request comprises a transaction identifier, an account address of a transfer party, a transaction amount, a transaction signature, a public key and transaction expiration time; respectively determining a chain identifier of a parallel chain where the transfer party is located and a chain identifier of a parallel chain where the transfer party is located according to the number of preset parallel chains, the address of the transfer party account and the address of the transfer party account; determining a processing measure to be taken for the transaction processing request according to the chain identification corresponding to the roll-out party, the chain identification corresponding to the roll-in party and the chain identification corresponding to the node equipment; and executing the transaction processing operation corresponding to the determined processing measure on the transaction processing request.
The processor may further perform the steps of: generating a creation block, and storing multi-chain configuration information in the creation block, wherein the multi-chain configuration information comprises configuration information of each parallel chain, and the configuration information of each parallel chain at least comprises a chain identifier of the parallel chain; and broadcasting the multi-chain configuration information to each other node device in the block chain network.
The processor may further perform the steps of: sending a neighbor searching request to the node equipment directly connected with the current node equipment; receiving a neighbor node identifier returned by each directly connected node device and a corresponding parallel chain identifier; and storing the received neighbor node identification and the corresponding chain identification in a neighbor list of the neighbor node identification.
The processor may further perform the steps of: carrying out remainder operation on the number of the preset parallel chains by using the account address of the transfer party, and taking the obtained remainder as a chain identifier corresponding to the parallel chain where the transfer party is located; and carrying out remainder taking operation on the number of the preset parallel chains by using the account address of the transfer party, and taking the obtained remainder as the chain identifier corresponding to the parallel chain where the transfer party is located.
The processor may further perform the steps of: judging whether the chain identification corresponding to the roll-out party is the same as the chain identification corresponding to the roll-in party; if so, judging whether the chain identifiers corresponding to the roll-out party and the roll-in party are the same as the chain identifier of the parallel chain to which the node equipment belongs; if so, determining that the processing measures taken for the transaction processing request comprise roll-out operation and roll-in operation; and if the chain identifiers corresponding to the roll-out party and the roll-in party are the same and are different from the chain identifiers corresponding to the node equipment, determining that the processing measure taken for the transaction processing request is the transaction processing request to be discarded.
The processor may further perform the steps of: if the chain identification corresponding to the roll-out party is different from the chain identification corresponding to the roll-in party, judging whether the chain identification corresponding to the node equipment is the chain identification corresponding to the roll-out party or the chain identification corresponding to the roll-in party; if the corresponding chain identification is the corresponding chain identification of the transfer party, determining that the processing measure taken for the transaction processing request is transfer processing; if the corresponding chain identification of the user is the chain identification corresponding to the transfer-in party, determining that the processing measure taken for the transaction processing request is transfer-in processing; and if the corresponding chain identification is not the chain identification corresponding to the transfer-out party or the chain identification corresponding to the transfer-in party, determining that the processing measure taken for the transaction processing request is the transaction processing request to be discarded.
The processor may further perform the steps of: and packaging the transaction result into a new block, and storing the new block on the parallel chain to which the node equipment belongs.
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 can include the processes of the embodiments of the methods described above when the computer program is executed. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a Random Access Memory (RAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, however, as long as there is no contradiction between the combinations of the technical features, the scope of the present description should be considered as being described in the present specification.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A block chain transaction processing method based on multiple chains is applied to a node device in a block chain network comprising a plurality of parallel chains, and comprises the following steps:
receiving a transaction processing request, wherein the transaction processing request comprises a transaction identifier, an account address of a transfer party, a transaction amount, a transaction signature, a public key and transaction expiration time;
respectively determining the chain identification of the parallel chain where the transfer party is positioned and the chain identification of the parallel chain where the transfer party is positioned according to the number of preset parallel chains, the address of the transfer party account and the address of the transfer party account;
determining a processing measure to be taken for the transaction processing request according to the chain identification corresponding to the roll-out party, the chain identification corresponding to the roll-in party and the chain identification corresponding to the node equipment;
and executing the transaction processing operation corresponding to the determined processing measure on the transaction processing request.
2. The method of claim 1, wherein prior to receiving a transaction processing request, further comprising:
generating a creation block, and storing multi-chain configuration information in the creation block, wherein the multi-chain configuration information comprises configuration information of each parallel chain, and the configuration information of each parallel chain at least comprises a chain identifier of the parallel chain;
and broadcasting the multi-chain configuration information to each other node device in the block chain network.
3. The method of claim 2, further comprising:
sending a neighbor searching request to the node equipment directly connected with the current node equipment;
receiving a neighbor node identifier returned by each directly connected node device and a corresponding parallel chain identifier;
and storing the received neighbor node identification and the corresponding chain identification in a neighbor list of the neighbor node identification.
4. The method according to any one of claims 1 to 3, wherein the determining the chain identifier of the parallel chain in which the transferring party is located and the chain identifier of the parallel chain in which the transferring party is located respectively according to the preset number of parallel chains, the transferring party account address and the transferring party account address comprises:
carrying out remainder taking operation on the number of preset parallel chains by using the account address of the transfer party, and taking the obtained remainder as a chain identifier corresponding to the parallel chain where the transfer party is located;
and performing remainder taking operation on the number of the preset parallel chains by using the account address of the transfer party, and taking the obtained remainder as a chain identifier corresponding to the parallel chain where the transfer party is located.
5. The method according to any one of claims 1 to 3, wherein the determining, according to the chain identifier corresponding to the transferring-out party, the chain identifier corresponding to the transferring-in party, and the chain identifier corresponding to the node device itself, the processing measure to be taken for the transaction processing request includes:
judging whether the chain identification corresponding to the roll-out party is the same as the chain identification corresponding to the roll-in party or not;
if so, judging whether the chain identifiers corresponding to the roll-out party and the roll-in party are the same as the chain identifier of the parallel chain to which the node equipment belongs;
if so, determining that the processing measures taken for the transaction processing request comprise roll-out operation and roll-in operation;
and if the chain identifiers corresponding to the roll-out party and the roll-in party are the same and are different from the chain identifiers corresponding to the node equipment, determining that the processing measure taken for the transaction processing request is to discard the transaction processing request.
6. The method of claim 5, further comprising:
if the link identifier corresponding to the transfer-out party is not the same as the link identifier corresponding to the transfer-in party, judging whether the link identifier corresponding to the node equipment is the link identifier corresponding to the transfer-out party or the link identifier corresponding to the transfer-in party;
if the corresponding chain identification of the user is the corresponding chain identification of the transfer party, determining that the processing measure taken for the transaction processing request is transfer processing;
if the corresponding chain identification of the user is the corresponding chain identification of the transfer-in party, determining that the processing measure taken for the transaction processing request is transfer-in processing;
and if the corresponding chain identifier is not the chain identifier corresponding to the transfer-out party or the chain identifier corresponding to the transfer-in party, determining that the processing measure taken for the transaction processing request is to discard the transaction processing request.
7. The method according to any one of claims 1-3, wherein after performing the transaction processing operation corresponding to the determined processing measure on the transaction processing request, further comprising:
and packaging the transaction result into a new block, and storing the new block on the parallel chain to which the node equipment belongs.
8. A block chain transaction processing device based on multi-chain is characterized in that the device is applied to a node device in a block chain network comprising a plurality of parallel chains, and comprises:
the system comprises a receiving module, a transaction processing module and a processing module, wherein the receiving module is used for receiving a transaction processing request, and the transaction processing request comprises a transaction identifier, an account address of a transfer-out party, an account address of a transfer-in party, a transaction amount, a transaction signature, a public key and transaction expiration time;
the determining module is used for respectively determining the chain identifier of the parallel chain where the transfer party is located and the chain identifier of the parallel chain where the transfer party is located according to the preset number of the parallel chains, the transfer party account address and the transfer party account address; determining a processing measure to be taken for the transaction processing request according to the chain identification corresponding to the roll-out party, the chain identification corresponding to the roll-in party and the chain identification corresponding to the node equipment;
and the transaction execution module is used for executing the determined transaction processing operation corresponding to the processing measure on the transaction processing request.
9. A computer device comprising a memory and a processor, the memory having stored therein computer-readable instructions that, when executed by the processor, cause the processor to perform the steps of the method of any of claims 1 to 7.
10. A storage medium having stored thereon computer-readable instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of the method of any one of claims 1 to 7.
CN202111560522.3A 2021-12-20 2021-12-20 Block chain transaction processing method, device, equipment and storage medium based on multiple chains Pending CN114255020A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111560522.3A CN114255020A (en) 2021-12-20 2021-12-20 Block chain transaction processing method, device, equipment and storage medium based on multiple chains

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111560522.3A CN114255020A (en) 2021-12-20 2021-12-20 Block chain transaction processing method, device, equipment and storage medium based on multiple chains

Publications (1)

Publication Number Publication Date
CN114255020A true CN114255020A (en) 2022-03-29

Family

ID=80793011

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111560522.3A Pending CN114255020A (en) 2021-12-20 2021-12-20 Block chain transaction processing method, device, equipment and storage medium based on multiple chains

Country Status (1)

Country Link
CN (1) CN114255020A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115314510A (en) * 2022-07-29 2022-11-08 北京智融云河科技有限公司 Synchronization method and device of block chain nodes, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115314510A (en) * 2022-07-29 2022-11-08 北京智融云河科技有限公司 Synchronization method and device of block chain nodes, electronic equipment and storage medium
CN115314510B (en) * 2022-07-29 2024-04-05 北京智融云河科技有限公司 Block chain node synchronization method, device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN107888562B (en) Data verification and transceiving method, node and system for parallel link access to interconnection chain
Castro et al. Secure routing for structured peer-to-peer overlay networks
US7542432B2 (en) Resource matched topology database synchronization in communications networks having topology state routing protocols
US7859992B2 (en) Router redundancy in data communication networks
EP2380324B1 (en) Secure node identifier assignment in a distributed hash table for peer-to-peer networks
US7668082B1 (en) Network routing using link failure information
CN111625593B (en) Block chain-based data processing method and device and computer equipment
JP4499794B2 (en) Dynamic network management
CN100369413C (en) Agent responding device,
CN106789635B (en) Message forwarding method and device
US7539191B1 (en) System and method for securing route processors against attack
US6108710A (en) Method and apparatus for optimizing route generation in a connection oriented network
CN110971702A (en) Service calling method and device, computer equipment and storage medium
CN114255020A (en) Block chain transaction processing method, device, equipment and storage medium based on multiple chains
JP7142107B2 (en) PAN switching while preserving parent/child relationships
CN115134086A (en) Method and device for dynamic committee secret sharing and updating of asynchronous network
WO2014029287A1 (en) Method and device for sharing tunnel load
CN113157450A (en) Method and apparatus for performing blocks in a blockchain system
CN108810935B (en) Flow forwarding method and device
CN109450810A (en) Identify the method and device of redundancy message
CN112260971B (en) Fault tolerance method and device for network equipment system, computer equipment and storage medium
EP2122906B1 (en) Discovery of disconnected components in a distributed communication network
CN115514698A (en) Protocol calculation method, switch, cross-device link aggregation system and storage medium
CN114124275A (en) Time synchronization method, device, equipment and storage medium
Obermeier et al. CLCP–A Distributed Cross-Layer Commit Protocol for Mobile Ad Hoc Networks

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination