CN112258184B - Method, apparatus, electronic device and readable storage medium for freezing blockchain network - Google Patents

Method, apparatus, electronic device and readable storage medium for freezing blockchain network Download PDF

Info

Publication number
CN112258184B
CN112258184B CN202011176384.4A CN202011176384A CN112258184B CN 112258184 B CN112258184 B CN 112258184B CN 202011176384 A CN202011176384 A CN 202011176384A CN 112258184 B CN112258184 B CN 112258184B
Authority
CN
China
Prior art keywords
transaction
blockchain network
target
node
package
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
CN202011176384.4A
Other languages
Chinese (zh)
Other versions
CN112258184A (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.)
Chengdu Quality Starker Technology Co Ltd
Original Assignee
Chengdu Quality Starker 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 Chengdu Quality Starker Technology Co Ltd filed Critical Chengdu Quality Starker Technology Co Ltd
Priority to CN202011176384.4A priority Critical patent/CN112258184B/en
Publication of CN112258184A publication Critical patent/CN112258184A/en
Application granted granted Critical
Publication of CN112258184B publication Critical patent/CN112258184B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3827Use of message hashing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • 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/02Banking, e.g. interest calculation or account maintenance

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Finance (AREA)
  • General Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Databases & Information Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Technology Law (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Computing Systems (AREA)
  • Development Economics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides a method, a device, electronic equipment and a readable storage medium for freezing a blockchain network. Wherein the method of freezing a blockchain network is applied to any node within the blockchain network, the method comprising: receiving a transaction packet sent by a sequencing node in the blockchain network; detecting whether the transaction package carries a freezing identifier or not; continuously acquiring target data from a target system outside the blockchain network under the condition that the transaction packet carries the freezing identifier; after the target data is acquired, generating a block corresponding to the transaction package; after the block corresponding to the transaction package is generated, processing of a next transaction package of the transaction package is started.

Description

Method, apparatus, electronic device and readable storage medium for freezing blockchain network
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method, an apparatus, an electronic device, and a readable storage medium for freezing a blockchain network.
Background
The block chain technology is built on a transmission network (also called a block chain network), distributed node equipment (hereinafter called nodes for short) in the transmission network realizes generation, verification and uplink storage of block data by running a block chain program, finally realizes a data tamper-proof mechanism, and provides a safe and reliable technical new idea for service development.
The blockchain technology can be applied to various business scenes, such as financial field, electronic commerce field, commodity or raw material tracing field, electronic certificate storing field and the like, and can be used for developing business due to the fact that the blockchain technology realizes a data tamper-proof mechanism, so that the trust crisis among parties involved in the business can be solved.
During the development of a business using a blockchain network, in some cases, frozen demand for accounts, assets, or intelligent contracts within the blockchain network may arise. In the related art, freezing accounts, assets, smart contracts, etc. within a blockchain network has been enabled. In other cases, the need to freeze the entire blockchain network may arise. However, in the related art, it is also difficult to effectively freeze the entire blockchain network.
Disclosure of Invention
The embodiment of the invention aims to provide a method, a device, electronic equipment and a readable storage medium for freezing a blockchain network, and the specific technical scheme is as follows:
in a first aspect of an embodiment of the present invention, there is provided a method of freezing a blockchain network, applied to any node within the blockchain network, the method including:
Receiving a transaction packet sent by a sequencing node in the blockchain network;
detecting whether the transaction package carries a freezing identifier or not;
continuously acquiring target data from a target system outside the blockchain network under the condition that the transaction packet carries the freezing identifier;
after the target data is acquired, generating a block corresponding to the transaction package;
after the block corresponding to the transaction package is generated, processing of a next transaction package of the transaction package is started.
In a second aspect of an embodiment of the present invention, there is provided an apparatus for freezing a blockchain network, for use with any node within the blockchain network, the apparatus comprising:
the transaction packet receiving module is used for receiving the transaction packet sent by the sequencing node in the blockchain network;
the freezing identification detection module is used for detecting whether the transaction packet carries a freezing identification or not;
the target data acquisition module is used for continuously acquiring target data from a target system outside the blockchain network under the condition that the transaction packet carries the freezing identifier;
the block generation module is used for generating a block corresponding to the transaction packet after the target data is acquired;
The freezing identification detection module is further used for starting to process the next transaction package of the transaction package after the block corresponding to the transaction package is generated.
In a third aspect of the embodiments of the present invention, there is provided an electronic device including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory perform communication with each other through the communication bus;
the memory is used for storing a computer program;
the processor is configured to implement the method for freezing a blockchain network according to any of the embodiments of the present invention when executing a program stored on a memory.
In a fourth aspect of embodiments of the present invention, there is provided a computer readable storage medium having stored thereon a computer program which when executed by a processor implements the method of freezing a blockchain network provided by any of the embodiments of the present invention.
In the invention, any node of the blockchain network can detect whether the transaction packet carries a freezing identifier after receiving the transaction packet sent by the sequencing node. If the transaction packet carries a freeze identification, the node will continuously acquire target data from a target system outside the blockchain network. After the target data is acquired, the node generates a corresponding block for the transaction packet. After generating the corresponding chunk for the transaction package, the node begins processing the next transaction package for the transaction package.
It can be seen that during the period when the node continuously acquires the target data from the target system outside the blockchain network, the node cannot generate a corresponding block for the currently processed transaction packet, and thus cannot process the next transaction packet, because the node has not acquired the target data temporarily. Thus, the node is equivalent to being frozen. For the whole blockchain network, the nodes of the whole blockchain network are frozen due to the temporary failure to acquire the target data, so that the whole blockchain network is frozen. In summary, by implementing the invention, freezing of the entire blockchain network can be effectively achieved.
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 evident that the drawings in the following description are only some embodiments of the present invention and that other drawings may be obtained from these drawings by those of ordinary skill in the art without inventive effort.
FIG. 1 is a schematic diagram of a transaction processing method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a cross-chain transaction performed in accordance with one embodiment of the present invention;
FIG. 3 is a schematic diagram of a frozen blockchain network during execution of a cross-chain transaction in accordance with an embodiment of the present invention;
FIG. 4 is a flow chart of a method of freezing a blockchain network in accordance with an embodiment of the present invention;
FIG. 5 is a schematic diagram of an apparatus for freezing a blockchain network in accordance with an embodiment of the present invention;
fig. 6 is a schematic diagram of an electronic device according to an embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. It will be apparent that the described embodiments are some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The block chain technology is built on a transmission network (also called a block chain network), distributed node equipment (hereinafter called nodes for short) in the transmission network realizes generation, verification and uplink storage of block data by running a block chain program, finally realizes a data tamper-proof mechanism, and provides a safe and reliable technical new idea for service development.
In the related art, when a blockchain network is used to perform a service, optionally, in some embodiments, the service performing process includes: real data generated in the physical world is structured into a transaction format supported by the blockchain and published to the blockchain network; after each node of the blockchain network receives the transaction, executing the transaction, and generating a block according to the transaction and the execution result of the transaction; the nodes mutually agree on the blocks generated by each other, and each node adds the respective block to the end of the respective stored blockchain under the condition that the agreement is reached.
In particular, the present invention is not limited to the above embodiments for how to develop services using the blockchain network. Other technical solutions well known to those skilled in the art may be adopted in addition to the above embodiments.
As can be seen, in the related art, the blockchain network enables the development of services by processing one or more transactions related to the services. Optionally, in some embodiments, the blockchain network may process the transaction in the manner shown in fig. 1, fig. 1 is a schematic diagram illustrating the transaction processing manner according to an embodiment of the present invention.
As shown in fig. 1, the blockchain network includes a plurality of nodes having a sorting node therein for sorting and packaging transactions to obtain transaction packages and distributing the transaction packages to each node within the blockchain network.
Wherein the ordering node is elected from a plurality of nodes of the blockchain network. Alternatively, in some embodiments, the ranking nodes may be elected as follows:
any node within the blockchain network periodically (e.g., every 60 seconds) detects whether there is a sorting node in the blockchain network. If there is no, or an existing ordering node fails, the node participates in the ordering node election and generates an election proposal (hereinafter, the election proposal will be abbreviated as proposal) including the node ID of the node. The node broadcasts the generated proposal to the blockchain network, and collects proposal broadcast by other nodes respectively within a preset time length (for example, 5 seconds). The node judges whether the node ID of the node is the smallest node ID in a plurality of node IDs included in all the proposals according to the node ID included in each proposal. If the node ID of the node is the smallest, the node generates an announcement (hereinafter announcement will be simply referred to as a declassification) and periodically (e.g., every 5 seconds) broadcasts the declassification to the blockchain network to announce itself as a new ordering node, the declassification including the node ID of the node. In addition, if the node receives declassification broadcast by other nodes and the node ID in declassification broadcast by other nodes is less than the node ID of the node, the node automatically relinquishes ordering the node identities.
In particular, the present invention is not limited to the above embodiments for selecting the ranking nodes. Other technical solutions well known to those skilled in the art may be adopted in addition to the above embodiments.
As shown in FIG. 1, when any node within the blockchain network receives a transaction, the received transaction is submitted to the ordering node. The ordering node orders and packages a plurality of transactions received within a period of time to generate a transaction package. The transaction package comprises a plurality of transactions which are ordered and packaged by the ordering node in the time period.
In addition, each time a transaction package is generated by the ordering node, a height value is assigned to the transaction package, and the height value assigned to the transaction package is equal to the block height of blocks generated by each node for the transaction package in the future. For a plurality of transaction packages that are continuously generated by the sorting node, the height values assigned to each of the plurality of transaction packages are continuous.
For ease of understanding, assuming that the sorting node generates a transaction packet at a first time, the transaction packet is assigned a height value equal to 1056, the transaction packet is further processed by the nodes to generate corresponding tiles, and the tile height of the tiles is also equal to 1056. The sorting node generates another transaction packet at the second moment, which transaction packet should be given a height value equal to 1057, and the tile height of the tile should be equal to 1057 after the transaction packet is processed by the nodes to generate the corresponding tile in the future.
Similarly, for a plurality of transaction packages generated consecutively by the sorting node, the height values assigned to each of the plurality of transaction packages are consecutive. And a transaction package is assigned a height value equal to the block height of blocks that each node will generate for the transaction package in the future. It can be seen that in order to ensure that the block heights of the blocks of the blockchain are continuous, each node of the blockchain network processes each transaction packet in sequence from low to high according to the height value of the transaction packet when processing the transaction packet.
As shown in FIG. 1, the ordering node, after each generation of a transaction package, distributes the transaction package to each node within the blockchain network (including the ordering node itself). To simplify the drawing, only a part of the nodes receiving the transaction packet is schematically shown in fig. 1.
As shown in fig. 1, each node may, on the one hand, buffer the received transaction packets after receiving the transaction packets. On the other hand, a transaction package with the smallest height value is obtained from a plurality of cached transaction packages (i.e., a plurality of transaction packages received successively), and the transaction package is processed. To simplify the drawing, the process of processing transaction packets by some nodes is only schematically shown in fig. 1.
The specific processing process of the node when processing the transaction package comprises the following steps:
The node reads the transaction from the transaction package in turn, the node executes the transaction for each read transaction to obtain the execution result of the transaction, and the node records the transaction and the execution result thereof into the block body of the block currently prepared to be generated. Thus, when the node sequentially reads all the transactions of the transaction package and executes all the transactions, a block corresponding to the transaction package is generated. Thereafter, the nodes mutually agree on the respective generated blocks, and each node appends the respective generated blocks to the end of the respective stored blockchain if the agreement is reached.
Optionally, in some embodiments, when the plurality of nodes mutually identify the respective generated blocks, a specific identifying manner may be: each node calculates a root hash value for the block body of the block generated by the node, and sends the calculated root hash value to other nodes. Accordingly, each node also receives the root hash value sent by other nodes. Each node compares the received root hash values with the root hash values calculated by the node one by one, and if the root hash values exceeding the preset quantity are equal to the root hash values calculated by the node, the node determines that the generated blocks pass through consensus. For ease of understanding, the preset number may be equal to 51% of the total number of nodes of the blockchain network, for example.
As shown in fig. 1, each node begins processing the next transaction package of the current transaction package after generating a chunk for the current transaction package. For ease of understanding, assuming a node is currently processing a transaction packet having a height value equal to 1056, the node begins processing a transaction packet having a height value equal to 1057 after the node generates a tile for the transaction packet.
In the above, the present invention provides one way in which a blockchain network may process transactions, in conjunction with FIG. 1, as an alternative, and should not be construed as limiting the invention. It should be further noted that some or all of the technical features in the related art are not equivalent to the prior art, and some or all of the technical features in the related art may be technical features of the first disclosure of the present invention.
During the development of traffic with a blockchain network, in some cases, the need to freeze the entire blockchain network may arise. However, in the related art, it is also difficult to effectively freeze the entire blockchain network. To this end, the present invention proposes a method, apparatus, electronic device and readable storage medium for freezing a blockchain network by the following embodiments.
For example, during execution of a cross-chain transaction between two blockchain networks, the need to freeze the entire blockchain network may arise.
Referring to fig. 2, fig. 2 is a schematic diagram illustrating execution of a cross-chain transaction according to an embodiment of the present invention. As shown in FIG. 2, upon receipt of a cross-chain transaction, the blockchain network sends the cross-chain transaction to another blockchain network that participates in the cross-chain transaction.
Optionally, in some embodiments, the cross-chain transaction carries a cross-chain identification. The cross-chain transaction comprises a front transaction and a rear transaction, wherein the front transaction refers to: the part of the cross-chain transaction which needs to be executed in a blockchain network carries the network ID of the blockchain network which needs to execute the front-end transaction. Post-transaction refers to: the part of the cross-chain transaction which needs to be executed in another blockchain network carries the network ID of the blockchain network which needs to execute the post-transaction.
For ease of understanding, assuming, by way of example, that account a of bank a requires 500 transfers to account B of bank B, the pre-transaction of the corresponding cross-chain transaction comprises the following two steps: account a of a blockchain network transfers 500 yuan to a master account of the blockchain network; then destroy 500 elements from the primary account of the blockchain network. The post-transaction includes the following two steps: adding 500 yuan to a main account of another blockchain network; the master account of the other blockchain network then transfers 500 entries to account b of the blockchain network. Wherein bank A participates in the operation and maintenance of the one blockchain network and bank B participates in the operation and maintenance of the other blockchain network.
After any node in the first blockchain network receives a transaction, whether the transaction carries a cross-chain identification is detected. If the transaction carries a cross-chain identification, the transaction is determined to be a cross-chain transaction. For non-cross-chain transactions, the node may submit the transaction to the ordering node in the manner of the processing shown in FIG. 1. For the cross-chain transaction, the node may submit the cross-chain transaction to each node in the blockchain network, and then the designated node in the blockchain network sends the cross-chain transaction to the network corresponding to the network ID carried by the post-transaction, that is, to the blockchain network that needs to execute the post-transaction.
As shown in fig. 2, the blockchain network pre-executes the pre-transaction in the cross-chain transaction to obtain a pre-execution result of the pre-transaction. And the other blockchain network pre-executes the post-transaction in the cross-chain transaction to obtain a pre-execution result of the post-transaction. The other blockchain network returns the pre-execution result of the post-transaction to the blockchain network.
The blockchain network pre-executes the front transaction, specifically: each node in the blockchain network executes the pre-transaction to obtain the execution result of the pre-transaction, and each node records the obtained execution result to a non-ledger database of the node itself. Because the execution results of the pre-transaction are recorded to the non-ledger database, rather than to the ledger database, the execution results of the pre-transaction have not been recorded to the blockchain of the blockchain network.
Similarly, another blockchain network pre-executes post-transactions, specifically: each node in the other blockchain network executes the post-transaction to obtain an execution result of the post-transaction, and each node records the obtained execution result to a non-ledger database of the node itself. Since the execution results of the post-transaction are recorded to the non-ledger database, rather than to the ledger database, the execution results of the post-transaction have not been recorded to the blockchain of another blockchain network.
The pre-execution of the preamble transaction corresponds to a pre-calculation of whether the preamble transaction can be successfully executed in the blockchain network. Similarly, the pre-execution of the post-transaction corresponds to the pre-calculation of whether the post-transaction can be successfully executed in another blockchain network. If the blockchain network can successfully execute the pre-transaction and the other blockchain network can successfully execute the post-transaction, each node of the blockchain network subsequently needs to record the pre-transaction execution result recorded in the non-ledger database into the blockchain, and each node of the other blockchain network subsequently needs to record the post-transaction execution result recorded in the non-ledger database into the blockchain.
It can be seen that the blockchain network needs to be frozen after the blockchain network pre-executes the pre-transaction and before the execution result of the pre-transaction is recorded to the blockchain. The purpose is to prevent the following from happening:
the blockchain network successfully executes the pre-transaction and records the execution result of the pre-transaction to the non-ledger database, however, before the execution result of the pre-transaction is recorded to the blockchain, the asset transfer transaction occurs again to the account related to the pre-transaction, so that the balance of the account is insufficient to support the execution of the pre-transaction. If the execution result of the pre-transaction is still recorded to the blockchain in the following, the double-flower problem is finally caused.
Likewise, after another blockchain network pre-executes the post-transaction, and before the execution result of the post-transaction is recorded to the blockchain, the other blockchain network needs to be frozen.
For how to freeze the blockchain network, please refer to the following, which is not repeated here.
In addition, as shown in fig. 2, after receiving the pre-execution result of the post-transaction returned by another blockchain network, the blockchain network sends the pre-execution result of the pre-transaction, the pre-execution result of the post-transaction and the cross-chain transaction to the public blockchain network. And the public blockchain network judges whether the pre-execution of the front transaction and the rear transaction is successful or not according to the pre-execution result of the front transaction and the pre-execution result of the rear transaction. If yes, the public blockchain network executes the cross-chain transaction, and the execution result of the cross-chain transaction is returned to the two blockchain networks, so that the blockchain network records the pre-execution result of the front-end transaction to the blockchain, and the other blockchain network records the execution result of the rear-end transaction to the blockchain.
The common blockchain network performs cross-chain transactions, which is equivalent to witnessing the cross-chain transactions. An individual user or a banking user may verify that a pre-transaction and a post-transaction were performed within the blockchain network and another blockchain network, respectively, by querying the blockchain of the common blockchain network.
It should be noted that, the "pre-execution result of the pre-transaction" described in the text section refers to the execution result recorded in the non-ledger database after pre-execution of the pre-transaction, where the "pre-execution result of the pre-transaction" and the "execution result of the pre-transaction" actually refer to the same concept. Similarly, the "pre-execution result of the post-transaction" is the execution result recorded to the non-ledger database after pre-executing the post-transaction, where the "pre-execution result of the post-transaction" and the "execution result of the post-transaction" actually refer to the same concept.
As previously described, the blockchain network needs to be frozen after the blockchain network pre-executes the pre-transaction and before the execution result of the pre-transaction is recorded to the blockchain. To achieve freezing of blockchain networks, referring to fig. 3, fig. 3 is a schematic diagram of a frozen blockchain network during execution of a cross-chain transaction in accordance with an embodiment of the present invention.
As shown in fig. 3, any node within the blockchain network submits a cross-chain transaction to each node within the blockchain network upon receipt of the cross-chain transaction.
Optionally, in some embodiments, a number of voting nodes within the blockchain network may also vote on the cross-chain transaction to characterize whether the voting nodes agree to perform the cross-chain transaction. A given node of a blockchain network sends a cross-chain transaction and several votes to another blockchain network. The voting node of the other blockchain network votes for the cross-chain transaction, and the designated node of the other blockchain network transmits the cross-chain transaction and the respective votes of the two blockchain networks to the common blockchain network.
After the public blockchain network receives the cross-chain transaction and a plurality of votes of the two blockchain networks, judging whether the two blockchain networks agree to execute the cross-chain transaction according to the plurality of votes of the two blockchain networks. And the public blockchain network records the judging result and the cross-chain transaction into a newly generated zone block of the public blockchain network. In addition, each node within the blockchain network continuously synchronizes the common blocks newly generated by the common blockchain network.
Wherein the common blockchain network determines that the blockchain network agrees to perform the cross-chain transaction when determining whether both blockchain networks agree to perform the cross-chain transaction, specifically if more than half of the votes of the blockchain networks agree to perform the cross-chain transaction. If more than half of the votes of the other blockchain network agree to perform the cross-chain transaction, it is determined that the other blockchain network agrees to perform the cross-chain transaction.
To simplify the drawing, the voting process, the judgment process of the common blockchain network, and the process of node synchronization of the common blocks are not shown in fig. 3.
As shown in fig. 3, in a specific case, the sequencing node of the blockchain network automatically packages two consecutive transaction packets and sends the two transaction packets to each node of the blockchain network (including the sequencing node itself, the process of receiving the transaction packets by the sequencing node itself is not shown in fig. 3 for simplicity of the drawing). Neither of the two consecutive transaction packages contains a transaction, wherein the former transaction package carries a pre-execution identification and the latter transaction package carries a target identification and a freeze identification. For ease of description, the preceding transaction package will be referred to hereinafter and in fig. 3 as a first transaction package, and the following transaction package will be referred to hereinafter as a second transaction package.
Optionally, in some embodiments, the ordering node may automatically package two consecutive transaction packages under the following specific circumstances: when the common block (assumed to be the block a) synchronized by the sequencing node has a judgment result recorded therein, and the judgment result represents that both blockchain networks agree to execute the cross-chain transaction, the sequencing node automatically packages two continuous transaction packets in response to the judgment result. Wherein the first transaction package carries a pre-execution identifier and the second transaction package carries a freeze identifier. In addition, the second transaction packet also carries the block height of the common block a, and the block height is used as the target identifier.
As shown in fig. 3, after receiving two transaction packets, each node of the blockchain network first processes the first transaction packet in the order of the height values of the two transaction packets. The node generates a block for the first transaction packet when the node detects that the first transaction packet carries a pre-execution identification during processing of the first transaction packet.
After generating the block for the first transaction package, the node executes a pre-received pre-transaction of the cross-chain transaction and obtains an execution result of the pre-transaction. The node records the execution result to a non-ledger database and the node submits the execution result of the pre-transaction to a sequencing node of the blockchain network.
After receiving the execution result of the front transaction and the execution result of the rear transaction submitted by another blockchain network, the sequencing node sends the cross-chain transaction, the execution result of the front transaction, the execution result of the rear transaction and the block height of the public block A to the public blockchain network. To simplify the drawing, the process by which the ordering node sends the above information to the common blockchain network is not shown in fig. 3.
And the public blockchain network judges whether the front transaction and the rear transaction are pre-executed successfully according to the execution result of the front transaction and the execution result of the rear transaction. If yes, the public blockchain network executes the cross-chain transaction, and records the execution result of the cross-chain transaction into a newly generated public block (assuming that the public block is the block D). In addition, the public blockchain network also records the block height of the public block A into the newly generated public block D.
After generating the block for the first transaction packet, the node begins processing the second transaction packet, as shown in fig. 3. The node, during processing of the second transaction packet, when detecting that the second transaction packet carries a freeze flag, indicates that the entire blockchain network needs to be frozen.
In particular, when the node detects that the second transaction packet carries the frozen identifier, the node further reads the target identifier (i.e. the block height of the common block a) from the second transaction packet. Thereafter, the node detects, for each common block to which it is synchronized, whether the common block carries the block height of the common block a. Thus, while the node continuously detects whether each common block carries the target identifier (i.e. the block height of the common block a), the node is frozen as it is always in a state of processing the second transaction packet, but cannot process the next transaction packet of the second transaction packet. For the whole blockchain network, since each node of the whole blockchain network is frozen, the whole blockchain network is frozen. In fig. 3, the phase outlined by the thick dashed box, i.e., the phase in which the entire blockchain network is frozen.
When the node detects that a certain public block carries the block height of the public block A, the node generates a block for the second transaction packet according to the execution result of the front transaction.
When the node detects that a certain public block carries the block height of the public block A, the node acquires a cross-link transaction from the public block A synchronized in advance, executes a front transaction of the cross-link transaction, and takes an execution result of the front transaction as block data corresponding to a second transaction packet, so that a block is generated for the second transaction packet. Or after detecting that a certain public block carries the block height of the public block A, the node reads the execution result of the corresponding front transaction from the non-account book database and takes the execution result as block data corresponding to the second transaction packet, so as to generate a block for the second transaction packet.
After generating the chunk for the second transaction package, the node begins processing the next transaction package of the second transaction package, as shown in fig. 3. Thus, when the node begins processing the next transaction packet of the second transaction packet, it is equivalent to the node being thawed. For the whole blockchain network, since each node of the whole blockchain network is defrosted, the whole blockchain network is defrosted.
In the above, the present invention proposes, by way of several embodiments, a way to freeze a blockchain network in the context of executing a cross-chain transaction. In the following, the present invention, by way of further embodiments, proposes a general way to freeze a blockchain network in a general scenario. The following embodiments and the above embodiments may be referred to each other.
Referring to fig. 4, fig. 4 is a flowchart of a method for freezing a blockchain network according to an embodiment of the present invention, which is applied to any node in the blockchain network. As shown in fig. 4, the method comprises the steps of:
step S41: and receiving a transaction packet sent by a sequencing node in the blockchain network.
Step S42: and detecting whether the transaction package carries a freezing identifier.
Alternatively, in some embodiments, a node may run a thread for receiving transaction packets that are sequentially sent by the sequencing node and buffering the transaction packets. The node may be configured to obtain a transaction package with a minimum height value from the cached transaction packages by running another thread, process the transaction package, and re-obtain a transaction package with a minimum next height value from the cached transaction packages after the transaction package is processed. The specific process for processing the transaction package is the process described in step S42, step S43 and step S44 in the present invention.
Alternatively, in other embodiments, the node may begin processing a transaction package immediately upon receipt of the transaction package.
In the present invention, the ordering node may be a node periodically elected from a plurality of nodes in the blockchain network. Alternatively, the ordering node may be a node that is pre-designated from a plurality of nodes of the blockchain network. The invention does not limit the determination mode of the ordering nodes.
In the invention, the freezing mark can be in the form of: a predetermined character, a predetermined number, a character string composed of predetermined characters, or a character string having a predetermined format. The invention is not limited to the specific form of the freeze mark.
Step S43: and continuously acquiring target data from a target system outside the blockchain network under the condition that the transaction package carries the freezing identification.
Alternatively, in some embodiments, the target system outside of the blockchain network may be another blockchain network. As previously described, the target system may be a public blockchain network, for example. Alternatively, the target system may be other blockchain networks, for example.
Alternatively, in some embodiments, the target system other than the blockchain network may be a non-blockchain network, such as a centralized service system, a user terminal device, a server cluster, or an administrator terminal. Taking the centralized business system as an example, in step S43, the nodes of the blockchain network continuously acquire target data from the centralized business system. Until the target data of the centralized service system is acquired, the node of the blockchain network will not perform the following step S44, and thus will not process the transaction in the next transaction packet, and the whole blockchain network is equivalent to being in a frozen state. In this way, when the centralized business system generates and transmits the target data, the freezing duration of the blockchain network is determined.
In the invention, the node continuously acquires the target data. So-called "persistence," in some embodiments, a node may periodically send a data acquisition request to a target system until the target system returns target data. Alternatively, in other embodiments, the node continues to monitor its predetermined interface until the predetermined interface receives the target data sent by the target system. The method is not limited by the mode that the node continuously acquires the target data from the target system.
In the present invention, the target data required to be acquired by the node may be: processing results of the object, processing credentials of the object, instruction information, hint information, or other blocks generated by the blockchain network that include the target identifier, etc.
Step S44: and after the target data is acquired, generating a block corresponding to the transaction package.
Optionally, in some embodiments, after the target data is obtained, the node starts executing the transaction in the transaction package in response to the obtaining of the target data. The node takes the transaction and the execution result of the transaction as the block data corresponding to the transaction package, thereby generating a block for the transaction package.
Alternatively, in other embodiments, as previously described, the transaction package carrying the freeze identification does not contain a transaction. After the node acquires the target data, reading a pre-execution result stored in advance from a non-account book database, and taking the pre-execution result as block data corresponding to the transaction package, thereby generating a block for the transaction package.
Optionally, in some embodiments, after the node obtains the target data, the node may further use the target data as the block data corresponding to the transaction packet, so as to generate a block for the transaction packet.
Step S45: after the block corresponding to the transaction package is generated, processing of a next transaction package of the transaction package is started.
In particular, after generating the block corresponding to the current transaction packet, the node starts to detect whether the next transaction packet carries the freeze flag (i.e. executes the step S42 described above for the next transaction packet), so as to start processing the next transaction packet.
Alternatively, the node has performed the above-described step S42 for the next transaction package before generating the tile corresponding to the current transaction package. If the next transaction package does not carry the freezing identification, the node starts executing the transaction contained in the next transaction package after generating the block corresponding to the current transaction package.
In summary, the node will not execute the transaction in the next transaction package until it generates a block for the current transaction package, thereby achieving the effect of freezing the blockchain network.
In the invention, any node of the blockchain network can detect whether the transaction packet carries a freezing identifier after receiving the transaction packet sent by the sequencing node. If the transaction packet carries a freeze identification, the node will continuously acquire target data from a target system outside the blockchain network. After the target data is acquired, the node generates a corresponding block for the transaction packet. After generating the corresponding chunk for the transaction package, the node begins processing the next transaction package for the transaction package.
It can be seen that during the period when the node continuously acquires the target data from the target system outside the blockchain network, the node cannot generate a corresponding block for the currently processed transaction packet, and thus cannot process the next transaction packet, because the node has not acquired the target data temporarily. Thus, the node is equivalent to being frozen. For the whole blockchain network, the nodes of the whole blockchain network are frozen due to the temporary failure to acquire the target data, so that the whole blockchain network is frozen. In summary, by implementing the invention, freezing of the entire blockchain network can be effectively achieved.
Alternatively, in some embodiments, if it is determined that the transaction package does not carry the freeze identifier through the detection in step S42, the block corresponding to the transaction package may be directly generated. The block may be generated by: as described above, the transaction in the transaction package is read, the read transaction is executed to obtain the execution result, and the transaction and the execution result are used as the block data corresponding to the transaction package, so as to generate a block for the transaction package. Likewise, after generating a block for the transaction package, processing of a next transaction package of the transaction package begins.
Optionally, in some embodiments, the target data is used to characterize: another blockchain network other than the blockchain network has successfully pre-executed the first target transaction. As previously described, in the context of executing a cross-chain transaction, the first target transaction may be a post-transaction in the cross-chain transaction.
In executing the step S44, the step S44 specifically includes: after the target data are acquired, executing a third target transaction to obtain an execution result of the third target transaction; generating a block corresponding to the transaction package according to the execution result; wherein the third target transaction is a transaction associated with the first target transaction. As previously described, in the scenario of executing a cross-chain transaction, the third target transaction may be a pre-transaction in the cross-chain transaction.
Alternatively, when executing the step S44, the step S44 specifically includes: after the target data is acquired, acquiring a pre-execution result stored in advance; generating a block corresponding to the transaction package according to the pre-execution result; the pre-execution result is an execution result obtained after the node pre-executes a second target transaction, wherein the second target transaction is a transaction associated with the first target transaction. As previously described, in the context of executing a cross-chain transaction, the second target transaction may be a pre-transaction in the cross-chain transaction.
Illustratively, as previously described, the target data may be a common block of a common blockchain network containing a target identification. After synchronizing to the public block containing the target mark, the node reads the pre-execution result stored in advance from the non-account database, and takes the pre-execution result as the block data corresponding to the transaction package, so as to generate a block for the transaction package.
Or, as an example, the target data may be a hint information sent by the other blockchain network, where the hint information is information sent by the other blockchain network after the first target transaction is successfully pre-executed. After receiving the prompt message sent by another blockchain network, the node reads a pre-execution result stored in advance from a non-account database, and takes the pre-execution result as block data corresponding to the transaction packet, so as to generate a block for the transaction packet.
Optionally, in some embodiments, to pre-execute the second target transaction, the method comprises the steps of: executing the second target transaction to obtain an execution result of the second target transaction; and recording the execution result to a non-account book database of the node. Wherein, the non-ledger database refers to: a database unrelated to blockchain. Because the execution result of the pre-executed second target transaction is recorded in the non-ledger database, the method is equivalent to temporarily not storing the execution result of the second target transaction in a uplink manner. And after the node acquires the target data, that is, after determining that the other blockchain network has successfully pre-executed the first target transaction, saving the execution result of the second target transaction in the non-ledger database into the blockchain.
In particular, as described above, when the node receives a previous transaction packet of the transaction packet and detects that the previous transaction packet carries the pre-execution identifier, a block corresponding to the previous transaction packet is generated. After generating the block corresponding to the previous transaction package, the node executes the second target transaction stored in advance. The node records the execution result of the second target transaction to a non-ledger database of the node itself.
Optionally, in some embodiments, as described above, the transaction package carrying the frozen identifier also carries a target identifier; the target system outside the blockchain network is a common blockchain network that is communicatively coupled to both the blockchain network and the other blockchain network.
In executing the step S43, the step S43 specifically includes: continuously acquiring a public block generated by the public block chain network under the condition that the transaction packet carries the freezing identifier; for each public block, detecting whether the public block contains the target identifier carried by the transaction packet; if one common block carries the target identifier, determining the common block as the target data; wherein the common blockchain network populates the common blockchain with the target identification if: the common blockchain network determines that the blockchain network successfully pre-executes the second target transaction and determines that the other blockchain network successfully pre-executes the first target transaction.
Optionally, in some embodiments, the first target transaction and the second target transaction are two identical transactions. Alternatively, the first target transaction is a portion of a cross-chain transaction that needs to be performed in the other blockchain network, and the second target transaction is a portion of the cross-chain transaction that needs to be performed in the blockchain network.
Optionally, in some embodiments, the first target transaction and the third target transaction are two identical transactions; alternatively, the first target transaction is a portion of a cross-chain transaction that needs to be performed in the other blockchain network, and the third target transaction is a portion of the cross-chain transaction that needs to be performed in the blockchain network.
Based on the same inventive concept, the embodiment of the invention also provides a device for freezing the blockchain network. Referring to fig. 5, fig. 5 is a schematic diagram of an apparatus for freezing a blockchain network according to an embodiment of the present invention, which is applied to any node in the blockchain network. As shown in fig. 5, the apparatus includes:
a transaction packet receiving module 51, configured to receive a transaction packet sent by a sorting node in the blockchain network;
a freeze identifier detection module 52, configured to detect whether the transaction packet carries a freeze identifier;
a target data obtaining module 53, configured to continuously obtain target data from a target system outside the blockchain network if the transaction packet carries the freeze identifier;
the block generating module 54 is configured to generate a block corresponding to the transaction packet after the target data is acquired;
The freeze identification detection module 52 is further configured to: after the block corresponding to the transaction package is generated, processing of a next transaction package of the transaction package is started.
Optionally, in some specific embodiments, the block generating module is further configured to: and generating a block corresponding to the transaction package under the condition that the transaction package does not carry the freezing identification.
Optionally, in some embodiments, the target data is used to characterize: another blockchain network other than the blockchain network has successfully pre-executed a first target transaction; the block generation module comprises:
the pre-execution result acquisition unit is used for acquiring a pre-stored pre-execution result after acquiring the target data, wherein the pre-execution result is an execution result obtained after the node pre-executes a second target transaction, and the second target transaction is a transaction associated with the first target transaction;
and the block generating unit is used for generating a block corresponding to the transaction packet according to the pre-execution result.
Or alternatively, in some embodiments, the target data is used to characterize: another blockchain network other than the blockchain network has successfully pre-executed a first target transaction; the block generation module comprises:
The transaction execution unit is used for executing a third target transaction after the target data are acquired, so as to obtain an execution result of the third target transaction; wherein the third target transaction is a transaction associated with the first target transaction;
and the block generating unit is used for generating a block corresponding to the transaction packet according to the execution result.
Optionally, in some specific embodiments, the apparatus further includes a pre-execution module, where the pre-execution module is configured to: and executing the second target transaction to obtain an execution result of the second target transaction, and recording the execution result to a non-account book database of the node.
Optionally, in some embodiments, the pre-execution module has a logic module for: and under the condition that a previous transaction package of the transaction package is received and the fact that the previous transaction package carries a pre-execution identifier is detected, generating a block corresponding to the previous transaction package, and executing the pre-stored second target transaction after generating the block corresponding to the previous transaction package.
Optionally, in some embodiments, the transaction package carrying the frozen identifier further carries a target identifier; the target system outside the blockchain network is a public blockchain network which is simultaneously in communication connection with the blockchain network and the other blockchain network; the target data acquisition module comprises:
A public block obtaining unit, configured to continuously obtain a public block generated by the public block chain network when the transaction packet carries the freeze identifier;
the target identifier detection unit is used for detecting whether the public block contains the target identifier carried by the transaction packet or not according to each public block;
a target data determining unit, configured to determine a common block as the target data if the common block carries the target identifier; wherein the common blockchain network populates the common blockchain with the target identification if: the common blockchain network determines that the blockchain network successfully pre-executes the second target transaction and determines that the other blockchain network successfully pre-executes the first target transaction.
Optionally, in some embodiments, the first target transaction and the second target transaction are two identical transactions; alternatively, the first target transaction is a portion of a cross-chain transaction that needs to be performed in the other blockchain network, and the second target transaction is a portion of the cross-chain transaction that needs to be performed in the blockchain network.
Optionally, in some embodiments, the first target transaction and the third target transaction are two identical transactions; alternatively, the first target transaction is a portion of a cross-chain transaction that needs to be performed in the other blockchain network, and the third target transaction is a portion of the cross-chain transaction that needs to be performed in the blockchain network.
For the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points.
Based on the same inventive concept, the embodiment of the invention also provides an electronic device, as shown in fig. 6, which comprises a processor 601, a communication interface 602, a memory 603 and a communication bus 604, wherein the processor 601, the communication interface 602 and the memory 603 complete communication with each other through the communication bus 604.
The memory 603 is used for storing a computer program;
the processor 601 is configured to implement the following steps when executing a program stored in the memory 603:
receiving a transaction packet sent by a sequencing node in the blockchain network;
detecting whether the transaction package carries a freezing identifier or not;
Continuously acquiring target data from a target system outside the blockchain network under the condition that the transaction packet carries the freezing identifier;
after the target data is acquired, generating a block corresponding to the transaction package;
after the block corresponding to the transaction package is generated, processing of a next transaction package of the transaction package is started.
Alternatively, the processor 601 is configured to implement the method steps of freezing a blockchain network provided by other method embodiments of the present invention when executing a program stored on the memory 603.
The communication bus mentioned by the above electronic device may be a peripheral component interconnect standard (Peripheral Component Interconnect, abbreviated as PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, abbreviated as EISA) bus, or the like. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The memory may include random access memory (Random Access Memory, RAM) or non-volatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but also digital signal processors (Digital Signal Processing, DSP for short), application specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), field-programmable gate arrays (Field-Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
In yet another embodiment of the present invention, a computer readable storage medium having instructions stored therein that when run on a computer cause the computer to perform the method of freezing a blockchain network as in any of the above embodiments is also provided.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), etc.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims (10)

1. A method of freezing a blockchain network, characterized by being applied to any node within the blockchain network, the method comprising:
receiving a transaction packet sent by a sequencing node in the blockchain network;
detecting whether the transaction package carries a freezing identifier or not;
continuously acquiring target data from a target system outside the blockchain network under the condition that the transaction packet carries the freezing identifier;
after the target data is acquired, generating a block corresponding to the transaction package;
after generating the block corresponding to the transaction package, starting to process the next transaction package of the transaction package;
wherein the target system is another blockchain network or a non-blockchain network other than the blockchain network, and the target data is data for prompting to start executing the transaction in the transaction package.
2. The method according to claim 1, wherein the method further comprises:
And generating a block corresponding to the transaction package under the condition that the transaction package does not carry the freezing identification.
3. The method of claim 1, wherein the target data is used to characterize: another blockchain network other than the blockchain network has successfully pre-executed a first target transaction; after the target data is acquired, generating a block corresponding to the transaction packet, including:
after the target data is acquired, acquiring a pre-execution result stored in advance; generating a block corresponding to the transaction package according to the pre-execution result; the pre-execution result is an execution result obtained after the node pre-executes a second target transaction, wherein the second target transaction is a transaction associated with the first target transaction;
or alternatively, the process may be performed,
after the target data are acquired, executing a third target transaction to obtain an execution result of the third target transaction; generating a block corresponding to the transaction package according to the execution result; wherein the third target transaction is a transaction associated with the first target transaction.
4. A method according to claim 3, wherein the pre-executing the second target transaction comprises:
Executing the second target transaction to obtain an execution result of the second target transaction;
and recording the execution result to a non-account book database of the node.
5. The method of claim 4, wherein the performing the second target transaction comprises:
generating a block corresponding to a previous transaction package when the previous transaction package is received and the previous transaction package is detected to carry a pre-execution identifier;
and after generating the block corresponding to the previous transaction package, executing the pre-stored second target transaction.
6. The method of claim 5, wherein the transaction package carrying the frozen identification also carries a target identification; the target system outside the blockchain network is a public blockchain network which is simultaneously in communication connection with the blockchain network and the other blockchain network; the step of continuously acquiring target data from a target system outside the blockchain network under the condition that the transaction package carries the freezing identifier comprises the following steps:
continuously acquiring a public block generated by the public block chain network under the condition that the transaction packet carries the freezing identifier;
For each public block, detecting whether the public block contains the target identifier carried by the transaction packet;
if one common block carries the target identifier, determining the common block as the target data; wherein the common blockchain network populates the common blockchain with the target identification if: the common blockchain network determines that the blockchain network successfully pre-executes the second target transaction and determines that the other blockchain network successfully pre-executes the first target transaction.
7. The method of any of claims 3 to 6, wherein the first target transaction and the second target transaction are two identical transactions; alternatively, the first target transaction is a portion of a cross-chain transaction that needs to be performed in the other blockchain network, and the second target transaction is a portion of the cross-chain transaction that needs to be performed in the blockchain network;
the first target transaction and the third target transaction are two identical transactions; alternatively, the first target transaction is a portion of a cross-chain transaction that needs to be performed in the other blockchain network, and the third target transaction is a portion of the cross-chain transaction that needs to be performed in the blockchain network.
8. An apparatus for freezing a blockchain network, characterized by being applied to any node within the blockchain network, the apparatus comprising:
the transaction packet receiving module is used for receiving the transaction packet sent by the sequencing node in the blockchain network;
the freezing identification detection module is used for detecting whether the transaction packet carries a freezing identification or not;
the target data acquisition module is used for continuously acquiring target data from a target system outside the blockchain network under the condition that the transaction packet carries the freezing identifier;
the block generation module is used for generating a block corresponding to the transaction packet after the target data is acquired;
the freezing identification detection module is further used for starting to process the next transaction package of the transaction package after generating the block corresponding to the transaction package;
wherein the target system is another blockchain network or a non-blockchain network other than the blockchain network, and the target data is data for prompting to start executing the transaction in the transaction package.
9. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
The memory is used for storing a computer program;
the processor is configured to implement the method steps of any of claims 1-7 when executing a program stored on a memory.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method steps of any of claims 1-7.
CN202011176384.4A 2020-10-28 2020-10-28 Method, apparatus, electronic device and readable storage medium for freezing blockchain network Active CN112258184B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011176384.4A CN112258184B (en) 2020-10-28 2020-10-28 Method, apparatus, electronic device and readable storage medium for freezing blockchain network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011176384.4A CN112258184B (en) 2020-10-28 2020-10-28 Method, apparatus, electronic device and readable storage medium for freezing blockchain network

Publications (2)

Publication Number Publication Date
CN112258184A CN112258184A (en) 2021-01-22
CN112258184B true CN112258184B (en) 2023-08-01

Family

ID=74262183

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011176384.4A Active CN112258184B (en) 2020-10-28 2020-10-28 Method, apparatus, electronic device and readable storage medium for freezing blockchain network

Country Status (1)

Country Link
CN (1) CN112258184B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112819634B (en) * 2021-02-25 2023-06-02 成都质数斯达克科技有限公司 Transaction processing method, device, electronic equipment and readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109345387A (en) * 2018-09-04 2019-02-15 湖南宸瀚信息科技有限责任公司 Across the chain method of commerce of block chain, across chain communication device and storage medium
CN109409885A (en) * 2018-10-29 2019-03-01 深圳声笑科技有限公司 Across chain method of commerce, device and storage medium on block chain
CN111181968A (en) * 2019-12-30 2020-05-19 北京金山云网络技术有限公司 Cross-block chain communication method and device, cross-chain service system and cross-chain transaction system

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107067255B (en) * 2017-02-27 2019-02-26 腾讯科技(深圳)有限公司 The treating method and apparatus of account in block chain
CN110555765B (en) * 2018-06-01 2021-12-28 本无链科技(深圳)有限公司 Method and system for carrying out asset circulation among various block chains
CN109461076A (en) * 2018-10-09 2019-03-12 哈希(武汉)网络科技有限公司 A kind of block chain method of commerce
CN109493204B (en) * 2018-10-16 2023-04-18 平安科技(深圳)有限公司 Service accounting method based on block chain and terminal equipment
CN111489154A (en) * 2019-01-29 2020-08-04 北京天德科技有限公司 Cross-chain transaction method based on multiple signatures
CN110070445B (en) * 2019-04-28 2024-03-01 深圳前海微众银行股份有限公司 Transaction processing method and device based on blockchain system
CN110428332A (en) * 2019-07-29 2019-11-08 杭州复杂美科技有限公司 A kind of across the chain method of commerce of parallel chain, equipment and storage medium
CN112837048B (en) * 2020-02-03 2022-08-19 腾讯科技(深圳)有限公司 Cross-block-chain data processing method, device, equipment and computer storage medium
CN111464631B (en) * 2020-03-31 2023-03-28 成都质数斯达克科技有限公司 Service consensus method and device in alliance block chain

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109345387A (en) * 2018-09-04 2019-02-15 湖南宸瀚信息科技有限责任公司 Across the chain method of commerce of block chain, across chain communication device and storage medium
CN109409885A (en) * 2018-10-29 2019-03-01 深圳声笑科技有限公司 Across chain method of commerce, device and storage medium on block chain
CN111181968A (en) * 2019-12-30 2020-05-19 北京金山云网络技术有限公司 Cross-block chain communication method and device, cross-chain service system and cross-chain transaction system

Also Published As

Publication number Publication date
CN112258184A (en) 2021-01-22

Similar Documents

Publication Publication Date Title
CN110009338B (en) Accounting method and device based on block chain and electronic equipment
CN108710681B (en) File acquisition method, device, equipment and storage medium
CN113347164B (en) Block chain-based distributed consensus system, method, device and storage medium
CN110597918B (en) Account management method, account management device and computer readable storage medium
CN111600965A (en) Consensus method and system in block chain
CN115859343A (en) Transaction data processing method and device and readable storage medium
CN111899019A (en) Method and system for cross validation and sharing of blacklist and multiple parties
CN112671908B (en) Network management method and device, electronic equipment and readable storage medium
CN112749968B (en) Service data recording method and device based on block chain
CN112184436B (en) Data synchronization method, electronic device and readable storage medium
WO2023040453A1 (en) Transaction information processing method and apparatus
CN112258184B (en) Method, apparatus, electronic device and readable storage medium for freezing blockchain network
CN112037062B (en) Transaction consensus method, device, electronic equipment and readable storage medium
CN111526165B (en) Consensus method and system in alliance chain
CN112272114A (en) Method, device, equipment and storage medium for sending information across block chain network
CN112381599A (en) Shared charger rental system and method based on block chain technology
CN112087497A (en) Data synchronization method and device, electronic equipment and readable storage medium
CN111190754A (en) Block chain event notification method and block chain system
CN117061538A (en) Consensus processing method and related device based on block chain network
CN112261145B (en) New block chain generation method and device
CN114553727A (en) Data processing method and device based on content distribution network
CN113542396A (en) Block chain storage and communication method, system and related components thereof
CN112202581A (en) Group joining method and device and electronic equipment
CN112488836B (en) Transaction transmitting method, device, electronic equipment and readable storage medium
CN111340481A (en) Data processing method, device and equipment based on multi-link block chain network

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