Consortium blockchain and layered deployment approach
By introducing multi-layer structure and error correction mechanisms into alliance blockchain, the problem that single-layer deployment in the existing technology cannot meet the bank's hierarchical organizational structure is solved, and effective data deployment and consensus in the bank's multi-layer deployment scenario is achieved. , reducing development costs and attack risks.
Patent Information
- Application Number
- CN202210211954.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-04
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2042-03-04
AI Technical Summary
The existing alliance blockchain deployment solution adopts a single-layer flat method, which cannot meet the needs of bank-level organizational structures and computing equipment at different levels, resulting in inequality in data deployment and consensus algorithms between nodes at different levels, and cannot Effectively meet the needs of banks' multi-level deployment scenarios.
A consortium blockchain and hierarchical deployment method are proposed. By defining a multi-layer structure, including the first, second and third layer modules, the modules of each layer interact but not coupled, and error correction modules and error correction responses are used. The module ensures the correctness of data transmission and operation and adapts to the deployment needs of nodes of different levels.
It has achieved the reduction of development costs in the multi-level bank deployment scenario, meet the needs of nodes of different levels, prevent attacks from low-level on the high-level, ensure the correctness of data deployment and consensus, and reduce the need for modification of the alliance chain framework.
Smart Images

Figure CN114584474B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of blockchain technology, and in particular to a consortium blockchain and a layered deployment method. Background Art
[0002] The current alliance blockchain deployment solutions basically adopt a single-layer approach. Regardless of whether it is a deployment method based on Hyperledger Fabric or a deployment method based on the FISCO-BCOS framework of the Financial Blockchain Cooperation Alliance, each node is an equal node and jointly maintains the blockchain.
[0003] However, in many deployment scenarios, not all nodes are equal, so a completely flat deployment solution cannot meet all application deployment scenarios. In the application deployment scenarios of banks, there are different levels of organizations, including rural agricultural service points deployed in merchants, provincial and municipal branches, and head office organizations. Different levels of hardware equipment and computer rooms have different levels of operation and maintenance measures and network conditions. In this case, the deployment method of the flat architecture will not be applicable. In addition, some structures use light node / full node design solutions to reduce storage redundancy and improve performance, but under such designs, light nodes either do not participate in consensus and only do verification, or they are still equal to full nodes in the consensus algorithm, which does not meet the performance and capacity of different levels of computing equipment in banks, and also does not meet the management status of different levels of outlets or branches. Summary of the invention
[0004] In view of this, the present application provides a consortium blockchain and a layered deployment method. Aiming at the scenario of multi-layer deployment of blockchain in banks, a multi-layer deployment design method with interaction and non-coupling between different layers is proposed to facilitate development work and reduce development costs.
[0005] The first aspect of the present application provides a consortium blockchain, including:
[0006] A first layer module of a consortium blockchain, a second layer module of a consortium blockchain, and a third layer module of a consortium blockchain; wherein the first layer module of the consortium blockchain is deployed with a consortium chain framework node; the second layer module of the consortium blockchain and the third layer module of the consortium blockchain are deployed with an affiliated node;
[0007] The node in the third layer module of the alliance blockchain is used to upload the target data to the node in the second layer module corresponding to the node in the third layer module when receiving the target data; wherein the target data includes the business deployment requirements and the data required by the business deployment requirements;
[0008] The node in the second layer module of the alliance blockchain is used to upload the target data to the node in the first layer module corresponding to the node in the second layer module when receiving the target data;
[0009] The node in the first layer module of the alliance blockchain is used to deploy in the alliance blockchain using the target data when the target data is received.
[0010] Optionally, when a node in the first layer module of the alliance blockchain receives the target data, deploying the target data in the alliance blockchain includes:
[0011] A receiving module, used for receiving the target data;
[0012] The processing module is used to forward or broadcast the target data and notify each node in the alliance blockchain to confirm and deploy the target data.
[0013] Optionally, the alliance blockchain further includes:
[0014] Error correction module, deployed in the second layer module of the alliance blockchain and the third layer module of the alliance blockchain;
[0015] The error correction module of the second layer module is used for, when the second layer module fails to receive correct feedback information during the process of uploading the target data to the node in the first layer module corresponding to the node in the second layer module, re-uploading the data corresponding to the incorrect feedback information to all nodes in the first layer module corresponding to the node in the second layer module except the faulty node;
[0016] The error correction module of the third-layer module is used for re-uploading the data corresponding to the incorrect feedback information to all nodes in the second-layer module corresponding to the node in the third-layer module except the faulty node when the third-layer module fails to receive correct feedback information during the process of uploading the target data to the node in the second-layer module corresponding to the node in the third-layer module.
[0017] Optionally, the alliance blockchain further includes:
[0018] The error correction response module is deployed in the nodes of the first layer module of the alliance blockchain and the nodes of the second layer module of the alliance blockchain;
[0019] The error correction response module of the node of the second layer module is used to check whether the target data correctly completes the target operation in the second layer module; wherein the target operation includes: deployment and / or confirmation;
[0020] If the target data completes the target operation correctly, the correct feedback information is fed back to the error correction module of the third layer module;
[0021] If the target data does not complete the target operation correctly, re-initiate an upload request to the first-layer module;
[0022] The error correction response module of the node of the first layer module is used to check whether the target data correctly completes the target operation in the first layer module;
[0023] If the target data completes the target operation correctly, the correct feedback information is fed back to the error correction module of the second layer module;
[0024] If the target data does not correctly complete the target operation, the target operation is performed again.
[0025] Optionally, the error correction response module of the node of the second layer module is used to check whether the target data correctly completes the target operation in the second layer module, including:
[0026] A first receiving module, configured to receive a first error correction request;
[0027] A first verification module, used to verify the first error correction request to obtain a first verification result;
[0028] The first determination module is used to reach a consensus among the nodes in the second layer module if the first verification result indicates that the error in the first error correction request does exist, and determine whether the target operation is completed correctly according to the consensus result.
[0029] Optionally, the error correction response module of the node of the first layer module is used to check whether the target data correctly completes the target operation in the first layer module, including:
[0030] A second receiving module, used for receiving a second error correction request;
[0031] A judging module, used for judging whether the second error correction request comes from a node of a second layer module subordinate to the node of the first layer module;
[0032] a second verification module, configured to verify the signature of the second error correction request and calculate the first signature quantity if the judgment module determines that the second error correction request comes from a node of a second layer module subordinate to the node of the first layer module;
[0033] A second determination unit, configured to determine that the target data has not correctly completed the target operation if the number of the first signatures is greater than a first threshold; wherein the first threshold is a preset percentage of the number of nodes of the second layer module subordinate to the nodes of the first layer module;
[0034] The second verification module is further configured to verify the signature of the second error correction request and calculate the number of second signatures if the judgment module determines that the second error correction request does not come from a node of a second layer module subordinate to the node of the first layer module;
[0035] The second determination unit is also used to determine that the target data has not correctly completed the target operation if the number of the second signatures is greater than a second threshold; wherein the second threshold is a preset percentage of the number of nodes of all second-layer modules.
[0036] A second aspect of the present application provides a layered deployment method, including:
[0037] When a node in the third layer module of the alliance blockchain receives the target data, the target data is uploaded to a node in the second layer module corresponding to the node in the third layer module; wherein the target data includes the business deployment requirements and the data required by the business deployment requirements;
[0038] When the node in the second layer module of the alliance blockchain receives the target data, the target data is uploaded to the node in the first layer module corresponding to the node in the second layer module;
[0039] When the nodes in the first layer module of the alliance blockchain receive the target data, the target data is used to deploy in the alliance blockchain.
[0040] Optionally, when the node in the first layer module of the alliance blockchain receives the target data, deploying the target data in the alliance blockchain includes:
[0041] The nodes in the first layer module of the alliance blockchain receive the target data;
[0042] The target data is forwarded or broadcasted, and each node in the alliance blockchain is notified to confirm and deploy the target data.
[0043] Optionally, the layered deployment method further includes:
[0044] In the process of uploading the target data to the node in the first layer module corresponding to the node in the second layer module, if the correct feedback information is not received, the error correction module of the second layer module re-uploads the data corresponding to the incorrect feedback information to all nodes in the first layer module corresponding to the node in the second layer module except the faulty node;
[0045] In the process of the third-layer module uploading the target data to the node in the second-layer module corresponding to the node in the third-layer module, if the correct feedback information is not received, the data corresponding to the incorrect feedback information is re-uploaded to all nodes in the second-layer module corresponding to the node in the third-layer module except the faulty node through the error correction module of the third-layer module.
[0046] Optionally, the layered deployment method further includes:
[0047] Checking whether the target data correctly completes the target operation in the second layer module through the error correction response module of the node of the second layer module; wherein the target operation includes: deployment and / or confirmation;
[0048] If the target data completes the target operation correctly, the correct feedback information is fed back to the error correction module of the third layer module;
[0049] If the target data does not complete the target operation correctly, re-initiate an upload request to the first-layer module;
[0050] Check whether the target data correctly completes the target operation through the error correction response module of the node of the first layer module;
[0051] If the target data completes the target operation correctly, the correct feedback information is fed back to the error correction module of the second layer module;
[0052] If the target data does not correctly complete the target operation, the target operation is performed again.
[0053] Optionally, the error correction response module of the node of the second layer module checks in the second layer module whether the target data correctly completes the target operation, including:
[0054] receiving a first error correction request;
[0055] Verifying the first error correction request to obtain a first verification result;
[0056] If the first verification result indicates that the error in the first error correction request does exist, a consensus is reached between the nodes in the second layer module, and whether the target operation is completed correctly is determined based on the consensus result.
[0057] Optionally, checking whether the target data correctly completes the target operation through the error correction response module of the node of the first layer module includes:
[0058] receiving a second error correction request;
[0059] Determining whether the second error correction request comes from a node of a second layer module subordinate to the node of the first layer module;
[0060] If it is determined that the second error correction request comes from a node of a second layer module subordinate to the node of the first layer module, verifying the signature of the second error correction request and calculating the first signature quantity;
[0061] If the number of the first signatures is greater than a first threshold, it is determined that the target data has not correctly completed the target operation; wherein the first threshold is a preset percentage of the number of nodes of the second layer module subordinate to the nodes of the first layer module;
[0062] If it is determined that the second error correction request does not come from a node of a second layer module subordinate to the node of the first layer module, verifying the signature of the second error correction request and calculating the number of second signatures;
[0063] If the number of the second signatures is greater than a second threshold, it is determined that the target data has not correctly completed the target operation; wherein the second threshold is a preset percentage of the number of nodes of all second-layer modules.
[0064] As can be seen from the above scheme, the present application provides a consortium blockchain and a hierarchical deployment method, wherein the consortium blockchain includes: a first-layer module of the consortium blockchain, a second-layer module of the consortium blockchain, and a third-layer module of the consortium blockchain; wherein the first-layer module of the consortium blockchain is deployed with a consortium chain framework node; the second-layer module of the consortium blockchain and the third-layer module of the consortium blockchain are deployed with an affiliated node; the node in the third-layer module of the consortium blockchain is used to upload the target data to the node in the second-layer module corresponding to the node in the third-layer module when receiving the target data; wherein the target data includes business deployment requirements and data required by the business deployment requirements; the node in the second-layer module of the consortium blockchain is used to upload the target data to the node in the first-layer module corresponding to the node in the second-layer module when receiving the target data; the node in the first-layer module of the consortium blockchain is used to deploy in the consortium blockchain using the target data when receiving the target data. Thus, the purpose of meeting the hierarchical deployment structure without making a lot of modifications to the consortium chain framework is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0066] Figure 1 A schematic diagram of a consortium blockchain provided in an embodiment of the present application;
[0067] Figure 2 A schematic diagram of a consortium blockchain provided in another embodiment of the present application;
[0068] Figure 3 This is a specific flow chart of a layered deployment method provided in another embodiment of the present application. DETAILED DESCRIPTION
[0069] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0070] It should be noted that the concepts of "first", "second", etc. mentioned in this application are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units, and the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0071] First, the general technologies and knowledge involved in this application are introduced:
[0072] HyperledgerFabric is a consortium chain framework.
[0073] Hyperledger is an open source project initiated by the Linux Foundation in 2015 to promote blockchain digital technology and transaction verification. It has 30 initial corporate members (including IBM, Intel, JPMorgan, Cisco, etc.). The goal is to allow members to work together to meet different industry cases and simplify business processes. The peer node deployment of Hyperledger is flat, and each peer plays exactly the same role and has the same status.
[0074] FISCO-BCOS, FISCO-BCOS originated from BCOS jointly launched by WeBank, Wanxiang Blockchain and Matrix. BCOS was fully open sourced in July 2017, and then launched the financial version of BCOS with other institutions: FISCO-BCOS. Focusing on the implementation of blockchain application scenarios, it has been practiced in scenarios including supply chain, bills, data sharing, asset securitization, credit reporting, and over-the-counter equity markets.
[0075] Public chain technologies such as Ethereum, Ethereum supports smart contracts, and users can deploy the written smart contracts on Ethereum. Ethereum is a decentralized application platform that allows anyone to build and use decentralized applications running on blockchain technology on the platform.
[0076] The existing technology currently has the following disadvantages:
[0077] (1) Currently, public chains such as Ethereum are not suitable for deployment in banking systems, and internal information cannot be uploaded to the public chain;
[0078] (2) The flat deployment approach adopted by consortium chain frameworks such as Hyperledger and BCOS is not suitable for hierarchical banking organizational structures.
[0079] (3) Some existing dual-chain and two-layer blockchain designs are not targeted at banking application scenarios and do not meet or only meet the needs of layered deployment of some banks.
[0080] Therefore, the embodiment of the present application provides a consortium blockchain to solve the shortcomings of the above-mentioned prior art, such as Figure 1 As shown, specifically including:
[0081] The first layer module 100 of the alliance blockchain, the second layer module 200 of the alliance blockchain, and the third layer module 300 of the alliance blockchain.
[0082] Among them, the first layer module of the alliance blockchain is deployed with the alliance chain framework node to complete the full node tasks, such as consensus algorithm, smart contract, and business deployed on the blockchain; the second layer module of the alliance blockchain and the third layer module of the alliance blockchain are deployed with subsidiary nodes. The second layer module can upload data such as smart contracts that need to be deployed and documents that need to be protected to one or several full nodes in the first layer module, which are then forwarded and broadcasted by the full node and notified to all nodes in the network. The third layer module can directly upload business deployment requirements to the second layer module, which is forwarded by the second layer module to the first layer module for deployment.
[0083] In the actual application of this application, the schematic diagram of the alliance blockchain can be as follows Figure 2 As shown, the first layer module 100 (i.e. Figure 2The first-layer alliance chain in the alliance blockchain can be deployed but not limited to the bank's high-availability cloud platform or provincial branch computer room; the second-layer module 200 (i.e. Figure 2 The second layer in the alliance blockchain) can be deployed but not limited to business departments with weak operation and maintenance capabilities and high response delays in cities and counties; the third layer module 300 (i.e. Figure 2 The third layer in the diagram) can be deployed in but is not limited to rural sales offices that have basically no operation and maintenance capabilities, high response delays, and are easily invaded by network and physical attacks.
[0084] It should be noted that the second layer includes the branch computer room under a branch and one or a small number of first-layer devices. For example, a branch computer room device is both a first-layer device and a second-layer device, and the two layers are crossed on this branch computer room device. The third layer is not crossed with the second layer, and the third-layer device does not cross with the second layer. Under normal circumstances, the third-layer device is only connected to one second-layer device, such as the branch computer room, but it may communicate with other second-layer devices when an error occurs.
[0085] Specifically, the nodes in the third layer module of the alliance blockchain are used to upload the target data to the nodes in the second layer module corresponding to the nodes in the third layer module when receiving the target data.
[0086] The target data includes business deployment requirements and data required by the business deployment requirements.
[0087] The nodes in the second layer module of the alliance blockchain are used to upload the target data to the nodes in the first layer module corresponding to the nodes in the second layer module when receiving the target data.
[0088] The nodes in the first layer module of the alliance blockchain are used to deploy the target data in the alliance blockchain using the target data when the target data is received.
[0089] Optionally, in another embodiment of the present application, a node in the first layer module of the alliance blockchain is used to deploy in the alliance blockchain using the target data when receiving the target data, including:
[0090] The receiving module is used to receive target data.
[0091] The processing module is used to forward or broadcast the target data and notify each node in the alliance blockchain to confirm and deploy the target data.
[0092] Optionally, in another embodiment of the present application, an implementation of the alliance blockchain further includes:
[0093] The error correction module is deployed in the second layer module of the alliance blockchain and the third layer module of the alliance blockchain.
[0094] The error correction module of the second layer module is used to re-upload the data corresponding to the incorrect feedback information to all nodes except the faulty node in the first layer module corresponding to the node in the second layer module when the second layer module uploads the target data to the node in the first layer module corresponding to the node in the second layer module, if the correct feedback information is not received. And obtain the feedback of the error correction response module.
[0095] It should be noted that failure to receive correct feedback information includes, but is not limited to: failure to obtain confirmation, response timeout, etc., which are not limited here.
[0096] The error correction module of the third layer module is used to re-upload the data corresponding to the incorrect feedback information to all nodes except the faulty node in the second layer module corresponding to the node in the third layer module when the third layer module does not receive the correct feedback information during the process of uploading the target data to the node in the second layer module corresponding to the node in the third layer module, and obtain the feedback of the error correction response module.
[0097] Optionally, in another embodiment of the present application, an implementation of the alliance blockchain further includes:
[0098] The error correction response module is deployed in the nodes of the first layer module of the alliance blockchain and the nodes of the second layer module of the alliance blockchain.
[0099] The error correction response module of the node of the second layer module is used to check whether the target data correctly completes the target operation in the second layer module.
[0100] The target operation includes: deployment and / or confirmation.
[0101] If the target data completes the target operation correctly, the correct feedback information is fed back to the error correction module of the third layer module.
[0102] If the target data does not complete the target operation correctly, the upload request is re-initiated to the first layer module.
[0103] The error correction response module of the node of the first layer module is used to check whether the target data correctly completes the target operation in the first layer module.
[0104] If the target data completes the target operation correctly, the correct feedback information is fed back to the error correction module of the second layer module.
[0105] If the target data does not correctly complete the target operation, the target operation is performed again.
[0106] Optionally, in another embodiment of the present application, the error correction response module of the node of the second layer module is used to check whether the target data correctly completes the target operation in the second layer module, including:
[0107] The first receiving module is used to receive a first error correction request.
[0108] The first verification module is used to verify the first error correction request to obtain a first verification result.
[0109] The first determination module is used to reach a consensus among the nodes in the second layer module if the first verification result indicates that the error in the first error correction request does exist, and determine whether the target operation is completed correctly according to the consensus result.
[0110] Optionally, in another embodiment of the present application, the error correction response module of the node of the first layer module is used to check whether the target data correctly completes the target operation in the first layer module, including:
[0111] The second receiving module is used to receive a second error correction request.
[0112] The judgment module is used to judge whether the second error correction request comes from a node of a second layer module subordinate to a node of a first layer module.
[0113] The second verification module is used to verify the signature of the second error correction request and calculate the first signature quantity if the judgment module determines that the second error correction request comes from a node of the second layer module subordinate to the node of the first layer module.
[0114] The second determination unit is used to determine that the target data does not correctly complete the target operation if the number of first signatures is greater than a first threshold.
[0115] The first threshold is a preset percentage of the number of nodes in the subordinate second-layer modules of the nodes in the first-layer modules.
[0116] The second verification module is also used to verify the signature of the second error correction request and calculate the second signature quantity if the judgment module determines that the second error correction request does not come from the node of the second layer module subordinate to the node of the first layer module.
[0117] The second determination unit is further used to determine that the target data does not correctly complete the target operation if the number of second signatures is greater than a second threshold.
[0118] The second threshold is a preset percentage of the number of nodes in all second-layer modules.
[0119] The embodiments of the present application are now described by way of example:
[0120] The first layer module of the alliance blockchain deploys conventional blockchain services, including common frameworks of alliance blockchain, such as Hyperledger Fabric, Ethereum, FISCO-BCOS, etc. When the head office and provincial branches have blockchain business needs to go online, smart contracts are directly deployed on all nodes. The first layer module of the alliance blockchain receives uploaded data such as smart contracts, etc. The smart contracts will be immediately broadcast to all nodes in the alliance blockchain and confirmed.
[0121] For other nodes of the first layer module of non-consortium blockchain, under the correct circumstances:
[0122] When a rural business department needs to launch business online or upload documents to the blockchain system, the data will first be uploaded by the business department to the nearest municipal branch server, and the municipal server will forward it to the provincial branch unit, and finally the deployment will be completed on the chain.
[0123] When a municipal department needs to upload data or deploy business, it will upload the data to the corresponding provincial branch, which will complete the confirmation and deployment in the first-layer blockchain.
[0124] For other nodes of the first layer module of the non-consortium blockchain, in the event of an error:
[0125] When the rural business department believes that it has not received a correct response, for example, the business has not been successfully deployed to the blockchain, or the data has not been confirmed, it will request an error correction to the municipal server, and the error correction process is completed by the error correction module. For the municipal unit that receives the error correction request, it checks whether the error in the error correction request exists. If it does, it will feedback "correction" to the server requesting the error correction, otherwise it will feedback "confirmed". When the error correction module of the third-layer module of the alliance blockchain receives more than 2 / 3 of the "confirmed", it is considered that the error raised has in fact been correctly confirmed. Otherwise, wait for the second-layer module of the alliance blockchain to initiate error correction to the first-layer module of the alliance blockchain, and verify the error correction result after completion.
[0126] When the server where the second layer module of the alliance blockchain is located receives the error correction request from the server where the third layer module of the alliance blockchain is located, it first verifies the requested error correction requirement, then reaches a consensus among the nodes in the second layer module of the alliance blockchain, and after obtaining the consensus result, each node feeds the result back to the error correction module of the third layer module of the alliance blockchain. If the consensus result is that the error in the error correction request does exist, each node of the second layer module of the alliance blockchain submits an error correction request to the local provincial server of the third layer module of the alliance blockchain and signs the request.
[0127] If the server where the second layer module of the alliance blockchain is located finds that its request has not been executed or confirmed, a consensus is reached among the nodes in the second layer module of the alliance blockchain. If the consensus result is that the error does exist, each node in the second layer module of the alliance blockchain will make an error correction request to the local provincial server of the first layer module of the alliance blockchain and sign the request. If the second layer module of the alliance blockchain does not receive a response after making an error correction request to the local provincial branch of the first layer module of the alliance blockchain, each node will make an error correction request to each server of the first layer module of all alliance blockchains and sign the request.
[0128] When the server where the first layer module of the alliance blockchain is located receives an error correction request from the server where the second layer module of its subordinate alliance blockchain is located, it verifies the request signature and calculates the number. If the number is greater than 2 / 3, the deployment of the request is re-proposed in the first layer module of the alliance blockchain, that is, the request is forwarded to all other nodes, and then consensus confirmation is performed. If the server where the first layer module of the alliance blockchain is located receives an error correction request from the server where the first layer module of the alliance blockchain is not its subordinate, it verifies the signature and calculates the number. If the number is greater than 2 / 3 of the total number of nodes in the second layer, it directly enters the consensus.
[0129] It can be seen that this application proposes a multi-layer deployment solution for the scenario of multi-layer deployment of blockchain in banks. Different protocols are designed for each layer according to the different levels of banks to achieve: reduce the probability of attacks from the lower layer to the higher layer, while retaining the communication channel between the lower layer and the higher layer, so that when errors do occur, they can affect the decision-making of the higher level and pass it upward. The design method of interaction and non-coupling between different levels facilitates development work and reduces development costs.
[0130] The most important idea of this application is the layered structure design, as well as the design of the second and third layer protocols. These structures and protocols ensure the following effects:
[0131] First, the first layer can still deploy the commonly used consortium chain blockchain framework, without the need for additional software development, saving development costs. The second and third layers can interact with the first layer blockchain but are not coupled, and can be developed independently and connected to the first layer, without the need to be developed simultaneously with the first layer framework.
[0132] Second, a multi-layer deployment plan was designed according to the bank's hierarchical organizational structure and the hardware and operation and maintenance levels of each layer. Under normal circumstances, the secondary-level servers can only connect to a limited number of upper-level servers to prevent non-compliant traffic such as DDoS attacks, making it difficult for departments such as the Rural Operations Department, which are easily invaded and controlled, to launch attacks on the upper layer.
[0133] Third, for the multi-layer deployment scheme, a corresponding error correction protocol is designed to ensure that the second and third layer devices are not just followers, but can affect the deployment of smart contracts on the first layer. The rural business department can influence the decision of the second layer when an error occurs, and the second layer can influence the decision of the first layer after verification. Similarly, when an error occurs on the second layer, consensus can be reached within the second layer first, and then the upper layer can be re-proposed.
[0134] As can be seen from the above scheme, the alliance blockchain provided by the present application includes: a first layer module of the alliance blockchain, a second layer module of the alliance blockchain, and a third layer module of the alliance blockchain; wherein the first layer module of the alliance blockchain is deployed with an alliance chain framework node; the second layer module of the alliance blockchain and the third layer module of the alliance blockchain are deployed with an affiliated node; the node in the third layer module of the alliance blockchain is used to upload the target data to the node in the second layer module corresponding to the node in the third layer module when receiving the target data; wherein the target data includes the business deployment requirements and the data required by the business deployment requirements; the node in the second layer module of the alliance blockchain is used to upload the target data to the node in the first layer module corresponding to the node in the second layer module when receiving the target data; the node in the first layer module of the alliance blockchain is used to deploy in the alliance blockchain using the target data when receiving the target data. Thus, the purpose of meeting the hierarchical deployment structure without making a lot of modifications to the alliance chain framework is achieved.
[0135] Another embodiment of the present application provides a hierarchical deployment method, such as Figure 3 As shown, the specific steps include:
[0136] S001. When a node in the third layer module of the alliance blockchain receives target data, the target data is uploaded to the node in the second layer module corresponding to the node in the third layer module.
[0137] The target data includes business deployment requirements and data required by the business deployment requirements.
[0138] S002. When the node in the second layer module of the alliance blockchain receives the target data, it uploads the target data to the node in the first layer module corresponding to the node in the second layer module.
[0139] S003. When the node in the first layer module of the alliance blockchain receives the target data, the target data is used to deploy it in the alliance blockchain.
[0140] The specific working process of the method disclosed in the above embodiments of the present application can be found in the corresponding device embodiment content, which will not be repeated here.
[0141] Optionally, in another embodiment of the present application, an implementation of step S303 specifically includes:
[0142] The nodes in the first layer module of the consortium blockchain receive the target data.
[0143] Forward or broadcast the target data, and notify each node in the alliance blockchain to confirm and deploy the target data.
[0144] The specific working process of the method disclosed in the above embodiments of the present application can be found in the corresponding device embodiment content, which will not be repeated here.
[0145] Optionally, in another embodiment of the present application, an implementation of the layered deployment method further includes:
[0146] In the process of the second-layer module uploading target data to the nodes in the first-layer module corresponding to the nodes in the second-layer module, if correct feedback information is not received, the data corresponding to the incorrect feedback information not received will be re-uploaded to all nodes in the first-layer module corresponding to the nodes in the second-layer module except the faulty nodes through the error correction module of the second-layer module.
[0147] In the process of the third-layer module uploading target data to the nodes in the second-layer module corresponding to the nodes in the third-layer module, if correct feedback information is not received, the data corresponding to the incorrect feedback information is re-uploaded to all nodes in the second-layer module corresponding to the nodes in the third-layer module except the faulty node through the error correction module of the third-layer module.
[0148] The specific working process of the method disclosed in the above embodiments of the present application can be found in the corresponding device embodiment content, which will not be repeated here.
[0149] Optionally, in another embodiment of the present application, an implementation of the layered deployment method further includes:
[0150] The error correction response module of the node of the second layer module checks in the second layer module whether the target data correctly completes the target operation.
[0151] The target operation includes: deployment and / or confirmation.
[0152] If the target data completes the target operation correctly, the correct feedback information is fed back to the error correction module of the third layer module.
[0153] If the target data does not complete the target operation correctly, the upload request is re-initiated to the first layer module.
[0154] The error correction response module of the node of the first layer module checks whether the target data correctly completes the target operation.
[0155] If the target data completes the target operation correctly, the correct feedback information is fed back to the error correction module of the second layer module.
[0156] If the target data does not correctly complete the target operation, the target operation is performed again.
[0157] The specific working process of the method disclosed in the above embodiments of the present application can be found in the corresponding device embodiment content, which will not be repeated here.
[0158] Optionally, in another embodiment of the present application, an implementation manner of checking whether the target data correctly completes the target operation in the second layer module through the error correction response module of the node of the second layer module further includes:
[0159] A first error correction request is received.
[0160] The first error correction request is verified to obtain a first verification result.
[0161] If the first verification result indicates that the error in the first error correction request does exist, a consensus is reached between the nodes in the second layer module, and whether the target operation is completed correctly is determined based on the consensus result.
[0162] The specific working process of the method disclosed in the above embodiments of the present application can be found in the corresponding device embodiment content, which will not be repeated here.
[0163] Optionally, in another embodiment of the present application, an implementation method of checking whether the target data correctly completes the target operation through the error correction response module of the node of the first layer module includes:
[0164] A second error correction request is received.
[0165] Determine whether the second error correction request comes from a node of a second-layer module subordinate to the node of the first-layer module.
[0166] If it is determined that the second error correction request comes from a node of a second layer module subordinate to a node of a first layer module, the signature of the second error correction request is verified and the number of first signatures is calculated.
[0167] If the first signature quantity is greater than the first threshold, it is determined that the target data does not correctly complete the target operation.
[0168] The first threshold is a preset percentage of the number of nodes in the subordinate second-layer modules of the nodes in the first-layer modules.
[0169] If it is determined that the second error correction request does not come from a node of a second layer module subordinate to a node of a first layer module, the signature of the second error correction request is verified and the number of second signatures is calculated.
[0170] If the number of second signatures is greater than the second threshold, it is determined that the target data does not correctly complete the target operation.
[0171] The second threshold is a preset percentage of the number of nodes in all second-layer modules.
[0172] The specific working process of the method disclosed in the above embodiments of the present application can be found in the corresponding device embodiment content, which will not be repeated here.
[0173] From the above scheme, it can be seen that the present application provides a hierarchical deployment method: when the node in the third layer module of the alliance blockchain receives the target data, the target data is uploaded to the node in the second layer module corresponding to the node in the third layer module; wherein the target data includes the business deployment requirements and the data required by the business deployment requirements; when the node in the second layer module of the alliance blockchain receives the target data, the target data is uploaded to the node in the first layer module corresponding to the node in the second layer module; when the node in the first layer module of the alliance blockchain receives the target data, the target data is used to deploy in the alliance blockchain. Thus, the hierarchical deployment structure is met without the need to make a lot of modifications to the alliance chain framework.
[0174] In the above embodiments disclosed in the present application, it should be understood that the disclosed apparatus and method can also be implemented in other ways. The apparatus and method embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the apparatus, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, program segment or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0175] In addition, each functional module in each embodiment of the present disclosure can be integrated together to form an independent part, or each module can exist separately, or two or more modules can be integrated to form an independent part. If the function is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a live broadcast device, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.
[0176] The present application can be implemented or used by professionals and technicians. Various modifications to these embodiments will be apparent to professionals and technicians in the field, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A consortium blockchain, characterized in that: include: The first layer module of the alliance blockchain, the second layer module of the alliance blockchain, the third layer module of the alliance blockchain, the error correction module, the error correction module of the second layer module and the error correction module of the third layer module; wherein the first layer module of the alliance blockchain is deployed with an alliance chain framework node; the second layer module of the alliance blockchain and the third layer module of the alliance blockchain are deployed with an auxiliary node; The node in the third layer module of the alliance blockchain is used to upload the target data to the node in the second layer module corresponding to the node in the third layer module when receiving the target data; wherein the target data includes the business deployment requirements and the data required by the business deployment requirements; The node in the second layer module of the alliance blockchain is used to upload the target data to the node in the first layer module corresponding to the node in the second layer module when receiving the target data; The node in the first layer module of the alliance blockchain is used to deploy in the alliance blockchain using the target data when receiving the target data; The error correction module is deployed in the second layer module of the alliance blockchain and the third layer module of the alliance blockchain; The error correction module of the second layer module is used for, when the second layer module fails to receive correct feedback information during the process of uploading the target data to the node in the first layer module corresponding to the node in the second layer module, re-uploading the data corresponding to the incorrect feedback information to all nodes in the first layer module corresponding to the node in the second layer module except the faulty node; The error correction module of the third-layer module is used for re-uploading the data corresponding to the incorrect feedback information to all nodes in the second-layer module corresponding to the node in the third-layer module except the faulty node when the third-layer module fails to receive correct feedback information during the process of uploading the target data to the node in the second-layer module corresponding to the node in the third-layer module.
2. The alliance blockchain according to claim 1, characterized in that: The node in the first layer module of the alliance blockchain is used to deploy in the alliance blockchain using the target data when receiving the target data, including: A receiving module, used for receiving the target data; The processing module is used to forward or broadcast the target data and notify each node in the alliance blockchain to confirm and deploy the target data.
3. The alliance blockchain according to claim 1, characterized in that: Also includes: The error correction response module is deployed in the nodes of the first layer module of the alliance blockchain and the nodes of the second layer module of the alliance blockchain; The error correction response module of the node of the second layer module is used to check whether the target data correctly completes the target operation in the second layer module; wherein the target operation includes: deployment and / or confirmation; If the target data completes the target operation correctly, the correct feedback information is fed back to the error correction module of the third layer module; If the target data does not complete the target operation correctly, re-initiate an upload request to the first-layer module; The error correction response module of the node of the first layer module is used to check whether the target data correctly completes the target operation in the first layer module; If the target data completes the target operation correctly, the correct feedback information is fed back to the error correction module of the second layer module; If the target data does not correctly complete the target operation, the target operation is performed again.
4. The alliance blockchain according to claim 3, characterized in that: The error correction response module of the node of the second layer module is used to check whether the target data correctly completes the target operation in the second layer module, including: A first receiving module, configured to receive a first error correction request; A first verification module, used to verify the first error correction request to obtain a first verification result; The first determination module is used to reach a consensus among the nodes in the second layer module if the first verification result indicates that the error in the first error correction request does exist, and determine whether the target operation is completed correctly according to the consensus result.
5. The alliance blockchain according to claim 3, characterized in that: The error correction response module of the node of the first layer module is used to check whether the target data correctly completes the target operation in the first layer module, including: A second receiving module, used for receiving a second error correction request; A judging module, used for judging whether the second error correction request comes from a node of a second layer module subordinate to the node of the first layer module; a second verification module, configured to verify the signature of the second error correction request and calculate the first signature quantity if the judgment module determines that the second error correction request comes from a node of a second layer module subordinate to the node of the first layer module; A second determination unit, configured to determine that the target data has not correctly completed the target operation if the number of the first signatures is greater than a first threshold; wherein the first threshold is a preset percentage of the number of nodes of the second layer module subordinate to the nodes of the first layer module; The second verification module is further configured to verify the signature of the second error correction request and calculate the number of second signatures if the judgment module determines that the second error correction request does not come from a node of a second layer module subordinate to the node of the first layer module; The second determination unit is also used to determine that the target data has not correctly completed the target operation if the number of the second signatures is greater than a second threshold; wherein the second threshold is a preset percentage of the number of nodes of all second-layer modules.
6. A hierarchical deployment method, characterized in that: Applied to consortium blockchain, including: When a node in the third layer module of the alliance blockchain receives the target data, the target data is uploaded to a node in the second layer module corresponding to the node in the third layer module; wherein the target data includes the business deployment requirements and the data required by the business deployment requirements; When the node in the second layer module of the alliance blockchain receives the target data, the target data is uploaded to the node in the first layer module corresponding to the node in the second layer module; When the node in the first layer module of the alliance blockchain receives the target data, the target data is used to deploy in the alliance blockchain; In the process of uploading the target data to the node in the first layer module corresponding to the node in the second layer module, if the correct feedback information is not received, the error correction module of the second layer module re-uploads the data corresponding to the incorrect feedback information to all nodes in the first layer module corresponding to the node in the second layer module except the faulty node; In the process of the third-layer module uploading the target data to the node in the second-layer module corresponding to the node in the third-layer module, if the correct feedback information is not received, the data corresponding to the incorrect feedback information is re-uploaded to all nodes in the second-layer module corresponding to the node in the third-layer module except the faulty node through the error correction module of the third-layer module.
7. The hierarchical deployment method according to claim 6, characterized in that: When the node in the first layer module of the alliance blockchain receives the target data, the target data is used to deploy in the alliance blockchain, including: The nodes in the first layer module of the alliance blockchain receive the target data; The target data is forwarded or broadcasted, and each node in the alliance blockchain is notified to confirm and deploy the target data.
8. The hierarchical deployment method according to claim 6, characterized in that: Also includes: Checking whether the target data correctly completes the target operation in the second layer module through the error correction response module of the node of the second layer module; wherein the target operation includes: deployment and / or confirmation; If the target data completes the target operation correctly, the correct feedback information is fed back to the error correction module of the third layer module; If the target data does not complete the target operation correctly, re-initiate an upload request to the first-layer module; Check whether the target data correctly completes the target operation through the error correction response module of the node of the first layer module; If the target data completes the target operation correctly, the correct feedback information is fed back to the error correction module of the second layer module; If the target data does not correctly complete the target operation, the target operation is performed again.