CN108765142B - Electronic device, multi-blockchain integration control method, and computer-readable storage medium - Google Patents

Electronic device, multi-blockchain integration control method, and computer-readable storage medium Download PDF

Info

Publication number
CN108765142B
CN108765142B CN201810272288.6A CN201810272288A CN108765142B CN 108765142 B CN108765142 B CN 108765142B CN 201810272288 A CN201810272288 A CN 201810272288A CN 108765142 B CN108765142 B CN 108765142B
Authority
CN
China
Prior art keywords
block
chain
chains
new
preset type
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
CN201810272288.6A
Other languages
Chinese (zh)
Other versions
CN108765142A (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 CN201810272288.6A priority Critical patent/CN108765142B/en
Publication of CN108765142A publication Critical patent/CN108765142A/en
Application granted granted Critical
Publication of CN108765142B publication Critical patent/CN108765142B/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)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses an electronic device, a multi-block chain integration control method and a computer readable storage medium. When each block chain generates a new block, the new full-scale block is formed according to the blocks newly inserted into all the block chains, the generated new full-scale block is inserted into the full-scale chain, the full-scale chain realizes the transverse expansion of a plurality of block chains, and the storage, backup and management are convenient.

Description

Electronic device, multi-blockchain integration control method, and computer-readable storage medium
Technical Field
The present invention relates to electronic devices, and more particularly, to an electronic device, a method for controlling multi-blockchain integration, and a computer-readable storage medium.
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 it difficult to improve the transaction performance due to machine limitation. Although the industry also has a scenario applying scheme using multiple blockchains, the transaction is hashed to different blockchains to execute the transaction, so as to improve the transaction performance and the expandability.
However, in the existing scheme of using multiple blockchains for scene application, the storage blocks are usually distributed in multiple blockchains, which is difficult to manage, and the blockchains cannot be modified once being generated, and are complex when needing to be laterally expanded.
Disclosure of Invention
The invention mainly aims to solve the problems that stored data are difficult to manage and a block chain is difficult to expand transversely in a multi-block chain scene.
To achieve the above object, the present invention provides a multi-partition chain integrated control method, which includes:
a first query step: when a block is inserted into one of the block chains, receiving a notification of inserting the block from the block chain, or inquiring whether new blocks are generated in the block chains in real time or at regular time;
a second query step: when a new block is generated, inquiring a second preset type block identifier of the new block generated by the block chains within a preset time period according to mapping relation data of each prestored block chain and a first preset type block identifier, and respectively inquiring preset type block information of the second preset type block identifier corresponding to each chain of the block chains;
a sorting step: according to the inquired information of all the preset type blocks, the transactions in the blocks of all the second preset type block identifiers of the plurality of block chains are sequenced according to the time sequence;
a transaction executing step: executing the transaction in the block with the second preset type block identification according to the sorting result, and generating a new full block;
an insertion step: and inserting the generated new full blocks into a full chain, and respectively storing the first preset type block identifications in the second preset type block identifications of the new blocks corresponding to the plurality of block chains in the new full block generation process.
Preferably, the preset type block identifier is a block ID, the first preset type block identifier is a maximum block ID, and the second preset type block identifier is a new block ID.
Preferably, wherein the second querying step comprises:
at regular time or after receiving a block merging instruction sent by a user, respectively inquiring a corresponding maximum block ID from each block chain to a new block ID of the new block generated in the preset time period according to pre-stored mapping relation data of the block chains and the maximum block ID;
and respectively inquiring the preset type block information of the new block ID corresponding to each chain of the plurality of block chains.
Preferably, the method further comprises:
acquiring transaction request index data of each block chain in the preset time period in real time or in a timing manner;
calculating actual transaction processing index data of each block chain according to block data output 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;
if the total number is greater than the number of the currently operated block chains, calculating the difference number obtained by 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;
if the 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 based on the block data of the full chain.
Preferably, the method further comprises:
and if a node expansion request with the preset type node information of the node to be added sent by the user is received, responding to the node expansion request, and directly starting a new node based on the data of the full-scale chain.
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:
a first query step: when a block is inserted into one of the block chains, receiving a notification of inserting the block from the block chain, or inquiring whether new blocks are generated in the block chains in real time or at regular time;
a second query step: when a new block is generated, inquiring a second preset type block identifier of the new block generated by the block chains within a preset time period according to mapping relation data of each prestored block chain and a first preset type block identifier, and respectively inquiring preset type block information of the second preset type block identifier corresponding to each chain of the block chains;
a sorting step: according to the inquired information of all the preset type blocks, the transactions in the blocks of all the second preset type block identifiers of the plurality of block chains are sequenced according to the time sequence;
a transaction executing step: executing the transaction in the block with the second preset type block identification according to the sorting result, and generating a new full block;
an insertion step: and inserting the generated new full blocks into a full chain, and respectively storing the first preset type block identifications in the second preset type block identifications of the new blocks corresponding to the plurality of block chains in the new full block generation process.
Preferably, the preset type block identifier is a block ID, the first preset type block identifier is a maximum block ID, and the second preset type block identifier is a new block ID.
Preferably, the second querying step comprises:
at regular time or after receiving a block merging instruction sent by a user, respectively inquiring a corresponding maximum block ID from each block chain to a new block ID of the new block generated in the preset time period according to pre-stored mapping relation data of the block chains and the maximum block ID;
and respectively inquiring the preset type block information of the new block ID corresponding to each chain of the plurality of block chains.
Preferably, the multi-blockchain integrated control program, when executed by the processor, is further configured to perform the steps of:
acquiring transaction request index data of each block chain in the preset time period in real time or in a timing manner;
calculating actual transaction processing index data of each block chain according to block data output 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;
if the total number is greater than the number of the currently operated block chains, calculating the difference number obtained by 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;
if the 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 based on the block data of the full chain.
Preferably, the multi-blockchain integrated control program, when executed by the processor, is further configured to perform the steps of:
and if a node expansion request with the preset type node information of the node to be added sent by the user is received, responding to the node expansion request, and directly starting a new node based on the data of the full-scale chain.
In addition, to achieve the above object, the present invention provides a computer-readable storage medium storing a multi-blockchain integrated control program, the multi-blockchain integrated control program being executable by at least one processor to cause the at least one processor to execute any one of the above multi-blockchain integrated control methods.
When each block chain generates a new block, the new full-scale block is formed according to the blocks newly inserted into all the block chains, the generated new full-scale block is inserted into the full-scale chain, the full-scale chain realizes the transverse expansion of a plurality of block chains, and the storage, backup and management are convenient.
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 schematic diagram of an operating environment of a multi-partition chain integrated control module according to a first embodiment of the present invention;
FIG. 3 is a block diagram of a process of a multi-block chain integrated control module according to a second 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 this embodiment, the method includes:
step S10, when a block is inserted into a block chain of the block chains, receiving a notification of inserting the block from the block chain, or querying whether a new block is generated in the block chains in real time or at regular time;
the multi-block chain integration control module of the full quantum chain inquires whether a new block is generated from each block chain in real time or at regular time, if so, the step S20 is executed, and if not, the step returns to continue the inquiry.
In addition, the step of the multi-block chain integration control module of the full quantum chain inquiring whether a new block is generated from each block chain in real time or at regular time can be replaced by the following steps: if a block is inserted into a chain of a blockchain of multiple blockchains (partitions), the blockchain notifies the multi-blockchain integrated control module of the full-scale chain, and after receiving the notification of the block, the multi-blockchain integrated control module performs step S20.
Step S20, when a new block is generated, periodically or after a block merge command sent by a user is received, according to pre-stored mapping relationship data between each block chain and a first preset type block identifier, querying a second preset type block identifier of the new block generated by the block chains within a preset time period, and querying preset type block information of the second preset type block identifier corresponding to each chain of the block chains, respectively;
the first predetermined type block ID may be, for example, a maximum block ID, and the second predetermined type block ID may be, for example, a new block ID.
The mapping relationship data between each block chain and the first preset type block identifier is preset and stored, and the mapping relationship data may be a mapping table.
If a new block is generated in the block chain, the multi-block chain integration control module queries a second preset type block identifier of the new block generated in a preset time period (for example, in the last 48 hours) from each block chain according to mapping relation data of each 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 queries preset type block information of the second preset type block identifier corresponding to each chain from each block 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, block signatures and the like, and each transaction information includes transaction time, a transfer-out account address, a transfer-in account address, a transfer amount, a commission fee, a transaction signature and the like.
Step S30, according to all the inquired preset type block information, the transactions in the blocks of all the second preset type block identifications of the plurality of block chains are sequenced according to the time sequence;
the preset type block information comprises transaction time, so that transactions in blocks marked by all second preset type blocks can be sequenced according to time sequence.
Step S40, executing the transaction in the block with the second preset type block identifier according to the sorting result, and generating a new full block;
step S50, inserting the generated new full size blocks into a full size chain, and storing the first preset type block id in the second preset type block id of the new block corresponding to the plurality of block chains in the new full size block generation process, respectively.
In this embodiment, the multiple block chains are merged into one block chain (referred to as a full chain for short), and the full chain block of the full chain is generated according to the new block generated by the multiple block chains and contains the data of the blocks in the multiple block chains, so that the full chain realizes the lateral expansion of the multiple block chains, and is convenient for storage, backup and management.
Further, in this embodiment, the preset type block ID is a block ID (identification), 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 S20 includes:
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 the new block generated in the preset time period (for example, the latest 48 hours) according to the pre-stored mapping relation data between the block chains and the maximum block ID;
and respectively inquiring the preset type block information of the new block ID corresponding to each chain of the plurality of block chains.
Further, in this embodiment, the method for multi-block chain integration control further includes:
and if a node expansion request with the preset type node information of the node to be added sent by the user is received, responding to the node expansion request, and directly starting a new node based on the data of the full-scale chain.
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:
acquiring transaction request index data of each block chain in real time or in a timing manner within a preset time period (for example, within the last 24 hours);
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.
Calculating actual transaction processing index data of each block chain according to 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.
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;
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.
If the calculated total number is larger than the number of the currently operated block chains, calculating the difference number obtained by 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;
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.
In addition, the invention also provides a multi-block chain integration control program.
Referring to FIG. 2, a schematic operational environment of a multi-block chain integrated control process 10 according to a first embodiment of the present invention is shown.
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. 2 only shows the electronic device 1 with components 11-13, but it is to be understood that not all 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. 3, fig. 3 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. 3, the multi-block chain integrated control program 10 may be divided into a first query unit 101, a second query unit 102, a transaction sorting unit 103, a transaction execution unit 104, and an update unit 105. 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:
a first query unit 101, configured to receive a notification of inserting a block from a block chain when the block is inserted into the block chain of multiple block chains, or query whether a new block is generated in the multiple block chains in real time or at regular time;
a second query unit 102, configured to query, when a new block is generated, second preset type block identifiers of the new block generated by the block chains within a preset time period according to mapping relationship data between pre-stored block chains and first preset type block identifiers at regular time or after a block merging instruction sent by a user is received, and query preset type block information of the second preset type block identifiers corresponding to the block chains on the block chains respectively;
the transaction sorting unit 103 is configured to sort, according to the inquired information of all the preset type blocks, the transactions in the blocks identified by all the second preset type blocks of the plurality of block chains according to a time sequence;
the transaction execution unit 104 is used for performing transactions in the blocks with the second preset type block identifications and generating new full-amount blocks;
an updating unit 105, configured to insert the generated new full size block into a full size chain, and store the first preset type block identifier in the second preset type block identifiers of the new block corresponding to the multiple block chains in the new full size block generation process, respectively.
The first query unit 101 queries whether a new block is generated from each block chain in real time or at regular time, if so, the second query unit 102 is called, and if not, the query is returned to continue.
Furthermore, the first query unit 101 may further perform the following steps: if a block is inserted into a block chain of a plurality of block chains (partitions for short), the block chain notifies the first query unit 101, and the first query unit 101 calls the second query unit 102 after receiving the notification of the block.
The first predetermined type block ID may be, for example, a maximum block ID, and the second predetermined type block ID may be, for example, a new block ID.
The mapping relationship data between each block chain and the first preset type block identifier is preset and stored, and the mapping relationship data may be a mapping table.
If a new block is generated in the block chain, the second query unit 102 queries, at regular time or after receiving a block merge instruction sent by a user, a second preset type block identifier of the new block generated within a preset time period (for example, within the last 48 hours) from each block chain according to mapping relationship data of each pre-stored block chain and the first preset type block identifier, and queries preset type block information of the second preset type block identifier corresponding to each chain from each block chain, for example, the preset type block information includes time of block generation, a unique hash value of the block, transaction information included in the block, a block signature, and the like, and each transaction information includes transaction time, a transfer-out account address, a transfer-in account address, a transfer amount, a commission fee, a transaction signature, and the like. The transaction sorting unit 103 arranges the transactions in the blocks identified by all the second preset type blocks of all the block chains according to the time sequence according to the inquired information of all the preset type blocks; the transaction execution unit 104 executes the transactions in the blocks identified by all the second preset type blocks of all the block chains according to the sorting sequence and generates a new full-amount block; the updating unit 105 inserts the generated new full blocks into the full chain, and stores the first preset type block identifiers in the second preset type block identifiers of all the new blocks corresponding to each block chain in the new full block generating process.
In this embodiment, when a new block is generated in each block chain, a new full-size block is formed according to the newly inserted blocks of all the block chains, and the generated new full-size block is inserted into the full-size chain, so that the full-size chain realizes the lateral expansion of a plurality of block chains, and is convenient for storage, backup and management.
Further, in this embodiment, the preset type block ID is a block ID, the first preset type block ID is a maximum block ID, the second preset type block ID is a new block ID, and the second querying unit 102 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.
Further, in this embodiment, the updating unit 105 is further configured to:
and if a node expansion request with preset type node information of the node to be added sent by a user is received, responding to the node expansion request, and directly starting a new node based on the data of the full-scale chain.
In a second embodiment of the multi-blockchain integration control process 10 of the present invention, based on the first embodiment, the multi-blockchain integration control process 10 is further configured to:
acquiring 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;
calculating actual transaction processing index data of each block chain according to block data output 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;
if the calculated total number is larger than the number of the currently operated block chains, calculating the difference number obtained by 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;
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 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.
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 in 10 seconds and the block includes 10000 transactions, the actual transaction processing index data is 10000/10-1000 transactions/second.
The step of calculating, by the second calculation unit, the total number of the required blockchains according to the transaction request index data of each blockchain and the actual transaction processing index data of each blockchain may specifically be: assuming that 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.
Further, 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 multi-blockchain integrated control method in any of the above embodiments.
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 by comprising the following steps:
a first query step: when a block is inserted into one of the block chains, receiving a notification of inserting the block from the block chain, or inquiring whether new blocks are generated in the block chains in real time or at regular time;
a second query step: when a new block is generated, inquiring a second preset type block identifier of the new block generated by the block chains within a preset time period according to mapping relation data of each prestored block chain and a first preset type block identifier, and respectively inquiring preset type block information of the second preset type block identifier corresponding to each chain of the block chains;
a sorting step: according to the inquired information of all the preset type blocks, the transactions in the blocks of all the second preset type block identifiers of the plurality of block chains are sequenced according to the time sequence;
a transaction executing step: executing the transaction in the block with the second preset type block identification according to the sorting result, and generating a new full block;
an insertion step: inserting the generated new full blocks into a full chain, and respectively storing the first preset type block identifications in the second preset type block identifications of the new blocks corresponding to the plurality of block chains in the new full block generation process; and
a dynamic adjustment step, comprising:
acquiring transaction request index data of each block chain in the preset time period in real time or in a timing manner;
calculating actual transaction processing index data of each block chain according to block data output 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;
if the total number is greater than the number of the currently operated block chains, calculating the difference number obtained by 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;
if the 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 based on the block data of the full chain.
2. The method of claim 1 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.
3. The method of claim 2 wherein the second polling step comprises:
at regular time or after receiving a block merging instruction sent by a user, respectively inquiring a corresponding maximum block ID from each block chain to a new block ID of the new block generated in the preset time period according to pre-stored mapping relation data of the block chains and the maximum block ID;
and respectively inquiring the preset type block information of the new block ID corresponding to each chain of the plurality of block chains.
4. The method of any of claims 1 to 3, further comprising:
and if a node expansion request with the preset type node information of the node to be added sent by the user is received, responding to the node expansion request, and directly starting a new node based on the data of the full-scale chain.
5. 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:
a first query step: when a block is inserted into one of the block chains, receiving a notification of inserting the block from the block chain, or inquiring whether new blocks are generated in the block chains in real time or at regular time;
a second query step: when a new block is generated, inquiring a second preset type block identifier of the new block generated by the block chains within a preset time period according to mapping relation data of each prestored block chain and a first preset type block identifier, and respectively inquiring preset type block information of the second preset type block identifier corresponding to each chain of the block chains;
a sorting step: according to the inquired information of all the preset type blocks, the transactions in the blocks of all the second preset type block identifiers of the plurality of block chains are sequenced according to the time sequence;
a transaction executing step: executing the transaction in the block with the second preset type block identification according to the sorting result, and generating a new full block;
an insertion step: inserting the generated new full blocks into a full chain, and respectively storing the first preset type block identifications in the second preset type block identifications of the new blocks corresponding to the plurality of block chains in the new full block generation process; and
a dynamic adjustment step, comprising:
acquiring transaction request index data of each block chain in the preset time period in real time or in a timing manner;
calculating actual transaction processing index data of each block chain according to block data output 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;
if the total number is greater than the number of the currently operated block chains, calculating the difference number obtained by 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;
if the 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 based on the block data of the full chain.
6. The electronic device of claim 5, 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.
7. The electronic device of claim 6, wherein the second querying step comprises:
at regular time or after receiving a block merging instruction sent by a user, respectively inquiring a corresponding maximum block ID from each block chain to a new block ID of the new block generated in the preset time period according to pre-stored mapping relation data of the block chains and the maximum block ID;
and respectively inquiring the preset type block information of the new block ID corresponding to each chain of the plurality of block chains.
8. The electronic device according to any of claims 5-6, wherein the multi-blockchain integrated control program, when executed by the processor, is further configured to perform the steps of:
and if a node expansion request with the preset type node information of the node to be added sent by the user is received, responding to the node expansion request, and directly starting a new node based on the data of the full-scale 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 multi-blockchain integrated control method of any one of claims 1 to 4.
CN201810272288.6A 2018-03-29 2018-03-29 Electronic device, multi-blockchain integration control method, and computer-readable storage medium Active CN108765142B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810272288.6A CN108765142B (en) 2018-03-29 2018-03-29 Electronic device, multi-blockchain integration control method, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810272288.6A CN108765142B (en) 2018-03-29 2018-03-29 Electronic device, multi-blockchain integration control method, and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN108765142A CN108765142A (en) 2018-11-06
CN108765142B true CN108765142B (en) 2020-07-31

Family

ID=63980749

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810272288.6A Active CN108765142B (en) 2018-03-29 2018-03-29 Electronic device, multi-blockchain integration control method, and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN108765142B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109687953B (en) * 2018-12-24 2021-12-31 杭州复杂美科技有限公司 Transaction classification method, apparatus and storage medium
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
CN112487094B (en) * 2020-12-08 2024-01-19 深圳供电局有限公司 Method, device, computer equipment and storage medium for synchronizing energy block data

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107239940A (en) * 2017-05-11 2017-10-10 北京博晨技术有限公司 Network trading method and device based on block catenary system
CN107368259A (en) * 2017-05-25 2017-11-21 阿里巴巴集团控股有限公司 A kind of method and apparatus that business datum is write in the catenary system to block
CN107391649A (en) * 2017-07-14 2017-11-24 浙商银行股份有限公司 A kind of system and method for lifting block chain query efficiency
CN107688945A (en) * 2017-08-11 2018-02-13 杭州秘猿科技有限公司 A kind of efficient license chain based on delaying state common recognition
CN107807953A (en) * 2017-09-28 2018-03-16 合肥博力生产力促进中心有限公司 A kind of information cloud platform management system based on block chain

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160125403A1 (en) * 2014-04-28 2016-05-05 Chin-hao Hu Offline virtual currency transaction

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107239940A (en) * 2017-05-11 2017-10-10 北京博晨技术有限公司 Network trading method and device based on block catenary system
CN107368259A (en) * 2017-05-25 2017-11-21 阿里巴巴集团控股有限公司 A kind of method and apparatus that business datum is write in the catenary system to block
CN107391649A (en) * 2017-07-14 2017-11-24 浙商银行股份有限公司 A kind of system and method for lifting block chain query efficiency
CN107688945A (en) * 2017-08-11 2018-02-13 杭州秘猿科技有限公司 A kind of efficient license chain based on delaying state common recognition
CN107807953A (en) * 2017-09-28 2018-03-16 合肥博力生产力促进中心有限公司 A kind of information cloud platform management system based on block chain

Also Published As

Publication number Publication date
CN108765142A (en) 2018-11-06

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
CN109345388B (en) Block chain intelligent contract verification method and device and storage medium
CN107562513B (en) Intelligent contract life cycle management method based on JAVA
CN111124277B (en) Deep learning data set caching method, system, terminal and storage medium
CN108388599B (en) Electronic device, data migration and calling method and storage medium
CN110309161B (en) Data synchronization method and device and server
CN110543448A (en) data synchronization method, device, equipment and computer readable storage medium
CN111294390B (en) Block data rapid synchronization method, device, equipment and storage medium
CN110427386B (en) Data processing method, device and computer storage medium
CN102202087A (en) Method for identifying storage equipment and system thereof
CN111385370B (en) ID allocation method, device, storage medium and ID allocation system
CN112000649B (en) Method and device for synchronizing incremental data based on map reduce
CN111580948A (en) Task scheduling method and device and computer equipment
WO2021129005A1 (en) Blockchain state change-based transaction tracking method and device
CN113703929B (en) Task scheduling method, system, computing device and storage medium
CN111241069A (en) Data flattening method and system based on block chain
CN111831744A (en) DAPP on-chain data retrieval system, method and medium
CN112003930A (en) Task allocation method, device, equipment and storage medium
CN109408035B (en) Flow configuration method, storage medium and server of business system
CN109614242A (en) A kind of computing capability sharing method, device, equipment and medium
CN114116123A (en) Application capacity expansion method and device
CN112217849B (en) Task scheduling method, system and computer equipment in SD-WAN system
CN114401239A (en) Metadata transmission method and device, computer equipment and storage medium
CN111475306A (en) Micro service node, asynchronous task processing method, system and storage medium

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

Effective date of registration: 20211009

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.

TR01 Transfer of patent right