Block chain network network-building method, device, equipment and readable storage medium storing program for executing
Technical field
The present embodiments relate to field of communication technology more particularly to a kind of block chain network network-building methods, device, equipment
And readable storage medium storing program for executing.
Background technique
With the continuous development of internet, block chain technology is come into being, it is a kind of internet database technology, is had
Decentralization, open and clear feature.Specifically, the essence of block chain technology is decentralization and the number for residing in distributed frame
According to the method for storage, transmission and proof, replace dependence of the current internet to central server with data block, so that all numbers
According to change or trading item be all recorded on a cloud system.Due to the distributed peer-to-peer network of not no central control point
Network, and use the method for distributed collective's running, it may be said that block chain is " to disclose big account book " on network.It, which exists, is permitted
Multinode, each node can observe entire account book, and participate in maintenance jointly, and income is then the power for obtaining book keeping operation
Benefit, and a complete database can be replicated, individual node can not modify database, to ensure that the peace of account book data
It is complete reliable.
Block chain technology is typically based on P2P (Peer to Peer, peer-to-peer network), the group in the prior art based on block chain
Network method be the network-building method based on cloud service, by cloud service platform by the certificate of participant, address, alliance chain member certificate
The configuration informations such as management (Membership Service Provider, abbreviation MSP) information are distributed to other participants, and group
Establishing network;But use centralization mechanism, group network process depend on centered on cloud service platform, group network process it is opaque,
It is insincere.
Summary of the invention
The embodiment of the present invention provides a kind of block chain network network-building method, device, equipment and readable storage medium storing program for executing, to solve
Network-building method certainly in the prior art based on block chain uses centralization mechanism, organizes the cloud service centered on network process depends on
Platform, group network process is opaque, incredible problem.
The one aspect of the embodiment of the present invention is to provide a kind of block chain network network-building method, comprising:
First participation method, apparatus generates the MSP information of itself;
The MSP information of itself is sent to other and participates in method, apparatus by the first participation method, apparatus, and receives other participations
The MSP information that method, apparatus is sent;
Receive initiate networking instruction when, described first, which participates in method, apparatus, obtains original block configuration information, and by institute
It states original block configuration information and is sent to other participation method, apparatus, configured so that other participate in method, apparatus according to the original block
Information configuration Local Node Information simultaneously starts local node;
Described first, which participates in method, apparatus, obtains local node configuration information, and is completed according to the local node configuration information
The configuration of local node;
Described first, which participates in method, apparatus, starts local node.
The other side of the embodiment of the present invention is to provide a kind of block chain network network device, comprising:
MSP information generating module generates the MSP information of itself for the first participation method, apparatus;
The MSP information of itself is sent to other participants for the first participation method, apparatus by MSP information exchange module
Equipment, and receive other and participate in the MSP information that method, apparatus is sent;
Original block configuration module, for when receiving initiation networking instruction, described first to participate in method, apparatus acquisition just
Beginning block arrangement information, and the original block configuration information is sent to other and participates in method, apparatus, so that other participants are set
It is standby that Local Node Information is configured according to the original block configuration information and starts local node;
Local node configuration module participates in method, apparatus for described first and obtains local node configuration information, and according to institute
State the configuration that local node configuration information completes local node;
Starting module participates in method, apparatus for described first and starts local node.
The other side of the embodiment of the present invention is to provide a kind of block chain network networking equipment, comprising:
Memory, processor and computer program;
Wherein, the computer program stores in the memory, and is configured as being executed by the processor with reality
Existing method described above.
The other side of the embodiment of the present invention is to provide a kind of computer readable storage medium, is stored with computer journey
Sequence,
The computer program realizes method described above when being executed by processor.
Block chain network network-building method, device, equipment and readable storage medium storing program for executing provided in an embodiment of the present invention, pass through first
Participate in the MSP information that method, apparatus generates itself;The MSP information of itself is sent to other participants and set by the first participation method, apparatus
It is standby, and receive other and participate in the MSP information that method, apparatus is sent;When receiving initiation networking instruction, the first participation method, apparatus is obtained
Original block configuration information is taken, and original block configuration information is sent to other and participates in method, apparatus, so that other participants are set
It is standby that Local Node Information is configured according to original block configuration information and starts local node;First participate in method, apparatus according to itself
The MSP information and original block configuration information of MSP information, other participation method, apparatus, configure Local Node Information;First ginseng
Start local node with method, apparatus, to complete block chain network networking, is believed by the MSP that each participation method, apparatus voluntarily generates itself
Other participants are ceased and shared to, central server is not necessarily to, participate in completing block chain network jointly by each participation method, apparatus
Networking realizes the networking of decentralization, and group network process is more transparent, more credible.
Detailed description of the invention
Fig. 1 is the block chain network network-building method flow chart that the embodiment of the present invention one provides;
Fig. 2 is block chain network network-building method flow chart provided by Embodiment 2 of the present invention;
Fig. 3 is the block chain network network-building method flow chart that the embodiment of the present invention three provides;
Fig. 4 is the structural schematic diagram for the block chain network network device that the embodiment of the present invention four provides;
Fig. 5 is the structural schematic diagram for the block chain network network device that the embodiment of the present invention six provides;
Fig. 6 is the structural schematic diagram for the block chain network networking equipment that the embodiment of the present invention seven provides.
Through the above attached drawings, it has been shown that the specific embodiment of the present invention will be hereinafter described in more detail.These attached drawings
It is not intended to limit the range of design of the embodiment of the present invention in any manner with verbal description, but by reference to specific reality
Applying example is that those skilled in the art illustrate idea of the invention.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to
When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment
Described in embodiment do not represent all embodiments consistent with the embodiment of the present invention.On the contrary, they be only with
The example of the consistent device and method of as detailed in the attached claim, the embodiment of the present invention some aspects.
Term " first " involved in the embodiment of the present invention, " second " etc. are used for description purposes only, and should not be understood as referring to
Show or imply relative importance or implicitly indicates the quantity of indicated technical characteristic.In the description of following embodiment,
The meaning of " plurality " is two or more, unless otherwise specifically defined.
These specific embodiments can be combined with each other below, may be at certain for the same or similar concept or process
It is repeated no more in a little embodiments.Below in conjunction with attached drawing, the embodiment of the present invention is described.
Embodiment one
Block chain network network-building method provided in an embodiment of the present invention, can be adapted for the communication system of decentralization.It should
Communication system includes multiple users's (hereinafter referred to as participant) for participating in networking, and each participant may include one or more logical
Believe equipment, such as terminal device, cluster device etc..Optionally, application program, such as service journey are installed on the communication equipment
Sequence etc..Participant can submit data information or instruction to terminal device by the user interface that the application program provides, with
It controls communication equipment and sets up block chain network.It is carried out below with reference to building process of the specific embodiment to block chain network detailed
Description.
Fig. 1 is the block chain network network-building method flow chart that the embodiment of the present invention one provides.The embodiment of the present invention is for existing
There is the network-building method based on block chain in technology using centralization mechanism, the cloud service centered on group network process depends on is flat
Platform, group network process is opaque, incredible problem, provides block chain network network-building method.As shown in Figure 1, this method is specific
Steps are as follows:
Step S101, the first participation method, apparatus generates the MSP information of itself.
In the present embodiment, the first participation method, apparatus can be the logical of the responsible establishment block chain network of any one participant
Believe equipment.First participation method, apparatus can be terminal device, be also possible to the equipment such as server cluster, in other embodiments,
This method applies also for other equipment, and the present embodiment is not specifically limited in this embodiment.
Wherein, MSP information refers to certificate management (Membership Service Provider, the abbreviation of alliance chain member
MSP) information.MSP information includes mailing address, MSP identification information and multiple certificates.
One participant corresponds to a MSP identification information, and MSP identification information is for one participant of unique identification
MSP information, for example, MSP identification information can be MSPID.
Step S102, the MSP information of itself is sent to other and participates in method, apparatus by the first participation method, apparatus, and receives other
Participate in the MSP information that method, apparatus is sent.
In the present embodiment, first participates in method, apparatus after the MSP information for generating itself, can be by the MSP information of itself
It is sent to other and participates in method, apparatus, so that other, which participate in method, apparatus, can know the MSP information of the first participation method, apparatus.First ginseng
It can receive other with method, apparatus and participate in the MSP information that method, apparatus is sent.
Step S103, when receiving initiation networking instruction, first, which participates in method, apparatus, obtains original block configuration information, and
Original block configuration information is sent to other and participates in method, apparatus, so that other participate in method, apparatus according to original block configuration information
Configuration Local Node Information simultaneously starts local node.
After each MSP information exchange for participating in method, apparatus is completed, method, apparatus can be participated in by any one and received
Networking is initiated when instructing to initiation networking.
Wherein, original block configuration information includes at least the configuration information and block setting information of ordering joint.Block is set
The mailing address of equipment where confidence breath is serviced including preset common, port numbers, the relevant information that block generates, block size,
The other informations such as the version information of the number and block chain traded in each block and common recognition method.Block setting information is
The information that the need that each participant agrees upon in advance are consistent.Wherein preset common service include: Kafka service and
Zookeeper service etc..
Step S104, first method, apparatus acquisition local node configuration information is participated in, and complete according to local node configuration information
At the configuration of local node.
Wherein, local node includes at least ordering joint and Peer node.
Optionally, the first participation method, apparatus can provide the node for inputting local node configuration information and prepare interface.
First participation method, apparatus receives participant user and configures the local node configuration information that the page is inputted and submitted, and root by node
The configuration of local node is completed according to the local node configuration information got.
Optionally, local node configuration information can be written in default node profile by participant user in advance.
First participation method, apparatus can read local node configuration information from default node profile, and according to the local got
The configuration of node configuration information completion local node.
Step S105, first method, apparatus starting local node is participated in.
In the present embodiment, first, which participates in method, apparatus, can start local node after the configuration for completing local node.Respectively
After a local node for participating in method, apparatus starts, the networking of block chain network can be completed.
Optionally, the first participation method, apparatus can also start local node when receiving enabled instruction.
The embodiment of the present invention generates the MSP information of itself by the first participation method, apparatus;First participate in method, apparatus by itself
MSP information be sent to other participate in method, apparatus, and receive other participate in method, apparatus send MSP information;It is initiated receiving
When networking instructs, first, which participates in method, apparatus, obtains original block configuration information, and original block configuration information is sent to other
Method, apparatus is participated in, Local Node Information is configured according to original block configuration information and starts local section so that other participate in method, apparatus
Point;First, which participates in method, apparatus, matches confidence according to the MSP information, other MSP information for participating in method, apparatus and original block of itself
Breath configures Local Node Information;First, which participates in method, apparatus, starts local node, to complete block chain network networking, by each ginseng
The MSP information of itself is voluntarily generated with method, apparatus and shares to other participants, is not necessarily to central server, is set by each participant
The standby common networking for participating in completing block chain network, realizes the networking of decentralization, group network process is more transparent, more may be used
Letter.
Embodiment two
Fig. 2 is block chain network network-building method flow chart provided by Embodiment 2 of the present invention.In the base of above-described embodiment one
On plinth, in the present embodiment, one or more seed node, the communication of seed node are determined from each participation method, apparatus in advance
Address is disclosed to all participation method, apparatus.The mailing address of itself and MSP identification information are sent to kind by each participation method, apparatus
Child node, so that seed node stores all known mailing addresses and MSP information for participating in method, apparatus.First participates in method, apparatus will
The MSP information of itself is sent to before other participation method, apparatus, further includes: the first participation method, apparatus is sent out to preset seed node
Address acquisition request is sent, address acquisition request includes the mailing address and MSP identification information of the first participation method, apparatus, so that seed
Node sends all known mailing addresses and MSP identification information for participating in method, apparatus to the first participation method, apparatus, and first is joined
All known participation method, apparatus are sent to the mailing address and MSP identification information of method, apparatus, so that all known participants are set
The standby MSP information that itself is sent to the first participation method, apparatus;First, which participates in method, apparatus, receives all known of seed node transmission
Participate in the mailing address and MSP identification information of method, apparatus.As shown in Fig. 2, specific step is as follows for this method:
Step S201, the first participation method, apparatus generates the MSP information of itself.
In the present embodiment, the first participation method, apparatus can be the logical of the responsible establishment block chain network of any one participant
Believe equipment.First participation method, apparatus can be terminal device, be also possible to the equipment such as server cluster, in other embodiments,
This method applies also for other equipment, and the present embodiment is not specifically limited in this embodiment.
Wherein, MSP information refers to certificate management (Membership Service Provider, the abbreviation of alliance chain member
MSP) information.MSP information includes mailing address, MSP identification information and multiple certificates.
One participant corresponds to a MSP identification information, and MSP identification information is for one participant of unique identification
MSP information, for example, MSP identification information can be MSPID.
Specifically, the first participation method, apparatus generates the MSP information of itself, following steps S2011- can be specifically used
S2012 is realized:
S2011, first participate in the identity information that method, apparatus obtains corresponding participant, are believed according to the identity of corresponding participant
Breath generates the certificate of corresponding participant, and certificate includes: signing certificate and communication certificate, signing certificate include administrator certificate and
Non-administrator's certificate.
Optionally, the first participation method, apparatus can provide the identity information for inputting the generation necessary participant of certificate
Certificates constructing interface.Parameter information needed for participant user can input at certificates constructing interface and submit generation certificate.Example
Such as, the domain name of participant, place city, Business Name etc. information relevant to participant identity.First participates in method, apparatus can
To receive the identity information for the participant that participant user is submitted by front end page, according to the participant of participant user submission
Identity information generate the certificate of corresponding participant, it is ensured that the reliability of participant certificate.
Optionally, the identity information for generating the necessary participant of certificate can be written to pre- establishing in advance by participant user
It sets in file.First participation method, apparatus can read the identity letter for generating the necessary participant of certificate from preset configuration file
Breath, and the identity information for the participant submitted according to participant user generates the certificate of corresponding participant.
S2012, the first participation method, apparatus are obtained from the mailing address and MSP identification information of body.
In the present embodiment, the MSP information of the first participation method, apparatus includes the mailing address and MSP mark of the first participation method, apparatus
Know the certificate of participant corresponding to information and the first participation method, apparatus.
Optionally, the first participation method, apparatus can provide the front-end interface for inputting mailing address and MSP identification information,
So that participant user can input in the front-end interface and submit the mailing address and MSP identification information of oneself.First participates in
Method, apparatus can receive the mailing address and MSP mark letter for the first participation method, apparatus that participant user is submitted by front end page
Breath.
Optionally, participant user can also in advance write the mailing address of the first participation method, apparatus and MSP identification information
Enter into preset configuration file.First participation method, apparatus can read itself mailing address and MSP from preset configuration file
Identification information.
Step S202, first method, apparatus is participated in preset seed node transmission address acquisition request, address acquisition request
The mailing address and MSP identification information for participating in method, apparatus including first, so that seed node, which participates in method, apparatus to first, sends institute
There is the known mailing address and MSP identification information for participating in method, apparatus, and the mailing address and MSP that participate in method, apparatus for first identify
Information is sent to all known participation method, apparatus, so that all known participation method, apparatus send itself to the first participation method, apparatus
MSP information.
In the present embodiment, the mailing address of itself and MSP identification information are sent to seed node by each participation method, apparatus,
So that seed node stores all known mailing addresses and MSP information for participating in method, apparatus.
First participation method, apparatus, can be by kind before the MSP information of itself to be sent to other and participates in method, apparatus
Child node sends address acquisition request, and the mailing address and MSP identification information of all participants known are obtained from seed node.
Seed node is when receiving the address acquisition request that any one participates in method, apparatus transmission, seed node storage hair
The mailing address and MSP identification information for sending method, apparatus send all known mailing addresses for participating in method, apparatus to method, apparatus is sent
With MSP identification information;Also, the mailing address for sending method, apparatus and MSP identification information are sent to all known by seed node
Method, apparatus is participated in, so that the MSP information of itself is sent to transmission method, apparatus by all known participation method, apparatus.
Optionally, one or more seed node can be preset in the present embodiment.If seed node be it is multiple,
It is synchronized on multiple seed nodes and is stored with all known mailing addresses and MSP identification information for participating in method, apparatus.
Optionally, it if first, which participates in method, apparatus, can send address acquisition request to any one seed node, and receives
All known mailing addresses and MSP identification information for participating in method, apparatus of seed node feedback.
Step S203, first the mailing addresses that method, apparatus receives all known participation method, apparatus that seed node is sent are participated in
With MSP identification information.
Above-mentioned steps S202-S203 is the mailing address and MSP mark that the first participation method, apparatus obtains that other participate in method, apparatus
Know a kind of feasible embodiment of information.
Optionally, if first participates in method, apparatus as seed node, the first participation method, apparatus itself is stored with all known ginsengs
With the mailing address and MSP identification information of method, apparatus, the communication of other participants is obtained without executing above-mentioned steps S202-S203
Address and MSP identification information, then the mailing address of itself and MSP identification information are sent to all known by the first participation method, apparatus
Method, apparatus is participated in, and executes step S204 and subsequent step.
In addition, if first participates in method, apparatus as seed node, then the first participation method, apparatus can also realize seed node
Function:
First participation method, apparatus receives other and participates in the address acquisition request that method, apparatus is sent, and address acquisition request includes hair
Send the mailing address and MSP identification information of method, apparatus;First participates in the mailing address and MSP mark that method, apparatus storage sends method, apparatus
Know information, and sends all known mailing addresses and MSP identification information for participating in method, apparatus to method, apparatus is sent;First participant
The mailing address for sending method, apparatus and MSP identification information are sent to all known participation method, apparatus by equipment, so that all known
Participate in the MSP information that method, apparatus sends itself to the first participation method, apparatus.
Optionally, the first participation method, apparatus can be to all known mailing addresses for participating in method, apparatus of sender's device broadcasts
With MSP identification information.
Step S204, the MSP information of itself is sent to other and participates in method, apparatus by the first participation method, apparatus, and receives other
Participate in the MSP information that method, apparatus is sent.
Optionally, the first participation method, apparatus can be to the MSP information of other participant device broadcasts itself.
Above-mentioned steps S201-S204 is a kind of feasible embodiment of each participant devices exchange MSP information.It completes
Each participation method, apparatus of NSP information exchange can carry out networking.
Step S205, when receiving initiation networking instruction, first, which participates in method, apparatus, obtains original block configuration information, and
Original block configuration information is sent to other and participates in method, apparatus, so that other participate in method, apparatus according to original block configuration information
Configuration Local Node Information simultaneously starts local node.
After each MSP information exchange for participating in method, apparatus is completed, method, apparatus can be participated in by any one and received
Networking is initiated when instructing to initiation networking.
Wherein, original block configuration information includes at least the configuration information and block setting information of ordering joint.Block is set
The mailing address of equipment where confidence breath is serviced including preset common, port numbers, the relevant information that block generates, block size,
The other informations such as the version information of the number and block chain traded in each block and common recognition method.Block setting information is
The information that the need that each participant agrees upon in advance are consistent.Wherein preset common service include: Kafka service and
Zookeeper service etc..
Optionally, the first participation method, apparatus is provided for submitting the initiation networking interface for initiating networking instruction.For example, participating in
Square user can participate in method, apparatus to first by way of clicking pre-set button or the predeterminable area initiated in networking interface
It submits and initiates networking instruction.
Optionally, after the first participation method, apparatus obtains original block configuration information, first participates in method, apparatus according to itself
MSP information, other participate in method, apparatus MSP information and original block configuration information, generate ordering joint configuration file.
For example, ordering joint configuration file can be Genesis.block.
In the present embodiment, the process for generating original block configuration information is locally completed in each participant, i.e., each participation
Side is required to generate a ordering joint configuration file for local service use of sorting.Generate the information of ordering joint configuration file
Source is divided into two parts: a part is derived from other MSP information for participating in method, apparatus, and another part is then derived from participation
The original block configuration information that square user is arranged by front end page.
During generating ordering joint configuration file, each participant need to confer the original block for ensuring to be arranged in advance
Other information in configuration information unless each except the attribute informations such as the mailing address of equipment and port numbers is consistent.
Optionally, the first participation method, apparatus can store original block configuration information into local data base, to first
Beginning block arrangement information is backed up.
Step S206, first method, apparatus acquisition local node configuration information is participated in, and complete according to local node configuration information
At the configuration of local node.
Wherein, local node includes at least ordering joint and Peer node.
Optionally, the first participation method, apparatus can provide the node for inputting local node configuration information and prepare interface.
First participation method, apparatus receives participant user and configures the local node configuration information that the page is inputted and submitted, and root by node
The configuration of local node is completed according to the local node configuration information got.
Optionally, local node configuration information can be written in default node profile by participant user in advance.
First participation method, apparatus can read local node configuration information from default node profile, and according to the local got
The configuration of node configuration information completion local node.
Step S207, first method, apparatus starting local node is participated in.
In the present embodiment, first, which participates in method, apparatus, can start local node after the configuration for completing local node.Respectively
After a local node for participating in method, apparatus starts, the networking of block chain network can be completed.
Optionally, the first participation method, apparatus can also start local node when receiving enabled instruction.
The embodiment of the present invention is disclosed to all participation method, apparatus by presetting seed node, the mailing address of seed node,
Seed node storage is believed by all known mailing addresses for participating in method, apparatus and MSP mark for being sent to it address acquisition request
Breath.Each address acquisition request for participating in method, apparatus and sending the mailing address and MSP identification information that carry itself to seed node,
Can get all known mailing addresses and MSP information for participating in method, apparatus from seed device, each participation method, apparatus to its
He participates in method, apparatus and sends the MSP information of itself and receive other MSP information for participating in method, apparatus transmission, realizes each participant
The interaction of MSP information between equipment, and it is each participate in method, apparatus MSP information by oneself generate, it can be ensured that MSP information can
By property, so that group network process is more transparent, it is more credible.
Embodiment three
Fig. 3 is the block chain network network-building method flow chart that the embodiment of the present invention three provides.In above-described embodiment one or in fact
On the basis of applying example two, in the present embodiment, after first participates in method, apparatus starting local node, first participates in method, apparatus can be with
It creates channel and node is added to channel.As shown in figure 3, this method is also wrapped after first participates in method, apparatus starting local node
Include following steps:
Step S301, first the creation instruction of method, apparatus receiving channel is participated in, channel creation instruction includes channel configuration information.
Wherein, the communication for the responsible establishment block chain network that the first participation method, apparatus can be any one participant is set
It is standby.
In the present embodiment, the first participation method, apparatus, which can be provided, creates interface for the channel of input channel configuration information.
Participant user can create the configuration information in the input channel to be created in interface in the channel.Participant user is logical in input
After road configuration information, the channel that method, apparatus submission includes channel configuration information is participated in first by submitting channel to create interface
Creation instruction.
Wherein, channel configuration information may include tunnel name and channel party information.Channel party information can be with
It is that domain name, the Business Name etc. of participant can show that the information of participant identity.
Optionally, the first participation method, apparatus can be according to the corresponding channel of channel configuration information Acquisition channel party information
The MSP identification information of participant generates channel configuration file according to the MSP identification information of tunnel name and channel participant.Example
Such as, channel configuration file can be channel.tx.
Step S302, first method, apparatus is participated in ordering joint the first transaction request of transmission, so that ordering joint is according to logical
Road configuration information creates channel.
Optionally, ordering joint can be by calling block chain Software Development Tools according to channel configuration information creation channel
The corresponding function module wrapped in (Software Development Kit, abbreviation SDK) is completed.
In the present embodiment, ordering joint according to channel configuration information create channel process in the prior art any one
The method for creating channel realizes that the present embodiment is not specifically limited herein.
Step S303, it receives and node instruction is added, the identification information that node instruction includes Peer node is added.
In the present embodiment, the first participation method, apparatus can be provided to be added for the node of the specified Peer node that channel is added
Interface.Participant user can be added in the node and specify the Peer node that the channel created is added in interface, and submit
The identification information of Peer node.Participant user it is specified the Peer node in the channel created is added after, pass through submission
Node is added interface and participates in the addition node instruction that method, apparatus submits the identification information including Peer node to first.
Step S304, first method, apparatus is participated according to the identification information of Peer node, send the second transaction to Peer node
Request, so that the channel created is added in Peer node.
Optionally, the channel that the addition of Peer node has created can be by calling block chain Software Development Kit
Corresponding function module in (Software Development Kit, abbreviation SDK) is completed.
In the present embodiment, the process in the channel created is added in Peer node and any one node in the prior art is added
The method in the channel created realizes that the present embodiment is not specifically limited herein.
The embodiment of the present invention is by starting local node in each participation method, apparatus, after completing the networking of block chain network,
First participates in the creation instruction of method, apparatus receiving channel, and channel creation instruction includes channel configuration information;First participate in method, apparatus to
Ordering joint sends the first transaction request, so that ordering joint creates channel according to channel configuration information;Addition node is received to refer to
It enables, the identification information that node instruction includes Peer node is added;First participates in method, apparatus according to the identification information of Peer node, to
Peer node sends the second transaction request, so that the channel created is added in Peer node;Realize the block chain based on establishment
Network participates in method, apparatus creation channel and node is added to channel has been created.
Example IV
Fig. 4 is the structural schematic diagram for the block chain network network device that the embodiment of the present invention four provides.The embodiment of the present invention
The block chain network network device of offer can execute the process flow of block chain network network-building method embodiment offer.Such as Fig. 4
Shown, which includes: MSP information generating module 401, MSP information exchange module 402, original block configuration module 403,
Local node configuration module 404 and starting module 405.
Specifically, MSP information generating module 401 generates the MSP information of itself for the first participation method, apparatus.
The MSP information of itself is sent to other participants for the first participation method, apparatus and set by MSP information exchange module 402
It is standby, and receive other and participate in the MSP information that method, apparatus is sent.
Original block configuration module 403 is used for when receiving initiation networking instruction, and the first participation method, apparatus obtains initial
Block arrangement information, and by original block configuration information be sent to other participate in method, apparatus so that other participate in method, apparatus according to
Original block configuration information configuration Local Node Information simultaneously starts local node.
Local node configuration module 404 participates in method, apparatus for first and obtains local node configuration information, and according to local
The configuration of node configuration information completion local node.
Starting module 405 participates in method, apparatus for first and starts local node.
Device provided in an embodiment of the present invention can be specifically used for executing embodiment of the method provided by above-described embodiment one,
Details are not described herein again for concrete function.
The embodiment of the present invention generates the MSP information of itself by the first participation method, apparatus;First participate in method, apparatus by itself
MSP information be sent to other participate in method, apparatus, and receive other participate in method, apparatus send MSP information;It is initiated receiving
When networking instructs, first, which participates in method, apparatus, obtains original block configuration information, and original block configuration information is sent to other
Method, apparatus is participated in, Local Node Information is configured according to original block configuration information and starts local section so that other participate in method, apparatus
Point;First, which participates in method, apparatus, matches confidence according to the MSP information, other MSP information for participating in method, apparatus and original block of itself
Breath configures Local Node Information;First, which participates in method, apparatus, starts local node, to complete block chain network networking, by each ginseng
The MSP information of itself is voluntarily generated with method, apparatus and shares to other participants, is not necessarily to central server, is set by each participant
The standby common networking for participating in completing block chain network, realizes the networking of decentralization, group network process is more transparent, more may be used
Letter.
Embodiment five
On the basis of above-described embodiment four, in the present embodiment, MSP information generating module is also used to:
First participates in the identity information that method, apparatus obtains corresponding participant, is generated according to the identity information of corresponding participant
The certificate of corresponding participant, certificate include: signing certificate and communication certificate, and signing certificate includes administrator certificate and non-management
Member's certificate;First participation method, apparatus is obtained from the mailing address and MSP identification information of body;First participates in the MSP information of method, apparatus
The card of participant corresponding to the mailing address and MSP identification information that participate in method, apparatus including first and the first participation method, apparatus
Book.
Optionally, MSP information exchange module is also used to:
First, which participates in method, apparatus, sends address acquisition request to preset seed node, and address acquisition request includes the first ginseng
With the mailing address and MSP identification information of method, apparatus so that seed node, which participates in method, apparatus to first, sends all known participate in
The mailing address and MSP identification information of method, apparatus, and the mailing address of the first participation method, apparatus and MSP identification information are sent to
All known participation method, apparatus, so that all known MSP information for participating in method, apparatus and sending itself to the first participation method, apparatus;The
One, which participates in method, apparatus, receives all known mailing addresses and MSP identification information for participating in method, apparatus that seed node is sent.
Optionally, MSP information exchange module is also used to:
First participation method, apparatus is seed node, and the first participation method, apparatus receives the address that other participate in method, apparatus transmission and obtains
Request is taken, address acquisition request includes the mailing address and MSP identification information for sending method, apparatus;First participates in method, apparatus storage hair
The mailing address and MSP identification information of method, apparatus are sent, and sends all known participation method, apparatus communicatedly to method, apparatus is sent
Location and MSP identification information;First participation method, apparatus by the mailing address for sending method, apparatus and MSP identification information be sent to it is all
Participation method, apparatus is known, so that all known MSP information for participating in method, apparatus and sending itself to the first participation method, apparatus.
Optionally, MSP information exchange module is also used to:
First participates in method, apparatus for the mailing address and MSP identification information broadcast that send method, apparatus to all known participants
Equipment.
Optionally, MSP information exchange module is also used to:
First participates in MSP information of the method, apparatus to other participant device broadcasts itself.
Optionally, original block configuration module is also used to:
First participates in method, apparatus according to the MSP information of itself, the MSP information and original block of other participation method, apparatus
Configuration information generates ordering joint configuration file.
Optionally, starting module is also used to:
When receiving enabled instruction, first, which participates in method, apparatus, starts local node.
Device provided in an embodiment of the present invention can be specifically used for executing embodiment of the method provided by above-described embodiment two,
Details are not described herein again for concrete function.
The embodiment of the present invention is disclosed to all participation method, apparatus by presetting seed node, the mailing address of seed node,
Seed node storage is believed by all known mailing addresses for participating in method, apparatus and MSP mark for being sent to it address acquisition request
Breath.Each address acquisition request for participating in method, apparatus and sending the mailing address and MSP identification information that carry itself to seed node,
Can get all known mailing addresses and MSP information for participating in method, apparatus from seed device, each participation method, apparatus to its
He participates in method, apparatus and sends the MSP information of itself and receive other MSP information for participating in method, apparatus transmission, realizes each participant
The interaction of MSP information between equipment, and it is each participate in method, apparatus MSP information by oneself generate, it can be ensured that MSP information can
By property, so that group network process is more transparent, it is more credible.
Embodiment six
Fig. 5 is the structural schematic diagram for the block chain network network device that the embodiment of the present invention six provides.In above-described embodiment
Four or embodiment five on the basis of, in the present embodiment, as shown in figure 5, the device 40 further include: path management module 406.
Specifically, path management module 406 is used for:
First participates in the creation instruction of method, apparatus receiving channel, and channel creation instruction includes channel configuration information;First participates in
Method, apparatus sends the first transaction request to ordering joint, so that ordering joint creates channel according to channel configuration information.
Path management module 406 can be also used for:
It receives and node instruction is added, the identification information that node instruction includes Peer node is added;First participates in method, apparatus root
According to the identification information of Peer node, the second transaction request is sent to Peer node, so that the channel created is added in Peer node.
Device provided in an embodiment of the present invention can be specifically used for executing embodiment of the method provided by above-described embodiment three,
Details are not described herein again for concrete function.
The embodiment of the present invention is by starting local node in each participation method, apparatus, after completing the networking of block chain network,
First participates in the creation instruction of method, apparatus receiving channel, and channel creation instruction includes channel configuration information;First participate in method, apparatus to
Ordering joint sends the first transaction request, so that ordering joint creates channel according to channel configuration information;Addition node is received to refer to
It enables, the identification information that node instruction includes Peer node is added;First participates in method, apparatus according to the identification information of Peer node, to
Peer node sends the second transaction request, so that the channel created is added in Peer node;Realize the block chain based on establishment
Network participates in method, apparatus creation channel and node is added to channel has been created.
Embodiment seven
Fig. 6 is the structural schematic diagram for the block chain network networking equipment that the embodiment of the present invention seven provides.As shown in fig. 6, should
Equipment 60 includes: processor 601, memory 602 and computer program.
Wherein, computer program stores in the memory 602, and is configured as being executed by processor 601 to realize as above
State block chain network network-building method provided by either method embodiment.
The embodiment of the present invention generates the MSP information of itself by the first participation method, apparatus;First participate in method, apparatus by itself
MSP information be sent to other participate in method, apparatus, and receive other participate in method, apparatus send MSP information;It is initiated receiving
When networking instructs, first, which participates in method, apparatus, obtains original block configuration information, and original block configuration information is sent to other
Method, apparatus is participated in, Local Node Information is configured according to original block configuration information and starts local section so that other participate in method, apparatus
Point;First, which participates in method, apparatus, matches confidence according to the MSP information, other MSP information for participating in method, apparatus and original block of itself
Breath configures Local Node Information;First, which participates in method, apparatus, starts local node, to complete block chain network networking, by each ginseng
The MSP information of itself is voluntarily generated with method, apparatus and shares to other participants, is not necessarily to central server, is set by each participant
The standby common networking for participating in completing block chain network, realizes the networking of decentralization, group network process is more transparent, more may be used
Letter.
In addition, the embodiment of the present invention also provides a kind of computer readable storage medium, it is stored with computer program, the meter
Calculation machine program realizes the block chain network network-building method that any of the above-described embodiment of the method provides when being executed by processor.
In several embodiments provided by the present invention, it should be understood that disclosed device and method can pass through it
Its mode is realized.For example, the apparatus embodiments described above are merely exemplary, for example, the division of the unit, only
Only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components can be tied
Another system is closed or is desirably integrated into, or some features can be ignored or not executed.Another point, it is shown or discussed
Mutual coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING or logical of device or unit
Letter connection can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of hardware adds SFU software functional unit.
The above-mentioned integrated unit being realized in the form of SFU software functional unit can store and computer-readable deposit at one
In storage media.Above-mentioned SFU software functional unit is stored in a storage medium, including some instructions are used so that a computer
It is each that equipment (can be personal computer, server or the network equipment etc.) or processor (processor) execute the present invention
The part steps of embodiment the method.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (Read-
Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic or disk etc. it is various
It can store the medium of program code.
Those skilled in the art can be understood that, for convenience and simplicity of description, only with above-mentioned each functional module
Division progress for example, in practical application, can according to need and above-mentioned function distribution is complete by different functional modules
At the internal structure of device being divided into different functional modules, to complete all or part of the functions described above.On
The specific work process for stating the device of description, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to of the invention its
Its embodiment.The present invention is directed to cover any variations, uses, or adaptations of the invention, these modifications, purposes or
Person's adaptive change follows general principle of the invention and including the undocumented common knowledge in the art of the present invention
Or conventional techniques.The description and examples are only to be considered as illustrative, and true scope and spirit of the invention are by following
Claims are pointed out.
It should be understood that the present invention is not limited to the precise structure already described above and shown in the accompanying drawings, and
And various modifications and changes may be made without departing from the scope thereof.The scope of the present invention is only limited by appended claims
System.