CN113938495B - Alliance chain building method and device, computer equipment and storage medium - Google Patents

Alliance chain building method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN113938495B
CN113938495B CN202111545761.1A CN202111545761A CN113938495B CN 113938495 B CN113938495 B CN 113938495B CN 202111545761 A CN202111545761 A CN 202111545761A CN 113938495 B CN113938495 B CN 113938495B
Authority
CN
China
Prior art keywords
platform
service platform
peer
connection
block chain
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
CN202111545761.1A
Other languages
Chinese (zh)
Other versions
CN113938495A (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.)
Shenzhen Mingzhu Technology Co ltd
Original Assignee
Shenzhen Mingzhu Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Mingzhu Technology Co ltd filed Critical Shenzhen Mingzhu Technology Co ltd
Priority to CN202111545761.1A priority Critical patent/CN113938495B/en
Publication of CN113938495A publication Critical patent/CN113938495A/en
Application granted granted Critical
Publication of CN113938495B publication Critical patent/CN113938495B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1044Group management mechanisms 
    • H04L67/1046Joining mechanisms

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application relates to a method and a device for building a alliance chain, computer equipment and a storage medium. The method comprises the following steps: the first block chain service platform is connected to the peer-to-peer network based on the set network connection service program so as to acquire organized information in each second block chain service platform in the peer-to-peer network; the first block chain service platform determines a target organization of a to-be-built alliance chain from all organizations based on organization information; the first block chain service platform determines a second block chain service platform to which the target organization belongs, and a target block chain service platform is obtained; the first blockchain service platform sends alliance chain invitation information to the target blockchain service platform based on peer-to-peer connection pre-established between the first blockchain service platform and the target blockchain service platform; and the first block chain service platform receives an invitation feedback result returned by the target block chain service platform so as to build the alliance chain according to the invitation feedback result. By adopting the method, alliance chains can be established for organizations in different block chain service platforms.

Description

Alliance chain building method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of block chain technologies, and in particular, to a method and an apparatus for building a federation chain, a computer device, and a storage medium.
Background
With the development of the block chain technology, a alliance chain establishing technology appears, a user establishes organization information on a block chain service platform, and alliance chains can be established among organizations in the block chain service platform based on the organization information.
However, an organization created in a certain blockchain service platform can only build a federation chain with organizations in the same platform, which leads to a problem that no federation chain can be built among organizations in different blockchain service platforms. Therefore, a method for building a federation chain for organizations in different blockchain service platforms is needed.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a federation chain building method, an apparatus, a computer device, a computer-readable storage medium, and a computer program product, which can implement building a federation chain for organizations in different blockchain service platforms.
In a first aspect, the present application provides a federation chain construction method. The method comprises the following steps:
the first block chain service platform is connected to the peer-to-peer network based on the set network connection service program;
acquiring information of organization in each second block chain service platform in the peer-to-peer network through the peer-to-peer network;
the first block chain service platform determines a target organization to be established with a union chain from all the organizations based on the information of the organizations;
the first block chain service platform determines a second block chain service platform to which the target organization belongs, and a target block chain service platform is obtained;
the first block chain service platform sends alliance chain invitation information to the target block chain service platform based on a peer-to-peer connection which is pre-established between the first block chain service platform and the target block chain service platform; the alliance chain invitation information is used for inviting the target organization to jointly build an alliance chain;
and the first block chain service platform receives an invitation feedback result returned by the target block chain service platform, so as to build a alliance chain according to the invitation feedback result.
In one embodiment, the obtaining information of an organization in each second blockchain service platform in the peer-to-peer network includes:
determining a second block chain service platform connected to the first block chain service platform in the peer-to-peer network to obtain a direct connection platform;
acquiring information of an organization in the direct connection platform connected to and information of an organization in a connection association platform based on the peer-to-peer connection with the direct connection platform; the connection association platform is a second blockchain service platform in the peer-to-peer network and having a connection relationship with the direct connection platform.
In one embodiment, the connection relationship between the connection association platform and the direct connection platform comprises a direct connection relationship and an indirect connection relationship;
the acquiring information of an organization in the direct connection platform connected to and the acquiring information of an organization in the connection association platform based on the peer-to-peer connection with the direct connection platform comprise:
determining a second block chain service platform which has a direct connection relation with the current platform by taking the direct connection platform as the current platform, obtaining the connection platform of the current platform, and obtaining information organized in the connection platform of the current platform;
and taking the connection platform of the current platform as the current platform, returning to the step of determining the second block chain service platform which has a direct connection relation with the current platform to obtain the connection platform of the current platform, and obtaining the information organized in the connection platform of the current platform to iterate until an iteration stop condition is met, so as to obtain the information organized in the connection association platform of the direct connection platform.
In one embodiment, the information of the organization comprises connection information of a second blockchain service platform to which the organization belongs;
before the first blockchain service platform sends alliance chain invitation information to the target blockchain service platform based on a peer-to-peer connection pre-established between the first blockchain service platform and the target blockchain service platform, the method further includes:
and the first block chain service platform establishes peer-to-peer connection with the target block chain service platform based on the connection information of the target block chain service platform.
In one embodiment, the sending, by the first blockchain service platform, federation chain invitation information to the target blockchain service platform based on a peer-to-peer connection pre-established with the target blockchain service platform includes:
the first block chain service platform sends alliance chain invitation information to the target block chain service platform based on peer-to-peer connection pre-established between the first block chain service platform and the target block chain service platform, so that the target block chain service platform forwards the alliance chain invitation information to the target organization, and forwards the invitation feedback result to the first block chain service platform after receiving the invitation feedback result sent by the target organization.
In one embodiment, the federation chain invitation information is initiated by an organization in the first blockchain service platform;
the first block chain service platform receives an invitation feedback result returned by the target block chain service platform, and the establishing of the alliance chain according to the invitation feedback result comprises the following steps:
the first block chain service platform receives an invitation feedback result returned by the target block chain service platform;
and if the invitation feedback result indicates that the target organization agrees to the invitation, adding the target organization to a federation chain based on the organization initiating the invitation.
In a second aspect, the application also provides a device for building the alliance chain. The device comprises:
an acquisition module for connecting to a peer-to-peer network based on the set network connection service program; acquiring information of organization in each second block chain service platform in the peer-to-peer network through the peer-to-peer network;
the determining module is used for determining a target organization of the alliance chain to be built from all the organizations based on the information of the organizations; determining a second block chain service platform to which the target organization belongs to obtain a target block chain service platform;
the building module is used for sending alliance chain invitation information to the target block chain service platform based on the pre-established peer-to-peer connection with the target block chain service platform; the alliance chain invitation information is used for inviting the target organization to jointly build an alliance chain; and receiving an invitation feedback result returned by the target block chain service platform, and constructing a alliance chain according to the invitation feedback result.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor realizes the steps in the embodiments of the application when executing the computer program.
In a fourth aspect, the present application further provides a computer-readable storage medium. The computer readable storage medium has stored thereon a computer program which, when executed by a processor, performs the steps in the embodiments of the present application.
In a fifth aspect, the present application further provides a computer program product. The computer program product comprises a computer program that when executed by a processor performs the steps of the embodiments of the present application.
According to the alliance chain building method, the alliance chain building device, the computer equipment, the storage medium and the computer program product, the first block chain service platform is connected to the peer-to-peer network based on the set network connection service program; acquiring information of organization in each second block chain service platform in the peer-to-peer network through the peer-to-peer network; the first block chain service platform determines a target organization of a to-be-built alliance chain from all organizations based on organization information; the first block chain service platform determines a second block chain service platform to which the target organization belongs, and a target block chain service platform is obtained; the first blockchain service platform sends alliance chain invitation information to the target blockchain service platform based on peer-to-peer connection pre-established between the first blockchain service platform and the target blockchain service platform; the alliance chain invitation information is used for inviting a target organization to jointly build an alliance chain; and the first block chain service platform receives an invitation feedback result returned by the target block chain service platform so as to build the alliance chain according to the invitation feedback result. The first block chain service platform can acquire the organization information of each second block chain service platform based on the peer-to-peer network, and after the target organization of the alliance chain to be built is determined, the target organization of the target block chain service platform is invited to build the alliance chain together based on the peer-to-peer connection pre-established between the first block chain service platform and the target block chain service platform, so that the alliance chain building of the organizations of different block chain service platforms is realized.
Drawings
FIG. 1 is a diagram of an application environment of a federation chain construction method in one embodiment;
FIG. 2 is a flow diagram illustrating a federation chain construction method, according to one embodiment;
FIG. 3a is a diagram illustrating the obtaining of information for various tissues, according to one embodiment;
FIG. 3b is a schematic diagram of obtaining information for each tissue in another embodiment;
FIG. 4 is a diagram illustrating an invitation to a target organization in one embodiment;
FIG. 5 is a block diagram of the structure of a federation chain creation device in one embodiment;
FIG. 6 is a diagram illustrating an internal structure of a computer device according to an embodiment;
fig. 7 is an internal structural view of a computer device in another embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The alliance chain building method provided by the embodiment of the application can be applied to the application environment shown in figure 1. The first blockchain service platform communicates with the second blockchain service platform in the peer-to-peer network. The second blockchain service platform in the peer-to-peer network may be one or more. Peer-to-peer connections may be established between the second blockchain service platforms. The first block chain service platform is connected to the peer-to-peer network based on the set network connection service program; acquiring information of organization in each second block chain service platform in the peer-to-peer network through the peer-to-peer network; the first block chain service platform determines a target organization of a to-be-built alliance chain from all organizations based on organization information; the first block chain service platform determines a second block chain service platform to which the target organization belongs, and a target block chain service platform is obtained; the first block chain service platform sends alliance chain invitation information to the target block chain service platform based on the pre-established peer-to-peer connection with the target block chain service platform so as to invite the target organization to jointly build an alliance chain; and the first block chain service platform receives an invitation feedback result returned by the target block chain service platform so as to build the alliance chain according to the invitation feedback result. It is to be appreciated that the target blockchain service platform can be any one or more of the second blockchain service platforms 102A, 102B, and 102C in fig. 1, and if the target blockchain service platform does not directly establish a peer-to-peer connection with the first blockchain service platform, for example, if the target blockchain service platform is the second blockchain service platform 102B, the first blockchain service platform establishes a peer-to-peer connection with the target blockchain service platform 102B.
The first block chain service platform and the second block chain service platform can be respectively internally provided with a personal computer, a notebook computer, a smart phone, a tablet personal computer, an internet of things device and a portable wearable device, and the internet of things device can be an intelligent sound box, an intelligent television, an intelligent air conditioner, an intelligent vehicle-mounted device and the like. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, and the like. The first blockchain service platform and the second blockchain service platform can be respectively realized by independent servers or a server cluster consisting of a plurality of servers. It can be understood that the first and second are only used for distinguishing different blockchain service platforms, and the federation chain building method provided by the embodiment of the present application may also be executed by the second blockchain service platform.
In an embodiment, as shown in fig. 2, a federation chain building method is provided, which is described by taking an example that the method is applied to the first blockchain service platform in fig. 1, and includes the following steps:
step 202, the first blockchain service platform is connected to the peer-to-peer network based on the set network connection service program; acquiring organization information in each second block chain service platform in the peer-to-peer network through the connected peer-to-peer network; the first block chain service platform determines a target organization to be established with the alliance chain from all organizations based on the organization information.
The Blockchain Service platform, namely, a "Blockchain as a Service" (BaaS) platform, is a Blockchain open platform which embeds a Blockchain frame into a cloud computing platform, provides a convenient and high-performance Blockchain ecological environment and ecological supporting Service for developers by using the deployment and management advantages of cloud Service infrastructure, and supports business expansion and operation support of the developers. Generally, a complete BaaS solution includes four main links, namely, device access, access control, service monitoring, and a blockchain platform. Peer-to-Peer (Peer to Peer, P2P) networks are an internet infrastructure that relies on groups of users (peers) to exchange information without a central server. It will be appreciated that the nodes in a P2P (Peer to Peer) network may communicate directly with each other without the need for a central server. Each node acts as a server, provides services for other nodes, and simultaneously enjoys the services provided by other nodes. A federation chain refers to a block chain which is managed by a plurality of organizations together, each organization manages one or more nodes, and data of the organizations only allows different organizations in the system to read, write and send. The network connection service program refers to a program for connecting a peer-to-peer network.
In particular, each blockchain service platform may share information of an organization in the platform based on a peer-to-peer network. The first blockchain service platform can be connected to the peer-to-peer network based on the set network connection service program, and acquires the organization information in each second blockchain service platform in the peer-to-peer network through the connected peer-to-peer network. The first block chain service platform can determine a target organization to be used for building a alliance chain from all organizations based on the information of the organizations.
In one embodiment, the network connection service runs when the first blockchain service platform is started, and connects the first blockchain service platform to the peer-to-peer network.
In one embodiment, a peer-to-peer connection may be established between any two nodes in a peer-to-peer network. The first blockchain service platform can acquire information of each node in the peer-to-peer network, that is, connection information of each second blockchain service platform, through the network connection service program, so as to establish peer-to-peer connection with the second blockchain service platform. It is understood that a node in a peer-to-peer network is essentially a blockchain service platform, a peer-to-peer connection between two nodes is essentially a peer-to-peer connection between two blockchain service platforms, and a peer-to-peer network is essentially a network formed by connecting blockchain service platforms in series by a peer-to-peer connection.
In one embodiment, a newly added node, that is, a blockchain service platform connected to the peer-to-peer network for the first time, may connect to the peer-to-peer network through the network connection service program, and obtain connection information of other blockchain service platforms to establish a new peer-to-peer connection. It is understood that other blockchain service platforms in the peer-to-peer network may obtain information of the first connection to the blockchain service platform in the peer-to-peer network.
Step 204, the first block chain service platform determines a second block chain service platform to which the target organization belongs, and a target block chain service platform is obtained; the first blockchain service platform sends alliance chain invitation information to the target blockchain service platform based on the peer-to-peer connection which is pre-established between the first blockchain service platform and the target blockchain service platform.
The alliance chain invitation information is used for inviting target organizations to jointly build alliance chains. Peer-to-peer connection refers to a connection for implementing peer-to-peer communication between the first blockchain service platform and the target blockchain service platform. The target block chain service platform refers to a second block chain service platform to which the target organization belongs.
Specifically, the first blockchain service platform determines a second blockchain service platform to which the target organization belongs, and the second blockchain service platform is used as the target blockchain service platform. The first block chain service platform realizes point-to-point data transmission with the target block chain service platform through peer-to-peer connection pre-established between the first block chain service platform and the target block chain service platform, and sends alliance chain invitation information to the target block chain service platform so as to invite a target organization to jointly build an alliance chain. It is to be appreciated that after establishing the peer-to-peer connection, data is transferred directly between the first blockchain service platform and the target blockchain service platform without passing through a central server.
And step 206, the first block chain service platform receives an invitation feedback result returned by the target block chain service platform, so as to build the alliance chain according to the invitation feedback result.
The invitation feedback result refers to a feedback result of the target organization aiming at the invitation information of the alliance chain.
Specifically, the target blockchain service platform may receive federation chain invitation information sent by the first blockchain service platform, and forward the federation chain invitation information to the target organization. The target blockchain service platform may obtain the invitation feedback result and return the invitation feedback result to the first blockchain service platform. The first blockchain service platform can receive the invitation feedback result so as to build a alliance chain according to the invitation feedback result.
In the alliance chain building method, the first block chain service platform is connected to a peer-to-peer network based on a set network connection service program; acquiring information of organization in each second block chain service platform in the peer-to-peer network through the peer-to-peer network; the first block chain service platform determines a target organization of a to-be-built alliance chain from all organizations based on organization information; the first block chain service platform determines a second block chain service platform to which the target organization belongs, and a target block chain service platform is obtained; the first blockchain service platform sends alliance chain invitation information to the target blockchain service platform based on peer-to-peer connection pre-established between the first blockchain service platform and the target blockchain service platform; the alliance chain invitation information is used for inviting a target organization to jointly build an alliance chain; and the first block chain service platform receives an invitation feedback result returned by the target block chain service platform so as to build the alliance chain according to the invitation feedback result. The first block chain service platform can realize mutual discovery with each second block chain service platform in the peer-to-peer network based on the peer-to-peer network, acquire organization information of each second block chain service platform, and invite the target organization of the target block chain service platform to jointly build the alliance chain based on peer-to-peer connection pre-established between the target block chain service platform and the target block chain service platform after determining the target organization of the alliance chain to be built, so that alliance chain building is realized for organizations of different block chain service platforms.
In one embodiment, obtaining information for an organization in each second blockchain service platform in the peer-to-peer network comprises: determining a second block chain service platform connected to the first block chain service platform in the peer-to-peer network to obtain a direct connection platform; acquiring information of an organization in a direct connection platform connected to and information of an organization in a connection association platform based on peer-to-peer connection with the direct connection platform; the connection association platform is a second blockchain service platform in the peer-to-peer network and having a connection relationship with the direct connection platform.
The direct connection platform refers to a second blockchain service platform that establishes an equality connection with the first blockchain service platform, that is, the second blockchain service platform that is directly connected with the first blockchain service platform.
In one embodiment, the connection relationship may include at least one of a direct connection relationship and an indirect connection relationship. The connection association platform may have at least one of an indirect connection relationship and a direct connection relationship with the direct connection platform. For example, the connection association platform may be a second blockchain service platform that establishes an peer-to-peer connection with the direct connection platform, i.e., the direct connection platform of the direct connection platform. Although the connection association platform does not establish peer-to-peer connection with the first blockchain service platform, the connection association platform and the first blockchain service platform have indirect connection relation due to the peer-to-peer connection established with the direct connection platform. It can be understood that the direct connection platform and the first blockchain service platform have a direct connection relationship; the connection association platform and the first block chain service platform have an indirect connection relationship.
Specifically, the first blockchain service platform may determine a second blockchain service platform connected in the peer-to-peer network, and use the second blockchain service platform as a direct connection platform. The first blockchain service platform can transmit data point to point with the direct connection platform through the peer-to-peer connection between the first blockchain service platform and the direct connection platform, acquire information of organizations in the direct connection platform connected to the first blockchain service platform, and acquire information of organizations in the connection association platform through the direct connection platform. It can be understood that when two blockchain service platforms a and B are connected, not only the known organization information is shared with each other, but also the organization information synchronized by one blockchain service platform a from the other blockchain service platform is also shared by the other blockchain service platform B connected to the blockchain service platform a.
In this embodiment, a second blockchain service platform to which a first blockchain service platform is connected in a peer-to-peer network is determined to obtain a direct connection platform; based on the peer-to-peer connection between the direct connection platform and the direct connection platform, the information of the organization in the connected direct connection platform and the information of the organization in the connection association platform are obtained, the sharing of the information of each organization in the equality network is realized, and the establishment of the alliance chain is conveniently carried out after the target organization in each block chain service platform is determined.
In one embodiment, the connection relation between the connection association platform and the direct connection platform comprises a direct connection relation and an indirect connection relation; based on the peer-to-peer connection with the direct connection platform, acquiring information of an organization in the direct connection platform connected to and acquiring information of an organization in the connection association platform comprise: determining a second block chain service platform which has a direct connection relation with the current platform by taking the direct connection platform as the current platform to obtain the connection platform of the current platform and obtain information organized in the connection platform of the current platform; and taking the connection platform of the current platform as the current platform, returning to the step of determining the second block chain service platform which has a direct connection relation with the current platform to obtain the connection platform of the current platform, and acquiring the information organized in the connection platform of the current platform to iterate until an iteration stop condition is met, so as to obtain the information organized in the connection association platform of the direct connection platform.
Specifically, the first blockchain service platform may use the direct connection platform as a current platform, determine a second blockchain service platform having a direct connection relationship with the current platform, obtain a connection platform of the current platform, and obtain information organized in the connection platform of the current platform; and taking the connection platform of the current platform as the current platform, returning to the step of determining the second block chain service platform which has a direct connection relation with the current platform to obtain the connection platform of the current platform, and obtaining the information organized in the connection platform of the current platform to iterate until the current platform does not have the connection platform, namely, the connection association platform of the first block chain service platform iterates completely to obtain the information organized in the connection association platform of the direct connection platform.
In one embodiment, fig. 3a and 3b are schematic diagrams of obtaining information of each tissue. In fig. 3a, the blockchain service platform 1, the blockchain service platform 2, the blockchain service platform 3, and the blockchain service platform 4 are connected to the peer-to-peer network, i.e., all become nodes in the peer-to-peer network. The blockchain service platform 1 establishes peer-to-peer connections with the blockchain service platform 2 and the blockchain service platform 3, respectively, that is, both the blockchain service platform 2 and the blockchain service platform 3 are direct connection platforms of the blockchain service platform 1. The blockchain service platform 4 establishes peer-to-peer connection with the blockchain service platform 2 and the blockchain service platform 3, respectively, that is, the blockchain service platform 4 and the blockchain service platform 1 have an indirect connection relationship and belong to a connection association platform of the blockchain service platform 1.
As shown in fig. 3b, the organizations included in the blockchain service platform are shown in the same color block, for example, the organization 1 and the organization 2 are the same as the color of the blockchain service platform 1, that is, the organization in the blockchain service platform 1 is shown to include the organization 1 and the organization 2. The organization 3 and the organization 4 are the same color as the block chain service platform 2, and the organization used in the block chain service platform 2 is illustrated to include the organization 3 and the organization 4. Similarly, the organization in the blockchain service platform 3 includes an organization 5; the organization in blockchain service platform 4 includes organization 6.
The blockchain service platform 1 can directly communicate with the blockchain service platform 2 and the blockchain service platform 3 to obtain information of the organization 3, the organization 4 and the organization 5. The blockchain service platform 2 or the blockchain service platform 3 is used as a current platform, and the blockchain service platform 6 which has a direct connection relationship with the blockchain service platform 2 or the blockchain service platform 3 is determined, so that the information of the organization 6 is obtained from the blockchain service platform 6 through the blockchain service platform 2 or the blockchain service platform 3. It will be appreciated that the blockchain service platform 2 and the blockchain service platform 3 may communicate directly with the blockchain service platform 4 to obtain information for the organization 6. Similarly, because the blockchain service platform 1, the blockchain service platform 2, the blockchain service platform 3 and the blockchain service platform 4 have an indirect or direct connection relationship, organization information in one blockchain service platform can be acquired by the remaining blockchain service platforms, thereby realizing the sharing of information of each organization. The organizations 1-6 shown in each blockchain service platform in fig. 3a represent that all the organized information in each blockchain service platform in the peer-to-peer network is synchronized.
In this embodiment, the connection association platform having the direct connection relationship and the indirect connection relationship with the direct connection platform is iterated to obtain information of an organization of each block chain service platform in the peer-to-peer network, so that a union chain is established for organizations in different block chain service platforms.
In one embodiment, the information of the organization comprises connection information of a second blockchain service platform to which the organization belongs; before the first blockchain service platform sends alliance chain invitation information to the target blockchain service platform based on the peer-to-peer connection pre-established between the first blockchain service platform and the target blockchain service platform, the method further comprises the following steps: the first blockchain service platform establishes peer-to-peer connection with the target blockchain service platform based on the connection information of the target blockchain service platform.
The connection information refers to information for establishing a peer-to-peer connection.
Specifically, the target blockchain service platform may be a connection association platform of the direct connection platform of the first blockchain service platform. The connection information may be a connection address of the target blockchain service platform, and the first blockchain service platform may establish peer-to-peer connection with the target blockchain service platform through a network connection program according to the connection address of the target blockchain service platform.
In this embodiment, before the first blockchain service platform sends the alliance chain invitation information to the target blockchain service platform based on the peer-to-peer connection pre-established with the target blockchain service platform, the method further includes: the first blockchain service platform establishes peer-to-peer connection with the target blockchain service platform based on the connection information of the target blockchain service platform.
In one embodiment, the sending, by the first blockchain service platform, the alliance chain invitation information to the target blockchain service platform based on a pre-established peer-to-peer connection with the target blockchain service platform includes: the first block chain service platform sends alliance chain invitation information to the target block chain service platform based on peer-to-peer connection pre-established with the target block chain service platform, so that the target block chain service platform forwards the alliance chain invitation information to a target organization, and forwards the invitation feedback result to the first block chain service platform after receiving the invitation feedback result sent by the target organization.
Specifically, the first blockchain service platform transmits data point to point with the target blockchain service platform through a peer-to-peer connection pre-established between the first blockchain service platform and the target blockchain service platform, and sends alliance chain invitation information to the target blockchain service platform. And the target block chain service platform receives the alliance chain invitation information, forwards the alliance chain invitation information to the target organization, and forwards the invitation feedback result to the first block chain service platform after receiving the invitation feedback result sent by the target organization. It can be understood that, because organization information is shared, each blockchain service platform knows the blockchain service platform where each organization is located, and the inter-organization communication is handled by the blockchain service platform and is based on establishing peer-to-peer connection.
In this embodiment, the first blockchain service platform sends the alliance chain invitation information to the target blockchain service platform based on a peer-to-peer connection pre-established with the target blockchain service platform, so that the target blockchain service platform forwards the alliance chain invitation information to the target organization, and forwards the invitation feedback result to the first blockchain service platform after receiving the invitation feedback result sent by the target organization, and peer-to-peer communication between the blockchain service platforms is realized through the peer-to-peer connection, and the alliance chain invitation information can be transmitted only if the peer-to-peer connection is established, thereby ensuring the security of the alliance chain establishment process.
In one embodiment, the federation chain invitation information is initiated by an organization in the first blockchain service platform; the first block chain service platform receives an invitation feedback result returned by the target block chain service platform, and the establishment of the alliance chain according to the invitation feedback result comprises the following steps: the first block chain service platform receives an invitation feedback result returned by the target block chain service platform; if the invitation feedback result indicates that the target organization agrees to the invitation, the target organization is added to the federation chain based on the organization initiating the invitation.
Specifically, an organization in the first blockchain service platform initiates alliance chain invitation information to a target organization in the target blockchain service platform, and the first blockchain service platform can send the alliance chain invitation information to the target blockchain service platform. The target blockchain service platform may forward the federation chain invitation information to the target organization, and the target organization may reject or approve the federation chain invitation information. The target blockchain service platform may obtain an invitation feedback result of the target organization, and return the invitation feedback result to the first blockchain service platform, and the first blockchain service platform may send the received invitation feedback result to the organization that initiated the invitation. If the invitation feedback result represents that the target organization agrees to the invitation, the organization initiating the invitation can add the target organization to the federation chain; if the invitation feedback result represents that the target organization refuses the invitation, the organization initiating the invitation cannot add the target organization to the federation chain. It can be understood that the federation chains are built together by different organizations, and the organization initiating the invitation can create the federation chains from scratch with the target organization, and can also add the target organization to the existing federation chains to complete the building of the federation chains.
In one embodiment, a schematic diagram of an invitation to a target organization is shown in FIG. 4. The blockchain service platform 1 and the blockchain service platform 4 establish peer-to-peer connection in advance. An organization 1 in the blockchain service platform 1 can acquire information of each organization in the blockchain service platform 4 through the blockchain service platform 1, the organization 1 can select the organization 6 as a target organization, and sends alliance chain invitation information to the blockchain service platform 4 where the organization 6 is located through the blockchain service platform 1, and the blockchain service platform 4 forwards the alliance chain invitation information to the organization 6. The organization 6 may agree to the invitation and the blockchain service platform 4 may send an invitation feedback result to the blockchain service platform 1 characterizing the agreement to the invitation. The blockchain service platform 1 may send the received invitation feedback result to the organization 1.
In this embodiment, the first blockchain service platform receives an invitation feedback result returned by the target blockchain service platform; and if the invitation feedback result represents that the target organization agrees to the invitation, adding the target organization to the alliance chain based on the organization initiating the invitation, and building the alliance chain for the organizations in different block chain service platforms.
It should be understood that, although the steps in the flowcharts related to the embodiments as described above are sequentially displayed as indicated by arrows, the steps are not necessarily performed sequentially as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a part of the steps in the flowcharts related to the embodiments described above may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the execution order of the steps or stages is not necessarily sequential, but may be rotated or alternated with other steps or at least a part of the steps or stages in other steps.
Based on the same inventive concept, the embodiment of the application also provides a alliance chain establishing device for realizing the alliance chain establishing method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the method, so that specific limitations in one or more embodiments of the federation chain building device provided below can be referred to the limitations on the federation chain building method in the foregoing, and details are not described herein again.
In one embodiment, as shown in fig. 5, there is provided a federation chain construction apparatus 500 comprising: an obtaining module 502, a determining module 504 and a building module 506, wherein:
an obtaining module 502, configured to connect to a peer-to-peer network based on the set network connection service; acquiring information of organization in each second block chain service platform in the peer-to-peer network through the peer-to-peer network;
a determining module 504, configured to determine, based on the information of the organization, a target organization of the federation chain to be built from each organization; determining a second block chain service platform to which the target organization belongs to obtain a target block chain service platform;
a building module 506, configured to send alliance chain invitation information to the target blockchain service platform based on a peer-to-peer connection pre-established with the target blockchain service platform; the alliance chain invitation information is used for inviting a target organization to jointly build an alliance chain; and receiving an invitation feedback result returned by the target block chain service platform, and constructing the alliance chain according to the invitation feedback result.
In one embodiment, a network connection service program for joining a peer-to-peer network is arranged in the first blockchain service platform; the obtaining module 502 is further configured to connect the first blockchain service platform to the peer-to-peer network based on the network connection service program.
In an embodiment, the obtaining module 502 is further configured to determine a second blockchain service platform to which the first blockchain service platform is connected in the peer-to-peer network, so as to obtain a direct connection platform; acquiring information of an organization in a direct connection platform connected to and information of an organization in a connection association platform based on peer-to-peer connection with the direct connection platform; the connection association platform is a second blockchain service platform in the peer-to-peer network and having a connection relationship with the direct connection platform.
In one embodiment, the connection relation between the connection association platform and the direct connection platform comprises a direct connection relation and an indirect connection relation; the obtaining module 502 is further configured to determine, using the direct connection platform as the current platform, a second block chain service platform having a direct connection relationship with the current platform, obtain a connection platform of the current platform, and obtain information organized in the connection platform of the current platform; and taking the connection platform of the current platform as the current platform, returning to the step of determining the second block chain service platform which has a direct connection relation with the current platform to obtain the connection platform of the current platform, and acquiring the information organized in the connection platform of the current platform to iterate until an iteration stop condition is met, so as to obtain the information organized in the connection association platform of the direct connection platform.
In one embodiment, the information of the organization comprises connection information of a second blockchain service platform to which the organization belongs; the building module 506 is further configured to establish a peer-to-peer connection between the first blockchain service platform and the target blockchain service platform based on the connection information of the target blockchain service platform.
In an embodiment, the establishing module 506 is further configured to send, by the first blockchain service platform, alliance chain invitation information to the target blockchain service platform based on a peer-to-peer connection pre-established with the target blockchain service platform, so that the target blockchain service platform forwards the alliance chain invitation information to the target organization, and forwards an invitation feedback result to the first blockchain service platform after receiving the invitation feedback result sent by the target organization.
In one embodiment, the federation chain invitation information is initiated by an organization in the first blockchain service platform; the building module 506 is further configured to receive an invitation feedback result returned by the target blockchain service platform by the first blockchain service platform; if the invitation feedback result indicates that the target organization agrees to the invitation, the target organization is added to the federation chain based on the organization initiating the invitation.
The modules in the alliance chain building device can be wholly or partially realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 6. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing the data related to the establishment of the alliance chain. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a federation chain construction method.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 7. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a federation chain construction method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the configurations shown in fig. 6 and 7 are merely block diagrams of portions of configurations related to aspects of the present application, and do not constitute limitations on the computing devices to which aspects of the present application may be applied, as particular computing devices may include more or less components than shown, or combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the above-described method embodiments when executing the computer program.
In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
In an embodiment, a computer program product is provided, comprising a computer program which, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
It should be noted that, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high-density embedded nonvolatile Memory, resistive Random Access Memory (ReRAM), Magnetic Random Access Memory (MRAM), Ferroelectric Random Access Memory (FRAM), Phase Change Memory (PCM), graphene Memory, and the like. Volatile Memory can include Random Access Memory (RAM), external cache Memory, and the like. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others. The databases referred to in various embodiments provided herein may include at least one of relational and non-relational databases. The non-relational database may include, but is not limited to, a block chain based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, quantum computing based data processing logic devices, etc., without limitation.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims (14)

1. A method for federation chain establishment, the method comprising:
the first block chain service platform is connected to the peer-to-peer network based on the set network connection service program;
acquiring information of organization in each second block chain service platform in the peer-to-peer network through the peer-to-peer network;
the first block chain service platform determines a target organization to be established with a union chain from all the organizations based on the information of the organizations;
the first block chain service platform determines a second block chain service platform to which the target organization belongs, and a target block chain service platform is obtained;
the first block chain service platform sends alliance chain invitation information to the target block chain service platform based on a peer-to-peer connection which is pre-established between the first block chain service platform and the target block chain service platform; the alliance chain invitation information is used for inviting the target organization to jointly build an alliance chain;
and the first block chain service platform receives an invitation feedback result returned by the target block chain service platform, so as to build a alliance chain according to the invitation feedback result.
2. The method of claim 1, wherein obtaining information about an organization in each second blockchain service platform in the peer-to-peer network comprises:
determining a second block chain service platform connected to the first block chain service platform in the peer-to-peer network to obtain a direct connection platform;
acquiring information of an organization in the direct connection platform connected to and information of an organization in a connection association platform based on the peer-to-peer connection with the direct connection platform; the connection association platform is a second blockchain service platform in the peer-to-peer network and having a connection relationship with the direct connection platform.
3. The method of claim 2, wherein the connection relationship between the connection association platform and the direct connection platform comprises a direct connection relationship and an indirect connection relationship;
the acquiring information of an organization in the direct connection platform connected to and the acquiring information of an organization in the connection association platform based on the peer-to-peer connection with the direct connection platform comprise:
determining a second block chain service platform which has a direct connection relation with the current platform by taking the direct connection platform as the current platform, obtaining the connection platform of the current platform, and obtaining information organized in the connection platform of the current platform;
and taking the connection platform of the current platform as the current platform, returning to the step of determining the second block chain service platform which has a direct connection relation with the current platform to obtain the connection platform of the current platform, and obtaining the information organized in the connection platform of the current platform to iterate until an iteration stop condition is met, so as to obtain the information organized in the connection association platform of the direct connection platform.
4. The method of claim 1, wherein the information of the organization comprises connection information of a second blockchain service platform to which the organization belongs;
before the first blockchain service platform sends alliance chain invitation information to the target blockchain service platform based on a peer-to-peer connection pre-established between the first blockchain service platform and the target blockchain service platform, the method further includes:
and the first block chain service platform establishes peer-to-peer connection with the target block chain service platform based on the connection information of the target block chain service platform.
5. The method of claim 1, wherein sending, by the first blockchain service platform, federation chain invitation information to the target blockchain service platform based on a pre-established peer-to-peer connection with the target blockchain service platform comprises:
the first block chain service platform sends alliance chain invitation information to the target block chain service platform based on peer-to-peer connection pre-established between the first block chain service platform and the target block chain service platform, so that the target block chain service platform forwards the alliance chain invitation information to the target organization, and forwards the invitation feedback result to the first block chain service platform after receiving the invitation feedback result sent by the target organization.
6. The method of any of claims 1 to 5, wherein the federation chain invitation information is initiated by an organization in the first blockchain service platform;
the first block chain service platform receives an invitation feedback result returned by the target block chain service platform, and the establishing of the alliance chain according to the invitation feedback result comprises the following steps:
the first block chain service platform receives an invitation feedback result returned by the target block chain service platform;
and if the invitation feedback result indicates that the target organization agrees to the invitation, adding the target organization to a federation chain based on the organization initiating the invitation.
7. A alliance chain building device applied to a first block chain service platform, the device comprising:
an acquisition module for connecting to a peer-to-peer network based on the set network connection service program; acquiring information of organization in each second block chain service platform in the peer-to-peer network through the peer-to-peer network;
the determining module is used for determining a target organization of the alliance chain to be built from all the organizations based on the information of the organizations; determining a second block chain service platform to which the target organization belongs to obtain a target block chain service platform;
the building module is used for sending alliance chain invitation information to the target block chain service platform based on the pre-established peer-to-peer connection with the target block chain service platform; the alliance chain invitation information is used for inviting the target organization to jointly build an alliance chain; and receiving an invitation feedback result returned by the target block chain service platform, and constructing a alliance chain according to the invitation feedback result.
8. The apparatus of claim 7, wherein the obtaining module is further configured to determine a second blockchain service platform to which the first blockchain service platform is connected in the peer-to-peer network, resulting in a direct connection platform; acquiring information of an organization in the direct connection platform connected to and information of an organization in a connection association platform based on the peer-to-peer connection with the direct connection platform; the connection association platform is a second blockchain service platform in the peer-to-peer network and having a connection relationship with the direct connection platform.
9. The apparatus of claim 8, wherein the connection relationship between the connection association platform and the direct connection platform comprises a direct connection relationship and an indirect connection relationship; the acquisition module is further used for determining a second block chain service platform which has a direct connection relation with the current platform by taking the direct connection platform as the current platform, obtaining the connection platform of the current platform and acquiring information organized in the connection platform of the current platform; and taking the connection platform of the current platform as the current platform, returning to the step of determining the second block chain service platform which has a direct connection relation with the current platform to obtain the connection platform of the current platform, and obtaining the information organized in the connection platform of the current platform to iterate until an iteration stop condition is met, so as to obtain the information organized in the connection association platform of the direct connection platform.
10. The apparatus of claim 7, wherein the information of the organization comprises connection information of a second blockchain service platform to which the organization belongs; the building module is further used for building peer-to-peer connection with the target block chain service platform based on the connection information of the target block chain service platform.
11. The apparatus according to claim 7, wherein the building module is further configured to send federation chain invitation information to the target blockchain service platform based on a peer-to-peer connection pre-established with the target blockchain service platform, so that the target blockchain service platform forwards the federation chain invitation information to the target organization, and after receiving an invitation feedback result sent by the target organization, forwards the invitation feedback result to the first blockchain service platform.
12. The apparatus according to any of claims 7 to 11, wherein the federation chain invitation information is initiated by an organization in the first blockchain service platform; the building module is also used for receiving an invitation feedback result returned by the target block chain service platform; and if the invitation feedback result indicates that the target organization agrees to the invitation, adding the target organization to a federation chain based on the organization initiating the invitation.
13. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 6.
14. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
CN202111545761.1A 2021-12-17 2021-12-17 Alliance chain building method and device, computer equipment and storage medium Active CN113938495B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111545761.1A CN113938495B (en) 2021-12-17 2021-12-17 Alliance chain building method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111545761.1A CN113938495B (en) 2021-12-17 2021-12-17 Alliance chain building method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113938495A CN113938495A (en) 2022-01-14
CN113938495B true CN113938495B (en) 2022-03-18

Family

ID=79289189

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111545761.1A Active CN113938495B (en) 2021-12-17 2021-12-17 Alliance chain building method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113938495B (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108924250B (en) * 2018-07-27 2022-02-11 江西贪玩信息技术有限公司 Service request processing method and device based on block chain and computer equipment
US11546366B2 (en) * 2019-05-08 2023-01-03 International Business Machines Corporation Threat information sharing based on blockchain
CN110599181B (en) * 2019-09-26 2021-05-11 腾讯科技(深圳)有限公司 Data processing method, device and equipment based on block chain and storage medium
CN113542033B (en) * 2021-07-21 2024-02-27 杭州云象网络技术有限公司 Many-to-many mapping method and system for alliance chain foundation establishment and management platform

Also Published As

Publication number Publication date
CN113938495A (en) 2022-01-14

Similar Documents

Publication Publication Date Title
CN109639413B (en) Block chain system based on mobile ad hoc network
US11877214B2 (en) Method, apparatus and system for social networking
US9326237B2 (en) Method, apparatus and computer program product providing performance and energy optimization for mobile computing
CN112104517A (en) Data processing method based on block chain network and related device
CN111445328A (en) Cross-link gateway interaction system and method and supply chain data management method
CN102948129B (en) For the method and apparatus of bridge communications session
CN103118140B (en) By sharing files to the method, system and device of relation loop other user terminals outer
TW202030656A (en) Cross-chain right-using system, method and device, electronic equipment and storage medium
RU2005109315A (en) SYSTEM AND METHOD FOR JOINT USE OF OBJECTS BETWEEN NETWORK COMPUTERS
CN103329503A (en) Ad hoc file sharing
CN112417001B (en) Data processing method based on block chain network and related equipment
CN109462508A (en) Node deployment method, device and storage medium
CN113938495B (en) Alliance chain building method and device, computer equipment and storage medium
US9736754B2 (en) Data distribution to portable electronic devices
CN114866560B (en) Block chain node migration method and device, electronic equipment and readable storage medium
CN115412565A (en) Block chain-based edge node ad hoc network method, device and equipment
Nuevo et al. OIoT: A platform to manage opportunistic IoT communities
CN104050199B (en) Data transmission method and electronic equipment
CN113612732A (en) Resource calling method and device and multi-party secure computing system
CN116016134A (en) Cross-cluster communication deployment method and device and computer equipment
Mechaoui et al. Lightweight coordination model for mobile collaborative mapping
Bah et al. A SIP servlets-based framework for service provisioning in stand-alone MANETs
Khawaja et al. Empowering Collaborative Application Development: A Robust Framework for Ad-Hoc Distributed Systems
CN113806640A (en) Virtual social network construction method and device and readable storage medium
CN116962444A (en) Data storage method and device based on state channel

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