Blockchain management method and apparatus, server, and medium
By receiving management requests, sending management procedures, and establishing communication connections, the problem of low efficiency in blockchain management is solved, enabling efficient and non-intrusive remote management of blockchains and supporting unified management of various underlying types.
Patent Information
- Application Number
- CN202210634729.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-07
- Publication Date
- 2026-01-16
- Estimated Expiration
- 2042-06-07
AI Technical Summary
Existing technologies cannot effectively unify the management of multiple blockchains, resulting in low blockchain management efficiency.
By receiving management requests from users, sending management programs to obtain node parameter information, establishing communication connections, and performing remote management without changing the operating state of the chain to be managed, the system utilizes pre-stored drivers to adapt to different underlying blockchain types, thereby enabling the management of homogeneous and heterogeneous chains.
It enables efficient and non-intrusive remote management of blockchain, improving management efficiency and speed, and supporting unified management of various underlying blockchain types.
Smart Images

Figure CN115203165B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of computers, and particularly relates to a blockchain management method and device, a server and a medium. BACKGROUND
[0002] A blockchain is a distributed shared ledger and database, and has the characteristics of decentralization, non-tamperability, full traceability, collective maintenance, openness and transparency. In practice, a blockchain usually has multiple blockchain nodes, the data stored on each blockchain node is the same, and each blockchain node usually has a complete ledger.
[0003] In related technologies, with the development of science and technology, the types and number of blockchains are increasing. In order to effectively utilize the increasingly rich blockchains, it is necessary to uniformly manage each blockchain. SUMMARY
[0004] The embodiments of the present application provide a blockchain management method, device, server and medium, aiming at solving the problem that each blockchain cannot be uniformly managed in related technologies.
[0005] In a first aspect, the embodiments of the present application provide a blockchain management method, which comprises:
[0006] When receiving a management request input by a target user terminal, a management program corresponding to the management request is sent to the target user terminal, the management program is used to obtain node parameter information of a to-be-managed chain and return the node parameter information to a target server, and the node parameter information comprises a node certificate;
[0007] The target user terminal is controlled to run the management program on a preset path of the to-be-managed chain, and the node parameter information returned by the management program is received;
[0008] According to the node parameter information, a communication connection is established with the to-be-managed chain, and when the communication connection is successfully established, it is determined that the target server successfully manages the to-be-managed chain.
[0009] In some embodiments, after it is determined that the target server successfully manages the to-be-managed chain, the method further comprises:
[0010] Operation management information input for the to-be-managed chain is received, a target operation adapted to the operation management information is performed on the to-be-managed chain, and an operation result is visually presented;
[0011] The operation management information is used to instruct to perform the target operation on the to-be-managed chain, and the target operation comprises: viewing transaction data, viewing node status, deploying a smart contract, and deleting the to-be-managed chain.
[0012] In some embodiments, after determining that the target server successfully manages the to-be-managed chain, the method further comprises: obtaining transaction data from the to-be-managed chain according to a preset round-robin cycle, and storing the obtained transaction data in the storage server;
[0013] When the target operation is to view transaction data, the target operation is performed on the to-be-managed chain according to the operation management information, and the operation result is visually presented, comprising: extracting transaction data from the storage server according to the operation management information, and visually presenting the extracted transaction data.
[0014] In some embodiments, the target server comprises a visualization operation module, a core module and a driver module.
[0015] The operation management information input for the to-be-managed chain is received, and the target operation is performed on the to-be-managed chain according to the operation management information, comprising:
[0016] The visualization operation module receives the operation management information and transmits the operation management information to the core module.
[0017] The core module transmits the operation management information to the driver module when the driver module is in an awakened state.
[0018] The driver module analyzes the operation management information, generates operation instructions for controlling the to-be-managed chain to perform the target operation according to the analysis result, and sends the operation instructions to the to-be-managed chain.
[0019] In some embodiments, the target user terminal is sent a management program corresponding to the management request, comprising:
[0020] When the bottom layer type information of the to-be-managed chain is included in the management request, a management program matching the bottom layer type information is generated, and the management program is sent to the target user terminal.
[0021] In some embodiments, a communication connection is established with the to-be-managed chain according to the node parameter information, comprising:
[0022] Based on the pre-stored driver program corresponding to the bottom layer type information of the to-be-managed chain, a connection establishment request including a node certificate is sent to the to-be-managed chain, wherein the connection establishment request is used to trigger the to-be-managed chain to establish a communication connection with the target server after the node certificate is verified.
[0023] In some embodiments, the to-be-managed chain comprises: a homogeneous chain with the same bottom layer type as the target server, and a heterogeneous chain with a different bottom layer type from the target server.
[0024] In a second aspect, the embodiments of the present application provide a block chain management device, which comprises:
[0025] The data interaction unit is configured to send a subentry program corresponding to the subentry request to the target user terminal when receiving the subentry request input by the target user terminal, and the subentry program is configured to acquire node parameter information of the chain to be managed and return the node parameter information to the target server, and the node parameter information comprises node credentials.
[0026] The running control unit is configured to control the target user terminal to run the subentry program on the preset path of the chain to be managed, and receive the node parameter information returned by the subentry program.
[0027] The subentry execution unit is configured to establish a communication connection with the chain to be managed according to the node parameter information, and determine that the target server successfully subenters the chain to be managed when the communication connection is successfully established.
[0028] In some embodiments, the device further comprises an operation execution unit. The operation execution unit is configured to receive operation management information input for the chain to be managed, execute a target operation on the chain to be managed according to the operation management information, and visually present the operation result.
[0029] The operation management information is configured to instruct to execute the target operation on the chain to be managed, and the target operation comprises viewing transaction data, viewing node status, deploying a smart contract, and deleting the chain to be managed.
[0030] In some embodiments, the device further comprises a data storage unit. The data storage unit is configured to acquire transaction data from the chain to be managed according to a preset round-trip cycle, and store the acquired transaction data in a storage server.
[0031] When the target operation is to view the transaction data, the above-mentioned execution of the target operation on the chain to be managed according to the operation management information and the visual presentation of the operation result comprise extracting transaction data corresponding to the operation management information from the storage server, and visually presenting the extracted transaction data.
[0032] In some embodiments, the target server comprises a visual operation module, a core module and a driving module. The above-mentioned receiving of the operation management information input for the chain to be managed and the execution of the target operation on the chain to be managed according to the operation management information comprise:
[0033] The visual operation module receives the operation management information and transmits the operation management information to the core module.
[0034] The core module transmits the operation management information to the driving module when the driving module is in a wake-up state.
[0035] The driving module analyzes the operation management information, generates an operation instruction for controlling the chain to be managed to execute the target operation according to the analysis result, and sends the operation instruction to the chain to be managed.
[0036] In some embodiments, in the data interaction unit, sending, to the target user terminal, a management program corresponding to the management request comprises: when the bottom-layer type information of the to-be-managed chain is included in the management request, generating the management program matched with the bottom-layer type information, and sending the management program to the target user terminal.
[0037] In some embodiments, in the management execution unit, establishing a communication connection with the to-be-managed chain according to the node parameter information comprises: based on the pre-stored driver corresponding to the bottom-layer type information of the to-be-managed chain, sending, to the to-be-managed chain, a connection establishment request including the node certificate, wherein the connection establishment request is used to trigger the to-be-managed chain to establish a communication connection with the target server after the node certificate is verified.
[0038] In some embodiments, the to-be-managed chain comprises: a homogeneous chain with the same bottom-layer type as the target server, or a heterogeneous chain with a different bottom-layer type from the target server.
[0039] In a third aspect, an embodiment of the present application provides a server, comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and the processor implements the steps of any of the above block chain management methods when executing the computer program.
[0040] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program implements the steps of any of the above block chain management methods when executed by a processor.
[0041] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when running on a server, causes the server to execute any of the above block chain management methods.
[0042] Compared with the related art, the beneficial effects of the embodiments of the present application are that the target server can automatically remotely manage the to-be-managed chain, and in the case that the to-be-managed chain is already running, the to-be-managed chain can be managed without changing the existing running state of the to-be-managed chain, the to-be-managed chain can be remotely managed in a non-intrusive manner, and the speed of managing the to-be-managed chain can be accelerated, thereby helping to improve the efficiency of managing the block chain.
[0043] It can be understood that the beneficial effects of the above-mentioned second aspect to fifth aspect can be referred to the related description in the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or related description will be briefly introduced. Obviously, the drawings in the following description only constitute some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative effort based on these drawings.
[0045] Figure 1 is a flowchart of a blockchain management method provided by an embodiment of the present application;
[0046] Figure 2 is a flowchart of a blockchain management method provided by another embodiment of the present application;
[0047] Figure 3 is a structural diagram of a target server provided by an embodiment of the present application;
[0048] Figure 4 is a flowchart of a blockchain management method provided by still another embodiment of the present application;
[0049] Figure 5 is a structural diagram of a blockchain management device provided by an embodiment of the present application;
[0050] Figure 6 is a structural diagram of a server provided by an embodiment of the present application. DETAILED DESCRIPTION
[0051] In the following description, specific details are set forth in order to provide a thorough understanding of embodiments of the present application. However, persons of ordinary skill in the art will readily recognize that embodiments of the present application can be practiced without these specific details. In other instances, well-known structures, devices, circuits, and methods have not been described in detail in order to avoid obscuring the present application.
[0052] It should be understood that, when used in the specification and the appended claims of the present application, the term "comprising" indicates the presence of the described features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0053] It should also be understood that the term "and / or" used in the specification and the appended claims of the present application means any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.
[0054] As used in the specification and the appended claims herein, the term “if’ can be interpreted as meaning “when” or “upon” or “in response to determining” or “in response to detecting” depending on the context. Similarly, the phrase “if it is determined” or “if [the described condition or event] is detected” can be interpreted as meaning “upon determining” or “in response to determining” or “upon detecting [the described condition or event]” or “in response to detecting [the described condition or event]” depending on the context.
[0055] In addition, in the description of the present application and the appended claims, the terms “first”, “second”, “third”, etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0056] In the present application, the reference “one embodiment” or “some embodiments” and the like means that the specific features, structures or characteristics described in connection with the embodiment are included in one or more embodiments of the present application. Therefore, the statements “in one embodiment”, “in some embodiments”, “in other some embodiments”, “in further some embodiments” and the like appearing in different places in the specification are not necessarily all referring to the same embodiment, but mean “one or more but not all embodiments”, unless otherwise specifically emphasized. The terms “include”, “contain”, “have” and their variants mean “include but not limited to”, unless otherwise specifically emphasized.
[0057] In order to illustrate the technical solutions of the present application, the following embodiments are described below.
[0058] Continuing to refer to Figure 1 The present application provides a blockchain management method, comprising:
[0059] Step 101, when receiving a request for management input by a target user terminal, sending a management program corresponding to the request for management to the target user terminal.
[0060] The management program is used to obtain node parameter information of the chain to be managed and return the node parameter information to the target server, and the node parameter information includes node certificate.
[0061] The chain to be managed is usually a blockchain that needs to be managed. The node parameter information is usually the parameter information of the blockchain node on the chain to be managed. In practice, the node parameter information can include but is not limited to node certificate, node address, node consensus mode information indicating the node consensus mode, identification information of the chain to be managed, underlying type information indicating the underlying type of the chain to be managed, etc.
[0062] The target server is usually a server for managing a blockchain. In practice, the target server is usually a Blockchain as a Service (BaaS). The BaaS is a blockchain open platform that embeds a blockchain framework in a cloud computing server, uses the deployment and management advantages of the infrastructure in the cloud computing server, provides a convenient and high-performance blockchain ecological environment and ecological supporting services for developers, and supports the business expansion and operation support of the developers.
[0063] The target user terminal is usually a pre-set user terminal. In practice, the target user terminal can be a terminal device or a server. The management request is usually information for requesting management of the to-be-managed chain. In practice, the management request can be "yes-A", "Managed-A", or "Managed-A", for requesting management of the to-be-managed chain A. The specific form of the management request is not limited in the embodiment.
[0064] In the embodiment, the subject of the blockchain management method can be a server for managing a blockchain, such as the target server. The subject can receive a management request sent by a target user terminal through a network, and then return a management program corresponding to the management request to the target user terminal through the network.
[0065] In practice, the management program can be a pre-stored program. The management program can also be a program generated by the target server using at least part of the information in the management request and a pre-set program template after receiving the management request. For example, if the management request includes the underlying type information of the to-be-managed chain, the target server can write the underlying type information of the to-be-managed chain into the program template to generate the management program.
[0066] In practice, the management program usually records the server address of the target server. In this way, the management program can use the server address to return the node parameter information obtained from the to-be-managed chain to the target server.
[0067] Step 102, controlling the target user terminal to run the management program in a pre-set path of the to-be-managed chain, and receiving the node parameter information returned by the management program.
[0068] The pre-set path is usually a pre-set path. In practice, the pre-set path is usually the root directory of the blockchain node of the to-be-managed chain. In actual application, the target user terminal can interact with a blockchain node of the to-be-managed chain through a network, send the management program to the blockchain node, and instruct the blockchain node to run the management program in the root directory.
[0069] In practice, the target server can send a control instruction to the target user end, where the control instruction is used to control the target user end to place the subordinating program under the preset path of the chain to be managed. In practice, the server address of the target server is usually recorded in the subordinating program. The subordinating program can use the server address to return the node parameter information obtained from the chain to be managed to the target server. In this way, the target server can receive the node parameter information returned by the subordinating program.
[0070] In step 103, a communication connection is established according to the node parameter information and the chain to be managed, and when the communication connection is successfully established, it is determined that the target server successfully subordinates the chain to be managed.
[0071] Here, the target server can obtain the node address of the chain to be managed. As an example, when the target server receives the node parameter information returned by the subordinating program, the node address of the chain to be managed can be obtained by analyzing the source address of the node parameter information. As another example, when the node address is included in the node parameter, the target server can extract the node address of the chain to be managed from the node parameter information.
[0072] Subsequently, the target server can send a connection establishment request including a node certificate to the chain to be managed through the node address. In this way, the chain to be managed can verify the node certificate in the connection establishment request, and if the verification is passed, the chain to be managed can establish a communication connection with the target server. The connection establishment request is used to trigger the chain to be managed to establish a communication connection with the target server after the node certificate verification is passed. In actual application, the connection methods supported by different underlying types of chains to be managed usually differ, and the parameters included in the connection establishment request also differ. For example, for the chain to be managed with the underlying type of hyperchain underlying, the node certificate needs to be included in the connection establishment request. For the chain to be managed with the underlying type of fabric underlying, the node consensus method information also needs to be included in the connection establishment request. Here, sending the connection establishment request conforming to the connection method to the chain to be managed can realize the connection of the chain to be managed in the connection method supported by the chain to be managed.
[0073] In practice, after the chain to be managed determines to establish a communication connection with the target server, the chain to be managed usually sends indication information to the target server to indicate that the connection has been established. In this way, the target server can determine that the chain to be managed and the target server have successfully established a communication connection based on the indication information.
[0074] When the communication connection between the chain to be managed and the target server is established, the target server can consider that the chain to be managed has been successfully subordinated.
[0075] The method provided in the embodiment can automatically remotely manage the to-be-managed chain by the target server. In the case that the to-be-managed chain has been running, the to-be-managed chain can be managed without changing the existing running state of the to-be-managed chain, the to-be-managed chain can be remotely managed in a non-intrusive manner, and the speed of managing the to-be-managed chain can be accelerated, thereby helping to improve the efficiency of managing the block chain.
[0076] In some optional implementation of the embodiment, the sending of the management program corresponding to the management request to the target user end can include: when the bottom layer type information of the to-be-managed chain is included in the management request, generating the management program matched with the bottom layer type information, and sending the management program to the target user end.
[0077] The bottom layer type information of the to-be-managed chain is usually information used to indicate the bottom layer type. In practice, the bottom layer type of the to-be-managed chain can include a hyperchain bottom layer, a fabric bottom layer, and the like.
[0078] In practice, the execution subject can pre-store one management program for each bottom layer type, and the execution subject can select the management program matched with the bottom layer type information of the to-be-managed chain from the plurality of management programs. The execution subject can also store one program template for various bottom layer types, and the execution subject can write the bottom layer type information of the to-be-managed chain into the program template to obtain the management program.
[0079] In actual application, in order to improve the efficiency of obtaining the management program, the management program matched with the bottom layer type information of the to-be-managed chain is usually selected from the plurality of pre-stored management programs. In the case that there is no management program matched with the bottom layer type information of the to-be-managed chain, the execution subject can generate the management program matched with the bottom layer type information of the to-be-managed chain by using at least part of the information in the management request and the pre-set program template.
[0080] Here, when the bottom layer type information of the to-be-managed chain is included in the management request, the execution subject can only generate the management program for the bottom layer type information. Compared with the management program for a plurality of bottom layer types, the management program for the bottom layer type of the current to-be-managed chain is smaller and more concise, which can save network resources for transmitting the management program and can accelerate the execution efficiency of the management program. For further example, if there are 5 bottom layer types in total, if the management program can be for 5 bottom layer types at the same time, the size of the management program in this case will be very large. If the management program is only for one bottom layer type of the to-be-managed chain to be managed, the size of the management program in this case will be significantly smaller.
[0081] In some optional implementations of the embodiment, the establishing the communication connection with the to-be-managed chain according to the node parameter information can include: sending, to the to-be-managed chain, a connection establishment request including the node certificate based on a pre-stored driver corresponding to the underlying type information of the to-be-managed chain.
[0082] The connection establishment request is used to trigger the to-be-managed chain to establish a communication connection with the target server after the node certificate is verified.
[0083] Here, the target server can pre-store a plurality of drivers, and each driver is used to drive a type of underlying of a blockchain. For example, the target server can pre-store a driver 1 used to drive a hyperchain underlying and a driver 2 used to drive a fabric underlying.
[0084] In practice, the execution subject can obtain the underlying type information of the to-be-managed chain from the managed request, or can obtain the underlying type information from the node parameter information.
[0085] The execution subject can call a driver corresponding to the underlying type indicated by the underlying type information of the to-be-managed chain to send the connection establishment request including the node certificate to the to-be-managed chain. For example, if the underlying type of the to-be-managed chain is a hyperchain underlying, the execution subject can call the driver 1 used to drive the hyperchain underlying to send the connection establishment request to the to-be-managed chain based on the driver 1.
[0086] It should be noted that the target server can call a driver corresponding to the underlying of the to-be-managed chain to manage the to-be-managed chain of different underlying types. Compared with the related art in which the target server can only manage the to-be-managed chain of one underlying type, the practicability is stronger. That is, the application can realize non-intrusive remote management of to-be-managed chains of various underlying types, which can further speed up the speed of managing the to-be-managed chain, thereby helping to further improve the efficiency of managing the blockchain.
[0087] In optional implementations of various embodiments, the to-be-managed chain can include a homogeneous chain having the same underlying type as the target server, or a heterogeneous chain having a different underlying type from the target server.
[0088] In the related art, when the target server is a BaaS platform, the BaaS platform can usually only manage the homogeneous chain created by the BaaS platform itself. For example, if the underlying type of the blockchain created by the BaaS platform is a hyperchain underlying type, the BaaS platform can usually only manage the hyperchain underlying to-be-managed chain. That is, in the prior art, a BaaS platform of a certain underlying type can only be used to manage and control the blockchain of the same underlying type.
[0089] In this application, by pre-storing the driver programs for various blockchain underlying types in the target server, the target server can simultaneously manage the homogeneous chain and the heterogeneous chain, and can manage and control multiple underlying types of blockchains in the same platform, which helps to further improve the efficiency of managing the blockchain.
[0090] It should be noted that for each underlying type of to-be-managed chain, the driver program for the underlying type is usually first stored in the target server, and then the to-be-managed chain is managed. With the development of blockchain technology, new blockchain underlying types may be added. Before managing the blockchain corresponding to the newly added underlying type, the corresponding driver program can be first stored in the target server, and then the blockchain of the newly added underlying type is managed.
[0091] In practical applications, each driver program stored in the target server is usually independent of each other, and each driver program can correspond to an on-off state. Specifically, for each driver program, when the on-off state of the driver program is on, the driver program can be started, and when the on-off state of the driver program is off, the driver program can be stopped. In this way, flexible management and control of each driver program can be achieved.
[0092] In addition, each driver program can be plugged in and out of the target server, that is, each driver program can be independently stored in the target server or removed from the target server. In this way, the driver program can be extended and improved without affecting the function of the target server, thereby further improving the efficiency of managing the to-be-managed chain.
[0093] Continuing to refer to Figure 2 A flowchart of a blockchain management method provided by an embodiment of the present application is shown. As shown in the blockchain management method, the following steps 201 to 204 can be included. Figure 2
[0094] Step 201: When receiving a management request input by a target user terminal, a management program corresponding to the management request is sent to the target user terminal.
[0095] The node parameter information includes a node certificate.
[0096] In step 202, the control target user terminal runs the management program under the preset path of the to-be-managed chain, and receives the node parameter information returned by the management program.
[0097] In step 203, a communication connection is established according to the node parameter information and the to-be-managed chain, and when the communication connection is successfully established, it is determined that the target server successfully manages the to-be-managed chain.
[0098] In this embodiment, the specific operations of steps 201-203 are basically the same as the operations of steps 101-103 in the embodiment shown in Figure 1 The specific operations of steps 201-203 are basically the same as the operations of steps 101-103 in the embodiment shown in
[0099] In step 204, operation management information input for the to-be-managed chain is received, a target operation adapted to the operation management information is performed on the to-be-managed chain, and the operation result is visually presented.
[0100] The operation management information is used to instruct to perform a target operation on the to-be-managed chain. The target operation includes: viewing transaction data, viewing node status, deploying a smart contract, and deleting the to-be-managed chain. It should be pointed out that the target operation can also include other operations, such as disconnecting a communication connection, establishing a communication connection, modifying a smart contract, etc.
[0101] Here, after the above execution subject successfully manages the to-be-managed chain, the user can interact with the above execution subject, for example, the user can input operation management information for managing the to-be-managed chain on the above execution subject, so as to realize remote management of the to-be-managed chain on the target server.
[0102] For example, if the operation management information input by the user indicates that the target operation performed on the to-be-managed chain B is to deploy a smart contract, and specifically to deploy the smart contract of the to-be-managed chain B as file1. At this time, the above execution subject can deploy the smart contract of the to-be-managed chain B as file1 when receiving the operation management information. After the smart contract is deployed, an operation result indicating that the deployment is completed can be obtained, and at this time, the above execution subject can visually present the operation result to the user. In this way, it is helpful to realize visual operation management of the to-be-managed chain.
[0103] In this embodiment, the user can realize management and control of the to-be-managed chain by interacting with the target server, which can simplify the operation of managing and controlling the to-be-managed chain, and the operation result is visual, which helps to improve user experience and further improve the efficiency of managing the blockchain.
[0104] In some optional implementations, after determining that the target server successfully manages the to-be-managed chain, the above method can further include the following steps: obtaining transaction data from the to-be-managed chain according to a preset round-robin cycle, and storing the obtained transaction data in the storage server.
[0105] Correspondingly, when the target operation is to view transaction data, performing the target operation on the to-be-managed chain according to the operation management information and visualizing the operation result can include: extracting transaction data from the storage server according to the operation management information, and visualizing the extracted transaction data.
[0106] Here, the preset round-robin cycle is usually a value indicating a length of time, which can be 5 minutes, for example.
[0107] Here, the execution subject can obtain transaction data from the to-be-managed chain according to a preset round-robin cycle, and store the obtained transaction data in the storage server. In this way, when a user needs to view transaction data of the to-be-managed chain, the user can obtain the transaction data that the user needs to view from the stored transaction data in the storage server in time, and present the obtained transaction data that meets the user's needs.
[0108] It should be noted that, since the main task of the to-be-managed chain is usually to process its own transaction data, in order not to affect the performance of the to-be-managed chain itself, the data processing speed corresponding to the interaction between the target server and the to-be-managed chain is usually slow, that is, the speed of obtaining transaction data from the to-be-managed chain by the user through the target server is usually slow. Therefore, obtaining transaction data from the to-be-managed chain in advance according to a preset round-robin cycle and storing it can present the transaction data that the user needs to view to the user in time when the user needs to view the transaction data of the to-be-managed chain. In this way, the efficiency of managing and controlling the to-be-managed chain can be further improved while the performance of the to-be-managed chain is ensured.
[0109] Referring to Figure 3 , Figure 3 FIG. 1 shows a structural schematic diagram of a target server provided by an embodiment of the present application. As shown in Figure 3 the target server can include a visual operation module 301, a core module 302, and a driver module 303.
[0110] In practice, the visual operation module 301 is usually a console. The console is a visual console that can interact with a user. The core module 302 is usually a core module of a BaaS platform.
[0111] In the case that the target server comprises the visualization operation module 301, the core module 302 and the driver module 303, the step 204 of receiving the operation management information inputted by the user and executing the target operation on the chain to be managed according to the operation management information can comprise the following steps one to three.
[0112] In the step one, the visualization operation module 301 receives the operation management information and transmits the operation management information to the core module 302.
[0113] Here, the visualization operation module 301 receives the operation management information inputted by the user and transmits the received operation management information to the core module 302.
[0114] In the step two, the core module 302 transmits the operation management information to the driver module 303 in the case that the driver module 303 is in the wake-up state.
[0115] Here, in the case that the driver module 303 is in the wake-up state, the core module 302 can directly transmit the operation management information to the driver module 303. In addition, in the case that the driver module 303 is in the sleep state, the core module 302 can first wake up the driver module 303 and then transmit the operation management information to the driver module 303 in the wake-up state.
[0116] In practice, the core module 302 can control the life cycle of the driver module 303. For example, the driver module 303 can be started, stopped, put into sleep, woken up, etc.
[0117] In the step three, the driver module 303 analyzes the operation management information, generates an operation instruction for controlling the chain to be managed to execute the target operation according to the analysis result, and sends the operation instruction to the chain to be managed.
[0118] Here, the driver module 303 can analyze the operation management information when receiving the operation management information, so as to obtain the analysis result, and can generate the operation instruction by using the analysis result. Then, the driver module 303 sends the operation instruction to the chain to be managed. In this way, the chain to be managed can receive the operation instruction, execute the target operation based on the operation instruction, and return the operation result to the driver module 303 of the target server.
[0119] For example, if the operation management information indicates that the target operation performed on the managed chain B is to deploy a smart contract, and specifically to deploy the smart contract of the managed chain B as file1. At this time, the driving module 303 can analyze the operation management information upon receiving the operation management information, and obtain an analysis result, such as some operation parameters related to the target operation. Then, the driving module 303 can generate an operation instruction using the analysis result, such as writing the operation parameters into a preset instruction template to obtain the above-mentioned operation instruction.
[0120] It should be noted that, in the process of the user interacting with the managed chain through the target server, the core module 302 and the visual operation module 301 do not need to identify or analyze the operation management information. The operation management information is analyzed by the driving module 303, and the interaction process with the managed chain is completed by the driving module 303. The decoupling of the core module 302 and the visual operation module 301 can be realized, and the functions of each module are independent of each other, which can ensure the stability of the management and control of the managed chain.
[0121] In addition, since the main task of the managed chain is usually to process its own transaction data, in order not to affect the performance of the managed chain itself, the data processing speed corresponding to the interaction between the target server and the managed chain is usually slow. Therefore, in actual application, after the driving module 303 receives the operation result returned by the managed chain, the operation result can be usually transmitted to the core module 302 for storage in the storage server. In this way, the user can subsequently view the operation result by interacting with the visual operation module 301.
[0122] In some implementations, the target server can further include a round-robin module. The round-robin module can send round-robin information for instructing to obtain transaction data from the managed chain to the driving module 303 according to a preset round-robin period. The driving module 303 can obtain the transaction data from the managed chain upon receiving the round-robin information, and transmit the obtained transaction data to the round-robin module. The round-robin module can store the transaction data in the storage server.
[0123] Continuing to refer to Figure 4 A flowchart of a blockchain management method provided by an embodiment of the present application is shown. As shown in the flowchart of the blockchain management method, the method can include the following steps 401 to 410. Figure 4
[0124] Step 401, the console receives the operation management information input by the user, and transmits the operation management information to the core.
[0125] Here, the console is the above-mentioned visual operation module. The core is the above-mentioned core module.
[0126] Step 402, the core transmits the operation management information to the driver.
[0127] The driver is the above-mentioned driver module.
[0128] Step 403, the driver parses the operation management information, generates operation instructions for controlling the target operation of the managed chain according to the parsing result, and sends the operation instructions to the managed chain.
[0129] Step 404, the managed chain sends the operation result to the driver.
[0130] Here, the managed chain includes a plurality of blockchain nodes. It should be noted that a certain blockchain node on the managed chain can be managed, or the entire managed chain can be managed. Figure 4 In this embodiment, the managed chain includes four blockchain nodes, and specifically, two of them are managed nodes.
[0131] Step 405, the driver transmits the operation result to the core.
[0132] Step 406, the core stores the operation result in the storage server.
[0133] Step 407, the chainctl sends the round-robin information for instructing the managed chain to obtain transaction data to the driver according to a preset round-robin period.
[0134] Here, the chainctl is the above-mentioned round-robin module.
[0135] Step 408, the driver receives the round-robin information, sends operation instructions for obtaining transaction data to the managed chain, so that the managed chain returns transaction data based on the operation instructions, and the driver transmits the transaction data returned by the managed chain to the chainctl.
[0136] Step 409, the chainctl stores the transaction data in the storage server.
[0137] Step 410, the storage server transmits the result data corresponding to the operation management information to the console, so that the console visually presents the result data.
[0138] Corresponding to the blockchain management method of the above-mentioned embodiment one, Figure 5 The structure block diagram of the blockchain management device 500 provided by the embodiments of the present application is shown, and only the parts related to the embodiments of the present application are shown for the convenience of description.
[0139] Referring to Figure 5 The device comprises:
[0140] The data interaction unit 501 is configured to, when receiving a request for taking over input by the target user terminal, send a taking-over program corresponding to the request for taking over to the target user terminal, the taking-over program being used to acquire node parameter information of the chain to be taken over and return the node parameter information to the target server, and the node parameter information including node credentials;
[0141] The running control unit 502 is configured to control the target user terminal to run the taking-over program on a preset path of the chain to be taken over and receive the node parameter information returned by the taking-over program.
[0142] The taking-over execution unit 503 is configured to establish a communication connection with the chain to be taken over according to the node parameter information and determine that the target server succeeds in taking over the chain to be taken over when the communication connection is successfully established.
[0143] In some embodiments, the device further comprises an operation execution unit. The operation execution unit is configured to receive operation management information input for the chain to be taken over, execute a target operation on the chain to be taken over that is adapted to the operation management information, and visually present an operation result. The operation management information is used to instruct to execute the target operation on the chain to be taken over, and the target operation includes viewing transaction data, viewing node status, deploying a smart contract, and deleting the chain to be taken over.
[0144] In some embodiments, the device further comprises a data storage unit. The data storage unit is configured to acquire transaction data from the chain to be taken over according to a preset round-robin cycle and store the acquired transaction data in a storage server. Accordingly, when the target operation is to view the transaction data, the above-mentioned execution of the target operation on the chain to be taken over that is adapted to the operation management information and the visual presentation of the operation result include extraction of transaction data adapted to the operation management information from the storage server and visual presentation of the extracted transaction data.
[0145] In some embodiments, the target server comprises a visual operation module, a core module, and a driving module. The above-mentioned receiving of the operation management information input for the chain to be taken over and the execution of the target operation on the chain to be taken over that is adapted to the operation management information include reception of the operation management information by the visual operation module and transmission of the operation management information to the core module. The core module transmits the operation management information to the driving module when the driving module is in a wake-up state. The driving module analyzes the operation management information, generates an operation instruction for controlling the chain to be taken over to execute the target operation according to an analysis result, and sends the operation instruction to the chain to be taken over.
[0146] In some embodiments, the data interaction unit 501 sends a management program corresponding to the management request to the target user terminal, including: when the management request includes the underlying type information of the chain to be managed, generating a management program that matches the underlying type information, and sending the management program to the target user terminal.
[0147] In some embodiments, the management execution unit 503 establishes a communication connection with the chain to be managed based on node parameter information, including: sending a connection establishment request, including a node certificate, to the chain to be managed based on a pre-stored driver program corresponding to the underlying type information of the chain to be managed. The connection establishment request is used to trigger the chain to establish a communication connection with the target server after the node certificate verification is successful.
[0148] In some embodiments, the chain to be managed includes: a homogeneous chain with the same underlying type as the target server, and a heterogeneous chain with a different underlying type from the target server.
[0149] The device provided in this embodiment allows the target server to automatically remotely manage the blockchain to be managed. When the blockchain to be managed is already running, it can be managed without changing the existing running state of the blockchain. This enables non-intrusive remote management of the blockchain to be managed, which can speed up the management process and thus help improve the efficiency of blockchain management.
[0150] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiment 1 of this application. For details on their specific functions and technical effects, please refer to the method embodiment section, which will not be repeated here.
[0151] Figure 6 This is a schematic diagram of the structure of a server 600 provided in one embodiment of this application. Figure 6 As shown, the server 600 of this embodiment includes: at least one processor 601 ( Figure 6 The diagram shows only one processor, memory 602, and a computer program 603, such as a data processing program, stored in memory 602 and executable on at least one processor 601. When processor 601 executes computer program 603, it implements the steps in any of the above-described method embodiments. When processor 601 executes computer program 603, it implements the steps in the embodiments of the above-described blockchain management methods. When processor 601 executes computer program 603, it implements the functions of each module / unit in the above-described device embodiments, such as... Figure 5 The functions of the data interaction unit 501 to the management execution unit 503 are shown.
[0152] For example, the computer program 603 can be divided into one or more modules / units, one or more modules / units are stored in the memory 602 and executed by the processor 601 to complete the present application. One or more modules / units can be a series of computer program instruction segments capable of completing a specific function, which are used to describe the execution process of the computer program 603 in the server 600. For example, the computer program 603 can be divided into a data interaction unit, a running control unit, a management execution unit, and the specific functions of each unit are described in the above embodiments, which will not be repeated here.
[0153] The server 600 can be a server, a desktop computer, a tablet computer, a cloud server, and a mobile terminal, etc. The server 600 can include, but is not limited to, a processor 601 and a memory 602. Those skilled in the art can understand that the server 600 can include more or less components, or combine some components, or different components, for example, the server can also include an input / output device, a network access device, a bus, etc. Figure 6 The server 600 is only an example and does not constitute a limitation on the server 600, and can include more or less components than the diagram, or combine some components, or different components, for example, the server can also include an input / output device, a network access device, a bus, etc.
[0154] The processor 601 can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.
[0155] The memory 602 can be an internal storage unit of the server 600, such as a hard disk or a memory of the server 600. The memory 602 can also be an external storage device of the server 600, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. Further, the memory 602 can include both the internal storage unit and the external storage device of the server 600. The memory 602 is used to store computer programs and other programs and data required by the server. The memory 602 can also be used to temporarily store data that has been output or will be output.
[0156] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of each functional unit and module is exemplified, and in actual application, the above-mentioned functions can be completed by different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be realized in the form of hardware or software function unit. In addition, the specific name of each functional unit and module is only for the convenience of mutual distinction, and does not limit the protection scope of the present application. The specific working process of the unit and module in the above system can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
[0157] In the above embodiments, the description of each embodiment has its own emphasis, and the parts not described or recorded in detail in a certain embodiment can be referred to the related description of other embodiments.
[0158] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized in electronic hardware or a combination of computer software and electronic hardware. Whether the functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0159] In the embodiments provided in the present application, it should be understood that the disclosed devices / servers and methods can be implemented in other ways. For example, the device / server embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division, and there can be another division in actual implementation. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed mutual elements can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other forms.
[0160] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
[0161] In addition, each of the function units in each of the embodiments of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software function unit.
[0162] If the integrated module is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the above-mentioned embodiment methods can also be completed by a computer program instructing related hardware, and the computer program can be stored in a computer readable storage medium. When the computer program is executed by a processor, the steps of each method embodiment described above can be implemented. The computer program includes computer program code, which can be in the form of source code, object code, executable files or some intermediate forms. The computer readable medium can include any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content included in the computer readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.
[0163] The above embodiments are only used to illustrate the technical solutions of the present application, rather than limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for some technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.
Claims
1. A blockchain management method, characterized by, The method comprises: When receiving a takeover request input by a target user terminal, sending a takeover program corresponding to the takeover request to the target user terminal, including: when the takeover request includes bottom layer type information of a chain to be taken over, generating the takeover program matching the bottom layer type information according to a program template corresponding to the bottom layer type, and sending the takeover program to the target user terminal, the takeover program being used to acquire node parameter information of the chain to be taken over and return the node parameter information to a target server, the node parameter information including node credentials; controlling the target user terminal to run the takeover program on a preset path of the chain to be taken over, and receiving the node parameter information returned by the takeover program; establishing a communication connection between the target server and the chain to be taken over according to the node parameter information, and determining that the target server successfully takes over the chain to be taken over when the communication connection is successfully established. 2.The blockchain management method of claim 1, wherein, After determining that the target server successfully takes over the chain to be taken over, the method further comprises: receiving operation management information input for the chain to be taken over, performing a target operation on the chain to be taken over according to the operation management information, and visually presenting an operation result; wherein the operation management information is used to instruct to perform the target operation on the chain to be taken over, and the target operation includes: viewing transaction data, viewing node status, deploying a smart contract, and deleting the chain to be taken over. 3.The blockchain management method of claim 2, wherein, After determining that the target server successfully takes over the chain to be taken over, the method further comprises: acquiring transaction data from the chain to be taken over according to a preset round-robin cycle, and storing the acquired transaction data in a storage server; when the target operation is to view transaction data, the method of performing a target operation on the chain to be taken over according to the operation management information and visually presenting an operation result comprises: extracting transaction data matching the operation management information from the storage server, and visually presenting the extracted transaction data. 4.The blockchain management method of claim 2, wherein, The target server comprises a visual operation module, a core module, and a driver module; The method of receiving operation management information input for the chain to be taken over, performing a target operation on the chain to be taken over according to the operation management information, comprises: The visual operation module receives the operation management information and transmits the operation management information to the core module; The core module transmits the operation management information to the driver module when the driver module is in an awake state; The driver module analyzes the operation management information, generates an operation instruction for controlling the chain to be taken over to perform the target operation according to an analysis result, and sends the operation instruction to the chain to be taken over. 5.The blockchain management method of claim 1, wherein, The method of establishing a communication connection between the target server and the chain to be taken over according to the node parameter information comprises: based on a driver program corresponding to bottom layer type information of the chain to be taken over stored in advance, sending a connection establishment request including the node credentials to the chain to be taken over, wherein the connection establishment request is used to trigger the chain to be taken over to establish a communication connection with the target server after the node credentials are verified. 6.The blockchain management method of any one of claims 1-5, wherein, The to-be-managed chain includes: a homogeneous chain same as a bottom layer type of the target server, and a heterogeneous chain different from the bottom layer type of the target server. 7.A blockchain management apparatus characterized by comprising: The device comprises: The data interaction unit is configured to, when receiving a request for management input by a target user terminal, send a management program corresponding to the request for management to the target user terminal, and when the request for management includes bottom layer type information of a to-be-managed chain, generate the management program matching the bottom layer type information according to a program template corresponding to the bottom layer type, and send the management program to the target user terminal, wherein the management program is used to acquire node parameter information of the to-be-managed chain and return the node parameter information to a target server, and the node parameter information includes node credentials. The running control unit is configured to control the target user terminal to run the management program on a preset path of the to-be-managed chain, and receive the node parameter information returned by the management program. The management execution unit is configured to establish a communication connection between the node parameter information and the to-be-managed chain, and when the communication connection is successfully established, determine that the target server successfully manages the to-be-managed chain.
8. A server comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the method of any one of claims 1 to 6.
9. A computer readable storage medium, the storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the method of any one of claims 1 to 6.
Citation Information
Patent Citations
Heterogeneous blockchain pluggable cross-chain bridging method and device and storage medium
CN110780945A
Block chain service network establishment method and device
CN113535690A