CN112995344A - Block chain all-in-one machine, and chain crossing method and device and storage medium of multiple nodes in block chain all-in-one machine - Google Patents

Block chain all-in-one machine, and chain crossing method and device and storage medium of multiple nodes in block chain all-in-one machine Download PDF

Info

Publication number
CN112995344A
CN112995344A CN202110474468.4A CN202110474468A CN112995344A CN 112995344 A CN112995344 A CN 112995344A CN 202110474468 A CN202110474468 A CN 202110474468A CN 112995344 A CN112995344 A CN 112995344A
Authority
CN
China
Prior art keywords
chain
destination
node
cross
initiating
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110474468.4A
Other languages
Chinese (zh)
Other versions
CN112995344B (en
Inventor
汤泉
韦一冰
刘茗
李玄风
周涛
尹可挺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Liancheng Digital Technology Co ltd
Original Assignee
Hangzhou Liancheng Digital Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Liancheng Digital Technology Co ltd filed Critical Hangzhou Liancheng Digital Technology Co ltd
Priority to CN202110474468.4A priority Critical patent/CN112995344B/en
Publication of CN112995344A publication Critical patent/CN112995344A/en
Application granted granted Critical
Publication of CN112995344B publication Critical patent/CN112995344B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3825Use of electronic signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1044Group management mechanisms 
    • H04L67/1046Joining mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • Marketing (AREA)
  • Technology Law (AREA)
  • Economics (AREA)
  • Development Economics (AREA)
  • Mathematical Physics (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The application is applicable to the technical field of block chains, and particularly relates to a block chain all-in-one machine, a multi-node chain crossing method and device in the block chain all-in-one machine, and a storage medium. The block chain all-in-one machine of the chain crossing method is provided with N block chain nodes, after a block chain link point acquires a chain crossing transaction request, a target chain in the chain crossing transaction request is detected to be one of block chain networks to which the N block chain link points are currently accessed, the target chain node of the target chain of the chain crossing transaction request in the block chain all-in-one machine is further determined, a chain crossing channel between an initiating chain link point and the target chain node is established in a trusted execution computing environment, and chain crossing interaction is performed through the chain crossing channel, so that chain crossing transaction between the two block chain nodes in the block chain all-in-one machine is realized, data of the chain crossing transaction in the trusted execution environment cannot be stolen, and the safety of the chain crossing transaction is ensured.

Description

Block chain all-in-one machine, and chain crossing method and device and storage medium of multiple nodes in block chain all-in-one machine
Technical Field
The application belongs to the technical field of block chains, and particularly relates to a block chain all-in-one machine, a multi-node chain crossing method and device in the block chain all-in-one machine, and a storage medium.
Background
At present, in an application alliance system formed by a plurality of alliance blockchains, there is a scenario where two alliance blockchains converge in the same department or organization, the department or organization needs to deploy two independent blockchain nodes, each blockchain node is connected to a set of independent blockchain network, data interaction between the two blockchain nodes can be derived into cross-link transaction of the two blockchain networks, in the prior art, the two blockchain nodes are established in a manner of setting two Central Processing Units (CPUs) in the same server, and data transmission is performed through interaction of the two CPUs to achieve the cross-link transaction. However, the number of CPUs is increased when block link nodes are added in the same server, and therefore, the multi-node deployment in a single server is limited, the expandability is poor, the communication implementation process among the CPUs is complex, the reliability and the safety of communication cannot be guaranteed through a communication mode of a self-owned protocol, and communication data may be stolen to cause data leakage.
Disclosure of Invention
In view of this, embodiments of the present application provide a block chain all-in-one machine, and a method, an apparatus, and a storage medium for inter-link of multiple nodes therein, so as to solve the problem of data leakage caused by low reliability of communication between processors in the prior art.
In a first aspect, an embodiment of the present application provides a chain spanning method applied to multiple nodes in a blockchain all-in-one machine, where the blockchain all-in-one machine includes N blockchain nodes, where a blockchain network currently accessed by each blockchain node in the N blockchain nodes is different, N is an integer greater than 1, and the chain spanning method includes:
an initiating chain node acquires a cross-chain transaction request, wherein the initiating chain node is one of the N block chain nodes, and the cross-chain transaction request comprises initiating chain information, target chain information and transaction data;
detecting whether a destination chain in the destination chain information is one of block chain networks to which the N block chain link points are currently accessed;
if the target chain in the target chain information is detected to be one of the block chain networks to which the N block chain nodes are currently accessed, determining a target chain node, and establishing a chain crossing channel between the initiating chain node and the target chain node in a trusted execution computing environment;
and transmitting the transaction data to the destination chain link point through the chain crossing channel.
In a second aspect, an embodiment of the present application provides a chain spanning device applied to multiple nodes in a blockchain all-in-one machine, where the blockchain all-in-one machine includes N blockchain nodes, where a blockchain network currently accessed by each blockchain node in the N blockchain nodes is different, N is an integer greater than 1, and the chain spanning device includes:
a cross-chain request obtaining module, configured to initiate a chain link point to obtain a cross-chain transaction request, where the initiating chain node is one of the N block chain nodes, and the cross-chain transaction request includes initiating chain information, destination chain information, and transaction data;
a detection module, configured to detect whether a destination chain in the destination chain information is one of the block chain networks to which the N block chain link points are currently accessed;
a channel establishing module, configured to determine a destination chain node if it is detected that a destination chain in the destination chain information is one of the blockchain networks to which the N blockchain nodes are currently accessed, and establish a chain crossing channel between the initiating chain node and the destination chain node in a trusted execution computing environment;
and the transaction sending module is used for sending the transaction data to the destination chain node through the chain-crossing channel.
In a third aspect, an embodiment of the present application provides a blockchain all-in-one machine, where the blockchain all-in-one machine includes a processor, a memory, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the method for implementing a chain crossing method according to the first aspect is implemented.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program implements the cross-chain method according to the first aspect.
In a fifth aspect, an embodiment of the present application provides a computer program product, which when running on a blockchain kiosk, causes the blockchain kiosk to perform the cross-chain method described in the first aspect.
Compared with the prior art, the embodiment of the application has the advantages that: the block chain all-in-one machine is provided with N block chain nodes, after a block chain link point acquires a cross chain transaction request, a target chain in the cross chain transaction request is detected to be one of block chain networks to which the N block chain link points are currently accessed, and then the target chain node of the target chain of the cross chain transaction request in the block chain all-in-one machine is determined, a cross chain channel between an initiating chain link point and the target chain node is established in a trusted execution computing environment, and cross chain interaction is carried out through the cross chain channel, so that cross chain transaction between the two block chain nodes in the block chain all-in-one machine is realized, data of the cross chain transaction in the trusted execution environment cannot be stolen, and the safety of the cross chain transaction is guaranteed.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic flowchart of a chain crossing method applied to multiple nodes in a blockchain all-in-one machine according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of a chain crossing method applied to multiple nodes in a blockchain all-in-one machine according to a second embodiment of the present application;
fig. 3 is a schematic structural diagram of a multi-node chain crossing device applied in a blockchain all-in-one machine according to a third embodiment of the present application;
fig. 4 is a schematic structural diagram of a block chain all-in-one machine according to a fourth embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
The embodiment of the present application provides a multi-node chain crossing method applied to a blockchain all-in-one machine, where the blockchain all-in-one machine may be a palm computer, a desktop computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cloud server, a Personal Digital Assistant (PDA), and other devices, and the specific type of the blockchain all-in-one machine is not limited in this embodiment of the present application.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
In order to explain the technical means of the present application, the following description will be given by way of specific examples.
Referring to fig. 1, which is a schematic flowchart of a chain crossing method applied to multiple nodes in a blockchain all-in-one machine according to an embodiment of the present disclosure, where the blockchain all-in-one machine includes N blockchain nodes, where a blockchain network currently accessed by each blockchain node in the N blockchain nodes is different, N is an integer greater than 1, and as shown in fig. 1, the chain crossing method may include the following steps:
step S101, the initiating chain node acquires a cross-chain transaction request.
Each block chain link point in the N block chain nodes monitors a currently accessed block chain network to find a cross-chain transaction request, the block chain link point monitored from the N block chain nodes to the cross-chain transaction request is used as an initiating chain node, namely the initiating chain node is one of the N block chain nodes, the currently accessed block chain network of the initiating chain link point is a source chain, and the cross-chain transaction request is initiated by one node of the source chain, namely the source node.
After initiating the cross-chain transaction request, the source node broadcasts the cross-chain transaction to all blockchain nodes of the source chain, so that the blockchain link points of the source chain in the blockchain all-in-one machine can monitor the cross-chain transaction request. The cross-chain transaction request comprises initiation chain information, destination chain information and transaction data, wherein the initiation chain information comprises an initiation chain Identity (ID), the destination chain information comprises a destination chain ID, and the transaction data comprises a transaction signature, a transaction structure and the like.
And when the initiating chain node of the block chain all-in-one machine acquires the cross-chain transaction request, the target chain is not the block chain network where the initiating chain node is located. The initiating chain and the destination chain may be homogeneous or heterogeneous blockchain networks, the homogeneous blockchain network may refer to that the initiating chain and the destination chain are both Fabric blockchains, Hyperchain blockchains or BCOS blockchains in a federation chain, and the heterogeneous blockchain network may refer to that the initiating chain is a Fabric blockchain and the destination chain is not a Fabric blockchain.
Optionally, after the initiating link node obtains the cross-link transaction request, the cross-link method further includes:
initiating a chain node to call a cross-chain intelligent contract to verify a cross-chain transaction request;
detecting whether a destination chain in the destination chain information is one of the block chain networks to which the N block chain link points are currently accessed specifically is:
and when the result of the cross-chain transaction request is verified to be passed, detecting whether the destination chain in the destination chain information is one of the block chain networks to which the N block chain link points are currently accessed.
The cross-chain intelligent contract is an intelligent contract file which is configured in advance and stored in the block chain node, and the cross-chain intelligent contract is used for verifying the transaction which passes through the cross-chain of the initiating chain node, including but not limited to verification of information such as initiating chain ID, destination chain ID, signature and the like. If the verification is not passed, the initiating chain node does not execute the cross-chain action.
Optionally, the initiating link node invoking the cross-link intelligent contract to verify the cross-link transaction request includes:
extracting an initiating chain ID in the initiating chain information, a target chain ID in the target chain information and a signature of transaction data;
detecting whether signatures of an initiating chain ID, a target chain ID and transaction data are all legal or not according to a cross-chain intelligent contract stored in an initiating chain node;
and if the initiating chain ID, the destination chain ID and the signature of the transaction data are legal, the verification is passed.
The initiating chain node extracts the initiating chain ID, the destination chain ID and the signature of the transaction data from the cross-chain transaction request, acquires a corresponding certificate from a source chain through a cross-chain intelligent contract, and is used for detecting the legality of the initiating chain ID, the destination chain ID and the signature of the transaction data, and when the initiating chain ID, the destination chain ID and the signature of the transaction data are legal, the verification is passed.
Step S102, detecting whether the destination chain in the destination chain information is one of the block chain networks to which the N block chain link points are currently accessed.
The cross-link transaction request is data interaction between an initiating link and a destination link, and the cross-link transaction is carried out in the blockchain all-in-one machine, wherein one blockchain node participating in the initiating link and one blockchain node participating in the destination link are two blockchain nodes in the blockchain all-in-one machine.
The method comprises the steps that N block chain link points are arranged in a block chain all-in-one machine, a block chain ID corresponding to a block chain network to which each block chain link point in the N block chain nodes is currently connected is recorded, whether a target chain is one of the block chain networks to which the N block chain link points are currently connected is detected, the target chain ID can be compared with the recorded block chain ID, if the target chain ID is one of the recorded block chain IDs, cross-chain transaction can be conducted in the block chain all-in-one machine, and if the target chain ID does not belong to one of the recorded block chain IDs, the cross-chain transaction cannot be conducted in the block chain all-in-one machine.
Step S103, if the target chain in the target chain information is detected to be one of the block chain networks to which the N block chain nodes are currently accessed, determining the target chain node, and establishing a chain crossing channel between the initiating chain node and the target chain node in a trusted execution computing environment.
If the target chain in the target chain information is detected to be one of the block chain networks to which the N block chain link points are currently accessed, the block chain link point of the target chain in the block chain all-in-one machine can be determined according to the target chain, and the block chain link point is the target chain node.
The Trusted Execution Environment (TEE) may be a secure area within a Central Processing Unit (CPU) of a blockchain all-in-one machine. The TEE runs in a separate environment and in parallel with the operating system. TEE requires that the blockchain kiosk be configured with corresponding software and hardware to enable the blockchain kiosk to provide a trusted execution environment.
In the TEE, communication between the initiating link node and the destination link node is established, so that the initiating link node can reliably send transaction data and the like to the destination link node.
Optionally, in the trusted execution computing environment, establishing a cross-link channel between the initiating link node and the destination link node includes:
establishing a cross-chain transaction with a unique identifier in the trusted execution computing environment according to the cross-chain transaction request;
and running a cross-chain transaction, and butting the data of the initiating chain node and the target chain node.
The inter-chain channel may refer to the operation of a transaction running in the TEE, that is, the operation of an inter-chain transaction, where the inter-chain transaction has atomicity, and one inter-chain transaction request corresponds to one inter-chain transaction with a unique identifier. The data of the initiating chain node and the target chain node can be butted by operating the cross-chain transaction, and the data structure of the cross-chain transaction is as follows:
Struct
{ slotID; a slot identification ID;
srcchaiin ID, initiating chain ID;
DstchainID, destination chain ID;
tx data, transaction data;
ExcResult, results of cross-chain execution;
sig, cross-chain request initiator signature;
}。
the slot identification ID is the unique identification of the cross-chain transaction, and the initiating chain ID, the destination chain ID, the transaction data, the cross-chain execution result and the cross-chain request initiator (source node) are signed as the interactive data in the cross-chain transaction.
Cross-chain service (CCS) is built in the block chain all-in-one machine, the CCS provides monitoring service and is responsible for collecting cross-chain service requests from the nodes of the block chain all-in-one machine, after the cross-chain transaction requests are verified by the initiating chain node, the CCS sends the cross-chain service requests to the CCS, and the CCS establishes a cross-chain channel based on TEE according to the cross-chain service requests.
And step S104, sending the transaction data to the destination chain node through the chain crossing channel.
After the data of the initiating chain link point and the target chain node are in butt joint, the information of transaction data and the like in the cross-chain transaction request can be sent to the target chain node, and after the target chain link point receives the information in the cross-chain transaction request, the transaction is executed, so that the cross-chain transaction is completed. The destination chain node can also feed back the execution result of the transaction to the initiating chain node through the cross-chain channel, and further informs the initiating chain.
The block chain all-in-one machine is provided with N block chain nodes, after a block chain link point acquires a cross chain transaction request, a target chain in the cross chain transaction request is detected to be one of block chain networks to which the N block chain link points are currently accessed, and then the target chain node of the target chain of the cross chain transaction request in the block chain all-in-one machine is determined, a cross chain channel between an initiating chain link point and the target chain node is established in a trusted execution computing environment, and cross chain interaction is carried out through the cross chain channel, so that cross chain transaction between the two block chain nodes in the block chain all-in-one machine is realized, data of the cross chain transaction in the trusted execution environment cannot be stolen, and the safety of the cross chain transaction is guaranteed.
Referring to fig. 2, it is a schematic flowchart of a chain crossing method applied to multiple nodes in a blockchain all-in-one machine according to a second embodiment of the present disclosure, where the chain crossing method may be used in a blockchain all-in-one machine, as shown in fig. 2, the chain crossing method may include the following steps:
step S201, the initiating link node acquires a cross-link transaction request.
Step S202, detecting whether the destination chain in the destination chain information is one of the block chain networks to which the N block chain link points are currently accessed.
Step S203, if it is detected that the destination chain in the destination chain information is one of the block chain networks to which the N block chain nodes are currently accessed, determining a destination chain node, and establishing a chain crossing channel between the initiating chain node and the destination chain node in the trusted execution computing environment.
The contents of steps S201 to S203 are the same as those of steps S101 to S103, and reference may be made to the description of steps S101 to S103, which is not repeated herein.
In step S204, the destination chain ID in the destination chain information is extracted.
The target chain information is data in the cross-chain transaction request, data analysis is carried out on the cross-chain transaction request, the target chain information is extracted, and then the target chain ID can be determined. The destination chain ID is unique identification information of the destination chain, and data corresponding to the destination chain can be determined by the destination chain ID.
And step S205, determining a transaction data interface of the destination chain according to the destination chain ID.
The blockchain all-in-one machine is provided with a transaction data interface corresponding to the destination chain, certainly, the blockchain all-in-one machine can also be provided with transaction data interfaces of other blockchain networks, and a specific transaction data interface can be selected through a blockchain ID.
The transaction data Interface may refer to an Application Programming Interface (API) set in the smart contract, and may be used to perform operations such as converting and packaging transaction data.
And step S206, converting the cross-chain transaction request into a destination chain transaction request according to the transaction data interface of the destination chain.
The conversion of the cross-chain transaction request into the destination chain transaction request may refer to conversion of a transaction in the cross-chain transaction request into a transaction structure that can be identified by a destination chain, and the destination chain transaction request may further retain content such as initiating chain information, destination chain information, a signature and the like in the cross-chain transaction request, that is, the destination chain transaction request is a transaction structure identified for the destination chain.
If a plurality of transaction data interfaces of the blockchain network are built in the blockchain all-in-one machine, the adaptation and docking difficulty of intelligent contracts during chain crossing of the nodes of the isomorphic blockchain network and the nodes of the heterogeneous blockchain network can be reduced, and the blockchain all-in-one machine has better adaptation. For example, the blockchain network may refer to a fabric blockchain, a hyperchain blockchain, an Etherum blockchain, and the like.
And step S207, transmitting the destination chain transaction request to the destination chain node through the chain crossing channel.
The destination chain transaction request is obtained by converting transaction data, and the specific process of sending data in step S207 is the same as that in step S104, and reference may be made to the description in step S104, which is not described herein again.
Optionally, after the destination chain transaction request is sent to the destination chain node through the chain crossing channel, the chain crossing method further includes:
after receiving the destination chain transaction request, the destination chain node calls a destination chain intelligent contract to verify the destination chain transaction request;
and if the verification is passed, the destination chain node executes corresponding operation based on the destination chain transaction request.
The target chain intelligent contract can be an intelligent contract running on a target chain, and the target chain intelligent contract can be obtained after the target chain link point is connected with the target chain.
The target chain transaction request is verified through the target chain intelligent contract, whether a transaction signature, an initiating chain ID and a target chain ID in the target chain transaction request are legal or not can be verified, the transaction is executed after the target chain transaction request is verified, and illegal transactions are avoided.
Optionally, after performing the corresponding operation based on the destination chain transaction request, the cross-chain method further includes:
the target link node acquires an execution result;
and the target link node feeds back an execution result to the initiating link node through the cross-link channel.
The step of executing the destination chain transaction request by the destination chain node may be to broadcast data in the destination chain transaction request to all intra-chain nodes of the destination chain, and after all intra-chain nodes receive the transaction data information sent by the all-in-one machine device, according to a consensus algorithm of the destination chain, after achieving consensus on the operation, confirm that the transaction data information is valid and write the transaction data information into the account book. The destination node of the destination chain finds that the destination node address of the transaction data information is matched with the address of the destination node through analyzing the data packet, then other specific contents of the data packet are continuously analyzed, corresponding transaction operation is completed, a transaction completion message is sent and broadcasted to the destination chain node, and the transaction completion message is fed back to the initiating chain node through the cross-chain channel.
The steps are operated in the blockchain all-in-one machine, and specifically, the steps include that a CCS, an initiating chain node and a target chain link point in the blockchain all-in-one machine are respectively and correspondingly executed, the CCS executes steps of cross-chain channel establishment, transmission and the like, the initiating chain node executes steps of monitoring cross-chain transaction requests, verification and the like, and the target chain node executes steps of acquiring, verifying transactions, feeding back transaction results and the like.
The transaction data interface of the built-in destination chain in the blockchain all-in-one machine is determined through analysis of destination chain information in the cross-chain transaction request, the transaction can be converted into a transaction structure which can be identified by the destination chain, cross-chain between two blockchain nodes is facilitated, in addition, the transaction data interface of the built-in multiple blockchain networks can reduce the adaptation butt joint difficulty of intelligent contracts when cross-chain is carried out on the nodes of the isomorphic blockchain networks and the nodes of the heterogeneous blockchain networks, and the blockchain all-in-one machine has better adaptability.
Corresponding to the chain crossing method applied to multiple nodes in a blockchain all-in-one machine of the above embodiments, fig. 3 shows a structural block diagram of a chain crossing device applied to multiple nodes in a blockchain all-in-one machine provided in the third embodiment of the present application, where the blockchain all-in-one machine includes N blockchain nodes, a blockchain network currently accessed by each blockchain node in the N blockchain nodes is different, N is an integer greater than 1, and for convenience of description, only the parts related to the embodiment of the present application are shown.
Referring to fig. 3, the chain spanning apparatus includes:
a cross-chain request obtaining module 31, configured to initiate a chain node to obtain a cross-chain transaction request, where the initiating chain node is one of the N block chain nodes, and the cross-chain transaction request includes initiating chain information, destination chain information, and transaction data;
a detecting module 32, configured to detect whether a destination chain in the destination chain information is one of the block chain networks to which the N block chain link points are currently accessed;
a channel establishing module 33, configured to determine a destination link node if it is detected that a destination link in the destination link information is one of the blockchain networks to which the N blockchain link points are currently accessed, and establish a cross-link channel between the initiating link node and the destination link node in a trusted execution computing environment;
and the transaction sending module 34 is used for sending the transaction data to the destination chain link point through the chain crossing channel.
Optionally, the chain spanning device further includes:
the initiating chain verification module is used for calling a cross-chain intelligent contract to verify the cross-chain transaction request by the initiating chain node after the initiating chain node acquires the cross-chain transaction request;
the detection module 32 is specifically configured to: and when the result of the cross-chain transaction request is verified to be passed, detecting whether the destination chain in the destination chain information is one of the block chain networks to which the N block chain link points are currently accessed.
Optionally, the origination chain verification module is specifically configured to:
acquiring an initiating chain ID in the initiating chain information, a target chain ID in the target chain information and a signature of transaction data;
detecting whether signatures of an initiating chain ID, a target chain ID and transaction data are all legal or not according to a cross-chain intelligent contract stored in an initiating chain node;
and if the initiating chain ID, the destination chain ID and the signature of the transaction data are legal, the verification is passed.
Optionally, the chain spanning device further includes:
the extraction module is used for extracting a destination chain ID in destination chain information after a chain-crossing channel between an initiating chain node and a destination chain node is established in a trusted execution computing environment;
the interface determining module is used for determining a transaction data interface of the destination chain according to the destination chain ID;
the conversion module is used for converting the cross-chain transaction request into a destination chain transaction request according to a transaction data interface of a destination chain, wherein the destination chain transaction request is a transaction structure identified aiming at the destination chain;
accordingly, the transaction sending module 34 is specifically configured to:
and transmitting the destination chain transaction request to the destination chain node through the chain crossing channel.
Optionally, the chain spanning device further includes:
the destination chain verification module is used for calling a destination chain intelligent contract to verify a destination chain transaction request after the destination chain node receives the destination chain transaction request after the destination chain transaction request is sent to the destination chain node through the cross-chain channel;
and the execution module is used for executing corresponding operation by the destination link node based on the destination link transaction request if the verification is passed.
Optionally, the chain spanning device further includes:
the execution result acquisition module is used for acquiring an execution result by the destination chain node after executing corresponding operation based on the destination chain transaction request;
and the feedback module is used for feeding back the execution result to the initiating link node by the destination link node through the cross link channel.
Optionally, the channel establishing module 33 includes:
the transaction establishing unit is used for establishing a cross-chain transaction with a unique identifier in the trusted execution computing environment according to the cross-chain transaction request;
and the transaction operation unit is used for operating the cross-chain transaction and butting the data of the initiating chain node and the target chain node.
It should be noted that, because the contents of information interaction, execution process, and the like between the modules are based on the same concept as that of the embodiment of the method of the present application, specific functions and technical effects thereof may be specifically referred to a part of the embodiment of the method, and details are not described here.
Fig. 4 is a schematic structural diagram of a block chain all-in-one machine according to a fourth embodiment of the present application. As shown in fig. 4, the blockchain integrator 4 of this embodiment includes: at least one processor 40 (only one shown in fig. 4), a memory 41, and a computer program 42 stored in the memory 41 and executable on the at least one processor 40, the processor 40 when executing the computer program 42 implementing the steps in any of the various cross-link method embodiments described above as applied to multiple nodes within a blockchain integrator.
The blockchain integrator may include, but is not limited to, a processor 40, a memory 41. Those skilled in the art will appreciate that fig. 4 is merely an example of a blockchain kiosk 4, and does not constitute a limitation on blockchain kiosk 4, and may include more or fewer components than shown, or some components in combination, or different components, such as input output devices, network access devices, etc.
The Processor 40 may be a CPU, and the Processor 40 may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 41 may be an internal storage unit of the blockchain kiosk 4 in some embodiments, such as a hard disk or memory of the blockchain kiosk 4. Memory 41 may also be an external storage device of blockchain all-in-one 4 in other embodiments, such as a plug-in hard disk provided on blockchain all-in-one 4, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and so forth. Further, the memory 41 may also include both an internal storage unit of the blockchain integrator 4 and an external storage device. The memory 41 is used for storing an operating system, an application program, a BootLoader (BootLoader), data, and other programs, such as program codes of a computer program. The memory 41 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules, so as to perform all or part of the functions described above. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the above-mentioned apparatus may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method of the embodiments described above can be implemented by a computer program, which can be stored in a computer readable storage medium and can implement the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code, recording medium, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, and software distribution media. Such as a usb-disk, a removable hard disk, a magnetic or optical disk, etc. In certain jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and patent practice.
When the computer program product runs on the blockchain all-in-one machine, the steps in the method embodiments can be realized when the blockchain all-in-one machine is executed.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/blockchain integrator and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/blockchain integrator are merely illustrative, and for example, a module or a unit may be divided into only one logical function, and may be implemented in other ways, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A chain crossing method applied to multiple nodes in a blockchain all-in-one machine is characterized in that the blockchain all-in-one machine comprises N blockchain nodes, the blockchain network currently accessed by each blockchain node in the N blockchain nodes is different, N is an integer greater than 1, and the chain crossing method comprises the following steps:
an initiating chain node acquires a cross-chain transaction request, wherein the initiating chain node is one of the N block chain nodes, and the cross-chain transaction request comprises initiating chain information, target chain information and transaction data;
detecting whether a destination chain in the destination chain information is one of block chain networks to which the N block chain link points are currently accessed;
if the target chain in the target chain information is detected to be one of the block chain networks to which the N block chain nodes are currently accessed, determining a target chain node, and establishing a chain crossing channel between the initiating chain node and the target chain node in a trusted execution computing environment;
and transmitting the transaction data to the destination chain link point through the chain crossing channel.
2. The method of claim 1, wherein after the initiating chain node obtains the cross-chain transaction request, the method further comprises:
the initiating chain node calls a cross-chain intelligent contract to verify the cross-chain transaction request;
the detecting whether the destination chain in the destination chain information is one of the block chain networks to which the N block chain link points are currently connected specifically includes:
and when the result of the cross-chain transaction request is verified to be passed, detecting whether a destination chain in the destination chain information is one of the block chain networks to which the N block chain link points are currently accessed.
3. The cross-chain method of claim 2, wherein the initiating chain node invoking a cross-chain smart contract to validate the cross-chain transaction request comprises:
extracting an initiating chain ID in the initiating chain information, a destination chain ID in the destination chain information and a signature of the transaction data;
detecting whether the initiating chain ID, the target chain ID and the signature of the transaction data are all legal or not according to a cross-chain intelligent contract stored in the initiating chain node;
and if the initiating chain ID, the target chain ID and the signature of the transaction data are legal, the verification is passed.
4. The method of claim 1, wherein after establishing a cross-chain channel between the initiating link node and the destination link node in a trusted execution computing environment, the method further comprises:
extracting a destination chain ID in the destination chain information;
determining a transaction data interface of the destination chain according to the destination chain ID;
converting the cross-chain transaction request into a destination chain transaction request according to a transaction data interface of the destination chain, wherein the destination chain transaction request is a transaction structure identified for the destination chain;
the sending the transaction data to the destination link node through the cross-link channel comprises:
and sending the destination chain transaction request to the destination chain node through the cross-chain channel.
5. The method of claim 4, wherein after sending the destination chain transaction request to the destination chain node over the cross-chain channel, the method further comprises:
after receiving the destination chain transaction request, the destination chain node calls a destination chain intelligent contract to verify the destination chain transaction request;
and if the verification is passed, the destination chain node executes corresponding operation based on the destination chain transaction request.
6. The method of claim 5, wherein after performing the corresponding operation based on the destination chain transaction request, the method further comprises:
the destination chain node acquires an execution result;
and the destination chain node feeds back the execution result to the initiating chain node through a cross-chain channel.
7. The method of any one of claims 1 to 6, wherein establishing, in a trusted execution computing environment, a cross-chain channel between the initiating link node and the destination link node comprises:
establishing a cross-chain transaction with a unique identifier in a trusted execution computing environment according to the cross-chain transaction request;
and running the cross-chain transaction, and butting the data of the initiating chain node and the target chain node.
8. A chain spanning device applied to multiple nodes in a blockchain all-in-one machine is characterized in that the blockchain all-in-one machine comprises N blockchain nodes, wherein the blockchain network currently accessed by each blockchain node in the N blockchain nodes is different, N is an integer greater than 1, and the chain spanning device comprises:
a cross-chain request obtaining module, configured to initiate a chain link point to obtain a cross-chain transaction request, where the initiating chain node is one of the N block chain nodes, and the cross-chain transaction request includes initiating chain information, destination chain information, and transaction data;
a detection module, configured to detect whether a destination chain in the destination chain information is one of the block chain networks to which the N block chain link points are currently accessed;
a channel establishing module, configured to determine a destination chain node if it is detected that a destination chain in the destination chain information is one of the blockchain networks to which the N blockchain nodes are currently accessed, and establish a chain crossing channel between the initiating chain node and the destination chain node in a trusted execution computing environment;
and the transaction sending module is used for sending the transaction data to the destination chain node through the chain-crossing channel.
9. A blockchain kiosk comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, the processor when executing the computer program implementing the cross-chain method of any of claims 1 to 7.
10. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out the cross-chain method according to any one of claims 1 to 7.
CN202110474468.4A 2021-04-29 2021-04-29 Block chain all-in-one machine, and chain crossing method and device and storage medium of multiple nodes in block chain all-in-one machine Active CN112995344B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110474468.4A CN112995344B (en) 2021-04-29 2021-04-29 Block chain all-in-one machine, and chain crossing method and device and storage medium of multiple nodes in block chain all-in-one machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110474468.4A CN112995344B (en) 2021-04-29 2021-04-29 Block chain all-in-one machine, and chain crossing method and device and storage medium of multiple nodes in block chain all-in-one machine

Publications (2)

Publication Number Publication Date
CN112995344A true CN112995344A (en) 2021-06-18
CN112995344B CN112995344B (en) 2021-10-08

Family

ID=76336707

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110474468.4A Active CN112995344B (en) 2021-04-29 2021-04-29 Block chain all-in-one machine, and chain crossing method and device and storage medium of multiple nodes in block chain all-in-one machine

Country Status (1)

Country Link
CN (1) CN112995344B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115796861A (en) * 2021-09-08 2023-03-14 区块链新科技(广州)有限公司 Cross-link transaction method, system, equipment and storage medium on block chain

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109559227A (en) * 2018-11-29 2019-04-02 咪咕文化科技有限公司 A kind of method of commerce, device and the storage medium of transregional piece of chain network
CN110247834A (en) * 2019-07-05 2019-09-17 北京神经元网络技术有限公司 The method of node device, high-speed industrial communication system and communication
US20200013027A1 (en) * 2018-07-06 2020-01-09 Decentralized Finance Labs, Inc. Hybrid proof of work and proof of stake consensus to reduce circulating tokens in a blockchain system
CN111738859A (en) * 2020-07-08 2020-10-02 支付宝(杭州)信息技术有限公司 Block chain all-in-one machine and block chain network
CN112330326A (en) * 2020-11-27 2021-02-05 中国农业银行股份有限公司 Business processing method and device applied to bank transaction block chain system
CN112367381A (en) * 2020-10-29 2021-02-12 苏州浪潮智能科技有限公司 Integrated machine device, system, method, equipment and medium for block chain cross-chain operation
CN112527890A (en) * 2019-09-19 2021-03-19 上海哔哩哔哩科技有限公司 Block chain data synchronization method and device and computer equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200013027A1 (en) * 2018-07-06 2020-01-09 Decentralized Finance Labs, Inc. Hybrid proof of work and proof of stake consensus to reduce circulating tokens in a blockchain system
CN109559227A (en) * 2018-11-29 2019-04-02 咪咕文化科技有限公司 A kind of method of commerce, device and the storage medium of transregional piece of chain network
CN110247834A (en) * 2019-07-05 2019-09-17 北京神经元网络技术有限公司 The method of node device, high-speed industrial communication system and communication
CN112527890A (en) * 2019-09-19 2021-03-19 上海哔哩哔哩科技有限公司 Block chain data synchronization method and device and computer equipment
CN111738859A (en) * 2020-07-08 2020-10-02 支付宝(杭州)信息技术有限公司 Block chain all-in-one machine and block chain network
CN112367381A (en) * 2020-10-29 2021-02-12 苏州浪潮智能科技有限公司 Integrated machine device, system, method, equipment and medium for block chain cross-chain operation
CN112330326A (en) * 2020-11-27 2021-02-05 中国农业银行股份有限公司 Business processing method and device applied to bank transaction block chain system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115796861A (en) * 2021-09-08 2023-03-14 区块链新科技(广州)有限公司 Cross-link transaction method, system, equipment and storage medium on block chain
CN115796861B (en) * 2021-09-08 2024-01-30 区块链新科技(广州)有限公司 Cross-chain transaction method, system, equipment and storage medium on blockchain

Also Published As

Publication number Publication date
CN112995344B (en) 2021-10-08

Similar Documents

Publication Publication Date Title
CN108492108B (en) Block chain cross-chain communication method, system and computer readable storage medium
CN112446785B (en) Cross-chain transaction method, system, device, equipment and storage medium
CN109345388B (en) Block chain intelligent contract verification method and device and storage medium
US11336451B2 (en) Cross-blockchain resource transmission
CN106453415B (en) Block chain-based equipment authentication method, authentication server and user equipment
CN112887160B (en) Block chain all-in-one machine, multi-node deployment method and device thereof, and storage medium
US11429719B2 (en) Multi-container-based trusted application processing method and related device
CN111741114A (en) System, method and equipment capable of monitoring cross-chain interaction based on block chain
CN108805571B (en) Data protection method, platform, block chain node, system and storage medium
CN109634615B (en) Issuing method, verification method and device of application installation package
CN110570196A (en) Transaction data processing method and device, terminal equipment and storage medium
CN110740044B (en) Data processing method, device, system and storage medium
CN111026367B (en) Micro-service arrangement method, device, terminal equipment and storage medium
CN105306490A (en) System, method and device for payment verification
CN109040210B (en) Communication method between applications, terminal equipment and storage medium
WO2017185827A1 (en) Method and apparatus for determining suspicious activity of application program
CN103235912B (en) Trusted process recognition device and trusted process recognition methods
CN113490192B (en) Bluetooth connection method, device, terminal equipment and readable storage medium
WO2023040453A1 (en) Transaction information processing method and apparatus
CN112995344B (en) Block chain all-in-one machine, and chain crossing method and device and storage medium of multiple nodes in block chain all-in-one machine
CN111191212B (en) Block chain-based digital certificate processing method, device, equipment and storage medium
CN111507714B (en) Verification method, verification device, server and storage medium
WO2023116466A1 (en) Privacy computing method and apparatus, and electronic device and computer-readable storage medium
CN105553942A (en) Method and system of applying jump
CN105868632B (en) Method and device for intercepting and releasing DHCP (dynamic host configuration protocol)

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CB03 Change of inventor or designer information

Inventor after: Yin Keting

Inventor after: Li Chaolin

Inventor after: Fang Wenjing

Inventor after: Tang Quan

Inventor after: Liu Ming

Inventor after: Li Xuanfeng

Inventor before: Tang Quan

Inventor before: Wei Yibing

Inventor before: Liu Ming

Inventor before: Li Xuanfeng

Inventor before: Zhou Tao

Inventor before: Yin Keting

CB03 Change of inventor or designer information