CN111124617B - Method and device for creating block chain system, storage medium and electronic device - Google Patents

Method and device for creating block chain system, storage medium and electronic device Download PDF

Info

Publication number
CN111124617B
CN111124617B CN201911344962.8A CN201911344962A CN111124617B CN 111124617 B CN111124617 B CN 111124617B CN 201911344962 A CN201911344962 A CN 201911344962A CN 111124617 B CN111124617 B CN 111124617B
Authority
CN
China
Prior art keywords
blockchain
service
cloud processing
template
virtual machine
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.)
Active
Application number
CN201911344962.8A
Other languages
Chinese (zh)
Other versions
CN111124617A (en
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201911344962.8A priority Critical patent/CN111124617B/en
Publication of CN111124617A publication Critical patent/CN111124617A/en
Application granted granted Critical
Publication of CN111124617B publication Critical patent/CN111124617B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING; 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING; 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance or administration or management of packet switching networks
    • H04L41/08Configuration management of network or network elements
    • H04L41/0889Techniques to speed-up the configuration process
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance or administration or management of packet switching networks
    • H04L41/08Configuration management of network or network elements
    • H04L41/0893Assignment of logical groupings to network elements; Policy based network management or configuration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network-specific arrangements or communication protocols supporting networked applications
    • H04L67/10Network-specific arrangements or communication protocols supporting networked applications in which an application is distributed across nodes in the network
    • H04L67/1097Network-specific arrangements or communication protocols supporting networked applications in which an application is distributed across nodes in the network for distributed storage of data in a network, e.g. network file system [NFS], transport mechanisms for storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network-specific arrangements or communication protocols supporting networked applications
    • H04L67/16Service discovery or service management, e.g. service location protocol [SLP] or Web services

Abstract

The invention discloses a block chain system creating method and device, a storage medium and an electronic device. Wherein, the method comprises the following steps: obtaining a request for requesting creation of a first blockchain system for a first blockchain link point on a first blockchain; creating a first virtual machine for the first block chain link point in a first container created for the first block chain, and allocating first cloud processing resources for the first virtual machine; the first cloud processing resource and the preset first block chain template are used for creating the first block chain system for the first block chain link point on the first virtual machine, the purpose that the first cloud processing resource and the preset first block chain template are used for creating the first block chain system for the first block chain link point on the first virtual machine is achieved, the technical effect that a plurality of nodes included in the block chain are rapidly deployed in a container according to the block chain template is achieved, and the technical problem that in the prior art, the deployment efficiency of the block chain is low is solved.

Description

Method and device for creating block chain system, storage medium and electronic device
Technical Field
The present invention relates to the field of computers, and in particular, to a method and an apparatus for creating a blockchain system, a storage medium, and an electronic apparatus.
Background
The blockchain technology is characterized in that information stored on the blockchain cannot be forged and falsified, a blockchain consensus algorithm drives each node on the blockchain to participate in a transaction verification process, the transactions on the blockchain are guaranteed to be credible after confirmation, and each node on the blockchain maintains a public ledger and is used for storing balance and intelligent contract data of all users on a blockchain network.
At present, the technology of a block chain bottom layer is not completely mature, infrastructure is not completely perfect, most of block chain services in the prior art need manual operation of users, and meanwhile, the problems of difficulty in capacity expansion of account book data, high availability of nodes, incapability of guaranteeing, new increase of organization/nodes and exiting exist. Enterprises cannot rapidly, efficiently and accurately put into productivity in various business scenes based on the block chain technology, and the popularization problem of the block chain technology is urgently needed to be solved.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a method and a device for creating a block chain system, a storage medium and an electronic device, which are used for at least solving the technical problem that the block chain deployment efficiency is low in the prior art.
According to an aspect of the embodiments of the present invention, there is provided a method for creating a blockchain system, including: acquiring a first creation request, wherein the first creation request is used for requesting to create a first blockchain system for a first blockchain link point on a first blockchain; creating a first virtual machine for the first blockchain link node in a first container created for the first blockchain, and allocating first cloud processing resources to the first virtual machine, wherein the first cloud processing resources are part of first target cloud processing resources that the first container has, the first target cloud processing resources being for allocation to a blockchain system created for blockchain nodes on the first blockchain, the first target cloud processing resources including at least one of: computing resources on a target cloud, storage resources on the target cloud; creating the first blockchain system for the first blockchain link point on the first virtual machine using the first cloud processing resource and a predetermined first blockchain template.
According to another aspect of the embodiments of the present invention, there is also provided a device for creating a blockchain system, including: a first obtaining unit, configured to obtain a first creation request, where the first creation request is used to request creation of a first blockchain system for a first blockchain link point on a first blockchain; a first allocation unit, configured to create a first virtual machine for the first blockchain link node in a first container created for the first blockchain, and allocate a first cloud processing resource to the first virtual machine, where the first cloud processing resource is a part of first target cloud processing resources that the first container has, and the first target cloud processing resource is used to be allocated to a blockchain system created for the blockchain link node on the first blockchain, and the first target cloud processing resource includes at least one of: computing resources on a target cloud, storage resources on the target cloud; a first creating unit to create the first blockchain system for the first blockchain link point on the first virtual machine using the first cloud processing resource and a predetermined first blockchain template.
According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, where the computer program is configured to execute the above creation method of the blockchain system when running.
According to another aspect of the embodiments of the present invention, there is also provided an electronic apparatus, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the method for creating a blockchain system through the computer program.
In the embodiment of the present invention, a first creation request is obtained, where the first creation request is used to request that a first blockchain system is created for a first blockchain link point on a first blockchain; creating a first virtual machine for a first blockchain link point in a first container created for a first blockchain, and allocating first cloud processing resources for the first virtual machine, wherein the first cloud processing resources are part of first target cloud processing resources possessed by the first container, the first target cloud processing resources are used for allocating a blockchain system created for the blockchain node on the first blockchain, and the first target cloud processing resources include at least one of the following: computing resources on a target cloud, storage resources on the target cloud; the first cloud processing resource and the preset first block chain template are used for creating the first block chain system for the first block chain link point on the first virtual machine, the purpose that the first cloud processing resource and the preset first block chain template are used for creating the first block chain system for the first block chain link point on the first virtual machine is achieved, the technical effect that a plurality of nodes included in the block chain are rapidly deployed in a container according to the block chain template is achieved, and the technical problem that in the prior art, the deployment efficiency of the block chain is low is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a schematic diagram of an application environment of an alternative method for creating a blockchain system according to an embodiment of the invention;
FIG. 2 is a flow chart of an alternative method of creation of a blockchain system according to an embodiment of the present invention;
FIG. 3 is a block diagram of an alternative container platform based blockchain system management method according to embodiments of the present invention;
FIG. 4 is a block chain system for creating an alternative block chain system according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an alternative method for creating a blockchain system according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an aspect of the embodiments of the present invention, a method for creating a blockchain system is provided, and optionally, as an optional implementation manner, the method for creating a blockchain system may be applied, but not limited, to the environment shown in fig. 1.
Optionally, in this embodiment, the above creation method of the blockchain system may be applied, but not limited to, in the server 112, for creating the blockchain system according to the blockchain template in the virtual machine in the container. The virtual machine may be, but is not limited to, run in the user equipment 102, and the user equipment 102 may be, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a PC, and other terminal devices that support running of the application client. The server 112 and the user device 102 may implement data interaction through a network, which may include but is not limited to a wireless network or a wired network. Wherein, this wireless network includes: bluetooth, WIFI, and other networks that enable wireless communication. Such wired networks may include, but are not limited to: wide area networks, metropolitan area networks, and local area networks. The above is merely an example, and this is not limited in this embodiment.
Wherein the creation of the blockchain system of steps S102-106 is performed in the server.
Optionally, as an optional implementation manner, as shown in fig. 2, the creating method of the blockchain system includes:
step S202, a first creation request is obtained, where the first creation request is used to request creation of a first blockchain system for a first blockchain link point on a first blockchain.
Step S204, creating a first virtual machine for a first blockchain link node in a first container created for the first blockchain, and allocating a first cloud processing resource to the first virtual machine, where the first cloud processing resource is a part of processing resources in first target cloud processing resources of the first container, the first target cloud processing resource is used for being allocated to a blockchain system created for the blockchain node on the first blockchain, and the first target cloud processing resource includes at least one of: computing resources on the target cloud, storage resources on the target cloud.
In step S206, a first blockchain system is created for the first blockchain link point on the first virtual machine using the first cloud processing resource and a predetermined first blockchain template.
Optionally, in this embodiment, nodes in the blockchain may be deployed and run in a container, and the container platform based blockchain system management may be performed. After adding labels to the computing nodes of all users in the block chain, adding the computing nodes into a container management platform, generating corresponding configuration for the current block chain network by using a uniform block chain service configuration template, and quickly starting block chain service in a container mode.
In this embodiment, the creating request for creating the first blockchain system may be obtained by a server or a terminal, and the first blockchain may be created in the virtual machine by the creating request. The first blockchain may include, but is not limited to, a financial blockchain system, an educational blockchain system, and a sports blockchain system.
It should be noted that the first blockchain system may include a plurality of nodes, for example, a blockchain of education type includes 4 nodes.
Optionally, in this embodiment, a part of the processing resources is allocated to the first virtual machine in the cloud processing resources. For example, a first virtual machine is allocated 5T of storage resources and/or 5G of computing resources on the public cloud.
Optionally, in this embodiment, an independent VPC network (Virtual Private network, namely, a network that a user can customize) may be allocated to the blockchain system that the user needs to deploy through an interface, so as to ensure the security and isolation of the blockchain system.
It should be noted that, after labeling the user resources, the user resources are added to the container management platform, for example, the virtual machine purchased by the user a is labeled with VM-a, and the virtual machine purchased by the user B is labeled with VM-B. I.e., multiple virtual machines may be running in the container platform.
Optionally, in this embodiment, creating a first blockchain system for the first blockchain link point on the first virtual machine using the first cloud processing resource and a predetermined first blockchain template may include:
deploying a target blockchain service for the first blockchain link point on the first virtual machine by using a first blockchain template, wherein the first blockchain template comprises service parameters and/or service interfaces of the target blockchain service, and the target blockchain service is set to use part or all of the first cloud processing resources.
And generating corresponding configuration files for all nodes of the current block chain system through uniform template service, and distributing the nodes of the user to the specified virtual machine in the configuration files. The nodes in the first blockchain system are transported in a container mode, and the blockchain system is supported to be rapidly deployed on various container platforms and dynamically adjust organization and nodes through dynamic blockchain templates and configuration management, so that the problem that the blockchain system is difficult to land is solved.
According to the embodiment provided by the application, a first creation request is obtained, wherein the first creation request is used for requesting to create a first blockchain system for a first blockchain link point on a first blockchain; creating a first virtual machine for a first blockchain link point in a first container created for a first blockchain, and allocating first cloud processing resources for the first virtual machine, wherein the first cloud processing resources are part of first target cloud processing resources possessed by the first container, the first target cloud processing resources are used for allocating a blockchain system created for the blockchain node on the first blockchain, and the first target cloud processing resources include at least one of the following: computing resources on a target cloud, storage resources on the target cloud; the first cloud processing resource and the preset first block chain template are used for creating the first block chain system for the first block chain link point on the first virtual machine, the purpose that the first cloud processing resource and the preset first block chain template are used for creating the first block chain system for the first block chain link point on the first virtual machine is achieved, the technical effect that a plurality of nodes included in the block chain are rapidly deployed in a container according to the block chain template is achieved, and the technical problem that in the prior art, the deployment efficiency of the block chain is low is solved.
As an alternative embodiment, deploying a target blockchain service for a first blockchain link point on a first virtual machine using a first blockchain template further comprises: sending a configuration instruction of a first block chain template to a first virtual machine; and receiving a first virtual machine response configuration instruction so as to enable the first virtual machine to serve the target block chain for the first block chain link point deployment.
The method comprises the steps of generating corresponding configuration files for all nodes of a current block chain system through unified template service, distributing the nodes of a user to a specified virtual machine in the configuration files, supporting rapid deployment and dynamic adjustment organization and nodes of the block chain system on various container platforms through dynamic template and configuration management, and solving the problem of difficult landing of the block chain system.
As an alternative embodiment, at least one of the following is also included:
modifying a first service parameter of a first blockchain service included in the first blockchain template into a second service parameter, wherein the first blockchain service is a service in a first blockchain system;
deleting a third service parameter of the first blockchain service included in the first blockchain template;
adding a fourth service parameter of the first blockchain service in the first blockchain template;
deleting all service parameters of the first block chain service in the first block chain template;
and adding a fifth service parameter of a second blockchain service in the first blockchain template, wherein the second blockchain service is a service in the first blockchain system.
As an alternative embodiment, the method further comprises the following steps:
s1, acquiring a second creation request, where the second creation request is used to request to create a second blockchain system for a second blockchain link point on the first blockchain;
s2, creating a second virtual machine for the second block link node in the first container, and allocating a second cloud processing resource to the second virtual machine, where the second cloud processing resource is a processing resource different from the first cloud processing resource in the first target cloud processing resource;
s3, a second blockchain system is created for the second blockchain link point on the second virtual machine using the second cloud processing resources and the first blockchain template.
In this embodiment, a second blockchain system may be established, and the cloud processing resources allocated by the second blockchain system are different from the cloud processing resources allocated by the first blockchain system.
As an alternative embodiment, the method further comprises the following steps:
s1, allocating a first target cloud processing resource for the first container on the target cloud;
s2, allocating a second target cloud processing resource for the second container on the target cloud, wherein the first target cloud processing resource is isolated from the second target cloud processing resource, the second target cloud processing resource is used for allocating to the blockchain system created for the blockchain node on the second blockchain, and the second target cloud processing resource includes at least one of: computing resources on the target cloud, storage resources on the target cloud.
In this embodiment, a block chain system is run in a virtual machine, different virtual machines correspond to different management containers, and different computing resources and different storage resources are allocated to different containers in cloud processing resources.
Optionally, the manner of isolating the first target cloud processing resource from the second target cloud processing resource includes at least one of:
the first method is as follows: the first target cloud processing resource is isolated from the used computational resources of the second target cloud processing resource.
The second method comprises the following steps: the first target cloud processing resource is isolated from the used storage resource of the second target cloud processing resource.
The third method comprises the following steps: the used networks of the first target cloud processing resource and the second target cloud processing resource are isolated from each other.
As an optional embodiment, after allocating the second target cloud processing resource for the second container on the target cloud, the method further includes:
acquiring a third creation request, wherein the third creation request is used for requesting to create a second blockchain system for a third blockchain node on a second blockchain;
creating a third virtual machine for a third blockchain node in a second container created for the second blockchain, and allocating third cloud processing resources for the third virtual machine, wherein the third cloud processing resources are part of second target cloud processing resources of the second container;
a second blockchain system is created for the third blockchain node on the third virtual machine using the third cloud processing resources and a predetermined second blockchain template.
In this embodiment, a second blockchain system is created for a third blockchain node in the virtual machine at a blockchain node that can be newly added to the second blockchain. According to the storage type supported by the current block chain system, the corresponding storage CBS/NAS/COS is selected for the user, and the reliability and the expandability of the storage can be ensured.
It should be noted that, after the service is started, the container management platform will ensure that the number of instances of the blockchain node is consistent with the expectation according to the configuration of the template, thereby achieving high availability of the service.
In combination with the above embodiments, the present invention further provides an alternative example, a container platform-based block chain system management method.
Fig. 2 is a schematic structural diagram of a container platform-based blockchain system management method according to an embodiment of the present invention.
As shown in fig. 2, in this architecture, service template orchestration compatible with multi-platform template orchestration is included, e.g., cloud 1: kubernets, cloud 2: tencent cloud, cloud 3: gaiaftack.
The computing resources are isolated by tags, i.e., virtual machines of different tags correspond to different computing resources in the public cloud and/or the private cloud. The method comprises the following steps: the resources are ordered, Organization 1(org1) resources, org2 resources.
The system comprises stateful services, a reliability coordination system of a zookeeper distributed system, a Kafka (Apache Kafka) open source stream processing platform and orderer node deployment.
Stateless services, nginx, a high performance HTTP and reverse proxy web server. Monitor, output, management.
Multi-instance load balancing, domain name customization/resolution, clusterip access load balancing.
In the embodiment of the invention, based on the block chain system management scheme of the container platform, an independent VPC network is distributed for each block chain network, computing nodes of all users are added with labels respectively and then added into the container management platform, then a unified block chain service configuration template is used for generating corresponding configuration for the current block chain network, and then the block chain service is started rapidly in a container mode.
Step 1, an independent VPC network (Virtual Private network, namely, a network which can be customized by a user) is allocated to a blockchain system which needs to be deployed by the user through an interface, so that the safety and the isolation of the blockchain system are ensured;
step 2, after labeling user resources, adding the user resources into a container management platform, wherein if a virtual machine purchased by a user A is labeled with a label VM-A, and a virtual machine purchased by a user B is labeled with a label VM-B;
step 3, generating corresponding configuration files for all nodes of the current block chain system through unified template service, and distributing the nodes of the user to a specified virtual machine in the configuration files;
step 4, selecting a corresponding Storage CBS (Cloud Block Service Block-level Network Storage Service)/NAS (Network Attached Storage Network)/COS (Cloud Object Storage) for the user according to the Storage type supported by the current system, so that the reliability and the expandability of the Storage can be ensured;
and 5, after the service is started, the container management platform can ensure that the number of the instances of the block chain nodes is consistent with the expectation according to the configuration of the template, so that the high availability of the service is realized.
By the embodiment provided by the application, the network isolation of the block chain system is ensured through the independent VPC network, and the safety is improved; the nodes are transported in a container mode, and the block chain system is supported to be rapidly deployed on various container platforms and dynamically adjust organization and nodes through dynamic templates and configuration management, so that the problem of falling to the ground of the block chain system is solved; the account book storage in various forms such as a local disk, a cloud hard disk, a shared cloud disk, COS storage and the like is supported through an abstract storage interface of the container platform, and the problems of high availability and capacity expansion of the account book storage are solved; the nodes are deployed in the form of dynamic resources, so that the dynamic migration is supported while the resource isolation is ensured, and the high availability of services can be ensured.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
According to another aspect of the embodiments of the present invention, there is also provided a device for creating a blockchain system, which is used for implementing the method for creating a blockchain system. As shown in fig. 4, the apparatus includes: a first acquisition unit 41, a first allocation unit 43 and a first creation unit 45.
A first obtaining unit 41, configured to obtain a first creation request, where the first creation request is used to request that a first blockchain system be created for a first blockchain link point on a first blockchain.
A first allocating unit 43, configured to create a first virtual machine for a first blockchain link point in a first container created for a first blockchain, and allocate a first cloud processing resource to the first virtual machine, where the first cloud processing resource is a part of first target cloud processing resources that the first container has, and the first target cloud processing resource is used to be allocated to a blockchain system created for blockchain nodes on the first blockchain, and the first target cloud processing resource includes at least one of: computing resources on the target cloud, storage resources on the target cloud.
A first creating unit 45 for creating a first blockchain system for the first blockchain link point on the first virtual machine using the first cloud processing resource and a predetermined first blockchain template.
The first creating unit 45 may include: the deployment module is used for deploying target block chain services for the first block chain link points on the first virtual machine by using a first block chain template, wherein the first block chain template comprises service parameters and/or service interfaces of the target block chain services, and the target block chain services are set to use part or all of the first cloud processing resources.
It should be noted that, the deployment module includes: the sending submodule is used for sending a configuration instruction of the first block chain template to the first virtual machine; and the receiving submodule is used for receiving the first virtual machine response configuration instruction so as to enable the first virtual machine to serve the first block chain link point deployment target block chain.
By the embodiment provided by the present application, the first obtaining unit 41 obtains a first creation request, where the first creation request is used to request that a first blockchain system is created for a first blockchain link point on a first blockchain; the first allocation unit 43 creates a first virtual machine for a first blockchain link point in a first container created for the first blockchain, and allocates a first cloud processing resource to the first virtual machine, where the first cloud processing resource is a part of a first target cloud processing resource that the first container has, and the first target cloud processing resource is used for being allocated to a blockchain system created for the blockchain node on the first blockchain, and the first target cloud processing resource includes at least one of: computing resources on a target cloud, storage resources on the target cloud; the first creation unit 45 creates a first blockchain system for the first blockchain link point on the first virtual machine using the first cloud processing resource and a predetermined first blockchain template. The purpose of establishing the first block chain system for the first block chain link point on the first virtual machine by using the first cloud processing resource and the preset first block chain template is achieved, so that the technical effect of rapidly deploying a plurality of nodes in the block chain in the container according to the block chain template is achieved, and the technical problem that in the prior art, the deployment efficiency of the block chain is low is solved.
As an alternative embodiment, the above apparatus further comprises at least one of:
a first modifying unit, configured to modify a first service parameter of a first blockchain service included in the first blockchain template into a second service parameter, where the first blockchain service is a service in a first blockchain system;
a first deleting unit, configured to delete the third service parameter of the first blockchain service included in the first blockchain template;
a first adding unit, configured to add a fourth service parameter of the first blockchain service to the first blockchain template;
a second deleting unit, configured to delete all service parameters of the first blockchain service in the first blockchain template;
a second adding unit, configured to add a fifth service parameter of a second blockchain service to the first blockchain template, where the second blockchain service is a service in the first blockchain system.
As an alternative embodiment, the above apparatus further comprises at least one of:
a second modification unit, configured to modify a first service interface of a first blockchain service included in the first blockchain template into a second service interface, where the first blockchain service is a service in the first blockchain system;
a third deleting unit, configured to delete a third service interface of the first blockchain service included in the first blockchain template;
a third adding unit, configured to add a fourth service interface of the first blockchain service to the first blockchain template;
a fourth deleting unit, configured to delete all service interfaces of the first blockchain service in the first blockchain template;
a fourth adding unit, configured to add a fifth service interface of a second blockchain service to the first blockchain template, where the second blockchain service is a service in the first blockchain system.
As an alternative embodiment, the above apparatus may further comprise:
a second obtaining unit, configured to obtain a second creation request, where the second creation request is used to request that a second blockchain system be created for a second blockchain link point on the first blockchain;
a second allocating unit, configured to create a second virtual machine for the second block link node in the first container, and allocate a second cloud processing resource to the second virtual machine, where the second cloud processing resource is a processing resource different from the first cloud processing resource in the first target cloud processing resource;
a second creating unit for creating a second blockchain system for the second blockchain link point on the second virtual machine using the second cloud processing resource and the first blockchain template.
As an alternative embodiment, the above apparatus may further comprise:
a third allocation unit, configured to allocate a first target cloud processing resource for the first container on the target cloud;
a fourth allocation unit, configured to allocate a second target cloud processing resource for the second container on the target cloud, where the first target cloud processing resource is isolated from the second target cloud processing resource, the second target cloud processing resource is used for being allocated to a blockchain system created for blockchain nodes on the second blockchain, and the second target cloud processing resource includes at least one of: computing resources on the target cloud, storage resources on the target cloud.
Wherein, the fourth distribution unit comprises at least one of the following components:
the first isolation module is used for isolating the first target cloud processing resource from the used operation resource of the second target cloud processing resource;
a second isolation module for isolating the first target cloud processing resource from the used storage resource of the second target cloud processing resource;
and the third isolation module is used for isolating the used networks of the first target cloud processing resource and the second target cloud processing resource from each other.
As an alternative embodiment, the above apparatus may further comprise:
a third obtaining unit, configured to obtain a third creation request after allocating a second target cloud processing resource to the second container on the target cloud, where the third creation request is used to request to create a second blockchain system for a third blockchain node on the second blockchain;
a fifth allocating unit, configured to create a third virtual machine for a third blockchain node in a second container created for the second blockchain, and allocate a third cloud processing resource to the third virtual machine, where the third cloud processing resource is a part of processing resources in second target cloud processing resources that the second container has;
a third creating unit, configured to create a second blockchain system for the third blockchain node on the third virtual machine using the third cloud processing resource and a predetermined second blockchain template.
According to another aspect of the embodiment of the present invention, there is also provided an electronic apparatus for implementing the method for creating a blockchain system, as shown in fig. 4, the electronic apparatus includes a memory 402 and a processor 404, the memory 402 stores a computer program, and the processor 404 is configured to execute the steps in any one of the method embodiments through the computer program.
Optionally, in this embodiment, the electronic apparatus may be located in at least one network device of a plurality of network devices of a computer network.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, acquiring a first creation request, where the first creation request is used to request to create a first blockchain system for a first blockchain link point on a first blockchain;
s2, creating a first virtual machine for a first blockchain link point in a first container created for the first blockchain, and allocating a first cloud processing resource to the first virtual machine, where the first cloud processing resource is a part of a first target cloud processing resource possessed by the first container, and the first target cloud processing resource is used for being allocated to a blockchain system created for the blockchain node on the first blockchain, and the first target cloud processing resource includes at least one of: computing resources on a target cloud, storage resources on the target cloud;
s3, a first blockchain system is created for the first blockchain link point on the first virtual machine using the first cloud processing resources and a predetermined first blockchain template.
Alternatively, it can be understood by those skilled in the art that the structure shown in fig. 4 is only an illustration, and the electronic device may also be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a Mobile Internet Device (MID), a PAD, and the like. Fig. 4 is a diagram illustrating the structure of the electronic device. For example, the electronic device may also include more or fewer components (e.g., network interfaces, etc.) than shown in FIG. 4, or have a different configuration than shown in FIG. 4.
The memory 402 may be used to store software programs and modules, such as program instructions/modules corresponding to the method and apparatus for creating a blockchain system in the embodiment of the present invention, and the processor 404 executes various functional applications and data processing by running the software programs and modules stored in the memory 402, that is, implements the method for creating a blockchain system described above. The memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 402 may further include memory located remotely from the processor 404, which may be connected to the terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. The memory 402 may specifically, but not limited to, store attribute information, container information, and other information of a node of the block chain. As an example, as shown in fig. 4, the memory 402 may include, but is not limited to, the first obtaining unit 31, the first allocating unit 33, and the first creating unit 35 in the creating apparatus of the blockchain system. In addition, the present invention may further include, but is not limited to, other module units in the creation apparatus of the blockchain system, which is not described in this example again.
Optionally, the transmission device 406 is used for receiving or sending data via a network. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 406 includes a Network adapter (NIC) that can be connected to a router via a Network cable and other Network devices to communicate with the internet or a local area Network. In one example, the transmission device 406 is a Radio Frequency (RF) module, which is used to communicate with the internet in a wireless manner.
According to a further aspect of an embodiment of the present invention, there is also provided a computer-readable storage medium having a computer program stored thereon, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
Alternatively, in the present embodiment, the above-mentioned computer-readable storage medium may be configured to store a computer program for executing the steps of:
s1, acquiring a first creation request, where the first creation request is used to request to create a first blockchain system for a first blockchain link point on a first blockchain;
s2, creating a first virtual machine for a first blockchain link point in a first container created for the first blockchain, and allocating a first cloud processing resource to the first virtual machine, where the first cloud processing resource is a part of a first target cloud processing resource possessed by the first container, and the first target cloud processing resource is used for being allocated to a blockchain system created for the blockchain node on the first blockchain, and the first target cloud processing resource includes at least one of: computing resources on a target cloud, storage resources on the target cloud;
s3, a first blockchain system is created for the first blockchain link point on the first virtual machine using the first cloud processing resources and a predetermined first blockchain template.
Alternatively, in this embodiment, a person skilled in the art may understand that all or part of the steps in the methods of the foregoing embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing one or more computer devices (which may be personal computers, servers, network devices, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (15)

1. A method for creating a blockchain system, comprising:
acquiring a first creation request, wherein the first creation request is used for requesting to create a first blockchain system for a first blockchain link point on a first blockchain;
creating a first virtual machine for the first blockchain link node in a first container created for the first blockchain, and allocating first cloud processing resources to the first virtual machine, wherein the first cloud processing resources are part of first target cloud processing resources that the first container has, the first target cloud processing resources being for allocation to a blockchain system created for blockchain nodes on the first blockchain, the first target cloud processing resources including at least one of: computing resources on a target cloud, storage resources on the target cloud;
creating the first blockchain system for the first blockchain link point on the first virtual machine using the first cloud processing resource and a predetermined first blockchain template.
2. The method of claim 1, wherein creating the first blockchain system for the first blockchain link point on the first virtual machine using the first cloud processing resource and a predetermined first blockchain template comprises:
deploying a target blockchain service for the first blockchain link point on the first virtual machine by using the first blockchain template, wherein the first blockchain template comprises service parameters and/or service interfaces of the target blockchain service, and the target blockchain service is set to use part or all of the first cloud processing resources.
3. The method of claim 2, wherein the first blockchain template is used to service the first blockchain link point deployment target blockchain on the first virtual machine, the method further comprising:
sending a configuration instruction of the first block chain template to the first virtual machine;
and receiving the first virtual machine responding to the configuration instruction so as to serve the first block chain link point deployment target block chain on the first virtual machine.
4. The method of claim 1, further comprising at least one of:
modifying a first service parameter of a first blockchain service included in the first blockchain template into a second service parameter, wherein the first blockchain service is a service in the first blockchain system;
deleting a third service parameter of the first blockchain service included in the first blockchain template;
adding a fourth service parameter of the first blockchain service in the first blockchain template;
deleting all service parameters of the first blockchain service in the first blockchain template;
adding a fifth service parameter of a second blockchain service to the first blockchain template, wherein the second blockchain service is a service in the first blockchain system.
5. The method of claim 1, further comprising at least one of:
modifying a first service interface of a first blockchain service included in the first blockchain template into a second service interface, wherein the first blockchain service is a service in the first blockchain system;
deleting a third service interface of the first blockchain service included in the first blockchain template;
adding a fourth service interface of the first blockchain service in the first blockchain template;
deleting all service interfaces of the first blockchain service in the first blockchain template;
adding a fifth service interface of a second blockchain service to the first blockchain template, wherein the second blockchain service is a service in the first blockchain system.
6. The method of claim 1, further comprising:
obtaining a second creation request, where the second creation request is used to request creation of a second blockchain system for a second blockchain link point on the first blockchain;
creating a second virtual machine for the second block chain node in the first container, and allocating a second cloud processing resource for the second virtual machine, wherein the second cloud processing resource is a different processing resource of the first target cloud processing resources than the first cloud processing resource;
creating the second blockchain system for the second blockchain link point on the second virtual machine using the second cloud processing resources and the first blockchain template.
7. The method of claim 1, further comprising:
allocating the first target cloud processing resources for the first container on the target cloud;
allocating second target cloud processing resources for a second container on the target cloud, wherein the first target cloud processing resources are isolated from the second target cloud processing resources for allocation to a blockchain system created for blockchain nodes on a second blockchain, the second target cloud processing resources including at least one of: computing resources on the target cloud, storage resources on the target cloud.
8. The method of claim 7, wherein the first target cloud processing resource is sequestered from the second target cloud processing resource by at least one of:
the first target cloud processing resource is isolated from the operational resources used by the second target cloud processing resource;
the first target cloud processing resource is isolated from the used storage resource of the second target cloud processing resource;
the used networks of the first target cloud processing resource and the second target cloud processing resource are isolated from each other.
9. The method of claim 7, wherein after allocating second target cloud processing resources for a second container on the target cloud, the method further comprises:
obtaining a third creation request, where the third creation request is used to request creation of a second blockchain system for a third blockchain node on the second blockchain;
creating a third virtual machine for the third blockchain node in the second container created for the second blockchain, and allocating third cloud processing resources for the third virtual machine, wherein the third cloud processing resources are part of the second target cloud processing resources that the second container has;
creating the second blockchain system for the third blockchain node on the third virtual machine using the third cloud processing resources and a predetermined second blockchain template.
10. An apparatus for creating a blockchain system, comprising:
a first obtaining unit, configured to obtain a first creation request, where the first creation request is used to request creation of a first blockchain system for a first blockchain link point on a first blockchain;
a first allocation unit, configured to create a first virtual machine for the first blockchain link node in a first container created for the first blockchain, and allocate a first cloud processing resource to the first virtual machine, where the first cloud processing resource is a part of first target cloud processing resources that the first container has, and the first target cloud processing resource is used to be allocated to a blockchain system created for the blockchain link node on the first blockchain, and the first target cloud processing resource includes at least one of: computing resources on a target cloud, storage resources on the target cloud;
a first creating unit to create the first blockchain system for the first blockchain link point on the first virtual machine using the first cloud processing resource and a predetermined first blockchain template.
11. The apparatus of claim 10, wherein the first creating unit comprises:
a deployment module, configured to deploy a target blockchain service for the first blockchain link point on the first virtual machine using the first blockchain template, where the first blockchain template includes service parameters and/or service interfaces of the target blockchain service, and the target blockchain service is configured to use part or all of the first cloud processing resources.
12. The apparatus of claim 11, wherein the deployment module comprises:
the sending submodule is used for sending a configuration instruction of the first block chain template to the first virtual machine;
a receiving submodule, configured to receive the configuration instruction responded by the first virtual machine, so as to service the first block link point deployment target block chain on the first virtual machine.
13. The apparatus of claim 10, further comprising at least one of:
a first modifying unit, configured to modify a first service parameter of a first blockchain service included in the first blockchain template into a second service parameter, where the first blockchain service is a service in the first blockchain system;
a first deleting unit, configured to delete a third service parameter of the first blockchain service included in the first blockchain template;
a first adding unit, configured to add a fourth service parameter of the first blockchain service to the first blockchain template;
a second deleting unit, configured to delete all service parameters of the first blockchain service in the first blockchain template;
a second adding unit, configured to add a fifth service parameter of a second blockchain service to the first blockchain template, where the second blockchain service is a service in the first blockchain system.
14. A storage medium comprising a stored program, wherein the program when executed performs the method of any of claims 1 to 9.
15. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 9 by means of the computer program.
CN201911344962.8A 2019-12-24 2019-12-24 Method and device for creating block chain system, storage medium and electronic device Active CN111124617B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911344962.8A CN111124617B (en) 2019-12-24 2019-12-24 Method and device for creating block chain system, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911344962.8A CN111124617B (en) 2019-12-24 2019-12-24 Method and device for creating block chain system, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN111124617A CN111124617A (en) 2020-05-08
CN111124617B true CN111124617B (en) 2021-03-16

Family

ID=70501690

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911344962.8A Active CN111124617B (en) 2019-12-24 2019-12-24 Method and device for creating block chain system, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN111124617B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112529711B (en) * 2021-02-07 2021-05-14 腾讯科技(深圳)有限公司 Transaction processing method and device based on block chain virtual machine multiplexing
CN113220793A (en) * 2021-06-04 2021-08-06 杭州复杂美科技有限公司 Block chain rapid customization method, equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108615195A (en) * 2018-04-28 2018-10-02 腾讯科技(深圳)有限公司 Transmission method and device, storage medium, the electronic device of resource transfers information
CN109213568A (en) * 2018-08-16 2019-01-15 北京京东尚科信息技术有限公司 A kind of block chain network service platform and its dispositions method, storage medium
CN109462508A (en) * 2018-11-30 2019-03-12 北京百度网讯科技有限公司 Node deployment method, device and storage medium
CN109743328A (en) * 2019-01-17 2019-05-10 杭州趣链科技有限公司 A kind of open cloud service platform of block chain
CN110378691A (en) * 2019-06-18 2019-10-25 重庆金融资产交易所有限责任公司 Block chain dispositions method, device and computer equipment based on deployment center
CN110392052A (en) * 2019-07-22 2019-10-29 中国工商银行股份有限公司 A kind of block chain intelligence contract processing system and method
CN110602138A (en) * 2019-09-26 2019-12-20 腾讯科技(深圳)有限公司 Data processing method and device for block chain network, electronic equipment and storage medium
CN110597888A (en) * 2019-09-29 2019-12-20 腾讯科技(深圳)有限公司 Method, device, medium and equipment for acquiring virtual resources based on block chains

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170337534A1 (en) * 2015-11-06 2017-11-23 Cable Television Laboratories, Inc Systems and methods for blockchain virtualization and scalability
US10396997B2 (en) * 2016-12-14 2019-08-27 International Business Machines Corporation Container-based operating system and method
CN110147915A (en) * 2018-02-11 2019-08-20 陕西爱尚物联科技有限公司 A kind of method and its system of resource distribution
CN108648071B (en) * 2018-05-17 2020-05-19 阿里巴巴集团控股有限公司 Resource value evaluation method and device based on block chain
CN110310106A (en) * 2019-07-15 2019-10-08 浪潮云信息技术有限公司 A kind of public cloud distributed integration system based on block chain

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108615195A (en) * 2018-04-28 2018-10-02 腾讯科技(深圳)有限公司 Transmission method and device, storage medium, the electronic device of resource transfers information
CN109213568A (en) * 2018-08-16 2019-01-15 北京京东尚科信息技术有限公司 A kind of block chain network service platform and its dispositions method, storage medium
CN109462508A (en) * 2018-11-30 2019-03-12 北京百度网讯科技有限公司 Node deployment method, device and storage medium
CN109743328A (en) * 2019-01-17 2019-05-10 杭州趣链科技有限公司 A kind of open cloud service platform of block chain
CN110378691A (en) * 2019-06-18 2019-10-25 重庆金融资产交易所有限责任公司 Block chain dispositions method, device and computer equipment based on deployment center
CN110392052A (en) * 2019-07-22 2019-10-29 中国工商银行股份有限公司 A kind of block chain intelligence contract processing system and method
CN110602138A (en) * 2019-09-26 2019-12-20 腾讯科技(深圳)有限公司 Data processing method and device for block chain network, electronic equipment and storage medium
CN110597888A (en) * 2019-09-29 2019-12-20 腾讯科技(深圳)有限公司 Method, device, medium and equipment for acquiring virtual resources based on block chains

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
区块链系统中智能合约技术综述;范吉立等;《计算机科学》;20191130(第11期);第1-10页 *

Also Published As

Publication number Publication date
CN111124617A (en) 2020-05-08

Similar Documents

Publication Publication Date Title
US20200090172A1 (en) Containerization of network services
US10798016B2 (en) Policy-based scaling of network resources
CN106843828B (en) Interface display and loading method and device
CN111124617B (en) Method and device for creating block chain system, storage medium and electronic device
US20190109756A1 (en) Orchestrator for a virtual network platform as a service (vnpaas)
CN106201661B (en) Method and apparatus for elastic telescopic cluster virtual machine
CN106301829A (en) A kind of method and apparatus of Network dilatation
US10749740B2 (en) Deploying network-based cloud platforms on end equipment
CN102752137B (en) The apparatus and method of virtual machine network parameter are initiatively set
CN102945175A (en) Terminal software online upgrading system and method based on cloud computing environment
CN107580083A (en) A kind of method and system of container IP address distribution
CN105827428A (en) Management method and device of asset information
CN109074283A (en) The M2M service layer based on pond is established by NFV
CN105450450A (en) Virtual network parameter configuration method and device
CN106453576B (en) A kind of exchange method, system and control centre based on mixing cloud platform
Selimi et al. Distributed storage and service discovery for heterogeneous community network clouds
Maciel et al. A marketplace-based approach to cloud network slice composition across multiple domains
CN111130900A (en) Data acquisition method and device based on distributed interconnection of coordination services
CN109144485B (en) Micro-service deployment method, device, equipment and readable storage medium
CN107870771A (en) Application builds and upgrade method and system
Mangal et al. Flexible cloud computing by integrating public-private clouds using openstack
CN103425707A (en) Data analyzing method and data analyzing device
CN106961453A (en) Service calling method and device based on TOSCA
JP6357256B1 (en) Relay device and program
CN110109684A (en) Block chain node administration agent services installation method, electronic device and storage medium

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
GR01 Patent grant
GR01 Patent grant