Method, device, storage medium and electronic device for blockchain

By using smart contract devices in the blockchain network to back up and restore encrypted configuration information, the problem of configuration information recovery when the blockchain network is damaged is solved, achieving safe and trustworthy configuration information recovery and improving network disaster recovery capabilities.

CN112631836BActive Publication Date: 2024-10-25NEUSOFT CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011595380.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-29
Publication Date
2024-10-25
Estimated Expiration
2040-12-29

AI Technical Summary

Technical Problem

When the blockchain network is damaged, all configuration information of the node cannot be restored safely and reliably. Existing technology can only restore part of the configuration by rejoining the network, and there is a risk of configuration information leakage and data tampering during the backup process.

Method used

By introducing smart contract devices into the blockchain network, encrypted configuration information and hash values ​​are sent to the intersection node for backup and recovery, secret key obfuscation is used to ensure information security, and configuration information is restored through the intersection node when the network is damaged.

Benefits of technology

It realizes the safe and trustworthy configuration information recovery of the blockchain network, avoids the leakage of configuration information, and improves the disaster recovery capability and security of the network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112631836B_ABST
    Figure CN112631836B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a method, device, storage medium and electronic device for blockchain, wherein the method is applied to a first node in a node intersection, the node intersection being the intersection of nodes in a first blockchain network and nodes in a second blockchain network, the first node performing the following operations through a smart contract device isolated from the first node system: sending a configuration information backup request to a second node in the second blockchain network, the configuration information backup request including an encrypted configuration information set and a hash value of the configuration information of a target node, wherein the target node includes each node in the node intersection, in response to receiving a configuration information backup success notification message sent by the second node, determining that the configuration information backup is successful, the backup success notification message being generated by the second node after the encrypted configuration information set and the hash value of the configuration information of each target node are successfully saved in the second blockchain network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of blockchain technology, and in particular, to a method, device, storage medium and electronic device for blockchain. Background Art

[0002] Blockchain is a technology that can collectively maintain a reliable database in a decentralized and trustless manner. It can store transactions that occur over a period of time in blocks, and connect the blocks in chronological order using cryptographic algorithms to form a data structure similar to a chain. Since blockchain technology has the characteristics of distributed ledger, decentralization, and non-tamperability, it has high application prospects in many aspects.

[0003] In related scenarios, blockchain networks may also face the problem of network damage. However, since the configuration information of nodes in blockchain networks is highly private, especially for alliance chains, in order to prevent data leakage, the configuration information of nodes is usually not backed up. As a result, when the blockchain network is damaged, the node configuration cannot be restored based on the backed-up configuration information. Existing technologies can usually only restore part of the node configuration by rejoining the node to the blockchain network, and cannot safely and reliably restore all the node configurations. Summary of the invention

[0004] The purpose of the present disclosure is to provide a method, device, storage medium and electronic device for blockchain to solve the above-mentioned related technical problems.

[0005] In order to achieve the above-mentioned purpose, according to a first aspect of an embodiment of the present disclosure, a method for blockchain is provided, which is applied to a first node, the first node is a node in a node intersection, the node intersection is an intersection of nodes in a first blockchain network and nodes in a second blockchain network, the first node runs a smart contract device isolated from the first node system, and the method includes:

[0006] The first node performs the following operations through the smart contract device:

[0007] Sending a configuration information backup request to a second node in the second blockchain network, the configuration information backup request including an encrypted configuration information set and a hash value of the configuration information of a target node, wherein the target node includes each node in the node intersection, and the encrypted configuration information set includes encrypted configuration information obtained by encrypting the configuration information of each of the target nodes;

[0008] In response to receiving a configuration information backup success notification message sent by the second node, it is determined that the configuration information is backed up successfully. The backup success notification message is generated by the second node after the hash value of the encrypted configuration information set and the configuration information of each of the target nodes is successfully saved in the second blockchain network.

[0009] Optionally, the operation further includes:

[0010] Obtaining configuration information of each of the target nodes;

[0011] generating an encryption key corresponding to each of the target nodes;

[0012] Encrypting the configuration information of each target node using an encryption key corresponding to the target node to obtain encrypted configuration information of the target node;

[0013] Obfuscating each of the encryption keys to generate an obfuscated key corresponding to each of the target nodes;

[0014] Each obfuscation key is sent to a target node corresponding to the obfuscation key.

[0015] Optionally, the performing key obfuscation on each of the encryption keys to generate an obfuscated key corresponding to each of the target nodes includes:

[0016] Splitting each of the encryption keys into a target number of key segments, where the target number is the number of the target nodes;

[0017] The obfuscation key is generated by the following formula:

[0018] I={(i,1),(i+1,2)…,(n,n-i+1),…(ni,n-1),(n-i+1,n)}

[0019] Wherein, I is the obfuscation key of the i-th target node, the obfuscation key I includes n key segments, n is the number of the target nodes, (i, x) is the x-th key segment obtained by dividing the encryption key of the i-th target node, i∈[1,n], x∈[1,n], i and x are positive integers.

[0020] Optionally, the operation further includes:

[0021] Sending a configuration information recovery request to a third node in the second blockchain network;

[0022] Receive the encrypted configuration information set and the hash value of each configuration information sent by the third node;

[0023] Obtaining an obfuscation key for each of the target nodes, wherein the obfuscation key is generated by obfuscating an encryption key corresponding to each target node, wherein the encryption key is a key used to encrypt configuration information corresponding to the target node;

[0024] Determining an encryption key for each of the target nodes based on each of the obfuscation keys;

[0025] Decrypting the encrypted configuration information set by using each of the encryption keys to obtain configuration information of each of the target nodes;

[0026] Verifying each of the decrypted configuration information using the Hash value;

[0027] When the verification is successful, the node configuration of each of the target nodes is restored based on each of the configuration information.

[0028] Optionally, the method further comprises:

[0029] Determining that the first node is a full node in the first blockchain network, the full node is a node in the first blockchain network that stores full blockchain data;

[0030] Sending a block header backup request to a fourth node in the second blockchain network, wherein the block header backup request includes block header information of the first blockchain stored by the first node;

[0031] In response to receiving a backup success notification message sent by the fourth node, determining that the block header information of the first blockchain is successfully backed up, the backup success notification message being generated by the fourth node after the block header information is successfully saved in the second blockchain network;

[0032] Back up the block data corresponding to the first blockchain to the target storage space.

[0033] Optionally, it also includes:

[0034] Sending a backup and recovery request to a fifth node in the second blockchain network, wherein the backup and recovery request includes the identity information of the first node;

[0035] Receiving block header information sent by the fifth node;

[0036] Restoring the first blockchain according to the block header information and the block data corresponding to the target storage space;

[0037] Broadcast the first blockchain to other nodes in the node intersection.

[0038] Optionally, before sending the block header backup request to the fourth node in the second blockchain network, the method further includes:

[0039] Initiating a transaction blocking event in the first blockchain network;

[0040] The backup record information is written into the first blockchain.

[0041] According to a second aspect of an embodiment of the present disclosure, a method for blockchain is provided, which is applied to a node in a second blockchain network, and the method includes:

[0042] Receive a configuration information backup request sent by a smart contract device in a first node, the first node is a node in a node intersection, the node intersection is an intersection of nodes in the first blockchain network and nodes in the second blockchain network, the configuration information backup request includes an encrypted configuration information set and a hash value of configuration information of a target node, the encrypted configuration information set includes encrypted configuration information obtained by encrypting the configuration information of the target node, the target node includes each node in the node intersection, and the smart contract device is system-isolated from the first node;

[0043] Saving the encrypted configuration information set and the hash value of the configuration information of the target node in the second blockchain network;

[0044] Send a configuration information backup success notification message to the first node.

[0045] Optionally, it also includes:

[0046] Receiving a configuration information recovery request sent by the smart contract device in the first node;

[0047] Send the encrypted configuration information set and a hash value of the configuration information of the target node to the smart contract device.

[0048] Optionally, the method further comprises:

[0049] Receiving a block header backup request sent by the first node, wherein the block header backup request includes block header information corresponding to a first blockchain of the first blockchain network;

[0050] Verifying the block header information;

[0051] When the verification is successful, the block header information is saved in the second blockchain network;

[0052] Send a backup success notification message to the first node.

[0053] Optionally, it also includes:

[0054] Receiving a backup and recovery request sent by the first node;

[0055] Verifying the identity information of the first node in the backup and recovery request;

[0056] When the verification is successful, the block header information is sent to the first node.

[0057] According to a third aspect of an embodiment of the present disclosure, there is provided a device for blockchain, which is applied to a first node, wherein the first node is a node in a node intersection, wherein the node intersection is an intersection of a node in a first blockchain network and a node in a second blockchain network, and the device is isolated from the first node system, and the device includes:

[0058] A first sending module, configured to send a configuration information backup request to a second node in the second blockchain network, wherein the configuration information backup request includes an encrypted configuration information set and a hash value of the configuration information of a target node, wherein the target node includes each node in the node intersection, and the encrypted configuration information set includes encrypted configuration information obtained by encrypting the configuration information of each of the target nodes;

[0059] The first determination module is used to determine that the configuration information is successfully backed up in response to receiving a configuration information backup success notification message sent by the second node, and the configuration information backup success notification message is generated by the second node after the hash value of the encrypted configuration information set and the configuration information of each of the target nodes is successfully saved in the second blockchain network.

[0060] According to a fourth aspect of an embodiment of the present disclosure, there is provided a device for blockchain, which is applied to a node in a second blockchain network, and the device includes:

[0061] A first receiving module is used to receive a configuration information backup request sent by a smart contract device in a first node, the first node is a node in a node intersection, the node intersection is an intersection of nodes in the first blockchain network and nodes in the second blockchain network, the configuration information backup request includes an encrypted configuration information set and a hash value of the configuration information of a target node, the encrypted configuration information set includes encrypted configuration information obtained by encrypting the configuration information of the target node, the target node includes each node in the node intersection, and the smart contract device is system-isolated from the first node;

[0062] A first storage module, used to store the encrypted configuration information set and the hash value of the configuration information of the target node in the second blockchain network;

[0063] The second sending module is used to send a configuration information backup success notification message to the first node.

[0064] According to a fifth aspect of an embodiment of the present disclosure, there is provided a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of the method described in any one of the first aspects are implemented.

[0065] According to a sixth aspect of an embodiment of the present disclosure, there is provided a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of the method described in any one of the second aspects are implemented.

[0066] According to a seventh aspect of an embodiment of the present disclosure, there is provided an electronic device, including:

[0067] a memory having a computer program stored thereon;

[0068] A processor is used to execute the computer program in the memory to implement the steps of any one of the methods described in the first aspect above.

[0069] According to an eighth aspect of an embodiment of the present disclosure, there is provided an electronic device, including:

[0070] a memory having a computer program stored thereon;

[0071] A processor is used to execute the computer program in the memory to implement the steps of any method described in the second aspect above.

[0072] In the above technical solution, the smart contract device in the first node in the first blockchain network can interact with the second node in the second blockchain network, thereby saving the encrypted configuration information set and the hash value of the configuration information of the target node in the second blockchain network. In this way, even if the first blockchain network is damaged, the encrypted configuration information set and the hash value of the configuration information of the target node can be obtained through the second blockchain network, so that the configuration of each node can be restored. In addition, since the smart contract device is isolated from the first node system, it can also avoid the leakage of the configuration information of each node during the backup process, thereby improving the credibility and security of the configuration information of each node.

[0073] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0074] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the present disclosure but do not constitute a limitation of the present disclosure. In the accompanying drawings:

[0075] Figure 1 It is a backup schematic diagram of a consortium chain network shown in an exemplary embodiment of the present disclosure.

[0076] Figure 2 It is a flowchart of a method for blockchain shown in an exemplary embodiment of the present disclosure.

[0077] Figure 3 It is a schematic diagram of backing up configuration information shown in an exemplary embodiment of the present disclosure.

[0078] Figure 4 It is a schematic diagram of encryption of configuration information shown in an exemplary embodiment of the present disclosure.

[0079] Figure 5 It is a schematic diagram of a secret key obfuscation shown in an exemplary embodiment of the present disclosure.

[0080] Figure 6 The figure is a flowchart of restoring configuration information according to an exemplary embodiment of the present disclosure.

[0081] Figure 7 It is a flowchart of another method for blockchain shown in an exemplary embodiment of the present disclosure.

[0082] Figure 8 The present invention is a flowchart of a blockchain data backup method according to an exemplary embodiment of the present invention.

[0083] Fig. 9 It is a recovery flowchart of a first blockchain shown in an exemplary embodiment of the present disclosure.

[0084] Fig.10 It is a flowchart of another method for blockchain shown in an exemplary embodiment of the present disclosure.

[0085] Fig.11 It is a flowchart of another method for blockchain shown in an exemplary embodiment of the present disclosure.

[0086] Fig.12 It is a block diagram of a device for blockchain shown in an exemplary embodiment of the present disclosure.

[0087] Fig.13 It is a block diagram of a device for blockchain shown in an exemplary embodiment of the present disclosure.

[0088] Fig.14 It is a block diagram of an electronic device shown in an exemplary embodiment of the present disclosure.

[0089] Fig.15 It is a block diagram of an electronic device shown in an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0090] The specific implementation of the present disclosure is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described herein is only used to illustrate and explain the present disclosure, and is not used to limit the present disclosure.

[0091] Before introducing the method, device, storage medium and electronic device for blockchain provided by the present disclosure, the application scenario of the present disclosure is first introduced. The various embodiments provided by the present disclosure can be applied to the blockchain network backup scenario, and the blockchain can be, for example, a consortium chain, a public chain, etc.

[0092] Reference Figure 1 The backup diagram of a consortium chain network is shown. In the relevant scenario, when backing up the consortium chain, the peer node can read the blockchain ledger and the configuration information of its own node and save the data to the storage medium. When restoring, the peer node reads the backup data in the storage medium and rebuilds the blockchain network accordingly, and then other peer nodes can rejoin the consortium chain network to complete the recovery.

[0093] The applicant found that when the alliance chain network is running, considering the security of node configuration information, it is difficult for other nodes in the alliance chain to send configuration information to a peer node for backup, which makes it difficult to effectively back up the node configuration information. At the same time, in the case of configuration information loss, the node's permission configuration is described by the peer node that rejoins the network, which is less credible.

[0094] Moreover, the ledger data stored in the blockchain is tamper-proof. However, after the peer node stores the data in the local storage medium, other nodes cannot verify the data in any form. Therefore, the backup node can tamper with the data at will and upload the tampered ledger when restoring the network, which ultimately threatens the security of the network. In addition, when multiple nodes are backed up separately, if the backup data of multiple nodes are inconsistent, in this case, it is impossible to determine the correct backup data from the multiple backup data, which will cause disputes between nodes.

[0095] To this end, the present disclosure provides a method for blockchain, which is applied to a first node, wherein the first node runs a smart contract device isolated from the first node system, and the smart contract device can be, for example, a contract container mounted on the node or an execution carrier of a related smart contract, referring to Figure 2 The flowchart of a method for blockchain shown in the figure, the first node can perform the following method steps through the smart contract device:

[0096] In step S21, a configuration information backup request is sent to the second node in the second blockchain network, where the configuration information backup request includes an encrypted configuration information set and a hash value of the configuration information of the target node.

[0097] The first node is a node in the node intersection, and the second node may be a node in the node intersection or not. The node intersection is the intersection of the nodes in the first blockchain network and the nodes in the second blockchain network. The node intersection may include all or part of the nodes in the first blockchain network, and the node intersection may also include part or all of the nodes in the second blockchain network.

[0098] The target node includes each node in the node intersection, and the encrypted configuration information set includes encrypted configuration information obtained by encrypting the configuration information of each node in the node intersection. The configuration information may include, for example, the organization member, key, certificate, etc. corresponding to the node.

[0099] In step S22, in response to receiving the configuration information backup success notification message sent by the second node, it is determined that the configuration information backup is successful.

[0100] Among them, the configuration information backup success notification message can be generated by the second node after the hash value of the encrypted configuration information set and the configuration information of each target node is successfully saved in the second blockchain network.

[0101] That is to say, any node in the node intersection can send a configuration information backup request to the second node in the second blockchain network, and then the second node can save the encrypted configuration information of each node in the node intersection and the hash value of the configuration information of each node in the second blockchain network for the recovery of the node configuration information.

[0102] By adopting the above technical solution, the smart contract device in the first node in the first blockchain network can interact with the second node in the second blockchain network, thereby saving the encrypted configuration information set and the hash value of the configuration information of the target node in the second blockchain network. In this way, even if the first blockchain network is damaged, the encrypted configuration information set and the hash value of the configuration information of the target node can be obtained through the second blockchain network, so that the configuration of each node can be restored. In addition, since the smart contract device is isolated from the first node system, it can also avoid the leakage of the configuration information of each node during the backup process, thereby improving security.

[0103] Optionally, the encryption configuration information of the target node can be obtained as follows:

[0104] Obtain configuration information of each target node, and generate an encryption key corresponding to each target node. The encryption key can be randomly generated, for example, referring to Figure 3A schematic diagram of backup of configuration information is shown (in the figure, a configuration information backup request and an encrypted configuration information set are sent separately). After generating an encryption key corresponding to each target node, the configuration information of each target node can also be encrypted by the encryption key corresponding to the target node to obtain the encrypted configuration information of the target node.

[0105] For example, Figure 4 This is a schematic diagram of an encryption of configuration information shown in an exemplary embodiment of the present disclosure. Taking the target node including nodes a, b, c, and d as an example, the smart contract device can generate secret keys a to d corresponding to the target nodes a, b, c, and d. In this way, the configuration information of nodes a to d can be encrypted by secret keys a to d to obtain encrypted configuration information a to d. In addition, the smart contract device can also combine the encrypted configuration information a to d (for example, arrange them according to the node order) to obtain an encrypted configuration information set.

[0106] In some implementation scenarios, in order to maintain the consistency of each node in the node set, the smart contract device can also send (e.g., broadcast) the encrypted configuration information set to other nodes in the node set, thereby achieving secret sharing of configuration information.

[0107] In this way, after the encryption is completed, the smart contract device can also confuse each encryption key to generate a confused key corresponding to each target node.

[0108] For example, in some implementations, the obfuscation key may be obtained in the following manner:

[0109] Split each encryption key into a target number of key segments, where the target number is the number of target nodes. Figure 5 A schematic diagram of key obfuscation is shown. For keys a to d, each key can be divided into four key segments.

[0110] After obtaining the secret key segment, the obfuscation key can be generated by the following formula:

[0111] I={(i,1),(i+1,2)…,(n,n-i+1),…(ni,n-1),(n-i+1,n)}

[0112] Where I is the obfuscation key of the i-th target node, which includes n key segments, n is the number of target nodes, (i,x) is the x-th key segment obtained by dividing the encryption key of the i-th target node, i∈[1,n], x∈[1,n], i and x are positive integers. For example, if target nodes a~d are the 1st to 4th target nodes respectively, the obfuscation key of target node a is:

[0113] I={(1,1),(2,2),(3,3),(4,4)}

[0114] That is, the obfuscation key a' of the target node a is: a1, b2, c3, d4.

[0115] It is worth noting that those skilled in the art should understand that the formula for obtaining the obfuscated key may also be changed accordingly according to the division and numbering of the key segments. Within the technical concept of the present disclosure, the formula may have a variety of simple variations, and these simple variations all belong to the protection scope of the present disclosure.

[0116] Furthermore, after obtaining the obfuscation key of each target node, each obfuscation key may be sent to the target node corresponding to the obfuscation key.

[0117] That is to say, after each target node backs up the configuration information through the smart contract device, it can obtain the corresponding obfuscation key. The obfuscation key includes a part of the encryption key of the configuration information of each target node, so each target node cannot decrypt the encrypted configuration information set alone. In this way, the effect of restoring the alliance chain configuration information can be achieved with the consent of all participating members, so that the consensus mechanism can be maintained unchanged and configuration information can be prevented from being falsified.

[0118] After the encrypted configuration information set and the hash value of each configuration information are saved through the second blockchain network, when the first blockchain network is damaged, the configuration of each target node can be restored according to the saved encrypted configuration information set and the hash value of each configuration information. In this case, the method further includes:

[0119] Send a configuration information recovery request to the third node in the second blockchain network. For example, refer to Figure 6 In the flowchart of restoring configuration information shown, the first node can, for example, rebuild the first blockchain network based on local backup data, build the infrastructure of the first blockchain network and configure the smart contract device so that each target node in the node intersection can join the rebuilt first blockchain network. After the target node joins the rebuilt first blockchain network, the smart contract device can send a configuration information recovery request to the third node in the second blockchain network, and receive the encrypted configuration information set and the hash value of each configuration information sent by the third node.

[0120] The smart contract device can also obtain the obfuscation key of each target node, and determine the encryption key of each target node based on each obfuscation key. The obfuscation key is generated by obfuscating the encryption key corresponding to each target node, and the encryption key is the key used to encrypt the configuration information corresponding to the target node. Figure 4 and Figure 5 For example, after obtaining the obfuscated keys of each target node, the key segments belonging to the same encryption key in each obfuscated key can be combined in the order of segmentation. For example, the key segments a1, a2, a3, and a4 obtained by segmenting the encryption key a (corresponding to the target node a) can be combined to obtain the encryption key a.

[0121] In this way, the encrypted configuration information set can be decrypted by each encryption key to obtain the configuration information of each target node, and each decrypted configuration information can be verified by the hash value. For example, the hash value of the decrypted configuration information can be calculated by the corresponding hash function, and the hash value can be compared with the hash value of the configuration information of each target node stored in the second blockchain network. If the two are the same, it can be determined that the verification is successful.

[0122] Furthermore, when the verification is successful, the node configuration of each target node may be restored based on each configuration information.

[0123] In this way, configuration information can be backed up and restored, improving the disaster recovery capabilities of the blockchain network.

[0124] The disclosed embodiment also provides another method for blockchain, which is applied to a first node, the first node is a node in a node intersection, the node intersection is the intersection of nodes in a first blockchain network and nodes in a second blockchain network, the node intersection may include all or part of the nodes in the first blockchain network, and the node intersection may also include part or all of the nodes in the second blockchain network. Figure 7 As shown, the method includes:

[0125] In step S71, it is determined that the first node is a full node in the first blockchain network.

[0126] Among them, the full node is the node that stores the full amount of blockchain data in the first blockchain network.

[0127] In step S72, a block header backup request is sent to a fourth node in the second blockchain network, where the block header backup request includes block header information corresponding to the first blockchain of the first blockchain network.

[0128] The fourth node may be a node in the intersection of the nodes or may not be a node in the intersection of the nodes.

[0129] In some possible implementations, the steps about the first node in each embodiment provided in this application can be completed by deploying a smart contract. For example, the nodes in the node intersection can deploy a backup smart contract, and then the first node corresponding to the backup smart contract or the smart contract device in the first node executes the relevant steps in the backup process. Among them, the smart contract device can be, for example, a contract container mounted by the first node.

[0130] With respect to the block header information, depending on different backup application scenarios, the block header information may be, for example, block header information of each block of the first blockchain, or block header information of a portion of block segments in the first blockchain.

[0131] In addition, in some embodiments, before sending the block header backup request to the fourth node in the second blockchain network, the method further includes:

[0132] Initiate a transaction blocking event in the first blockchain network. For example, the first node can call a delay function in a related smart contract to maintain the state in the first blockchain network in a transaction-in-progress state. In this case, other transactions cannot be submitted and consensus can be reached, so that the business in the first blockchain network can be suspended, thereby avoiding the phenomenon that new transaction data is continuously generated and not backed up during the backup process. In addition, the first node can also write backup record information in the first blockchain to facilitate the tracing of the backup process.

[0133] Of course, in some embodiments, the block header backup request may also be sent separately from the block header information. Figure 8 In the flowchart of a backup of blockchain data shown in the figure, the first node can initiate a transaction block after sending a block header backup request, and then send the block header data of the first blockchain to the fourth node (this step is not shown in the figure).

[0134] In step S73, in response to receiving the backup success notification message sent by the fourth node, it is determined that the block header information of the first blockchain is backed up successfully.

[0135] The backup success notification message is generated by the fourth node after the block header information is successfully saved in the second blockchain network. Regarding the storage method of the block header information, in some implementation scenarios, the fourth node can save the block header information in the second blockchain corresponding to the second blockchain network. In other implementation scenarios, the fourth node can also save the hash value of the block header information in the second blockchain corresponding to the second blockchain network, which is not limited in this disclosure.

[0136] In step S74, the block data corresponding to the first blockchain is backed up to the target storage space. For example, the first node can Figure 1 The backup process shown backs up the first blockchain data locally or in a related storage space that can be obtained.

[0137] That is to say, the first node in the first blockchain network can interact with the fourth node in the second blockchain network to save the block header data of the first blockchain in the first blockchain network in the second blockchain network, and back up the block data of the first blockchain in the target storage space.

[0138] In this way, even if the first blockchain network is damaged, the block header data of the first blockchain can be obtained through the second blockchain network, so that the account book can be restored based on the block header data and the block data in the target storage space, ensuring the correctness of the account book data. In addition, since the nodes in the node intersection are in both the first blockchain network and the second blockchain network, other nodes in the node intersection can also obtain the block header data of the first blockchain through the second blockchain network, so that the trust between nodes can be maintained in the process of data backup and recovery in this way, thereby reducing node disputes.

[0139] After the block header information of the first blockchain is saved through the second blockchain network, the first blockchain can be restored according to the saved block header information when the first blockchain network is damaged. In this case, the method further includes:

[0140] Send a backup and recovery request to the fifth node in the second blockchain network. The fifth node and the fourth node may be the same node or different nodes. It should be understood that after the block header information of the first blockchain is written into the second blockchain through the fourth node, the relevant nodes in the second blockchain network may also save the block including the block header information. Therefore, the fifth node may be another node different from the fourth node. The backup and recovery request may also include the identity information of the first node, so that the fifth node can verify the identity of the first node based on the identity information. Of course, referring to Fig. 9 In the recovery flowchart of a first blockchain shown, the backup recovery request and the identity information may also be sent separately, which is not limited in the present disclosure.

[0141] After the identity information is verified, the fifth node may send block header information to the first node. After receiving the block header information, the first node may restore the first blockchain according to the block header information and the block data corresponding to the target storage space.

[0142] For example, the first node can sort the block data in the target storage space in the order of timestamps, and verify the block sorting according to the timestamp, previous block hash, current block hash and other information in the block header information, thereby restoring the first blockchain. Fig. 9 As shown, the first node can also write the block data in the target storage space in sequence according to the block header information, thereby restoring the first blockchain.

[0143] Furthermore, the first node may also broadcast the first blockchain to other nodes in the node intersection, so that other nodes in the node intersection can restore the first blockchain. Fig. 9 In some implementation scenarios, after restoring the first blockchain data, the first node may also send backup and recovery record information to the fifth node to facilitate the storage and tracing of the backup and recovery information.

[0144] In this way, when restoring blockchain data, the backup data can be verified based on the block header data obtained from the second blockchain network, thereby ensuring the authenticity of the restored blockchain ledger.

[0145] In addition, it is worth noting that in the above embodiments, in order to illustrate the various embodiments of the method for blockchain, descriptions such as the second node, the third node, the fourth node, and the fifth node are used. However, those skilled in the art should know that in specific implementation, the second node, the third node, the fourth node, and the fifth node may be the same node in the second blockchain network or different nodes in the second blockchain network, and this disclosure does not limit this.

[0146] Fig.10 is a flowchart of a method for blockchain shown in an exemplary embodiment of the present disclosure. The method can be applied to the nodes in the second blockchain network in the above embodiment, for example. Fig.10 , the method comprising:

[0147] In step S101, a configuration information backup request sent by the smart contract device in the first node is received, where the configuration information backup request includes an encrypted configuration information set and a hash value of the configuration information of the target node.

[0148] Among them, the encrypted configuration information set includes encrypted configuration information encrypted by the configuration information of the target node, the target node includes each node in the node intersection, the smart contract device is systematically isolated from the first node, and the node intersection is the intersection of the nodes in the first blockchain network and the nodes in the second blockchain network.

[0149] In step S102, the encrypted configuration information set and the hash value of the configuration information of the target node are saved in the second blockchain network.

[0150] In step S103, a configuration information backup success notification message is sent to the first node.

[0151] By adopting the above technical solution, the smart contract device in the first node in the first blockchain network can interact with the second node in the second blockchain network, thereby saving the encrypted configuration information set and the hash value of the configuration information of the target node in the second blockchain network. In this way, even if the first blockchain network is damaged, the encrypted configuration information set and the hash value of the configuration information of the target node can be obtained through the second blockchain network, so that the configuration of each node can be restored. In addition, since the smart contract device is isolated from the first node system, it can also avoid the leakage of the configuration information of each node during the backup process, thereby improving security.

[0152] In a possible implementation, the method further includes:

[0153] Receiving a configuration information recovery request sent by the smart contract device in the first node;

[0154] The encrypted configuration information set and a hash value of the configuration information of the target node are sent to the smart contract device.

[0155] In this way, configuration information can be backed up and restored, improving the disaster recovery capabilities of the blockchain network.

[0156] Fig.11 is a flowchart of a method for blockchain shown in an exemplary embodiment of the present disclosure. The method can be applied to the nodes in the second blockchain network in the above embodiment, for example. Fig.11 , the method comprising:

[0157] In step S111, a block header backup request sent by the first node is received.

[0158] The first node is a node in a node intersection, the node intersection is an intersection of nodes in the first blockchain network and nodes in the second blockchain network, and the block header backup request includes block header information of a first blockchain corresponding to the first blockchain network.

[0159] In step S112, the block header information is verified.

[0160] In some embodiments, Fig. 9The execution subject of the method steps shown may be, for example, the fourth node in the above embodiment, and the fourth node may be, for example, a node in the node intersection. In this case, the fourth node may also store the relevant data of the first blockchain. Therefore, the fourth node may compare the block header information with the block header information of the first blockchain stored by itself, thereby completing the verification.

[0161] In other embodiments, the first node may also provide a relevant data interface so that the fourth node can obtain the block header information of the first blockchain according to the data interface, and then verify the block header information sent by the first node.

[0162] In step S113, when the verification is successful, the block header information is saved in the second blockchain network.

[0163] For example, the fourth node may store the block header information in the second blockchain corresponding to the second blockchain network. The fourth node may also store the hash value of the block header information in the second blockchain corresponding to the second blockchain network, which is not limited in the present disclosure.

[0164] In step S114, a backup success notification message is sent to the first node.

[0165] That is to say, the first node in the first blockchain network can interact with the fourth node in the second blockchain network to save the block header data of the first blockchain in the first blockchain network in the second blockchain network, and back up the block data of the first blockchain in the target storage space.

[0166] In this way, even if the first blockchain network is damaged, the block header data of the first blockchain can be obtained through the second blockchain network, so that the account book can be restored based on the block header data and the block data in the target storage space, ensuring the correctness of the account book data. In addition, since the nodes in the node intersection are in both the first blockchain network and the second blockchain network, other nodes in the node intersection can also obtain the block header data of the first blockchain through the second blockchain network, so that the trust between nodes can be maintained in the process of data backup and recovery in this way, thereby reducing node disputes.

[0167] Optionally, Fig.11 The execution subject of the method steps shown in the figure may be, for example, the fifth node in the above embodiment (eg Fig. 9 ), the method further comprising:

[0168] Receiving a backup recovery request sent by the first node;

[0169] Verifying the identity information of the first node in the backup and recovery request;

[0170] When the verification is successful, the block header information is sent to the first node.

[0171] In this way, when restoring blockchain data, the backup data can be verified based on the block header data obtained from the second blockchain network, thereby ensuring the authenticity of the restored blockchain ledger.

[0172] In some scenarios, after restoring the first blockchain data, the first node may also send backup recovery record information to the fifth node. In this case, the fifth node may also save the backup recovery record information in the second blockchain in response to receiving the backup recovery record information, so as to store and trace the backup recovery information.

[0173] Based on the same inventive concept, the present disclosure also provides a device 1200 for blockchain, Fig.12 1 is a block diagram of a device for blockchain shown in an exemplary embodiment of the present disclosure. The device can be applied to a first node, the first node is a node in a node intersection, the node intersection is an intersection of a node in a first blockchain network and a node in a second blockchain network, the device 1200 is isolated from the first node system, and the device 1200 includes:

[0174] A first sending module 1201 is used to send a configuration information backup request to a second node in the second blockchain network, where the configuration information backup request includes an encrypted configuration information set and a hash value of the configuration information of a target node, where the target node includes each node in the node intersection, and the encrypted configuration information set includes encrypted configuration information obtained by encrypting the configuration information of each of the target nodes;

[0175] The first determination module 1202 is used to determine that the configuration information is successfully backed up in response to receiving a configuration information backup success notification message sent by the second node. The configuration information backup success notification message is generated by the second node after the hash value of the encrypted configuration information set and the configuration information of each target node is successfully saved in the second blockchain network.

[0176] Optionally, the device 1200 further includes:

[0177] A first acquisition module, used to acquire configuration information of each target node;

[0178] A first generating module, used to generate an encryption key corresponding to each target node;

[0179] A first encryption module, used for encrypting the configuration information of each target node by using an encryption key corresponding to the target node to obtain the encrypted configuration information of the target node;

[0180] A key obfuscation module, used to perform key obfuscation on each of the encryption keys to generate an obfuscated key corresponding to each of the target nodes;

[0181] The third sending module is used to send each obfuscation key to a target node corresponding to the obfuscation key.

[0182] Optionally, the key obfuscation module includes:

[0183] A key splitting submodule, used to split each of the encryption keys into a target number of key segments, where the target number is the number of the target nodes;

[0184] The obfuscation key generation submodule is used to generate the obfuscation key using the following formula:

[0185] I={(i,1),(i+1,2)…,(n,n-i+1),…(ni,n-1),(n-i+1,n)}

[0186] Wherein, I is the obfuscation key of the i-th target node, the obfuscation key I includes n key segments, n is the number of the target nodes, (i,x) is the x-th key segment obtained by dividing the encryption key of the i-th target node, i∈[1,n], x∈[1,n], i and x are positive integers.

[0187] Optionally, the device 1200 further includes:

[0188] A fourth sending module, used to send a configuration information recovery request to a third node in the second blockchain network;

[0189] A second receiving module, used for receiving the encrypted configuration information set and the hash value of each configuration information sent by the third node;

[0190] A second acquisition module is used to obtain an obfuscation key of each target node, where the obfuscation key is generated by obfuscating an encryption key corresponding to each target node, where the encryption key is a key used to encrypt configuration information corresponding to the target node;

[0191] A second determination module, configured to determine an encryption key of each target node based on each obfuscation key;

[0192] A decryption module, used to decrypt the encrypted configuration information set by using each encryption key to obtain the configuration information of each target node;

[0193] A first verification module, used for verifying each of the configuration information obtained by decryption through the hash value;

[0194] The first recovery module is used to restore the node configuration of each target node based on each configuration information when the verification is successful.

[0195] By using the above-mentioned device 1200, the first node in the first blockchain network can interact with the second node in the second blockchain network through the device 1200, thereby saving the encrypted configuration information set and the hash value of the configuration information of the target node in the second blockchain network. In this way, even if the first blockchain network is damaged, the encrypted configuration information set and the hash value of the configuration information of the target node can be obtained through the second blockchain network, so that the configuration of each node can be restored. In addition, since the smart contract device is isolated from the first node system, it can also avoid the leakage of the configuration information of each node during the backup process, thereby improving the credibility and security of the configuration information of each node.

[0196] Optionally, the device 1200 further includes:

[0197] A third determination module is used to determine that the first node is a full node in the first blockchain network, and the full node is a node in the first blockchain network that stores full blockchain data;

[0198] a fifth sending module, configured to send a block header backup request to a fourth node in the second blockchain network, wherein the block header backup request includes block header information of the first blockchain stored by the first node;

[0199] A fourth determination module, configured to determine that the block header information of the first blockchain is successfully backed up in response to receiving a backup success notification message sent by the fourth node, wherein the backup success notification message is generated by the fourth node after the block header information is successfully saved in the second blockchain network;

[0200] The execution module is used to back up the block data corresponding to the first blockchain to the target storage space.

[0201] Optionally, the device 1200 further includes:

[0202] A sixth sending module, configured to send a backup and recovery request to a fifth node in the second blockchain network, wherein the backup and recovery request includes the identity information of the first node;

[0203] A third receiving module, used to receive the block header information sent by the fifth node;

[0204] A second recovery module, used to recover the first blockchain according to the block header information and the block data corresponding to the target storage space;

[0205] A broadcast module is used to broadcast the first blockchain to other nodes in the node intersection.

[0206] Optionally, the device 1200 further includes:

[0207] A transaction blocking initiating module, configured to initiate a transaction blocking event in the first blockchain network before the first sending module sends a block header backup request to the fourth node in the second blockchain network;

[0208] A writing module is used to write backup record information in the first blockchain.

[0209] By using the above device 1200, even if the first blockchain network is damaged, the block header data of the first blockchain can be obtained through the second blockchain network, so that the account book can be restored based on the block header data and the block data in the target storage space, ensuring the correctness of the account book data. In addition, since the nodes in the node intersection are in both the first blockchain network and the second blockchain network, other nodes in the node intersection can also obtain the block header data of the first blockchain through the second blockchain network, so that in this way, the mutual trust between nodes can be maintained during the data backup and recovery process, thereby reducing node disputes.

[0210] The present disclosure also provides a device 1300 for blockchain, which is applied to a node in a second blockchain network, referring to Fig.13 A block diagram of a device 1300 for blockchain is shown, the device 1300 comprising:

[0211] The first receiving module 1301 is used to receive a configuration information backup request sent by a smart contract device in a first node, the first node is a node in a node intersection, the node intersection is an intersection of nodes in the first blockchain network and nodes in the second blockchain network, the configuration information backup request includes an encrypted configuration information set and a hash value of the configuration information of a target node, the encrypted configuration information set includes encrypted configuration information obtained by encrypting the configuration information of the target node, the target node includes each node in the node intersection, and the smart contract device is system-isolated from the first node;

[0212] A first storage module 1302, used to store the encrypted configuration information set and the hash value of the configuration information of the target node in the second blockchain network;

[0213] The second sending module 1303 is configured to send a configuration information backup success notification message to the first node.

[0214] Optionally, the device 1300 further includes:

[0215] A fourth receiving module, configured to receive a configuration information recovery request sent by the smart contract device in the first node;

[0216] The seventh sending module is used to send the encrypted configuration information set and the hash value of the configuration information of the target node to the smart contract device.

[0217] Optionally, the device 1300 further includes:

[0218] a fifth receiving module, configured to receive a block header backup request sent by the first node, wherein the block header backup request includes block header information corresponding to a first blockchain of the first blockchain network;

[0219] The second verification module is used to verify the block header information;

[0220] A second storage module is used to store the block header information in the second blockchain network when the second verification module verifies successfully;

[0221] An eighth sending module is used to send a backup success notification message to the first node.

[0222] Optionally, the device 1300 further includes:

[0223] A fourth receiving module, used to receive a backup recovery request sent by the first node;

[0224] A third verification module, used to verify the identity information of the first node in the backup and recovery request;

[0225] The ninth sending module is used to send the block header information to the first node when the third verification module verifies successfully.

[0226] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0227] The present disclosure also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for blockchain for a first node provided by the present disclosure.

[0228] The present disclosure also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for blockchain for a node in a second blockchain network provided by the present disclosure.

[0229] The present disclosure also provides an electronic device, comprising:

[0230] a memory having a computer program stored thereon;

[0231] A processor is used to execute the computer program in the memory to implement the steps of the method for blockchain for the first node provided in the present disclosure.

[0232] Fig.14 FIG. 1 is a block diagram of an electronic device 1400 according to an exemplary embodiment. Fig.14 As shown, the electronic device 1400 may include: a processor 1401 and a memory 1402. The electronic device 1400 may also include one or more of a multimedia component 1403, an input / output (I / O) interface 1404, and a communication component 1405.

[0233] The processor 1401 is used to control the overall operation of the electronic device 1400 to complete all or part of the steps in the above-mentioned method for blockchain for the first node. The memory 1402 is used to store various types of data to support the operation of the electronic device 1400, which may include instructions for any application or method operating on the electronic device 1400, and application-related data, such as sent and received messages, pictures, audio, video, block data, certificates, etc. The memory 1402 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, disk or optical disk. The multimedia component 1403 may include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may be further stored in the memory 1402 or sent via the communication component 1405. The audio component also includes at least one speaker for outputting audio signals. The I / O interface 1404 provides an interface between the processor 1401 and other interface modules, and the above-mentioned other interface modules can be a keyboard, a mouse, buttons, etc. These buttons can be virtual buttons or physical buttons. The communication component 1405 is used for wired or wireless communication between the electronic device 1400 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IOT, eMTC, or other 5G, etc., or a combination of one or more of them, is not limited here. Therefore, the corresponding communication component 1405 may include: Wi-Fi module, Bluetooth module, NFC module, etc.

[0234] In an exemplary embodiment, the electronic device 1400 may be implemented by one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned method for blockchain for the first node.

[0235] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, and when the program instructions are executed by the processor, the steps of the method for blockchain for the first node are implemented. For example, the computer-readable storage medium can be the memory 1402 including the program instructions, and the program instructions can be executed by the processor 1401 of the electronic device 1400 to complete the method for blockchain for the first node.

[0236] The present disclosure also provides an electronic device, comprising:

[0237] a memory having a computer program stored thereon;

[0238] A processor is used to execute the computer program in the memory to implement the steps of the method for blockchain for a node in a second blockchain network provided by the present disclosure.

[0239] Fig.15 FIG. 1 is a block diagram of an electronic device 1500 according to an exemplary embodiment. Fig.15 As shown, the electronic device 1500 may include: a processor 1501 and a memory 1502. The electronic device 1500 may also include one or more of a multimedia component 1503, an input / output (I / O) interface 1504, and a communication component 1505.

[0240] The processor 1501 is used to control the overall operation of the electronic device 1500 to complete all or part of the steps in the above-mentioned method for blockchain for a node in the second blockchain network. The memory 1502 is used to store various types of data to support the operation of the electronic device 1500, which may include, for example, instructions for any application or method operating on the electronic device 1500, and application-related data, such as sent and received messages, pictures, audio, video, block data, certificates, etc. The memory 1502 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, disk or optical disk. The multimedia component 1503 may include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may be further stored in the memory 1502 or sent via the communication component 1505. The audio component also includes at least one speaker for outputting audio signals. The I / O interface 1504 provides an interface between the processor 1501 and other interface modules, and the above-mentioned other interface modules can be a keyboard, a mouse, buttons, etc. These buttons can be virtual buttons or physical buttons. The communication component 1505 is used for wired or wireless communication between the electronic device 1500 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IOT, eMTC, or other 5G, etc., or a combination of one or more of them, is not limited here. Therefore, the corresponding communication component 1505 may include: Wi-Fi module, Bluetooth module, NFC module, etc.

[0241] In an exemplary embodiment, the electronic device 1500 may be implemented by one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned method for blockchain for nodes in the second blockchain network.

[0242] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, and when the program instructions are executed by the processor, the steps of the method for blockchain for the node in the second blockchain network are implemented. For example, the computer-readable storage medium can be the memory 1502 including the program instructions, and the program instructions can be executed by the processor 1501 of the electronic device 1500 to complete the method for blockchain for the node in the second blockchain network.

[0243] In another exemplary embodiment, a computer program product is also provided, which includes a computer program that can be executed by a programmable device, and the computer program has a code portion for executing the above-mentioned method for blockchain for a first node when executed by the programmable device.

[0244] In another exemplary embodiment, a computer program product is also provided, which includes a computer program that can be executed by a programmable device, and the computer program has a code portion for executing the above-mentioned method for blockchain for a node in a second blockchain network when executed by the programmable device.

[0245] The preferred embodiments of the present disclosure are described in detail above in conjunction with the accompanying drawings; however, the present disclosure is not limited to the specific details in the above embodiments. Within the technical concept of the present disclosure, a variety of simple modifications can be made to the technical solution of the present disclosure, and these simple modifications all fall within the protection scope of the present disclosure.

[0246] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present disclosure will not further describe various possible combinations.

[0247] In addition, various embodiments of the present disclosure may be arbitrarily combined, and as long as they do not violate the concept of the present disclosure, they should also be regarded as the contents disclosed by the present disclosure.

Claims

1. A method for blockchain, It is characterized in that Applied to a first node, the first node is a node in a node intersection, the node intersection is an intersection of nodes in a first blockchain network and nodes in a second blockchain network, the first node runs a smart contract device isolated from the first node system, the method comprising: The first node performs the following operations through the smart contract device: Sending a configuration information backup request to a second node in the second blockchain network, the configuration information backup request including an encrypted configuration information set and a hash value of the configuration information of a target node, wherein the target node includes each node in the node intersection, and the encrypted configuration information set includes encrypted configuration information obtained by encrypting the configuration information of each of the target nodes; In response to receiving a configuration information backup success notification message sent by the second node, it is determined that the configuration information is backed up successfully. The backup success notification message is generated by the second node after the hash value of the encrypted configuration information set and the configuration information of each of the target nodes is successfully saved in the second blockchain network.

2. The method according to claim 1, It is characterized in that The operations also include: Obtaining configuration information of each of the target nodes; generating an encryption key corresponding to each of the target nodes; Encrypting the configuration information of each target node using an encryption key corresponding to the target node to obtain encrypted configuration information of the target node; Obfuscating each of the encryption keys to generate an obfuscated key corresponding to each of the target nodes; Each obfuscation key is sent to a target node corresponding to the obfuscation key.

3. The method according to claim 2, It is characterized in that The step of performing key obfuscation on each of the encryption keys to generate an obfuscated key corresponding to each of the target nodes includes: Splitting each of the encryption keys into a target number of key segments, where the target number is the number of the target nodes; The obfuscation key is generated by the following formula: I={(i,1),(i+1,2),…,(n,n-i+1),…(ni,n-1),(n-i+1,n)} Wherein, I is the obfuscation key of the i-th target node, the obfuscation key I includes n key segments, n is the number of the target nodes, (i, x) is the x-th key segment obtained by dividing the encryption key of the i-th target node, i∈[1,n], x∈[1,n], i and x are positive integers.

4. The method according to claim 1, It is characterized in that The operations also include: Sending a configuration information recovery request to a third node in the second blockchain network; Receive the encrypted configuration information set and the hash value of each configuration information sent by the third node; Obtaining an obfuscation key for each of the target nodes, wherein the obfuscation key is generated by obfuscating an encryption key corresponding to each target node, wherein the encryption key is a key used to encrypt configuration information corresponding to the target node; Determining an encryption key for each of the target nodes based on each of the obfuscation keys; Decrypting the encrypted configuration information set by using each of the encryption keys to obtain configuration information of each of the target nodes; Verifying each of the decrypted configuration information using the Hash value; When the verification is successful, the node configuration of each of the target nodes is restored based on each of the configuration information.

5. The method according to any one of claims 1 to 4, It is characterized in that The method further comprises: Determining that the first node is a full node in the first blockchain network, the full node is a node in the first blockchain network that stores full blockchain data; Sending a block header backup request to a fourth node in the second blockchain network, wherein the block header backup request includes block header information of the first blockchain stored by the first node; In response to receiving a backup success notification message sent by the fourth node, determining that the block header information of the first blockchain is successfully backed up, the backup success notification message being generated by the fourth node after the block header information is successfully saved in the second blockchain network; Back up the block data corresponding to the first blockchain to the target storage space.

6. The method according to claim 5, It is characterized in that Also includes: Sending a backup and recovery request to a fifth node in the second blockchain network, wherein the backup and recovery request includes the identity information of the first node; Receiving block header information sent by the fifth node; Restoring the first blockchain according to the block header information and the block data corresponding to the target storage space; Broadcast the first blockchain to other nodes in the node intersection.

7. The method according to claim 5, It is characterized in that Before sending the block header backup request to the fourth node in the second blockchain network, the method further includes: Initiating a transaction blocking event in the first blockchain network; The backup record information is written into the first blockchain.

8. A method for blockchain, It is characterized in that Applied to a node in a second blockchain network, the method comprises: Receive a configuration information backup request sent by a smart contract device in a first node, the first node is a node in a node intersection, the node intersection is an intersection of nodes in the first blockchain network and nodes in the second blockchain network, the configuration information backup request includes an encrypted configuration information set and a hash value of configuration information of a target node, the encrypted configuration information set includes encrypted configuration information obtained by encrypting the configuration information of the target node, the target node includes each node in the node intersection, and the smart contract device is system-isolated from the first node; Saving the encrypted configuration information set and the hash value of the configuration information of the target node in the second blockchain network; Send a configuration information backup success notification message to the first node.

9. The method according to claim 8, It is characterized in that Also includes: Receiving a configuration information recovery request sent by the smart contract device in the first node; Send the encrypted configuration information set and a hash value of the configuration information of the target node to the smart contract device.

10. The method according to claim 8 or 9, It is characterized in that The method further comprises: Receiving a block header backup request sent by the first node, wherein the block header backup request includes block header information corresponding to a first blockchain of the first blockchain network; Verifying the block header information; When the verification is successful, the block header information is saved in the second blockchain network; Send a backup success notification message to the first node.

11. The method according to claim 10, It is characterized in that Also includes: Receiving a backup and recovery request sent by the first node; Verifying the identity information of the first node in the backup and recovery request; When the verification is successful, the block header information is sent to the first node.

12. A device for blockchain, It is characterized in that Applied to a first node, the first node is a node in a node intersection, the node intersection is an intersection of a node in a first blockchain network and a node in a second blockchain network, the device is isolated from the first node system, and the device includes: A first sending module, configured to send a configuration information backup request to a second node in the second blockchain network, wherein the configuration information backup request includes an encrypted configuration information set and a hash value of the configuration information of a target node, wherein the target node includes each node in the node intersection, and the encrypted configuration information set includes encrypted configuration information obtained by encrypting the configuration information of each of the target nodes; The first determination module is used to determine that the configuration information is successfully backed up in response to receiving a configuration information backup success notification message sent by the second node, and the configuration information backup success notification message is generated by the second node after the hash value of the encrypted configuration information set and the configuration information of each of the target nodes is successfully saved in the second blockchain network.

13. A device for blockchain, It is characterized in that Applied to a node in a second blockchain network, the device comprises: A first receiving module is used to receive a configuration information backup request sent by a smart contract device in a first node, the first node is a node in a node intersection, the node intersection is an intersection of nodes in the first blockchain network and nodes in the second blockchain network, the configuration information backup request includes an encrypted configuration information set and a hash value of the configuration information of a target node, the encrypted configuration information set includes encrypted configuration information obtained by encrypting the configuration information of the target node, the target node includes each node in the node intersection, and the smart contract device is system-isolated from the first node; A first storage module, used to store the encrypted configuration information set and the hash value of the configuration information of the target node in the second blockchain network; The second sending module is used to send a configuration information backup success notification message to the first node.

14. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the steps of the method described in any one of claims 1 to 7 are implemented.

15. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the steps of the method described in any one of claims 8 to 11 are implemented.

16. An electronic device, It is characterized in that include: a memory having a computer program stored thereon; A processor, configured to execute the computer program in the memory to implement the steps of the method according to any one of claims 1 to 7.

17. An electronic device, It is characterized in that include: a memory having a computer program stored thereon; A processor, configured to execute the computer program in the memory to implement the steps of the method according to any one of claims 8 to 11.