WO2020042933A1 - Blockchain network access method and system - Google Patents

Blockchain network access method and system Download PDF

Info

Publication number
WO2020042933A1
WO2020042933A1 PCT/CN2019/101052 CN2019101052W WO2020042933A1 WO 2020042933 A1 WO2020042933 A1 WO 2020042933A1 CN 2019101052 W CN2019101052 W CN 2019101052W WO 2020042933 A1 WO2020042933 A1 WO 2020042933A1
Authority
WO
WIPO (PCT)
Prior art keywords
chain
voting
node
public
public chain
Prior art date
Application number
PCT/CN2019/101052
Other languages
French (fr)
Chinese (zh)
Inventor
白杰
吴先锋
李冬云
Original Assignee
白杰
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
Priority claimed from CN201811498038.0A external-priority patent/CN110868308B/en
Application filed by 白杰 filed Critical 白杰
Priority to FI20206009A priority Critical patent/FI129087B/en
Publication of WO2020042933A1 publication Critical patent/WO2020042933A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast

Definitions

  • the present application relates to the technical field of blockchain networks, and in particular, to a method and system for accessing a blockchain network.
  • Blockchain technology is a decentralized system idea that can create a relatively objective anti-repudiation digital environment through public consensus.
  • Blockchain technology can ensure that network information cannot be changed once it is released. For example, if a transaction occurs in the blockchain network, nodes in the blockchain network will record the content of the transaction in the generated block, and Block data is broadcast throughout the network, and other nodes in the network store the block data synchronously or asynchronously to form an unchangeable blockchain.
  • the transaction has a broad meaning and does not refer to "commodity sale” or “item exchange” in the traditional sense, but refers to the content or operation result of a certain type or data on the blockchain network, for example, on the network
  • a query request a for the performance of a certain type of communication equipment is initiated, and the query request a is a transaction for the blockchain node B that undertakes the query service.
  • the node B sends the performance table b of the communication device of the model obtained to the node A to the node A.
  • Information A, a and information B, b as transaction information will be written into the data block of the blockchain.
  • a blockchain network includes multiple nodes that reach a certain capability, so a blockchain network is usually only suitable for a single scenario.
  • the Ripple network suitable for financial platforms the Bitcoin network suitable for bitcoin transactions, and industry chains built for a certain industry or alliance chains jointly established in multiple fields, etc. Due to different technical standards adopted by different blockchain networks, such as different data structures and different interfaces, different blockchain networks cannot be docked, it is difficult to implement data operations across the blockchain network, and further make the blockchain
  • the capability set provided by the network is limited to the scope of the blockchain network, and cannot provide services to nodes outside the blockchain network or other chain networks, resulting in data and application island effects.
  • Blockchain networks can transform nodes to achieve the connection of one blockchain network to another blockchain network. This access method is only applicable to the access of a single node or a small network, and usually a blockchain network contains a large number of nodes, and these nodes are distributed in a wide area network location and geographic area to transform the nodes Not only is it difficult to implement, but it also takes a long time, resulting in extremely low access efficiency of the blockchain network.
  • This application provides a method and system for accessing a blockchain network to solve the problem of low access efficiency of the traditional method for accessing a blockchain.
  • this application provides a method for accessing a blockchain network, including:
  • the public chain node creates a voting transaction by executing a voting contract, voting on the invitation of the request chain, and broadcasting the voting transaction in the public chain network;
  • Each maintenance node in the public chain network generates a voting result according to the received voting transaction
  • the maintenance node counts the voting results through the statistical rules determined by the voting contract; if the statistical results meet the preset registration conditions, it sends admission information to the requesting chain node;
  • the requesting chain node initiates a registration transaction with the public chain according to the admission information, and triggers the maintenance node in the public chain to execute the registration contract.
  • the registration transaction includes the requesting chain address and the service content information that can be provided;
  • the maintenance node broadcasts the request chain address and service content information to the nodes in the public chain by executing a registration contract.
  • the preset registration conditions include the number of maintenance nodes whose voting result is consent to go online, which is greater than or equal to the number threshold;
  • the voting result is a maintenance node that agrees to go online, and the proportion of the total number of nodes is greater than or equal to the proportion threshold.
  • the number of public blockchain token holdings held by the voting node at the end of the preset time may be approximately equal to or equal to the proportion threshold.
  • the steps for each maintenance node in the public chain network to generate a voting result according to the received voting transaction further include:
  • the voting result is broadcast as block data in a public chain network.
  • the method before requesting a chain node to connect to a public chain node and triggering the steps of the maintenance node in the public chain to execute a voting contract, the method further includes:
  • the request chain node After the request chain is connected to the public chain network, the request chain node creates an access account on the public chain;
  • the requesting chain node creates an access instruction according to the access account, and the access instruction includes a preset number of public chain certificates for rewarding and maintaining the node.
  • the method before requesting a chain node to connect to a public chain node and triggering the steps of the maintenance node in the public chain to execute a voting contract, the method further includes:
  • test chain node As a test chain node in the public chain network, the request chain is tested for compatibility by initiating a test transaction to the request chain; the test chain node includes at least the interface nodes in the public chain that are connected to the request chain;
  • the test chain node judges whether the request chain has passed the compatibility test according to the test transaction result returned by the request chain;
  • the compatibility test includes: network addressing, interaction protocol rules, smart contract support, service registration, service discovery, service provision, security, reliability, and public chain certificate reserve test.
  • the steps of requesting the chain node to connect to the public chain node and triggering the maintenance node in the public chain to execute the voting contract include:
  • Parachain nodes obtain all the functional programs and information of the request chain
  • the public chain configures smart contracts for parachain nodes to form cross-chain bridges.
  • the step of counting the voting results by the maintenance node through the statistical rules determined by the voting contract includes:
  • the voting contract calculates the voting weight of each maintenance node according to the number of public chain certificates held by the maintenance node;
  • the voting contract generates statistical results based on the voting weight and the voting results of each maintenance node.
  • the method further includes:
  • the current maintenance node receives the voting results of other maintenance nodes through a voting contract
  • the current maintenance node counts the voting results according to the statistical rules and generates statistical results
  • the current maintenance node broadcasts the statistically generated block data on the public chain network
  • this application also provides a blockchain network access system, including a public chain and a request chain connected to the public chain, both of which are point-to-point networks including multiple nodes, each node having Independent computing capabilities; wherein, a smart contract is built into the public chain, and the smart contract includes a voting contract and a registration contract; and some nodes in the public chain network serve as maintenance nodes;
  • the nodes in the request chain are configured to: connect to the public chain nodes, trigger the maintenance nodes in the public chain to execute the voting contract; initiate registration transactions with the public chain according to the admission information, and trigger the maintenance nodes in the public chain to execute the registration contract; Registration transactions include the address of the request chain and information on the content of the services that can be provided;
  • the nodes in the public chain are configured to: create a voting transaction by executing a voting contract, broadcast the voting transaction in a public chain network; generate a voting result according to the received voting transaction; and a statistical rule determined by the voting contract Count the voting results; if the statistical results meet the preset registration conditions, send admission information to the requesting chain node; and broadcast the requesting chain address and service content information to the nodes in the public chain by executing the registration contract.
  • this application provides a method and system for accessing a blockchain network.
  • the method requests a chain node to connect to a public chain node, and first triggers a maintenance node in the public chain to execute a voting contract so that A chain node creates a voting transaction by executing a voting contract, and broadcasts the voting transaction in a public chain network.
  • Each maintenance node in the public chain network generates a voting result according to the received voting transaction, and statistics based on statistical rules determined by the voting contract. Voting results. If the statistical result meets the preset registration conditions, the admission information is sent to the requesting chain node.
  • the requesting chain node initiates a registration transaction to the public chain according to the admission information, and triggers a maintenance node in the public chain to execute a registration contract.
  • the registration transaction includes the requesting chain address and the service content information that can be provided.
  • the maintenance node broadcasts the request chain address and service content information to the nodes in the public chain by executing a registration contract.
  • the network access method provided by this application can quickly access the request chain in the public chain network by executing voting contracts and registration contracts, avoiding the modification of the request chain node, improving access efficiency, and solving the traditional block link access method. Low efficiency.
  • FIG. 1 is a schematic flowchart of a method for accessing a blockchain network in this application
  • FIG. 2 is a schematic flowchart of a voting contract triggered by the application
  • FIG. 3 is a schematic flowchart of a compatibility test of the present application.
  • FIG. 4 is a schematic flowchart of configuring a parallel chain for this application.
  • FIG. 5 is a schematic flowchart of generating statistical results for this application.
  • FIG. 6 is a schematic flowchart of a broadcast statistics result of a public chain network in this application.
  • FIG. 7 is a schematic structural diagram of a blockchain network access system of the present application.
  • a blockchain network refers to a point-to-point network with a decentralized application architecture.
  • the blockchain network can perform distributed storage, public consensus, digital encryption, transaction accounting, and verification. That is, the blockchain network is a trading platform that covers distributed technology, cryptography, P2P network architecture, and various consensus algorithms that may be applied.
  • the blockchain or blockchain data refers to the accounting information generated based on the transaction information when a transaction occurs in the blockchain network, that is, multiple transactions constitute one block of data, and multiple blocks of data form one.
  • Blockchain networks include nodes that establish peer-to-peer network connections with each other. Each node is configured with a corresponding consensus mechanism, such as a smart contract, and has sufficient computing power to perform transaction verification and accounting procedures.
  • the nodes also have an interface specification that conforms to a certain unified standard to achieve access to more nodes or other types of blockchain networks through the interface specification.
  • the public chain, the request chain, the access chain, and the parallel chain are point-to-point P2P networks.
  • the P2P network is composed of multiple nodes, and each node has independent computing capabilities, application operation capabilities, and storage capabilities And the ability to provide human-computer interaction.
  • a node in a P2P network is not only a gateway device that provides network information transmission, but also any computer device certified by the blockchain network, such as personal computers, computer units, servers, and intelligent terminal devices.
  • transactions that occur between different blockchain networks are called cross-chain transactions. For example, a transaction is initiated by a node in the access chain.
  • the object of the transaction is a node in the public chain, or the transaction is initiated by an access chain.
  • the object of the transaction is another access chain.
  • FIG. 1 it is a schematic flowchart of a method for accessing a blockchain network. It can be known from FIG. 1 that the present application provided by the present application provides a method for accessing a blockchain network, including the following steps:
  • S1 Request the chain node to connect to the public chain node, and trigger the maintenance node in the public chain to execute the voting contract.
  • the nodes in the public chain network are divided into multiple roles in advance, such as: maintenance nodes, storage nodes, supervision (candidate) nodes, test chain nodes, and so on.
  • the maintenance node is played by the nodes in the public chain network whose operating environment, network and hardware resources meet the specified requirements.
  • all nodes in the public chain network can be used as maintenance nodes to maintain the consistency and reliability of the public chain network; and some nodes in the public chain network can be used as maintenance nodes to reduce the public chain network. Send large, highly concurrent operations.
  • smart contracts In practical applications, after a node in the public chain is selected as a maintenance node, a smart contract needs to be configured for the maintenance node according to the smart contract stored in advance in the public chain.
  • smart contracts refer to distributed applications that are pre-written in order to implement a specific industry process flow, such as voting contracts, registration contracts, and cross-chain transaction contracts.
  • the request chain as a blockchain network accessing the public chain network, can be divided into the following forms.
  • the first type has the same form as the public link interface specification, that is, the request chain is designed and established according to the public chain network specification.
  • the request chain node can be directly interfaced with the public chain node.
  • this form of request chain is called a sub-chain.
  • the second type has a different interface form from the public link interface specification, that is, the request chain is an established third-party blockchain network. For this type of request chain, it cannot directly interface with public chain nodes. Establish a parallel chain with a bridge function with the public chain to facilitate transaction conversion and information transfer.
  • the requesting chain node connected to the public chain node refers to the above two cases, that the child chain node is connected to the public chain node, and the third-party blockchain node is connected to the public chain node through the parallel chain node.
  • step S1 after the requesting chain node connects to the public chain node, it can trigger a maintainer node in the public chain to call the voting contract and execute the voting contract by issuing an online instruction to the public chain node.
  • the public chain network includes multiple maintainer nodes, when the request chain node connects to the public chain node, it can be determined first whether the node connected to the request chain on the public chain is the maintenance node. If the access node is the maintenance node, it will have The access node executes the voting contract; if the access node is not a maintenance node, the access node may broadcast the online instruction in the public chain network, so that the first maintenance node that receives the online instruction executes the voting contract.
  • the method before the requesting chain node connects to a public chain node and triggers the steps of maintaining a node in the public chain to execute a voting contract, the method further includes:
  • S112 Request the chain node to obtain the public chain certificate pass from the public chain through the access account
  • the requesting chain node creates an access instruction according to the access account, where the access instruction includes a preset number of public chain certificates for rewarding the maintenance node.
  • the request chain node is connected to the public chain node, that is, after determining that the request chain is connected to the public chain network, the request chain node first creates an access account in the public chain.
  • the access account number is an account information corresponding to the entire request chain network, and may include a unique identification code and function description information of the entire request chain, in order to perform a token transfer in subsequent transactions.
  • the requesting chain node After the access account is created, the requesting chain node obtains a preset number of public chain certificates from the public chain through the access account. Among them, the number of public chain tokens acquired can be set according to the size of the request chain and the degree of functional enthusiasm that the request chain can provide. The acquired public chain tokens can be used for subsequent maintenance nodes to vote to verify the rewards of link requests. In order to stimulate the maintainer node to complete the voting task quickly. That is, after obtaining the public chain certificate, the requesting chain node creates an access instruction according to the access account, and the access instruction includes a preset number of public chain certificates to reward the maintenance node. In addition, after the maintenance node makes a voting result, a preset number of public chain certificates are transferred from the access account to the maintenance node account that made the voting result.
  • the method further includes the following steps:
  • a node in the public chain network as a test chain performs compatibility testing on the request chain by initiating a test transaction to the request chain;
  • the test chain node includes at least the interface node in the public chain that is connected to the request chain;
  • test chain node judges whether the request chain passes the compatibility test according to the test transaction result returned by the request chain;
  • the test chain node should include at least the interface node connected to the request chain.
  • the compatibility test includes, but is not limited to, the following aspects: network addressing, interactive protocol rules, smart contract support, service registration, service discovery, service provision, security, reliability, public chain certificate reserve, etc.
  • the request chain has passed the compatibility test based on the result returned by the request chain for each test content, that is, the test transaction result. If the request chain passes the compatibility test, it indicates that the request chain network supports access to the public chain network, then the smart chain in the public chain is configured for the request chain. If the request chain fails the compatibility test, it means that the current operating state of the request chain cannot access the public chain network, or cross-chain transactions with the public chain network cannot occur. Therefore, for a request chain that fails the compatibility test, some nodes in the request chain can be transformed to complete the access.
  • the steps of requesting a chain node to connect to a public chain node and triggering a maintenance node in the public chain to execute a voting contract include:
  • S131 selecting a node as a parallel chain from a public chain network or a request chain network;
  • S133 The public chain configures smart contracts for the parachain nodes to form a cross-chain bridge.
  • the number of nodes to be transformed is determined according to the scale of the request chain network. Generally, only the nodes within ten chains need to be transformed to meet the bridging requirements. Compared with the traditional method, all nodes in the request chain network are transformed. Can greatly reduce the time required to transform the request chain and improve access efficiency.
  • the maintenance node creates a voting transaction by executing a voting contract, and broadcasts the voting transaction in a public chain network.
  • the maintenance node executes the voting contract for the request chain and creates a voting transaction with the request chain information.
  • the request chain information may include an access account and a compatibility test result of the request chain.
  • the maintenance node can broadcast the created voting transaction in the public chain network.
  • each maintenance node that has received a vote transaction also verifies the vote transaction, and after passing the verification, writes the vote transaction into a block to form immutable blockchain data and store it in the public chain network.
  • nodes in the public chain network are computers or servers capable of performing operations. Therefore, in principle, each node is provided with a memory and has a storage function. Through distributed storage of voting transactions, voting transactions can be recorded to ensure the smooth conduct of voting transactions and increase the access efficiency of the request chain through the anti-non-advantage advantage of blockchain technology.
  • the maintenance nodes in the public chain can make corresponding voting results based on the voting transactions after receiving the voting transactions. which is:
  • Each maintenance node in the public chain network generates a voting result according to the received voting transaction.
  • the maintenance nodes in the public chain broadcast the voting transactions, and all nodes in the public chain can receive the voting transactions and verify and store the voting transactions.
  • the node selected as the maintainer will generate the corresponding voting result according to the voting transaction.
  • the voting result includes two types: consent to go online and disagree to go online.
  • the voting result may be used as a block. The data is broadcast on the public chain network.
  • the voting result may be generated by a maintenance node, or a node of all equity owners, by executing a voting contract.
  • the execution of the voting contract includes the judgment of various aspects of the request chain, such as compatibility judgment, judgment of the stock exchange reserve, judgment of interactive agreement rules, judgment of smart contract support, service registration, discovery, judgment of providing capabilities, security Judgment and reliability judgment.
  • the judgment procedures in these aspects can be built into the voting contract.
  • the maintenance node in the public chain network receives the voting transaction, the maintenance node executes the voting contract and runs the judgment procedure in the voting contract to judge the above aspects.
  • the judgment result of any aspect is not supported, a voting result that does not agree with going online is made.
  • the maintenance node counts the voting results through the statistical rules determined by the voting contract; if the statistical results meet the preset registration conditions, it sends admission information to the requesting chain node.
  • the voting contracts in the maintenance nodes can count the voting results generated by each node. Since the voting contract is a distributed application built into each maintenance node, the maintenance node can obtain the voting results of all the maintenance nodes through the voting contract.
  • voting transactions can be broadcast from a node nearby when broadcasting, that is, a maintenance node generates a voting result after creating a voting transaction, and then broadcasts the voting transaction to neighboring nodes .
  • the broadcasted voting transaction can carry the generated voting result, and the neighboring nodes generate the voting result according to the voting transaction, and broadcast the voting transaction and the generated voting result to the neighboring nodes again.
  • the maintenance nodes in the public chain execute the above procedure steps in turn until all the maintenance nodes have accepted the voting transaction.
  • a voting contract it is triggered by the initiation chain and a broadcast invitation is made to the entire public chain network.
  • Nodes in the public chain vote on the invitation, for example, transfer a transaction with a ratio of 0.
  • the maintenance nodes in the public chain execute voting transactions and perform accounting, generate blocks, and then broadcast across the network.
  • the maintenance node executes the invitation and finally makes the result of voting success or failure, records it, generates a block, and broadcasts the entire network again.
  • the voting participants can be any node in the entire network, and the voting execution process is the maintenance node.
  • the statistical results can be judged by executing the voting contract. If the statistical result meets the preset registration conditions, it is determined that the request chain can meet the requirements for accessing the public chain. Therefore, the maintenance node can generate admission information, and then send the generated admission information to the request chain node to make the request
  • the chain registers its functions or services with the public chain.
  • the preset registration conditions may include the following two cases. The first is that the voting result is the number of maintenance nodes that agree to go online, which is greater than or equal to the number threshold. The second is that the preset time ends. The result of voting at all times is the maintenance nodes that agree to go online, and the proportion of the total number of nodes is greater than or equal to the proportion threshold.
  • the number of records is recorded every time a voting result is generated. For example, there are 100 maintenance nodes in the public chain network, which are marked as GP00-GP99. If the first node that executes the voting contract is GP00, then in the GP00 node, a voting transaction is created by executing the voting contract first. After the voting transaction is created, the judgment chain is executed to verify whether the request chain can go online, generate a voting result, and go online for consent. At this time, the voting contract records the statistical results, and the number of agreeing to go online is 1 and the number of disagreeing to go online is 0. Then, the voting transaction and the voting result are sent to the node GP01 adjacent to the GP00 node.
  • GP01 generates the voting result by agreeing to go online through the same process steps as described above.
  • the voting contract records the statistical results, and the number of agreeing to go online is 2 and the number of disagreeing to go online is 0.
  • all maintenance nodes in the public chain network finally generate voting results by executing the above procedure steps.
  • the set number threshold is 60 nodes that agree to go online
  • the generated voting result is consent to go online
  • the statistical result recorded in the voting contract at this time is: the number of agreeing to go online is 60, and the number of disagreeing to go online is 12.
  • the node GP72 can generate admission information by executing a voting contract, and send the generated admission information to the requesting chain node.
  • the voting contract when the voting contract counts the voting results, it only needs to pay attention to whether the number of consents to go online is greater than or equal to the number threshold. In actual applications, only some maintenance nodes need to agree to go online to vote, and then they can go online. Therefore, the on-line of the request chain is more efficient. In the first case, the voting method is more suitable for P2P networks.
  • the voting contract can specify a voting time after the voting transaction is created.
  • each maintainer node in the public chain generates a voting result by executing the voting contract.
  • the voting contract For example, there are 100 maintenance nodes in the public chain network, which are labeled as GP00-GP99.
  • the first node that executes the voting contract is GP00
  • a voting transaction is created by executing the voting contract first.
  • the created voting transaction may include a set voting time, such as a set voting time of 48h.
  • the judgment chain is executed to verify whether the request chain can go online, generate a voting result, and go online for consent.
  • the node GP00 broadcasts the voting transaction, so that other maintenance nodes in the public chain also make voting results after receiving the voting transaction.
  • the voting result of the voting contract statistics is that the number of consented to go online is 83, and the number of disagreements to go online is 17. %, It is determined that the statistical result meets the preset registration conditions.
  • any node can generate admission information by executing a voting contract, and send the generated admission information to the requesting chain node.
  • the second method is used to determine whether the statistical result meets the preset registration conditions.
  • the corresponding statistical result judgment can also be made to avoid affecting the judgment result due to the failure of individual nodes.
  • the second method it is possible to determine the generation time of statistical results by setting the voting time, which is suitable for various types of blockchain networks.
  • the statistical results can also be obtained by a combination of two statistical methods. That is, after the maintenance node creates a voting transaction, the voting time is set. If before the voting time expires, the number of voting results agreed to be online is greater than or equal to the number threshold, the voting is ended and it is determined that the statistical results meet the preset registration conditions.
  • the ratio of the maintenance nodes whose voting results are agreed to go online to the total number of nodes will be judged again.
  • the proportion of the quantity is greater than or equal to the proportion threshold, and it is determined that the statistical result meets a preset registration condition.
  • the step of counting the voting result at the maintenance node through the statistical rules determined by the voting contract further includes the following steps:
  • the voting contract calculates the voting weight of each maintenance node according to the number of public chain certificates held by the maintenance node;
  • S412 The voting contract generates a statistical result according to the voting weight and the voting result of each maintenance node.
  • the public chain since the public chain includes multiple maintainer nodes, when the public chain network maintenance node determines whether the statistical result meets the preset registration conditions, the public chain owned by each maintainer node can be determined according to the voting contract.
  • the specific weight calculation method can be determined according to the number of public chain certificates issued in the actual public chain network. After determining the voting weight, the voting contract calculates the final statistical result according to the voting results of each node.
  • the method further includes the following steps:
  • S421 The current maintenance node receives the voting results of other maintenance nodes through a voting contract
  • S422 The current maintenance node counts the voting results according to the statistical rules, and generates statistical results
  • S423 The current maintenance node broadcasts the statistical results in the public chain network
  • the maintainer node can broadcast it on the public chain network, so that other nodes receive the statistical result and then create block data based on the statistical result to store the statistical result in a distributed manner.
  • the requesting chain node initiates a registration transaction with the public chain according to the admission information, and triggers a maintenance node in the public chain to execute a registration contract.
  • the registration transaction includes the requesting chain address and information about the service content that can be provided.
  • the maintenance node after determining that the statistical result meets the preset registration conditions, the maintenance node generates admission information and sends the admission information to the nodes in the request chain.
  • the nodes in the request chain initiate a registration transaction with the public chain according to the received admission information.
  • the registration transaction includes the address of the request chain and information about the service content that can be provided.
  • the request chain address may be an access account created by the request chain or address information of an access node connected to the request chain, which is used to uniquely characterize the request chain.
  • a cross-chain transaction corresponding to the request chain can occur through the address information during subsequent transactions.
  • the service content information that the request chain can provide can be registered in the public chain network so as to provide services for other nodes outside the request chain in subsequent transactions.
  • the requesting chain node After receiving the admission information, the requesting chain node can verify the admission information and, after the admission information is verified, initiate a registration transaction with the public chain.
  • registration transactions are also a type of cross-chain transactions.
  • the request chain node can broadcast the registration transaction separately in the request chain network and the public chain network.
  • other nodes in the request chain verify the registration transaction and write the block data for storage to form a blockchain that meets the requirements of the request chain specification; on the other hand, the public chain
  • the maintenance node After receiving the registration transaction, the maintenance node also verifies the registration transaction and writes the block data for storage, forming a blockchain that conforms to the public chain specification form.
  • the maintenance node in the public chain After receiving the registration transaction, the maintenance node in the public chain will be triggered to execute the registration contract.
  • the registration contract is also a type of smart contract built into the public chain network maintenance node. Therefore, after executing the registration contract, the maintenance node can extract the request chain address and the service content information that can be provided from the registration transaction, and save and register the extracted information and write it into the block data to store in the block chain.
  • the maintenance node After extracting the request chain address and service content information, the maintenance node needs to broadcast the extracted information so that other nodes in the public chain can also know the service content and address information that the request chain can provide in order to cross the request chain.
  • Chain transactions that is:
  • the maintenance node broadcasts the request chain address and service content information to the nodes in the public chain by executing a registration contract.
  • the public chain maintenance node can broadcast the request chain address and service content information to all nodes in the public chain by executing a registration contract. After receiving the broadcast information, the nodes in the public chain can separately store the request chain address and service content information, and the storage method can be in the form of a registration table. That is, each node of the public chain has a built-in registration form, which records the address of each access chain network and its corresponding service content information, such as:
  • the corresponding service can be provided to nodes outside the request chain through the public chain.
  • the general transaction process is as follows: the nodes in transaction chain A initiate a query transaction to the public chain, and the query transaction contains the required service content as a performance report; the public chain queries the target chain C that can provide the service in the registration form according to the query transaction, and extracts The address of network C, and send this address to the nodes in transaction chain A.
  • the address information may be in the form of bc: // hostname: port / path / parameters.
  • the nodes in transaction chain A then execute smart contracts and the public chain network to initiate service transactions to target chain C, so that target chain C returns specific service content to transaction chain A according to the service transaction.
  • this application also provides a blockchain network access system, including a public chain and a request chain connected to the public chain.
  • a blockchain network access system including a public chain and a request chain connected to the public chain.
  • each node has independent computing capabilities; wherein, a smart contract is built into the public chain, and the smart contract includes a voting contract and a registration contract; some nodes in the public chain network As a maintenance node;
  • the nodes in the request chain are configured to: connect to the public chain nodes, trigger the maintenance nodes in the public chain to execute the voting contract; initiate registration transactions with the public chain according to the admission information, and trigger the maintenance nodes in the public chain to execute the registration contract; Registration transactions include the address of the request chain and information on the content of the services that can be provided;
  • the nodes in the public chain are configured to: create a voting transaction by executing a voting contract, broadcast the voting transaction in a public chain network; generate a voting result according to the received voting transaction; and a statistical rule determined by the voting contract Count the voting results; if the statistical results meet the preset registration conditions, send admission information to the requesting chain node; and broadcast the requesting chain address and service content information to the nodes in the public chain by executing the registration contract.
  • the present application provides a method and system for accessing a blockchain network.
  • the method requests a node in the public chain to connect to a node in the public chain, and first triggers a maintenance node in the public chain to execute a voting contract to enable maintenance
  • a node creates a voting transaction by executing a voting contract, and broadcasts the voting transaction within a public chain network.
  • Each maintenance node in the public chain network generates a voting result according to the received voting transaction, and counts the voting result through a statistical rule determined by a voting contract. If the statistical result meets the preset registration conditions, the admission information is sent to the requesting chain node.
  • the requesting chain node initiates a registration transaction to the public chain according to the admission information, and triggers a maintenance node in the public chain to execute a registration contract.
  • the registration transaction includes the requesting chain address and the service content information that can be provided.
  • the maintenance node broadcasts the request chain address and service content information to the nodes in the public chain by executing a registration contract.
  • the network access method provided by this application can quickly access the request chain in the public chain network by executing voting contracts and registration contracts, avoiding the modification of the request chain node, improving access efficiency, and solving the traditional block link access method. Low efficiency.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

Provided by the present application are a blockchain network access method and system. The method comprises: after a request chain is connected to a public chain, triggering a maintenance node to execute a voting contract, a node in the public chain creating a voting transaction to carry out voting and broadcasting, the maintenance node executing the voting transaction to generate a block, and broadcasting the voting transaction in the public chain network. The maintenance node generates voting results on the basis of the voting transaction and counts the voting results. If the counted results meet a preset registration condition, access information is sent to a request chain node. The request chain node initiates a registration transaction according to the access information, triggers the maintenance node in the public chain to execute a registration contract, and broadcasts a request chain address and service content information to the node in the public chain. In the present method, by means of executing the voting contract and registration contract, it is possible to quickly access the request chain in the public chain network, avoid the transformation of the request chain node, improve the access efficiency, and solve the problem in traditional blockchain access methods of low access efficiency.

Description

一种区块链网络接入方法及***Method and system for accessing blockchain network
本申请要求在2018年8月28日提交中国专利局、申请号为201810986825.3、发明名称为“区块链标准应用模型及其应用方法”,以及,在2018年12月7日提交中国专利局、申请号为201811498038.0、发明名称为“一种区块链网络接入方法及***”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application requires the submission of the China Patent Office on August 28, 2018, application number 201810986825.3, and the invention name as "Blockchain Standard Application Model and Application Method", and on December 7, 2018, the China Patent Office, The priority of a Chinese patent application with application number 201811498038.0 and the invention name "a method and system for accessing a blockchain network" is incorporated herein by reference in its entirety.
技术领域Technical field
本申请涉及区块链网络技术领域,尤其涉及一种区块链网络接入方法及***。The present application relates to the technical field of blockchain networks, and in particular, to a method and system for accessing a blockchain network.
背景技术Background technique
区块链技术是一种去中心化的***思想,能通过公众共识的方式,创建的一个相对客观的抗抵赖数字环境。区块链技术可以保证网络信息一经发布即不可更改,例如,区块链网络中发生一笔交易,区块链网络中的节点会在生成的区块中记载该笔交易的内容,并将区块数据进行全网广播,网络中的其他节点以同步或异步的方式存储该区块数据,形成不可更改的区块链。Blockchain technology is a decentralized system idea that can create a relatively objective anti-repudiation digital environment through public consensus. Blockchain technology can ensure that network information cannot be changed once it is released. For example, if a transaction occurs in the blockchain network, nodes in the blockchain network will record the content of the transaction in the generated block, and Block data is broadcast throughout the network, and other nodes in the network store the block data synchronously or asynchronously to form an unchangeable blockchain.
其中,所述交易具有广义性,不是指传统意义上的“商品买卖”、“物品交换”,而是指区块链网络上的某种或某个数据操作内容或操作结果,例如,在网络上某个区块链节点A发起一个某型号通信设备性能的查询请求a,所述查询请求a对于承担查询服务的区块链节点B来说就是一笔交易。同理。节点B将查询得到的该型号通信设备的性能表b发送给节点A也是一笔交易。信息A、a和信息B、b作为交易信息会被写入区块链的数据区块中。Among them, the transaction has a broad meaning and does not refer to "commodity sale" or "item exchange" in the traditional sense, but refers to the content or operation result of a certain type or data on the blockchain network, for example, on the network On a certain blockchain node A, a query request a for the performance of a certain type of communication equipment is initiated, and the query request a is a transaction for the blockchain node B that undertakes the query service. Similarly. It is also a transaction that the node B sends the performance table b of the communication device of the model obtained to the node A to the node A. Information A, a and information B, b as transaction information will be written into the data block of the blockchain.
区块链网络包括达到某种能力的多个节点,因此,一个区块链网络通常只适用于某个单一的场景。例如,适用于金融平台的Ripple网络,适用于比特币交易的比特币网络,以及为某一行业搭建的行业链或者多个领域共同组建的联盟链等。由于不同区块链网络采用的技术标准不同,如不同的数据结构和不同的接口等,不同区块链网络之间无法进行对接,难以实现跨越区块链网络的数据操作,进一步使区块链网络提供的能力集仅局限于本区块链网络范围内,不能对本区块链网络以外的节点,或其他链网络提供服务,造成数据和应用孤岛效应。A blockchain network includes multiple nodes that reach a certain capability, so a blockchain network is usually only suitable for a single scenario. For example, the Ripple network suitable for financial platforms, the Bitcoin network suitable for bitcoin transactions, and industry chains built for a certain industry or alliance chains jointly established in multiple fields, etc. Due to different technical standards adopted by different blockchain networks, such as different data structures and different interfaces, different blockchain networks cannot be docked, it is difficult to implement data operations across the blockchain network, and further make the blockchain The capability set provided by the network is limited to the scope of the blockchain network, and cannot provide services to nodes outside the blockchain network or other chain networks, resulting in data and application island effects.
区块链网络之间可以通过对节点进行改造的方式,实现一个区块链网络接入到另一个区块链网络。这种接入方法仅适用于单个节点或小型网络的接入,而通常区块链网络中包含的节点数量极多,并且这些节点分布在广域的网络位置和地理区域中,对节点进行改造不仅难以实施,而且需要消耗很长的时间,造成区块链网络的接入效率极低。Blockchain networks can transform nodes to achieve the connection of one blockchain network to another blockchain network. This access method is only applicable to the access of a single node or a small network, and usually a blockchain network contains a large number of nodes, and these nodes are distributed in a wide area network location and geographic area to transform the nodes Not only is it difficult to implement, but it also takes a long time, resulting in extremely low access efficiency of the blockchain network.
发明内容Summary of the Invention
本申请提供了一种区块链网络接入方法及***,以解决传统区块链接入方法接入效率低的问题。This application provides a method and system for accessing a blockchain network to solve the problem of low access efficiency of the traditional method for accessing a blockchain.
一方面,本申请提供一种区块链网络接入方法,包括:In one aspect, this application provides a method for accessing a blockchain network, including:
请求链节点连接公链节点,触发公链中维护节点执行投票合约;Request the chain node to connect to the public chain node and trigger the maintenance node in the public chain to execute the voting contract;
公链节点通过执行投票合约创建投票交易,对于请求链的邀约进行投票,以及在公链网络内广播所述投票交易;The public chain node creates a voting transaction by executing a voting contract, voting on the invitation of the request chain, and broadcasting the voting transaction in the public chain network;
公链网络中各维护节点根据接收到的所述投票交易生成投票结果;Each maintenance node in the public chain network generates a voting result according to the received voting transaction;
维护节点通过投票合约确定的统计规则统计投票结果;如果统计结果满足预设注册条件,向请求链节点发送准入信息;The maintenance node counts the voting results through the statistical rules determined by the voting contract; if the statistical results meet the preset registration conditions, it sends admission information to the requesting chain node;
请求链节点根据准入信息向公链发起注册交易,触发公链中的维护节点执行注册合约,所述注册交易包括请求链地址以及所能提供的服务内容信息;The requesting chain node initiates a registration transaction with the public chain according to the admission information, and triggers the maintenance node in the public chain to execute the registration contract. The registration transaction includes the requesting chain address and the service content information that can be provided;
维护节点通过执行注册合约向公链中的节点广播请求链地址和服务内容信息。The maintenance node broadcasts the request chain address and service content information to the nodes in the public chain by executing a registration contract.
可选的,所述预设注册条件包括投票结果为同意上线的维护节点数量,大于或等于数量阈值;Optionally, the preset registration conditions include the number of maintenance nodes whose voting result is consent to go online, which is greater than or equal to the number threshold;
或者,在预设时间结束时刻投票结果为同意上线的维护节点,占节点总量的比例大于或等于比例阈值。Alternatively, at the end of the preset time, the voting result is a maintenance node that agrees to go online, and the proportion of the total number of nodes is greater than or equal to the proportion threshold.
或者,在预设时间结束时刻投票节点所持的公链证通的数量,占公链证通总量的比例大约或等于比例阈值。Alternatively, the number of public blockchain token holdings held by the voting node at the end of the preset time may be approximately equal to or equal to the proportion threshold.
可选的,公链网络中各维护节点根据接收到的所述投票交易生成投票结果的步骤还包括:Optionally, the steps for each maintenance node in the public chain network to generate a voting result according to the received voting transaction further include:
将所述投票结果作为区块数据在公链网络中广播。The voting result is broadcast as block data in a public chain network.
可选的,请求链节点连接公链节点,触发公链中维护节点执行投票合约的步骤前,所述方法还包括:Optionally, before requesting a chain node to connect to a public chain node and triggering the steps of the maintenance node in the public chain to execute a voting contract, the method further includes:
在请求链连接公链网络后,由请求链节点在公链创建接入账号;After the request chain is connected to the public chain network, the request chain node creates an access account on the public chain;
请求链节点通过接入账号从公链获取公链证通;Request the chain node to obtain the public chain certificate pass from the public chain through the access account;
请求链节点根据接入账号创建接入指令,所述接入指令中包括用于奖励维护节点的预设数量公链证通。The requesting chain node creates an access instruction according to the access account, and the access instruction includes a preset number of public chain certificates for rewarding and maintaining the node.
可选的,请求链节点连接公链节点,触发公链中维护节点执行投票合约的步骤前,所述方法还包括:Optionally, before requesting a chain node to connect to a public chain node and triggering the steps of the maintenance node in the public chain to execute a voting contract, the method further includes:
公链网络中作为测试链的节点,通过向请求链发起测试交易,对请求链进行兼容性测试;测试链节点至少包括公链中与请求链连接的接口节点;As a test chain node in the public chain network, the request chain is tested for compatibility by initiating a test transaction to the request chain; the test chain node includes at least the interface nodes in the public chain that are connected to the request chain;
测试链节点根据请求链返回的测试交易结果,判断请求链是否通过兼容性测试;The test chain node judges whether the request chain has passed the compatibility test according to the test transaction result returned by the request chain;
如果请求链通过兼容性测试,为请求链配置智能合约。If the request chain passes the compatibility test, configure a smart contract for the request chain.
可选的,所述兼容性测试包括:网络寻址、交互协议规则、智能合约支持、服务注册、服务发现、服务提供、安全性、可靠性、公链证通储备测试。Optionally, the compatibility test includes: network addressing, interaction protocol rules, smart contract support, service registration, service discovery, service provision, security, reliability, and public chain certificate reserve test.
可选的,请求链节点连接公链节点,触发公链中维护节点执行投票合约的步骤,包括:Optionally, the steps of requesting the chain node to connect to the public chain node and triggering the maintenance node in the public chain to execute the voting contract include:
从公链网络或请求链网络中选取作为平行链的节点;Select a node as a parallel chain from the public chain network or the request chain network;
平行链节点获取请求链的全部功能程序和信息;Parachain nodes obtain all the functional programs and information of the request chain;
公链为平行链节点配置智能合约,以形成跨链桥接。The public chain configures smart contracts for parachain nodes to form cross-chain bridges.
可选的,维护节点通过投票合约确定的统计规则统计投票结果的步骤包括:Optionally, the step of counting the voting results by the maintenance node through the statistical rules determined by the voting contract includes:
投票合约根据维护节点所拥有的公链证通数量,计算每个维护节点的投票权重;The voting contract calculates the voting weight of each maintenance node according to the number of public chain certificates held by the maintenance node;
投票合约根据投票权重以及每个维护节点的投票结果,生成统计结果。The voting contract generates statistical results based on the voting weight and the voting results of each maintenance node.
可选的,维护节点通过投票合约确定的统计规则统计投票结果的步骤后,所述方法还包括:Optionally, after the step of counting the voting results by the maintenance node through the statistical rules determined by the voting contract, the method further includes:
当前维护节点通过投票合约接收其他维护节点的投票结果;The current maintenance node receives the voting results of other maintenance nodes through a voting contract;
当前维护节点根据统计规则统计投票结果,生成统计结果;The current maintenance node counts the voting results according to the statistical rules and generates statistical results;
当前维护节点将统计结果生成区块数据在公链网络中广播;The current maintenance node broadcasts the statistically generated block data on the public chain network;
所述公链网络中的其他节点在接收到所述区块数据后,将区块数据保存至本地完成区块数据同步。After receiving the block data, other nodes in the public chain network save the block data locally to complete the block data synchronization.
另一方面,本申请还提供一种区块链网络接入***,包括公链和连接公链的请求链,所述公链和请求链均为包括多个节点的点对点网络,每个节点具有独立的运算能力;其中,所述公链中内置有智能合约,所述智能合约包括投票合约和注册合约;所述公链网络中的部分节点作为维护节点;On the other hand, this application also provides a blockchain network access system, including a public chain and a request chain connected to the public chain, both of which are point-to-point networks including multiple nodes, each node having Independent computing capabilities; wherein, a smart contract is built into the public chain, and the smart contract includes a voting contract and a registration contract; and some nodes in the public chain network serve as maintenance nodes;
所述请求链中的节点被配置为:连接公链节点,触发公链中维护节点执行投票合约;根据准入信息向公链发起注册交易,触发公链中的维护节点执行注册合约,所述注册交易包括请求链地址以及所能提供的服务内容信息;The nodes in the request chain are configured to: connect to the public chain nodes, trigger the maintenance nodes in the public chain to execute the voting contract; initiate registration transactions with the public chain according to the admission information, and trigger the maintenance nodes in the public chain to execute the registration contract; Registration transactions include the address of the request chain and information on the content of the services that can be provided;
所述公链中的节点被配置为:通过执行投票合约创建投票交易,在公链网络内广播所述投票交易;根据接收到的所述投票交易生成投票结果;以及通过投票合约确定的统计规则统计投票结果;如果统计结果满足预设注册条件,向请求链节点发送准入信息;以及通过执行注册合约向公链中的节点广播请求链地址和服务内容信息。The nodes in the public chain are configured to: create a voting transaction by executing a voting contract, broadcast the voting transaction in a public chain network; generate a voting result according to the received voting transaction; and a statistical rule determined by the voting contract Count the voting results; if the statistical results meet the preset registration conditions, send admission information to the requesting chain node; and broadcast the requesting chain address and service content information to the nodes in the public chain by executing the registration contract.
由以上技术方案可知,本申请提供一种区块链网络接入方法及***,所述方法在实际应用中,请求链节点连接公链节点,先触发公链中维护节点执行投票合约,使公链节点通过执行投票合约创建投票交易,以及在公链网络内广播所述投票交易,公链网络中各维护节点根据接收到的所述投票交易生成投票结果,以及通过投票合约确定的统计规则统计投票结果。如果统计结果满足预设注册条件,向请求链节点发送准入信息。请求链节点根据准入信息向公链发起注册交易,触发公链中的维护节点执行注册合约,所述注册交易包括请求链地址以及所能提供的服务内容信息。最后,维护节点通过执行注册合约向公链中的节点广播请求链地址和服务内容信息。本申请提供的网络接入方法,可以通过执行投票合约和注册合约,快速在公链网络中接入请求链,避免对请求链节点进行改造,提高接入效率,解决传统区块链接入方法接入效率低的问题。As can be known from the above technical solutions, this application provides a method and system for accessing a blockchain network. In practical applications, the method requests a chain node to connect to a public chain node, and first triggers a maintenance node in the public chain to execute a voting contract so that A chain node creates a voting transaction by executing a voting contract, and broadcasts the voting transaction in a public chain network. Each maintenance node in the public chain network generates a voting result according to the received voting transaction, and statistics based on statistical rules determined by the voting contract. Voting results. If the statistical result meets the preset registration conditions, the admission information is sent to the requesting chain node. The requesting chain node initiates a registration transaction to the public chain according to the admission information, and triggers a maintenance node in the public chain to execute a registration contract. The registration transaction includes the requesting chain address and the service content information that can be provided. Finally, the maintenance node broadcasts the request chain address and service content information to the nodes in the public chain by executing a registration contract. The network access method provided by this application can quickly access the request chain in the public chain network by executing voting contracts and registration contracts, avoiding the modification of the request chain node, improving access efficiency, and solving the traditional block link access method. Low efficiency.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本申请的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solution of the present application more clearly, the drawings needed to be used in the embodiments will be briefly introduced below. Obviously, for those skilled in the art, without any creative effort, Other drawings can be obtained from these drawings.
图1为本申请一种区块链网络接入方法的流程示意图;FIG. 1 is a schematic flowchart of a method for accessing a blockchain network in this application;
图2为本申请触发投票合约的流程示意图;FIG. 2 is a schematic flowchart of a voting contract triggered by the application;
图3为本申请一种兼容性测试的流程示意图;FIG. 3 is a schematic flowchart of a compatibility test of the present application;
图4为本申请配置平行链的流程示意图;FIG. 4 is a schematic flowchart of configuring a parallel chain for this application;
图5为本申请生成统计结果的流程示意图;FIG. 5 is a schematic flowchart of generating statistical results for this application;
图6为本申请公链网络广播统计结果的流程示意图;FIG. 6 is a schematic flowchart of a broadcast statistics result of a public chain network in this application;
图7为本申请一种区块链网络接入***的结构示意图。FIG. 7 is a schematic structural diagram of a blockchain network access system of the present application.
具体实施方式detailed description
下面将详细地对实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下实施例中描述的实施方式并不代表与本申请相一致的所有实施方式。仅是与权利要求书中所详述的、本申请的一些方面相一致的***和方法的示例。The embodiments will be described in detail below, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following examples do not represent all implementations consistent with this application. These are merely examples of systems and methods consistent with some aspects of the application as detailed in the claims.
在本申请提供的技术方案中,区块链网络是指具有去中心化应用架构的点对点网络,所述区块链网络能够在网络内部进行分布式存储、公共共识、数字加密、交易记账以及验证。即区块链网络是涵盖了分布式技术、密码学、P2P网络架构以及各种可能被应用的共识算法的交易平台。In the technical solution provided in this application, a blockchain network refers to a point-to-point network with a decentralized application architecture. The blockchain network can perform distributed storage, public consensus, digital encryption, transaction accounting, and verification. That is, the blockchain network is a trading platform that covers distributed technology, cryptography, P2P network architecture, and various consensus algorithms that may be applied.
本申请中,区块链或区块链数据是指在区块链网络中发生交易时,根据交易信息生成的记账信息,即多笔交易组成一个区块数据,多个区块数据形成一条带有时间戳的区块链。区块链网络中,包括相互建立点对点网络连接的节点,每一个节点都配置有相应的共识机制,如智能合约,并且具有足够的运算能力,以进行交易验证和记账程序。节点上还具有符合某种统一标准的接口规范,以实现通过接口规范接入更多的节点或者其他类型的区块链网络。In this application, the blockchain or blockchain data refers to the accounting information generated based on the transaction information when a transaction occurs in the blockchain network, that is, multiple transactions constitute one block of data, and multiple blocks of data form one. Blockchain with timestamp. Blockchain networks include nodes that establish peer-to-peer network connections with each other. Each node is configured with a corresponding consensus mechanism, such as a smart contract, and has sufficient computing power to perform transaction verification and accounting procedures. The nodes also have an interface specification that conforms to a certain unified standard to achieve access to more nodes or other types of blockchain networks through the interface specification.
本申请提供的技术方案中,公链、请求链、接入链以及平行链为点对点形式的P2P网络,P2P网络由多个节点组成,每个节点具有独立的运算能力、应用运行能力、存储能力以及提供人机交互的能力。实际应用中,P2P网络中的节点不仅是提供网络信息传递的网关设备,而且可以是被区块链网络认证的任何计算机设备,如个人计算机、计算机机组、服务器以及智能终端设备等。在本申请中,交易发生在不同区块链网络之间的称为跨链交易,例如交易由接入链中的节点发起,交易的对象是公链中的节点,或者交易由一个接入链发起,交易的对象是另一个接入链。In the technical solution provided in this application, the public chain, the request chain, the access chain, and the parallel chain are point-to-point P2P networks. The P2P network is composed of multiple nodes, and each node has independent computing capabilities, application operation capabilities, and storage capabilities And the ability to provide human-computer interaction. In practical applications, a node in a P2P network is not only a gateway device that provides network information transmission, but also any computer device certified by the blockchain network, such as personal computers, computer units, servers, and intelligent terminal devices. In this application, transactions that occur between different blockchain networks are called cross-chain transactions. For example, a transaction is initiated by a node in the access chain. The object of the transaction is a node in the public chain, or the transaction is initiated by an access chain. The object of the transaction is another access chain.
参见图1,为一种区块链网络接入方法的流程示意图。由图1可知,本申请提供的本申请提供区块链网络接入方法,包括以下步骤:Referring to FIG. 1, it is a schematic flowchart of a method for accessing a blockchain network. It can be known from FIG. 1 that the present application provided by the present application provides a method for accessing a blockchain network, including the following steps:
S1:请求链节点连接公链节点,触发公链中维护节点执行投票合约。S1: Request the chain node to connect to the public chain node, and trigger the maintenance node in the public chain to execute the voting contract.
在本申请提供的技术方案中,公链网络中的节点被预先划分为多个角色,例如:维护节点、存储节点、监督(候选)节点、测试链节点等。其中,维护节点是由运行环境、网络和硬件资源符合规定要求的公链网络中的节点充当。在实际应用中,公链网络中的全部节点均可以作为维护节点,以维持公链网络的一致性和可靠性;也可以令公链网络中的部分节点作为维护节点,以减少公链网络中发送大规模、高并发运算。In the technical solution provided in this application, the nodes in the public chain network are divided into multiple roles in advance, such as: maintenance nodes, storage nodes, supervision (candidate) nodes, test chain nodes, and so on. Among them, the maintenance node is played by the nodes in the public chain network whose operating environment, network and hardware resources meet the specified requirements. In practical applications, all nodes in the public chain network can be used as maintenance nodes to maintain the consistency and reliability of the public chain network; and some nodes in the public chain network can be used as maintenance nodes to reduce the public chain network. Send large, highly concurrent operations.
实际应用中,公链中的节点被选定作为维护节点后,需要根据公链中预先存储的智能合约为维护节点配置智能合约。其中,智能合约是指为了实现某一个特定的行业处理流程而预先编写的分布式应用程序,例如:投票合约、注册合约、跨链交易合约等。In practical applications, after a node in the public chain is selected as a maintenance node, a smart contract needs to be configured for the maintenance node according to the smart contract stored in advance in the public chain. Among them, smart contracts refer to distributed applications that are pre-written in order to implement a specific industry process flow, such as voting contracts, registration contracts, and cross-chain transaction contracts.
本申请中,请求链作为接入公链网络的区块链网络,可分为以下几种形式。第一种,具有与公链接口规范相同的形式,即请求链是按照公链网络规范设计和建立的,对于这种形式的请求链网络,可以直接将请求链节点与公链节点进行接口对接,为了便于描述,这种形式的请求链称作子链。第二种,具有与公链接口规范不同的接口形式,即请求链是已经建立好的第三方区块链网络,对于这种请求链,不能直接与公链节点进行接口对接,需要在请求链与公链之间建立具有桥接功能的平行链,以便进行交易转化和信息传递。因此, 在本申请中,所述请求链节点连接公链节点对于上述两种情况分别是指,子链节点连接公链节点,和,第三方区块链节点通过平行链节点连接公链节点。In this application, the request chain, as a blockchain network accessing the public chain network, can be divided into the following forms. The first type has the same form as the public link interface specification, that is, the request chain is designed and established according to the public chain network specification. For this form of request chain network, the request chain node can be directly interfaced with the public chain node. For ease of description, this form of request chain is called a sub-chain. The second type has a different interface form from the public link interface specification, that is, the request chain is an established third-party blockchain network. For this type of request chain, it cannot directly interface with public chain nodes. Establish a parallel chain with a bridge function with the public chain to facilitate transaction conversion and information transfer. Therefore, in this application, the requesting chain node connected to the public chain node refers to the above two cases, that the child chain node is connected to the public chain node, and the third-party blockchain node is connected to the public chain node through the parallel chain node.
对于步骤S1,请求链节点在连接公链节点后,可以通过向公链节点发起上线指令,触发公链中的维护者节点调用投票合约,并执行投票合约。由于公链网络中包括多个维护者节点,因此在请求链节点连接公链节点时,可以优先确定公链上连接请求链的节点是否为维护节点,如果接入节点是维护节点,则直接有接入节点执行投票合约;如果接入节点不是维护节点,可以由接入节点将上线指令在公链网络中进行广播,以使第一个接收到上线指令维护节点执行投票合约。For step S1, after the requesting chain node connects to the public chain node, it can trigger a maintainer node in the public chain to call the voting contract and execute the voting contract by issuing an online instruction to the public chain node. Because the public chain network includes multiple maintainer nodes, when the request chain node connects to the public chain node, it can be determined first whether the node connected to the request chain on the public chain is the maintenance node. If the access node is the maintenance node, it will have The access node executes the voting contract; if the access node is not a maintenance node, the access node may broadcast the online instruction in the public chain network, so that the first maintenance node that receives the online instruction executes the voting contract.
在本申请的部分实施例中,如图2所示,在请求链节点连接公链节点,触发公链中维护节点执行投票合约的步骤前,所述方法还包括:In some embodiments of the present application, as shown in FIG. 2, before the requesting chain node connects to a public chain node and triggers the steps of maintaining a node in the public chain to execute a voting contract, the method further includes:
S111:在请求链连接公链网络后,由请求链节点在公链创建接入账号;S111: After the request chain is connected to the public chain network, the request chain node creates an access account on the public chain;
S112:请求链节点通过接入账号从公链获取公链证通;S112: Request the chain node to obtain the public chain certificate pass from the public chain through the access account;
S113:请求链节点根据接入账号创建接入指令,所述接入指令中包括用于奖励维护节点的预设数量公链证通。S113: The requesting chain node creates an access instruction according to the access account, where the access instruction includes a preset number of public chain certificates for rewarding the maintenance node.
由以上步骤可知,本申请在实际应用中,请求链节点连接公链节点,即确定请求链连接到公链网络后,先由请求链节点在公链中创建一个接入账号。接入账号是整个请求链网络所对应的一个账号信息,可以包括整个请求链的唯一识别编码和功能描述信息,以便在后续交易中进行证通转账。It can be known from the above steps that in the actual application of this application, the request chain node is connected to the public chain node, that is, after determining that the request chain is connected to the public chain network, the request chain node first creates an access account in the public chain. The access account number is an account information corresponding to the entire request chain network, and may include a unique identification code and function description information of the entire request chain, in order to perform a token transfer in subsequent transactions.
在创建接入账号以后,请求链节点通过接入账号从公链中获取预设数量的公链证通。其中,获取的公链证通数量可以根据请求链的规模以及请求链所能提供的功能热度进行设定,获取的公链证通可以用于在后续维护节点投票验证请求链接入时的奖励,以刺激维护者节点快速完成投票任务。即在获取公链证通后,请求链节点根据接入账号创建接入指令,接入指令中包含用于奖励维护节点的预设数量公链证通。并且,在维护节点做出投票结果后,从接入账号向做出投票结果的维护节点账号转账预设数量的公链证通。After the access account is created, the requesting chain node obtains a preset number of public chain certificates from the public chain through the access account. Among them, the number of public chain tokens acquired can be set according to the size of the request chain and the degree of functional enthusiasm that the request chain can provide. The acquired public chain tokens can be used for subsequent maintenance nodes to vote to verify the rewards of link requests. In order to stimulate the maintainer node to complete the voting task quickly. That is, after obtaining the public chain certificate, the requesting chain node creates an access instruction according to the access account, and the access instruction includes a preset number of public chain certificates to reward the maintenance node. In addition, after the maintenance node makes a voting result, a preset number of public chain certificates are transferred from the access account to the maintenance node account that made the voting result.
进一步地,如图3所示,在请求链节点连接公链节点,触发公链中维护节点执行投票合约的步骤前,所述方法还包括以下步骤:Further, as shown in FIG. 3, before the requesting chain node connects to a public chain node and triggers the steps of maintaining a node in the public chain to execute a voting contract, the method further includes the following steps:
S121:公链网络中作为测试链的节点,通过向请求链发起测试交易,对请求链进行兼容性测试;测试链节点至少包括公链中与请求链连接的接口节点;S121: A node in the public chain network as a test chain performs compatibility testing on the request chain by initiating a test transaction to the request chain; the test chain node includes at least the interface node in the public chain that is connected to the request chain;
S122:测试链节点根据请求链返回的测试交易结果,判断请求链是否通过兼容性测试;S122: The test chain node judges whether the request chain passes the compatibility test according to the test transaction result returned by the request chain;
S123:如果请求链通过兼容性测试,为请求链配置智能合约;S123: If the request chain passes the compatibility test, configure a smart contract for the request chain;
S124:如果请求链未通过兼容性测试,从软件架构改造请求链中的部分节点作为平行链节点,以符合容性测试要求。S124: If the request chain fails the compatibility test, some nodes in the request chain are transformed from the software architecture as parachain nodes to meet the requirements of capacitive testing.
由以上步骤可知,在实际应用中,公链网络中作为测试链的节点在确定请求链接入公链网络后,可以通过运行测试程序,向请求链发起测试交易,对请求链进行兼容性测试。为了直接对请求链进行兼容性测试,测试链节点应至少包括与请求链连接的接口节点。本实施例中,兼容性测试包括但不限于以下方面:网络寻址、交互协议规则、智能合约支持、服务注册、服务发现、服务提供、安全性、可靠性、公链证通储备等。It can be known from the above steps that, in practical applications, after a node in the public chain network as a test chain determines that the request is linked to the public chain network, it can run a test program to initiate a test transaction to the request chain to perform a compatibility test on the request chain. In order to directly perform the compatibility test on the request chain, the test chain node should include at least the interface node connected to the request chain. In this embodiment, the compatibility test includes, but is not limited to, the following aspects: network addressing, interactive protocol rules, smart contract support, service registration, service discovery, service provision, security, reliability, public chain certificate reserve, etc.
针对上述兼容性测试,可以根据请求链针对每一项测试内容的返回结果,即测试交易结果判断请求链是否通过兼容性测试。如果所述请求链通过兼容性测试,说明请求链网络 支持接入公链网络,则为请求链配置公链中的智能合约。如果请求链未通过兼容性测试,说明以请求链目前的运行状态,无法接入公链网络,或者无法与公链网络发生跨链交易。因此,对于未通过兼容性测试的请求链,可以通过对请求链中的部分节点进行改造,以完成接入。For the above compatibility test, you can determine whether the request chain has passed the compatibility test based on the result returned by the request chain for each test content, that is, the test transaction result. If the request chain passes the compatibility test, it indicates that the request chain network supports access to the public chain network, then the smart chain in the public chain is configured for the request chain. If the request chain fails the compatibility test, it means that the current operating state of the request chain cannot access the public chain network, or cross-chain transactions with the public chain network cannot occur. Therefore, for a request chain that fails the compatibility test, some nodes in the request chain can be transformed to complete the access.
进一步地,在本申请的部分实施例中,如图4所示,请求链节点连接公链节点,触发公链中维护节点执行投票合约的步骤,包括:Further, in some embodiments of the present application, as shown in FIG. 4, the steps of requesting a chain node to connect to a public chain node and triggering a maintenance node in the public chain to execute a voting contract include:
S131:从公链网络或请求链网络中选取作为平行链的节点;S131: selecting a node as a parallel chain from a public chain network or a request chain network;
S132:平行链节点获取请求链的全部功能程序和信息;S132: Parachain nodes obtain all functional programs and information of the request chain;
S133:公链为平行链节点配置智能合约,以形成跨链桥接。S133: The public chain configures smart contracts for the parachain nodes to form a cross-chain bridge.
可以通过改造请求链或公链中的部分节点,形成平行链,以桥接的方式实现两个网络之间的对接。在实际应用中,被改造的节点数量根据请求链网络的规模确定,一般仅需改造十个以内的节点即可满足桥接要求,相对于传统方法中对请求链网络中的全部节点都进行改造,可以大大缩短请求链的改造时间,提高接入效率。You can transform some of the nodes in the request chain or the public chain to form a parallel chain, and realize the connection between the two networks in a bridged manner. In practical applications, the number of nodes to be transformed is determined according to the scale of the request chain network. Generally, only the nodes within ten chains need to be transformed to meet the bridging requirements. Compared with the traditional method, all nodes in the request chain network are transformed. Can greatly reduce the time required to transform the request chain and improve access efficiency.
S2:维护节点通过执行投票合约创建投票交易,以及在公链网络内广播所述投票交易。S2: The maintenance node creates a voting transaction by executing a voting contract, and broadcasts the voting transaction in a public chain network.
本申请提供的技术方案中,当维护节点中的投票合约被触发后,维护节点针对请求链执行投票合约,并创建带有请求链信息的投票交易。其中,请求链信息可以包括请求链的接入账号和兼容性测试结果。在创建投票交易后,维护节点可以在公链网络中广播创建的投票交易。In the technical solution provided in this application, when the voting contract in the maintenance node is triggered, the maintenance node executes the voting contract for the request chain and creates a voting transaction with the request chain information. The request chain information may include an access account and a compatibility test result of the request chain. After the voting transaction is created, the maintenance node can broadcast the created voting transaction in the public chain network.
对于公链中的节点。一方面,每个接收到投票交易的维护节点还对投票交易进行验证,并且在通过验证后,将投票交易写入区块以便形成不可更改的区块链数据,存储公链网络中。在本申请中,公链网络中的节点为能够进行运算的计算机或服务器,因此,原则上每个节点都设有存储器,具有存储功能。通过分布式存储投票交易,可以对投票交易进行记账,以通过区块链技术的抗抵赖优势,确保投票交易的顺利进行,增加请求链的接入效率。For nodes in the public chain. On the one hand, each maintenance node that has received a vote transaction also verifies the vote transaction, and after passing the verification, writes the vote transaction into a block to form immutable blockchain data and store it in the public chain network. In this application, nodes in the public chain network are computers or servers capable of performing operations. Therefore, in principle, each node is provided with a memory and has a storage function. Through distributed storage of voting transactions, voting transactions can be recorded to ensure the smooth conduct of voting transactions and increase the access efficiency of the request chain through the anti-non-advantage advantage of blockchain technology.
另一方面,公链中的维护节点可以在接收到投票交易后,根据投票交易做出相应的投票结果。即:On the other hand, the maintenance nodes in the public chain can make corresponding voting results based on the voting transactions after receiving the voting transactions. which is:
S3:公链网络中各维护节点根据接收到的所述投票交易生成投票结果。S3: Each maintenance node in the public chain network generates a voting result according to the received voting transaction.
实际应用中,公链中的维护节点对投票交易进行广播,公链中的所有节点都可以接收到所述投票交易,并对投票交易进行验证和存储。而对于被选定作为维护者的节点在接收到投票交易后,会根据投票交易生成相应的投票结果。示例地,所述投票结果包括同意上线和不同意上线两种进一步地,在公链网络中各维护节点根据接收到的所述投票交易生成投票结果后,还可以将所述投票结果作为区块数据在公链网络中广播。In practical applications, the maintenance nodes in the public chain broadcast the voting transactions, and all nodes in the public chain can receive the voting transactions and verify and store the voting transactions. After receiving the voting transaction, the node selected as the maintainer will generate the corresponding voting result according to the voting transaction. For example, the voting result includes two types: consent to go online and disagree to go online. Further, after each maintenance node in the public chain network generates a voting result based on the received voting transaction, the voting result may be used as a block. The data is broadcast on the public chain network.
在本申请提供的技术方案中,所述投票结果可以由维护节点,或者所有权益所有者的节点,通过执行投票合约生成相应的投票结果。执行的投票合约中,包括对请求链各个方面需求判断,例如,兼容性判断、证通储备量判断、交互协议规则判断、智能合约支持情况判断、服务注册、发现、提供能力的判断、安全性判断以及可靠性判断等。这些方面的判断程序均可以内置于投票合约中,当公链网络中的维护节点接收到投票交易后,通过维护节点执行投票合约,运行投票合约中的判断程序,对上述各方面进行判断,当出现任一个方面的判断结果为不支持时,即做出不同意上线的投票结果。In the technical solution provided in the present application, the voting result may be generated by a maintenance node, or a node of all equity owners, by executing a voting contract. The execution of the voting contract includes the judgment of various aspects of the request chain, such as compatibility judgment, judgment of the stock exchange reserve, judgment of interactive agreement rules, judgment of smart contract support, service registration, discovery, judgment of providing capabilities, security Judgment and reliability judgment. The judgment procedures in these aspects can be built into the voting contract. When the maintenance node in the public chain network receives the voting transaction, the maintenance node executes the voting contract and runs the judgment procedure in the voting contract to judge the above aspects. When the judgment result of any aspect is not supported, a voting result that does not agree with going online is made.
S4:维护节点通过投票合约确定的统计规则统计投票结果;如果统计结果满足预设注 册条件,向请求链节点发送准入信息。S4: The maintenance node counts the voting results through the statistical rules determined by the voting contract; if the statistical results meet the preset registration conditions, it sends admission information to the requesting chain node.
实际应用中,在维护节点生成的投票结果后,维护节点中的投票合约可以对各个节点生成的投票结果进行统计。由于投票合约是内置在每个维护节点中的分布式应用,因此,维护节点可以通过投票合约获得所有维护节点的投票结果。In actual applications, after the voting results generated by the nodes are maintained, the voting contracts in the maintenance nodes can count the voting results generated by each node. Since the voting contract is a distributed application built into each maintenance node, the maintenance node can obtain the voting results of all the maintenance nodes through the voting contract.
另外,实际应用中,由于公链网络采用P2P网络形式,投票交易可以在广播时,从一个节点就近广播,即一个维护节点在创建投票交易以后,先生成投票结果,再向临近节点广播投票交易。广播的投票交易可以携带有生成的投票结果,临近节点再根据投票交易生成投票结果,并再次向临近的节点广播投票交易和已生成的投票结果。公链中的维护节点依次执行上述程序步骤,直到所有维护节点均接受到投票交易。In addition, in practical applications, since the public chain network adopts the P2P network form, voting transactions can be broadcast from a node nearby when broadcasting, that is, a maintenance node generates a voting result after creating a voting transaction, and then broadcasts the voting transaction to neighboring nodes . The broadcasted voting transaction can carry the generated voting result, and the neighboring nodes generate the voting result according to the voting transaction, and broadcast the voting transaction and the generated voting result to the neighboring nodes again. The maintenance nodes in the public chain execute the above procedure steps in turn until all the maintenance nodes have accepted the voting transaction.
本申请提供的技术方案中,对于一个投票合约,由发起链触发,并向公链全网进行广播邀约。公链中的节点通过向该邀约进行投票,例如,转账一比金额为0的交易。公链中的维护节点执行投票交易并进行记账,生成区块,再进行全网广播。当满足邀约条件,则由维护节点执行邀约并最终做出投票成功或者失败的结果,并记账,生成区块,再次全网广播。通过上述方式完成的一次投票过程中,投票的参与者可以是全网任意节点,而投票的执行过程是维护节点。In the technical solution provided in this application, for a voting contract, it is triggered by the initiation chain and a broadcast invitation is made to the entire public chain network. Nodes in the public chain vote on the invitation, for example, transfer a transaction with a ratio of 0. The maintenance nodes in the public chain execute voting transactions and perform accounting, generate blocks, and then broadcast across the network. When the invitation conditions are met, the maintenance node executes the invitation and finally makes the result of voting success or failure, records it, generates a block, and broadcasts the entire network again. In a voting process completed in the above manner, the voting participants can be any node in the entire network, and the voting execution process is the maintenance node.
在维护节点生成统计结果以后,可以通过执行投票合约对统计结果进行判断。如果统计结果满足预设的注册条件,则确定请求链能够满足接入公链的要求,因此,可以通过维护节点生成准入信息,再将生成的准入信息发送给请求链节点,以使请求链向公链注册其功能或服务。进一步地,在本申请中,所述预设注册条件可以包括以下两种情况,第一种,投票结果为同意上线的维护节点数量,大于或等于数量阈值;第二种,在预设时间结束时刻投票结果为同意上线的维护节点,占节点总量的比例大于或等于比例阈值。After the maintenance node generates the statistical results, the statistical results can be judged by executing the voting contract. If the statistical result meets the preset registration conditions, it is determined that the request chain can meet the requirements for accessing the public chain. Therefore, the maintenance node can generate admission information, and then send the generated admission information to the request chain node to make the request The chain registers its functions or services with the public chain. Further, in this application, the preset registration conditions may include the following two cases. The first is that the voting result is the number of maintenance nodes that agree to go online, which is greater than or equal to the number threshold. The second is that the preset time ends. The result of voting at all times is the maintenance nodes that agree to go online, and the proportion of the total number of nodes is greater than or equal to the proportion threshold.
对于第一种情况,投票合约在执行过程中,每生成一个投票结果即记录一次数量,例如,公链网络中共有100个维护节点,分别标记为GP00-GP99。如果第一个执行投票合约的节点为GP00,则在GP00节点中,先通过执行投票合约,创建投票交易。并在创建投票交易后,通过执行判断程序验证请求链是否可以上线,生成一个投票结果,为同意上线。此时,投票合约记录统计结果,同意上线数量为1,不同意上线数量为0。再将投票交易和投票结果,发送给GP00节点临近的节点GP01,GP01通过上述相同的程序步骤,生成投票结果也为同意上线。此时,投票合约记录统计结果,同意上线数量为2,不同意上线数量为0。依次类推,公链网络中的所有维护节点都通过执行上述程序步骤最终生成投票结果。In the first case, during the execution of the voting contract, the number of records is recorded every time a voting result is generated. For example, there are 100 maintenance nodes in the public chain network, which are marked as GP00-GP99. If the first node that executes the voting contract is GP00, then in the GP00 node, a voting transaction is created by executing the voting contract first. After the voting transaction is created, the judgment chain is executed to verify whether the request chain can go online, generate a voting result, and go online for consent. At this time, the voting contract records the statistical results, and the number of agreeing to go online is 1 and the number of disagreeing to go online is 0. Then, the voting transaction and the voting result are sent to the node GP01 adjacent to the GP00 node. GP01 generates the voting result by agreeing to go online through the same process steps as described above. At this time, the voting contract records the statistical results, and the number of agreeing to go online is 2 and the number of disagreeing to go online is 0. By analogy, all maintenance nodes in the public chain network finally generate voting results by executing the above procedure steps.
如果设定数量阈值是同意上线的节点数量为60个,则在投票合约记录的同意上线数量为60时,确定统计结果满足预设注册条件。例如,在节点GP72执行投票合约时,生成的投票结果为同意上线,而此时投票合约记录的统计结果为:同意上线数量60,不同意上线数量12,则确定统计结果满足预设注册条件。此时,可以由节点GP72通过执行投票合约生成准入信息,并将生成的准入信息发送给请求链节点。If the set number threshold is 60 nodes that agree to go online, then when the number of consent to go online recorded in the voting contract record is 60, it is determined that the statistical result meets the preset registration conditions. For example, when the node GP72 executes the voting contract, the generated voting result is consent to go online, and the statistical result recorded in the voting contract at this time is: the number of agreeing to go online is 60, and the number of disagreeing to go online is 12. At this time, the node GP72 can generate admission information by executing a voting contract, and send the generated admission information to the requesting chain node.
可见,对于第一种情况,投票合约在统计投票结果时,只需要关注同意上线的数量是否大于或等于数量阈值。可以在实际应用中,只需要部分维护节点做出同意上线投票结果后,即可完成上线。因此,请求链的上线效率更高。而对于第一种情况,其投票上线的方式更适合应用在P2P网络。It can be seen that in the first case, when the voting contract counts the voting results, it only needs to pay attention to whether the number of consents to go online is greater than or equal to the number threshold. In actual applications, only some maintenance nodes need to agree to go online to vote, and then they can go online. Therefore, the on-line of the request chain is more efficient. In the first case, the voting method is more suitable for P2P networks.
对于第二种情况,投票合约可以在创建投票交易后,指定一个投票时间,在投票时间内,公链中的各个维护者节点通过执行投票合约分别生成投票结果。例如,公链网络中共有100个维护节点,分别标记为GP00-GP99。如果第一个执行投票合约的节点为GP00,则在GP00节点中,先通过执行投票合约,创建投票交易,创建的投票交易可以包括设定的投票时间,如设定投票时间为48h。并在创建投票交易后,通过执行判断程序验证请求链是否可以上线,生成一个投票结果,为同意上线。In the second case, the voting contract can specify a voting time after the voting transaction is created. During the voting time, each maintainer node in the public chain generates a voting result by executing the voting contract. For example, there are 100 maintenance nodes in the public chain network, which are labeled as GP00-GP99. If the first node that executes the voting contract is GP00, in the GP00 node, a voting transaction is created by executing the voting contract first. The created voting transaction may include a set voting time, such as a set voting time of 48h. After the voting transaction is created, the judgment chain is executed to verify whether the request chain can go online, generate a voting result, and go online for consent.
在创建投票交易后,节点GP00对投票交易进行广播,使得公链中的其他维护节点在接收到投票交易后,也分别做出投票结果。在投票时间到达截止时刻,投票合约统计投票结果为,同意上线数量为83,不同意上线数量为17,则投票结果为同意上线的维护节点占节点总量的比例为83%,大于比例阈值60%,则确定统计结果满足预设注册条件。此时,可以由任一节点通过执行投票合约生成准入信息,并将生成的准入信息发送给请求链节点。After the voting transaction is created, the node GP00 broadcasts the voting transaction, so that other maintenance nodes in the public chain also make voting results after receiving the voting transaction. When the voting time reaches the cut-off time, the voting result of the voting contract statistics is that the number of consented to go online is 83, and the number of disagreements to go online is 17. %, It is determined that the statistical result meets the preset registration conditions. At this time, any node can generate admission information by executing a voting contract, and send the generated admission information to the requesting chain node.
可见,通过第二种方式确定统计结果是否满足预设注册条件,可以在公链中维护节点数量变化时,也能够做出相应的统计结果判断,避免因个别节点故障影响判断结果。对于第二种方式,其可以通过设定投票时间的方式,确定统计结果的生成时间,适应于各种类型的区块链网络。为了获得更好的投票统计效果,本申请中,还可以通过两种统计方式相结合的方式获得统计结果。即在维护节点创建投票交易后,设定投票时间。如果在投票时间截止前,同意上线的投票结果数量大于或等于数量阈值时,结束投票,确定统计结果满足预设注册条件。而如果在投票时间截止后,所述同意上线的投票结果数量仍小于数量阈值,则再次对投票结果为同意上线的维护节点占节点总量的比例进行判断,如果同意上线的维护节点占节点总量的比例大于或等于比例阈值,确定统计结果满足预设注册条件。It can be seen that the second method is used to determine whether the statistical result meets the preset registration conditions. When the number of nodes maintained in the public chain changes, the corresponding statistical result judgment can also be made to avoid affecting the judgment result due to the failure of individual nodes. As for the second method, it is possible to determine the generation time of statistical results by setting the voting time, which is suitable for various types of blockchain networks. In order to obtain better voting statistics, in this application, the statistical results can also be obtained by a combination of two statistical methods. That is, after the maintenance node creates a voting transaction, the voting time is set. If before the voting time expires, the number of voting results agreed to be online is greater than or equal to the number threshold, the voting is ended and it is determined that the statistical results meet the preset registration conditions. If after the voting time expires, the number of voting results agreed to go online is still less than the number threshold, the ratio of the maintenance nodes whose voting results are agreed to go online to the total number of nodes will be judged again. The proportion of the quantity is greater than or equal to the proportion threshold, and it is determined that the statistical result meets a preset registration condition.
进一步地,如图5所示,为了获得更加合理的投票结果,在维护节点通过投票合约确定的统计规则统计投票结果的步骤,还包括以下步骤:Further, as shown in FIG. 5, in order to obtain a more reasonable voting result, the step of counting the voting result at the maintenance node through the statistical rules determined by the voting contract further includes the following steps:
S411:投票合约根据维护节点所拥有的公链证通数量,计算每个维护节点的投票权重;S411: The voting contract calculates the voting weight of each maintenance node according to the number of public chain certificates held by the maintenance node;
S412:投票合约根据投票权重以及每个维护节点的投票结果,生成统计结果。S412: The voting contract generates a statistical result according to the voting weight and the voting result of each maintenance node.
本实施例中,由于公链中包含多个维护者节点,因此,在公链网络维护节点确定统计结果是否满足预设注册条件时,可以根据投票合约确定每个维护者节点所拥有的公链证通数量,并且根据拥有的公链证通为每个维护者几点设置相应的投票权重。理论上,维护者节点所拥有的公链证通数量越多,其在投票中所占的权重就越大。具体的权重计算方式,可以根据实际公链网络中发行的公链证通数量来确定。在确定投票权重后,投票合约在根据每个节点的投票结果计算最终的统计结果。In this embodiment, since the public chain includes multiple maintainer nodes, when the public chain network maintenance node determines whether the statistical result meets the preset registration conditions, the public chain owned by each maintainer node can be determined according to the voting contract. The number of Zhengtong and set the corresponding voting weight for each maintainer according to the public chain Zhengtong owned. Theoretically, the larger the number of public chain certificates held by the maintainer node, the greater the weight it will occupy in voting. The specific weight calculation method can be determined according to the number of public chain certificates issued in the actual public chain network. After determining the voting weight, the voting contract calculates the final statistical result according to the voting results of each node.
进一步地,如图6所示,维护节点通过投票合约确定的统计规则统计投票结果的步骤后,所述方法还包括以下步骤:Further, as shown in FIG. 6, after the step of counting the voting results by the maintenance node through the statistical rules determined by the voting contract, the method further includes the following steps:
S421:当前维护节点通过投票合约接收其他维护节点的投票结果;S421: The current maintenance node receives the voting results of other maintenance nodes through a voting contract;
S422:当前维护节点根据统计规则统计投票结果,生成统计结果;S422: The current maintenance node counts the voting results according to the statistical rules, and generates statistical results;
S423:当前维护节点将统计结果在公链网络中广播;S423: The current maintenance node broadcasts the statistical results in the public chain network;
S424:所述公链网络中的其他节点接收到所述统计结果后,创建并保存包含统计结果的区块数据。S424: After other nodes in the public chain network receive the statistical result, they create and save block data containing the statistical result.
由以上步骤可知,维护节点共同执行投票合约时,如果每个维护节点都生成了投票结果,可以由一个维护节点,如最后一个执行投票合约的维护节点接收其他维护节点的投票 结果,以及根据统计规则统计投票结果,以致最终生成统计结果。维护者节点在生成统计结果后,可以在公链网络中进行广播,以使其他节点接收到统计结果后,根据统计结果创建区块数据,以将统计结果进行分布式存储。It can be known from the above steps that when the maintenance nodes jointly execute the voting contract, if each maintenance node has generated a voting result, one maintenance node, such as the last maintenance node that performs the voting contract, can receive the voting results of other maintenance nodes, and according to statistics The rule counts the voting results so that statistical results are finally generated. After generating the statistical result, the maintainer node can broadcast it on the public chain network, so that other nodes receive the statistical result and then create block data based on the statistical result to store the statistical result in a distributed manner.
S5:请求链节点根据准入信息向公链发起注册交易,触发公链中的维护节点执行注册合约,所述注册交易包括请求链地址以及所能提供的服务内容信息。S5: The requesting chain node initiates a registration transaction with the public chain according to the admission information, and triggers a maintenance node in the public chain to execute a registration contract. The registration transaction includes the requesting chain address and information about the service content that can be provided.
本申请提供的技术方案中,维护节点在确定统计结果满足预设注册条件后,生成准入信息,并将准入信息发送给请求链中的节点。请求链中的节点根据接收到的准入信息向公链发起注册交易,注册交易中包括请求链的地址和所能够提供的服务内容信息。其中,请求链地址可以是请求链创建的接入账号,也可以是连接请求链的接入节点地址信息,用于唯一表征请求链。通过请求链的地址信息,可以在后续交易时,通过该地址信息与请求链发生对应的跨链交易。请求链所能够提供的服务内容信息,可以登记在公链网络中,以便在后续交易中,为请求链以外的其他节点提供服务。In the technical solution provided in this application, after determining that the statistical result meets the preset registration conditions, the maintenance node generates admission information and sends the admission information to the nodes in the request chain. The nodes in the request chain initiate a registration transaction with the public chain according to the received admission information. The registration transaction includes the address of the request chain and information about the service content that can be provided. The request chain address may be an access account created by the request chain or address information of an access node connected to the request chain, which is used to uniquely characterize the request chain. Through the address information of the request chain, a cross-chain transaction corresponding to the request chain can occur through the address information during subsequent transactions. The service content information that the request chain can provide can be registered in the public chain network so as to provide services for other nodes outside the request chain in subsequent transactions.
请求链节点在接收到准入信息后,可以对准入信息进行验证,在准入信息验证通过后,再向公链发起注册交易。实际应用中,注册交易也是跨链交易的一种。当发起注册交易时,请求链节点可以分别在请求链网络和公链网络中分别对注册交易进行广播。一方面,请求链中的其他节点在接收到注册交易后,对注册交易进行验证,并写入区块数据进行保存,形成符合请求链规范要求的区块链;另一方面,公链中的维护节点在接收到注册交易后,也对注册交易进行验证并写入区块数据进行存储,形成符合公链规范形式的区块链。After receiving the admission information, the requesting chain node can verify the admission information and, after the admission information is verified, initiate a registration transaction with the public chain. In practical applications, registration transactions are also a type of cross-chain transactions. When a registration transaction is initiated, the request chain node can broadcast the registration transaction separately in the request chain network and the public chain network. On the one hand, after receiving the registration transaction, other nodes in the request chain verify the registration transaction and write the block data for storage to form a blockchain that meets the requirements of the request chain specification; on the other hand, the public chain After receiving the registration transaction, the maintenance node also verifies the registration transaction and writes the block data for storage, forming a blockchain that conforms to the public chain specification form.
公链中的维护节点在接收到注册交易后,会被触发执行注册合约,注册合约也是内置在公链网络维护节点中的智能合约的一种。因此,维护节点在执行注册合约后,可以从注册交易中提取请求链地址以及所能提供的服务内容信息,并且将提取的信息进行保存登记,并写入区块数据存储在区块链中。After receiving the registration transaction, the maintenance node in the public chain will be triggered to execute the registration contract. The registration contract is also a type of smart contract built into the public chain network maintenance node. Therefore, after executing the registration contract, the maintenance node can extract the request chain address and the service content information that can be provided from the registration transaction, and save and register the extracted information and write it into the block data to store in the block chain.
在提取了请求链地址和服务内容信息后,维护节点需要对提取的信息进行广播,使公链中的其他节点也能够知晓请求链所能够提供的服务内容和地址信息,以便与请求链发生跨链交易,即:After extracting the request chain address and service content information, the maintenance node needs to broadcast the extracted information so that other nodes in the public chain can also know the service content and address information that the request chain can provide in order to cross the request chain. Chain transactions, that is:
S6:维护节点通过执行注册合约向公链中的节点广播请求链地址和服务内容信息。S6: The maintenance node broadcasts the request chain address and service content information to the nodes in the public chain by executing a registration contract.
本申请提供的技术方案中,公链维护节点通过执行注册合约,可以向公链中的所有节点广播请求链地址和服务内容信息。公链中的节点在接收到广播的信息后,可以分别对请求链地址和服务内容信息进行存储,存储的方式可以是登记表的形式。即,在公链的每个节点中,都内置一个登记表,登记表中记录了每个接入链网络的地址和其对应提供的服务内容信息,例如:In the technical solution provided in this application, the public chain maintenance node can broadcast the request chain address and service content information to all nodes in the public chain by executing a registration contract. After receiving the broadcast information, the nodes in the public chain can separately store the request chain address and service content information, and the storage method can be in the form of a registration table. That is, each node of the public chain has a built-in registration form, which records the address of each access chain network and its corresponding service content information, such as:
接入链名称Access chain name 地址address 服务内容Service Content
AA #### 证通兑换Exchange
BB #### 证通兑换Exchange
CC #### 证通兑换、性能报告Securities exchange, performance report
DD #### 证通兑换、查询服务Securities exchange and inquiry services
……... ……... ……...
在实际应用中,请求链接入公链后,可以通过公链为请求链以外的节点提供对应的服务。大致交易流程为:交易链A中的节点向公链发起查询交易,查询交易中包含需要的服 务内容为性能报告;公链根据查询交易在登记表中查询能够提供该服务的目标链C,提取网络C的地址,并将该地址发送给交易链A中的节点。本实施例中,地址信息可以是bc://hostname:port/path/parameters的形式。交易链A中的节点再通过执行智能合约和公链网络,向目标链C发起服务交易,以使目标链C根据服务交易向交易链A返回具体的服务内容。In practical applications, after the request is linked into the public chain, the corresponding service can be provided to nodes outside the request chain through the public chain. The general transaction process is as follows: the nodes in transaction chain A initiate a query transaction to the public chain, and the query transaction contains the required service content as a performance report; the public chain queries the target chain C that can provide the service in the registration form according to the query transaction, and extracts The address of network C, and send this address to the nodes in transaction chain A. In this embodiment, the address information may be in the form of bc: // hostname: port / path / parameters. The nodes in transaction chain A then execute smart contracts and the public chain network to initiate service transactions to target chain C, so that target chain C returns specific service content to transaction chain A according to the service transaction.
基于上述区块链网络的接入方法,如图7所示,本申请还提供一种区块链网络接入***,包括公链和连接公链的请求链,所述公链和请求链均为包括多个节点的点对点网络,每个节点具有独立的运算能力;其中,所述公链中内置有智能合约,所述智能合约包括投票合约和注册合约;所述公链网络中的部分节点作为维护节点;Based on the above-mentioned blockchain network access method, as shown in FIG. 7, this application also provides a blockchain network access system, including a public chain and a request chain connected to the public chain. For a point-to-point network including multiple nodes, each node has independent computing capabilities; wherein, a smart contract is built into the public chain, and the smart contract includes a voting contract and a registration contract; some nodes in the public chain network As a maintenance node;
所述请求链中的节点被配置为:连接公链节点,触发公链中维护节点执行投票合约;根据准入信息向公链发起注册交易,触发公链中的维护节点执行注册合约,所述注册交易包括请求链地址以及所能提供的服务内容信息;The nodes in the request chain are configured to: connect to the public chain nodes, trigger the maintenance nodes in the public chain to execute the voting contract; initiate registration transactions with the public chain according to the admission information, and trigger the maintenance nodes in the public chain to execute the registration contract; Registration transactions include the address of the request chain and information on the content of the services that can be provided;
所述公链中的节点被配置为:通过执行投票合约创建投票交易,在公链网络内广播所述投票交易;根据接收到的所述投票交易生成投票结果;以及通过投票合约确定的统计规则统计投票结果;如果统计结果满足预设注册条件,向请求链节点发送准入信息;以及通过执行注册合约向公链中的节点广播请求链地址和服务内容信息。The nodes in the public chain are configured to: create a voting transaction by executing a voting contract, broadcast the voting transaction in a public chain network; generate a voting result according to the received voting transaction; and a statistical rule determined by the voting contract Count the voting results; if the statistical results meet the preset registration conditions, send admission information to the requesting chain node; and broadcast the requesting chain address and service content information to the nodes in the public chain by executing the registration contract.
由以上技术方案可知,本申请提供一种区块链网络接入方法及***,所述方法在实际应用中,请求链节点连接公链节点,先触发公链中维护节点执行投票合约,使维护节点通过执行投票合约创建投票交易,以及在公链网络内广播所述投票交易。公链网络中各维护节点根据接收到的所述投票交易生成投票结果,以及通过投票合约确定的统计规则统计投票结果。如果统计结果满足预设注册条件,向请求链节点发送准入信息。请求链节点根据准入信息向公链发起注册交易,触发公链中的维护节点执行注册合约,所述注册交易包括请求链地址以及所能提供的服务内容信息。最后,维护节点通过执行注册合约向公链中的节点广播请求链地址和服务内容信息。本申请提供的网络接入方法,可以通过执行投票合约和注册合约,快速在公链网络中接入请求链,避免对请求链节点进行改造,提高接入效率,解决传统区块链接入方法接入效率低的问题。As can be known from the above technical solutions, the present application provides a method and system for accessing a blockchain network. In practical applications, the method requests a node in the public chain to connect to a node in the public chain, and first triggers a maintenance node in the public chain to execute a voting contract to enable maintenance A node creates a voting transaction by executing a voting contract, and broadcasts the voting transaction within a public chain network. Each maintenance node in the public chain network generates a voting result according to the received voting transaction, and counts the voting result through a statistical rule determined by a voting contract. If the statistical result meets the preset registration conditions, the admission information is sent to the requesting chain node. The requesting chain node initiates a registration transaction to the public chain according to the admission information, and triggers a maintenance node in the public chain to execute a registration contract. The registration transaction includes the requesting chain address and the service content information that can be provided. Finally, the maintenance node broadcasts the request chain address and service content information to the nodes in the public chain by executing a registration contract. The network access method provided by this application can quickly access the request chain in the public chain network by executing voting contracts and registration contracts, avoiding the modification of the request chain node, improving access efficiency, and solving the traditional block link access method. Low efficiency.
本申请提供的实施例之间的相似部分相互参见即可,以上提供的具体实施方式只是本申请总的构思下的几个示例,并不构成本申请保护范围的限定。对于本领域的技术人员而言,在不付出创造性劳动的前提下依据本申请方案所扩展出的任何其他实施方式都属于本申请的保护范围。Similar parts between the embodiments provided in this application can be referred to each other. The specific implementations provided above are just a few examples under the general concept of this application, and do not constitute a limitation of the protection scope of this application. For those skilled in the art, any other implementations extended according to the scheme of the present application under the premise of no creative labor belong to the protection scope of the present application.

Claims (10)

  1. 一种区块链网络接入方法,其特征在于,包括:A method for accessing a blockchain network, comprising:
    请求链节点连接公链节点,触发公链节点执行投票合约;Request the chain node to connect to the public chain node and trigger the public chain node to execute the voting contract;
    公链节点通过执行投票合约创建投票交易,对于请求链的邀约进行投票,以及在公链网络内广播所述投票交易;The public chain node creates a voting transaction by executing a voting contract, voting on the invitation of the request chain, and broadcasting the voting transaction in the public chain network;
    公链网络中各维护节点根据接收到的所述投票交易生成投票结果;Each maintenance node in the public chain network generates a voting result according to the received voting transaction;
    维护节点通过投票合约确定的统计规则,统计投票结果;如果统计结果满足预设注册条件,向请求链节点发送准入信息;The maintenance node counts the voting rules to determine the voting results; if the statistical results meet the preset registration conditions, it sends admission information to the requesting chain node;
    请求链节点根据准入信息向公链发起注册交易,触发公链中的维护节点执行注册合约,所述注册交易包括请求链地址以及所能提供的服务内容信息;The requesting chain node initiates a registration transaction with the public chain according to the admission information, and triggers the maintenance node in the public chain to execute the registration contract. The registration transaction includes the requesting chain address and the service content information that can be provided;
    维护节点通过执行注册合约向公链中的节点广播请求链地址和服务内容信息。The maintenance node broadcasts the request chain address and service content information to the nodes in the public chain by executing a registration contract.
  2. 根据权利要求1所述的网络接入方法,其特征在于,所述预设注册条件包括投票结果为同意上线的公链节点数量,大于或等于数量阈值;The network access method according to claim 1, wherein the preset registration conditions include a voting result of a number of public chain nodes agreeing to go online, which is greater than or equal to a number threshold;
    或者,在预设时间结束时刻投票结果为同意上线的维护节点,占节点总量的比例大于或等于数量比例阈值;Or, at the end of the preset time, the voting result is a maintenance node that agrees to go online, and the proportion of the total number of nodes is greater than or equal to the number proportion threshold;
    或者,在预设时间结束时刻投票节点所持的公链证通的数量,占公链证通总量的比例大约或等于证通比例阈值。Alternatively, at the end of a preset time, the number of public link token holdings held by the voting node is approximately equal to or equal to the threshold value of the public link token holdings.
  3. 根据权利要求1所述的网络接入方法,其特征在于,公链网络中各维护节点根据接收到的所述投票交易生成投票结果的步骤还包括:The network access method according to claim 1, wherein the step of generating the voting result by each maintenance node in the public chain network according to the received voting transaction further comprises:
    将所述投票结果作为区块数据在公链网络中广播。The voting result is broadcast as block data in a public chain network.
  4. 根据权利要求1所述的网络接入方法,其特征在于,请求链节点连接公链节点,触发公链中维护节点执行投票合约的步骤前,所述方法还包括:The network access method according to claim 1, wherein before the step of requesting a chain node to connect to a public chain node and triggering the maintenance node in the public chain to execute a voting contract, the method further comprises:
    在请求链连接公链网络后,由请求链节点在公链创建接入账号;After the request chain is connected to the public chain network, the request chain node creates an access account on the public chain;
    请求链节点通过接入账号从公链获取公链证通;Request the chain node to obtain the public chain certificate pass from the public chain through the access account;
    请求链节点根据接入账号创建接入指令,所述接入指令中包括用于奖励维护节点的预设数量公链证通。The requesting chain node creates an access instruction according to the access account, and the access instruction includes a preset number of public chain certificates for rewarding and maintaining the node.
  5. 根据权利要求1所述的网络接入方法,其特征在于,请求链节点连接公链节点,触发公链中维护节点执行投票合约的步骤前,所述方法还包括:The network access method according to claim 1, wherein before the step of requesting a chain node to connect to a public chain node and triggering the maintenance node in the public chain to execute a voting contract, the method further comprises:
    公链网络中作为测试链的节点,通过向请求链发起测试交易,对请求链进行兼容性测试;测试链节点至少包括公链中与请求链连接的接口节点;As a test chain node in the public chain network, the request chain is tested for compatibility by initiating a test transaction to the request chain; the test chain node includes at least the interface nodes in the public chain that are connected to the request chain;
    测试链节点根据请求链返回的测试交易结果,判断请求链是否通过兼容性测试;The test chain node judges whether the request chain has passed the compatibility test according to the test transaction result returned by the request chain;
    如果请求链通过兼容性测试,为请求链配置智能合约。If the request chain passes the compatibility test, configure a smart contract for the request chain.
  6. 根据权利要求5所述的网络接入方法,其特征在于,所述兼容性测试包括:网络寻址、交互协议规则、智能合约支持、服务注册、服务发现、服务提供、安全性、 可靠性、公链证通储备测试。The network access method according to claim 5, wherein the compatibility test comprises: network addressing, interaction protocol rules, smart contract support, service registration, service discovery, service provision, security, reliability, Public chain certificate pass reserve test.
  7. 根据权利要求1所述的网络接入方法,其特征在于,请求链节点连接公链节点,触发公链中维护节点执行投票合约的步骤,包括:The network access method according to claim 1, wherein the step of requesting a chain node to connect to a public chain node and triggering a maintenance node in the public chain to execute a voting contract comprises:
    从公链网络或请求链网络中选取作为平行链的节点;Select a node as a parallel chain from the public chain network or the request chain network;
    平行链节点获取请求链的全部功能程序和信息;Parachain nodes obtain all the functional programs and information of the request chain;
    公链为平行链节点配置智能合约,以形成跨链桥接。The public chain configures smart contracts for parachain nodes to form cross-chain bridges.
  8. 根据权利要求1所述的网络接入方法,其特征在于,维护节点通过投票合约确定的统计规则统计投票结果的步骤包括:The network access method according to claim 1, wherein the step of counting the voting results by the maintenance node through a statistical rule determined by the voting contract comprises:
    投票合约根据维护节点所拥有的公链证通数量,计算每个维护节点的投票权重;The voting contract calculates the voting weight of each maintenance node according to the number of public chain certificates held by the maintenance node;
    投票合约根据投票权重以及每个维护节点的投票结果,生成统计结果。The voting contract generates statistical results based on the voting weight and the voting results of each maintenance node.
  9. 根据权利要求8所述的网络接入方法,其特征在于,维护节点通过投票合约确定的统计规则统计投票结果的步骤后,所述方法还包括:The network access method according to claim 8, wherein after the step of counting the voting results by the maintenance node through a statistical rule determined by the voting contract, the method further comprises:
    当前维护节点通过投票合约接收其他维护节点的投票结果;The current maintenance node receives the voting results of other maintenance nodes through a voting contract;
    当前维护节点根据统计规则统计投票结果,生成统计结果;The current maintenance node counts the voting results according to the statistical rules and generates statistical results;
    当前维护节点将统计结果生成区块数据在公链网络中广播;The current maintenance node broadcasts the statistically generated block data on the public chain network;
    所述公链网络中的其他节点在接收到所述区块数据后,将区块数据保存至本地完成区块数据同步。After receiving the block data, other nodes in the public chain network save the block data locally to complete the block data synchronization.
  10. 一种区块链网络接入***,其特征在于,包括公链和连接公链的请求链,所述公链和请求链均为包括多个节点的点对点网络,每个节点具有独立的运算能力;其中,所述公链中内置有智能合约,所述智能合约包括投票合约和注册合约;所述公链网络中的部分节点作为维护节点;A blockchain network access system is characterized in that it comprises a public chain and a request chain connected to the public chain, the public chain and the request chain are both point-to-point networks including multiple nodes, each node has independent computing capabilities Wherein, a smart contract is built into the public chain, and the smart contract includes a voting contract and a registration contract; and some nodes in the public chain network serve as maintenance nodes;
    所述请求链中的节点被配置为:请求链节点连接公链节点,触发公链节点执行投票合约;根据准入信息向公链发起注册交易,触发公链中的维护节点执行注册合约,所述注册交易包括请求链地址以及所能提供的服务内容信息;The nodes in the request chain are configured to: request the chain node to connect to the public chain node, trigger the public chain node to execute the voting contract; initiate a registration transaction with the public chain according to the admission information, and trigger the maintenance node in the public chain to execute the registration contract The registration transaction includes the address of the request chain and information about the services it can provide;
    所述公链中的节点被配置为:通过执行投票合约创建投票交易,在公链网络内广播所述投票交易;根据接收到的所述投票交易生成投票结果;以及通过投票合约确定的统计规则统计投票结果;如果统计结果满足预设注册条件,向请求链节点发送准入信息;以及通过执行注册合约向公链中的节点广播请求链地址和服务内容信息。The nodes in the public chain are configured to: create a voting transaction by executing a voting contract, broadcast the voting transaction in a public chain network; generate a voting result according to the received voting transaction; and a statistical rule determined by the voting contract Count the voting results; if the statistical results meet the preset registration conditions, send admission information to the requesting chain node; and broadcast the requesting chain address and service content information to the nodes in the public chain by executing the registration contract.
PCT/CN2019/101052 2018-08-28 2019-08-16 Blockchain network access method and system WO2020042933A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
FI20206009A FI129087B (en) 2018-08-28 2019-08-16 Blockchain network accessing method and system

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN201810986825 2018-08-28
CN201810986825.3 2018-08-28
CN201811498038.0 2018-12-07
CN201811498038.0A CN110868308B (en) 2018-08-28 2018-12-07 Block chain network access method and system

Publications (1)

Publication Number Publication Date
WO2020042933A1 true WO2020042933A1 (en) 2020-03-05

Family

ID=69645033

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/101052 WO2020042933A1 (en) 2018-08-28 2019-08-16 Blockchain network access method and system

Country Status (1)

Country Link
WO (1) WO2020042933A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113343271A (en) * 2021-06-29 2021-09-03 上海万向区块链股份公司 Extensible alliance chain management system implemented through block chain
CN113472777A (en) * 2021-06-30 2021-10-01 上海特高信息技术有限公司 Allocation block chain node admission control method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106533696A (en) * 2016-11-18 2017-03-22 江苏通付盾科技有限公司 Block chain-based identity authentication methods, authentication server and user terminal
CN108173658A (en) * 2017-11-22 2018-06-15 中国互联网络信息中心 A kind of block chain consistency maintaining method and device
CN108289129A (en) * 2018-02-26 2018-07-17 深圳智乾区块链科技有限公司 Block chain ecological environment creation method, system and computer readable storage medium
WO2018149505A1 (en) * 2017-02-17 2018-08-23 Nokia Technologies Oy Voting-consensus distributed ledger

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106533696A (en) * 2016-11-18 2017-03-22 江苏通付盾科技有限公司 Block chain-based identity authentication methods, authentication server and user terminal
WO2018149505A1 (en) * 2017-02-17 2018-08-23 Nokia Technologies Oy Voting-consensus distributed ledger
CN108173658A (en) * 2017-11-22 2018-06-15 中国互联网络信息中心 A kind of block chain consistency maintaining method and device
CN108289129A (en) * 2018-02-26 2018-07-17 深圳智乾区块链科技有限公司 Block chain ecological environment creation method, system and computer readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
BAI, JIE ET AL.: "The Setup Method and Application Description of Sub Chain Based on Block Chain CNWW3 Public Chain", INFORMATION AND NETWORK SECURITY, vol. 38, no. 3, 31 March 2019 (2019-03-31) *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113343271A (en) * 2021-06-29 2021-09-03 上海万向区块链股份公司 Extensible alliance chain management system implemented through block chain
CN113472777A (en) * 2021-06-30 2021-10-01 上海特高信息技术有限公司 Allocation block chain node admission control method
CN113472777B (en) * 2021-06-30 2022-08-30 上海特高信息技术有限公司 Allocation block chain node admission control method

Similar Documents

Publication Publication Date Title
CN110868308B (en) Block chain network access method and system
JP7208164B2 (en) Computer-implemented system and method for managing large blocks in a blockchain network
US20220231869A1 (en) Cross-blockchain mutual data storage
WO2021184826A1 (en) Blockchain-based resource transfer method and apparatus, and node device and storage medium
US20200134613A1 (en) Method and Apparatus for Running Smart Contract
WO2020173497A1 (en) Block chain network deployed with centralized system
JP7329540B2 (en) Metastable Byzantine agreement
CN108777625A (en) Verification method, device and system, storage medium, the electronic device of signature
WO2020042933A1 (en) Blockchain network access method and system
WO2020114242A1 (en) Token conversion method based on public blockchain and blockchain system
CN112217683A (en) Cross-heterogeneous-chain data reachability processing method, system, medium, device and terminal
CN104410527B (en) A kind of topology detection method, interchanger and hot pile system
CN107070709A (en) A kind of NFV implementation methods based on bottom NUMA aware
CN112187866B (en) Novel block chain consensus method based on shared storage
CN110839056A (en) Data processing method and device based on block chain and node network
WO2020220806A1 (en) Private chain-based data consistency verification method and apparatus, device, and storage medium
WO2018032817A1 (en) Method for accumulating and co-assembling uniform data
Chen et al. A blockchain based access authentication scheme of energy internet
WO2024066665A1 (en) Snowman consensus-based consortium blockchain multi-chain system and interaction and deployment method therefor
WO2023179056A1 (en) Consensus processing method and apparatus of block chain network, device, storage medium, and program product
Chiang et al. An agreement under early stopping and fault diagnosis protocol in a cloud computing environment
CN115865705A (en) Multi-party federal learning system, method, equipment and medium based on supervision mechanism
NL2026542B1 (en) Blockchain network accessing method and system
CN112039893B (en) Private transaction processing method and device, electronic equipment and readable storage medium
CN114580661A (en) Data processing method and device based on federal learning and computer equipment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19855912

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19855912

Country of ref document: EP

Kind code of ref document: A1