CN108681963B - Multi-block chain integration control method, system, electronic device and storage medium - Google Patents

Multi-block chain integration control method, system, electronic device and storage medium Download PDF

Info

Publication number
CN108681963B
CN108681963B CN201810274239.6A CN201810274239A CN108681963B CN 108681963 B CN108681963 B CN 108681963B CN 201810274239 A CN201810274239 A CN 201810274239A CN 108681963 B CN108681963 B CN 108681963B
Authority
CN
China
Prior art keywords
block
chain
transaction
block chain
blockchain
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810274239.6A
Other languages
Chinese (zh)
Other versions
CN108681963A (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.)
Shenzhen Xunlei Network Technology Co Ltd
Original Assignee
Shenzhen Onething Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Onething Technology Co Ltd filed Critical Shenzhen Onething Technology Co Ltd
Priority to CN201810274239.6A priority Critical patent/CN108681963B/en
Publication of CN108681963A publication Critical patent/CN108681963A/en
Application granted granted Critical
Publication of CN108681963B publication Critical patent/CN108681963B/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

Landscapes

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

Abstract

The invention discloses a multi-block chain integration control method, a system, an electronic device and a storage medium. The invention adopts a multi-chain architecture, hashes the transaction to a certain predetermined block chain for execution according to a consistent hash rule, thereby improving the transaction execution speed of the whole system, generates a new full block according to a block newly inserted in the plurality of block chains by a multi-block chain integration control module, inserts the generated new full block into the full chain, and the full chain can be used for random expansion and contraction of the whole system.

Description

Multi-block chain integration control method, system, electronic device and storage medium
Technical Field
The present invention relates to the field of block chain technologies, and in particular, to a method, a system, an electronic device and a storage medium for multi-block chain integrated control.
Background
The blockchain technology has the characteristics of decentralization, information non-tamper resistance and the like, and transaction events (such as transfer transactions, payment transactions and the like) participated by multiple parties can be realized by using the blockchain technology, for example, when a bank A and a bank B carry out transactions on the blockchain, all other nodes on the blockchain know the transactions, and other participated parties can participate in confirming the transaction accuracy together to prevent information tamper. Further, the blockchain is essentially a distributed database based on intelligent contracts, and information on the blockchain is shared by a P2P (Peer-to-Peer) network to all nodes.
In the current scenario of applying the blockchain technology, a single blockchain is usually used for scene application, and the adoption of the single blockchain makes the transaction performance difficult to improve due to machine limitation, that is, the transaction speed is always less than the block generation speed of a single node of the blockchain no matter how many transactions are initiated in a unit time.
Disclosure of Invention
The invention mainly aims to solve the problem that the transaction performance is limited and is difficult to improve by adopting a single blockchain.
To achieve the above object, the present invention provides a multi-partition chain integrated control method for integrally controlling a predetermined number of partition chains via a multi-partition chain integrated control module, the method comprising:
A. when a user sends a preset type account information with a transaction initiator and/or a preset type account information transaction request of a transaction counterpart to a routing node, the routing node determines a block chain corresponding to the transaction request according to the preset type account information of the transaction initiator and/or the preset type account information of the transaction counterpart and based on a predetermined transaction distribution rule, and sends the transaction request to the determined block chain;
B. after the determined blockchain receives the transaction request, responding to the transaction request to execute corresponding transaction, generating a block corresponding to the transaction request, and inserting the generated block into the determined blockchain after the generated block reaches consensus among the nodes of the determined blockchain;
C. the multi-block chain integration control module executes the transaction in the newly inserted blocks of each block chain according to the time sequence and generates new full-quantity blocks and inserts the generated new full-quantity blocks into the full-quantity chain at regular time or after receiving a block merging instruction sent by a user.
Preferably, the preset type of account information is an account address, and the predetermined transaction allocation rule includes:
determining a blockchain corresponding to the account address of the transaction initiator in the transaction request according to the predetermined mapping relation data between the account address of the transaction initiator and the blockchain, wherein the determined blockchain is the blockchain corresponding to the transaction request; or
Determining a block chain corresponding to the account address of the opposite transaction party in the transaction request according to the mapping relation data of the predetermined account address of the opposite transaction party and the block chain, wherein the determined block chain is the block chain corresponding to the transaction request; or
And determining a blockchain corresponding to the account address of the transaction initiator and the account address of the transaction counterpart in the transaction request according to the predetermined mapping relation data among the account address of the transaction initiator, the account address of the transaction counterpart and the blockchain, wherein the determined blockchain is the blockchain corresponding to the transaction request.
Preferably, the step C includes:
c1, if a block is inserted into a chain of a block chain of the multiple block chains, the block chain notifies the multiple block chain integration control module of the full-scale chain, or the multiple block chain integration control module queries whether a new block is generated from each block chain in real time or at regular time;
c2, the multi-block chain integration control module inquires a second preset type block identifier of a new block generated in a preset time period from each block chain according to mapping relation data of a pre-stored block chain and a first preset type block identifier at regular time or after receiving a block merging instruction sent by a user, and inquires preset type block information of the second preset type block identifier corresponding to each chain from each block chain;
c3, arranging the transactions in the blocks of all second preset type block identifications of the multiple block chains according to the time sequence by the multiple block chain integration control module according to the inquired information of all preset type blocks;
c4, the multi-block chain integration control module executes the transactions in the blocks identified by all the second preset type blocks of the other block chain according to the sequence and generates the new full-amount block;
c5, the multi-partition chain integration control module inserts the generated new full partition into the full partition chain, and stores the first preset partition type identifiers of the second preset partition type identifiers of all new partitions corresponding to each partition chain in the new full partition generation process.
Preferably, the preset type block ID is a block ID, the first preset type block ID is a maximum block ID, and the second preset type block ID is a new block ID.
Preferably, the step C2 includes:
the multi-block chain integration control module inquires a new block ID of the new block generated in the preset time period from the corresponding maximum block ID to each block chain respectively according to the pre-stored mapping relation data of the block chains and the maximum block ID at fixed time or after receiving a block merging instruction sent by a user;
and the multi-block chain integration control module respectively inquires the preset type block information of the new block ID corresponding to each block chain.
Preferably, the multi-block chain integrated control method further comprises:
the multi-block chain integration control module acquires transaction request index data of each block chain in the preset time period in real time or at regular time;
the multi-block chain integration control module calculates actual transaction processing index data of each block chain according to block outlet data of each block chain;
the multi-block chain integration control module calculates the total number of the required block chains according to the transaction request index data of each block chain and the actual transaction processing index data of each block chain;
if the total number is greater than the number of the currently operated block chains, the multi-block chain integration control module calculates the difference number of subtracting the number of the currently operated block chains from the total number, and adds the block chains which are not started and start the difference number directly based on the block data of the full-scale chain;
if the total number calculated is smaller than the number of the currently operated block chains, the multi-block chain integration control module calculates the difference number obtained by subtracting the total number from the number of the currently operated block chains, and stops starting the started block chains with the difference number from the started block chains directly based on the block data of the full-size chain.
In addition, to achieve the above object, the present invention provides a multi-blockchain integrated control system, which is suitable for a multi-blockchain integrated control method, the multi-blockchain integrated control system including a full-scale chain device, a plurality of blockchain devices, a routing node device, and an electronic apparatus suitable for a full-scale chain;
the routing node equipment is used for receiving a preset type account information with a transaction initiator and/or a preset type account information transaction request of a transaction counterpart sent by a user, determining the block chain equipment corresponding to the transaction request according to the preset type account information of the transaction initiator and/or the preset type account information of the transaction counterpart, based on a predetermined transaction distribution rule, and sending the transaction request to the determined block chain equipment;
the block chain device is configured to respond to a transaction request sent by the routing node device to execute a corresponding transaction after receiving the transaction request, generate a block corresponding to the transaction request, and insert the generated block into a block chain of the block chain device after the generated block agrees with a node of the block chain corresponding to the block chain device;
the electronic device suitable for the full-scale chain is used for executing the transaction in the newly inserted blocks of each block chain according to the time sequence and generating new full-scale blocks at regular time or after receiving a block merging instruction sent by a user; inserting the generated new quantum block into a quantum chain.
Preferably, the preset type of account information is an account address, and the predetermined transaction allocation rule includes:
determining a blockchain corresponding to the account address of the transaction initiator in the transaction request according to the predetermined mapping relation data between the account address of the transaction initiator and the blockchain, wherein the determined blockchain is the blockchain corresponding to the transaction request; or
Determining a block chain corresponding to the account address of the opposite transaction party in the transaction request according to the mapping relation data of the predetermined account address of the opposite transaction party and the block chain, wherein the determined block chain is the block chain corresponding to the transaction request; or
And determining a blockchain corresponding to the account address of the transaction initiator and the account address of the transaction counterpart in the transaction request according to the predetermined mapping relation data among the account address of the transaction initiator, the account address of the transaction counterpart and the blockchain, wherein the determined blockchain is the blockchain corresponding to the transaction request.
In addition, to achieve the above object, the present invention provides an electronic device suitable for a full quantum chain, the electronic device including a memory and a processor, the memory having a multi-block chain integration control program stored thereon, the multi-block chain integration control program being executable by the processor to implement the following steps:
executing the transaction in the newly inserted block of each block chain at regular time or after receiving a block merging instruction sent by a user according to the time sequence to generate a new full block;
inserting the generated new quantum block into a quantum chain.
Further, to achieve the above object, the present invention provides a computer-readable storage medium storing a multi-blockchain integrated control program, which is executable by at least one processor to cause the at least one processor to perform the following steps when executed:
executing the transaction in the newly inserted block of each block chain at regular time or after receiving a block merging instruction sent by a user according to the time sequence to generate a new full block;
inserting the generated new quantum block into a quantum chain.
The invention adopts a multi-chain architecture, hashes the transaction to a certain predetermined block chain for execution according to a consistent hash rule, thereby improving the transaction execution speed of the whole system, generates a new full block according to a block newly inserted in the plurality of block chains by a multi-block chain integration control module, inserts the generated new full block into the full chain, and the full chain can be used for random expansion and contraction of the whole system.
Drawings
In order to more clearly illustrate the embodiments of the present invention 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 invention, and for those skilled in the art, other drawings can be obtained according to the structures shown in the drawings without creative efforts.
FIG. 1 is a schematic flow chart of a multi-blockchain integrated control method according to a first embodiment of the present invention;
FIG. 2 is a flowchart illustrating a multi-block chain integration control method according to a second embodiment of the present invention;
FIG. 3 is a schematic diagram of an operating environment of a multi-blockchain integrated control process according to a first embodiment of the present invention;
FIG. 4 is a block diagram of a first embodiment of a multi-blockchain integrated control process according to the present invention;
FIG. 5 is a block diagram of a multi-blockchain integrated control process according to a second embodiment of the present invention;
FIG. 6 is a schematic diagram of a system architecture of a multi-blockchain integrated control system according to a first embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
The principles and features of this invention are described below in conjunction with the following drawings, which are set forth by way of illustration only and are not intended to limit the scope of the invention.
Referring to fig. 1, fig. 1 is a schematic flow chart illustrating a multi-block chain integration control method according to a first embodiment of the present invention.
In a first embodiment of the method for multi-partition chain integrated control according to the present invention, the method comprises:
s10, if a user sends a preset type account information with a transaction initiator and/or a preset type account information transaction request of a transaction counterpart to a routing node, the routing node determines a block chain corresponding to the transaction request according to the preset type account information of the transaction initiator and/or the preset type account information of the transaction counterpart and based on a predetermined transaction allocation rule, and sends the transaction request to the determined block chain;
the user sends a preset type account information with a transaction initiator and/or a preset type account information transaction request with a transaction counterparty to the routing node, for example, if the M account initiates a transaction request with the N account, the M account is the account of the transaction initiator, and the N account is the account of the transaction counterparty. The routing node determines a blockchain corresponding to the transaction request based on a predetermined transaction allocation rule according to the predetermined type account information of the transaction initiator and/or the predetermined type account information of the transaction counterpart, and sends the transaction request to the determined blockchain, for example, if the routing node determines that the blockchain corresponding to the transaction request is blockchain X2 according to the predetermined transaction allocation rule, the routing node sends the transaction request to blockchain X2.
Preferably, in this embodiment, the preset type of account information is an account address, and the predetermined transaction allocation rule includes:
determining a blockchain corresponding to the account address of the transaction initiator in the transaction request according to the predetermined mapping relation data between the account address of the transaction initiator and the blockchain, wherein the determined blockchain is the blockchain corresponding to the transaction request; or
Determining a block chain corresponding to the account address of the opposite transaction party in the transaction request according to the mapping relation data of the predetermined account address of the opposite transaction party and the block chain, wherein the determined block chain is the block chain corresponding to the transaction request; or
And determining a blockchain corresponding to the account address of the transaction initiator and the account address of the transaction counterpart in the transaction request according to the predetermined mapping relation data among the account address of the transaction initiator, the account address of the transaction counterpart and the blockchain, wherein the determined blockchain is the blockchain corresponding to the transaction request.
S20, after the determined blockchain receives the transaction request, responding to the transaction request to execute the corresponding transaction, generating a block corresponding to the transaction request, and after the generated block reaches a consensus among the nodes of the determined blockchain, inserting the generated block into the chain of the determined blockchain;
for example, after blockchain X2 receives the transaction request, it responds to the transaction request and executes the transaction corresponding to the transaction request to generate the block corresponding to the transaction request, and after the generated block is identified among the nodes of blockchain X2, the generated block is inserted into blockchain X2.
And S30, the multi-block chain integration control module executes the transaction in the newly inserted blocks of each block chain according to the time sequence and generates new full-quantity blocks and inserts the generated new full-quantity blocks into the full-quantity chain at regular time or after receiving a block merging instruction sent by a user.
The full quantum chain is a block chain formed by combining a plurality of block chains, and is referred to as the full quantum chain for short, and the block of the full quantum chain is generated according to a new block generated by the plurality of block chains and contains data of the block in the plurality of block chains.
In the embodiment, a multi-chain architecture is adopted, and the transaction is hashed to a certain predetermined block chain according to a consistent hash rule to be executed, so that the transaction execution speed of the whole system is improved. When each block chain generates a new block, a new full block is formed according to the newly inserted blocks of all the block chains, the generated new full block is inserted into the full chain, and the full chain can be used for random expansion and contraction of the whole system.
Preferably, in this embodiment, the step S30 includes:
s31, if a block is inserted into a chain of a blockchain of the multiple blockchains, the blockchain notifies the multi-blockchain integrated control module of the full-scale chain, or the multi-blockchain integrated control module of the full-scale chain queries whether a new block is generated in real time or at regular time for each blockchain;
s32, the multi-partition chain integration control module queries, at regular time or after receiving a partition merging command issued by a user, a second predetermined partition type identifier (e.g., a new partition ID) of a new partition generated within a predetermined time period (e.g., within the last 48 hours) from each partition chain according to mapping relationship data between a pre-stored partition chain and the first predetermined partition type identifier (e.g., a maximum partition ID), and queries, from each partition chain, predetermined partition type information of the second predetermined partition type identifier corresponding to each chain. For example, the preset type block information includes block generation time, a unique hash value of the block, transaction information included in the block, a block signature, and the like, and each piece of transaction information includes a transfer-out account address, a transfer-in account address, a transfer amount, a commission fee, a transaction signature, and the like;
s33, arranging the transactions in the blocks of all second preset type block identifications of all block chains according to the time sequence by the multi-block chain integration control module according to the inquired information of all preset type blocks;
s34, the multi-block chain integration control module executes the transactions in the blocks marked by all the second preset type blocks of all the block chains according to the sequence and generates a new full block;
s35, the multi-partition chain integration control module inserts the generated new full partition into the full partition chain, and stores the first preset partition type identifiers of the second preset partition type identifiers of all new partitions corresponding to each partition chain in the process of generating the new full partition.
Further, in this embodiment, the preset type block ID is a block ID, the first preset type block ID is a maximum block ID, and the second preset type block ID is a new block ID, where the step S32 includes:
the multi-block chain integration control module inquires the corresponding maximum block ID from each block chain to a new block ID of a new block generated in a preset time period (for example, in the last 48 hours) according to the mapping relation data of the pre-stored block chain and the maximum block ID at fixed time or after receiving a block merging instruction sent by a user;
the multi-block chain integration control module inquires the preset type block information of the corresponding new block ID on each chain from each block chain.
Referring to fig. 2, fig. 2 is a flowchart illustrating a multi-block chain integration control method according to a second embodiment of the present invention.
In a second embodiment of the multi-partition chain integrated control method of the present invention, based on the first embodiment, the method further includes:
s40, the multi-block chain integration control module acquires the transaction request index data of each block chain in a preset time period (for example, in the last 24 hours) in real time or at regular time;
the transaction request index data may be obtained from statistics of a transaction request log at the front end, and if there are 100000 transaction requests per second, the transaction request index data is 100000 transactions/second.
S50, the multi-block chain integration control module calculates the actual transaction processing index data of each block chain according to the block data output of each block chain;
for example, the block output data includes a block output duration and a transaction amount in a block, and the actual transaction processing index data may be calculated according to the block output duration and the transaction amount in the block, where if a block is output for 10 seconds and 10000 transactions are contained in the block, the actual transaction processing index data is 10000/10-1000 transactions/second.
S60, the multi-block chain integration control module calculates the total number of the required block chains according to the transaction request index data of each block chain and the actual transaction processing index data of each block chain;
for example, if the current system has only 1 chain, the transaction request index data is 100000 strokes/second, and the actual transaction processing index data is 1000 strokes/second, the total number of the required blockchains is 100000/1000-10, and the total number is 10.
S70, if the total number is larger than the number of the currently running block chains, the multi-block chain integration control module calculates the difference number of the total number minus the number of the currently running block chains, and adds the block chains which are not started and start the difference number directly based on the block data of the full chain;
and S80, if the total number is smaller than the number of the currently running block chains, the multi-block chain integration control module calculates the difference number obtained by subtracting the total number from the number of the currently running block chains, and stops starting the started block chains with the difference number from the started block chains directly based on the block data of the full-size chains.
In addition, the invention also provides a multi-block chain integration control program.
Please refer to fig. 3, which is a schematic operating environment of a multi-block chain integrated control process 10 according to a first embodiment of the present invention.
In the present embodiment, the multi-blockchain integrated control program 10 is installed and executed in the electronic apparatus 1. The electronic device 1 is suitable for a full-scale chain, and the electronic device 1 may include, but is not limited to, a memory 11, a processor 12, and a display 13. Fig. 4 only shows the electronic device 1 with components 11-13, but it is to be understood that not all of the shown components are required to be implemented, and that more or fewer components may alternatively be implemented.
The memory 11 may in some embodiments be an internal storage unit of the electronic device 1, such as a hard disk or a memory of the electronic device 1. The memory 11 may also be an external storage device of the electronic apparatus 1 in other embodiments, such as a plug-in hard disk provided on the electronic apparatus 1, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic apparatus 1. The memory 11 is used for storing application software installed in the electronic device 1 and various data, such as program codes of the multi-partition chain integrated control program 10. The memory 11 may also be used to temporarily store data that has been output or is to be output.
The processor 12 may be a Central Processing Unit (CPU), microprocessor or other data Processing chip in some embodiments, for running program codes stored in the memory 11 or Processing data, such as executing the multi-partition chain integrated control program 10.
The display 13 may in some embodiments be an L ED display, a liquid crystal display, a touch-sensitive liquid crystal display, an O L ED (Organic light-Emitting Diode) touch-sensitive display, etc. the display 13 is used for displaying information processed in the electronic device 1 and for displaying a visual user interface the components 11-13 of the electronic device 1 communicate with each other over a system bus.
Referring to fig. 4, fig. 4 is a block diagram of a multi-block chain integrated control process 10 according to a first embodiment of the present invention.
In this embodiment, the multi-blockchain integrated control program 10 may be divided into one or more modules, and the one or more modules are stored in the memory 11 and executed by one or more processors (in this embodiment, the processor 12) to complete the present invention. For example, in fig. 4, the multi-partition chain integrated control process 10 may be divided into the partition generating unit 101 and the updating unit 102. The module referred to in the present invention refers to a series of computer program instruction segments capable of performing specific functions, which are more suitable than the program for describing the execution process of the multi-block chain integrated control program 10 in the electronic device 1, wherein:
the block generation unit 101 is configured to execute transactions in the newly inserted blocks of each block chain according to a time sequence and generate a new full-size block at regular time or after receiving a block merging instruction sent by a user;
and an updating unit 102, configured to insert the generated new quantum block into the quantum chain.
The user sends a preset type account information with a transaction initiator and/or a preset type account information transaction request with a transaction counterparty to the routing node, for example, if the M account initiates a transaction request with the N account, the M account is the account of the transaction initiator, and the N account is the account of the transaction counterparty. The routing node determines a blockchain corresponding to the transaction request based on a predetermined transaction allocation rule according to the predetermined type account information of the transaction initiator and/or the predetermined type account information of the transaction counterpart, and sends the transaction request to the determined blockchain, for example, if the routing node determines that the blockchain corresponding to the transaction request is blockchain X2 according to the predetermined transaction allocation rule, the routing node sends the transaction request to blockchain X2. After receiving the transaction request, blockchain X2 responds to the transaction request and performs a transaction corresponding to the transaction request to generate a block corresponding to the transaction request, and inserts the generated block into blockchain X2 after the generated block has agreed among the nodes of blockchain X2. The block generating unit 101 executes transactions in the newly inserted blocks of each block chain according to the time sequence and generates new full blocks at regular time or after receiving a block merging instruction sent by a user, and the updating unit 102 inserts the generated new full blocks into the full chain. For example, if new tiles are currently inserted into blockchain X2 and blockchain X3, the tile generating unit 101 executes transactions in each newly inserted tile on blockchain X2 and blockchain X3 in chronological order and generates a new full-size chain. The update unit 102 inserts the generated new quantum block into the quantum chain.
In the embodiment, a multi-chain architecture is adopted, and the transaction is hashed to a certain predetermined block chain according to a consistent hash rule to be executed, so that the transaction execution speed of the whole system is improved. When each block chain generates a new block, a new full block is formed according to the newly inserted blocks of all the block chains, the generated new full block is inserted into the full chain, and the full chain can be used for random expansion and contraction of the whole system.
Preferably, in this embodiment, the block generating unit 101 is further configured to:
if a block is inserted into a block chain of a plurality of block chains, receiving a notice of inserting the block from the block chain, or inquiring whether a new block is generated from each block chain in real time or at regular time; at regular time or after receiving a block merging instruction sent by a user, according to mapping relation data of a pre-stored block chain and a first preset type block identifier (for example, the maximum block ID), inquiring a second preset type block identifier (for example, a new block ID) of a new block generated in a preset time period (for example, in the latest 48 hours) from each block chain, and respectively inquiring preset type block information of the corresponding second preset type block identifier on each chain from each block chain; arranging the transactions in the blocks of all second preset type block identifications of all block chains according to the time sequence according to the inquired information of all preset type blocks; executing the transactions in the blocks identified by all the second preset type blocks of all the block chains according to the sequence and generating a new full block;
the updating unit 102 is further configured to insert the generated new full size block into the full size chain, and store the first preset type block identifiers in the second preset type block identifiers of all new blocks corresponding to each block chain in the new full size block generating process, respectively.
In this embodiment, the preset type block information may include time of block generation, a unique hash value of the block, transaction information included in the block, a block signature, and the like, where each piece of transaction information includes an account transfer-out address, an account transfer-in address, a transfer amount, a commission fee, a transaction signature, and the like.
Preferably, in this embodiment, the block generating unit 101 is further configured to:
at regular time or after receiving a block merging instruction sent by a user, respectively inquiring the corresponding maximum block ID from each block chain to a new block ID of a new block generated in a preset time period (for example, in the last 48 hours) according to mapping relation data of the pre-stored block chain and the maximum block ID; and respectively inquiring the preset type block information of the new block ID corresponding to each block chain from each block chain.
Referring to fig. 5, fig. 5 is a block diagram illustrating a multi-block chain integration control process according to a second embodiment of the present invention.
In a second embodiment of the multi-partition chain integrated control process 10 of the present invention, based on the first embodiment, the multi-partition chain integrated control process 10 further includes:
the acquiring unit 103 is configured to acquire transaction request index data of each block chain in a preset time period in real time or at regular time;
a calculating unit 104, configured to calculate actual transaction processing index data of each block chain according to block outgoing data of each block chain; calculating the total number of the required block chains according to the transaction request index data of each block chain and the actual transaction processing index data of each block chain;
a scheduling unit 105, configured to calculate, if the calculated total number is greater than the number of currently-operating blockchains, a difference number obtained by subtracting the number of currently-operating blockchains from the total number, and add, directly based on blockdata of a full-size chain, an unprimed blockchain in which the difference number is enabled; and if the calculated total number is smaller than the number of the currently operated block chains, calculating the difference number obtained by subtracting the total number from the number of the currently operated block chains, and stopping starting the started block chains with the difference number from the started block chains directly on the basis of the block data of the full chain.
The transaction request index data can be obtained by statistics from a transaction request log at the front end, and if 100000 transaction requests exist per second, the transaction request index data is 100000 transactions per second; the actual transaction processing index data may be calculated according to the block-out duration and the transaction number in the block, and if a block is out in 10 seconds and 10000 transactions are included in the block, the actual transaction processing index data is 10000/10 ═ 1000 transactions/second; the data output may include a block output duration and a transaction amount in a block, and assuming that the current system has only 1 chain, the transaction request index data is 100000 transactions/second, and the actual transaction processing index data is 1000 transactions/second, the total number of the required block chains is 100000/1000-10, and the total number is 10.
The invention also provides a multi-block chain integrated control system.
Referring to fig. 6, fig. 6 is a system architecture diagram of a multi-block chain integrated control system according to a first embodiment of the present invention.
In fig. 6, an electronic apparatus 1 integrally controls a plurality of block chain devices Xn. It should be noted that the number of blockchain devices Xn is not limited in the present invention.
In this embodiment, the multi-blockchain integrated control system is suitable for a multi-blockchain integrated control method, and includes a full-scale chain device 2, a plurality of blockchain devices Xn, a routing node device 3, and an electronic apparatus 1 as described in any of the above embodiments;
the routing node device 3 is configured to receive a transaction request with preset type account information of a transaction initiator and/or preset type account information of a transaction counterpart sent by a user, determine the blockchain device Xn corresponding to the transaction request according to the preset type account information of the transaction initiator and/or the preset type account information of the transaction counterpart, and send the transaction request to the determined blockchain device Xn based on a predetermined transaction allocation rule;
after receiving the transaction request sent by the routing node device 3, the blockchain device Xn responds to the transaction request to execute the corresponding transaction, generates a block corresponding to the transaction request, and inserts the generated block into the determined blockchain of the blockchain device Xn after the generated block agrees with the node of the blockchain corresponding to the determined blockchain device Xn.
The present invention also provides a computer storage medium storing a multi-blockchain integrated control program executable by at least one processor to cause the at least one processor to perform the steps of:
executing the transaction in the newly inserted block of each block chain at regular time or after receiving a block merging instruction sent by a user according to the time sequence to generate a new full block;
inserting the generated new quantum block into a quantum chain.
The method steps of the multi-blockchain integrated control process executed by the processor may be implemented by referring to the embodiments of the multi-blockchain integrated control process.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention, and all modifications and equivalents of the present invention, which are made by the contents of the present specification and the accompanying drawings, or directly/indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (9)

1. A multi-blockchain integration control method is characterized in that the method integrates and controls a preset number of blockchains through a multi-blockchain integration control module, and the method comprises the following steps:
A. when a user sends a preset type account information with a transaction initiator and/or a preset type account information transaction request of a transaction counterpart to a routing node, the routing node determines a block chain corresponding to the transaction request according to the preset type account information of the transaction initiator and/or the preset type account information of the transaction counterpart and based on a predetermined transaction distribution rule, and sends the transaction request to the determined block chain;
B. after the determined blockchain receives the transaction request, responding to the transaction request to execute corresponding transaction, generating a block corresponding to the transaction request, and inserting the generated block into the determined blockchain after the generated block reaches consensus among the nodes of the determined blockchain;
C. the multi-block chain integration control module executes transactions in the newly inserted blocks of each block chain according to time sequence to generate new full-quantity blocks and inserts the generated new full-quantity blocks into the full-quantity chain at regular time or after receiving a block merging instruction sent by a user;
D. the multi-block chain integration control module acquires transaction request index data of each block chain in a preset time period in real time or at regular time;
E. the multi-block chain integration control module calculates actual transaction processing index data of each block chain according to block outlet data of each block chain;
F. the multi-block chain integration control module calculates the total number of the required block chains according to the transaction request index data of each block chain and the actual transaction processing index data of each block chain; and
G. when the calculated total number is larger than the number of the currently operated block chains, the multi-block chain integration control module calculates the difference number of subtracting the number of the currently operated block chains from the total number, newly adds the block chains which are not started and start the difference number based on the block data of the full-amount chain directly, and when the calculated total number is smaller than the number of the currently operated block chains, the multi-block chain integration control module calculates the difference number of subtracting the total number from the number of the currently operated block chains and stops starting the started block chains of the difference number from the started block chains directly based on the block data of the full-amount chain.
2. The method of claim 1 wherein the predetermined type of account information is an account address and the predetermined transaction allocation rules include:
determining a blockchain corresponding to the account address of the transaction initiator in the transaction request according to the predetermined mapping relation data between the account address of the transaction initiator and the blockchain, wherein the determined blockchain is the blockchain corresponding to the transaction request; or
Determining a block chain corresponding to the account address of the opposite transaction party in the transaction request according to the mapping relation data of the predetermined account address of the opposite transaction party and the block chain, wherein the determined block chain is the block chain corresponding to the transaction request; or
And determining a blockchain corresponding to the account address of the transaction initiator and the account address of the transaction counterpart in the transaction request according to the predetermined mapping relation data among the account address of the transaction initiator, the account address of the transaction counterpart and the blockchain, wherein the determined blockchain is the blockchain corresponding to the transaction request.
3. The method as claimed in claim 1 or 2, wherein the step C comprises:
c1, if a block is inserted into a chain of a block chain of the multiple block chains, the block chain notifies the multiple block chain integration control module of the full-scale chain, or the multiple block chain integration control module queries whether a new block is generated from each block chain in real time or at regular time;
c2, the multi-block chain integration control module inquires a second preset type block identifier of a new block generated in the preset time period from each block chain according to the mapping relation data of a pre-stored block chain and a first preset type block identifier at regular time or after receiving a block merging instruction sent by a user, and inquires the preset type block information of the second preset type block identifier corresponding to each chain from each block chain;
c3, arranging the transactions in the blocks of all second preset type block identifications of the multiple block chains according to the time sequence by the multiple block chain integration control module according to the inquired information of all preset type blocks;
c4, the multi-block chain integration control module executes the transactions in the blocks identified by all the second preset type blocks of the multi-block chain according to the sequence and generates the new full-amount block;
c5, the multi-partition chain integration control module inserts the generated new full partition into the full partition chain, and stores the first preset partition type identifiers of the second preset partition type identifiers of all new partitions corresponding to each partition chain in the new full partition generation process.
4. The method as claimed in claim 3, wherein the predetermined type block ID is a block ID, the first predetermined type block ID is a maximum block ID, and the second predetermined type block ID is a new block ID.
5. The method as claimed in claim 4, wherein the step C2 includes:
the multi-block chain integration control module inquires a new block ID of the new block generated in the preset time period from the corresponding maximum block ID to each block chain respectively according to the pre-stored mapping relation data of the block chains and the maximum block ID at fixed time or after receiving a block merging instruction sent by a user;
and the multi-block chain integration control module respectively inquires the preset type block information of the new block ID corresponding to each block chain.
6. A multi-block chain integrated control system is suitable for a multi-block chain integrated control method and is characterized by comprising a full-scale chain device, a plurality of block chain devices, a routing node device and an electronic device suitable for a full-scale chain;
the routing node equipment is used for receiving a preset type account information with a transaction initiator and/or a preset type account information transaction request of a transaction counterpart sent by a user, determining the block chain equipment corresponding to the transaction request according to the preset type account information of the transaction initiator and/or the preset type account information of the transaction counterpart, based on a predetermined transaction distribution rule, and sending the transaction request to the determined block chain equipment;
the block chain device is configured to respond to a transaction request sent by the routing node device to execute a corresponding transaction after receiving the transaction request, generate a block corresponding to the transaction request, and insert the generated block into a block chain of the block chain device after the generated block agrees with a node of the block chain corresponding to the block chain device;
the electronic device suitable for the full quantum chain is used for:
executing the transaction in the newly inserted blocks of each block chain at regular time or after receiving a block merging instruction sent by a user according to the time sequence to generate new full-quantity blocks, and inserting the generated new full-quantity blocks into the full-quantity chain;
acquiring transaction request index data of each block chain in a preset time period in real time or at regular time;
calculating actual transaction processing index data of each block chain according to block outlet data of each block chain;
calculating the total number of the required block chains according to the transaction request index data of each block chain and the actual transaction processing index data of each block chain;
when the calculated total number is larger than the number of the currently operated block chains, calculating the difference number of subtracting the number of the currently operated block chains from the total number, and adding the block chains which are not started and start the difference number directly on the basis of the block data of the full chain;
when the calculated total number is smaller than the number of the currently operated block chains, calculating the difference number obtained by subtracting the total number from the number of the currently operated block chains, and stopping starting the started block chains of the difference number from the started block chains directly on the basis of the block data of the full chain.
7. The system of claim 6 wherein the predetermined type of account information is an account address and the predetermined transaction allocation rules include:
determining a blockchain corresponding to the account address of the transaction initiator in the transaction request according to the predetermined mapping relation data between the account address of the transaction initiator and the blockchain, wherein the determined blockchain is the blockchain corresponding to the transaction request; or
Determining a block chain corresponding to the account address of the opposite transaction party in the transaction request according to the mapping relation data of the predetermined account address of the opposite transaction party and the block chain, wherein the determined block chain is the block chain corresponding to the transaction request; or
And determining a blockchain corresponding to the account address of the transaction initiator and the account address of the transaction counterpart in the transaction request according to the predetermined mapping relation data among the account address of the transaction initiator, the account address of the transaction counterpart and the blockchain, wherein the determined blockchain is the blockchain corresponding to the transaction request.
8. An electronic device, adapted for a full quantum chain, comprising a memory and a processor, wherein the memory stores a multi-blockchain integrated control program operable on the processor, and the multi-blockchain integrated control program when executed by the processor implements the steps of:
executing the transaction in the newly inserted block of each block chain at regular time or after receiving a block merging instruction sent by a user according to the time sequence to generate a new full block;
inserting the generated new quantum block into a quantum chain;
acquiring transaction request index data of each block chain in a preset time period in real time or at regular time;
calculating actual transaction processing index data of each block chain according to block outlet data of each block chain;
calculating the total number of the required block chains according to the transaction request index data of each block chain and the actual transaction processing index data of each block chain;
when the calculated total number is larger than the number of the currently operated block chains, calculating the difference number of subtracting the number of the currently operated block chains from the total number, and adding the block chains which are not started and start the difference number directly on the basis of the block data of the full chain;
when the calculated total number is smaller than the number of the currently operated block chains, calculating the difference number obtained by subtracting the total number from the number of the currently operated block chains, and stopping starting the started block chains of the difference number from the started block chains directly on the basis of the block data of the full chain.
9. A computer-readable storage medium storing a multi-blockchain integrated control program executable by at least one processor to cause the at least one processor to perform the steps of:
executing the transaction in the newly inserted block of each block chain at regular time or after receiving a block merging instruction sent by a user according to the time sequence to generate a new full block;
inserting the generated new quantum block into a quantum chain;
acquiring transaction request index data of each block chain in a preset time period in real time or at regular time;
calculating actual transaction processing index data of each block chain according to block outlet data of each block chain;
calculating the total number of the required block chains according to the transaction request index data of each block chain and the actual transaction processing index data of each block chain;
when the calculated total number is larger than the number of the currently operated block chains, calculating the difference number of subtracting the number of the currently operated block chains from the total number, and adding the block chains which are not started and start the difference number directly on the basis of the block data of the full chain;
when the calculated total number is smaller than the number of the currently operated block chains, calculating the difference number obtained by subtracting the total number from the number of the currently operated block chains, and stopping starting the started block chains of the difference number from the started block chains directly on the basis of the block data of the full chain.
CN201810274239.6A 2018-03-29 2018-03-29 Multi-block chain integration control method, system, electronic device and storage medium Active CN108681963B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810274239.6A CN108681963B (en) 2018-03-29 2018-03-29 Multi-block chain integration control method, system, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810274239.6A CN108681963B (en) 2018-03-29 2018-03-29 Multi-block chain integration control method, system, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN108681963A CN108681963A (en) 2018-10-19
CN108681963B true CN108681963B (en) 2020-07-31

Family

ID=63799720

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810274239.6A Active CN108681963B (en) 2018-03-29 2018-03-29 Multi-block chain integration control method, system, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN108681963B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109669945B (en) * 2018-12-12 2021-01-05 成都四方伟业软件股份有限公司 Block chain-based collaborative management method and device
CN109685488A (en) * 2018-12-24 2019-04-26 杭州复杂美科技有限公司 Money transfer transactions fragment processing method, equipment and storage medium
CN109711842B (en) * 2018-12-29 2021-04-09 西安纸贵互联网科技有限公司 Account book accounting method of block chain network with regularly converged parallel chains
CN109767216B (en) * 2018-12-29 2020-10-02 莆田市烛火信息技术有限公司 Account book accounting system of block chain network with regularly converged parallel chains
CN110221938A (en) * 2019-05-06 2019-09-10 深圳壹账通智能科技有限公司 The method and storage medium of electronic device, block chain common recognition
CN112583712B (en) * 2019-09-30 2023-05-30 北京京东尚科信息技术有限公司 Block chain router and block chain network system
CN111031100A (en) * 2019-11-21 2020-04-17 上海交通大学 Extended block chain storage method, system and medium
CN111159283B (en) * 2019-11-25 2023-08-22 东软集团股份有限公司 Method, device and equipment for merging blocks in block chain
CN112163004A (en) * 2020-10-14 2021-01-01 上海万向区块链股份公司 List processing and updating display system and method based on multi-chain data fusion
CN112001800B (en) * 2020-10-28 2024-04-16 支付宝(杭州)信息技术有限公司 Method and device for processing business in block chain system
CN113205424B (en) * 2020-10-28 2023-08-25 支付宝(杭州)信息技术有限公司 Method and apparatus for deploying and invoking contracts in blockchain

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105761146A (en) * 2016-01-24 2016-07-13 杭州复杂美科技有限公司 Block link matching exchange
CN106682984A (en) * 2016-10-27 2017-05-17 上海亿账通区块链科技有限公司 Block chain-based transaction business processing method and system
CN106878000A (en) * 2017-03-06 2017-06-20 中钞信用卡产业发展有限公司北京智能卡技术研究院 A kind of alliance's chain common recognition method and system
CN107045518A (en) * 2016-10-18 2017-08-15 北京天德科技有限公司 A kind of extension design method of block chain
CN107181765A (en) * 2017-07-25 2017-09-19 光载无限(北京)科技有限公司 Network digital identity identifying method based on block chain technology
CN107231299A (en) * 2017-06-07 2017-10-03 众安信息技术服务有限公司 A kind of chain route and realized the system that block chain communicates across chain
CN107239940A (en) * 2017-05-11 2017-10-10 北京博晨技术有限公司 Network trading method and device based on block catenary system
CN107360206A (en) * 2017-03-29 2017-11-17 阿里巴巴集团控股有限公司 A kind of block chain common recognition method, equipment and system
CN107358420A (en) * 2017-06-09 2017-11-17 北京博晨技术有限公司 Method for realizing the block catenary system of focus account and realizing focus account
CN107678865A (en) * 2017-09-20 2018-02-09 中国银行股份有限公司 The verification method and system of block chain based on transaction packet
CN107679857A (en) * 2017-10-10 2018-02-09 马晶瑶 Across the chain method of commerce and storage medium of block chain
CN107819582A (en) * 2016-09-14 2018-03-20 陈新 Intelligent block chain interacted system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150227890A1 (en) * 2014-02-07 2015-08-13 Kristin Kaye Bednarek Communications system and smart device apps supporting segmented order distributed distribution system

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105761146A (en) * 2016-01-24 2016-07-13 杭州复杂美科技有限公司 Block link matching exchange
CN107819582A (en) * 2016-09-14 2018-03-20 陈新 Intelligent block chain interacted system
CN107045518A (en) * 2016-10-18 2017-08-15 北京天德科技有限公司 A kind of extension design method of block chain
CN106682984A (en) * 2016-10-27 2017-05-17 上海亿账通区块链科技有限公司 Block chain-based transaction business processing method and system
CN106878000A (en) * 2017-03-06 2017-06-20 中钞信用卡产业发展有限公司北京智能卡技术研究院 A kind of alliance's chain common recognition method and system
CN107360206A (en) * 2017-03-29 2017-11-17 阿里巴巴集团控股有限公司 A kind of block chain common recognition method, equipment and system
CN107239940A (en) * 2017-05-11 2017-10-10 北京博晨技术有限公司 Network trading method and device based on block catenary system
CN107231299A (en) * 2017-06-07 2017-10-03 众安信息技术服务有限公司 A kind of chain route and realized the system that block chain communicates across chain
CN107358420A (en) * 2017-06-09 2017-11-17 北京博晨技术有限公司 Method for realizing the block catenary system of focus account and realizing focus account
CN107181765A (en) * 2017-07-25 2017-09-19 光载无限(北京)科技有限公司 Network digital identity identifying method based on block chain technology
CN107678865A (en) * 2017-09-20 2018-02-09 中国银行股份有限公司 The verification method and system of block chain based on transaction packet
CN107679857A (en) * 2017-10-10 2018-02-09 马晶瑶 Across the chain method of commerce and storage medium of block chain

Also Published As

Publication number Publication date
CN108681963A (en) 2018-10-19

Similar Documents

Publication Publication Date Title
CN108681963B (en) Multi-block chain integration control method, system, electronic device and storage medium
CN108765142B (en) Electronic device, multi-blockchain integration control method, and computer-readable storage medium
CN108848039B (en) Server, message distribution method and storage medium
CN108304260B (en) Virtualization operation scheduling system based on high-performance cloud computing and implementation method thereof
CN109543455B (en) Data archiving method and device for block chain
WO2021031473A1 (en) Blockchain asset processing method based on multiple asset models and related device
CN109951547B (en) Transaction request parallel processing method, device, equipment and medium
CN111124277B (en) Deep learning data set caching method, system, terminal and storage medium
CN108664660A (en) Distributed implementation method, apparatus, equipment and the storage medium of time series database
CN109408590B (en) Method, device and equipment for expanding distributed database and storage medium
CN109886693B (en) Consensus realization method, device, equipment and medium for block chain system
CN107704310B (en) Method, device and equipment for realizing container cluster management
CN108833610B (en) Information updating method, device and system
CN103873587A (en) Method and device for achieving dispatching based on cloud platform
CN108965450B (en) Service request response method, device, computer equipment and storage medium
CN105260244A (en) Task scheduling method and device for distributed system
CN105162869A (en) Data backup management method and equipment
CN108234551A (en) A kind of data processing method and device
CN108153494B (en) A kind of I/O request processing method and processing device
CN112003930A (en) Task allocation method, device, equipment and storage medium
CN109032779B (en) Task processing method and device, computer equipment and readable storage medium
CN103685084A (en) Method and device for generating data frames
CN111241069A (en) Data flattening method and system based on block chain
CN110837421A (en) Task allocation method and device
CN110019487A (en) A kind of database connection management method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20211011

Address after: 518000 floors 21-23, block B, building 12, Shenzhen Bay science and technology ecological park, No. 18, community science and technology south road, high tech Zone, Yuehai street, Shenzhen, Guangdong

Patentee after: Xunlei Networking Technologies, Ltd.

Address before: 518000 Room 201, building A, 1 front Bay Road, Shenzhen Qianhai cooperation zone, Shenzhen, Guangdong

Patentee before: SHENZHEN ONETHING TECHNOLOGIES Co.,Ltd.