Alliance chain node management device, system, method, electronic device and storage medium
Through the alliance chain management platform, forwarding interface and target host driver, the target alliance chain nodes are directly managed, which solves the problem of increasing complexity of dynamic libraries and host agents in the existing technology, and achieves the effect of simplifying deployment and improving adaptability.
Patent Information
- Application Number
- CN202211541741.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-02
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2042-12-02
AI Technical Summary
In the prior art, it is necessary to create dynamic libraries for different types of blockchain underlying platforms, and to create general host agents, which increases the complexity of deployment and the problem of long communication lines.
Through the alliance chain management platform, forwarding interface and target host driver, control instructions for the target alliance chain node are generated and forwarded to the target host driver to achieve management of the target alliance chain node.
Eliminates the need to create chain dynamic libraries and general host agents, which simplifies the deployment process, reduces communication complexity, and supports multiple host environments, improving system adaptability.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of blockchain technology, and in particular to a consortium chain node management device, system, method, electronic device and storage medium. Background Art
[0002] For alliance chain nodes, their lifecycle needs to be managed in terms of operation and maintenance, such as creation, start, stop, restart, configuration update, etc. For a mature Baas application, it is necessary to support different types of alliance chains (hyperchain, fabric, etc.) deployed on different types of host environments (physical machines, virtual machines, docker containers, k8s clusters, etc.). Although the commands issued for lifecycle management are consistent at the Baas level, the execution logic and required parameters are completely different, and the operations are completely different for different host environments.
[0003] A consortium chain management platform (Baas platform) needs to manage multiple consortium chains (such as hyperchain, fabric, bcos) and needs to manage multiple chains at the same time. In related technologies, the way that the Baas platform manages multiple chains is to use a pluggable chain driver, a general host agent, and a chain dynamic library to work together to achieve the life cycle management of the consortium chain. That is, after sending the designated chain driver, the general host agent loads the chain dynamic library to complete the required operation. For example, to deploy a hyperchain node, you first need a host environment, install a general agent on the host environment, and then make a hyperchain dynamic library. When the instruction is issued, the host general agent loads the chain dynamic library to complete the required operation.
[0004] The above management method requires the production of dynamic libraries for different types of blockchain underlying platforms and the production of a universal host agent, which increases the complexity of deployment and lengthens the communication lines. Summary of the invention
[0005] The present application provides a consortium chain node management device, system, method, electronic device and storage medium to solve the problems in the prior art of making dynamic libraries of different types of blockchain underlying platforms and needing to make a universal host agent, which increases the complexity of deployment and the long communication lines.
[0006] In a first aspect, an embodiment of the present application provides a consortium chain node management device, including: a consortium chain management platform, a forwarding interface, and a target host driver;
[0007] The alliance chain management platform is used to generate control instructions for the target alliance chain node;
[0008] The forwarding interface is used to forward the control instruction to the target host driver;
[0009] The target host driver is used to manage the target alliance chain node based on the control instruction.
[0010] Optionally, the alliance chain management platform includes: a baas platform and a target chain driver:
[0011] The Baas platform is used to generate form data of management requirements of the target alliance chain node and send the form data to the target chain driver;
[0012] The target chain driver is used to generate the control instruction based on the form data.
[0013] Optionally, the target chain driver is specifically used for:
[0014] Obtaining the form data;
[0015] Obtaining the operating environment of the target chain driver;
[0016] The control instruction is generated based on the form data and the operating environment.
[0017] Optionally, the forwarding interface is specifically used for:
[0018] Acquire a correspondence between a chain driver and a host driver, wherein the chain driver and the host driver having the correspondence have the same operating environment;
[0019] Determine the target host driver corresponding to the target chain driver based on the corresponding relationship;
[0020] The control instruction is forwarded to the target host driver.
[0021] Optionally, the forwarding interface is specifically used for:
[0022] Extracting a target control parameter from the control instruction, where the target control parameter is a parameter indicating management of the target alliance chain node;
[0023] The target control parameters are sent to the target host driver.
[0024] Optionally, the target host driver is further used to:
[0025] Sending the management result of the target alliance chain node to the forwarding interface;
[0026] The forwarding interface is also used to send the management result to the alliance chain management platform.
[0027] In a second aspect, an embodiment of the present application provides a consortium chain node management system, including: a consortium chain node platform and the consortium chain node management device described in the first aspect;
[0028] The alliance chain management device is used to manage the target alliance chain node in the alliance chain node platform.
[0029] In a third aspect, an embodiment of the present application provides a consortium chain node management method, which is applied to a consortium chain node management device, including:
[0030] Generate control instructions for the target alliance chain node;
[0031] forwarding the control instruction to a target host driver;
[0032] The target alliance chain node is managed based on the control instruction.
[0033] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;
[0034] The memory is used to store computer programs;
[0035] The processor is used to execute the program stored in the memory to implement the alliance chain node management method described in the first aspect.
[0036] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the alliance chain node management method described in the first aspect.
[0037] The above technical solution provided by the embodiment of the present application has the following advantages over the prior art: the method provided by the embodiment of the present application, through the alliance chain management platform, forwarding interface and target host driver; the alliance chain management platform is used to generate control instructions for the target alliance chain node; the forwarding interface is used to forward the control instructions to the target host driver; the target host driver is used to manage the target alliance chain node based on the control instructions. In this way, there is no need to make a chain dynamic library and a general host agent. By setting a forwarding interface, the control instructions generated by the alliance chain management platform are directly forwarded to the target host driver, thereby realizing the management of the target alliance chain. In addition, by using the form of a forwarding interface, instead of the chain dynamic library and the host agent, the complexity of deployment and the communication line can be reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0039] In order to more clearly illustrate the embodiments of the present invention 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, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0040] Figure 1 A structural diagram of a consortium chain node management device provided in one embodiment of the present application;
[0041] Figure 2 A structural diagram of a consortium chain node management device provided in another embodiment of the present application;
[0042] Figure 3 A structural diagram of a consortium chain node management system provided in one embodiment of the present application;
[0043] Figure 4 A flowchart of a consortium chain node management method provided in one embodiment of the present application;
[0044] Figure 5 A structural diagram of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are 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 making creative work are within the scope of protection of this application.
[0046] Before further describing the embodiments of the present invention in detail, the nouns and terms involved in the embodiments of the present invention are described. The nouns and terms involved in the embodiments of the present invention are subject to the following explanations.
[0047] Transaction is equivalent to the computer term "transaction". Transaction includes operations that need to be submitted to the blockchain network for execution, and does not only refer to transactions in a business context. In view of the fact that the term "transaction" is commonly used in blockchain technology, the embodiments of the present invention follow this convention.
[0048] For example, the Deploy transaction is used to install the specified smart contract to the nodes in the blockchain network and prepare it to be called; the Invoke transaction is used to append transaction records to the blockchain by calling the smart contract and perform operations on the blockchain's state database, including update operations (including adding, deleting, and modifying key-value pairs in the state database) and query operations (i.e. querying key-value pairs in the state database).
[0049] Consortium chain: A blockchain whose consensus process is controlled by pre-selected nodes. Common consortium chains include hyperchain, fabric, bcos, etc.
[0050] Agent: A software that can accept instructions from the outside world and perform corresponding operations in a certain environment.
[0051] Dynamic library: Dynamic Link Library, a way to implement the concept of shared function library, such as files ending with .dll or .so. With dynamic library, a process can call functions that are not part of its executable code.
[0052] Chain driver: An executable program that can run on the alliance chain management platform and whose life cycle is controlled by the alliance chain management platform. It can provide web pages to the alliance chain management platform.
[0053] Host driver: An executable program that can run on the consortium chain management platform and whose life cycle is controlled by the consortium chain management platform. It can provide web pages to the host management platform.
[0054] An embodiment of the present application provides a consortium chain node management device. Figure 1 , the device includes: an alliance chain management platform 101, a forwarding interface 102 and a target host driver 103;
[0055] The alliance chain management platform is used to generate control instructions for the target alliance chain node;
[0056] The forwarding interface is used to forward the control instruction to the target host driver;
[0057] The target host driver is used to manage the target alliance chain node based on the control instruction.
[0058] In some embodiments, the alliance chain may be, but is not limited to, hyperchain, fabric, and bcos. The management of alliance chain nodes may include, but is not limited to, alliance chain deployment, alliance chain node deletion, and alliance chain node addition.
[0059] Among them, see Figure 2, the alliance chain management platform usually includes the baas platform and the target chain driver:
[0060] The Baas platform is used to generate form data of management requirements of the target alliance chain node and send the form data to the target chain driver;
[0061] The target chain driver is used to generate the control instruction based on the form data.
[0062] Among them, the BaaS platform is a platform that provides deployment and configuration of alliance chain nodes under multiple institutions in a specific network environment, and realizes the management of nodes of each institution.
[0063] When relevant personnel need to manage the target alliance chain, they can input management requirements through the Baas platform, so that the Baas platform generates form data of the target alliance chain node management requirements, and then sends the form data to the target chain driver.
[0064] Specifically, the BaaS platform may include, but is not limited to, a management platform front-end page. The management platform front-end page displays the demand button for users to view and click on the relevant demand button, so that the management platform front-end page obtains the user's management demand. The management demand may include, but is not limited to, alliance chain deployment, alliance chain node deletion, and alliance chain node addition. The management demand is obtained by the user by clicking on the relevant demand button on the alliance chain management platform page. The form data can be generated by the alliance chain management platform according to the page information and filled-in content after the user clicks the demand button and fills in the relevant page displayed by the alliance chain management platform.
[0065] In an optional embodiment, the target chain driver can generate control instructions based on the form data, and then send the control instructions to the forwarding interface. The chain driver generates relevant instructions for managing the life cycle, and directly calls the forwarding interface of the host driver to achieve the management of the alliance chain life cycle.
[0066] Furthermore, the target chain driver is specifically used to: obtain the form data; obtain the operating environment of the target chain driver; and generate the control instruction based on the form data and the operating environment.
[0067] The operating environments of different chain drivers may be different. When the operating environments are different, the generated control instructions are also different.
[0068] The operating environment includes k8s (Kubernetes) environment, physical environment (such as physical machine), docker (container) environment, etc. Correspondingly, in the physical environment, the control instructions generated by the chain driver are in the form of shell scripts; in the k8s environment, the control instructions generated by the chain driver are in the form of k8s yaml files; in the docker environment, the control instructions generated by the chain driver are in the form of docker-compose files.
[0069] In an optional embodiment, the forwarding interface is specifically used for:
[0070] The corresponding relationship between the chain driver and the host driver is obtained, wherein the chain driver having the corresponding relationship has the same operating environment as the host driver; the target host driver corresponding to the target chain driver is determined based on the corresponding relationship; and the control instruction is forwarded to the target host driver.
[0071] In some embodiments, the chain driver and the host driver are usually deployed in the same operating environment, and the chain driver and the host driver in the same operating environment are bound through the alliance chain management service system. For example, the device IDs of the two can be stored correspondingly.
[0072] After obtaining the control instruction, the forwarding interface obtains the device ID of the target chain driver that sends the control instruction, obtains the device ID of the target host driver bound to the device ID from the alliance chain management service system, and then forwards the control instruction to the target host driver.
[0073] In an optional embodiment, the forwarding interface is specifically used for:
[0074] Extracting a target control parameter from the control instruction, the target control parameter is a parameter indicating management of the target alliance chain node; and sending the target control parameter to the target host driver.
[0075] Since the chain drivers of different operating environments are connected to the host driver through the forwarding interface, the control instructions transmitted by the chain drivers will also be different. Based on this, the forwarding interface has a certain adaptability so that when different chain drivers send control instructions, they can be forwarded to the corresponding host driver.
[0076] The target control parameter may include, but is not limited to, an execution command and a command parameter of the execution command. For example, if the execution command is to delete a node, the command parameter may be the name of the node to be deleted; if the execution command is to deploy a node, the command parameter may be the type and number of nodes to be deployed.
[0077] In an alternative embodiment, see Figure 2 , the target host driver is further used to:
[0078] The management result of the target alliance chain node 104 is sent to the forwarding interface; the forwarding interface is also used to send the management result to the alliance chain management platform.
[0079] In order to better monitor the management of alliance chain nodes, the target host driver can also send the management results to the forwarding interface, so as to feed back the management results to the alliance chain management platform through the forwarding interface, so that relevant personnel can understand the management status of alliance chain nodes in real time through the alliance chain management platform.
[0080] Specifically, the forwarding interface extracts parameters such as whether the command is executed correctly and the execution results from the management results, and then sends the extracted parameters to the alliance chain management platform.
[0081] The alliance chain node management device in this application uses a pluggable chain driver and a host driver + a general chain driver to connect the host driver's bridge command interface to implement various complex life cycle management operations on the alliance chain node. By implementing a general command interface, issuing instructions and related parameters in the chain driver, calling the command interface in real time, and completing the life cycle management of the alliance chain by the corresponding host driver management and control resource method. There is no need to make dynamic libraries of different types of blockchain underlying platforms, the deployment is simple, the data link is simple, and it can support large-scale concurrent operations. There is no need for complex compilation, and all logic can be debugged directly at the code level, which greatly improves development efficiency and troubleshooting time. It can support multiple host environments, improve the adaptability of the system, and achieve the effect of ignoring differences in host environments. For different host environments, for the chain driver, only one set of logic needs to be written, and it can support the consensus networking of alliance chain nodes deployed on different host environments.
[0082] Based on the same concept, an alliance chain node management system is provided in the embodiment of the present application. The specific implementation of the system can be found in the description of the device embodiment part, and the repeated parts will not be repeated. Figure 3 As shown, the system mainly includes:
[0083] The alliance chain node platform 302 and the alliance chain node management device 301 described in the above embodiment; the alliance chain management device is used to manage the target alliance chain node in the alliance chain node platform.
[0084] Based on the same concept, an embodiment of the present application provides a consortium chain node management method, which can be applied to any form of electronic device, such as the consortium chain node management system and consortium chain node management device mentioned above. Figure 4 As shown, the alliance chain node management method includes:
[0085] Step 401: Generate control instructions for the target alliance chain node;
[0086] Step 402: forwarding the control instruction to the target host driver;
[0087] Step 403: Manage the target alliance chain node based on the control instruction.
[0088] Based on the same concept, an electronic device is also provided in the embodiment of the present application, such as Figure 5 As shown, the electronic device mainly includes: a processor 501, a memory 502 and a communication bus 503, wherein the processor 501 and the memory 502 communicate with each other through the communication bus 503. The memory 502 stores a program executable by the processor 501, and the processor 501 executes the program stored in the memory 502 to implement the following steps:
[0089] Generate control instructions for the target alliance chain node;
[0090] forwarding the control instruction to a target host driver;
[0091] The target alliance chain node is managed based on the control instruction.
[0092] The communication bus 503 mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus 503 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0093] The memory 502 may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Alternatively, the memory may also be at least one storage device located away from the processor 501 .
[0094] The above-mentioned processor 501 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc., and can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0095] In another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program runs on a computer, the computer executes the alliance chain node management method described in the above embodiment.
[0096] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instruction is loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instruction can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instruction is transmitted from a website site, a computer, a server or a data center by wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, a data center, etc. that contains one or more available media integration. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape, etc.), an optical medium (such as a DVD) or a semiconductor medium (such as a solid-state hard disk), etc.
[0097] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, 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 "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0098] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A consortium chain node management device, characterized in that: include: Alliance chain management platform, forwarding interface and target host driver; The alliance chain management platform is used to generate control instructions for the target alliance chain node. The alliance chain management platform includes: a baas platform and a target chain driver: the baas platform is used to generate form data of management requirements for the target alliance chain node and send the form data to the target chain driver; the target chain driver is used to generate the control instructions based on the form data; The forwarding interface is used to forward the control instruction to the target host driver, including: obtaining the corresponding relationship between the chain driver and the host driver, the chain driver with the corresponding relationship has the same operating environment as the host driver; determining the target host driver corresponding to the target chain driver based on the corresponding relationship; forwarding the control instruction to the target host driver; the corresponding relationship is predetermined in the following manner: storing the device ID of the chain driver and the device ID of the host driver in the same operating environment in correspondence, and determining the corresponding relationship between the chain driver and the host driver; The target host driver is used to manage the target alliance chain node based on the control instruction.
2. The alliance chain node management device according to claim 1, characterized in that: The target chain driver is specifically used for: Obtaining the form data; Obtaining the operating environment of the target chain driver; The control instruction is generated based on the form data and the operating environment.
3. The alliance chain node management device according to claim 1, characterized in that: The forwarding interface is specifically used for: Extracting a target control parameter from the control instruction, where the target control parameter is a parameter indicating management of the target alliance chain node; The target control parameters are sent to the target host driver.
4. The alliance chain node management device according to claim 1, characterized in that: The target host driver is also used for: Sending the management result of the target alliance chain node to the forwarding interface; The forwarding interface is also used to send the management result to the alliance chain management platform.
5. A consortium chain node management system, characterized in that: include: A consortium chain node platform and a consortium chain node management device as described in any one of claims 1 to 4; The alliance chain management device is used to manage the target alliance chain node in the alliance chain node platform.
6. A consortium chain node management method, characterized in that: Applied to alliance chain node management devices, including: The alliance chain management platform generates a control instruction for the target alliance chain node, and the alliance chain management platform includes: a baas platform and a target chain driver; the baas platform generates form data of the management requirements of the target alliance chain node, and sends the form data to the target chain driver; the target chain driver generates the control instruction based on the form data; The forwarding interface forwards the control instruction to the target host driver, including: obtaining the corresponding relationship between the chain driver and the host driver, the chain driver with the corresponding relationship has the same operating environment as the host driver; determining the target host driver corresponding to the target chain driver based on the corresponding relationship; forwarding the control instruction to the target host driver; the corresponding relationship is predetermined in the following manner: storing the device ID of the chain driver and the device ID of the host driver in the same operating environment in correspondence, and determining the corresponding relationship between the chain driver and the host driver; The target host driver manages the target alliance chain node based on the control instruction.
7. An electronic device, characterized in that: include: A processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; The memory is used to store computer programs; The processor is used to execute the program stored in the memory to implement the alliance chain node management method described in claim 6.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the alliance chain node management method described in claim 6 is implemented.
Citation Information
Patent Citations
Alliance chain node management system, method and device, electronic equipment and storage medium
CN112702200A