Cross-cluster communication deployment method, device and computer equipment
Through the cross-cluster communication deployment method, the multi-cluster configuration process is simplified, the problems of complex operations and inefficiency in the existing technology are solved, and efficient cross-cluster communication and stable operation of blockchain applications are achieved.
Patent Information
- Application Number
- CN202211686244.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-27
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2042-12-27
AI Technical Summary
The existing consortium chain networks are complex and inefficient in multi-cluster deployment, making it difficult to ensure the requirements of high availability and large-scale applications.
A cross-cluster communication deployment method is provided, by receiving configuration instructions, determining the primary cluster and the backup cluster, and performing cross-cluster communication configuration based on address information and port information, to realize efficient configuration and communication across clusters.
It improves the configuration efficiency of multiple clusters, simplifies the operation process, and ensures the high availability of blockchain applications and the stable operation of large-scale applications.
Smart Images

Figure CN116016134B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of blockchain technology, and in particular to a cross-cluster communication deployment method, apparatus, computer equipment, storage medium, and computer program product. Background Art
[0002] With the advent of the technological era and the development of mobile Internet, the pace of network change is getting faster and faster. The process of realizing information integration in the same field or multiple fields and providing customers with all-round information solutions is also facing new challenges such as system architecture improvement and support focus shift. Therefore, blockchain technology, as a specific implementation of distributed ledgers, has gradually become the preferred way to store and trade data in various fields with its natural advantages in storing and managing data.
[0003] Currently, blockchain applications are in the mid-term exploration stage. Many alliance chain networks are deployed in a single cluster deployment mode. If there is a problem with the cluster service, the alliance chain network is likely to fail and can no longer provide services to the outside world. It is impossible to guarantee the high availability and large-scale application requirements of subsequent blockchain applications. Therefore, distributed multi-cluster high-availability deployment is the general trend. However, the existing alliance chain network needs to log in to the configuration website of each cluster in the alliance chain network separately to configure the cluster. The operation is complicated and inefficient. Summary of the invention
[0004] Based on this, it is necessary to provide a cross-cluster communication deployment method, apparatus, computer equipment, storage medium and computer program product that can improve the configuration efficiency of multiple clusters in response to the above technical problems.
[0005] In a first aspect, the present application provides a cross-cluster communication deployment method, including:
[0006] receiving a configuration instruction, wherein the configuration instruction carries a cluster label and configuration information;
[0007] Determine a primary cluster and a backup cluster from at least two clusters according to the cluster label;
[0008] According to the address information and port information included in the configuration information, cross-cluster communication configuration is performed on the active cluster and the standby cluster respectively.
[0009] In one of the embodiments, the configuration instruction includes a forwarding node label corresponding to the primary cluster and a forwarding node label corresponding to the standby cluster; each of the clusters includes at least one node;
[0010] After determining the primary cluster and the secondary cluster from at least two clusters according to the cluster label, the method further includes:
[0011] According to the forwarding node label corresponding to the primary cluster, the forwarding node corresponding to the primary cluster is determined from the nodes included in the primary cluster; according to the forwarding node label corresponding to the standby cluster, the forwarding node corresponding to the standby cluster is determined from the nodes included in the standby cluster; the forwarding node is used to realize cross-cluster communication.
[0012] In one of the embodiments, performing cross-cluster communication configuration on the active cluster and the standby cluster according to the address information included in the configuration information includes:
[0013] The address corresponding to the main cluster included in the address information is configured as the access address of the forwarding node corresponding to the main cluster; the port corresponding to the main cluster included in the port information is configured as the access port of the forwarding node corresponding to the main cluster;
[0014] The address corresponding to the standby cluster included in the address information is configured as the access address of the forwarding node corresponding to the standby cluster; and the port corresponding to the standby cluster included in the port information is configured as the access port of the forwarding node corresponding to the standby cluster.
[0015] In one embodiment, the method further comprises:
[0016] Storing the signature keys corresponding to the standby clusters in the main cluster;
[0017] The signature key corresponding to the primary cluster is stored in the standby cluster.
[0018] In one embodiment, the method further comprises:
[0019] Obtaining a data acquisition request issued by the cluster; the data acquisition request includes a node identifier;
[0020] According to the node identifier, matching a corresponding target forwarding node from the forwarding nodes of each cluster;
[0021] The target forwarding node is controlled to send the target data corresponding to the data acquisition request to the forwarding node of the cluster that issues the data acquisition request.
[0022] In one embodiment, controlling the target forwarding node to send the target data corresponding to the data acquisition request to the forwarding node of the cluster that issued the data acquisition request includes:
[0023] The target data is signed using the signature key stored in the cluster where the target forwarding node is located;
[0024] The target forwarding node is controlled to send the signed target data to the forwarding node of the cluster that issues the data acquisition request.
[0025] In a second aspect, the present application also provides a cross-cluster communication deployment device, including:
[0026] A receiving module, used to receive a configuration instruction, wherein the configuration instruction carries a cluster label and configuration information;
[0027] A determination module, configured to determine a primary cluster and a backup cluster from at least two clusters according to the cluster label;
[0028] The configuration module is used to perform cross-cluster communication configuration for the active cluster and the standby cluster according to the address information and port information included in the configuration information.
[0029] In a third aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the cross-cluster communication deployment method described in any one of the above embodiments is implemented.
[0030] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the cross-cluster communication deployment method described in any of the above embodiments is implemented.
[0031] In a fifth aspect, the present application further provides a computer program product, wherein the computer program product includes a computer program, and when the computer program product is executed by a processor, the cross-cluster communication deployment method described in any one of the above embodiments is implemented.
[0032] The above-mentioned cross-cluster communication deployment method, device, computer equipment, storage medium and computer program product, by deploying a consortium chain network based on a multi-cluster environment, help to achieve high availability and interoperability of multiple consortium chain networks, ensure the large-scale effective implementation and stable operation of applications, and further quickly and automatically complete the cross-cluster consortium chain network deployment through integrated configuration deployment, greatly speeding up the large-scale implementation of applications and reducing the difficulty of blockchain underlying deployment, thereby speeding up cluster deployment efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 An application environment diagram of a cross-cluster communication deployment method in one embodiment;
[0034] Figure 2 A schematic diagram of a process of a cross-cluster communication deployment method in one embodiment;
[0035] Figure 3 A schematic diagram of a process of a cross-cluster communication deployment method in one embodiment;
[0036] Figure 4A schematic diagram of a process of a cross-cluster communication deployment method in one embodiment;
[0037] Figure 5 It is a structural block diagram of a cross-cluster communication deployment device in one embodiment;
[0038] Figure 6 It is a structural block diagram of a cross-cluster communication deployment device in one embodiment;
[0039] Figure 7 It is a structural block diagram of a configuration module in a cross-cluster communication deployment device in one embodiment;
[0040] Figure 8 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0041] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0042] The cross-cluster communication deployment method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, the terminal 102 communicates with the server 104 via the network.
[0043] For example, the cross-cluster communication deployment method is applied to the terminal 102. After receiving the configuration instruction, the terminal 102 determines the main cluster and the backup cluster from at least two clusters according to the cluster label carried by the configuration instruction; and performs cross-cluster communication configuration on the main cluster and the backup cluster respectively according to the address information and port information contained in the configuration information carried by the configuration instruction, wherein the terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices, and the Internet of Things devices may be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The server 104 may be implemented by an independent server or a server cluster composed of multiple servers. The terminal 102 and the server 104 may be directly or indirectly connected by wired or wireless communication, for example, through a network connection.
[0044] For another example, the memory data access method is applied to the server 104. After receiving the configuration instruction, the terminal 102 sends the configuration instruction to the server 104. The server 104 determines the primary cluster and the backup cluster from at least two clusters according to the cluster tag carried by the configuration instruction; and performs cross-cluster communication configuration for the primary cluster and the backup cluster according to the address information and port information contained in the configuration information carried by the configuration instruction. It can be understood that the data storage system can be an independent storage device, or the data storage system is located on the server, or the data storage system is located on another terminal.
[0045] In one embodiment, a cross-cluster communication deployment method is provided. This embodiment uses the cross-cluster communication deployment method applied to a processor as an example. It is understandable that the processor may be located on a terminal or a server. Figure 2 As shown, the cross-cluster communication deployment method includes:
[0046] Step 202: Receive a configuration instruction, where the configuration instruction carries a cluster tag and configuration information.
[0047] Specifically, the configuration instruction is issued by the terminal, and the configuration instruction refers to a configuration request initiated by a user for multiple clusters that want to establish connections.
[0048] In this embodiment, the processor receives a configuration instruction issued by a user.
[0049] Step 204: Determine a primary cluster and a backup cluster from at least two clusters according to the cluster labels.
[0050] A cluster label refers to an identifier carried by the current configuration instruction. The identifier can be composed of at least one of letters, characters or numbers. The identifier is used to uniquely identify the corresponding cluster. The processor of this embodiment can determine the main cluster according to the label of the main cluster contained in the cluster label, and determine the backup cluster according to the label of the backup cluster contained in the cluster label.
[0051] There can only be one label corresponding to the primary cluster, and there can be multiple labels corresponding to the backup cluster. As an example, all clusters in this embodiment deploy the organization and the alliance chain network in succession, and pre-configure the cluster information through the configuration file, including the primary and backup relationship and the address of each cluster. For example, the one with the prime_cluster field is the primary cluster, and the others are backup clusters.
[0052] In this embodiment, the processor extracts the label of the primary cluster and the label of the standby cluster included in the configuration instruction, and matches the primary cluster and the standby cluster from at least two clusters according to the label of the primary cluster and the label of the standby cluster.
[0053] Step 206: According to the address information and port information included in the configuration information, cross-cluster communication configuration is performed on the active cluster and the standby cluster respectively.
[0054] In this embodiment, the processor extracts the address information and port information included in the configuration instruction, and configures the address information and port information into the primary cluster and the standby cluster, completing the cross-level cluster communication configuration so that the primary cluster and the standby cluster can communicate.
[0055] In the above cross-cluster communication deployment method, the processor deploys a consortium chain network based on a multi-cluster environment, which helps to achieve high availability and interoperability of multiple consortium chain networks, ensure the large-scale effective implementation and stable operation of applications, and further quickly and automatically complete the cross-cluster consortium chain network deployment through integrated configuration deployment, which greatly speeds up the large-scale implementation of applications and reduces the difficulty of underlying blockchain deployment, thereby speeding up cluster deployment efficiency.
[0056] In some optional embodiments, the consortium chain network has the following consortium chain network structure: consortium chain organization: an entity representing the service objects participating in the blockchain business network; consortium chain alliance: a collection of all organizations participating in a blockchain-based business collaboration or business transaction network. An alliance generally includes multiple organizations, and there may be no nodes of non-leader organizations; consortium chain organization nodes: nodes of organizations in the consortium chain network, which include peer nodes and orderer nodes. At the same time, the number of nodes of each type can be multiple, which can be specified by the user during deployment; consortium chain chain code gateway: a unified entry service for calling underlying blockchain node services.
[0057] In this embodiment, when any access port receives input parameter data, the processor first verifies the input parameter data. After the verification is successful, it performs a logical check to determine whether there is a consortium chain network structure corresponding to the input parameter data. If it exists, it will be checked in the library. If not, a new consortium chain network structure information is created, and it is determined whether the access port that received the input parameter data is the access port of the main cluster. If so, it is stored in the main cluster. If not, it is stored in the backup cluster. After the new consortium chain network structure information is successfully created, the new consortium chain network structure permission information is created, and a task is created to start a separate coroutine to complete the creation of the new consortium chain network structure. This process includes the generation of the signature key of the new consortium chain network structure and the status monitoring of the new consortium chain network structure.
[0058] In some optional embodiments, the cross-cluster database adopts master-slave synchronization and automatic fault switching, which ensures that the alliance (network) metadata, organization metadata, and on-chain account data can be accessed in multiple clusters in turn; and adopts Kubernetes containerized deployment, so the cross-cluster deployment environment in this embodiment needs to be a Kubernetes cluster; at the same time, the cluster uses shared storage, such as NAS.
[0059] like Figure 3 As shown, in some optional embodiments, the configuration instruction includes a forwarding node label corresponding to the main cluster and a forwarding node label corresponding to the standby cluster; each cluster includes at least one node; after step 204, it also includes: step 205, according to the forwarding node label corresponding to the main cluster, determine the forwarding node corresponding to the main cluster from the nodes included in the main cluster, according to the forwarding node label corresponding to the standby cluster, determine the forwarding node corresponding to the standby cluster from the nodes included in the standby cluster; the forwarding node is used to realize cross-cluster communication.
[0060] Multiple clusters only need to communicate with each other through forwarding nodes (orderer nodes). This embodiment implements intercommunication between orderer nodes in clusters by deploying ExternalIP type endpoints and services.
[0061] The forwarding node label refers to another identifier carried by the current configuration instruction. The identifier can be composed of at least one of letters, characters or numbers. The identifier is used to uniquely identify the node in the corresponding cluster.
[0062] The processor matches the corresponding node from the primary cluster as the orderer node of the primary cluster and the corresponding node from the standby cluster as the orderer node of the standby cluster according to the forwarding node label corresponding to the primary cluster and the forwarding node label corresponding to the standby cluster contained in the configuration instruction.
[0063] like Figure 4 As shown, in some optional embodiments, step 206 includes: step 2061, configuring the address corresponding to the main cluster contained in the address information as the access address of the forwarding node corresponding to the main cluster; configuring the port corresponding to the main cluster contained in the port information as the access port of the forwarding node corresponding to the main cluster; step 2062, configuring the address corresponding to the standby cluster contained in the address information as the access address of the forwarding node corresponding to the standby cluster; configuring the port corresponding to the standby cluster contained in the port information as the access port of the forwarding node corresponding to the standby cluster.
[0064] In this embodiment, the processor deploys orderer nodes, peer nodes and chaincode gateway services in the main cluster and the standby cluster in turn according to the specified parameters. The Kubernetes resource types that need to be deployed in the alliance network are statefulset, secret (including tls and msp), service, endpoints, and configmap.
[0065] As an example, when the processor configures the main cluster IDC1.Cluster1, the cluster only deploys the statefulset resources of the orderer node, that is, only configures the orderer node that provides actual services. The processor modifies the orderer address, service address and port in the configuration file of the orderer node according to the address corresponding to the main cluster contained in the address information and the port corresponding to the main cluster contained in the port information, and then performs actual access forwarding through the corresponding endpoints (used to store access addresses). The endpoints type of the orderer node in this cluster is IntermalIP, and the orderer node of the main cluster IDC1.Cluster1 can be accessed through internal + internal port. The endpoints type of the orderer node of the non-main cluster IDC1.Cluster1 is ExternalIP, and the orderer nodes of other clusters can be accessed through external ip (virtual machine ip of other cluster nodes) + external exposed port. Therefore, the node service of the main cluster IDC1.Cluster1 exposes the port to the outside, and the service type is NodePort.
[0066] In this embodiment, each cluster deploys a consortium chain management service. During deployment, you only need to call the consortium chain management service of one cluster to complete the deployment and management of the consortium chains of all clusters. The service can automatically call the consortium chain management service of the corresponding cluster in the primary and backup clusters in sequence through the cluster configuration file to complete the deployment and management of the consortium chain.
[0067] In some optional embodiments, the cross-cluster communication deployment method further includes: storing the signature keys corresponding to each standby cluster in the master cluster; and storing the signature keys corresponding to the master cluster in the standby cluster.
[0068] In this embodiment, the processor first configures the main cluster, saves the root certificate and certificate private key in the database of the main cluster, and then deploys it in the standby cluster in turn, pulls the CA root certificate and certificate private key from the database and creates the same organization. The Kubernetes resource types that the organization needs to deploy are statefulset, secret (including tls and msp), service, and endpoints.
[0069] In some optional embodiments, the cross-cluster communication deployment method also includes: obtaining a data acquisition request issued by a cluster; the data acquisition request includes a node identifier; according to the node identifier, matching a corresponding target forwarding node from the forwarding nodes of each cluster; controlling the target forwarding node to send the target data corresponding to the data acquisition request to the forwarding node of the cluster that issued the data acquisition request.
[0070] Data acquisition requests refer to cross-cluster data call requests.
[0071] The node identifier refers to an identifier carried in the current data acquisition request. The identifier may be composed of at least one of letters, characters or numbers, and is used to uniquely identify the corresponding forwarding node.
[0072] In some optional embodiments, the step of controlling the target forwarding node to send the target data corresponding to the data acquisition request to the forwarding node of the cluster that issued the data acquisition request includes: using the signature key stored in the cluster where the target forwarding node is located to sign the target data; controlling the target forwarding node to send the signed target data to the forwarding node of the cluster that issued the data acquisition request.
[0073] In this embodiment, the processor uses the signature key stored in the main cluster or the backup cluster to encrypt the data, thereby realizing encrypted communication of the data and ensuring the security of data transmission.
[0074] In the above cross-cluster communication deployment method, the processor can realize node intercommunication among multiple clusters and complete cluster configuration of the main cluster and the backup cluster at one time, thereby improving the configuration efficiency of multiple clusters, simplifying the operation and achieving extremely high efficiency.
[0075] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0076] Based on the same inventive concept, the embodiment of the present application also provides a memory data access device for implementing the cross-cluster communication deployment method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more cross-cluster communication deployment device embodiments provided below can refer to the above limitations on the cross-cluster communication deployment method, which will not be repeated here.
[0077] In one embodiment, Figure 5As shown, a cross-cluster communication deployment device 500 is provided, including: a receiving module 502, a determining module 504 and a configuring module 506, wherein: the receiving module 502 is used to receive a configuration instruction, the configuration instruction carries a cluster label and configuration information; the determining module 504 is used to determine a primary cluster and a backup cluster from at least two clusters according to the cluster label; the configuring module 506 is used to perform cross-cluster communication configuration for the primary cluster and the backup cluster according to the address information and port information contained in the configuration information.
[0078] like Figure 6 As shown, in some optional embodiments, the configuration instruction includes a forwarding node label corresponding to the main cluster and a forwarding node label corresponding to the standby cluster; each cluster includes at least one node; the cross-cluster communication deployment device 500 also includes: a node determination module 505, which is used to determine the forwarding node corresponding to the main cluster from the nodes included in the main cluster according to the forwarding node label corresponding to the main cluster, and determine the forwarding node corresponding to the standby cluster from the nodes included in the standby cluster according to the forwarding node label corresponding to the standby cluster; the forwarding node is used to realize cross-cluster communication.
[0079] like Figure 7 As shown, in some optional embodiments, the configuration module 506 includes: a first configuration unit 5061, which is used to configure the address corresponding to the main cluster contained in the address information as the access address of the forwarding node corresponding to the main cluster; and configure the port corresponding to the main cluster contained in the port information as the access port of the forwarding node corresponding to the main cluster; a second configuration unit 5062, which is used to configure the address corresponding to the standby cluster contained in the address information as the access address of the forwarding node corresponding to the standby cluster; and configure the port corresponding to the standby cluster contained in the port information as the access port of the forwarding node corresponding to the standby cluster.
[0080] In some optional embodiments, the cross-cluster communication deployment apparatus 500 is further configured to: store the signature key corresponding to each standby cluster in the master cluster; and store the signature key corresponding to the master cluster in the standby cluster.
[0081] In some optional embodiments, the cross-cluster communication deployment device 500 is also configured to: obtain a data acquisition request issued by a cluster; the data acquisition request includes a node identifier; according to the node identifier, match the corresponding target forwarding node from the forwarding nodes of each cluster; control the target forwarding node to send the target data corresponding to the data acquisition request to the forwarding node of the cluster that issued the data acquisition request.
[0082] In some optional embodiments, the cross-cluster communication deployment device 500 is also configured to: use the signature key stored in the cluster where the target forwarding node is located to sign the target data; control the target forwarding node to send the signed target data to the forwarding node of the cluster that issues the data acquisition request.
[0083] Each module in the above cross-cluster communication deployment device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module above.
[0084] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 8 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a cross-cluster communication deployment method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0085] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0086] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0087] Receive configuration instructions, which carry cluster labels and configuration information;
[0088] Determine the active cluster and standby cluster from at least two clusters based on cluster labels.
[0089] According to the address information and port information included in the configuration information, configure the cross-cluster communication for the active cluster and the standby cluster respectively.
[0090] In some optional embodiments, the configuration instruction includes a forwarding node label corresponding to the primary cluster and a forwarding node label corresponding to the standby cluster; each cluster includes at least one node;
[0091] When the computer program is executed by the processor, the following steps are also implemented:
[0092] According to the forwarding node label corresponding to the active cluster, the forwarding node corresponding to the active cluster is determined from the nodes included in the active cluster; according to the forwarding node label corresponding to the standby cluster, the forwarding node corresponding to the standby cluster is determined from the nodes included in the standby cluster; the forwarding node is used to realize cross-cluster communication.
[0093] In some optional embodiments, when the computer program is executed by the processor, the following steps are further implemented:
[0094] The address corresponding to the main cluster included in the address information is configured as the access address of the forwarding node corresponding to the main cluster; the port corresponding to the main cluster included in the port information is configured as the access port of the forwarding node corresponding to the main cluster;
[0095] The address corresponding to the standby cluster included in the address information is configured as the access address of the forwarding node corresponding to the standby cluster; and the port corresponding to the standby cluster included in the port information is configured as the access port of the forwarding node corresponding to the standby cluster.
[0096] In some optional embodiments, when the computer program is executed by the processor, the following steps are further implemented:
[0097] Store the signature keys corresponding to each standby cluster in the main cluster;
[0098] Store the signature key corresponding to the primary cluster in the standby cluster.
[0099] In some optional embodiments, when the computer program is executed by the processor, the following steps are further implemented:
[0100] Get the data acquisition request sent by the cluster; the data acquisition request includes a node identifier;
[0101] According to the node identifier, the corresponding target forwarding node is matched from the forwarding nodes of each cluster;
[0102] The target forwarding node is controlled to send the target data corresponding to the data acquisition request to the forwarding node of the cluster that issues the data acquisition request.
[0103] In some optional embodiments, when the computer program is executed by the processor, the following steps are further implemented:
[0104] Use the signature key stored in the cluster where the target forwarding node is located to sign the target data;
[0105] The target forwarding node is controlled to send the signed target data to the forwarding node of the cluster that issues the data acquisition request.
[0106] In one embodiment, a computer program product is provided, including a computer program, which implements the following steps when executed by a processor:
[0107] Receive configuration instructions, which carry cluster labels and configuration information;
[0108] Determine the active cluster and standby cluster from at least two clusters based on cluster labels.
[0109] According to the address information and port information included in the configuration information, configure the cross-cluster communication for the active cluster and the standby cluster respectively.
[0110] In some optional embodiments, the configuration instruction includes a forwarding node label corresponding to the primary cluster and a forwarding node label corresponding to the standby cluster; each cluster includes at least one node;
[0111] When the computer program is executed by the processor, the following steps are also implemented:
[0112] According to the forwarding node label corresponding to the active cluster, the forwarding node corresponding to the active cluster is determined from the nodes included in the active cluster; according to the forwarding node label corresponding to the standby cluster, the forwarding node corresponding to the standby cluster is determined from the nodes included in the standby cluster; the forwarding node is used to realize cross-cluster communication.
[0113] In some optional embodiments, when the computer program is executed by the processor, the following steps are further implemented:
[0114] The address corresponding to the main cluster included in the address information is configured as the access address of the forwarding node corresponding to the main cluster; the port corresponding to the main cluster included in the port information is configured as the access port of the forwarding node corresponding to the main cluster;
[0115] The address corresponding to the standby cluster included in the address information is configured as the access address of the forwarding node corresponding to the standby cluster; and the port corresponding to the standby cluster included in the port information is configured as the access port of the forwarding node corresponding to the standby cluster.
[0116] In some optional embodiments, when the computer program is executed by the processor, the following steps are further implemented:
[0117] Store the signature keys corresponding to each standby cluster in the main cluster;
[0118] Store the signature key corresponding to the primary cluster in the standby cluster.
[0119] In some optional embodiments, when the computer program is executed by the processor, the following steps are further implemented:
[0120] Get the data acquisition request sent by the cluster; the data acquisition request includes a node identifier;
[0121] According to the node identifier, the corresponding target forwarding node is matched from the forwarding nodes of each cluster;
[0122] The target forwarding node is controlled to send the target data corresponding to the data acquisition request to the forwarding node of the cluster that issues the data acquisition request.
[0123] In some optional embodiments, when the computer program is executed by the processor, the following steps are further implemented:
[0124] Use the signature key stored in the cluster where the target forwarding node is located to sign the target data;
[0125] The target forwarding node is controlled to send the signed target data to the forwarding node of the cluster that issues the data acquisition request.
[0126] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0127] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0128] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A cross-cluster communication deployment method, characterized in that: include: receiving a configuration instruction, wherein the configuration instruction carries a cluster label and configuration information; Determine a primary cluster and a backup cluster from at least two clusters according to the cluster label; The cluster deploys the organization and consortium chain networks in sequence; According to the address information and port information included in the configuration information, respectively, cross-cluster communication configuration is performed on the active cluster and the standby cluster; The configuration instruction includes a forwarding node label corresponding to the primary cluster and a forwarding node label corresponding to the standby cluster; Each of the clusters includes at least one node; After determining the primary cluster and the secondary cluster from at least two clusters according to the cluster label, the method further includes: According to the forwarding node label corresponding to the primary cluster, the forwarding node corresponding to the primary cluster is determined from the nodes included in the primary cluster; according to the forwarding node label corresponding to the standby cluster, the forwarding node corresponding to the standby cluster is determined from the nodes included in the standby cluster; the forwarding node is used to implement cross-cluster communication; according to the address information included in the configuration information, the cross-cluster communication configuration of the primary cluster and the standby cluster includes: The address corresponding to the main cluster included in the address information is configured as the access address of the forwarding node corresponding to the main cluster; the port corresponding to the main cluster included in the port information is configured as the access port of the forwarding node corresponding to the main cluster; The address corresponding to the standby cluster included in the address information is configured as the access address of the forwarding node corresponding to the standby cluster; the port corresponding to the standby cluster included in the port information is configured as the access port of the forwarding node corresponding to the standby cluster; When input parameter data is received and the input parameter data has a corresponding alliance chain network structure, if the input parameter data is received by the access port of the main cluster, the input parameter data is stored in the main cluster; otherwise, the input parameter data is stored in the backup cluster; the alliance chain network structure corresponding to the alliance chain network includes alliance chain organization, alliance chain alliance, alliance chain organization node, and alliance chain alliance gateway.
2. The method according to claim 1, characterized in that The method further comprises: Storing the signature keys corresponding to the standby clusters in the main cluster; The signature key corresponding to the primary cluster is stored in the standby cluster.
3. The method according to claim 2, characterized in that The method further comprises: Obtaining a data acquisition request issued by the cluster; the data acquisition request includes a node identifier; According to the node identifier, matching a corresponding target forwarding node from the forwarding nodes of each cluster; The target forwarding node is controlled to send the target data corresponding to the data acquisition request to the forwarding node of the cluster that issues the data acquisition request.
4. The method according to claim 3, characterized in that The controlling the target forwarding node to send the target data corresponding to the data acquisition request to the forwarding node of the cluster that issues the data acquisition request includes: The target data is signed using the signature key stored in the cluster where the target forwarding node is located; The target forwarding node is controlled to send the signed target data to the forwarding node of the cluster that issues the data acquisition request.
5. A cross-cluster communication deployment device, characterized in that: include: A receiving module, used to receive a configuration instruction, wherein the configuration instruction carries a cluster label and configuration information; A determination module, used to determine a primary cluster and a backup cluster from at least two clusters according to the cluster label; the clusters successively deploy organization and alliance chain networks; A configuration module, configured to perform cross-cluster communication configuration for the primary cluster and the standby cluster according to the address information and port information included in the configuration information; the configuration instruction includes a forwarding node label corresponding to the primary cluster and a forwarding node label corresponding to the standby cluster; Each of the clusters includes at least one node; The cross-cluster communication deployment device also includes: A node determination module, configured to determine the forwarding node corresponding to the primary cluster from the nodes included in the primary cluster according to the forwarding node label corresponding to the primary cluster, and to determine the forwarding node corresponding to the standby cluster from the nodes included in the standby cluster according to the forwarding node label corresponding to the standby cluster; the forwarding node is used to realize cross-cluster communication; the configuration module includes: A first configuration unit, configured to configure the address corresponding to the main cluster included in the address information as the access address of the forwarding node corresponding to the main cluster; and configure the port corresponding to the main cluster included in the port information as the access port of the forwarding node corresponding to the main cluster; A second configuration unit, configured to configure the address corresponding to the standby cluster included in the address information as the access address of the forwarding node corresponding to the standby cluster; and configure the port corresponding to the standby cluster included in the port information as the access port of the forwarding node corresponding to the standby cluster; The configuration module is also configured to: when input parameter data is received and the input parameter data has a corresponding alliance chain network structure, if the input parameter data is received by the access port of the main cluster, the input parameter data is stored in the main cluster; otherwise, the input parameter data is stored in the backup cluster; the alliance chain network structure corresponding to the alliance chain network includes an alliance chain organization, an alliance chain alliance, an alliance chain organization node, and an alliance chain alliance gateway.
6. The device according to claim 5, characterized in that The cross-cluster communication deployment device is also configured to: Storing the signature keys corresponding to the standby clusters in the main cluster; The signature key corresponding to the primary cluster is stored in the standby cluster.
7. The device according to claim 5, characterized in that The cross-cluster communication deployment device is also configured to: Obtaining a data acquisition request issued by the cluster; the data acquisition request includes a node identifier; According to the node identifier, matching a corresponding target forwarding node from the forwarding nodes of each cluster; The target forwarding node is controlled to send the target data corresponding to the data acquisition request to the forwarding node of the cluster that issues the data acquisition request.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the cross-cluster communication deployment method according to any one of claims 1 to 4 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the cross-cluster communication deployment method according to any one of claims 1 to 4 are implemented.
10. A computer device comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the cross-cluster communication deployment method described in any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Cluster deployment method and device, computer equipment and storage medium
CN112527507A
Multi-tenant cross-cluster networking method, communication system and readable storage medium
CN114157668A