CN114721832A - Initialization method and device for block chain nodes - Google Patents

Initialization method and device for block chain nodes Download PDF

Info

Publication number
CN114721832A
CN114721832A CN202210513644.5A CN202210513644A CN114721832A CN 114721832 A CN114721832 A CN 114721832A CN 202210513644 A CN202210513644 A CN 202210513644A CN 114721832 A CN114721832 A CN 114721832A
Authority
CN
China
Prior art keywords
computer
blockchain
block chain
computing
node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210513644.5A
Other languages
Chinese (zh)
Inventor
王晓亮
宁志伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xita Technology Co ltd
Original Assignee
Beijing Xita Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xita Technology Co ltd filed Critical Beijing Xita Technology Co ltd
Priority to CN202210513644.5A priority Critical patent/CN114721832A/en
Publication of CN114721832A publication Critical patent/CN114721832A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5072Grid computing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Computing Systems (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

A method and a device for initializing a blockchain node are provided, the method comprises the following steps: deploying a distributed account book of block link points in a first computer; deploying an intelligent contract operating environment of the blockchain nodes in the second computer; and establishing network connection between the first computer and the second computer so that the first computer and the second computer jointly serve as a target block chain link point to join the block chain network. By applying the scheme, the requirements of flexible change of performance and storage of two resources can be met, and the expandability and the migration convenience of the block chain can be improved.

Description

Initialization method and device for block chain nodes
Technical Field
The present disclosure relates to the field of block chain technologies, and in particular, to a method and an apparatus for initializing a block chain node.
Background
It is generally recognized that blockchain technology is a distributed infrastructure and computing paradigm that utilizes blockchain data structures to authenticate and store data, distributed node consensus algorithms to generate and update data, cryptographic means to secure data transmission and access, and intelligent contracts composed of automated script code to program and manipulate data.
Generally, a blockchain network is a distributed system, and its actual working capability usually depends on performance indexes of operations, storage, and the like of blockchain nodes; since the credibility of data on the chain is different from the traditional credibility of local data, the data processing (contract) and the result thereof on the chain must be commonly known in order to continue the credibility of the data in the processing process, and therefore, the block link point is usually designed as an integrated node tightly bound with the storage and computation.
In practical application, due to the variability of requirements of block chain services on computing resources and storage resources, one of the computing resources and storage resources of a conventionally designed block chain node often reaches a bottleneck first, so that the other one cannot be fully utilized, and the resource waste situation occurs.
Disclosure of Invention
In view of this, the present specification discloses an initialization method and apparatus for a blockchain node.
According to a first aspect of the embodiments of the present specification, there is disclosed an initialization method of a blockchain node, including:
deploying a distributed account book of block link points in a first computer;
deploying an intelligent contract operating environment of the blockchain nodes in the second computer;
and establishing network connection between the first computer and the second computer so that the first computer and the second computer jointly serve as a target block chain link point to join the block chain network.
Optionally, before the target block link point joins the block chain network, the method further includes:
deploying, in the first computer, a consensus algorithm code, a blockchain network communication code, and an authentication code of a blockchain node;
said causing said first computer to join said blockchain network as a target blockchain link point in association with said second computer comprises:
after the first computer establishes network connection with the second computer, a joining request is sent to the blockchain network based on the blockchain network communication code deployed in the first computer, authority verification is carried out through the authentication code deployed in the first computer, and after the authority verification is passed, consensus of the blockchain network is participated based on the consensus algorithm code deployed in the first computer.
Optionally, the method further includes:
and deploying a user interaction interface of the blockchain node in a third computer, and establishing network connection between the third computer and the first computer and between the third computer and the second computer, so that the user interaction interface has a function of responding to a user instruction to execute corresponding interactive operation on the target block chain link point.
Optionally, the first computer comprises a first computing cluster and the second computer comprises a second computing cluster.
Optionally, the method further includes:
receiving a storage resource adjustment request;
and increasing or decreasing the storage resources used for supporting the distributed ledger of the block nodes in the first computing cluster based on the reserve adjustment parameters carried in the storage resource expansion request.
Optionally, the method further includes:
receiving a computing resource adjustment request;
and increasing or decreasing the computing resources of the intelligent contract operating environment for supporting the block chain nodes in the second computing cluster based on the computing power adjustment parameters carried in the computing resource adjustment request.
According to a second aspect of embodiments herein, there is disclosed an apparatus for initializing a block link point, comprising:
the first deployment module is used for deploying the distributed account book of the block link points in the first computer;
the second deployment module is used for deploying the intelligent contract operating environment of the blockchain nodes in a second computer;
and the network connection module is used for establishing network connection between the first computer and the second computer so as to enable the first computer and the second computer to jointly serve as a target block chain link point to join the block chain network.
Optionally, the apparatus further comprises:
a third deployment module, configured to deploy, in the first computer, a consensus algorithm code of a blockchain node, a blockchain network communication code, and an authentication code before the target blockchain node joins the blockchain network;
the network connection module further:
after the first computer establishes network connection with the second computer, a joining request is sent to the blockchain network based on the blockchain network communication code deployed in the first computer, authority verification is carried out through the authentication code deployed in the first computer, and after the authority verification is passed, consensus of the blockchain network is participated based on the consensus algorithm code deployed in the first computer.
Optionally, the apparatus further comprises:
and the fourth deployment module is used for deploying the user interaction interface of the block chain node in the third computer and establishing network connection between the third computer and the first computer and the second computer so as to enable the user interaction interface to have a function of responding to a user instruction to execute corresponding interactive operation on the target block chain node.
Optionally, the first computer comprises a first computing cluster and the second computer comprises a second computing cluster.
Optionally, the apparatus further includes a first adjusting module, configured to:
receiving a storage resource adjustment request;
and increasing or decreasing the storage class resources used for supporting the distributed ledger of the block nodes in the first computing cluster based on the reserve adjustment parameters carried in the storage class resource expansion request.
Optionally, the apparatus further includes a second adjusting module, configured to:
receiving a computing resource adjustment request;
and increasing or decreasing the computing resources of the intelligent contract operating environment for supporting the block chain nodes in the second computing cluster based on the computing power adjustment parameters carried in the computing resource adjustment request.
According to a third aspect of the embodiments of the present specification, a computer device is disclosed, which at least comprises a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any of the above-mentioned aspect embodiments when executing the program.
According to a fourth aspect of embodiments herein, a computer-readable storage medium is disclosed, on which a computer program is stored, which, when executed by a processor, implements the method of any of the above-described aspect embodiments.
In the above technical solution, when initializing a block chain node, an intelligent contract operating environment of the block chain node is separated from a distributed account book and deployed in two computers, and the two computers are combined as a target block chain link point to be added into a block chain network in a network connection manner, so that the separation of calculation and storage is realized in the block chain node pair, and thus, storage resources or calculation resources of the block chain node can be respectively adjusted, and a situation that one of the storage resources and the calculation resources is always wasted in a conventional initialization scheme is avoided;
in addition, due to the adoption of the scheme, the internal computing resources and the internal storage resources of the block chain nodes can be separated, so that the expansion and the migration of the storage resources of the block chain nodes can be more flexible, and the method can better adapt to the complex block chain service change.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with this specification and together with the description, serve to explain the principles.
FIG. 1 is a diagram illustrating the structure and interaction of blockchain nodes in a related art presented in this specification;
fig. 2 is a flowchart illustrating an initialization method of a blockchain node according to the present disclosure;
FIG. 3 is a diagram illustrating an example of the structure and interaction of a blockchain node shown in the present specification;
FIG. 4 is a block link point structure interaction diagram illustrating a first computer that may be connected to a plurality of second computers;
FIG. 5 is a block link point structure interaction diagram illustrating a second computer that may be connected to a plurality of first computers;
fig. 6 is a view showing a structural example of an initializing device for a block link point;
fig. 7 is a diagram illustrating an exemplary configuration of a computer apparatus for initialization of a blockchain node according to the present specification.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in one or more embodiments of the present disclosure, the technical solutions in one or more embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in one or more embodiments of the present disclosure. It is to be understood that the described embodiments are only a few, and not all embodiments. All other embodiments, which can be derived by one of ordinary skill in the art from one or more embodiments of the disclosure without inventive step, are intended to be within the scope of the disclosure.
When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present specification. Rather, they are merely examples of systems and methods consistent with aspects of the present description.
The terminology used in the description herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the description. As used in this specification, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present description. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
It is generally recognized that blockchain technology is a distributed infrastructure and computing paradigm that utilizes blockchain data structures to authenticate and store data, distributed node consensus algorithms to generate and update data, cryptography to secure data transmission and access, and intelligent contracts composed of automated script code to program and manipulate data.
Generally, a blockchain network is a distributed system, and its actual working capability usually depends on performance indexes of operations, storage, and the like of blockchain nodes; since the credibility of data on the chain is different from the traditional credibility of local data, the data processing (contract) and the result thereof on the chain must be commonly known in order to continue the credibility of the data in the processing process, and therefore, the block link point is usually designed as an integrated node tightly bound with the storage and computation.
Referring to fig. 1, fig. 1 is a schematic diagram illustrating a block link point structure and interaction in the related art; in this example, there may be a message bus in the blockchain node, through which the user interface, authentication, consensus, chain storage, executor, network, etc. functional modules in the blockchain node may perform data interaction, where the user interface may be used for interfacing with a user operating the node, and the network module may be used for data communication with other nodes (node 2, node 3, node 4) in the blockchain network.
Under the above typical structure, due to the variability of the demand of the block chain service for the computing resources and the storage resources, one of the computing resources and the storage resources of the block chain link points often reaches the bottleneck first, so that the other one is not fully utilized, and the resource waste occurs. For example, suppose that a large number of calculation steps exist in a certain intelligent contract, which may cause a large amount of consumption of calculation resources of a blockchain node, and after a calculation bottleneck is reached, the node cannot take over services of other intelligent contracts, and at this time, even if the storage resources of the blockchain node are still surplus, the storage resources cannot be utilized; for another example, if a certain evidence service consumes a large amount of storage resources, which results in that the storage device carried by a certain blockchain node is nearly fully loaded, at this time, it will be impossible to provide storage space for a new block, which results in that blockchain service is suspended, and even if the computing resources of the blockchain node are still idle, they cannot be utilized.
Based on this, the present specification proposes a technical solution for separately managing and deploying the storage resources and the computing resources of the blockchain nodes, so as to avoid that one of the two nodes reaches a bottleneck in advance, which results in that the other node is idle and wasted.
During implementation, in the process of initializing the blockchain nodes, the intelligent contract operating environment of the blockchain nodes and the distributed account book can be separated and deployed in two computers, and then the two computers are combined to be used as a target blockchain link point to be added into a blockchain network in a network connection mode.
In the above technical solution, when initializing a block chain node, an intelligent contract operating environment of the block chain node is separated from a distributed account book and deployed in two computers, and then the two computers are combined as a target block chain link point to be added into a block chain network in a network connection manner, so that the separation of calculation and storage is realized within the block chain node, and thus, storage resources or calculation resources of the block chain node can be respectively adjusted, and a situation that one of the storage resources and the calculation resources is always wasted in a conventional initialization scheme is avoided;
in addition, due to the adoption of the scheme, the internal computing resources and the internal storage resources of the block chain nodes can be separated, so that the expansion and the migration of the storage resources of the block chain nodes can be more flexible, and the method can better adapt to the complex block chain service change.
The present specification is described below by using specific embodiments and with reference to specific application scenarios.
Referring to fig. 2, fig. 2 is a block chain node initialization method according to an embodiment of the present disclosure, where the method includes the following steps:
s201, deploying a distributed account book of block link points in a first computer;
s202, deploying an intelligent contract running environment of the blockchain nodes in the second computer;
s203, establishing a network connection between the first computer and the second computer, so that the first computer and the second computer jointly serve as a target block link point to join the block chain network.
The block chain can refer to a block chain of any shape and type; in this specification, a blockchain is also called as a distributed book accounting technology, and is a technology in which a plurality of computing devices participate in accounting together and maintain a complete distributed database together; in general, blockchains have the property of being decentralized, transparent to disclosure, capable of participating in database records per computing device, and capable of fast data synchronization between computing devices. Blockchains are generally divided into three types: public chain (Public Blockchain), Private chain (Private Blockchain) and alliance chain (Consortium Blockchain). In addition, there may be a combination of the above types, such as private chain + federation chain, federation chain + public chain, and so on. In general, various types of blockchain properties may differ, and thus may be used to meet different technical requirements; for example, if the highest degree of decentralization is desired, a public chain may be selected; federation chains, etc., may be selected if desired to compromise decentralization and performance. In implementation, if the blockchain is in a form of a federation chain, the blockchain nodes constituting the blockchain may be provided by various entities such as a relevant management department, a common user, a network operator, and the like, respectively, so as to ensure that the block chain billing right is relatively fair and reasonable; for another example, if the block chain is in a general programmable block chain form, the corresponding and general intelligent contract can be used for constructing related functions, and higher reliability can be obtained; it can be seen that various forms of blockchains have advantages, and those skilled in the art can select the type of blockchain according to specific needs, and the description does not limit the specific type of blockchain.
The first computer and the second computer may refer to any form and kind of computer, such as a conventional single server, or a server cluster, or a personal computer, or a smart phone, etc.; for example, if a service node has two computers, one of the computers a has higher computing performance and the other computer B has better storage expansion performance, the solution can be implemented by using the computer a as the second computer and the computer B as the first computer, so as to fully utilize resources.
It will be appreciated that, in addition to the physical computers in the conventional sense, virtual machines or containers bound to computer resources may be used as the first computer and the second computer through virtualization technology. Specifically, in a computer cluster, computing and storage resources of the computer cluster may often be scheduled by a container management engine to obtain a virtual machine whose performance index meets a service requirement; for example, in a kubernets-based computing cluster, a Pod with sufficient storage resources may be designed as the first computer, and a Pod with sufficient computing resources may be designed as the second computer.
In this specification, a distributed ledger of blockchain nodes may be deployed in a first computer, and an intelligent contract execution environment of blockchain nodes may be deployed in a second computer; specifically, since the block chain node can be theoretically divided into computer hardware for executing software codes and computer software codes for providing the block chain node function after being executed; when the above steps are implemented, the intelligent contract operating environment software code with a preference to the computing function of the blockchain node may be deployed in the second computer, and the distributed ledger software code with a preference to the storage function of the blockchain node may be deployed in the first computer, so that the blockchain node software codes originally running at one location are separately operated and have respective hardware resource support.
It is understood that if the first computer and the second computer are not physical computers, but virtual machines or containers divided based on virtualization technology, the first computer and the second computer may still run on the same physical hardware (e.g., a computer cluster); however, when the virtual machine or the container is partitioned by using the virtualization technology, the computer cluster performs allocation scheduling on resources such as computation and storage by using the management engine, and thus the first computer and the second computer can still be regarded as two computers with relatively separated hardware resources.
It should be clear that, in this specification, the above steps S201 and S202 are not strictly limited in order, that is, the above step S201 may be executed first and then the above step S202 is executed, the above step S202 may be executed first and then the above step S201 is executed, or both of them may be executed in parallel, or the like; the change of the specific execution timing of the two steps does not affect the final technical effect of the scheme disclosed in the specification.
In this specification, after the steps S201 and S202 are completed, a network connection may be established between the first computer and the second computer, so that the first computer and the second computer jointly join a blockchain network as a target blockchain link point. Specifically, since the blockchain account book of the blockchain node and the intelligent contract execution environment of the blockchain node are respectively deployed in the first computer and the second computer, therefore, the two computers can be connected by a network connection mode, so that the block chain distributed ledger deployed in the first computer can provide data access service for the intelligent contract execution environment deployed in the second computer, and the intelligent contract execution environment in the second computer may also provide computing services to the blockchain distributed ledger deployed in the first computer, and, therefore, after the two computers are successfully connected through the network, the two computers can jointly complete the tasks required to be completed as a block link point, so that, the two computers can be combined to be used as a target blockchain node to be added into a blockchain network.
From the external perspective of the target blockchain node, the process, that is, the process of initializing the target blockchain node and adding a blockchain network, is not particularly different from a conventional networking mode, and therefore, the scheme disclosed in the specification for performing partition design inside the blockchain link node can be almost compatible with any existing blockchain networking technology.
It should be noted that although the roll up technology exists in the related art, it is also mentioned that the computation task and the storage task of the block chain are completed separately, in a typical roll up technology scenario, it is a common practice to newly create another sub-chain for supporting the separated computation task, call the sub-chain as an intelligent contract executor of a main chain, and only store the input and the output of the computation task on the main chain. Under the scheme, although the subchain used for calculation can be verified by the verification content in the main chain in theory, after all, the consensus range of the calculation process is narrowed from the main chain to the subchain, and the reliability of block chain calculation is substantially reduced.
Compared with the roll technology, the method has the advantages that another sub-chain is not newly established, but segmentation and recombination are directly performed inside the block chain node, the process that the block chain node is added into the block chain network is not influenced, and the reliability of block chain calculation can still be guaranteed by a consensus mechanism of the whole block chain network; the trustworthiness of blockchain computation is not affected as in conventional Rollup solutions.
In an embodiment shown, the first computer may further include code for implementing other functions in the software code of the blockchain node; specifically, before the target blockchain node joins the blockchain network, a consensus algorithm code of the blockchain node, a blockchain network communication code, and an authentication code may be deployed in the first computer; when the first computer and the second computer need to join the blockchain network as a target blockchain link point, after the first computer establishes a network connection with the second computer, a join request may be sent to the blockchain network based on a blockchain network communication code deployed in the first computer, an authority verification may be performed through an authentication code deployed in the first computer, and after the authority verification passes, a consensus of the blockchain network may be participated in based on a consensus algorithm code deployed in the first computer.
It is understood that, in the first computer, the sequence relationship between the procedures of deploying the consensus algorithm code of the blockchain node, the blockchain network communication code, and the authentication code and the steps S201 and S202 does not need to be strictly defined; the specification only requires that the software codes of the blockchain nodes are deployed before the first computer and the second computer are combined to be used as a target blockchain link point to be added into the blockchain network.
Generally, the consensus algorithm code, the blockchain network communication code, and the authentication code of the blockchain node are closer to the distributed book function of the blockchain node, so that the codes are deployed in the first computer, the performance of the first computer can be fully utilized to a certain extent, and the overall operation efficiency of the blockchain node is improved; it is to be understood that the consensus algorithm code of the blockchain node, the blockchain network communication code, and the authentication code are not only deployed in the first computer, but also in the second computer, or in another third computer, or separately deployed in the plurality of computers; the software codes of the block chain nodes are only required to be ensured to be capable of realizing communication and exchange with each other when being executed, and the functions of the block chain nodes can be realized.
In another embodiment shown, the target blockchain node may be a blockchain node that can be controlled by a user through a user command; to achieve the object, a user interaction interface of a blockchain node may be deployed in a third computer, and a network connection between the third computer and the first computer and the second computer may be established, so that the user interaction interface has a function of performing a corresponding interaction operation on the target blockchain link point in response to a user instruction.
By applying the scheme, the user interaction interface is independently arranged in the third computer, so that the performance waste of the monitoring user operation on the first computer and the second computer can be reduced, and when the fault causing downtime occurs on the user interaction interface, the negative influence on the first computer and the second computer can be avoided by disconnecting the third computer, and the service availability on the link of the target block link node is ensured.
It will be appreciated that the aggregator, as a functional module for organizing the traffic of the user towards the blockchain node, may also be deployed in the third computer as described above, since it is strongly associated with the functionality of the user interface. Referring to fig. 3, fig. 3 is a diagram illustrating a structure and interaction example of a block link point; in this example, the aggregator and the user interface are disposed in the third computer, i.e., the oval portion in fig. 3, the execution environment for executing the smart contract, which may also be referred to as an executor, is disposed in the second computer, i.e., the rounded rectangular portion in fig. 3, and the consensus, authentication, chain storage (distributed ledger), network, etc. function modules may be disposed in the first computer, i.e., the large circular portion in fig. 3; since the user interface is deployed in the third computer, the user can interact with the target blockchain node through the third computer (elliptical portion); since the network function module is deployed at the first computer (the large circular portion), other nodes in the blockchain network can interact with the target blockchain node through the first computer.
It will be appreciated that since the intelligent contract execution environment portion for which the second computer is responsible has a relatively separate nature in terms of traffic functionality from the chain storage portion for which the first computer is responsible, the first computer portion may be referred to as L1, the first tier, of the target blockchain node, and the second computer portion may be referred to as L2, the second tier, of the target blockchain node.
In one embodiment, the first computer and the second computer may be computing clusters respectively; that is, the first computer may be a first computing cluster, and the second computer may be a second computing cluster. By adopting the scheme, different functional modules of one target block chain node can be respectively arranged in the two computing clusters, although the delay of information exchange in the node is increased, the better resource scheduling effect can be obtained by utilizing the different configuration characteristics of the two computing clusters. For example, the first computing cluster is a high storage capacity service cluster provided by a provider X, and the second computing cluster is a high computing power service cluster provided by a provider Y, and the sum of the two offers is still lower than the offer of a provider Z providing a high storage capacity, high computing power high-end service cluster, so that the high storage capacity service cluster provided by the provider X is used as the first computing cluster, the high computing power service cluster provided by the provider Y is used as the second computing cluster, and the solution described in this specification is deployed, thereby achieving the effects of reducing cost and improving resource utilization rate.
In an embodiment shown in the foregoing, the target block chain node may further adjust its storage resource according to a resource adjustment request; it is to be understood that, in this specification, the storage class resource of the target blockchain node is mainly provided by the first computer, and therefore, the storage class resource adjustment request may be received first; and increasing or decreasing the storage resources of the distributed ledger supporting the block nodes in the first computing cluster based on the reserve adjustment parameters carried in the storage resource expansion request.
For example, if the first computing cluster is a Kubernetes-based computing cluster, the storage class resource of the first computing cluster for supporting the distributed ledger of the block-node nodes may be increased or decreased by allocating available resources of Pod.
Similarly, in another embodiment, the target block link node may further adjust the computational resource according to the resource adjustment request; it is understood that, in this specification, the computing resources of the target blockchain node are mainly provided by the second computer, and therefore, the computing resource adjustment request may be received first; and increasing or decreasing the computing resources of the intelligent contract operating environment for supporting the block chain nodes in the second computing cluster based on the computing power adjustment parameters carried in the computing resource adjustment request. Similarly, if the second computing cluster is a Kubernetes-based computing cluster, the computing-class resources of the intelligent contract execution environment for supporting the blockchain node in the second computing cluster may be increased or decreased by the deployment of the available resources of the Pod.
It can be understood that, when the computing resources for supporting the intelligent contract operating environment of the blockchain node and/or the storage resources for supporting the distributed book of the blockchain node are adjusted, the available resource attributes of the existing container or virtual machine may be adjusted, or the number of containers/virtual machines for implementing the above functions may be directly adjusted.
For example, referring to fig. 4, fig. 4 is a block link point structure interaction diagram illustrating an example in which a first computer may be connected to a plurality of second computers; in this example, for temporarily increased high computing power requirements, several copies of the second computer may be added, and the computing task is fragmented, e.g., by App attribution of the computing task, which may enable one first computer to connect with multiple second computers; that is, one L1 of the target blockchain node may interface multiple L2.
For another example, referring to fig. 5, fig. 5 is an interactive illustration of a block link point structure that a second computer can be connected to a plurality of first computers; in this example, for temporarily increased high storage demand, copies of several first computers may be added, splitting the storage task to completion so that one second computer may connect with multiple first computers, i.e., one L2 of the target blockchain node may interface with multiple L1.
It is understood that, if the service is complex, the above two examples can be implemented simultaneously, that is, multiple L2 of the target block chain node can interface multiple L1, and so on, and this specification need not be further enumerated. Based on the above example of resource adjustment, it can be seen that, when the solution described in this specification is applied in a computing cluster environment, since the available resources in the computer cluster for the partitioned container or virtual machine can be flexibly adjusted, the computing resources of the intelligent contract operating environment supporting the blockchain node and/or the storage resources of the distributed book supporting the blockchain nodes can be adjusted in a more efficient manner.
The above contents are all embodiments of the present specification for the initialization method of the blockchain node. Based on the above embodiments, the scheme enables the separation of calculation and storage within the blockchain node pairs, and the framework formed after initialization allows the storage resources or the calculation resources of the blockchain nodes to be respectively adjusted, so as to avoid the situation that one of the storage resources and the calculation resources is always wasted in the conventional initialization scheme; moreover, due to the adoption of the scheme, the internal computing resources and the internal storage resources of the block chain nodes can be separated, so that the expansion and the migration of the storage resources of the block chain nodes can be more flexible, and the method can better adapt to the complex block chain service change.
The present specification further provides an embodiment of an initialization apparatus for a corresponding blockchain node, as follows:
the present specification provides an initialization apparatus for a block link node, where an example of the structure of the initialization apparatus for a block link node is shown in fig. 6, and the initialization apparatus includes:
a first deployment module 601, which deploys the distributed ledger of block nodes in a first computer;
a second deployment module 602, for deploying an intelligent contract execution environment of the blockchain node in a second computer;
the network connection module 603 establishes a network connection between the first computer and the second computer, so that the first computer and the second computer jointly join the blockchain network as a target blockchain link point.
In one illustrated embodiment, the apparatus may further include:
a third deployment module, configured to deploy, in the first computer, a consensus algorithm code of a blockchain node, a blockchain network communication code, and an authentication code before the target blockchain node joins the blockchain network; the network connection module further: after the first computer establishes network connection with the second computer, a joining request is sent to the blockchain network based on the blockchain network communication code deployed in the first computer, authority verification is carried out through the authentication code deployed in the first computer, and after the authority verification is passed, consensus of the blockchain network is participated based on the consensus algorithm code deployed in the first computer.
In one illustrated embodiment, the apparatus may further include: and the fourth deployment module is used for deploying the user interaction interface of the block chain node in the third computer and establishing network connection between the third computer and the first computer and the second computer so as to enable the user interaction interface to have a function of responding to a user instruction to execute corresponding interactive operation on the target block chain node.
In one illustrated embodiment, the first computer may comprise a first computing cluster and the second computer may comprise a second computing cluster.
In one embodiment shown, the apparatus may further include a first adjusting module operable to: receiving a storage resource adjustment request; and increasing or decreasing the storage class resources which can be used for supporting the distributed ledger of the block nodes in the first computing cluster based on the reserve adjustment parameters carried in the storage class resource expansion request.
In one embodiment shown, the apparatus may further include a second adjusting module operable to: receiving a computing resource adjustment request; and increasing or decreasing the computing resources of the intelligent contract operating environment which can be used for supporting the blockchain nodes in the second computing cluster based on the computing power adjustment parameters carried in the computing resource adjustment request.
Embodiments of the present specification further provide a computer device, which at least includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the initialization method of the blockchain node when executing the program.
Fig. 7 is a more specific hardware structure diagram of a computing device provided in an embodiment of the present specification, where the device may include: a processor 1010, a memory 1020, an input/output interface 1030, a communication interface 1040, and a bus 1050. Wherein the processor 1010, memory 1020, input/output interface 1030, and communication interface 1040 are communicatively coupled to each other within the device via bus 1050.
The processor 1010 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits, and is configured to execute related programs to implement the technical solutions provided in the embodiments of the present disclosure.
The Memory 1020 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, or the like. The memory 1020 may store an operating system and other application programs, and when the technical solution provided by the embodiments of the present specification is implemented by software or firmware, the relevant program codes are stored in the memory 1020 and called to be executed by the processor 1010.
The input/output interface 1030 is used for connecting an input/output module to input and output information. The i/o module may be configured as a component within the device (not shown) or may be external to the device to provide corresponding functionality. The input devices may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output devices may include a display, a speaker, a vibrator, an indicator light, etc.
The communication interface 1040 is used for connecting a communication module (not shown in the drawings) to implement communication interaction between the present apparatus and other apparatuses. The communication module can realize communication in a wired mode (such as USB, network cable and the like) and also can realize communication in a wireless mode (such as mobile network, WIFI, Bluetooth and the like).
Bus 1050 includes a path that transfers information between various components of the device, such as processor 1010, memory 1020, input/output interface 1030, and communication interface 1040.
It should be noted that although the above-mentioned device only shows the processor 1010, the memory 1020, the input/output interface 1030, the communication interface 1040 and the bus 1050, in a specific implementation, the device may also include other components necessary for normal operation. In addition, those skilled in the art will appreciate that the above-described apparatus may also include only those components necessary to implement the embodiments of the present description, and not necessarily all of the components shown in the figures.
Embodiments of the present specification further provide a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the foregoing block chain node initialization method.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
From the above description of the embodiments, it is clear to those skilled in the art that the embodiments of the present disclosure can be implemented by software plus necessary general hardware platform. Based on such understanding, the technical solutions of the embodiments of the present specification may be essentially or partially implemented in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments of the present specification.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus embodiment, since it is substantially similar to the method embodiment, it is relatively simple to describe, and reference may be made to some descriptions of the method embodiment for relevant points. The above-described apparatus embodiments are merely illustrative, and the modules described as separate components may or may not be physically separate, and the functions of the modules may be implemented in one or more software and/or hardware when implementing the embodiments of the present disclosure. And part or all of the modules can be selected according to actual needs to realize the purpose of the scheme of the embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
The foregoing is only a specific embodiment of the embodiments of the present disclosure, and it should be noted that, for those skilled in the art, a plurality of modifications and decorations can be made without departing from the principle of the embodiments of the present disclosure, and these modifications and decorations should also be regarded as the protection scope of the embodiments of the present disclosure.

Claims (14)

1. A method for initializing a blockchain node includes:
deploying a distributed account book of block link points in a first computer;
deploying an intelligent contract operating environment of the blockchain nodes in the second computer;
and establishing network connection between the first computer and the second computer so that the first computer and the second computer jointly serve as a target block chain link point to join the block chain network.
2. The method of claim 1, prior to the target blockchain node joining a blockchain network, the method further comprising:
deploying, in the first computer, a consensus algorithm code, a blockchain network communication code, and an authentication code of a blockchain node;
said causing said first computer to join said blockchain network as a target blockchain link point in association with said second computer comprises:
after the first computer establishes network connection with the second computer, a joining request is sent to the blockchain network based on the blockchain network communication code deployed in the first computer, authority verification is carried out through the authentication code deployed in the first computer, and after the authority verification is passed, consensus of the blockchain network is participated based on the consensus algorithm code deployed in the first computer.
3. The method of claim 1, further comprising:
deploying, in a third computer, a user interaction interface of a blockchain node, and establishing a network connection between the third computer and the first computer and the second computer, so that the user interaction interface has a function of performing corresponding interactive operation on the target block link point in response to a user instruction.
4. The method of claim 1, the first computer comprising a first computing cluster and the second computer comprising a second computing cluster.
5. The method of claim 4, further comprising:
receiving a storage resource adjustment request;
and increasing or decreasing the storage class resources used for supporting the distributed ledger of the block nodes in the first computing cluster based on the reserve adjustment parameters carried in the storage class resource expansion request.
6. The method of claim 4, further comprising:
receiving a computing resource adjustment request;
and increasing or decreasing the computing resources of the intelligent contract operating environment for supporting the block chain nodes in the second computing cluster based on the computing power adjustment parameters carried in the computing resource adjustment request.
7. An apparatus for initializing a block link point, comprising:
the first deployment module is used for deploying the distributed account book of the block link points in the first computer;
the second deployment module deploys the intelligent contract operating environment of the blockchain nodes in a second computer;
and the network connection module is used for establishing network connection between the first computer and the second computer so as to enable the first computer and the second computer to jointly serve as a target block chain link point to join the block chain network.
8. The apparatus of claim 7, further comprising:
a third deployment module, configured to deploy, in the first computer, a consensus algorithm code of a blockchain node, a blockchain network communication code, and an authentication code before the target blockchain node joins the blockchain network;
the network connection module further:
after the first computer establishes network connection with the second computer, a joining request is sent to the blockchain network based on the blockchain network communication code deployed in the first computer, authority verification is carried out through the authentication code deployed in the first computer, and after the authority verification is passed, consensus of the blockchain network is participated based on the consensus algorithm code deployed in the first computer.
9. The apparatus of claim 7, the apparatus further comprising:
and the fourth deployment module is used for deploying the user interaction interface of the block chain node in the third computer and establishing network connection between the third computer and the first computer and the second computer so as to enable the user interaction interface to have a function of responding to a user instruction and executing corresponding interactive operation on the target block chain node.
10. The apparatus of claim 7, the first computer comprising a first computing cluster and the second computer comprising a second computing cluster.
11. The apparatus of claim 10, further comprising a first adjustment module to:
receiving a storage resource adjustment request;
and increasing or decreasing the storage class resources used for supporting the distributed ledger of the block nodes in the first computing cluster based on the reserve adjustment parameters carried in the storage class resource expansion request.
12. The apparatus of claim 10, further comprising a second adjustment module to:
receiving a computing resource adjustment request;
and increasing or decreasing the computing resources of the intelligent contract operating environment for supporting the block chain nodes in the second computing cluster based on the computing power adjustment parameters carried in the computing resource adjustment request.
13. A computer device comprising at least a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program implements the method of any of claims 1 to 6.
14. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method of any one of claims 1 to 6.
CN202210513644.5A 2022-05-12 2022-05-12 Initialization method and device for block chain nodes Pending CN114721832A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210513644.5A CN114721832A (en) 2022-05-12 2022-05-12 Initialization method and device for block chain nodes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210513644.5A CN114721832A (en) 2022-05-12 2022-05-12 Initialization method and device for block chain nodes

Publications (1)

Publication Number Publication Date
CN114721832A true CN114721832A (en) 2022-07-08

Family

ID=82232093

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210513644.5A Pending CN114721832A (en) 2022-05-12 2022-05-12 Initialization method and device for block chain nodes

Country Status (1)

Country Link
CN (1) CN114721832A (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107832139A (en) * 2017-09-26 2018-03-23 上海点融信息科技有限责任公司 For the method, apparatus and system for the computing resource for managing block chain link point
CN108846748A (en) * 2018-05-31 2018-11-20 杭州秘猿科技有限公司 A kind of independent process executes the method and device of contract
CN111966503A (en) * 2020-10-20 2020-11-20 支付宝(杭州)信息技术有限公司 Method and device for managing storage space of intelligent contract account
CN112380578A (en) * 2020-11-20 2021-02-19 天翼电子商务有限公司 Edge computing framework based on block chain and trusted execution environment
CN112445865A (en) * 2021-01-29 2021-03-05 支付宝(杭州)信息技术有限公司 Method and device for automatically deploying block chain network and cloud computing platform
CN113704361A (en) * 2021-10-28 2021-11-26 腾讯科技(深圳)有限公司 Transaction execution method and device, computing equipment and storage medium
CN113868711A (en) * 2021-09-02 2021-12-31 广州广电运通金融电子股份有限公司 Data federation storage method, data federation query method and data federation query system
CN114328133A (en) * 2022-03-16 2022-04-12 北京微芯感知科技有限公司 Single-mechanism distributed conflict detection method and system and deposit separation framework
CN114416765A (en) * 2022-03-28 2022-04-29 北京微芯感知科技有限公司 Stepless prediction execution method and system for block chain transaction

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107832139A (en) * 2017-09-26 2018-03-23 上海点融信息科技有限责任公司 For the method, apparatus and system for the computing resource for managing block chain link point
CN108846748A (en) * 2018-05-31 2018-11-20 杭州秘猿科技有限公司 A kind of independent process executes the method and device of contract
CN111966503A (en) * 2020-10-20 2020-11-20 支付宝(杭州)信息技术有限公司 Method and device for managing storage space of intelligent contract account
CN112380578A (en) * 2020-11-20 2021-02-19 天翼电子商务有限公司 Edge computing framework based on block chain and trusted execution environment
CN112445865A (en) * 2021-01-29 2021-03-05 支付宝(杭州)信息技术有限公司 Method and device for automatically deploying block chain network and cloud computing platform
CN113868711A (en) * 2021-09-02 2021-12-31 广州广电运通金融电子股份有限公司 Data federation storage method, data federation query method and data federation query system
CN113704361A (en) * 2021-10-28 2021-11-26 腾讯科技(深圳)有限公司 Transaction execution method and device, computing equipment and storage medium
CN114328133A (en) * 2022-03-16 2022-04-12 北京微芯感知科技有限公司 Single-mechanism distributed conflict detection method and system and deposit separation framework
CN114416765A (en) * 2022-03-28 2022-04-29 北京微芯感知科技有限公司 Stepless prediction execution method and system for block chain transaction

Similar Documents

Publication Publication Date Title
CN108809722B (en) Method, device and storage medium for deploying Kubernetes cluster
US20200081731A1 (en) Method, system and apparatus for creating virtual machine
CN108614726B (en) Virtual machine creation method and device
US9667750B2 (en) Client-initiated leader election in distributed client-server systems
US11128437B1 (en) Distributed ledger for peer-to-peer cloud resource sharing
CN105979007B (en) Method and device for accelerating resource processing and network function virtualization system
EP4044507A1 (en) Network resource management method and system, network equipment and readable storage medium
US20200052885A1 (en) File storage method and apparatus for blockchain network
CN112288423A (en) Aggregation payment method and system of distributed framework
CN113645262A (en) Cloud computing service system and method
CN111858050B (en) Server cluster hybrid deployment method, cluster management node and related system
EP3813335A1 (en) Service processing method and system based on alliance chain network
CN115086166A (en) Computing system, container network configuration method, and storage medium
CN116933886B (en) Quantum computing execution method, quantum computing execution system, electronic equipment and storage medium
CN106576068B (en) A kind of software security verification method, equipment and system
CN116703601B (en) Data processing method, device, equipment and storage medium based on block chain network
CN114721832A (en) Initialization method and device for block chain nodes
CN115098114A (en) Block chain-based distributed application deployment method and device
CN114661421A (en) Method and system for deploying chain code in alliance chain
CN113504981A (en) Task scheduling method and device, storage medium and electronic equipment
CN114785800A (en) Cross-link communication method and device
CN114625479A (en) Cloud edge collaborative application management method in edge computing and corresponding device
CN115883283A (en) Deployment method and device of containerization VNF
CN109257201B (en) License sending method and device
CN112258166A (en) Transaction request processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20220708

RJ01 Rejection of invention patent application after publication