WO2019001214A1 - 信息的传输方法、装置和系统 - Google Patents

信息的传输方法、装置和系统 Download PDF

Info

Publication number
WO2019001214A1
WO2019001214A1 PCT/CN2018/089389 CN2018089389W WO2019001214A1 WO 2019001214 A1 WO2019001214 A1 WO 2019001214A1 CN 2018089389 W CN2018089389 W CN 2018089389W WO 2019001214 A1 WO2019001214 A1 WO 2019001214A1
Authority
WO
WIPO (PCT)
Prior art keywords
transaction
blockchain
node
message
block
Prior art date
Application number
PCT/CN2018/089389
Other languages
English (en)
French (fr)
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
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2019001214A1 publication Critical patent/WO2019001214A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications
    • 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
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16YINFORMATION AND COMMUNICATION TECHNOLOGY SPECIALLY ADAPTED FOR THE INTERNET OF THINGS [IoT]
    • G16Y10/00Economic sectors
    • G16Y10/75Information technology; Communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding

Definitions

  • the present application relates to communication technologies, and in particular, to a method, an apparatus, and a system for transmitting information.
  • the Internet of Things As an extended and extended network based on the Internet, the Internet of Things (IoT), through the application of intelligent sensing, identification technology and ubiquitous computing, to achieve information exchange and communication, can also meet the deployment and operation requirements of the blockchain system. With the increase in the number of devices in the Internet of Things, if you manage in a traditional centralized network model, it will bring huge investment in data center infrastructure construction and maintenance. In addition, a centralized network model can also pose a security risk.
  • the decentralization of blockchain provides a way for IoT self-governance to help devices in the IoT understand each other and let devices in the IoT know the relationships between different devices and achieve distributed IoT. Decentralized control. If the blockchain technology is applied to the smart home, the blockchain smart home related living equipment can independently complete related transactions, for example, the home washing machine can automatically purchase the laundry liquid to complete the transaction process.
  • a blockchain is a data structure that is orderedly linked by blocks containing transaction information.
  • the blockchain is single-chain and realizes a single function.
  • the bitcoin blockchain implements bitcoin payment function
  • the data storage blockchain realizes data storage and tamper-proof function.
  • the application provides a method for transmitting information, which is applied to a node in a first blockchain, and the method includes:
  • the first transaction includes a first event identification and a transaction condition; the first event identification is used to associate the first transaction with a second block a second transaction in the chain; the transaction condition includes: performing a first transaction of the first blockchain after completion of the second transaction including the first event identifier in the second blockchain;
  • a method for transmitting information may be provided, which is applied to a node of a blockchain, including:
  • the transaction includes an event identification and a transaction condition; the event identification is used to associate transactions in at least two different blockchains; performing the blockchain according to the transaction condition The transaction;
  • the transaction of the blockchain is executed after the transaction in at least one other blockchain is completed;
  • a method for transmitting information which is applied to a node of a blockchain, includes:
  • the transaction includes an event identification and a transaction condition;
  • the event identification is for associating a transaction in at least two different blockchains; performing the transaction of the blockchain according to the transaction condition;
  • the block containing the transaction is obtained.
  • transaction mentioned in this application may be information, may be data, may be in the form of a message or the like.
  • a transaction is information used by a recording device, such as a money transaction spent using a device, such as a transaction being a message notifying that the device is turned off.
  • the acquiring the block that includes the first transaction includes:
  • the block may contain other transactions in addition to the first transaction.
  • the determining, by the block of the second blockchain, the second transaction includes:
  • the notification message is used to notify the completion of the second transaction execution
  • the notification message may be a second blockchain in the same node.
  • the unit sends to the first blockchain unit, and the first blockchain unit determines, according to the notification message, that the second block chain unit includes the second transaction.
  • the blockchain node obtains a notification message when certain conditions or conditions are met, such that the blockchain node confirms that a transaction can be initiated.
  • the receiving the notification message includes:
  • connection node is configured to connect the first blockchain and the second blockchain.
  • the notification message includes at least one of the following:
  • an event identifier also called a cross-chain identifier
  • the related identifiers of different blockchains are associated by the event identifier.
  • the determining the second transaction in the block of the second blockchain further includes:
  • the first event identifier may be a blockchain identifier and a transaction identifier.
  • the determining to satisfy the transaction condition comprises:
  • the meaning of the scheme is that the node of the first blockchain does not need the notification of any node in the second blockchain, and can actively obtain the depth of the second blockchain in the second blockchain, when the depth is greater than When the value is certain, it is considered that the second transaction has been executed, that is, the transaction condition is satisfied.
  • the method before the first transaction is sent to the other nodes in the first blockchain, the method further includes:
  • the node of the first blockchain generates the first transaction, which may be generated by a user equipment, an Internet of Things device, a node of another blockchain, or other network element nodes.
  • the triggering of the second blockchain is required, that is, for example, the node of the first blockchain can receive the first trigger message sent by one or more nodes in the second blockchain, and is generated by triggering the first trigger message.
  • First transaction The first transaction is then sent to other nodes for execution.
  • the cross-chain interaction is implemented, and the blockchain node obtains the notification message or the trigger message when the specific conditions or conditions are met, so that the blockchain node can confirm that a transaction can be initiated or executed.
  • a transaction is implemented, and the blockchain node obtains the notification message or the trigger message when the specific conditions or conditions are met, so that the blockchain node can confirm that a transaction can be initiated or executed.
  • the first trigger message may include at least one of the following: a first event identifier, an identifier of the second blockchain, a first blockchain identifier, an identifier of the first transaction, and a connection identifier.
  • connection identifier is an identifier for associating a plurality of transactions in the same blockchain, for example: a first transaction in the first blockchain, and a third transaction that may occur subsequently, which can be directly passed
  • the event identifier is associated, and a dedicated connection identifier can also be set to associate the first transaction with the third transaction.
  • a connection identifier also called a cross-chain identifier
  • the connection identifier can conveniently query the content and status of multiple related transactions in the same blockchain.
  • the method further includes:
  • the first blockchain node sends a second trigger message to the second blockchain node, and after the second blockchain node receives the second trigger message, And sending the A message to the user equipment or the Internet of Things device to indicate that the task X or the behavior X is performed according to the second trigger message.
  • the second blockchain receives the B message of the user equipment or the Internet of Things device, and the Bth message is used to confirm that the task X or the behavior X has been completed.
  • the second block chain node generates a second transaction, and finally the second transaction is included in the block of the second blockchain.
  • the method further includes:
  • the third trigger message is used to trigger a node of the first blockchain to generate a third transaction;
  • the third trigger message includes a second event identifier, where the second event identifier is used for association The first transaction;
  • the third transaction includes a first connection identifier, and the first connection identifier is used to associate at least two transactions in the first blockchain.
  • the meaning of the scheme is that, similarly, the user equipment, the Internet of Things device, the nodes of other blockchains or other network nodes can trigger the node of the first blockchain to generate a third transaction associated with the first transaction, the same zone.
  • Multiple transactions in a blockchain can be associated by a connection identifier.
  • the node of the first blockchain can be triggered to generate a third transaction associated with the first transaction, that is, the node of the first blockchain receives the second blockchain.
  • the meaning of the second event identifier may include a first event identifier for associating the first transaction with the third transaction, and the second event identifier may also be a new identifier indicating the relationship between the first transaction and the third transaction. Just fine.
  • the first request message is used to request to perform something, which causes the transaction to be triggered.
  • the client shares the requesting party and requests the sharing device, thereby triggering the first transaction (for example, the first transaction is information that the client provides payment for the device owner), or the terminal device requests the client.
  • the terminal provides device sharing, thereby triggering the first transaction (eg, the first transaction is information that the client provides payment for the device owner).
  • the first transaction may also be other possibilities, for example, the first transaction is to use the device's record information.
  • device sharing or data sharing is taken as an example to illustrate the content of the solution, but it is not limited to the examples.
  • the meaning of the solution is that the foregoing transaction execution process is triggered by the request of the terminal device, that is, the user sends the first request message through the client or the terminal device, and the node of the first blockchain broadcasts the first transaction. Perform subsequent information interaction processes.
  • the method further includes:
  • the application provides a method for transmitting information, which is applied to a node in a second blockchain, and the method includes:
  • the second transaction includes a second connection identifier and/or a first event identifier; wherein the second connection identifier is used to associate the second transaction At least two transactions in the blockchain, the first event identification being used to associate the second transaction with a first transaction in the first blockchain;
  • a method for transmitting information may be provided, which is applied to a node of a blockchain, including:
  • the transaction including a connection identifier and/or an event identifier; the connection identifier is used to associate at least two transactions in the same blockchain; the event identifier is used to associate at least two Transactions in different blockchains;
  • a method for transmitting information which is applied to a node of a blockchain, includes:
  • the transaction including a connection identifier and/or an event identifier; the connection identifier is used to associate at least two transactions in the same blockchain; the event identifier is used to associate at least two different blockchains
  • the acquiring a block that includes the second transaction includes:
  • a block containing the second transaction sent by another node of the second blockchain is received.
  • the method further includes:
  • the notification message is used to notify the completion of the second transaction execution.
  • the sending a notification message to the at least one node in the first blockchain including:
  • the notification message is used to notify the completion of the second transaction execution.
  • the notification message includes at least one of the following:
  • the first event identifier, the identifier of the second blockchain, the identifier of the second transaction, and the block identifier containing the second transaction are included in the first event identifier, the identifier of the second blockchain, the identifier of the second transaction, and the block identifier containing the second transaction.
  • the method further includes:
  • the first trigger message may include at least one of the following: a first event identifier, an identifier of the second blockchain, and an identifier of the first transaction.
  • the method before the sending the second transaction to the other nodes in the second blockchain, the method further includes:
  • the second trigger message is used to trigger a node of the second blockchain to generate the second transaction; and the second trigger message is used to trigger node generation of the second blockchain The second transaction;
  • the receiving the second triggering message the first implementation manner is to receive the second trigger message sent by the at least one node in the first blockchain; or the second implementation manner is to receive the sending by the user equipment.
  • the second trigger message; or, the third embodiment is to receive the second trigger message sent by the IoT device; or the fourth embodiment is a network node, for example, a second trigger message sent by the network node that can send the trigger message.
  • the application is not limited.
  • the third trigger message is used to trigger a node of the first blockchain to generate a third transaction; the third trigger message includes a second event identifier, and the second event identifier is used to associate the first transaction.
  • the second event identifier includes the first event identifier.
  • the “second event identifier includes the first event identifier” indicates that the second event identifier is equal to the first event identifier, and the second event identifier is equal to the first event identifier.
  • the trigger message further includes at least one of the following parameters: the second event identifier, the identifier of the second blockchain, the identifier of the second transaction, and the block identifier including the second transaction, The identifier of the first blockchain, the connection identifier, the identifier of the first blockchain, the block identifier of the first transaction, and the first transaction identifier.
  • the application further provides a method for transmitting information, which is applied to a node in a first blockchain, the method comprising:
  • the first transaction includes an event identification and a transaction condition; the event identification is used to associate a second transaction in a second blockchain; the transaction The condition includes: after the second transaction identified in the second blockchain as the event identifier is completed, executing the first transaction of the first blockchain;
  • the fifth transaction includes: the event identifier
  • the meaning of the scheme is that, when the execution condition of the first transaction is the completion of the second transaction, after the node of the first blockchain determines that the transaction condition is satisfied, the manner of executing the first transaction may also be to generate a new fifth transaction.
  • the fifth transaction is associated with the first transaction and the second transaction, and the first transaction is completed by executing the fifth transaction.
  • the fifth transaction includes at least one of the following:
  • the identifier of the second blockchain The identifier of the second blockchain, the identifier of the second transaction, the block identifier corresponding to the second transaction, the transaction condition, and the identifier of the first transaction.
  • the acquiring the block that includes the fifth transaction further includes:
  • the block of the fifth transaction includes the first transaction.
  • the meaning of the scheme is that the generated fifth transaction includes the original first transaction, and therefore, the block included in the plan including the fifth transaction also includes the first transaction, and thus the first transaction is also performed.
  • the method before the generating the fifth transaction and sending the fifth transaction to the other nodes of the first blockchain, the method further includes:
  • the fifth transaction further includes a block identifier corresponding to the first transaction.
  • the generating the fifth transaction includes:
  • the fifth transaction is generated when the depth of the block corresponding to the second transaction in the second block chain is greater than a preset depth.
  • the method before the generating the block corresponding to the fifth transaction, the method further includes:
  • the fifth transaction is confirmed as a trusted transaction when it is detected that more than a predetermined number of nodes in the first blockchain generate the fifth transaction.
  • the application further provides a method for transmitting information, which is applied to a device or a node, and the method includes:
  • the feedback message is used to trigger a node of the blockchain to generate a transaction.
  • the device includes at least a user equipment and/or a network equipment.
  • the method before the returning the feedback message to the node of the first blockchain or the node of the second blockchain according to the transaction message, the method further includes:
  • the method for transmitting information provided by the fourth aspect or the fifth aspect may be applied to a user equipment or an Internet of Things device to interact with a node of a blockchain, and the blockchain node is triggered by an IoT device or a user equipment.
  • the transaction, or the blockchain node notifies the IoT device or the terminal device of the transaction execution result after the transaction is executed.
  • the IoT device and the terminal device may also be notified to perform related operations.
  • the present application provides a multi-chain Internet of Things system, including:
  • the first blockchain includes at least two nodes, and any one of the nodes is configured to perform the method for transmitting information according to any one of the first aspect or the third aspect;
  • the second blockchain includes at least two nodes, any of which is used to perform the method of transmitting information according to any one of the second aspects.
  • the multi-chain Internet of Things system further includes:
  • the first blockchain and the second blockchain are connected by the connection node; the connection node is configured to: notify a transaction status of the second blockchain of the first blockchain node; or Notifying the second blockchain node of the transaction status on the first blockchain.
  • At least one node in the first blockchain and the second blockchain is shared by the first blockchain and the second blockchain.
  • the multi-chain Internet of Things system further includes: an Internet of Things device and/or a user equipment.
  • the application provides an information transmission apparatus, including:
  • a sending module configured to send a first transaction to another node in a first blockchain to which the transmitting device of the information belongs;
  • the first transaction includes a first event identifier and a transaction condition;
  • the first event identifier is used to Associating the first transaction with the second transaction in the second blockchain;
  • the transaction condition includes: executing the first region after the second transaction including the first event identifier in the second blockchain is completed The first transaction of the blockchain;
  • a processing module configured to acquire a block that includes the first transaction when it is determined that the transaction condition is met.
  • the processing module is specifically configured to generate, in the first blockchain, a block that includes the first transaction
  • the apparatus further includes: a receiving module, configured to receive a block that includes the first transaction sent by another at least one node in the first blockchain.
  • processing module is specifically configured to:
  • the processing module is further configured to determine, according to the notification message, that the block in the second blockchain includes the second transaction.
  • the receiving module is specifically configured to:
  • connection node is configured to connect the first blockchain and the second blockchain.
  • the notification message includes at least one of the following:
  • processing module is specifically configured to:
  • processing module is further configured to:
  • the device further includes:
  • a receiving module configured to receive a first trigger message, where the first trigger message is used to trigger a node of the first blockchain to generate the first transaction;
  • the processing module is further configured to generate the first transaction according to the first trigger message.
  • the sending module is further configured to send a second trigger message to the at least one node of the second blockchain, where the second trigger message is used to trigger the node of the second blockchain to generate the Second transaction.
  • the receiving module is configured to receive a third transaction sent by another node of the first blockchain
  • the present application provides an information transmission apparatus, where the apparatus includes:
  • a sending module configured to send a second transaction to another node in the second blockchain to which the transmitting device of the information belongs;
  • the second transaction includes a second connection identifier and/or a first event identifier;
  • the second connection identifier is configured to associate at least two transactions in the second blockchain, the first event identifier being used to associate the second transaction with a first transaction in a first blockchain;
  • a processing module configured to acquire a block that includes the second transaction.
  • the processing module is specifically configured to generate, in the second blockchain, a block that includes the second transaction
  • the sending module is further configured to send a notification message to the at least one node in the first blockchain, where the notification message is used to notify that the second transaction is performed.
  • the sending module is specifically configured to:
  • the notification message is used to notify the completion of the second transaction execution.
  • the sending module is further configured to send, to the at least one node of the first blockchain, a first trigger message, where the first trigger message is used to trigger a node of the first blockchain to generate the First transaction.
  • the receiving module is further configured to receive the sent second trigger message, where the second trigger message is used to trigger the node of the second blockchain to generate the second transaction.
  • the receiving module is further configured to receive a feedback message returned by the device
  • processing module is further configured to generate a fourth transaction
  • the sending module is further configured to send the fourth transaction to another node in the second blockchain;
  • the fourth transaction includes: a second connection identifier; and the second connection identifier is used to associate the first Four transactions and the second transaction;
  • the processing module is further configured to acquire a block that includes the fourth transaction.
  • the sending module is further configured to:
  • the third trigger message is used to trigger a node of the first blockchain to generate a third transaction; the third trigger message includes a second event identifier, and the second event identifier is used to associate the first transaction.
  • the present application provides an information transmission apparatus, where the apparatus includes:
  • a sending module configured to send a trigger message to the node of the first blockchain or the node of the second blockchain; the trigger message is used to trigger a node of the blockchain to generate a transaction.
  • a receiving module configured to receive a transaction message sent by a node of the first blockchain or a node of the second blockchain;
  • a sending module configured to return a feedback message to the node of the first blockchain or the node of the second blockchain according to the transaction message; the feedback message is used to trigger a node of the blockchain to generate a transaction.
  • the device further includes:
  • a processing module configured to execute the operation or content indicated in the transaction message.
  • the number of processors is at least one, and is used to execute an execution instruction of the memory storage, that is, a computer program.
  • the memory storage that is, a computer program.
  • the present application provides a user equipment, including: a memory, a processor, a transmitter, a receiver, and a computer program, wherein the computer program is stored in the memory, and the processor runs the computer program to execute The method of transmitting information according to any of the fourth aspect or the fifth aspect.
  • the present application provides an Internet of Things device, including: a memory, a processor, a transmitter, a receiver, and a computer program, wherein the computer program is stored in the memory, and the processor runs the computer program A method of transmitting information according to any one of the fourth aspect or the fifth aspect.
  • the number of processors is at least one, and an execution instruction for executing the memory storage, that is, a computer program.
  • the method for transmitting information provided by various embodiments of the foregoing aspects is performed by performing a data interaction between the user equipment or the Internet of Things device through the communication interface and the node of the blockchain.
  • the memory may be integrated into the processor. internal.
  • the present application provides a storage medium, comprising: a readable storage medium and a computer program, the computer program for implementing the method for transmitting information provided by any one of the first aspect to the third aspect.
  • the present application provides a storage medium, comprising: a readable storage medium and a computer program, the computer program for implementing the method for transmitting information provided by any of the fourth aspect or the fifth aspect.
  • the application provides a program product comprising a computer program (ie, an execution instruction) stored in a readable storage medium.
  • a computer program ie, an execution instruction
  • At least one processor of the node device of the blockchain can read the computer program from a readable storage medium, the at least one processor executing the computer program causing the transmitting device to implement the information provided by the first aspect to the third aspect or various embodiments Transmission method.
  • the present application provides a program product comprising a computer program (ie, an execution instruction) stored in a readable storage medium.
  • a computer program ie, an execution instruction
  • At least one processor of the Internet of Things device or user device can read the computer program from a readable storage medium, and the at least one processor executes the computer program to cause the Internet of Things or user device to implement various implementations of the fourth or fifth aspect described above The method of transmitting information provided by the method.
  • any node in the first blockchain sends a first transaction identifier and a first transaction of a transaction condition to other nodes in the first blockchain, the first event identifier Used to associate transactions in other blockchains, such as a second transaction in the second blockchain.
  • the transaction condition may be that after the second transaction identified as the first event identifier in the second blockchain is completed, the first transaction of the first blockchain is executed, and when it is determined that the transaction condition is satisfied, the block containing the first transaction is obtained.
  • the completion of the transaction execution of one blockchain is completed by the execution of another transaction of another blockchain, providing a specific implementation scheme to realize the cross-blockchain interaction. It avoids the problem of network complexity and load caused by different types of transactions in the same blockchain.
  • different functions are implemented through different blockchains (that is, different transactions are executed) to help network layering and expansion, and to optimize the network structure.
  • FIG. 1 is a schematic diagram of a multi-chain Internet of Things system architecture provided by the present application.
  • FIG. 2 is a schematic diagram of another multi-chain Internet of Things system architecture provided by the present application.
  • FIG. 3 is a schematic diagram of another architecture of a multi-chain Internet of Things system provided by the present application.
  • Embodiment 4 is an interaction flowchart of Embodiment 1 of a method for transmitting information provided by the present application;
  • FIG. 5 is an interaction flowchart of Embodiment 2 of a method for transmitting information provided by the present application
  • FIG. 6 is an interaction flowchart of Embodiment 3 of a method for transmitting information provided by the present application
  • FIG. 7 is a flowchart of Embodiment 4 of a method for transmitting information provided by the present application.
  • FIG. 8 is an interaction flowchart of an example 1 in which a method for transmitting information provided by the present application is applied in a data sharing process;
  • FIG. 9 is an interaction flowchart of an example 2 of a method for transmitting information provided by the present application in a data sharing process
  • FIG. 10 is an interaction flowchart of an example 3 of a method for transmitting information provided by the present application in a data sharing process
  • FIG. 11 is a schematic diagram of an application scenario of device sharing provided by the present application.
  • FIG. 12 is an interaction flowchart of an example 4 in which a method for transmitting information provided by the present application is applied in a data sharing process
  • FIG. 13 is an interaction flowchart of an example 5 in which a method for transmitting information provided by the present application is applied in a data sharing process;
  • FIG. 14 is an interaction flowchart of an example 6 in which a method for transmitting information provided by the present application is applied in a data sharing process
  • 15 is an interaction flowchart of an example 7 in which a method for transmitting information provided by the present application is applied in a data sharing process;
  • Embodiment 16 is a schematic structural diagram of Embodiment 1 of an information transmission apparatus provided by the present application.
  • FIG. 17 is a schematic structural diagram of Embodiment 2 of an information transmission apparatus provided by the present application.
  • FIG. 18 is a schematic structural diagram of Embodiment 3 of a device for transmitting information provided by the present application.
  • FIG. 19 is a schematic structural diagram of Embodiment 4 of a device for transmitting information according to the present application.
  • Embodiment 5 of a device for transmitting information provided by the present application
  • FIG. 21 is a schematic structural diagram of Embodiment 6 of a device for transmitting information according to the present application.
  • the technical solution of the embodiment of the present application can be applied to a scenario such as implementing data sharing or device sharing in an Internet of Things system.
  • the IoT devices involved may be: industrial IoT devices, such as various industrial sensors, control units, etc.; for example, wearable devices, household appliances, home sensors, home control units, etc.; for example, user devices, including mobile phones, smart terminals , multimedia devices, streaming media devices, etc.
  • the application does not impose any restrictions on the form and type of the wireless network device. IoT devices have the ability to collect data and/or send data.
  • FIG. 1 is a schematic diagram of a multi-chain Internet of Things system architecture provided by the present application.
  • the multi-chain Internet of Things system includes a plurality of blockchains, each of which includes a plurality of nodes.
  • the present application does not limit the number of blocks in the system and the number of nodes in each blockchain.
  • the multi-chain Internet of Things system includes a first blockchain and a second blockchain.
  • the first blockchain includes five nodes
  • the second blockchain includes four nodes.
  • the nodes in the first blockchain and the second blockchain are completely independent nodes.
  • FIG. 2 is a schematic diagram of another multi-chain Internet of Things system architecture provided by the present application.
  • the multi-chain Internet of Things system also includes a plurality of blockchains, each of which includes a plurality of nodes, wherein one or more shared nodes exist between the plurality of blockchains.
  • the multi-chain Internet of Things system includes two blockchain first blockchains and the second blockchain, and two of the first blockchain and the second blockchain are present. Nodes C and E (at least one node) are shared by the first blockchain and the second blockchain.
  • FIG. 3 is a schematic diagram of another architecture of a multi-chain Internet of Things system provided by the present application.
  • the multi-chain IoT system also includes a plurality of blockchains, each of which includes a plurality of nodes, and the plurality of blockchains can be connected by a connection node.
  • the multi-chain Internet of Things system includes a first blockchain and a second blockchain, and the first blockchain and the second blockchain pass through a connection node (for example, the trust in the figure) Nodes are connected, and data interaction between the first blockchain and the second blockchain can be transmitted through the trusted node. That is, the connection node can be used to notify the first blockchain node of the transaction status on the second blockchain; or, to notify the second blockchain node of the transaction status on the first blockchain.
  • the multi-chain Internet of Things system includes at least two blockchains: a first blockchain and a second blockchain. ;
  • the first blockchain includes at least two nodes, wherein any node is used for a method of transmitting information of a first blockchain; the second blockchain includes at least two nodes, and any one of the nodes is used for A method of transmitting information of a two-block chain.
  • the multi-chain IoT system may further include: a connection node (eg, a trusted node); the first blockchain and the second blockchain pass the connection The node is connected to: notify the first blockchain node of the transaction status on the second blockchain; or notify the second blockchain node of the transaction status on the first blockchain.
  • a connection node eg, a trusted node
  • the first blockchain and the second blockchain pass the connection The node is connected to: notify the first blockchain node of the transaction status on the second blockchain; or notify the second blockchain node of the transaction status on the first blockchain.
  • At least one node in the first blockchain and the second blockchain is shared by the first blockchain and the second blockchain.
  • the multi-chain Internet of Things system may further include: an Internet of Things device and/or a user device.
  • the "transaction" mentioned in this patent may be information, may be data, or may be in the form of a message or the like.
  • the transaction is information used by the recording device, for example, a money transaction used by the device, for example, the transaction is a message, such as a message for notifying the device to be turned off, and the present solution is not limited thereto.
  • FIG. 4 is an interaction flowchart of Embodiment 1 of the method for transmitting information provided by the present application. As shown in FIG. 4, specific steps of an implementation manner of the method for transmitting information include:
  • S101 Send a first transaction to other nodes in the first blockchain, where the first transaction includes: a first event identifier and a transaction condition; wherein the first event identifier is used to associate the first transaction with the second blockchain
  • the second transaction; the transaction condition includes: after the second transaction in which the second blockchain contains the first event identifier is completed, executing the first transaction of the first blockchain.
  • any node in the first blockchain generates a first transaction after receiving the first request message sent by the user through the client or the terminal device.
  • the first request message sent by the client or the terminal device is used to request data or request device sharing or the like.
  • the node After the node generates the first transaction, it sends it to the other nodes in the first blockchain so that each node in the first blockchain is aware of the existence of the first transaction.
  • the first transaction in the solution is not an independent transaction, but a certain transaction condition exists, so the first transaction sent by the node of the first blockchain to other nodes includes at least: a first event identifier and a transaction condition;
  • the first event identifier is used to associate a second transaction in the second blockchain;
  • the transaction condition includes: after the second transaction identified in the second blockchain as the first event identifier is completed, performing the The first transaction of the first blockchain.
  • the meaning is that the first transaction can be completed after the execution of the second transaction in the second blockchain is completed.
  • first transaction identifier associated with the first transaction in the first blockchain and the second transaction in the second blockchain refers to any transaction in any of the blockchains.
  • An event identifier in the medium that can be used to associate at least one transaction in the other at least one blockchain.
  • event identifiers in this application for example: one transaction in the first blockchain and one or several transactions in the second blockchain are associated by an event identifier.
  • one transaction in the first blockchain and one or several transactions in the second blockchain and one or several transactions in the third blockchain may be associated by an event identification. There are no restrictions on this program.
  • the first transaction may further include at least one of the following: an identifier of the first blockchain, a connection identifier, an identifier of the second blockchain, an identifier of the second blockchain, and an identifier of the second transaction, The identifier of the block where the second transaction is located, the service identifier, the type of data, the amount of data, and the like.
  • the first transaction may further include one of the following: a public key, an address, a device identifier, a data identifier, a payment amount, and the like.
  • the public key may be a public key of the parties to the transaction
  • the address may be an address of the parties to the transaction or an address of the device.
  • the execution of the first transaction may be the local node, or may be other nodes in the first blockchain, and the solution is not limited.
  • S102 Send a second transaction to other nodes in the second blockchain; the second transaction includes a second connection identifier and/or a first event identifier; wherein the second connection identifier is used to associate the At least two transactions in the second blockchain, the first event identification being used to associate the second transaction with the first transaction in the first blockchain.
  • the second blockchain is triggered to generate a second transaction, and after any node in the second blockchain acquires the second transaction, And sending it to other nodes in the second blockchain, including the first event identifier used to associate with the first transaction, to enable other nodes to determine that the second transaction has a certain association with the first transaction.
  • the second transaction includes a second connection identifier, or includes a second connection identifier and a first event identifier.
  • the second connection identifier is used to associate transactions in the same blockchain, that is, to associate multiple transactions in the second blockchain.
  • the second transaction sent to other nodes in the second blockchain may further include at least one of the following: an identifier of the first blockchain, an identifier of the second blockchain, a connection identifier, and an interaction.
  • Information such as the type of data, the amount of data of interactive data, and so on.
  • connection identifiers in the first transaction and the second transaction may be different, and the connection identifier is used to associate different transactions within the same blockchain.
  • the implementation manner of obtaining the block containing the second transaction includes at least the following two implementation manners:
  • the meaning of the scheme means that other nodes of the second blockchain acquire the right to generate the block, generate a block containing the second transaction, and the local node that sends the second transaction receives the block containing the second transaction sent by the other node. .
  • the node of the first blockchain needs to determine that the transaction condition is satisfied, that is, the execution of the second transaction is completed, and the block containing the first transaction can be acquired, that is, the first transaction is executed.
  • a specific implementation of the node of the first blockchain to determine that the transaction condition is satisfied is to determine that the block of the second blockchain contains the second transaction or the second transaction is broadcast, and then considers that the transaction condition of the first transaction is satisfied.
  • the node of the first blockchain determines that the specific implementation of the second transaction in the block of the second blockchain includes the following:
  • the first implementation manner is to receive a notification message, where the notification message is used to notify the completion of the second transaction execution, and determine, according to the notification message, that the block in the second blockchain includes the second transaction.
  • receiving a notification message sent by a node in at least one second blockchain, or a notification message sent by another network node For example, receiving a notification message sent by a node in at least one second blockchain, or a notification message sent by another network node.
  • the scheme receives the notification message sent by the second blockchain unit for the first blockchain unit in the node, and then determines the block in the second blockchain. Whether to include the second transaction.
  • the meaning of the solution is that the node of the first blockchain receives the notification message notifying the completion of the execution of the second transaction, and the node of the first blockchain determines that the execution of the second transaction is completed, that is, the block of the second blockchain is determined. Contains the second transaction.
  • a second implementation manner receiving a notification message sent by the connection node; the connection node is configured to connect the first blockchain and the second blockchain; and the notification message includes a notification for the second transaction Execution is completed; determining, according to the notification message, that the second transaction is included in a block in the second blockchain.
  • the meaning of the solution is that the node of the first blockchain receives the notification message sent by the connection node to notify the completion of the second transaction execution in the second blockchain, and the node of the first blockchain determines that the second transaction is completed. That is, it is determined that the second transaction is included in the block of the second blockchain.
  • the meaning of the solution is that after the node of the first blockchain of the above two implementations receives the notification message, since the first blockchain and the second blockchain are independent two links, the first zone The blockchain does not have to directly believe the notification sent by the second blockchain, so the node of the first blockchain can access the content of the second blockchain after receiving the notification message, that is, read the second blockchain.
  • the blockchain confirms that the second transaction is indeed written in the block of the second blockchain, and determines that the transaction condition is satisfied.
  • the content of the second blockchain is read, and the second transaction has been written into the block in the second blockchain according to the first event identifier. For example, directly reading the content of the second blockchain, and confirming that the second transaction has been written into the block in the second blockchain according to the first event identifier.
  • the first blockchain unit in the shared node receives a notification message of the second blockchain unit, the notification message includes a notification for notifying completion of the second transaction; determining, according to the notification message The second transaction is included in a block in the second blockchain. Specifically, it may be that a notification message is received, the notification is used to notify the completion of the second transaction, and the content of the second blockchain is read according to the notification message, and the second blockchain is determined to be The block contains the second transaction.
  • the method includes: reading a content of the second blockchain, and confirming, according to the first event identifier, that the second transaction has been written into a block in the second blockchain.
  • the content of the second blockchain is read according to the notification message, and it is confirmed according to the first event identifier that the second transaction has been written into a block in the second blockchain.
  • the notification message in the foregoing implementation manner may include at least one of the following: a first event identifier, a first blockchain identifier, an identifier of the second blockchain, an identifier of the second transaction, and an area including the second transaction.
  • Block ID connection ID. That is, the notification message can inform the node of the first blockchain of the second transaction by carrying different information, and the specific type of information to be carried is not limited.
  • the notification message is sent by the node in the second blockchain, and the node of the first blockchain is triggered to confirm whether the transaction condition of the first transaction is satisfied.
  • the solution also provides a determination to satisfy the transaction condition.
  • the meaning of the scheme is that the node of the first blockchain actively acquires the depth of the block including the second transaction in the second blockchain, and confirms that the depth of the block of the second transaction is greater than the preset depth, and considers that the second The transaction has been executed, that is, it is determined that the trading conditions of the first transaction are satisfied.
  • the node in the first blockchain needs to acquire the block containing the first transaction, that is, execute the first transaction, and the node of the second blockchain acquires the block containing the second transaction. It also includes the following two implementations:
  • a block containing the first transaction is generated in the first blockchain.
  • the node that sent the first transaction acquires the right to generate the block, so the block containing the first transaction can be directly generated.
  • the block may be sent to other nodes in the first blockchain after generating the block containing the first transaction to enable other nodes to record the execution result of the first transaction.
  • the block that includes the first transaction sent by the other at least one node in the first blockchain is received.
  • the meaning of the scheme is that the other nodes of the first blockchain acquire the right to generate the block, generate a block containing the first transaction, and the local node that sends the first transaction receives the block containing the first transaction sent by the other node. .
  • the condition for completion of transaction execution of one blockchain is that the execution of another transaction of another blockchain is completed, providing specific
  • the implementation scheme realizes the interaction of the cross-blockchain, and avoids the problem of network complexity and load caused by realizing different kinds of transactions in the same blockchain.
  • different functions are implemented through different blockchains (that is, different transactions are executed) to help network layering and expansion, and to optimize the network structure.
  • FIG. 5 is an interaction flowchart of Embodiment 2 of the method for transmitting information provided by the present application. As shown in FIG. 5, on the basis of the foregoing Embodiment 1, before the step S101, the following steps may be further included:
  • S105 Receive a first trigger message, where the first trigger message is used to trigger a node of the first blockchain to generate a first transaction.
  • the node of the first blockchain can accept the trigger message sent by the user equipment, the Internet of Things device, the node of the second blockchain or other network nodes, and generate a corresponding transaction according to the trigger message.
  • the first trigger message is received from the network node, and the network node may be a node of the second blockchain, or may be a node of another blockchain, or may be a user equipment, or may be the first transaction.
  • the trading conditions provide nodes for smart contract services, or network nodes that can provide trigger messages. This application does not impose restrictions on network nodes.
  • the receiving, by the second blockchain node, the first trigger message is sent, that is, receiving the first trigger message sent by the at least one node of the second blockchain, where the first trigger message is used to trigger the first blockchain.
  • the node generates the first transaction. That is, the node of the second blockchain sends a first trigger message to at least one node of the first blockchain.
  • S106 Generate a first transaction according to the first trigger message.
  • the triggering process of the first transaction wherein the node of the first blockchain can also receive any one or more nodes of the second blockchain before sending the first transaction to other nodes.
  • a first trigger message the first trigger message is used to trigger the generation of the first transaction, that is, in the solution, the generation of the first transaction is not necessarily triggered by the request message sent by the user through the client or the terminal device, but
  • the completion of another transaction such as the zeroth transaction, triggers the generation of the first transaction after the completion of the zeroth transaction on the second blockchain.
  • the device sharing when the requesting party performs the transaction process of the device use request, the transaction process of the fee sharing of the device sharing may be triggered.
  • the first trigger message may include at least one of the following: an identifier of the second blockchain, a first event identifier, and the like.
  • any node of the second blockchain may further include the following steps before performing step S102:
  • S107 Receive a second trigger message, where the second trigger message is used to trigger a node of the second blockchain to generate a second transaction.
  • the receiving the second trigger message, the first implementation manner is to receive the second trigger message sent by the at least one node in the first blockchain; or the second implementation manner is to receive the user equipment.
  • the second trigger message is sent; or the third embodiment is to receive the second trigger message sent by the IoT device; or the fourth embodiment is a network node, for example, the second trigger sent by the network node capable of sending the trigger message Message.
  • the application is not limited.
  • the second trigger message sent by at least one node in the first blockchain is temporarily taken as an example for description.
  • the node of the second blockchain may interact with an IoT device or a user device (which may be collectively referred to as a device), for example, after receiving the second trigger message, according to the trigger
  • the message sends a transaction message to the IoT device or the user device, notifies the execution of the transaction, or triggers the operation of the IoT device or the user device to perform a response, and the IoT device or the user device returns a feedback message according to the transaction message.
  • the node of the second blockchain generates a second transaction after receiving the feedback message, that is, generates a second transaction according to the feedback message.
  • S108 Generate a second transaction according to the second trigger message.
  • the node of the first blockchain sends a second trigger message to at least one node of the second blockchain.
  • the generation of the second transaction may not be triggered by the user sending the request to the second blockchain through the client or the terminal device, but due to the generation of the first transaction or the first blockchain. Triggered by the execution of other transactions on. Taking the device sharing as an example, after the requesting party initiates the sharing request and the transaction for paying the fee is completed, the unlocking transaction process of the shared device may be triggered.
  • the triggering process of the first transaction in the above steps S105 and S106, the triggering of the second transaction in the step S107 and the S108 may occur at the same time, or may be separately generated, and the present solution is not limited.
  • the transaction on each blockchain may be triggered by the client or the terminal device of the user, or may be other blockchains.
  • the completion of a transaction on the trigger that is, the generation of a transaction is triggered by the completion of another transaction, in this way to achieve cross-chain interaction.
  • FIG. 6 is an interaction flowchart of Embodiment 3 of the method for transmitting information provided by the present application. As shown in FIG. 6 , on the basis of any of the foregoing embodiments, after step S104, the following steps may be further included:
  • S109 Generate a fourth transaction, and send a fourth transaction to other nodes in the second blockchain; the fourth transaction includes: a second connection identifier; and the second connection identifier is used to associate the second transaction.
  • the node of the second blockchain may also generate a fourth transaction associated with the second transaction, which may be triggered by the execution of the first transaction or the second transaction, or may be triggered by the user through the terminal device or the client.
  • the lock is performed after the use is completed, and the lock process triggers the process of closing the transaction.
  • the lock transaction is not a new transaction independent of the aforementioned first transaction and the second transaction, but a transaction associated with the aforementioned process of unlocking the transaction, so the fourth transaction includes at least the second connection identifier. Associate the second transaction.
  • the second connection identifier may be the same as the first event identifier, and the other nodes of the second blockchain may directly determine the association relationship between the fourth transaction and the foregoing second transaction according to the second connection identifier, or It is a connection identifier that is independent of the event identifier, and may indicate the relationship between the fourth transaction and the foregoing second transaction, and the solution is not limited.
  • the node that generates the block is determined according to a consensus algorithm by multiple nodes in the second blockchain, and the fourth node
  • the transaction is written into a block in the second blockchain, ie, for the node generating the fourth transaction, the manner of obtaining the block containing the fourth transaction includes generating a block containing the fourth transaction and receiving the second blockchain
  • the other nodes sent by the other nodes contain the block of the fourth transaction.
  • S111 Send a third trigger message to at least one node in the first blockchain, where the third trigger message is used to trigger a node of the first blockchain to generate a third transaction.
  • the node of the first blockchain is connected to the third trigger message, which may be sent by the user equipment, the Internet of Things device, other network nodes, or other blockchain nodes.
  • the node of the first blockchain receives the second zone.
  • a third trigger message sent by at least one node of the block chain includes a second event identifier, and the second event identifier is used to associate the first transaction.
  • the same second event identifier may be the same as the first event identifier, or may be a new event identifier, and the third transaction can be associated with the first transaction.
  • the third transaction in the scheme is not a new transaction completely independent of the foregoing process, but a new transaction related to the first transaction, for example, the completion of the lock transaction in the device sharing process triggers the transaction of the benefit benefit confirmation.
  • the process is related to the aforementioned payment process. That is, the execution of the fourth transaction described above may trigger the generation of another new third transaction.
  • the node of the second blockchain sends a third trigger message to one or more nodes in the first blockchain, and at least includes the following implementation manners:
  • a third trigger message is sent to at least one node in the first blockchain.
  • a third trigger message is sent to at least one node in the first blockchain.
  • the third trigger message is sent to at least one node in the first blockchain.
  • the third trigger message is sent, where the third trigger message is used to trigger a node of the first blockchain to generate a third transaction, and the third trigger message includes a second event identifier, where a second event identifier is used to associate the first transaction; the third transaction is generated according to the third trigger message.
  • the third trigger message may be sent by a node of another network node, an Internet of Things device, a user equipment, or other blockchain.
  • at least one node of the second blockchain is taken as an example, and the node of the first blockchain is used.
  • the third transaction is generated according to the trigger message.
  • the third transaction sent by the other nodes of the first blockchain is received; that is, the other nodes in the first blockchain generate a third transaction according to the trigger and send to the local node.
  • S112 Generate a third transaction according to the third trigger message.
  • the node of the first blockchain generates a third transaction after receiving the third trigger message, then broadcasts the third transaction to other nodes, and executes the third transaction to acquire a block containing the third transaction, completing the transaction process.
  • the transaction process initiated by the user through the client or the terminal device may be sent to the client or the terminal device after the execution is completed, and the transaction result is used for the transaction result. Indicates that the content acquisition requested in the first request message is completed or the execution ends.
  • the method for transmitting information provides several interaction processes of multiple transactions between multiple blockchains, and each transaction execution may trigger a new transaction generated in association with the aforementioned transaction. That is, multiple related transactions can be realized in the same blockchain, which greatly reduces the complexity of implementing related transactions through multiple blockchains, and reduces system load.
  • the event identifier is used to associate transactions for at least two different blockchains, or the event identifier is an identifier associated with at least two different blockchain transactions.
  • An event identifier is a common identifier between multiple chains for an event. Event identifiers are common identifiers used to identify behaviors or events or contracts between links.
  • the event identifier is a cross-chain identifier.
  • the event identifier may be called another name such as a task identifier, a cross-chain identifier, or a smart contract identifier, etc., and the application does not impose any restrictions.
  • the present application describes the content of the invention by an event identifier.
  • connection identifier is at least two transactions for associating the same blockchain, or the connection identifier is used to associate different transactions of the same blockchain. At least two transactions within the same blockchain set a connection identifier dedicated to the transactions within the associated blockchain, associating transactions within the blockchain. In particular, transactions that are associated with the same blockchain are linked by a connection identifier, which is a related transaction. For example, these transactions are information records of different processes of the same business, for example, B shares the device (lock) with A, the transaction y of the blockchain Z is the unlock record, and the x transaction of the blockchain Z is the lock transaction. The transaction is a related transaction. As another example, it is also possible, for example, to equate an event identifier with a connection identifier, associating at least two transactions within the same blockchain. There is no restriction on this application.
  • FIG. 7 is a flowchart of Embodiment 4 of a method for transmitting information provided by the present application. As shown in FIG. 7 , the solution is applied to a node of a first blockchain, and specific implementation steps of the method for transmitting the information are:
  • S201 Broadcast a first transaction to other nodes in the first blockchain; the first transaction includes an event identifier and a transaction condition; the event identifier is used to associate a transaction in the second blockchain, such as a second transaction; the transaction condition includes After the transaction identified as an event identifier (eg, the second transaction) in the second blockchain is completed, the first transaction of the first blockchain is executed.
  • the event identifier is used to associate a transaction in the second blockchain, such as a second transaction
  • the transaction condition includes After the transaction identified as an event identifier (eg, the second transaction) in the second blockchain is completed, the first transaction of the first blockchain is executed.
  • the first transaction includes at least one of the following: an identifier of the second blockchain, an identifier of the second transaction, a block identifier corresponding to the second transaction, the transaction condition, an identifier of the first transaction, The identifier of the first blockchain, the event identifier, and the connection identifier.
  • the first transaction further includes a block identifier corresponding to the first transaction.
  • the nodes on the second blockchain are also performing the process of the second transaction.
  • the specific implementation is similar. For details, refer to the contents of S102 and S103 in the first embodiment.
  • a node of the second blockchain sends a second transaction to other nodes in the second blockchain; the second transaction includes a first event identifier, the first event identifier being used to associate the first block The first transaction in the chain.
  • the second blockchain performs a second transaction to obtain a block including the second transaction. That is, the trading conditions of the first transaction are completed.
  • the second transaction of the second blockchain includes at least one of the following: an identifier of the second blockchain, an identifier of the second transaction, a transaction condition, an identifier of the first blockchain, and a block identifier corresponding to the first transaction, The identifier of the first transaction, the event identifier, and the connection identifier.
  • the second transaction is used to indicate that the device has been shared to the device requester, and the second transaction includes at least one of the following: an identifier of the second blockchain, an identifier of the second transaction, and an identifier of the first blockchain.
  • a block identifier corresponding to the first transaction an identifier of the first transaction, an event identifier, a connection identifier, a device identifier, a requestor identifier, an address of the device, an address of the requestor, an identifier of the device owner, and a device owner Address, time (transaction time, or time when the device starts sharing).
  • the first transaction of the first blockchain may be used to indicate that the device requestor pays money transaction information for using the device.
  • S203 Acquire a block including the fifth transaction.
  • the manner of obtaining the block including the fifth transaction includes at least the following two types:
  • the fifth transaction is executed, and a block including the fifth transaction is generated.
  • a block that includes the fifth transaction sent by another node in the first blockchain is received.
  • the block of the fifth transaction includes the first transaction.
  • the meaning of the scheme is that the generated fifth transaction includes the original first transaction, and therefore, the block included in the plan including the fifth transaction also includes the first transaction, and thus the first transaction is also performed.
  • the method before the generating the fifth transaction and broadcasting the fifth transaction to the other nodes of the first blockchain, the method further includes: acquiring a block including the first transaction.
  • the meaning of the scheme is that after the second transaction is executed, the node of the first blockchain executes on the first transaction, and the block including the first transaction is obtained. A fifth transaction is then generated and a fifth transaction is executed to obtain a block including the fifth transaction.
  • the fifth transaction is confirmed as a trusted transaction.
  • the method for transmitting information provides a manner of acquiring a block including the first transaction different from the foregoing solution, that is, after satisfying the transaction condition of the first transaction, generating a new transaction, including the first transaction, The execution of the first transaction is achieved by obtaining a block of the new transaction.
  • the IoT device or the user equipment can interact with the node of the blockchain, that is, the IoT device or the user device can be the node of the first blockchain.
  • the node of the second blockchain sends a trigger message, triggering the node of the first blockchain or the node of the second blockchain to generate an associated transaction.
  • the following describes the transmission mode of the information provided by the present application by taking data sharing and device sharing as an example.
  • FIG. 8 is an interaction flowchart of the first embodiment of the data transmission method provided by the application in the data sharing process, as shown in FIG.
  • B pays A money, A provides data to B, and the goal is: When B actually gets the data, A actually receives the money.
  • the above data sharing process can be called AB event; Chain 1 records money transaction information between ABs, and blockchain 2 records data transaction information between ABs.
  • Step 1 A node of blockchain 1 (for example, node C) broadcasts transaction 1 (Transaction 1).
  • the transaction 1 is carried out with a transaction condition, wherein the transaction condition is: after the AB data transaction in the blockchain 2 is successfully completed, the transaction 1 of the blockchain 1 is executed.
  • the transaction 1 may be information that B pays A money.
  • Step 2 When B obtains the data provided by A, a certain node of the blockchain 2 (for example, node D) broadcasts a transaction 2 for notifying the data transaction between the ABs.
  • a certain node of the blockchain 2 for example, node D
  • the transaction 2 content may include at least one of the following: an identifier of A, an identifier of B, an identifier of a blockchain 1, an AB event identifier, a connection identifier, a type of shared data, and a shared data. Quantity, time, etc.
  • the AB event identifier is associated with at least two different blockchain transaction identifiers.
  • the AB event identifier is a common identifier for multiple events between multiple chains.
  • the AB event identifier is a common identifier used to identify behaviors or events or contracts between links.
  • the AB event identifier is a cross-chain identifier.
  • the AB event identifier can be other names such as an event identifier, a smart contract identifier, and the like.
  • connection identifier is an identifier within a chain that associates at least two transactions. At least two transactions within the same blockchain set a connection identifier dedicated to the transactions within the associated blockchain, associating transactions within the blockchain. In particular, for example, the event identifier is equated with the connection identifier, at least two transactions within the same blockchain, and the application is not limited thereto.
  • B obtains the data provided by A: the specific operation procedure of how specific B obtains the data, the scheme is not limited.
  • B can access the data server through the access account and password provided by A, and B can directly send the data to A.
  • step 3 the blockchain 2 node receives the transaction 2 broadcast by the node D.
  • the plurality of nodes of the blockchain 2 are based on a consensus algorithm in which a node obtains the right to generate a block, thereby generating a block containing the above transaction 2.
  • the blockchain 2 node may be: a node that generates a block containing transaction 2; or a node that generates an Mth block after the block containing transaction 2; or, the blockchain network is based on
  • Y nodes are elected among X nodes, and the Y nodes send notifications to the nodes of the blockchain 1.
  • the blockchain 2 network selects Y nodes from the X nodes based on the voting method.
  • the condition for triggering the transmission of the notification message is: when the block containing the transaction 2 is generated; or, when the block containing the transaction 2 is generated, the network of the block chain 2 generates the Mth block; or, the area A plurality of nodes of the block chain 2 may elect a node to be responsible for the broadcast trigger condition by an algorithm.
  • the block chain 2 node When the trigger condition is satisfied, the block chain 2 node notifies the node of the block chain 1, and the transaction 2 is completed.
  • Step 5 When transaction 2 is completed, transaction 1 cannot be revoked. (This step 5 is an optional step).
  • step 6 the node of blockchain 1 confirms that transaction 2 is written into the block of blockchain 2.
  • the node of the blockchain confirms that the transaction 2 is written into the block of the blockchain 2 according to the received notification message.
  • the node of the blockchain 1 After receiving the notification, the node of the blockchain 1 reads the content of the blockchain 2 into the blockchain 2, and confirms that the transaction 2 is written into the block of the blockchain 2 according to the AB event identifier.
  • Option3 After the node of the blockchain 1 receives the notification, some nodes in the blockchain 1 go to the blockchain 2 to read the contents of the blockchain 2, and according to the AB event identifier, confirm that the transaction 2 is written into the block. In the block of chain 2.
  • the certain nodes are K nodes elected by S network nodes in the blockchain 1.
  • Step 7 When the block depth of the transaction 2 in the blockchain 2 is greater than M (the integer is greater than or equal to 1), the node of the blockchain 1 generates a new transaction 3, and the transaction 3 is used to notify the AB event to execute. carry out.
  • This step 7 is an optional execution mode.
  • the node of the block chain 1 can directly acquire the block containing the transaction 1, and complete the execution of the transaction 1. This solution is not limited.
  • the transaction 3 includes: the identification of A, the identification of B, the identification of the AB event, the identification of the blockchain 2, the index + block ID of the transaction 2, and the conditional description (the transaction 2 with the AB event identifier of the blockchain 2 is completed) ), the index + block ID of transaction 1, and the amount of B to A.
  • step 8 the node of blockchain 1 receives, transaction 3, according to the consensus algorithm, wherein a node obtains the right to generate a block, thereby generating a block, the block containing the above transaction 3.
  • A After completing the above process, A can obtain the money paid by B, and realize the process of data sharing.
  • FIG. 9 is an interaction flowchart of the second embodiment of the data transmission method provided by the application in the data sharing process, as shown in FIG.
  • B pays A money
  • A provides data to B
  • the goal is: When B actually gets the data, A actually receives the money.
  • the above data sharing process can be called AB event; 1 Record the money transaction information between AB, and blockchain 2 records the data transaction information between AB.
  • Step 1 A node of blockchain 1 (for example, node C) broadcasts transaction 1 (Transaction 1).
  • the transaction 1 is conditional, wherein the transaction 1 of the blockchain 1 is completed after the condition satisfies the success of the AB data transaction in the blockchain 2.
  • the transaction 1 may be information that B pays A money.
  • the content of the transaction 1 includes: the identifier of the A, the identifier of the B, the identifier of the AB event, the identifier of the blockchain 2, and the condition description (the identifier of the block chain 2 with the AB event identifier)
  • B gives the amount of A.
  • Step 2 When B obtains the data provided by A, a node of blockchain 2 (for example, node D) broadcasts transaction 2, and transaction 2 is used to notify AB to perform data transaction.
  • a node of blockchain 2 for example, node D
  • transaction 2 is used to notify AB to perform data transaction.
  • the transaction 2 content may include: an identifier of A, an identifier of B, an identifier of a blockchain 1, an AB event identifier, an interaction data type, and a quantity of interaction data.
  • step 3 the blockchain 2 node receives the broadcast transaction 2. Based on a consensus algorithm, transaction 2 is written out of the block of blockchain 2.
  • Step 4 When transaction 2 is completed, transaction 1 cannot be revoked (optional step).
  • Step 5 The node of the blockchain 1 is informed that the transaction 2 is completed and is written into the blockchain 2 block.
  • Step 6 When the depth of the block 2 of the transaction 2 in the blockchain 2 is greater than M (the integer of M is greater than or equal to 1), the node C of the blockchain 1 generates a new transaction 3, and broadcasts the transaction 3 to the entire network node. .
  • the transaction 3 is used to notify the completion of the A-B event execution.
  • the transaction 3 may include: an identification of A, an identification of B, an identification of the AB event, an identification of the blockchain 2, an index of the transaction 2, a block ID, and a description of the condition (the transaction of the block 2 with the AB event identification 2) Complete), B gives the amount of A.
  • B gives the amount of A.
  • the node of the block chain 1 can directly acquire the block containing the transaction 1, and complete the execution of the transaction 1. This solution is not limited.
  • Step 7 other nodes of the blockchain 1 (for example, node D or node E), generate transaction 3, broadcast transaction 3, and the transaction 3 is used to notify the completion of the A-B event execution.
  • Step 8 When more than Y nodes (X is greater than or equal to Y) of the X nodes of the blockchain 1 generate transaction 3, then transaction 3 is considered a trusted transaction.
  • Step 9 The network node of the blockchain 1 receives the transaction 3. According to the consensus algorithm, a node obtains the right to generate a block, thereby generating a block, and the block includes the transaction 3.
  • FIG. 10 is an example 3 of the method for transmitting information provided by the present application in the data sharing process.
  • the data sharing process is: B pays A money, A provides data to B, and the goal is: When B actually gets the data, A actually receives the money.
  • the above data sharing process can Called AB event; where blockchain 1 records money transaction information between ABs, and blockchain 2 records data transaction information between ABs.
  • Step 1 A node of blockchain 1 (for example, node C) broadcasts transaction 1 (Transaction 1).
  • the content of the transaction 1 may include: an identifier of A, an identifier of B, an identifier of an AB event, an identifier of a blockchain 2, and a condition description (a block event of the blockchain 2) The identified transaction 2 is completed), the amount of B to A;
  • Step 2 After B obtains the data provided by A, a node of blockchain 2 (e.g., node D) broadcasts transaction 2, which is used to notify A-B of data transactions.
  • a node of blockchain 2 e.g., node D
  • broadcasts transaction 2 which is used to notify A-B of data transactions.
  • step 3 the blockchain 2 node receives the broadcast transaction 2. Based on a consensus algorithm, transaction 2 is written out of the block of blockchain 2.
  • Step 4 Connect the node (for example, the trusted node H, and then use the trusted node as an example to describe the scenario content.) Send a notification message to the blockchain 1 node, to notify the transaction 2 that the execution is completed.
  • the node for example, the trusted node H, and then use the trusted node as an example to describe the scenario content.
  • the notification message may include: a blockchain 2 identifier, a blockchain 1 identifier, an AB event identifier, a block ID where the transaction 2 is located, and an identifier of the transaction 2.
  • step 5 the node of the blockchain 1 receives the notification from the trusted node H, confirming that the transaction 2 is written into the block of the blockchain 2.
  • the node of the blockchain confirms that the transaction 2 is written into the block of the blockchain 2 according to the received notification message.
  • the node of the blockchain 1 After receiving the notification, the node of the blockchain 1 reads the content of the blockchain 2 into the blockchain 2, and confirms that the transaction 2 is written into the block of the blockchain 2 according to the AB event identifier.
  • Option3 After the node of the blockchain 1 receives the notification, some nodes in the blockchain 1 go to the blockchain 2 to read the contents of the blockchain 2, and according to the AB event identifier, confirm that the transaction 2 is written into the block. In the block of chain 2.
  • Step 6 When the depth of the block 2 of the transaction 2 in the blockchain 2 is greater than M (the integer of M is greater than or equal to 1), the node of the blockchain 1 generates a new transaction 3, and broadcasts the transaction 3 to the node of the entire network. The transaction 3 is used to notify the completion of the AB event execution.
  • Transaction 3 may include: identification of A, identification of B, identification of AB event, identification of blockchain 2, identification of transaction 2 and block ID, conditional description (transaction 2 of blockchain 2 with AB event identification) Complete), B gives the amount of A, the ID of the transaction 1 (index) and the block ID.
  • Step 7 the network node of the blockchain 1 receives the transaction 3, according to a consensus algorithm, wherein a certain node obtains the right to generate a block, thereby generating a block, the block containing the transaction 3.
  • the blockchain 1 receives the message of the blockchain 2, thereby causing the execution of the transaction 1 of the blockchain 1 to be completed, that is, the precondition for the completion of execution of a transaction X for a blockchain is another
  • the execution of a blockchain transaction Y is completed, providing a solution to achieve cross-chain interaction. Avoid different types of transactions in one chain, resulting in large network complexity and heavy load. Implementing different functions in different chains helps network layering and scalability, greatly optimizing the network structure and reducing the network burden.
  • B is a data or a device sharing requester
  • A is a data or device sharing provider, that is, a data sharing scenario.
  • the foregoing technology may also be used for device sharing.
  • the solution is implemented. The following describes the solution for the device sharing scenario.
  • FIG. 11 is a schematic diagram of an application scenario of device sharing provided by the present application.
  • a shared revenue blockchain and a device shared blockchain, wherein nodes in the device shared blockchain can be connected to different shareable devices, for example, a car, Terminal equipment, electrical equipment, parking spaces, etc., shared revenue blockchain for processing revenue issues in the device sharing process.
  • Blockchain 1 is the first blockchain.
  • blockchain 1 is the shared revenue blockchain.
  • the blockchain 2 is the second blockchain.
  • the blockchain 2 is a device shared blockchain
  • Client B is a shared device requester, or client B is embodied as a user equipment (User Equipment);
  • the shared device smart lock A is a special case of the Internet of Things device in this embodiment, so as to illustrate the contents of the invention.
  • transaction 1 is the first transaction
  • transaction 2 is the second transaction, and so on, and so on.
  • FIG. 12 is an interaction flowchart of an example 4 in which a method for transmitting information provided by the present application is applied in a data sharing process.
  • client B shared device requester
  • client B shared device requester
  • Step 1 The client obtains information about devices that can be used from the blockchain platform, views related attributes or information of the device, and then selects a suitable device that can be used. (optional)
  • Step 2 The client sends a device use request message to the blockchain 2 (for example, the device shared blockchain) node, where the request message includes the identifier of the device to be used, and requests the identity information of the user who uses the device.
  • the unlocking request message may also include a part of the agreed object currency to be locked, and the solution is not limited.
  • Step 3 After receiving the device use request message sent by the client, the node 2 node broadcasts the device use request message in the blockchain network (ie, broadcast transaction 0, the transaction 0 is the first zero in the foregoing embodiment. transaction).
  • the device usage request message (transaction 0) may include: an AB event identifier, an identifier of A, an identifier of B, and a transaction start time (which may also be a smart lock recorded in the request message by the transaction start time).
  • Step 4 The blockchain 2 network performs consensus authentication on the device usage request message broadcast by the blockchain node.
  • Step 5 After the blockchain 2 node 1 confirms that the consensus authentication is completed, the blockchain 2 node 1 sends a payment amount notification message to the client.
  • the payment amount notification includes at least the amount, the public key of the smart lock owner.
  • step 6 node 1 of blockchain 1 receives the client payment smart lock transaction message.
  • Step 7 The AB revenue transaction message broadcasted by the blockchain 1 network to the blockchain node (ie, broadcast transaction 1, which is the first transaction in the foregoing scheme).
  • the AB revenue transaction message includes an AB event ID, and a transaction condition.
  • the condition for completing the transaction is the unlock confirmation, that is, the smart lock A in the blockchain 2 unlocks the shared device requester B (transaction 2, that is, the second transaction in the foregoing scheme), then all of the smart lock A or the smart lock A The person receives the payment of the shared device request B, that is, the transaction 1 is completed].
  • step 8 the blockchain 1 node performs consensus authentication on the AB revenue transaction message. That is, the blockchain 1 node is based on a consensus algorithm, in which one node wins the generated block right, and a block is generated, the block containing the transaction 1.
  • Step 10 After receiving the AB revenue transaction notification, the blockchain 2 node 1 provides an unlock password or a key to the client.
  • Step 12 After the smart lock is opened, the blockchain smart lock returns an unlocking completion feedback message to the blockchain node 1, and the unlocking completion feedback message includes the unlocking confirmation time information.
  • Step 13 After receiving the unlocking completion feedback message, the block chain 2 node 1 broadcasts an unlocking confirmation message (broadcast transaction 2, the transaction 2, that is, the second transaction in the foregoing embodiment) in the blockchain network to perform the blockchain. Consensus certification.
  • the unlock confirmation message includes an AB event ID.
  • step 14 the blockchain network performs consensus authentication on the unlock confirmation message (transaction 2).
  • Step 16 After receiving the unlocking authentication completion indication message, the node 1 node 1 of the block chain broadcasts the AB revenue confirmation message (ie, the third transaction in the foregoing scheme) in the blockchain 1.
  • the message includes an AB event ID, a block number and a transaction index where the unlock confirmation message is located, a block number where the AB revenue transaction is located, and a transaction index (also referred to as a transaction identifier).
  • step 17 the blockchain 1 network performs blockchain consensus authentication on the AB revenue transaction confirmation message.
  • step 18 the client confirms that the transaction can be ended, and a lock indication message occurs; the client sends the lock indication information to the smart lock.
  • step 19 the smart lock closes the lock and sends a lock confirmation message to the block chain 2 node 1.
  • Step 22 After confirming that the consensus authentication is completed, the node 2 node sends a lock completion indication message to the client to indicate that the blockchain smart lock is closed.
  • the unlock confirmation message sent after the completion of the transaction 2 triggers the process of the transaction 3, which does not conflict with the generation of the fourth transaction execution in the foregoing scenario
  • the meaning of the scheme is that two In the blockchain, the execution of a transaction in one blockchain can trigger the generation of a new transaction on another blockchain.
  • the first transaction is not limited.
  • FIG. 13 is an interaction flowchart of an example 5 of the method for transmitting information provided by the present application in the data sharing process.
  • the scenario of the example shown in FIG. 13 is similar to FIG. 12: the client B requests to use the sharing.
  • the device intelligently locks A and is assisted by client B to unlock the device.
  • the specific implementation steps of the solution are as follows:
  • Step 5 After the smart lock is opened, the smart lock returns an unlocking completion feedback message to the blockchain 2 node 1, and the unlocking completion feedback message includes the unlocking confirmation time information.
  • step 7 the blockchain 2 network performs consensus authentication on the unlock notification message (transaction 2).
  • “consensus authentication for a transaction” is a plurality of nodes (at least 2 nodes) in a network in a blockchain, wherein a node obtains the right to generate a block, and the transaction is included in the block to generate Block.
  • the blockchain 2 network performs consensus authentication on the unlocking confirmation message (transaction 2), that is, the blockchain 2 network node, in which a certain node obtains the block right including the transaction 2, and generates the block containing the transaction 2.
  • the block may contain other transactions in addition to the transaction 2, and is not limited herein. Applicable to all embodiments of the present application, not to be repeated.
  • the block chain 2 node 1 sends an unlocking authentication completion indication (ie, the first trigger message in the foregoing scheme) to the blockchain 1 node after confirming that the consensus authentication is completed.
  • the unlocking completion completion instruction includes an AB event ID, an indication of the blockchain 1, an identifier of the blockchain 2, a block number in which the unlock confirmation message (transaction 2) is located, and a transaction index.
  • the blockchain 1 node confirms that the unlock confirmation message (transaction 2) is in the blockchain 2 block (specifically, for example, the blockchain 1 node reads the blockchain 2 network information, thereby confirming the unlock confirmation The message (transaction 2) is in the blockchain 2 block).
  • Step 9 The blockchain 1 server confirms that the unlock confirmation message is in the blockchain 2 block (for example, the blockchain 1 server reads the blockchain 2 network information).
  • the transaction 1 is irrevocable after the transaction 2 is generated.
  • Step 10 The AB revenue transaction message broadcasted by the blockchain 1 network to the blockchain 1 node (i.e., broadcast transaction 1, which is the first transaction in the foregoing embodiment).
  • the AB revenue transaction message (ie, transaction 1) contains the AB event ID, and the transaction condition.
  • the condition for completing the transaction is that after receiving the lock confirmation, A receives the B money, that is, the transaction 1 is completed, or the condition for completing the transaction is: A in the blockchain 2 unlocks B (transaction 2, that is, the second in the foregoing scheme) Transaction) and lock (transaction 4, the fourth transaction in the aforementioned scheme), then A receives B money and transaction 1 is completed.
  • step 11 the blockchain 1 node performs consensus authentication on the AB revenue transaction message (ie, transaction 1). Specifically, the blockchain 1 node is based on a consensus algorithm, in which one node wins the generated block right, and a block is generated, the block containing the transaction 1.
  • step 12 the client confirms that the transaction can be ended, and a lock indication message occurs; the client sends the lock indication information to the smart lock.
  • step 13 the smart lock closes the lock and sends a lock confirmation message (transaction 4) to the blockchain 2 node (for example, node 1).
  • Step 14 After receiving the lock indication message returned by the smart lock, the node 2 node 1 packs the lock confirmation message returned by the client in step 12 as a lock transaction.
  • the lock confirmation message includes the device identifier, the user identity information, and the height information of the block where the associated unlock confirmation message is located (to facilitate the future transaction query operation, the area where the switch lock transaction can be quickly associated) Piece).
  • step 15 blockchain 2 node 1 broadcasts the lock confirmation message (transaction 4) in blockchain 2, including the AB event ID, the block in which transaction 4 is located, and the transaction index.
  • step 16 the blockchain 2 network node performs blockchain authentication on the lock confirmation message (transaction 4).
  • Step 17 the block chain 2 node 1 confirms the lock confirmation message (transaction 4), and after the blockchain network completes the consensus authentication, sends a lock authentication completion indication message (third trigger message) to the blockchain 1 node, To indicate that the blockchain 1 smart lock has been locked.
  • the lockout authentication completion indication message (third trigger message) that is, the blockchain 2 node notifies the node of the blockchain 1 that the execution of the transaction 4 is completed, which may include an AB event ID, a lock confirmation message (transaction 4) ), the block number and trading index.
  • the authentication completion indication message may include the block height information in which the unlock confirmation message is located.
  • the blockchain 1 node can confirm that the transaction 4 is in the block of the blockchain 2 by reading the contents of the blockchain 2.
  • Step 18 broadcast transaction 3. That is, the block chain 1 node 1 receives the lock-up authentication completion indication message (the third trigger message), and then broadcasts the AB revenue confirmation message (transaction 3, that is, the third transaction in the foregoing scheme) in the blockchain 1.
  • the message includes the AB event ID, the block number and the transaction index where the lock confirmation message is located, the block number and the transaction index where the AB revenue transaction is located.
  • step 19 the blockchain 1 network performs blockchain consensus authentication on the AB revenue transaction confirmation message (transaction 3).
  • Step 20 After confirming that the consensus authentication is completed, the blockchain 1 node sends the lock transaction information to the client, where the information includes the amount paid by using the smart lock.
  • a blockchain platform may also be included for generating transaction information, and information of each transaction may also be displayed.
  • FIG. 14 is an interaction flowchart of an example 6 of the method for transmitting information provided by the present application in a data sharing process.
  • the scenario of the example shown in FIG. 14 is: the client B requests to use the shared device smart lock A.
  • the network node assists in unlocking, the specific implementation steps of the solution are:
  • Step 1 The client obtains information about devices that can be used from the blockchain platform, views related attributes or information of the device, and then selects a suitable device that can be used.
  • Step 2 The client sends a device use request message to the block chain 2 node 1, and the device uses the identifier of the device to be used in the request message to request the identity information of the user who uses the device.
  • a part of the agreed object currency to be locked may also be included in the unlock request message.
  • Step 3 After receiving the device use request message sent by the client, the node 2 node 1 broadcasts the device use request message in the blockchain network for consensus authentication (broadcast transaction 0).
  • the device usage request message (transaction 0, ie, the zeroth transaction in the foregoing scheme) may include: an AB event identifier, an identifier of A, an identifier of B, and a transaction start time (may also be a smart lock, the transaction start time records the request) In the message).
  • Step 4 The blockchain 2 network performs consensus authentication on the device usage request message broadcast by the blockchain node.
  • Step 5 After confirming that the consensus authentication is completed, the node 2 node 1 sends a payment amount notification message to the smart lock.
  • Step 6 Node 1 of the blockchain 1 receives the payment message, and the message includes the amount of the client payment smart lock.
  • Step 7 The AB revenue transaction message broadcasted by the blockchain 1 network to the blockchain 1 node (broadcast transaction 1, the transaction 1 is the first transaction in the foregoing scheme).
  • the AB revenue transaction message includes an AB event ID, and the condition for completing the transaction is an unlock confirmation, and the amount of the B payment A may further include at least one of the following: an identifier of A, an identifier of B, and a connection identifier 1.
  • Step 8 the blockchain 1 node performs consensus authentication on the AB revenue transaction message.
  • step 9 the block chain 1 node 1 informs the block chain 2 node AB of the transaction transaction (ie, the second trigger message in the foregoing scheme) after confirming that the consensus authentication is completed.
  • the notification message includes an AB event ID, a block number where the AB revenue transaction is located, and a transaction index.
  • Step 10 After receiving the notification of the AB revenue transaction, the node 2 node 1 sends an unlocking indication message to the smart lock, where the unlocking indication message includes information included in the device usage request message sent by the client, for example, to be used. Device identification, user identity information, etc.
  • step 11 the smart lock returns an unlocking completion feedback message to the blockchain 2 node 1, and the unlocking completion feedback message includes the unlocking confirmation time information.
  • Step 12 After receiving the unlocking completion feedback message, the block chain 2 node 1 broadcasts an unlocking confirmation message (broadcast transaction 2, the second transaction in the foregoing scheme) in the blockchain 2 network.
  • the unlocking confirmation message includes an AB event ID.
  • the at least one of the following may be included: an identifier of A, an identifier of B, and a connection identifier 1.
  • Step 14 the block chain 2 node 1 sends an unlocking completion completion indication message to the smart lock after confirming the unlocking confirmation message after the blockchain 2 network completes the consensus authentication, to instruct the smart lock to unlock.
  • the authentication completion indication message may include the block height information in which the unlock confirmation message is located.
  • the block chain 2 node 1 sends an unlocking completion completion indication message to the client after confirming that the unlocking confirmation message completes the consensus authentication in the blockchain.
  • the unlocking completion indication message may include the block height information of the block where the unlocking confirmation message is located.
  • step 16 the blockchain 2 node sends an unlock acknowledgement notification message (ie, the third trigger message in the foregoing scheme) to the blockchain 1 node.
  • the unlock confirmation message includes the AB event ID, the block where the unlock confirmation message is located, and the transaction index.
  • Step B After receiving the unlock confirmation notification message, the blockchain 1 node reads the contents of the blockchain 2 and confirms that the blockchain 2 transaction 2 content exists.
  • Step 17 after receiving the block 1 node 1, the AB revenue confirmation message (transaction 3, that is, the third transaction of the foregoing scheme) is broadcasted to the blockchain 1, and the message includes the area where the blockchain 2 unlock confirmation message is located.
  • Transaction 3 that is, the third transaction of the foregoing scheme
  • the message includes the area where the blockchain 2 unlock confirmation message is located.
  • step 18 the blockchain 1 network performs consensus authentication on the AB revenue transaction confirmation message.
  • step 19 the client confirms that the transaction can be ended and a lock indication message occurs.
  • Step 20 After receiving the lock indication information of the client, the node 2 node 1 sends a lock indication message to the smart lock.
  • Step 21 After receiving the lock indication information sent by the blockchain node 1, the smart lock sends a lock confirmation message to the block chain 2 node 1.
  • Step 22 after receiving the lock indication message returned by the smart lock, the node 2 node 1 packages the lock indication indication message sent by the client in step 19 and the lock confirmation message returned by the step 21 smart lock as A lock transaction indication message (transaction 4), consensus authentication on the blockchain platform.
  • the lock indication message includes the device identifier, the user identity information, and the height information of the block where the associated unlock indication message is located (to facilitate the future transaction query operation, the area where the switch lock transaction can be quickly associated) Piece).
  • step 23 the blockchain 2 node sends a lock confirmation notification (the fourth trigger message) to the blockchain 1 node.
  • step 24 the blockchain 1 node broadcasts a lock confirmation notification (transaction 5).
  • step 25 the blockchain 2 network performs consensus authentication on the unlock confirmation message.
  • step 26 the blockchain 2 network node performs blockchain authentication on the lock transaction.
  • step 28 at the same time, the block chain 2 node 1 sends a lock completion indication to the client.
  • FIG. 15 is an interaction flowchart of an example 7 of the method for transmitting information provided by the present application in a data sharing process.
  • the scenario of the example shown in FIG. 15 is: the client B requests to use the shared device smart lock A.
  • the network node assists in unlocking, the specific implementation steps of the solution are:
  • Step 1 The client obtains information about devices that can be used from the blockchain 2 platform, checks related attributes or information of the device, and then selects a suitable device that can be used;
  • Step 2 The client sends a device use request message to the blockchain 2 node (for example, node 1), and the device uses the identifier of the device to be used in the request message to request the identity information of the user who uses the device.
  • a part of the agreed object currency to be locked may also be included in the unlock request message.
  • Step 3 The node 2 node 1 sends an unlock command message to the smart lock, where the unlock indication message includes information included in the device use request message sent by the client, such as an unlock password or a key, a device identifier to be used, or User identity information, etc.
  • Step 4 After the smart lock is opened, the blockchain smart lock returns the unlocking completion feedback message to the blockchain 2 node 1.
  • the unlocking completion feedback message includes the unlocking confirmation time information.
  • Step 5 The blockchain smart lock sends an unlocking completion indication to the client node to the blockchain 2 node 1. (optional)
  • Step 6 After receiving the unlocking completion feedback message, the blockchain 2 node 1 broadcasts an unlocking confirmation message (transaction 2, that is, the foregoing second transaction) in the blockchain network to perform blockchain consensus authentication.
  • the unlock confirmation message includes an AB event ID.
  • step 7 the blockchain 2 network performs consensus authentication on the unlocking confirmation message.
  • step 8 the block chain 2 node 1 sends an unlock notification message to the blockchain 1 node after confirming that the consensus authentication is completed.
  • the notification message includes an AB event ID, a block number where the AB revenue transaction is located, and a transaction index.
  • step 9 the blockchain 1 node confirms that the notification message is in the blockchain 2 block (for example, the blockchain 1 node reads the blockchain 2 network information).
  • Step 12 the client confirms that the transaction can be ended, and a lock indication message occurs; the client sends a lock indication message to the blockchain 2 node.
  • step 13 the blockchain 2 node (e.g., node 1) sends a lock indication message to the smart lock.
  • step 14 the smart lock closes the lock and sends a lock confirmation message to the client.
  • step 15 the smart lock closes the lock and sends a lock confirmation message to the block chain 2 node 1.
  • Step 16 After receiving the lock confirmation message returned by the smart lock, the node 2 node 1 packs the lock confirmation message that the client can lock back in step 15 into a lock transaction.
  • the lock confirmation message includes the device identifier, the user identity information, and the height information of the block where the associated unlock confirmation message is located (to facilitate the transaction query operation in the future, the switch can be quickly associated with the switch lock transaction. Block).
  • Step 17 blockchain 2 node 1 broadcasts the lock confirmation message (transaction 4, the fourth transaction in the foregoing scheme) in blockchain 2.
  • Step 18 The blockchain 2 network node performs blockchain authentication on the lock confirmation message.
  • the blockchain 2 node (e.g., node 1) sends a lockout authentication completion indication message (i.e., a third trigger message) to the blockchain 1 node to notify that the blockchain smart lock has been locked.
  • a lockout authentication completion indication message i.e., a third trigger message
  • the authentication completion indication message may include the block height information in which the lock confirmation message is located.
  • step 20 the blockchain 1 node confirms that the block of the transaction 4 blockchain 2 (the e.g node reads the content of the blockchain 2).
  • Step 21 After receiving the lockout authentication completion indication message, the blockchain 1 node (for example, node 1) broadcasts an AB revenue confirmation message (transaction 3, that is, the third transaction in the foregoing scheme) in the blockchain 1.
  • the message includes the AB event ID, the block where the lock confirmation message is located and the transaction index, the block number where the AB revenue transaction is located, and the transaction index.
  • step 21 the blockchain 1 network performs blockchain consensus authentication on the AB revenue transaction confirmation message.
  • a transaction in the present application may be information, may be data, and may be in the form of a message or the like.
  • a transaction is information used by a recording device, such as a money transaction spent using a device, such as a transaction being a message notifying that the device is turned off.
  • the “transaction” in the present application may include at least one of the following: an identifier of the first blockchain, a connection identifier, an identifier of the second blockchain, an identifier of the second blockchain, an identifier of the second transaction, and a second The identifier of the block where the transaction is located, the service identifier, the type of data, the amount of data, and so on.
  • the "transaction" may include one of the following: a public key, an address, a device identification, a data identification, a payment amount, and the like.
  • the public key may be a public key of the parties to the transaction
  • the address may be an address of the parties to the transaction or an address of the device.
  • the “trigger message” may optionally include at least one of the following: an event identifier, a connection identifier, an identifier of the first blockchain, an identifier of the second blockchain, and the first The identifier of the transaction, the identifier of the block in which the first transaction is located, the identifier of the second transaction, the identification of the block in which the second transaction is located, the service identification, the type of data, and the number of data.
  • the event identifier may be, for example, a first event identifier or a second event identifier.
  • the connection identifier may be a first connection identifier or a second connection identifier.
  • the "event identification" in this application is used to associate transactions for at least two different blockchains, or the event identification is an identification associated with at least two different blockchain transactions.
  • An event identifier is a common identifier between multiple chains for an event. Event identifiers are common identifiers used to identify behaviors or events or contracts between links.
  • the event identifier is a cross-chain identifier.
  • the event identifier may be called another name such as a task identifier, a cross-chain identifier, or a smart contract identifier, etc., and the application does not impose any restrictions.
  • the present application uses the event identifier to describe the content of the scheme.
  • the “event identifier” is identified by the blockchain, the block identifier of the transaction, and the identifier of the transaction are jointly composed.
  • the event identifier may be identified by the blockchain X and the blockchain Y identifier.
  • the blockchain X is 000
  • the blockchain Y identifier is 111.
  • the event identifier may be a blockchain X mark + a blockchain Y mark + a supplementary mark, that is, 001000111001.
  • the event identifier may be a first event identifier, a second event identifier, or the like.
  • the first event identifier in particular the first event identifier, is composed of a second blockchain, a block in which the second transaction is located, and an identifier of the second transaction.
  • connection identifier is used to associate at least two transactions of the same blockchain, or the connection identifiers are used to associate different transactions of the same blockchain.
  • At least two transactions within the same blockchain set a connection identifier dedicated to the transactions within the associated blockchain, associating transactions within the blockchain.
  • the transactions associated with the same blockchain are identified by connection identifiers, which are related transactions.
  • these transactions are information records of different processes of the same business, for example, B shares the device (lock) with A
  • the transaction y of the blockchain Z is the unlock record
  • the x transaction of the blockchain Z is the lock transaction.
  • the transaction is a related transaction.
  • FIG. 16 is a schematic structural diagram of Embodiment 1 of an information transmission apparatus provided by the present application. As shown in FIG. 16, the information transmission apparatus 10 includes:
  • the sending module 11 is configured to send a first transaction to another node in the first blockchain to which the information transmission device belongs; the first transaction includes a first event identifier and a transaction condition; and the first event identifier is used by Correlating the second transaction in the first transaction and the second blockchain; the transaction condition includes: performing the first after the second transaction including the first event identifier in the second blockchain is completed The first transaction of the blockchain;
  • the processing module 12 is configured to acquire a block that includes the first transaction when it is determined that the transaction condition is met.
  • the processing module 12 is specifically configured to generate, in the first blockchain, a block that includes the first transaction;
  • processing module 12 is specifically configured to:
  • the receiving module 13 is further configured to receive a notification message, where the notification message is used to notify that the second transaction is performed.
  • the processing module is further configured to determine, according to the notification message, that the block in the second blockchain includes the second transaction.
  • the receiving module 13 is specifically configured to:
  • connection node is configured to connect the first blockchain and the second blockchain.
  • processing module 12 is specifically configured to:
  • the receiving module 13 is configured to receive a first trigger message, where the first trigger message is used to trigger a node of the first blockchain to generate the first transaction.
  • the processing module 12 is further configured to generate the first transaction according to the first trigger message.
  • the processing module 12 is configured to generate the third transaction according to the third trigger message
  • the receiving module 13 is configured to receive a third transaction sent by another node of the first blockchain;
  • the third transaction includes a first connection identifier, and the first connection identifier is used to associate at least two transactions in the first blockchain.
  • the transmission device 10 of the information provided by any of the foregoing implementations is used to implement the technical solution of the first blockchain node in the foregoing method embodiment, and the implementation principle and technical effects are similar, and details are not described herein again.
  • FIG. 18 is a schematic structural diagram of Embodiment 3 of the information transmission apparatus provided by the present application. As shown in FIG. 18, the information transmission apparatus 20 includes:
  • a sending module 21 configured to send a second transaction to another node in the second blockchain to which the transmitting device of the information belongs;
  • the second transaction includes a second connection identifier and/or a first event identifier;
  • the second connection identifier is configured to associate at least two transactions in the second blockchain, the first event identifier being used to associate the second transaction with a first transaction in a first blockchain;
  • the processing module 22 is configured to acquire a block that includes the second transaction.
  • the information transmission device 20 of the present embodiment is used to implement the technical solution of the second blockchain node in the foregoing method embodiment, and the implementation principle and technical effects are similar, and details are not described herein again.
  • FIG 19 is a schematic structural diagram of Embodiment 4 of the information transmission apparatus provided by the present application. As shown in Figure 19, the information transmission apparatus 20 further includes: a receiving module 23;
  • the processing module 22 is specifically configured to generate, in the second blockchain, a block that includes the second transaction;
  • the receiving module 23 is configured to receive a block that is sent by another node of the second blockchain and that includes the second transaction.
  • the sending module 21 is further configured to send a notification message to at least one node in the first blockchain, where the notification message is used to notify that the second transaction is performed. .
  • the sending module 21 is specifically configured to:
  • the notification message is used to notify the completion of the second transaction execution.
  • the sending module 21 is further configured to send, to the at least one node of the first blockchain, a first trigger message, where the first trigger message is used to trigger a node generation of the first blockchain. Said the first transaction.
  • the receiving module 23 is further configured to receive the sent second trigger message, where the second trigger message is used to trigger the node of the second blockchain to generate the second transaction.
  • the sending module 21 is further configured to send a transaction message to the device according to the second trigger message, where the transaction message is used to instruct the device to perform an operation and content notified in the transaction message;
  • the receiving module 23 is further configured to receive a feedback message returned by the device
  • processing module 22 is further configured to generate a fourth transaction.
  • the sending module 21 is further configured to send the fourth transaction to another node in the second blockchain;
  • the fourth transaction includes: a second connection identifier; and the second connection identifier is used to associate the a fourth transaction and the second transaction;
  • the processing module 22 is further configured to acquire a block that includes the fourth transaction.
  • the sending module 21 is further configured to:
  • the third trigger message is used to trigger a node of the first blockchain to generate a third transaction; the third trigger message includes a second event identifier, and the second event identifier is used to associate the first transaction.
  • the transmission device 20 of the information provided by any of the foregoing implementations is used to implement the technical solution of the second blockchain node in the foregoing method embodiment, and the implementation principle and technical effects are similar, and details are not described herein again.
  • FIG. 20 is a schematic structural diagram of Embodiment 5 of the information transmission apparatus provided by the present application. As shown in FIG. 20, the information transmission apparatus 30 includes:
  • the sending module 31 is configured to send a trigger message to the node of the first blockchain or the node of the second blockchain; the trigger message is used to trigger a node of the blockchain to generate a transaction.
  • FIG 21 is a schematic structural diagram of Embodiment 6 of the information transmission apparatus provided by the present application.
  • the information transmission apparatus 40 includes:
  • the receiving module 41 is configured to receive a transaction message sent by a node of the first blockchain or a node of the second blockchain;
  • the information transmission device 40 further includes:
  • the processing module 43 is configured to execute the operation or content indicated in the transaction message.
  • the information transmission devices 30 and 40 shown in FIG. 20 and FIG. 21 are used to implement the technical solutions of the user equipment or the Internet of Things device involved in any of the foregoing method embodiments, for example, performing mobile phone, computer or shared car, sharing.
  • the technical scheme of the computer such as the data, the implementation principle and the technical effect are similar to the foregoing, and the present scheme is not limited.
  • the present application also provides a node device, including: a memory, a processor, a transmitter, a receiver, and a computer program, wherein the computer program is stored in the memory, and the processor runs the computer program to execute the foregoing method embodiment A method of transmitting information of nodes in a middle block chain.
  • the number of processors is at least one, and is used to execute an execution instruction of the memory storage, that is, a computer program.
  • the method for transmitting the information provided by the foregoing various embodiments is performed by performing a data interaction between the node device and the other node device, the node device of the other blockchain, the Internet of things device, or the user device through the communication interface, optionally, the memory It can also be integrated inside the processor.
  • the application also provides a user equipment comprising: a memory, a processor, a transmitter, a receiver, and a computer program, the computer program being stored in the memory, the processor running the computer program to perform any of the foregoing implementations
  • User equipment in the scheme a method of transmitting information such as a mobile phone.
  • the application also provides an Internet of Things device, comprising: a memory, a processor, a transmitter, a receiver, and a computer program, wherein the computer program is stored in the memory, and the processor runs the computer program to perform any of the foregoing A method of transmitting information of an Internet of Things device in a solution.
  • the present application also provides a storage medium comprising: a readable storage medium and a computer program for implementing a method of transmitting information of a blockchain node in any of the foregoing embodiments.
  • the present application further provides a storage medium comprising: a readable storage medium and a computer program for implementing a method for transmitting information of an Internet of Things device or a user device in any of the foregoing embodiments.
  • the application also provides a program product comprising a computer program (ie, an execution instruction) stored in a readable storage medium.
  • a computer program ie, an execution instruction
  • At least one processor of the node device of the blockchain can read the computer program from a readable storage medium, and the at least one processor executes the computer program such that the node device implements the method of transmitting the information provided by the various embodiments described above.
  • the application also provides a program product comprising a computer program (ie, an execution instruction) stored in a readable storage medium.
  • a computer program ie, an execution instruction
  • At least one processor of the Internet of Things device or user device can read the computer program from a readable storage medium, and the at least one processor executes the computer program to cause the IoT device or the user device to implement the method for transmitting information provided by the various embodiments described above .
  • All or part of the steps of implementing the above method embodiments may be performed by hardware associated with the program instructions.
  • the aforementioned program can be stored in a readable memory.
  • the steps including the foregoing method embodiments are performed; and the foregoing memory (storage medium) includes: read-only memory (English: read-only memory, abbreviation: ROM), RAM, flash memory, hard disk, Solid state drive, magnetic tape (English: magnetic tape), floppy disk (English: floppy disk), optical disc (English: optical disc) and any combination thereof.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • General Business, Economics & Management (AREA)
  • Computing Systems (AREA)
  • Multimedia (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本申请提供一种信息的传输方法、装置和系统,该方法应用于区块链中的节点,包括:向第一区块链中的其他节点发送第一交易;第一交易包括第一事件标识和交易条件;第一事件标识用于关联第一交易和其他区块链中的交易,例如第二区块链中的第二交易;交易条件包括:第二区块链中标识为第一事件标识的第二交易完成后,执行第一区块链的第一交易,在确定满足交易条件时,获取包含第一交易的区块。即再确认第二交易执行完成,满足交易条件后将第一交易执行完成,实现多个物联网之间的跨链交互。

Description

信息的传输方法、装置和系统
本申请要求于2017年6月28日提交中国专利局、申请号为201710503177.7、申请名称为“信息的传输方法、装置和系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信技术,尤其涉及一种信息的传输方法、装置和系统。
背景技术
物联网作为互联网基础上延伸和扩展的网络,通过应用智能感知、识别技术与普适计算等计算机技术,实现信息交换和通信,同样能满足区块链系统的部署和运营要求。随着物联网中设备数量的增长,如果以传统的中心化网络模式进行管理,将带来巨大的数据中心基础设施建设投入及维护投入。此外,基于中心化的网络模式也会存在安全隐患。区块链的去中心化特性为物联网的自我治理提供了方法,可以帮助物联网中的设备理解彼此,并让物联网中的设备知道不同设备之间的关系,实现对分布式物联网的去中心化控制。如果将区块链技术应用于智能家居中,区块链智能家居相关的生活设备可以自主完成相关的交易,例如家里洗衣机可以自动购买洗衣液,完成交易过程。
区块链是由包含交易信息的区块有序链接起来的数据结构。目前区块链是单链,实现单一的功能,例如比特币区块链实现比特币支付功能,数据存储区块链实现数据的存储和防篡改功能。
然而,未来的物联网络中,会出现多链共存的情况,并且不同的链实现不同的功能,会出现多链交互的场景。多个区块链的物联网架构下,基于一个区块链交易完成的前提下,如何实现另外一个区块链某个交易的执行完成?如何实现两个区块链之间跨链交互成为亟待解决的问题。
发明内容
本申请提供一种信息的传输方法、装置和系统,用于在多个区块链的物联网架构下,基于一个区块链交易完成的前提下,实现两个区块链之间跨链交互。
第一方面,本申请提供一种信息的传输方法,应用于第一区块链中的节点,所述方法包括:
向所述第一区块链中的其他节点发送第一交易;所述第一交易包括第一事件标识和交易条件;所述第一事件标识用于关联所述第一交易和第二区块链中的第二交易;所述交易条件包括:第二区块链中包含所述第一事件标识的第二交易完成后,执行所述第一区块链的第一交易;
在确定满足所述交易条件时,获取包含所述第一交易的区块。
可选的,还可以提供一种信息的传输方法,应用于区块链的节点,包括:
向区块链中的其他节点发送交易;所述交易包括事件标识和交易条件;所述事件标识用于关联至少两个不同区块链中的交易;根据所述交易条件执行本区块链的所述交易;
获取包含所述交易的区块。
在该方案的一种具体实现中,所述根据所述交易条件执行本区块链的所述交易,包括:
根据所述交易条件,当至少一个其他区块链中的交易完成后,才执行本区块链的所述交易;
除上述方案之外,还可以提供一种信息的传输方法,应用于区块链的节点,包括:
接收到交易;所述交易包括事件标识和交易条件;所述事件标识用于关联至少两个不同区块链中的交易;根据所述交易条件执行本区块链的所述交易;
在确定满足所述交易条件时,获取包含所述交易的区块。
全文说明:本申请中提到的“交易”(transaction),可以是信息,可以是数据,可以是消息等形式不限。例如交易是记录设备使用的信息,例如是使用设备所花费的金钱交易,例如交易是一个通知关闭设备的消息。
未来网络业务多样,一个区块链无法承担所有业务,提供所有的服务支持。由此未来的区块链,不同区块链负责不同的业务,多个区块链共存,跨链是一种常态。如何实现跨链是需要解决的问题,本申请提供了跨链的解决方案,为多链共存提供了可能。通过上述几个信息的传输方法的方案,当区块链的交易执行后,能够触发另外一个区块链的相关交易执行;或者通过收到触发消息或者通知消息,使得该区块链获知本区块链的交易的交易条件满足,由此使得该区块链产生交易。由此实现了至少两个区块链间相关交易的执行。
在上述几个方案的基础上,信息的传输方法的具体实现中(以第一区块链和第二区块链为例),还包括以下一些具体实现方式:
一种具体实现方式中,所述获取包含所述第一交易的区块,包括:
在所述第一区块链中生成包含所述第一交易的区块;
或者,
接收所述第一区块链中的其他至少一个节点发送的包含所述第一交易的区块。
在该方案中,应理解该区块中除了包含第一交易,还可以包含其他交易。
在第一方面的一种具体实现中,确定满足所述交易条件,包括:
确定所述第二区块链的区块中包含所述第二交易,则满足所述第一交易的所述交易条件。
在第一方面的一种具体实现中,所述确定所述第二区块链的区块中包含所述第二交易,包括:
接收通知消息;所述通知消息用于通知所述第二交易执行完成;
根据所述通知消息确定所述第二区块链中的区块包含所述第二交易。
在该方案的具体实现中,在多个区块链存在共享节点时,例如第一区块链和第二区块链共用了一个,该通知消息可以是同一个节点内的第二区块链单元发送给第一区块链单元的,第一区块链单元根据通知消息确定第二区块链单元中包含第二交易。在满足特定条件 或情况下,区块链节点获得了通知消息,从而使得区块链节点确认可以发起一个交易。
可选的,所述接收通知消息,包括:
接收至少一个第二区块链中的节点发送的通知消息;
或者,
接收第二区块链中生成包含所述第二交易的区块的节点发送的通知消息;
或者,
接收连接节点发送的通知消息;所述连接节点用于连接所述第一区块链与所述第二区块链。
可选的,所述通知消息包括以下至少一项:
所述第一事件标识,所述第二区块链的标识,第二交易的标识和包含所述第二交易的区块标识,第一区块链的标识。
上述方案中提供了一个事件标识(也可以叫跨链标识),通过该事件标识,关联不同区块链的多个相关交易。从而实现多个区块链多个交易的相关关联,执行。通过该事件标识可以方便查询到所有处于不同区块链中的相关交易的内容,状态。
可选的,所述确定所述第二区块链的区块中包含所述第二交易,还包括:
根据所述通知消息读取所述第二区块链的内容,根据所述第一事件标识确认所述第二交易已写入所述第二区块链中的区块。
该方案中,该第一事件标识可以是区块链标识和交易标识。
在第一方面的另一种具体实现中,所述在确定满足所述交易条件,包括:
获取所述第二区块链中与包含所述第二交易的区块的深度;
当所述第二区块链中包含所述第二交易的区块的深度大于预设深度时,确定满足所述交易条件。
本方案的含义是:第一区块链的节点不需要第二区块链中的任何节点的通知,可以主动去获取第二区块链中包含第二交易区块的深度,当该深度大于一定值时,认为该第二交易已经执行完成,即满足了交易条件。
在第一方面的又一种具体实现中,向所述第一区块链中的其他节点发送第一交易之前,所述方法还包括:
接收第一触发消息,所述第一触发消息用于触发所述第一区块链的节点生成所述第一交易;
根据所述第一触发消息生成所述第一交易。
本方案的含义是第一区块链的节点生成第一交易,可以是用户设备、物联网设备、其他区块链的节点,或者其他的网元节点等的触发下生成的。例如:需要第二区块链的触发,即例如第一区块链的节点可以接收第二区块链中的一个或者多个节点发送的第一触发消息,在第一触发消息的触发下生成第一交易。然后将该第一交易发送给其他节点执行。
在上述的几种方案中,实现了跨链的交互,提供了在满足特定条件或情况下,区块链节点获得了通知消息或者触发消息,从而使得区块链节点确认可以发起一个交易或者执行一个交易。
可选的,该第一触发消息可以包括以下至少一项:第一事件标识、第二区块链的标识、 第一区块链标识,第一交易的标识、连接标识。
在本方案中,连接标识是用于关联同一个区块链中的多个交易的标识,例如:第一区块链中的第一交易,以及后续可能出现的第三交易,其可以直接通过事件标识进行关联,也可以设置专用的连接标识,将第一交易和第三交易关联起来,对此本方案不做限制。提供了一个连接标识(也可以叫跨链标识),通过该连接标识,关联一个区块链的多个相关交易。从而实现一个区块链多个交易的相关关联,执行。通过该连接标识可以方便查询到处于同一区块链中的多个相关交易的内容,状态。
在第一方面的又一种具体实现中,所述方法还包括:
向所述第二区块链的至少一个节点发送第二触发消息,所述第二触发消息用于触发所述第二区块链的节点生成所述第二交易。
具体地,例如第一区块链生成第一交易后,第一区块链节点发送第二触发消息给第二区块链节点,第二区块链节点收到所述第二触发消息后,根据所述第二触发消息,发送第A消息给用户设备或者物联网设备用于指示执行任务X或者行为X。然后,第二区块链收到用户设备或者物联网设备的第B消息,所述第B消息用于确认任务X或者行为X已经完成。接着,第二区块链节点产生第二交易,最后第二交易被包含在第二区块链的区块中。具体实施步骤,可以参看图12中的步骤7-步骤12内容。
在前述任一方案的基础上,在第一方面的一种具体实现中,所述方法还包括:
接收第三触发消息,所述第三触发消息用于触发所述第一区块链的节点生成第三交易;所述第三触发消息包括第二事件标识,所述第二事件标识用于关联所述第一交易;
根据所述第三触发消息生成所述第三交易;
或者,
或者,
接收所述第一区块链的其他节点发送的第三交易;
其中,所述第三交易包括第一连接标识,所述第一连接标识用于关联所述第一区块链中的至少两个交易。
本方案的含义是,同样的,用户设备、物联网设备、其他区块链的节点或者其他网络节点都可以触发第一区块链的节点生成与第一交易关联的第三交易,同一个区块链中的多个交易可以通过一个连接标识进行关联。例如:在第二区块链上的第二交易执行完,可以触发第一区块链的节点生成与第一交易关联的第三交易,即第一区块链的节点接收第二区块链的一个或者多个节点发送的第三触发消息,然后根据该第三触发消息生成第三交易。
可选的,所述第二事件标识包括所述第一事件标识。
其含义是指该第二事件标识可以包括第一事件标识,用来关联第一交易和第三交易,该第二事件标识也可以是一个新的标识,指示第一交易和第三交易的关系即可。
在前述任一方法的基础上,向所述第一区块链中的其他节点发送第一交易之前,所述方法还包括:
接收客户端或者终端设备或者网络其他节点(例如网络中的其他功能节点)发送的第一请求消息;例如该第一请求消息用于请求执行某事,导致触发交易。例如以设备共享为例,客户端为设备共享请求方,请求共享设备,由此触发第一交易(例如该第一交易就是 客户端为设备所有方提供支付的信息),或者终端设备请求为客户端提供设备共享,由此触发第一交易(例如该第一交易就是客户端为设备所有方提供支付的信息)。当然第一交易也可以是其他可能,例如第一交易就是使用设备的记录信息。在本专利中多以设备共享或者数据共享为例,说明方案内容,但不仅限于举例。
本方案的含义是前述的交易执行的过程是在终端设备的请求下触发的,即用户通过客户端或者终端设备发送了第一请求消息,则该第一区块链的节点广播第一交易,执行后续的信息交互过程。
进一步地,该方法还包括:
向客户端或者终端设备发送交易结果,所述交易结果用于指示所述第一请求消息中请求的内容获取完成或者执行结束。
上述的方案中,为了实现了一个事件(或者任务),该事件包含了多个业务,不同的业务在不同的区块链中执行,不同的业务在不同条件下才能执行,而不同的业务彼此间有相互关联,通过本申请的方法,利用事件标识,连接标识,通知消息,触发消息等手段,实现了一个事件的最终实现,整个过程数据或者交易记录不被篡改,交易自动执行,最终实现了智能可信的物联网。
第二方面,本申请提供一种信息的传输方法,应用于第二区块链中的节点,所述方法包括:
向所述第二区块链中的其他节点发送第二交易;所述第二交易包括第二连接标识和/或第一事件标识;其中,所述第二连接标识用于关联所述第二区块链中的至少两个交易,所述第一事件标识用于关联所述第二交易和第一区块链中的第一交易;
获取包含所述第二交易的区块。
可选的,还可以提供一种信息的传输方法,应用于区块链的节点,包括:
向区块链的其他节点发送交易,所述交易包括连接标识和/或事件标识;所述连接标识用于关联同一个区块链中的至少两个交易;所述事件标识用于关联至少两个不同区块链中的交易;
获取包含所述交易的区块。
除上述方案之外,还可以提供一种信息的传输方法,应用于区块链的节点,包括:
接收到交易,所述交易包括连接标识和/或事件标识;所述连接标识用于关联同一个区块链中的至少两个交易;所述事件标识用于关联至少两个不同区块链中的交易;
获取包含所述交易的区块。
在上述几个方案的基础上,信息的传输方法的具体实现中(以第一区块链和第二区块链为例),还包括以下一些具体实现方式:
一种实现方式中,所述获取包含所述第二交易的区块,包括:
在所述第二区块链中生成包含所述第二交易的区块;
或者,
接收所述第二区块链的其他节点发送的包含所述第二交易的区块。
在第二方面的一种实现方式中,所述方法还包括:
向所述第一区块链中的至少一个节点发送通知消息;所述通知消息用于通知所述第二 交易执行完成。
其中,向所述第一区块链中的至少一个节点发送通知消息,包括:
当包含所述第二交易的区块被生成时,向所述第一区块链中的至少一个节点发送通知消息;
或者,
当包含了所述第二交易的区块之后产生预设个数个区块时,向所述第一区块链中的至少一个节点发送通知消息;
或者,
满足预设的触发条件时,向所述第一区块链中的至少一个节点发送通知消息;
其中,所述通知消息用于通知所述第二交易执行完成。
可选的,所述通知消息包括以下至少一项:
所述第一事件标识,所述第二区块链的标识,第二交易的标识和包含所述第二交易的区块标识。
在第二方面的另一种具体实现中,所述方法还包括:
向所述第一区块链的至少一个节点发送第一触发消息,所述第一触发消息用于触发所述第一区块链的节点生成所述第一交易。
可选的,该第一触发消息可包括以下至少一项:第一事件标识、第二区块链的标识、第一交易的标识。
在第二方面的又一种具体实现中,向所述第二区块链中的其他节点发送第二交易之前,所述方法还包括:
接收第二触发消息,所述第二触发消息用于触发所述第二区块链的节点生成所述第二交易;所述第二触发消息用于触发所述第二区块链的节点生成所述第二交易;
根据所述第二触发消息向设备发送交易消息;所述交易消息用于指示所述设备执行所述交易消息中通知的操作和内容;
接收所述设备返回的反馈消息;
根据所述反馈消息生成所述第二交易。
具体地,所述接收第二触发消息,第一种实现方式是接收所述第一区块链中的至少一个节点发送的第二触发消息;或者,第二种实施方式是接收用户设备发送的第二触发消息;或者,第三种实施方式是接收物联网设备发送的第二触发消息;或者,第四种实施方式是网络节点,例能够发送触发消息的网络节点发送的第二触发消息。当然还有其他实现方式,本申请不做限制。
在上述任一实现方式的基础上,所述方法还包括:
生成第四交易,并向所述第二区块链中的其他节点发送所述第四交易;所述第三交易包括:第二连接标识;所述第二连接标识用于关联所述第四交易和所述第二交易;
获取包含所述第四交易的区块。
本方案的含义是指在第二交易执行完成之后,第二区块链的节点还可以生成第四交易,该第四交易是与第二交易关联的交易,可以采用第二连接标识将第四交易与第二交易关联起来。
可选的,所述第二连接标识包括所述第一事件标识。其含义是该第二连接标识可以是前述的第一事件标识,可以直接将该第二交易和第四交易关联。也可以采用一个独立于事件标识的连接将第二交易和第四交易关联起来,对此本方案不做限制。
进一步地,所述方法还包括:
当包含所述第四交易的区块被生成时,向所述第一区块链中的至少一个节点发送第三触发消息;
或者,
当包含了所述第四交易的区块之后产生预设个数个区块时,向所述第一区块链中的至少一个节点发送第三触发消息;
或者,
满足预设的触发条件时,向所述第一区块链中的至少一个节点发送第三触发消息;
其中,所述第三触发消息用于触发所述第一区块链的节点生成第三交易;所述第三触发消息包括第二事件标识,所述第二事件标识用于关联所述第一交易。
可选的,所述第二事件标识包括所述第一事件标识。“所述第二事件标识包括所述第一事件标识”表示所述第二事件标识等同所述第一事件标识,所述第二事件标识等于所述第一事件标识。
可选地,所述触发消息还包含以下至少一项参数:所述第二事件标识,所述第二区块链的标识,第二交易的标识和包含所述第二交易的区块标识,第一区块链的标识,连接标识,第一区块链的标识,第一交易所在的区块标识,第一交易标识。
本申请第二方面提供的各实现方式的技术效果与第一方面的技术方案的效果类似,在此不再赘述。
第三方面,本申请还提供一种信息的传输方法,应用于第一区块链中的节点,所述方法包括:
向所述第一区块链中的其他节点发送第一交易;所述第一交易包括事件标识和交易条件;所述事件标识用于关联第二区块链中的第二交易;所述交易条件包括:第二区块链中标识为所述事件标识的第二交易完成后,执行所述第一区块链的第一交易;
在确定满足所述交易条件时,生成第五交易,并向所述第一区块链的其他节点发送第五交易;所述第五交易包括:所述事件标识;
获取所述第五交易对应的区块。
本方案的含义是,在第一交易的执行条件为第二交易完成时,第一区块链的节点确定满足了交易条件之后,执行第一交易的方式还可以是生成一个新的第五交易,该第五交易与第一交易和第二交易关联,通过执行第五交易完成第一交易。
可选的,所述第五交易包括以下至少一项:
第二区块链的标识,第二交易的标识,第二交易对应的区块标识,所述交易条件,所述第一交易的标识。
在第三方面的一种具体的实现方式中,所述获取包含所述第五交易的区块,还包括:
执行所述第五交易,生成包含所述第五交易的区块;
或者,
接收所述第一区块链中的其他节点发送的包含所述第五交易的区块。
可选的,所述第五交易的区块包括所述第一交易。
该方案的含义是生成的第五交易包括原来的第一交易,因此,该方案中获取的包括第五交易的区块也包括第一交易,因此第一交易也执行完成。
可选的,所述生成第五交易,并向所述第一区块链的其他节点发送第五交易之前,所述方法还包括:
获取包含所述第一交易的区块。
该方案的含义是:第二交易执行完之后,第一区块链的节点对第一交易执行,得到包括第一交易的区块。然后再生成第五交易,并执行第五交易得到包括第五交易的区块。
可选的,所述第五交易还包括所述第一交易对应的区块标识。
可选的,所述生成第五交易包括:
实时获取所述第二区块链中与所述第二交易对应的区块的深度;
当所述第二区块链中与所述第二交易对应的区块的深度大于预设深度时,生成所述第五交易。
可选的,所述生成所述第五交易对应的区块之前,所述方法还包括:
当检测到所述第一区块链中超过预设个数个节点均生成所述第五交易,则所述第五交易被确认为可信交易。
第四方面,本申请还提供一种信息的传输方法,应用于设备或者节点,所述方法包括:
向第一区块链的节点或者第二区块链的节点发送触发消息;所述触发消息用于触发区块链的节点生成交易。
第五方面,本申请还提供一种信息的传输方法,应用于设备或者节点,所述方法包括:
接收第一区块链的节点或者第二区块链的节点发送的交易消息;
根据所述交易消息向所述第一区块链的节点或者第二区块链的节点返回反馈消息;所述反馈消息用于触发区块链的节点生成交易。
该设备至少包括用户设备和/或网络设备。
可选的,所述根据所述交易消息向所述第一区块链的节点或者第二区块链的节点返回反馈消息之前,所述方法还包括:
执行所述交易消息中指示的操作或者内容。
上述第四方面或者第五方面提供的信息的传输方法,可应用在用户设备或者物联网设备中,与区块链的节点之间进行交互,区块链节点被物联网设备或者用户设备触发生成交易,或者区块链节点在交易执行后通知物联网设备或者终端设备交易执行结果,可选的,还可以通知物联网设备和终端设备执行相关的操作。
第六方面,本申请提供一种多链物联网系统,包括:
第一区块链和第二区块链;
所述第一区块链包括至少两个节点,其中任一节点用于执行第一方面或者第三方面的任一项所述的信息的传输方法;
所述第二区块链包括至少两个节点,其中任一节点用于执行第二方面的任一项所述的信息的传输方法。
第六方面的一种具体实现方式中,所述多链物联网系统还包括:
连接节点;
所述第一区块链和所述第二区块链通过所述连接节点连接;所述连接节点用于:通知第一区块链节点所述第二区块链上的交易状况;或者,通知第二区块链节点所述第一区块链上的交易状况。
在本方案的实现中,该连接节点可以是第一区块链和第二区块链均信任的可信节点。
第六方面的另一种具体实现方式中,所述第一区块链和所述第二区块链中存在至少一个节点被所述第一区块链和所述第二区块链共享。
可选的,所述多链物联网系统,还包括:物联网设备和/或用户设备。
第七方面,本申请提供一种信息的传输装置,包括:
发送模块,用于向所述信息的传输装置所属的第一区块链中的其他节点发送第一交易;所述第一交易包括第一事件标识和交易条件;所述第一事件标识用于关联所述第一交易和第二区块链中的第二交易;所述交易条件包括:第二区块链中包含所述第一事件标识的第二交易完成后,执行所述第一区块链的第一交易;
处理模块,用于在确定满足所述交易条件时,获取包含所述第一交易的区块。
可选的,所述处理模块具体用于在所述第一区块链中生成包含所述第一交易的区块;
或者,
所述装置还包括:接收模块,用于接收所述第一区块链中的其他至少一个节点发送的包含所述第一交易的区块。
可选的,所述处理模块具体用于:
确定所述第二区块链的区块中包含所述第二交易,则满足所述第一交易的所述交易条件。
可选的,所述接收模块还用于接收通知消息;所述通知消息用于通知所述第二交易执行完成;
所述处理模块还用于根据所述通知消息确定所述第二区块链中的区块包含所述第二交易。
可选的,所述接收模块具体用于:
接收至少一个第二区块链中的节点发送的通知消息;
或者,
接收第二区块链中生成包含所述第二交易的区块的节点发送的通知消息;
或者,
接收连接节点发送的通知消息;所述连接节点用于连接所述第一区块链与所述第二区块链。
可选的,所述通知消息包括以下至少一项:
所述第一事件标识,所述第二区块链的标识,第二交易的标识和包含所述第二交易的区块标识,第一区块链的标识。
可选的,所述处理模块具体用于:
根据所述通知消息读取所述第二区块链的内容,根据所述第一事件标识确认所述第二交易已写入所述第二区块链中的区块。
可选的,所述处理模块还具体用于:
获取所述第二区块链中与包含所述第二交易的区块的深度;
当所述第二区块链中包含所述第二交易的区块的深度大于预设深度时,确定满足所述交易条件。
可选的,所述装置还包括:
接收模块,用于接收第一触发消息,所述第一触发消息用于触发所述第一区块链的节点生成所述第一交易;
所述处理模块还用于根据所述第一触发消息生成所述第一交易。
可选的,所述发送模块还用于向所述第二区块链的至少一个节点发送第二触发消息,所述第二触发消息用于触发所述第二区块链的节点生成所述第二交易。
可选的,接收模块用于接收发送的第三触发消息,所述第三触发消息用于触发所述第一区块链的节点生成第三交易;所述第三触发消息包括第二事件标识,所述第二事件标识用于关联所述第一交易;
处理模块用于根据所述第三触发消息生成所述第三交易;
或者,
接收模块用于接收所述第一区块链的其他节点发送的第三交易;
其中,所述第三交易包括第一连接标识,所述第一连接标识用于关联所述第一区块链中的至少两个交易。
可选的,所述第二事件标识包括所述第一事件标识。
第八方面,本申请提供一种信息的传输装置,所述装置包括:
发送模块,用于向所述信息的传输装置所属的所述第二区块链中的其他节点发送第二交易;所述第二交易包括第二连接标识和/或第一事件标识;其中,所述第二连接标识用于关联所述第二区块链中的至少两个交易,所述第一事件标识用于关联所述第二交易和第一区块链中的第一交易;
处理模块,用于获取包含所述第二交易的区块。
可选的,所述处理模块具体用于在所述第二区块链中生成包含所述第二交易的区块;
或者,
所述装置还包括:接收模块,用于接收所述第二区块链的其他节点发送的包含所述第二交易的区块。
可选的,所述发送模块还用于向所述第一区块链中的至少一个节点发送通知消息;所述通知消息用于通知所述第二交易执行完成。
可选的,所述发送模块具体用于:
当包含所述第二交易的区块被生成时,向所述第一区块链中的至少一个节点发送通知消息;
或者,
当包含了所述第二交易的区块之后产生预设个数个区块时,向所述第一区块链中的至少一个节点发送通知消息;
或者,
满足预设的触发条件时,向所述第一区块链中的至少一个节点发送通知消息;
其中,所述通知消息用于通知所述第二交易执行完成。
可选的,所述发送模块还用于向所述第一区块链的至少一个节点发送第一触发消息,所述第一触发消息用于触发所述第一区块链的节点生成所述第一交易。
可选的,所述接收模块还用于接收发送的第二触发消息,所述第二触发消息用于触发所述第二区块链的节点生成所述第二交易;
所述发送模块还用于根据所述第二触发消息向设备发送交易消息;所述交易消息用于指示所述设备执行所述交易消息中通知的操作和内容;
所述接收模块还用于接收所述设备返回的反馈消息;
所述处理模块还用于根据所述反馈消息生成所述第二交易。
可选的,所述处理模块还用于生成第四交易;
所述发送模块还用于向所述第二区块链中的其他节点发送所述第四交易;所述第四交易包括:第二连接标识;所述第二连接标识用于关联所述第四交易和所述第二交易;
所述处理模块还用于获取包含所述第四交易的区块。
可选的,所述发送模块还用于:
当包含所述第四交易的区块被生成时,向所述第一区块链中的至少一个节点发送第三触发消息;
或者,
当包含了所述第四交易的区块之后产生预设个数个区块时,向所述第一区块链中的至少一个节点发送第三触发消息;
或者,
满足预设的触发条件时,向所述第一区块链中的至少一个节点发送第三触发消息;
其中,所述第三触发消息用于触发所述第一区块链的节点生成第三交易;所述第三触发消息包括第二事件标识,所述第二事件标识用于关联所述第一交易。
第九方面,本申请提供一种信息的传输装置,所述装置包括:
发送模块,用于向第一区块链的节点或者第二区块链的节点发送触发消息;所述触发消息用于触发区块链的节点生成交易。
第十方面,本申请提供一种信息的传输装置,所述装置包括:
接收模块,用于接收第一区块链的节点或者第二区块链的节点发送的交易消息;
发送模块,用于根据所述交易消息向所述第一区块链的节点或者第二区块链的节点返回反馈消息;所述反馈消息用于触发区块链的节点生成交易。
可选的,所述装置还包括:
处理模块,用于执行所述交易消息中指示的操作或者内容。
第十一方面,本申请提供一种节点设备,包括:存储器、处理器、发送器、接收器以及计算机程序,所述计算机程序存储在所述存储器中,所述处理器运行所述计算机程序执 行第一方面至第三方面任一项所述的信息的传输方法。
在上述节点设备的具体实现中,处理器的数量为至少一个,用来执行存储器存储的执行指令,即计算机程序。使得节点设备通过通信接口与其他的节点设备、其他区块链的节点设备、物联网设备或者用户设备之间进行数据交互来执行上述第一方面至第三方面或者第一方面至第三方面的各种实施方式提供的信息的传输方法,可选的,存储器还可以集成在处理器内部。
第十二方面,本申请提供一种用户设备,包括:存储器、处理器、发送器、接收器以及计算机程序,所述计算机程序存储在所述存储器中,所述处理器运行所述计算机程序执行第四方面或者第五方面任一项所述的信息的传输方法。
第十三方面,本申请提供一种物联网设备,包括:存储器、处理器、发送器、接收器以及计算机程序,所述计算机程序存储在所述存储器中,所述处理器运行所述计算机程序执行第四方面或者第五方面任一项所述的信息的传输方法。
在上述用户设备或者物联网设备的具体实现中,处理器的数量为至少一个,用来执行存储器存储的执行指令,即计算机程序。使得用户设备或者物联网设备通过通信接口与区块链的节点之间进行数据交互,来执行上述各方面的各种实施方式提供的信息的传输方法,可选的,存储器还可以集成在处理器内部。
第十四方面,本申请提供一种存储介质,包括:可读存储介质和计算机程序,所述计算机程序用于实现第一方面至第三方面任一项提供的信息的传输方法。
第十五方面,本申请提供一种存储介质,包括:可读存储介质和计算机程序,所述计算机程序用于实现第四方面或第五方面任一项提供的信息的传输方法。
第十六方面,本申请提供一种程序产品,该程序产品包括计算机程序(即执行指令),该计算机程序存储在可读存储介质中。区块链的节点设备的至少一个处理器可以从可读存储介质读取该计算机程序,至少一个处理器执行该计算机程序使得发送设备实施第一方面至第三方面或者各种实施方式提供的信息的传输方法。
第十七方面,本申请提供一种程序产品,该程序产品包括计算机程序(即执行指令),该计算机程序存储在可读存储介质中。物联网设备或者用户设备的至少一个处理器可以从可读存储介质读取该计算机程序,至少一个处理器执行该计算机程序使得物联网或者用户设备实施上述第四方面或者第五方面的各种实施方式提供的信息的传输方法。
本申请提供的信息的传输方法、装置和系统,第一区块链中的任一节点向第一区块链中的其他节点发送第一事件标识和交易条件的第一交易,第一事件标识用于关联其他区块链中的交易,例如第二区块链中的第二交易。交易条件可以为第二区块链中标识为第一事件标识的第二交易完成后,执行第一区块链的第一交易,在确定满足交易条件时,获取包含第一交易的区块。针对多个区块链组成的物联网系统中,一个区块链的交易执行完成的条件是另一个区块链的另一个交易的执行完成,提供了具体实现方案,实现跨区块链的交互,避免了在同一个区块链中实现不同种类的交易造成的网络复杂度和负荷大的问题。同时通过不同区块链实现不同的功能(即执行不同的交易)有助于网络分层和扩展,优化网络结构。
附图说明
图1为本申请提供的一种多链物联网系统架构示意图;
图2为本申请提供的另一种多链物联网系统架构示意图;
图3为本申请提供的又一种多链物联网系统架构示意图;
图4为本申请提供的信息的传输方法实施例一的交互流程图;
图5为本申请提供的信息的传输方法实施例二的交互流程图;
图6为本申请提供的信息的传输方法实施例三的交互流程图;
图7为本申请提供的信息的传输方法实施例四的流程图;
图8为本申请提供的信息的传输方法应用在数据共享过程中的实例一的交互流程图;
图9为本申请提供的信息的传输方法应用在数据共享过程中的实例二的交互流程图;
图10为本申请提供的信息的传输方法应用在数据共享过程中的实例三的交互流程图;
图11为本申请提供的一种设备共享的应用场景示意图;
图12为本申请提供的信息的传输方法应用在数据共享过程中的实例四的交互流程图;
图13为本申请提供的信息的传输方法应用在数据共享过程中的实例五的交互流程图;
图14为本申请提供的信息的传输方法应用在数据共享过程中的实例六的交互流程图;
图15为本申请提供的信息的传输方法应用在数据共享过程中的实例七的交互流程图;
图16为本申请提供的信息的传输装置实施例一的结构示意图;
图17为本申请提供的信息的传输装置实施例二的结构示意图;
图18为本申请提供的信息的传输装置实施例三的结构示意图;
图19为本申请提供的信息的传输装置实施例四的结构示意图;
图20为本申请提供的信息的传输装置实施例五的结构示意图;
图21为本申请提供的信息的传输装置实施例六的结构示意图。
具体实施方式
本申请实施例的技术方案可以应用与物联网系统中实现数据共享或者设备共享等场景。涉及到的物联网设备可以是:工业物联网设备,例如各类工业传感器,控制单元等等;例如可穿戴设备,家用电器,家居传感器,家居控制单元等;例如用户设备,包含手机、智能终端、多媒体设备、流媒体设备等。本申请对无线网设备的形式和类型不做任何限制。物联网设备具备数据采集和/或数据发送的能力即可。
图1为本申请提供的一种多链物联网系统架构示意图。该多链物联网系统包括多个区块链,每个区块链中包括多个节点,本申请不限制系统中区块链和每个区块链中的节点的个数。以图1为例,该多链物联网系统包括第一区块链和第二区块链,第一区块链中包括 5个节点,第二区块链中包括4个节点。该第一区块链和第二区块链中的节点是完全独立的节点。
图2为本申请提供的另一种多链物联网系统架构示意图。该多链物联网系统中也包括多个区块链,每个区块链中包括多个节点,其中多个区块链之间存在一个或者多个共享节点。以图2为例,该多链物联网系统中包括两个区块链第一区块链和所述第二区块链,且第一区块链和所述第二区块链中存在两个节点C和E(至少一个节点)被所述第一区块链和所述第二区块链共享。
图3为本申请提供的又一种多链物联网系统架构示意图。多链物联网系统中也包括多个区块链,每个区块链中包括多个节点,多个区块链之间可通过连接节点连接。以图3为例,该多链物联网系统中包括第一区块链和第二区块链,该第一区块链和第二区块链之间通过连接节点(例如图中的可信节点)连接起来,第一区块链和第二区块链之间的数据交互可通过该可信节点传输。即连接节点可用于通知第一区块链节点该第二区块链上的交易状况;或者,通知第二区块链节点第一区块链上的交易状况。
根据上述图1至图3所示的几个多链物联网系统的示意图,可知,本申请提供的多链物联网系统至少包括两个区块链:第一区块链和第二区块链;
所述第一区块链包括至少两个节点,其中任一节点用于第一区块链的信息的传输方法;所述第二区块链包括至少两个节点,其中任一节点用于第二区块链的信息的传输方法。
可选的,在一种具体实现中,该多链物联网系统还可以包括:连接节点(例如:可信节点);所述第一区块链和所述第二区块链通过所述连接节点连接;所述连接节点用于:通知第一区块链节点所述第二区块链上的交易状况;或者,通知第二区块链节点所述第一区块链上的交易状况。
可选的,所述第一区块链和所述第二区块链中存在至少一个节点被所述第一区块链和所述第二区块链共享。
可选的,该多链物联网系统还可以包括:物联网设备和/或用户设备。
本专利中提到的“交易”(transaction),可以是信息,可以是数据,或者可以是消息等形式不限。例如交易是记录设备使用的信息,例如是使用设备所花费的金钱交易,例如交易是一个消息,例如用于通知关闭设备的消息,对此本方案不做限制。
基于上述图1至图3提供的几种多链物联网系统,通过下面的实施例对本申请提供的可实现多个区块链上的交易存在互相影响的情况下的执行,即实现跨链交互的信息的传输方法进行详细说明,具体实施方式如下。
图4为本申请提供的信息的传输方法实施例一的交互流程图,如图4所示,该信息的传输方法的一种实现方式的具体步骤包括:
S101:向第一区块链中的其他节点发送第一交易,第一交易包括:第一事件标识和交易条件;其中,第一事件标识用于关联第一交易和第二区块链中的第二交易;交易条件包括:第二区块链中标包含第一事件标识的第二交易完成后,执行第一区块链的第一交易。
在本步骤中,第一区块链中的任一节点在接收到用户通过客户端或者终端设备发送的第一请求消息之后,生成第一交易。具体地,例如客户端或者终端设备发送的第一请求消息用于请求数据或者请求设备共享等。该节点生成第一交易之后,将其发送给第一区块链 中的其他节点,以便第一区块链中的每个节点都知晓第一交易的存在。
该方案中的第一交易并不是独立的交易,而是存在一定的交易条件,因此该第一区块链的节点发送给其他的节点的第一交易至少包括:第一事件标识和交易条件;其中,第一事件标识用于关联第二区块链中的第二交易;所述交易条件包括:第二区块链中标识为所述第一事件标识的第二交易完成后,执行所述第一区块链的第一交易。其含义是第二区块链中的第二交易执行完成后该第一交易才能够执行完成。
在该方案中,应理解,这里的第一事件标识关联第一区块链的第一交易和第二区块链中的第二交易的含义是指,任一区块链中的任一交易中的一个事件标识,可以用来关联其他至少一个区块链中的至少一个交易。本申请中其他的事件标识也是同样的道理,例如:第一区块链的一个交易与第二区块链中的一个或者几个交易通过一个事件标识关联起来。或者,第一区块链中的一个交易与第二区块链中的一个或者几个交易以及第三区块链中的一个或者几个交易可通过一个事件标识关联起来。对此本方案不做限制。
可选的,该第一交易中还可以包括以下至少一项:第一区块链的标识、连接标识、第二区块链的标识、第二区块链的标识、第二交易的标识,第二交易所在区块的标识,业务标识,数据的类型、数据的数据量,等信息。
可选地,针对不同区块链或者针对不同业务类型的区块链,第一交易还可以包括以下一项:公钥,地址,设备标识,数据标识,支付金额等。其中,所述公钥可以是交易各方的公钥,所述地址可以是交易各方的地址,或者是设备的地址。
第一交易的执行可以是本节点,也可以是该第一区块链中的其他节点,本方案不做限制。
S102:向所述第二区块链中的其他节点发送第二交易;所述第二交易包括第二连接标识和/或第一事件标识;其中,所述第二连接标识用于关联所述第二区块链中的至少两个交易,所述第一事件标识用于关联第二交易和第一区块链中的第一交易。
在本步骤中,当客户端或者终端设备获取到请求的设备或者数据等等时,触发第二区块链生成第二交易,当第二区块链中的任一节点获取到第二交易之后,将其发送给第二区块链中的其他节点,其中包括用来与第一交易关联的第一事件标识,以使其他节点能够确定该第二交易与第一交易存在一定的关联。
可选的,所述第二交易包括第二连接标识,或者包括第二连接标识和第一事件标识。该第二连接标识用于将同一个区块链中的交易关联起来,即将第二区块链中的多个交易关联起来。
在前述方案的基础上,发送给第二区块链中其他节点的第二交易中还可以包括以下至少一项:第一区块链的标识、第二区块链的标识、连接标识,交互数据的类型、交互数据的数据量等信息。
在上述方案中,第一交易和第二交易中的连接标识可以不同,该连接标识是用于关联同一区块链内的不同交易。
S103:获取包含所述第二交易的区块。
第二区块链执行第二交易获取包括该第二交易的区块。具体的方式可以是:第二区块链中的多个节点根据共识算法,确定其中的某个节点获取生成区块的权利,然后该节点生 成包含第二交易的区块,即执行完成第二交易。
综上,对于第二区块链中的任一个节点,获取包含第二交易的区块的实现方式至少包括以下两种实现方式:
第一种实现方式,在所述第二区块链中生成包含所述第二交易的区块。该方案的含义是发送第二交易的本节点获取到了生成区块的权利,因此可直接生成包含第二交易的区块。并可在生成包含第二交易的区块之后将该区块发送给第二区块链中的其他节点,以使其他节点能够记录第二交易的执行结果。
第二种实现方式,接收所述第二区块链的其他节点发送的包含所述第二交易的区块。
该方案的含义是指第二区块链的其他节点获取了生成区块的权利,生成包含第二交易的区块,发送第二交易的本节点接收其他节点发送的包含第二交易的区块。
S104:在确定满足所述交易条件时,获取包含所述第一交易的区块。
在本步骤中,第一区块链的节点需要确定满足交易条件,即第二交易执行完成,才能获取包含第一交易的区块,即执行完成第一交易。
在前述的过程中,应理解第一区块链的S101与第二区块链的S102和S103之间没有先后顺序的限定。
第一区块链的节点确定满足交易条件的一种具体实现方式是确定第二区块链的区块包含第二交易或者第二交易被广播,则认为满足第一交易的交易条件。第一区块链的节点确定第二区块链的区块中包含第二交易的具体实现方式包括以下几种:
第一种实现方式,接收通知消息;所述通知消息用于通知所述第二交易执行完成;根据所述通知消息确定所述第二区块链中的区块包含所述第二交易。
例如接收至少一个第二区块链中的节点发送的通知消息,或者是其他网络节点发送的通知消息。在两个区块链中的节点为共享节点时,该方案则为节点内的第一区块链单元接收第二区块链单元发送的通知消息,然后确定第二区块链的区块中是否包含第二交易。
本方案的含义是:第一区块链的节点接收到通知第二交易执行完成的通知消息,则第一区块链的节点确定第二交易执行完成,即确定第二区块链的区块中包含了第二交易。
第二种实现方式,接收连接节点发送的通知消息;所述连接节点用于连接所述第一区块链与所述第二区块链;所述通知消息包括用于通知所述第二交易执行完成;根据所述通知消息确定所述第二区块链中的区块中包含所述第二交易。
本方案的含义是:第一区块链的节点接收到连接节点发送的通知第二区块链中的第二交易执行完成的通知消息,则第一区块链的节点确定第二交易执行完成,即确定第二区块链的区块中包含了第二交易。
第三种实现方式,接收通知消息,所述用于通知所述第二交易执行完成;根据所述通知消息,读取所述第二区块链的内容,确定所述第二区块链中的区块包含所述第二交易。具体地,包括:读取所述第二区块链的内容,根据所述第一事件标识确认所述第二交易已写入所述第二区块链中的区块。例如,具体地是根据所述通知消息读取所述第二区块链的内容,根据所述第一事件标识确认所述第二交易已写入所述第二区块链中的区块。
本方案的含义是,在上述两种实现方式的第一区块链的节点接收到通知消息之后,由于第一区块链和第二区块链为独立的两个链路,因此第一区块链不一定要直接相信第二区 块链发送的通知,因此第一区块链的节点可以在接收到通知消息之后,访问第二区块链的内容,即读取第二区块链的区块链,确认第二交易确实被写入了第二区块链的区块中,则确定满足了交易条件。
第四种实现方式,读取所述第二区块链的内容,根据所述第一事件标识确认所述第二交易已写入所述第二区块链中的区块。例如,直接读取所述第二区块链的内容,根据所述第一事件标识确认所述第二交易已写入所述第二区块链中的区块。
第五种实现方式,针对共享节点的架构情况下(所述第一区块链和所述第二区块链中存在至少一个节点被所述第一区块链和所述第二区块链共享),该共享节点内的第一区块链单元收到第二区块链单元的通知消息,所述通知消息包括用于通知所述第二交易执行完成;根据所述通知消息确定所述第二区块链中的区块中包含所述第二交易。具体地,可以是,接收通知消息,所述用于通知所述第二交易执行完成;根据所述通知消息,读取所述第二区块链的内容,确定所述第二区块链中的区块包含所述第二交易。具体地,包括:读取所述第二区块链的内容,根据所述第一事件标识确认所述第二交易已写入所述第二区块链中的区块。例如,具体地是根据所述通知消息读取所述第二区块链的内容,根据所述第一事件标识确认所述第二交易已写入所述第二区块链中的区块。
可选的,上述实现方式中的通知消息可包括以下至少一项:第一事件标识,第一区块链标识,第二区块链的标识,第二交易的标识和包含第二交易的区块标识,连接标识。即该通知消息可通过携带不同的信息告知第一区块链的节点第二交易的执行情况,具体携带的信息类型本方案不做限制。
除了上述的几种方式,由第二区块链中的节点发送通知消息,触发第一区块链的节点确认是否满足第一交易的交易条件之外,本方案还提供一种确定满足交易条件的方式:
第六种实现方式,获取所述第二区块链中与包含所述第二交易的区块的深度;当所述第二区块链中包含所述第二交易的区块的深度大于预设深度时,确定满足所述交易条件。
本方案的含义是第一区块链的节点主动获取第二区块链中包括第二交易的区块的深度,再确认第二交易的区块的深度大于预设的深度时,认为第二交易已经执行完成,即确定满足了第一交易的交易条件。
第一区块链中的节点在确认满足交易条件之后,需要获取包含第一交易的区块,即执行第一交易,与第二区块链的节点获取包含第二交易的区块的方式类似,也包括以下两种实现方式:
第一种方式,在第一区块链中生成包含所述第一交易的区块。发送第一交易的本节点获取到了生成区块的权利,因此可直接生成包含第一交易的区块。并可在生成包含第一交易的区块之后将该区块发送给第一区块链中的其他节点,以使其他节点能够记录第一交易的执行结果。
第二种方式,接收所述第一区块链中的其他至少一个节点发送的包含所述第一交易的区块。该方案的含义是指第一区块链的其他节点获取了生成区块的权利,生成包含第一交易的区块,发送第一交易的本节点接收其他节点发送的包含第一交易的区块。
本实施例提供的信息的传输方法,针对多个区块链组成的物联网系统中,一个区块链 的交易执行完成的条件是另一个区块链的另一个交易的执行完成,提供了具体实现方案,实现跨区块链的交互,避免了在同一个区块链中实现不同种类的交易造成的网络复杂度和负荷大的问题。同时通过不同区块链实现不同的功能(即执行不同的交易)有助于网络分层和扩展,优化网络结构。
图5为本申请提供的信息的传输方法实施例二的交互流程图,如图5所示,在上述实施例一的基础上,在步骤S101之前,还可以包括以下步骤:
S105:接收第一触发消息,第一触发消息用于触发第一区块链的节点生成第一交易。
在本步骤中,第一区块链的节点可以接受用户设备、物联网设备、第二区块链的节点或者是其他网络节点发送的触发消息,并根据该触发消息生成相应的交易。
例如,从网络节点接收到第一触发消息,所述网络节点可以是第二区块链的节点,或者,可以是其他区块链的节点,或者可以是用户设备,或者可以是为第一交易的交易条件提供智能合约服务的节点,或者是能够提供触发消息息的网络节点。在此本申请对网络节点不做限制。
具体地,以接收第二区块链节点发送第一触发消息为例,即接收第二区块链的至少一个节点发送的第一触发消息,第一触发消息用于触发第一区块链的节点生成第一交易。即第二区块链的节点向所述第一区块链的至少一个节点发送第一触发消息。
S106:根据第一触发消息生成第一交易。
在上述步骤S105和S106为第一交易的触发过程,其中,第一区块链的节点在将第一交易发送给其他节点之前,还可以接收第二区块链的任一个或者多个节点发送的第一触发消息,该第一触发消息用于触发生成第一交易,即在该方案中,第一交易的生成不一定是由用户通过客户端或者终端设备发送的请求消息触发的,而是另一个交易的完成触发的,例如第零交易,第二区块链上执行完成第零交易之后触发了第一交易的生成。以设备共享为例:当请求方进行设备使用请求的交易过程执行完成,则可以触发设备共享的费用支付的交易过程。
在该方案的具体实现中,该第一触发消息中可以包括以下至少一项:第二区块链的标识、第一事件标识等。
可选的,在上述任一种方案的基础上,第二区块链的任一节点在执行步骤S102之前还可以包括以下步骤:
S107:接收第二触发消息,第二触发消息用于触发第二区块链的节点生成第二交易。
在该步骤中,所述接收第二触发消息,第一种实现方式是接收所述第一区块链中的至少一个节点发送的第二触发消息;或者,第二种实施方式是接收用户设备发送的第二触发消息;或者,第三种实施方式是接收物联网设备发送的第二触发消息;或者,第四种实施方式是网络节点,例能够发送触发消息的网络节点发送的第二触发消息。当然还有其他实现方式,本申请不做限制。
本方案中暂时以接受第一区块链中的至少一个节点发送的第二触发消息为例进行说明。
可选的,在该S107之后,该第二区块链的节点可以与物联网设备或者用户设备(可 以统称为设备)之间进行交互,例如:在接收到第二触发消息之后,根据该触发消息向物联网设备或者用户设备发送交易消息,通知交易的执行情况,或者触发物联网设备或者用户设备执行响应的操作等,物联网设备或者用户设备根据该交易消息的情况返回反馈消息。第二区块链的节点在接收到反馈消息之后再生成第二交易,即根据反馈消息生成第二交易。
S108:根据第二触发消息生成第二交易。
即第一区块链的节点向所述第二区块链的至少一个节点发送第二触发消息。
在上述步骤S107和S108中,可知第二交易的产生也可以不是由用户通过客户端或者终端设备发送请求给第二区块链触发的,而是由于第一交易的生成或者第一区块链上的其他交易的执行触发的。以设备共享为例,请求方发起共享请求同时支付费用的交易完成后,可触发被共享的设备的开锁交易过程的产生。
应理解,上述步骤S105和S106第一交易的触发过程、步骤S107和S108第二交易的触发可以同时出现,也可以单独出现,对此本方案不做限制。
本实施例提供的信息的传输方法中,提供的几种具体的实现方案,在每个区块链上的交易除了可以由用户的客户端或者终端设备进行触发产生,还可以是其他区块链上的某个交易的完成触发的,即一个交易的产生是由于另一个交易的完成触发,通过该方式实现跨链交互。
图6为本申请提供的信息的传输方法实施例三的交互流程图,如图6所示,在上述任一实施例的基础上,在步骤S104之后,还可以包括以下步骤:
S109:生成第四交易,并向第二区块链中的其他节点发送第四交易;第四交易包括:第二连接标识;第二连接标识用于关联所述第二交易。
在本步骤中,第一交易的和第二交易分别执行完成(即第一区块链中存在包含第一交易的区块,第二区块链中存在包含第二交易的区块)之后,第二区块链的节点还可以生成一个与第二交易关联的第四交易,该第四交易可以是第一交易或者第二交易的执行触发的,也可以用户通过终端设备或者客户端触发的,例如:请求方请求设备共享之后,在使用完毕后进行关锁,该关锁过程触发了关锁交易的过程。该关锁交易并不是独立于前述第一交易和第二交易的新的交易,而是与前述的开锁交易的过程相关联的交易,因此该第四交易中至少包括了第二连接标识用来关联第二交易。
可选的,该第二连接标识可以与第一事件标识相同,第二区块链的其他节点可以直接根据该第二连接标识确定该第四交易与前述的第二交易的关联关系,也可以是独立于事件标识的连接标识,可指示该第四交易与前述的第二交易的关系即可,对此本方案不做限制。
S110:获取包含第四交易的区块。
第二区块链的任一节点将第四交易发送给第二区块链中的其他节点之后,根据第二区块链中的多个节点通过共识算法确定生成区块的节点,将第四交易写入第二区块链中的区块中,即对于生成该第四交易的节点,获取包含第四交易的区块的方式包括生成包含第四交易的区块和接收第二区块链的其他节点发送的包含第四交易的区块两种方式。
可选的,该信息的传输方式还可以包括以下步骤:
S111:向第一区块链中的至少一个节点发送第三触发消息,第三触发消息用于触发第一区块链的节点生成第三交易。
即第一区块链的节点接第三触发消息,可以是用户设备、物联网设备、其他网络节点或者其他区块链节点发送的,本方案中以第一区块链的节点接收第二区块链的至少一个节点发送的第三触发消息为例,所述第三触发消息包括第二事件标识,所述第二事件标识用于关联所述第一交易。同样的该第二事件标识可以与第一事件标识相同,也可以是新增的事件标识,能够将第三交易与第一交易关联起来即可。
该方案中的第三交易也不是完全独立于前述过程的新的交易,而是与第一交易相关的新的交易,例如:设备共享过程中的关锁交易的完成触发了费用受益确认的交易过程,与前述的支付过程相关。即上述第四交易的执行完成可以触发另一个新的第三交易的产生。
第二区块链的节点向第一区块链中的一个或者多个节点发送第三触发消息,至少包括以下几种实现方式:
第一种实现方式,当包含所述第四交易的区块被生成时,向所述第一区块链中的至少一个节点发送第三触发消息。
第二种实现方式,当包含了所述第四交易的区块之后产生预设个数个区块时,向所述第一区块链中的至少一个节点发送第三触发消息。
第三种实现方式,满足预设的触发条件时,向所述第一区块链中的至少一个节点发送第三触发消息。
在本步骤的具体实现中,对于第一区块链的节点来说,包括以下两种情况:
第一种情况,接收发送的第三触发消息,所述第三触发消息用于触发所述第一区块链的节点生成第三交易;所述第三触发消息包括第二事件标识,所述第二事件标识用于关联所述第一交易;根据所述第三触发消息生成所述第三交易。
该第三触发消息可以是其他网络节点、物联网设备、用户设备或者其他区块链的节点发送的,本方案中以第二区块链的至少一个节点为例,第一区块链的节点接收到第三触发消息之后根据触发消息生成第三交易。
第二种情况,接收所述第一区块链的其他节点发送的第三交易;即第一区块链中的其他节点根据触发生成了第三交易并发送给本节点。
上述的两种情况下,所述第三交易包括第一连接标识,所述第一连接标识用于关联所述第一区块链中的至少两个交易。例如:通过该第一连接标识将第三交易与第一交易关联起来。
S112:根据第三触发消息生成第三交易。
第一区块链的节点接收到第三触发消息之后生成第三交易,然后将该第三交易广播给其他的节点,并执行该第三交易获取包含第三交易的区块,完成交易过程。
除此之外,应理解,在上述任一实施例中,用户通过客户端或者终端设备发起的交易过程,在执行完成之后,可向客户端或者终端设备发送交易结果,所述交易结果用于指示所述第一请求消息中请求的内容获取完成或者执行结束。
本实施例提供的信息的传输方法,提供了几种在多个区块链之间进行的多个交易的交互过程,每个交易的执行都可能触发新的与前述交易关联的新的交易产生,即在同一个区 块链中可以实现相关的多个交易,大大降低通过多个区块链实现关联的交易的复杂度,降低系统负荷。
需要全文说明的是,事件标识用于关联至少两个不同区块链的交易,或者事件标识是关联至少两个不同区块链交易的标识。事件标识是多个链之间针对针对某个事件的共同标识。事件标识是为了识别跨链间的行为或者事件或者合约等所使用的共同标识。总之事件标识是一个跨链的标识。事件标识可以叫其他名字例如任务标识,跨链标识,或者智能合约标识等等,本申请不做任何限制。具体地,本申请以事件标识来说明发明内容,。
需要全文说明的是,连接标识是用于关联同一个区块链的至少两个交易,或者连接标识用于关联同一个区块链的不同交易。同一个区块链内的至少两个交易设置一个专门用于关联区块链内的交易的连接标识,将区块链内的交易进行关联。特别地通过连接标识关联同一个区块链的交易,这些交易是相关交易。例如这些交易是同一个业务的不同过程的信息记录,例如B给A共享设备(锁),区块链Z的交易y是开锁记录,区块链Z的x交易是关锁交易,这两个交易是相关交易。又例如,特别地,例如将事件标识等同于连接标识,关联同一个区块链内的至少两个交易,也是可以的。对此本申请不做限制。
在上述任一实施例的基础上,本申请还提供一种信息的传输方法,用于获取第一交易的区块,即与前述方案不同的是,本方案中是通过生成一个新的第五交易来得到包含第一交易的区块。图7为本申请提供的信息的传输方法实施例四的流程图,如图7所示,该方案应用于第一区块链的节点,该信息的传输方法的具体实现步骤为:
S201:向第一区块链中的其他节点广播第一交易;第一交易包括事件标识和交易条件;事件标识用于关联第二区块链中的的交易,例如第二交易;交易条件包括:第二区块链中标识为事件标识的交易(例如第二交易)完成后,执行第一区块链的第一交易。
在本步骤中,第一交易包括以下至少一项:第二区块链的标识,第二交易的标识,第二交易对应的区块标识,所述交易条件,所述第一交易的标识,第一区块链的标识,事件标识,连接标识。
可选的,所述第一交易还包括所述第一交易对应的区块标识。
在该过程中,第二区块链上的节点也在执行第二交易的过程,具体的实现方式类似,可参考实施例一中的S102和S103的内容。
第二区块链的节点(例如某个节点)向第二区块链中的其他节点发送第二交易;第二交易包括第一事件标识,所述第一事件标识用于关联第一区块链中的第一交易。第二区块链执行第二交易获取包括该第二交易的区块。即第一交易的交易条件完成。
第二区块链的标识,第二交易的标识,第二交易对应的区块标识,所述交易条件,所述第一交易的标识,第一区块链的标识,事件标识,连接标识。
第二区块链的第二交易,包括以下至少一项:第二区块链的标识,第二交易的标识,交易条件,第一区块链的标识,第一交易对应的区块标识,所述第一交易的标识,事件标识,连接标识。
以设备共享为例,第二交易用于指示设备已经共享给设备请求方,第二交易包含以下至少一项:第二区块链的标识,第二交易的标识,第一区块链的标识,第一交易对应的区块标识,所述第一交易的标识,事件标识,连接标识,设备标识,请求方标识,设备的地 址,请求方的地址,设备所有者的标识,设备所有者的地址,时间(交易时间,或者设备开始共享的时间)。其中,第一区块链的第一交易可以是用于指示设备请求方为使用该设备所支付金钱交易信息。
S202:在确定满足交易条件时,生成第五交易,并向第一区块链的其他节点广播第五交易;第五交易包括:事件标识。
在本步骤中,在第一交易的执行条件为第二交易完成时,执行第一交易的方式与实施例一不同,本实施例中的第一区块链的节点确定满足了交易条件之后,生成一个新的第五交易,该第五交易与第一交易和第二交易关联,通过执行第五交易完成第一交易。
S203:获取包含第五交易的区块。
在本步骤中,与前述的方案类似的,获取包含第五交易的区块的方式至少包括以下两种:
第一种实现方式,执行所述第五交易,生成包括所述第五交易的区块。
第二种实现方式,接收所述第一区块链中的其他节点发送的包括所述第五交易的区块。
在本方案中,可选的,所述第五交易的区块包括所述第一交易。该方案的含义是生成的第五交易包括原来的第一交易,因此,该方案中获取的包括第五交易的区块也包括第一交易,因此第一交易也执行完成。
可选的,所述生成第五交易,并向所述第一区块链的其他节点广播第五交易之前,所述方法还包括:获取包括所述第一交易的区块。
该方案的含义是:第二交易执行完之后,第一区块链的节点对第一交易执行,得到包括第一交易的区块。然后再生成第五交易,并执行第五交易得到包括第五交易的区块。
在获取包含第五交易的区块之前,当检测到所述第一区块链中超过预设个数个节点均生成所述第五交易,则所述第五交易被确认为可信交易。
本实施例提供的信息的传输方法,提供了与前述方案不同的获取包含第一交易的区块的方式,即在满足第一交易的交易条件之后,生成一个新的交易,包括第一交易,通过获取该新的交易的区块来实现第一交易的执行。
在上述任一实施例的具体的实现中,应理解,物联网设备或者用户设备均可与区块链的节点之间进行交互,即物联网设备或者用户设备可以向第一区块链的节点或者第二区块链的节点发送触发消息,触发第一区块链的节点或者第二区块链的节点生成相关的交易。
物联网设备或者用户设备也可以接收区块链节点发送的交易消息,该交易消息可以用来通知某个交易的执行结果或者执行情况,也可以通知交易结果触发的相关操作等,物联网设备或者用户设备根据接收到的通知消息执行相关的操作,然后反馈给区块链节点。对此本方案不做限制。
在上述的几个实施例的基础上,下面以数据共享和或设备共享为例,对本申请提供的信息的传输方式进行举例说明。
在图1所示的多链物联网系统架构的基础上,以区块链1(例如收益区块链)和区块链2(例如是数据交易区块链,其中区块链1的交易1的执行完成的前提条件是以区块链 2的交易2执行完成为例。图8为本申请提供的信息的传输方法应用在数据共享过程中的实例一的交互流程图,如图8所示,以该数据共享过程为例:B支付A钱,A给B提供数据,目标:当B真正拿到数据后,A才真正收到钱。上述数据共享过程可以称为AB事件;其中区块链1记录A-B之间的金钱交易信息,区块链2记录A-B之间的数据交易信息。
则该方案的具体实现过程如下:
步骤1,区块链1的某个节点(例如节点C)广播交易1(Transaction 1)。所述交易1是带有交易条件的,其中交易条件为:满足区块链2中AB数据交易成功后,区块链1的交易1执行完成。以数据共享为例,所述交易1可以是B支付A钱的信息。
在该方案的具体实现中,所述交易1(Transaction 1)的内容可以包括以下至少一项:A的标识,B的标识,AB事件标识,区块链2的标识,条件描述(区块链2中带有AB事件标识的交易2执行完成),B给A的金额。
步骤2,当B获得A提供的数据时,区块链2的某个节点(例如节点D)广播交易2,所述交易2用于通知AB之间进行数据交易。
在该方案的具体实现中,所述交易2内容可包括以下至少一项:A的标识,B的标识,区块链1的标识,AB事件标识,连接标识,共享数据的类型,共享数据的数量,时间等。
需要全文说明的是,AB事件标识关联至少两个不同区块链交易的标识。AB事件标识是多个链之间针对针对某个事件的共同标识。AB事件标识是为了识别跨链间的行为或者事件或者合约等所使用的共同标识。总之AB事件标识是一个跨链的标识。AB事件标识可以是其他名字例如事件标识,智能合约标识等等。
需要全文说明的是,连接标识是一个链内,关联至少两个交易的标识。同一个区块链内的至少两个交易设置一个专门用于关联区块链内的交易的连接标识,将区块链内的交易进行关联。特别地,例如将事件标识等同于连接标识,同一个区块链内的至少两个交易,对此本申请不做限制。
在该方案中,关于B获得A提供的数据:具体B如何具体获得数据的操作步骤,本方案不做限制。例如B可以通过A提供的接入账户和密码,从而访问数据服务器获得,可以是B直接将数据发送给A。
步骤3,区块链2节点收到节点D广播的交易2。区块链2的多个节点根据共识算法,其中某个节点获得生成区块的权利,由此生成区块,所述区块包含了上述交易2。
步骤4,当满足触发条件,区块链2节点向区块链1的节点发送通知消息,关于所述交易2执行完成。
一种具体实现方式中,该通知消息包括:区块链2标识,区块链1标识,AB事件标识,交易2所在的区块ID和交易2的index。
在上述步骤4中:
i、所述区块链2节点可以是:生成包含交易2的区块的节点;或者,在生成包含交易2的区块后的第M个区块的那个节点;或者,区块链网络基于某个算法,在X个节点中选举出Y个节点,所述Y个节点发送通知给区块链1的节点。具体地,例如,区块链2网络基于投票方法,从X个节点中选出Y个节点。
ii、触发发送通知消息的条件是:当包含交易2的区块被生成时;或者,当包含交易2的区块被生成之后,区块链2网络产生第M个区块时;或者,区块链2的多个节点可通过某个算法选举出一个节点来负责广播触发条件,当触发条件满足后,区块链2节点通知区块链1的节点,所述交易2执行完成。
步骤5,,当交易2执行完成后,交易1不能被撤回。(该步骤5为可选的步骤)。
步骤6,区块链1的节点确认交易2被写入区块链2的区块中。
具体的包括以下几种可选方式:
Option1:区块链的节点根据收到的通知消息,确认交易2被写入区块链2的区块中
Option2:区块链1的节点收到通知后,到区块链2中去读区块链2的内容,根据AB事件标识,确认交易2被写入区块链2的区块中。
Option3:区块链1的节点收到通知后,区块链1中的某些节点到区块链2中去读区块链2的内容,根据AB事件标识,确认交易2被写入区块链2的区块中。所述某些节点是通过区块链1中的S个网络节点选举出来的K个节点。
步骤7,当区块链2中所述交易2的所在区块深度大于M(M大于等于1的整数),区块链1的节点生成新交易3,所述交易3用于通知AB事件执行完成。
该步骤7为一种可选的执行方式,这里也可以是区块链1的节点直接获取包含交易1的区块,完成交易1的执行,对此本方案不做限制。
该交易3包括:A的标识,B的标识,AB事件标识,区块链2的标识,交易2的index+区块ID,条件描述(区块链2的带有AB事件标识的交易2执行完成),交易1的index+区块ID,B给A的金额。
步骤8,区块链1的节点接收到到,交易3,根据共识算法,其中某个节点获得生成区块的权利,由此生成区块,区块包含了上述交易3。
完成上述过程之后,A可获得B支付的钱,实现了数据共享的过程。
在图2所示的多链物联网系统架构的基础上,以区块链1(例如收益区块链)和区块链2(例如是数据交易区块链,其中区块链1的交易1的执行完成的前提条件是以区块链2的交易2执行完成为例。图9为本申请提供的信息的传输方法应用在数据共享过程中的实例二的交互流程图,如图9所示,以数据共享过程为例:B支付A钱,A给B提供数据,目标:当B真正拿到数据后,A才真正收到钱。上述数据共享过程可以称为AB事件;其中区块链1记录A-B之间的金钱交易信息,区块链2记录A-B之间的数据交易信息。
则该方案的具体实现过程如下:
步骤1,区块链1的某个节点(例如节点C)广播交易1(Transaction 1)。所述交易1是带有条件的,其中所述条件满足区块链2中AB数据交易成功后,区块链1的交易1执行完成。以数据共享为例,所述交易1可以是B支付A钱的信息。
一种具体实现中,所述交易1(Transaction 1)的内容包括:A的标识,B的标识,AB事件标识,区块链2的标识,条件描述(区块链2的带有AB事件标识的交易2执行完成),B给A的金额。
步骤2,当B获得A提供的数据后,区块链2的某个节点(例如节点D)广播交易2,,交易2用于通知AB之间进行数据交易。
该方案的具体实现中,交易2内容可包括:A的标识,B的标识,区块链1的标识,AB事件标识,交互数据类型,交互数据的数量等。
步骤3,区块链2节点收到广播的交易2。基于某共识算法那,交易2被写出区块链2的区块。
步骤4,当交易2执行完成后,交易1不能被撤回(可选步骤)。
步骤5,区块链1的节点,获知所述交易2执行完成即被写入区块链2区块。
以节点C为例,节点C是区块链1的节点(参与共识算法有能力生成区块的节点),又是区块链2的节点。当区块链2中交易2被写入区块链2区块后,节点C根据AB事件标识,节点C知道交易1和交易2的关系,由此确认交易1的条件被满足。
步骤6,当区块链2中所述交易2的所在区块深度大于M(M大于等于1的整数),区块链1的节点C生成新交易3,广播所述交易3给全网节点。所述交易3用于通知A-B事件执行完成。
该交易3可以包括:A的标识,B的标识,AB事件标识,区块链2的标识,交易2的index+区块ID,条件描述(区块链2的带有AB事件标识的交易2执行完成),B给A的金额。与前述实例一同样的,这里也可以是区块链1的节点直接获取包含交易1的区块,完成交易1的执行,对此本方案不做限制。
步骤7,区块链1的其他节点(例如节点D或节点E),生成交易3,广播交易3,所述交易3用于通知A-B事件执行完成。
步骤8,当区块链1的X个节点中有超过Y个节点(X大于等于Y)都生成交易3时,则交易3被认为是可信交易。
步骤9,区块链1的网络节点接收到到所述交易3,根据共识算法,其中某个节点获得生成区块的权利,由此生成区块,所述区块包含了上述交易3。
当交易3被写入区块链1的区块后,AB事件执行完成(举例,收益区块链1中B支付给A钱成功),共享数据过程执行完成。
在图3所示的多链物联网系统架构的基础上,以连接节点为第三方的可信节点,区块链1(例如收益区块链)和区块链2(例如是数据交易区块链,其中区块链1的交易1的执行完成的前提条件是以区块链2的交易2执行完成为例。图10为本申请提供的信息的传输方法应用在数据共享过程中的实例三的交互流程图,如图10所示,该数据共享过程为:B支付A钱,A给B提供数据,目标:当B真正拿到数据后,A才真正收到钱。上述数据共享过程可以称为AB事件;其中区块链1记录A-B之间的金钱交易信息,区块链2记录A-B之间的数据交易信息。
则该方案的具体实现过程如下:
步骤1,区块链1的某个节点(例如节点C)广播交易1(Transaction 1)。
所述交易1是带有条件的A-B事件,其中所述条件满足区块链2中A-B数据交易成功后,区块链1的交易1执行完成。以数据共享为例,所述交易1可以是B支付A钱的信息。
一种具体实现中,所述交易1(Transaction 1)的内容可包括:A的标识,B的标识,AB事件标识,区块链2的标识,条件描述(区块链2的带有AB事件标识的交易2执行 完成),B给A的金额;
步骤2,当B获得A提供的数据之后,区块链2的某个节点(例如节点D)广播交易2,所述交易2用于通知A-B之间进行数据交易。
步骤3,区块链2节点收到广播的交易2。基于某共识算法,交易2被写出区块链2的区块。
步骤4,连接节点(例如可信节点H,后续以可信节点为例说明方案内容。)发送通知消息给区块链1节点,用于通知所述交易2执行完成。
该通知消息可包括:区块链2标识,区块链1标识,AB事件标识,交易2所在的区块ID和交易2的标识。
步骤5,区块链1的节点收到可信节点H通知,确认交易2被写入区块链2的区块中。
Option1:区块链的节点根据收到的通知消息,确认交易2被写入区块链2的区块中
Option2:区块链1的节点收到通知后,到区块链2中去读区块链2的内容,根据AB事件标识,确认交易2被写入区块链2的区块中。
Option3:区块链1的节点收到通知后,区块链1中的某些节点到区块链2中去读区块链2的内容,根据AB事件标识,确认交易2被写入区块链2的区块中。
步骤6,当区块链2中所述交易2的所在区块深度大于M(M大于等于1的整数),区块链1的节点生成新交易3,广播所述交易3给全网节点所述交易3用于通知A-B事件执行完成。
交易3可包括:A的标识,B的标识,AB事件标识,区块链2的标识,交易2的标识和区块ID,条件描述(区块链2的带有AB事件标识的交易2执行完成),B给A的金额,交易1的标识(index)和区块ID。
步骤7,区块链1的网络节点接收到到所述交易3,根据共识算法,其中某个节点获得生成区块的权利,由此生成区块,所述区块包含了上述交易3。
步骤8,当交易3被写入区块链1的区块后,AB事件执行完成。
(举例,收益区块链1中B支付给A钱成功)完成数据共享和以及支付过程。
上述几种实例中,区块链1收到区块链2的消息,由此使得区块链1的交易1执行完成,即针对一个区块链某个交易X的执行完成的前提条件是另外一个区块链的交易Y的执行完成,提供了解决方案实现跨链交互。避免1个链中实现不同种类的交易(transaction),造成网络复杂度大和负荷大的问题。实现不同链执行不同的功能,有助于网络分层和可扩展,大大优化网络结构和减轻网络负担。
前述的几个实施例中均是以B是数据或者设备共享请求方,A是数据或者设备共享提供方,即数据共享的场景为例,在实际应用中,针对设备共享也可以采用前述的技术方案实现,下面针对设备共享场景对本方案进行说明。
图11为本申请提供的一种设备共享的应用场景示意图。如图11所示,其中包括两个区块链,即共享收益区块链和设备共享区块链,其中,设备共享区块链中的节点可以与不同的可共享设备连接,例如:汽车、终端设备、电气设备、车位等,共享收益区块链用于处理设备共享过程中的收益问题等。
下面实施例以共享为例,说明发明内容。其中下面的4个实施例中:
区块链1就是第一区块链,本实施例中区块链1就是共享收益区块链
区块链2就是第二区块链,本实施例中区块链2是设备共享区块链;
客户端B是共享设备请求方,或者客户端B体现为一个用户终端设备(User Equipment);
共享设备智能锁A在本实施例中是物联网设备的特例,以此说明发明内容。
本实施例中交易1就是第一交易,交易2就是第二交易,同理以此类推,不再赘述。
图12为本申请提供的信息的传输方法应用在数据共享过程中的实例四的交互流程图,以设备共享为例,图12所示实例的场景为:客户端B(共享设备请求方)请求使用共享设备智能锁A,且由客户端B协助开锁,则该方案的具体实现步骤为:
步骤1,客户端从区块链平台中获取周围能够使用的设备的信息,查看设备的相关属性或信息,然后选择合适的可以使用的设备。(可选的)
步骤2,客户端向区块链2(例如设备共享区块链)节点发送设备使用请求消息,请求消息中包含待使用的设备的标识,请求使用设备的用户的身份信息。此外,在该开锁请求消息中也可以包含一部分约定的需要锁定的物联币,对此本方案不做限制。
步骤3,区块链2节点在收到客户端发送的设备使用请求消息后,将设备使用请求消息广播在区块链网络中(即广播交易0,该交易0即前述实施例中的第零交易)。所述设备使用请求消息(交易0)可以包含:AB事件标识,A的标识,B的标识,生成交易开始时间(也可以是智能锁经交易开始时间记录着请求消息中)。
步骤4,区块链2网络对区块链节点广播的设备使用请求消息进行共识认证。
步骤5,区块链2节点1在确认完成共识认证后,区块链2节点1向客户端发送支付金额通知消息。所述支付金额通知至少包含了金额,智能锁拥有者的公钥。
步骤6,区块链1的节点1收到客户端支付智能锁交易消息。
步骤7,区块链1网络对区块链节点广播的AB收益交易消息(即广播交易1,该交易1即前述方案中的第一交易)。
其中该AB收益交易消息包含AB事件ID,和交易条件。完成所述交易的条件为开锁确认,即区块链2中智能锁A给共享设备请求方B开锁(交易2,即前述方案中的第二交易),则智能锁A或者智能锁A的所有者收到共享设备请求B支付的钱即交易1完成】。
步骤8,区块链1节点对AB收益交易消息进行共识认证。即区块链1节点基于共识算法,其中一个节点赢得产生区块权利,产生一个区块,所述区块包含所述交易1。
步骤9,区块链1节点1在确认完成共识认证后,向区块链2节点发送AB收益交易通知消息(即前述实施例中的第二触发消息)。所述通知消息中包含以下至少一项:第一区块链标识,第二区块链标识,AB事件ID,AB收益交易(交易1)所在的区块号和交易index。
步骤10,区块链2节点1收到所述AB收益交易通知后,提供开锁密码或者密钥给客户端。
步骤11,客户端向智能锁发送开锁指令消息,该开锁指示消息中包含有客户端发送的设备使用请求消息中包含的信息,例如开锁密码或者密钥,待使用设备标识,或用户身份信息等。
步骤12,智能锁打开后,区块链智能锁向区块链节点1返回开锁完成反馈消息,该开锁完成反馈消息中包含开锁确认时间信息。
步骤13,区块链2节点1在收到开锁完成反馈消息后,在区块链网络中广播开锁确认消息(广播交易2,该交易2即前述实施例中的第二交易)进行区块链共识认证。所述开锁确认消息中包含AB事件ID。
步骤14,区块链网络对开锁确认消息(交易2)进行共识认证。
步骤15,区块链2节点1在确认开锁确认消息在区块链网络完成共识认证后,向区块链1节点发送开锁认证完成指示消息(即前述方案中的通知消息),以通知所述区块链所述交易2完成(即实现智能锁已经开锁)。为方便对交易信息的查询,认证完成指示消息中可以包含开锁确认消息所在的区块高度信息。即区块链2节点通知区块链1的节点关于所述交易2执行完成,其中,该开锁认证完成指示消息(即前述方案中的通知消息)可包括以下任意一项:AB事件ID,开锁确认消息所在的区块号和交易index。
步骤16,区块链1节点1收到开锁认证完成指示消息后,在区块链1网络广播AB收益确认消息(即前述方案中的第三交易)。所述消息中包含了AB事件ID,开锁确认消息所在的区块号和交易index,AB收益交易所在的区块号,和交易index(也称为交易标识)。
步骤17,区块链1网络对AB收益交易确认消息进行区块链共识认证。
步骤18,客户端确认可以结束交易,并发生关锁指示消息;客户端向智能锁发送关锁指示信息。
步骤19,智能锁关锁后发送关锁确认消息给区块链2节点1。
步骤20,区块链2节点1在收到智能锁返回的关锁指示消息后,将客户端在步骤18智能锁返回的关锁指示打包为一个关锁交易指示。在区块链2广播关锁确认消息(广播交易4,该交易4即前述的第四交易)。
具体地,关锁确认消息中包含设备标识,用户身份信息,以及关联的开锁确认消息所在的区块的高度信息(以方便将来进行交易查询操作时,可以快速关联开关锁的交易所在的区块)。
或者,也可以考虑将关锁的交易专门记录在一个独立的区块链里,而不与开锁的交易记录在同一个区块链里,这样在交易查询时,查询节点可以快速从两个区块链里提取出关联的两个交易的信息。
步骤21,区块链2网络节点对关锁交易(交易4,即前述方案中的第四交易)进行区块链认证。
步骤22,区块链2节点在确认完成共识认证后,向客户端发送关锁完成指示信息,以指示区块链智能锁关闭。
在本方案中,交易2执行完成后发送的开锁确认消息触发了交易3的过程,与前述方案中的第四交易执行完成触发第三交易的生成并不冲突,该方案的含义是,两个区块链中,一个区块链某个交易的执行完成,能够触发另一个区块链上的新的交易的生成,具体是第几交易本方案并不做限制。
图13为本申请提供的信息的传输方法应用在数据共享过程中的实例五的交互流程图,以设备共享为例,图13所示实例的场景与图12类似为:客户端B请求使用共享设备 智能锁A,且由客户端B协助开锁,则该方案的具体实现步骤为:
步骤1,客户端从区块链平台中获取周围能够使用的设备的信息,查看设备的相关属性或信息,然后选择合适的可以使用的设备。
步骤2,客户端向区块链2(即设备共享区块链)节点发送设备使用请求消息,该设备使用请求消息中包含待使用的设备的标识,请求使用设备的用户的身份信息。此外,在该开锁请求消息中也可以包含一部分约定的需要锁定的物联币。例如,所述请求消息中包含客户端用户标识或账号信息。
步骤3,区块链2节点1提供开锁密码或者密钥给客户端。
步骤4,客户端向智能锁发送开锁指令消息,该开锁指示消息中包含有客户端发送的设备使用请求消息中包含的信息,例如开锁密码或者密钥,待使用设备标识,或用户身份信息等。
步骤5,智能锁打开后,智能锁向区块链2节点1返回开锁完成反馈消息,该开锁完成反馈消息中包含开锁确认时间信息。
步骤6,区块链2节点1在收到开锁完成反馈消息后,在区块链2网络中广播开锁确认消息(广播交易2,该交易2即前述实施例中的第二交易)。所述开锁确认消息中包含AB事件标识。AB事件标识是为了完成智能锁A给B开锁,B付钱这个事件,关联区块链1(AB收益区块链)和区块链2(设备共享区块链)的事件标识。所述开锁确认消息就是交易2。
步骤7,区块链2网络对开锁确认消息(交易2)进行共识认证。
本申请中的“共识认证”就是在区块链中网络多个节点(至少2个节点),基于某种共识算法,其中某个节点获得了生成区块的权利。例如区块链2网络对开锁确认消息(交易2)进行共识认证,即区块链2网络节点,基于某种共识算法,其中某个节点获得了生成包含交易2的区块。所述区块中除了包含第一交易外,还可以包含其他交易,在此不做限制。或者,本申请中的“对交易进行共识认证”就是区块链中网络多个节点(至少2个节点),其中某个节点获得了生成区块的权利,将交易包含到区块内,生成区块。例如区块链2网络对开锁确认消息(交易2)进行共识认证,即区块链2网络节点,其中某个节点获得了生成包含交易2的区块权利,生成包含交易2的区块。所述区块中除了包含交易2外,还可以包含其他交易,在此不做限制。适用于本申请所有实施例,不一一赘述。
步骤8,区块链2节点1在确认完成共识认证后,向区块链1节点发送开锁认证完成指示(即前述方案中的第一触发消息)。所述开锁认证完成指示(第一触发消息)中包含了AB事件ID,区块链1的标示,区块链2的标识,开锁确认消息(交易2)所在的区块号和交易index。进一步地,区块链1节点确认所述开锁确认消息(交易2)在区块链2区块中(具体地,例如区块链1节点去读区块链2网络信息,由此确认开锁确认消息(交易2)在区块链2区块中)。
步骤9:区块链1服务器确认所述开锁确认消息在区块链2区块中(例如区块链1服务器去读区块链2网络信息)。
可选的,交易2生成后该交易1不可撤销。
步骤10,区块链1网络向区块链1节点广播的AB收益交易消息(即广播交易1,该 交易1即前述实施例中的第一交易)。
其中该AB收益交易消息(即交易1)包含AB事件ID,和交易条件。完成所述交易的条件为关锁确认后A收到B钱即交易1完成,或者完成所述交易的条件为:区块链2中A给B开锁(交易2,即前述方案中的第二交易)和关锁(交易4,即前述方案中的第四交易),则A收到B钱即交易1完成。
步骤11,区块链1节点对AB收益交易消息(即交易1)进行共识认证。具体的:区块链1节点基于共识算法,其中一个节点赢得产生区块权利,产生一个区块,所述区块包含所述交易1。
步骤12,客户端确认可以结束交易,并发生关锁指示消息;客户端向智能锁发送关锁指示信息。
步骤13,智能锁关锁后发送关锁确认消息(交易4),给区块链2节点(例如节点1)。
步骤14,区块链2节点1在收到智能锁返回的关锁指示消息后,将客户端在步骤12智能锁返回的关锁确认消息打包为一个关锁交易。
具体地,关锁确认消息中包含设备标识,用户身份信息,以及关联的开锁确认消息所在的区块的高度信息(以方便将来进行交易查询操作时,可以快速关联开关锁的交易所在的区块)。
或者,也可以考虑将关锁的交易专门记录在一个独立的区块链里,而不与开锁的交易记录在同一个区块链里,这样在交易查询时,查询节点可以快速从两个区块链里提取出关联的两个交易的信息。
步骤15,区块链2节点1在区块链2广播所述关锁确认消息(交易4),其中包括AB事件ID,交易4所在的区块和交易index。
步骤16,区块链2网络节点对所述关锁确认消息(交易4)进行区块链认证。
步骤17,区块链2节点1在确认关锁确认消息(交易4),在区块链网络完成共识认证后,向区块链1节点发送关锁认证完成指示消息(第三触发消息),以指示所述区块链1智能锁已经关锁。所述关锁认证完成指示消息(第三触发消息),即区块链2节点通知区块链1的节点关于所述交易4执行完成,其中可包括AB事件ID,关锁确认消息(交易4),所在的区块号和交易index。为方便对交易信息的查询,认证完成指示消息中可以包含开锁确认消息所在的区块高度信息。
关于如何确认交易4在区块链中,如本申请此前实例的各种方法,但不仅限于本申请的方法。本实施例,例如,一种具体的方式中,区块链1节点可通过读取区块链2的内容,确认交易4在区块链2的区块中。
步骤18,广播交易3。即区块链1节点1收到关锁认证完成指示消息(第三触发消息),后,在区块链1网络广播AB收益确认消息(交易3,即前述方案中的第三交易)。所述消息中包含了AB事件ID,关锁确认消息所在的区块号和交易index,AB收益交易所在的区块号和交易index。
步骤19,区块链1网络对AB收益交易确认消息(交易3)进行区块链共识认证。
步骤20,区块链1节点在确认完成共识认证后,向客户端发送关锁交易信息,所述信息中包含使用该智能锁所支付的金额。
在上述两个实例中,还可以包括区块链平台,用于生成交易信息,还可以对每个交易的信息进行显示。
图14为本申请提供的信息的传输方法应用在数据共享过程中的实例六的交互流程图,以设备共享为例,图14所示实例的场景为:客户端B请求使用共享设备智能锁A,且由网络节点协助开锁,则该方案的具体实现步骤为:
步骤1,客户端从区块链平台中获取周围能够使用的设备的信息,查看设备的相关属性或信息,然后选择合适的可以使用的设备。
步骤2,客户端向区块链2节点1发送设备使用请求消息,该设备使用请求消息中包含待使用的设备的标识,请求使用设备的用户的身份信息。此外,在该开锁请求消息中也可以包含一部分约定的需要锁定的物联币。
步骤3,区块链2节点1在收到客户端发送的设备使用请求消息后,将设备使用请求消息广播在区块链网络中进行共识认证(广播交易0)。所述设备使用请求消息(交易0即前述方案中的第零交易)可以包含:AB事件标识,A的标识,B的标识,生成交易开始时间(也可以是智能锁经交易开始时间记录着请求消息中)。
步骤4,区块链2网络对区块链节点广播的设备使用请求消息进行共识认证。
步骤5,区块链2节点1在确认完成共识认证后,向智能锁发送支付金额通知消息。
步骤6,区块链1的节点1收到支付消息,消息中包含客户端支付智能锁金额。
步骤7,区块链1网络对区块链1节点广播的AB收益交易消息(广播交易1,该交易1即前述方案中的第一交易)。其中该AB收益交易消息包含AB事件ID,和完成所述交易的条件为开锁确认,B支付A的金额,还可以包括以下至少一项:A的标识,B的标识,连接标识1。
步骤8,区块链1节点对AB收益交易消息进行共识认证
步骤9,区块链1节点1在确认完成共识认证后,向区块链2节点AB收益交易通知(即前述方案中的第二触发消息)。所述通知消息中包含了AB事件ID,AB收益交易所在的区块号和交易index。
步骤10,区块链2节点1收到所述AB收益交易通知后,向智能锁发送开锁指示消息,该开锁指示消息中包含有客户端发送的设备使用请求消息中包含的信息,例如待使用设备标识,用户身份信息等。
步骤11,智能锁向区块链2节点1返回开锁完成反馈消息,该开锁完成反馈消息中包含开锁确认时间信息。
步骤12,区块链2节点1在收到开锁完成反馈消息后,在区块链2网络中广播开锁确认消息(广播交易2,该交易2即前述方案中的第二交易)。所述开锁确认消息中包含AB事件ID.还可以包括以下至少一项:A的标识,B的标识,连接标识1。
步骤13,区块链2网络对开锁确认消息进行共识认证。
步骤14,区块链2节点1在确认开锁确认消息在区块链2网络完成共识认证后,向智能锁发送开锁认证完成指示消息,以指示智能锁进行开锁。为方便对交易信息的查询,认证完成指示消息中可以包含开锁确认消息所在的区块高度信息。
步骤15,同时,区块链2节点1在确认开锁确认消息在区块链完成共识认证后,向 客户端发送开锁认证完成指示消息。为方便对交易信息的查询,开锁完成指示消息中可以包含开锁确认消息所在的区块的区块高度信息。(可选)
步骤16,区块链2节点向区块链1节点发送开锁确认通知消息(即前述方案中的第三触发消息)。所述开锁确认消息包含了AB事件ID,开锁确认消息所在的区块好和交易index。
+可选步骤A:区块链1收到开锁确认通知消息后,区块链1交易1无法撤销;或者,
+可选步骤B:区块链1节点收到开锁确认通知消息后,去读区块链2的内容,确认区块链2交易2内容真实存在。
步骤17,区块链1节点1收到后,向区块链1广播AB收益确认消息(交易3,即前述方案的第三交易),所述消息包括区块链2开锁确认消息所在的区块号和交易index,区块链1AB收益交易所在的区块号和交易index,AB事件ID等。
步骤18,区块链1网络对AB收益交易确认消息进行共识认证。
步骤19,客户端确认可以结束交易,并发生关锁指示消息。
步骤20,区块链2节点1在收到客户端的关锁指示信息后,向智能锁发送关锁指示消息。
步骤21智能锁在收到区块链节点1发送的关锁指示信息后,向区块链2节点1发送关锁确认消息。
步骤22,区块链2节点1在收到智能锁返回的关锁指示消息后,将客户端在步骤19中发送的关锁指示指示消息和步骤21智能锁返回的关锁确认消息共同打包为一个关锁交易指示消息(交易4),在区块链平台进行共识认证。
具体地,关锁指示消息中包含设备标识,用户身份信息,以及关联的开锁指示消息所在的区块的高度信息(以方便将来进行交易查询操作时,可以快速关联开关锁的交易所在的区块)。
或者,也可以考虑将关锁的交易专门记录在一个独立的区块链里,而不与开锁的交易记录在同一个区块链里,这样在交易查询时,查询节点可以快速从两个区块链里提取出关联的两个交易的信息。
步骤23,区块链2节点发送关锁确认通知(第4触发消息)给区块链1节点。
步骤24,区块链1节点广播关锁确认通知(交易5)。
步骤25,区块链2网络对开锁确认消息进行共识认证。
步骤26,区块链2网络节点对关锁交易进行区块链认证。
步骤27,区块链2节点在确认完成共识认证后,向智能锁发送关锁指示,以指示区块链智能锁可以关闭。
步骤28,同时,区块链2节点1向客户端发送关锁完成指示。
图15为本申请提供的信息的传输方法应用在数据共享过程中的实例七的交互流程图,以设备共享为例,图15所示实例的场景为:客户端B请求使用共享设备智能锁A,且由网络节点协助开锁,则该方案的具体实现步骤为:
步骤1,客户端从区块链2平台中获取周围能够使用的设备的信息,查看设备的相关属性或信息,然后选择合适的可以使用的设备;
步骤2,客户端向区块链2节点(例如节点1)发送设备使用请求消息,该设备使用请求消息中包含待使用的设备的标识,请求使用设备的用户的身份信息。此外,在该开锁请求消息中也可以包含一部分约定的需要锁定的物联币。
步骤3,区块链2节点1向智能锁发送开锁指令消息,该开锁指示消息中包含有客户端发送的设备使用请求消息中包含的信息,例如开锁密码或者密钥,待使用设备标识,或用户身份信息等。
步骤4,智能锁打开后,区块链智能锁向区块链2节点1返回开锁完成反馈消息.例如该开锁完成反馈消息中包含开锁确认时间信息。
步骤5,区块链智能锁向区块链2节点1向客户端发送开锁完成指示。(可选)
步骤6,区块链2节点1在收到开锁完成反馈消息后,在区块链网络中广播开锁确认消息(交易2,即前述第二交易)进行区块链共识认证。所述开锁确认消息中包含AB事件ID。
步骤7,区块链2网络对开锁确认消息进行共识认证。
步骤8,区块链2节点1在确认完成共识认证后,向区块链1节点发送开锁通知消息。所述通知消息中包含了AB事件ID,AB收益交易所在的区块号和交易index。
步骤9,区块链1节点确认所述通知消息在区块链2区块中(例如区块链1节点去读区块链2网络信息)。
步骤10,区块链1节点(例如节点1)广播的AB收益交易消息(即广播交易1,该交易1即前述方案中的第一交易)。其中该AB收益交易消息包含AB事件ID,和完成所述交易的条件为关锁确认。
步骤11,区块链1节点对AB收益交易消息进行共识认证。
步骤12,客户端确认可以结束交易,并发生关锁指示消息;客户端向区块链2节点发送关锁指示消息
步骤13,区块链2节点(例如节点1)发送关锁指示消息给智能锁。
步骤14,智能锁关锁后发送关锁确认消息给客户端。
步骤15,智能锁关锁后发送关锁确认消息给块链2节点1。
步骤16,区块链2节点1在收到智能锁返回的关锁确认消息后,将客户端在步骤15能锁返回的关锁确认消息打包为一个关锁交易。
具体地,,关锁确认消息中包含设备标识,用户身份信息,以及关联的开锁确认消息所在的区块的高度信息(以方便将来进行交易查询操作时,可以快速关联开关锁的交易所在的区块)。
或者,也可以考虑将关锁的交易专门记录在一个独立的区块链里,而不与开锁的交易记录在同一个区块链里,这样在交易查询时,查询节点可以快速从两个区块链里提取出关联的两个交易的信息。
步骤17,区块链2节点1在区块链2广播所述关锁确认消息(交易4,即前述方案中的第四交易)。
步骤18,区块链2网络节点对所述关锁确认消息进行区块链认证。
步骤19,区块链2节点(例如节点1)向区块链1节点发送关锁认证完成指示消息(即 第三触发消息),以通知所述区块链智能锁已经关锁。为方便对交易信息的查询,认证完成指示消息中可以包含关锁确认消息所在的区块高度信息。
步骤20,区块链1节点确认交易4区块链2的区块中(e.g节点读取区块链2的内容)。
步骤21,区块链1节点(例如节点1)收到关锁认证完成指示消息后,在区块链1网络广播AB收益确认消息(交易3,即前述方案中的第三交易)。所述消息中包含了AB事件ID,关锁确认消息所在的区块好和交易index,AB收益交易所在的区块号和交易index。
步骤21,区块链1网络对AB收益交易确认消息进行区块链共识认证。
区块链1节点在确认完成共识认证后,向客户端发送关锁交易信息,所述信息中包含使用该智能锁所支付的金额。
在上述所有实施例中,应理解:本申请中的“交易”,可以是信息,可以是数据,可以是消息等形式不限。例如交易是记录设备使用的信息,例如是使用设备所花费的金钱交易,例如交易是一个通知关闭设备的消息。
本申请中的“交易”,可以包括以下至少一项:第一区块链的标识、连接标识、第二区块链的标识、第二区块链的标识、第二交易的标识,第二交易所在区块的标识,业务标识,数据的类型、数据的数据量,等信息。
可选地,针对不同区块链或者针对不同业务类型的区块链,所述“交易”可以包括以下一项:公钥,地址,设备标识,数据标识,支付金额等。其中,所述公钥可以是交易各方的公钥,所述地址可以是交易各方的地址,或者是设备的地址。
本申请中的“触发消息”,可选地,所述“触发消息”可以包括以下至少一项:事件标识,连接标识、第一区块链的标识、第二区块链的标识、第一交易的标识,第一交易所在区块的标识,第二交易的标识,第二交易所在区块的标识,业务标识,数据的类型、数据的数量。所述事件标识,例如可以是第一事件标识或者第二事件标识。所述连接标识可以第一连接标识或者第二连接标识。
本申请中的“事件标识”用于关联至少两个不同区块链的交易,或者事件标识是关联至少两个不同区块链交易的标识。事件标识是多个链之间针对针对某个事件的共同标识。事件标识是为了识别跨链间的行为或者事件或者合约等所使用的共同标识。总之事件标识是一个跨链的标识。事件标识可以叫其他名字例如任务标识,跨链标识,或者智能合约标识等等,本申请不做任何限制。具体地,本申请以事件标识来说明方案内容,例如“事件标识”由区块链标识,交易所在的区块标识,交易的标识共同组成。例如事件标识关联了两个区块链,则事件标识可以是由区块链X标识,区块链Y标识组成,例如区块链X标示是000,区块链Y标识是111,补充标示001,则事件标识可以是区块链X标示+区块链Y标识+补充标示,即001000111001。所述事件标识可以是第一事件标识,第二事件标识等。例如,所述第一事件标识,具体地所述第一事件标识由第二区块链,第二交易所在的区块,第二交易的标识组成。
本申请中提到的“连接标识”用于关联同一个区块链的至少两个交易,或者连接标识用于关联同一个区块链的不同交易。同一个区块链内的至少两个交易设置一个专门用于关联区块链内的交易的连接标识,将区块链内的交易进行关联。特别地通过连接标识关 联同一个区块链的交易,这些交易是相关交易。例如这些交易是同一个业务的不同过程的信息记录,例如B给A共享设备(锁),区块链Z的交易y是开锁记录,区块链Z的x交易是关锁交易,这两个交易是相关交易。又例如,特别地,例如将事件标识等同于连接标识,关联同一个区块链内的至少两个交易,也是可以的。对此本申请不做限制。
图16为本申请提供的信息的传输装置实施例一的结构示意图,如图16所示,该信息的传输装置10包括:
发送模块11,用于向所述信息的传输装置所属的第一区块链中的其他节点发送第一交易;所述第一交易包括第一事件标识和交易条件;所述第一事件标识用于关联所述第一交易和第二区块链中的第二交易;所述交易条件包括:第二区块链中包含所述第一事件标识的第二交易完成后,执行所述第一区块链的第一交易;
处理模块12,用于在确定满足所述交易条件时,获取包含所述第一交易的区块。
本实施例提供的信息的传输装置用于执行前述方法实施例中的第一区块链节点的技术方案,其实现原理和技术效果类似,在此不再赘述。
图17为本申请提供的信息的传输装置实施例二的结构示意图,如图17所示,该信息的传输装置10还包括:接收模块13;
所述处理模块12具体用于在所述第一区块链中生成包含所述第一交易的区块;
或者,
接收模块13用于接收所述第一区块链中的其他至少一个节点发送的包含所述第一交易的区块。
在上述任一实施例的基础上,所述处理模块12具体用于:
确定所述第二区块链的区块中包含所述第二交易,则满足所述第一交易的所述交易条件。
可选的,所述接收模块13还用于接收通知消息;所述通知消息用于通知所述第二交易执行完成;
所述处理模块还用于根据所述通知消息确定所述第二区块链中的区块包含所述第二交易。
可选的,所述接收模块13具体用于:
接收至少一个第二区块链中的节点发送的通知消息;
或者,
接收第二区块链中生成包含所述第二交易的区块的节点发送的通知消息;
或者,
接收连接节点发送的通知消息;所述连接节点用于连接所述第一区块链与所述第二区块链。
可选的,所述通知消息包括以下至少一项:
所述第一事件标识,所述第二区块链的标识,第二交易的标识和包含所述第二交易的区块标识,第一区块链的标识。
可选的,所述处理模块12具体用于:
根据所述通知消息读取所述第二区块链的内容,根据所述第一事件标识确认所述第二 交易已写入所述第二区块链中的区块。
可选的,所述处理模块12还具体用于:
获取所述第二区块链中与包含所述第二交易的区块的深度;
当所述第二区块链中包含所述第二交易的区块的深度大于预设深度时,确定满足所述交易条件。
可选的,接收模块13用于接收第一触发消息,所述第一触发消息用于触发所述第一区块链的节点生成所述第一交易;
所述处理模块12还用于根据所述第一触发消息生成所述第一交易。
可选的,所述发送模块11还用于向所述第二区块链的至少一个节点发送第二触发消息,所述第二触发消息用于触发所述第二区块链的节点生成所述第二交易。
可选的,接收模块13用于接收发送的第三触发消息,所述第三触发消息用于触发所述第一区块链的节点生成第三交易;所述第三触发消息包括第二事件标识,所述第二事件标识用于关联所述第一交易;
处理模块12用于根据所述第三触发消息生成所述第三交易;
或者,
接收模块13用于接收所述第一区块链的其他节点发送的第三交易;
其中,所述第三交易包括第一连接标识,所述第一连接标识用于关联所述第一区块链中的至少两个交易。
可选的,所述第二事件标识包括所述第一事件标识。
上述任一实现方式提供的信息的传输装置10用于执行前述方法实施例中的第一区块链节点的技术方案,其实现原理和技术效果类似,在此不再赘述。
图18为本申请提供的信息的传输装置实施例三的结构示意图,如图18所示,该信息的传输装置20包括:
发送模块21,用于向所述信息的传输装置所属的所述第二区块链中的其他节点发送第二交易;所述第二交易包括第二连接标识和/或第一事件标识;其中,所述第二连接标识用于关联所述第二区块链中的至少两个交易,所述第一事件标识用于关联所述第二交易和第一区块链中的第一交易;
处理模块22,用于获取包含所述第二交易的区块。
本实施例提供的信息的传输装置20用于执行前述方法实施例中的第二区块链节点的技术方案,其实现原理和技术效果类似,在此不再赘述。
图19为本申请提供的信息的传输装置实施例四的结构示意图,如图19所示,该信息的传输装置20还包括:接收模块23;
所述处理模块22具体用于在所述第二区块链中生成包含所述第二交易的区块;
或者,
接收模块23,用于接收所述第二区块链的其他节点发送的包含所述第二交易的区块。
在上述任一实施例的具体实现中,所述发送模块21还用于向所述第一区块链中的至少一个节点发送通知消息;所述通知消息用于通知所述第二交易执行完成。
可选的,所述发送模块21具体用于:
当包含所述第二交易的区块被生成时,向所述第一区块链中的至少一个节点发送通知消息;
或者,
当包含了所述第二交易的区块之后产生预设个数个区块时,向所述第一区块链中的至少一个节点发送通知消息;
或者,
满足预设的触发条件时,向所述第一区块链中的至少一个节点发送通知消息;
其中,所述通知消息用于通知所述第二交易执行完成。
可选的,所述发送模块21还用于向所述第一区块链的至少一个节点发送第一触发消息,所述第一触发消息用于触发所述第一区块链的节点生成所述第一交易。
可选的,所述接收模块23还用于接收发送的第二触发消息,所述第二触发消息用于触发所述第二区块链的节点生成所述第二交易;
所述发送模块21还用于根据所述第二触发消息向设备发送交易消息;所述交易消息用于指示所述设备执行所述交易消息中通知的操作和内容;
所述接收模块23还用于接收所述设备返回的反馈消息;
所述处理模块22还用于根据所述反馈消息生成所述第二交易。
可选的,所述处理模块22还用于生成第四交易;
所述发送模块21还用于向所述第二区块链中的其他节点发送所述第四交易;所述第四交易包括:第二连接标识;所述第二连接标识用于关联所述第四交易和所述第二交易;
所述处理模块22还用于获取包含所述第四交易的区块。
可选的,所述发送模块21还用于:
当包含所述第四交易的区块被生成时,向所述第一区块链中的至少一个节点发送第三触发消息;
或者,
当包含了所述第四交易的区块之后产生预设个数个区块时,向所述第一区块链中的至少一个节点发送第三触发消息;
或者,
满足预设的触发条件时,向所述第一区块链中的至少一个节点发送第三触发消息;
其中,所述第三触发消息用于触发所述第一区块链的节点生成第三交易;所述第三触发消息包括第二事件标识,所述第二事件标识用于关联所述第一交易。
上述任一实现方式提供的信息的传输装置20用于执行前述方法实施例中的第二区块链节点的技术方案,其实现原理和技术效果类似,在此不再赘述。
图20为本申请提供的信息的传输装置实施例五的结构示意图,如图20所示,该信息的传输装置30包括:
发送模块31,用于向第一区块链的节点或者第二区块链的节点发送触发消息;所述触发消息用于触发区块链的节点生成交易。
图21为本申请提供的信息的传输装置实施例六的结构示意图,如图21所示,该信息的传输装置40包括:
接收模块41,用于接收第一区块链的节点或者第二区块链的节点发送的交易消息;
发送模块42,用于根据所述交易消息向所述第一区块链的节点或者第二区块链的节点返回反馈消息;所述反馈消息用于触发区块链的节点生成交易。
可选的,所述信息的传输装置40还包括:
处理模块43,用于执行所述交易消息中指示的操作或者内容。
上述图20和图21所示的信息的传输装置30和40用于执行前述任一方法实施例中涉及到的用户设备或者物联网设备的技术方案,例如:执行手机、电脑或者共享汽车,共享数据的电脑等的技术方案,其实现原理和技术效果与前述类似,对此本方案不做限制。
本申请还提供一种节点设备,包括:存储器、处理器、发送器、接收器以及计算机程序,所述计算机程序存储在所述存储器中,所述处理器运行所述计算机程序执行前述方法实施例中区块链的节点的信息的传输方法。
在上述节点设备的具体实现中,处理器的数量为至少一个,用来执行存储器存储的执行指令,即计算机程序。使得节点设备通过通信接口与其他的节点设备、其他区块链的节点设备、物联网设备或者用户设备之间进行数据交互来执行上述各种实施方式提供的信息的传输方法,可选的,存储器还可以集成在处理器内部。
本申请还提供一种用户设备,包括:存储器、处理器、发送器、接收器以及计算机程序,所述计算机程序存储在所述存储器中,所述处理器运行所述计算机程序执行前述任一实现方案中用户设备:例如手机的信息的传输方法。
本申请还提供一种物联网设备,包括:存储器、处理器、发送器、接收器以及计算机程序,所述计算机程序存储在所述存储器中,所述处理器运行所述计算机程序执行前述任一实现方案中物联网设备的信息的传输方法。
在上述用户设备或者物联网设备的具体实现中,处理器的数量为至少一个,用来执行存储器存储的执行指令,即计算机程序。使得用户设备或者物联网设备通过通信接口与区块链的节点之间进行数据交互,来执行上述各方面的各种实施方式提供的信息的传输方法,可选的,存储器还可以集成在处理器内部。
本申请还提供一种存储介质,包括:可读存储介质和计算机程序,所述计算机程序用于实现前述任一实施例中区块链节点的信息的传输方法。
本申请还提供一种存储介质,包括:可读存储介质和计算机程序,所述计算机程序用于实现前述任一实施例中物联网设备或者用户设备的信息的传输方法。
本申请还提供一种程序产品,该程序产品包括计算机程序(即执行指令),该计算机程序存储在可读存储介质中。区块链的节点设备的至少一个处理器可以从可读存储介质读取该计算机程序,至少一个处理器执行该计算机程序使得节点设备实施前述各种实施方式提供的信息的传输方法。
本申请还提供一种程序产品,该程序产品包括计算机程序(即执行指令),该计算机程序存储在可读存储介质中。物联网设备或者用户设备的至少一个处理器可以从可读存储介质读取该计算机程序,至少一个处理器执行该计算机程序使得物联网设备或者用户设备实施上述各种实施方式提供的信息的传输方法。
在节点设备、用户设备或者物联网设备的具体实现中,应理解,处理器可以是中央处 理单元(英文:Central Processing Unit,简称:CPU),还可以是其他通用处理器、数字信号处理器(英文:Digital Signal Processor,简称:DSP)、专用集成电路(英文:Application Specific Integrated Circuit,简称:ASIC)等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。
实现上述各方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成。前述的程序可以存储于一可读取存储器中。该程序在执行时,执行包括上述各方法实施例的步骤;而前述的存储器(存储介质)包括:只读存储器(英文:read-only memory,缩写:ROM)、RAM、快闪存储器、硬盘、固态硬盘、磁带(英文:magnetic tape)、软盘(英文:floppy disk)、光盘(英文:optical disc)及其任意组合。

Claims (48)

  1. 一种信息的传输方法,其特征在于,应用于第一区块链中的节点,所述方法包括:
    向所述第一区块链中的其他节点发送第一交易;所述第一交易包括第一事件标识和交易条件;所述第一事件标识用于关联所述第一区块链的第一交易和第二区块链的第二交易;所述交易条件包括:第二区块链中包含所述第一事件标识的第二交易完成后,执行所述第一区块链的第一交易;
    在确定满足所述交易条件时,获取包含所述第一交易的区块。
  2. 根据权利要求1所述的方法,其特征在于,所述获取包含所述第一交易的区块,包括:
    在所述第一区块链中生成包含所述第一交易的区块;
    或者,
    接收所述第一区块链中的其他至少一个节点发送的包含所述第一交易的区块。
  3. 根据权利要求1或2所述的方法,其特征在于,确定满足所述交易条件,包括:
    确定所述第二区块链的区块中包含所述第二交易,则满足所述第一交易的所述交易条件。
  4. 根据权利要求3所述的方法,其特征在于,所述确定所述第二区块链的区块中包含所述第二交易,包括:
    接收通知消息;所述通知消息用于通知所述第二交易执行完成;
    根据所述通知消息确定所述第二区块链中的区块包含所述第二交易。
  5. 根据权利要求4所述的方法,其特征在于,所述接收通知消息,包括:
    接收至少一个第二区块链中的节点发送的通知消息;
    或者,
    接收第二区块链中生成包含所述第二交易的区块的节点发送的通知消息;
    或者,
    接收连接节点发送的通知消息;所述连接节点用于连接所述第一区块链与所述第二区块链。
  6. 根据权利要求4或5所述的方法,其特征在于,所述通知消息包括以下至少一项:
    所述第一事件标识,所述第二区块链的标识,第二交易的标识和包含所述第二交易的区块标识,第一区块链的标识。
  7. 根据权利要求4至6任一项所述的方法,其特征在于,所述确定所述第二区块链的区块中包含所述第二交易,还包括:
    根据所述通知消息读取所述第二区块链的内容,根据所述第一事件标识确认所述第二交易已写入所述第二区块链中的区块。
  8. 根据权利要求1至7任一项所述的方法,其特征在于,确定满足所述交易条件,包括:
    获取所述第二区块链中与包含所述第二交易的区块的深度;
    当所述第二区块链中包含所述第二交易的区块的深度大于预设深度时,确定满足所述交易条件。
  9. 根据权利要求1所述的方法,其特征在于,向所述第一区块链中的其他节点发送第一交易之前,所述方法还包括:
    接收第一触发消息,所述第一触发消息用于触发所述第一区块链的节点生成所述第一交易;
    根据所述第一触发消息生成所述第一交易。
  10. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    向所述第二区块链的至少一个节点发送第二触发消息,所述第二触发消息用于触发所述第二区块链的节点生成所述第二交易。
  11. 根据权利要求1、8或9任一项所述的方法,其特征在于,所述方法还包括:
    接收发送的第三触发消息,所述第三触发消息用于触发所述第一区块链的节点生成第三交易;所述第三触发消息包括第二事件标识,所述第二事件标识用于关联所述第一交易;
    根据所述第三触发消息生成所述第三交易;
    或者,
    接收所述第一区块链的其他节点发送的第三交易;
    其中,所述第三交易包括第一连接标识,所述第一连接标识用于关联所述第一区块链中的至少两个交易。
  12. 根据权利要求11所述的方法,其特征在于,所述第二事件标识包括所述第一事件标识。
  13. 一种信息的传输方法,其特征在于,应用于第二区块链中节点,所述方法包括:
    向所述第二区块链中的其他节点发送第二交易;所述第二交易包括第二连接标识和/或第一事件标识;其中,所述第二连接标识用于关联所述第二区块链中的至少两个交易,所述第一事件标识用于关联所述第二区块链的第二交易和第一区块链的第一交易;
    获取包含所述第二交易的区块。
  14. 根据权利要求13所述的方法,其特征在于,所述获取包含所述第二交易的区块,包括:
    在所述第二区块链中生成包含所述第二交易的区块;
    或者,
    接收所述第二区块链的其他节点发送的包含所述第二交易的区块。
  15. 根据权利要求13或14所述的方法,其特征在于,所述方法还包括:
    向所述第一区块链中的至少一个节点发送通知消息;所述通知消息用于通知所述第二交易执行完成。
  16. 根据权利要求15所述的方法,其特征在于,所述向所述第一区块链中的至少一个节点发送通知消息,包括:
    当包含所述第二交易的区块被生成时,向所述第一区块链中的至少一个节点发送通知 消息;
    或者,
    当包含了所述第二交易的区块之后产生预设个数个区块时,向所述第一区块链中的至少一个节点发送通知消息;
    或者,
    满足预设的触发条件时,向所述第一区块链中的至少一个节点发送通知消息;
    其中,所述通知消息用于通知所述第二交易执行完成。
  17. 根据权利要求13至16任一项所述的方法,其特征在于,所述方法还包括:
    向所述第一区块链的至少一个节点发送第一触发消息,所述第一触发消息用于触发所述第一区块链的节点生成所述第一交易。
  18. 根据权利要求13至16任一项所述的方法,其特征在于,向所述第二区块链中的其他节点发送第二交易之前,所述方法还包括:
    接收发送的第二触发消息,所述第二触发消息用于触发所述第二区块链的节点生成所述第二交易;
    根据所述第二触发消息向设备发送交易消息;所述交易消息用于指示所述设备执行所述交易消息中通知的操作和内容;
    接收所述设备返回的反馈消息;
    根据所述反馈消息生成所述第二交易。
  19. 根据权利要求13至18任一项所述的方法,其特征在于,所述方法还包括:
    生成第四交易,并向所述第二区块链中的其他节点发送所述第四交易;所述第四交易包括:第二连接标识;所述第二连接标识用于关联所述第四交易和所述第二交易;
    获取包含所述第四交易的区块。
  20. 根据权利要求19所述的方法,其特征在于,所述方法还包括:
    当包含所述第四交易的区块被生成时,向所述第一区块链中的至少一个节点发送第三触发消息;
    或者,
    当包含了所述第四交易的区块之后产生预设个数个区块时,向所述第一区块链中的至少一个节点发送第三触发消息;
    或者,
    满足预设的触发条件时,向所述第一区块链中的至少一个节点发送第三触发消息;
    其中,所述第三触发消息用于触发所述第一区块链的节点生成第三交易;所述第三触发消息包括第二事件标识,所述第二事件标识用于关联所述第一交易。
  21. 一种多链物联网系统,其特征在于,包括:
    第一区块链和第二区块链;
    所述第一区块链包括至少两个节点,其中任一节点用于执行权利要求1至12任一项所述的信息的传输方法;
    所述第二区块链包括至少两个节点,其中任一节点用于执行权利要求13至21任一项所述的信息的传输方法。
  22. 根据权利要求21所述的多链物联网系统,其特征在于,所述多链物联网系统还包括:
    连接节点;
    所述第一区块链和所述第二区块链通过所述连接节点连接;所述连接节点用于:通知第一区块链节点所述第二区块链上的交易状况;或者,通知第二区块链节点所述第一区块链上的交易状况。
  23. 根据权利要求22所述的多链物联网系统,其特征在于,所述第一区块链和所述第二区块链中存在至少一个节点被所述第一区块链和所述第二区块链共享。
  24. 根据权利要求21至23任一项所述的多链物联网系统,其特征在于,还包括:物联网设备和/或用户设备。
  25. 一种信息的传输装置,其特征在于,包括:
    发送模块,用于向所述信息的传输装置所属的第一区块链中的其他节点发送第一交易;所述第一交易包括第一事件标识和交易条件;所述第一事件标识用于关联所述第一交易和第二区块链中的第二交易;所述交易条件包括:第二区块链中包含所述第一事件标识的第二交易完成后,执行所述第一区块链的第一交易;
    处理模块,用于在确定满足所述交易条件时,获取包含所述第一交易的区块。
  26. 根据权利要求25所述的装置,其特征在于,所述处理模块具体用于在所述第一区块链中生成包含所述第一交易的区块;
    或者,
    所述装置还包括:接收模块,用于接收所述第一区块链中的其他至少一个节点发送的包含所述第一交易的区块。
  27. 根据权利要求26所述的装置,其特征在于,所述处理模块具体用于:
    确定所述第二区块链的区块中包含所述第二交易,则满足所述第一交易的所述交易条件。
  28. 根据权利要求27所述的装置,其特征在于,所述接收模块还用于接收通知消息;所述通知消息用于通知所述第二交易执行完成;
    所述处理模块还用于根据所述通知消息确定所述第二区块链中的区块包含所述第二交易。
  29. 根据权利要求28所述的装置,其特征在于,所述接收模块具体用于:
    接收至少一个第二区块链中的节点发送的通知消息;
    或者,
    接收第二区块链中生成包含所述第二交易的区块的节点发送的通知消息;
    或者,
    接收连接节点发送的通知消息;所述连接节点用于连接所述第一区块链与所述第二区块链。
  30. 根据权利要求28或29所述的装置,其特征在于,所述通知消息包括以下至少一项:
    所述第一事件标识,所述第二区块链的标识,第二交易的标识和包含所述第二交易的 区块标识,第一区块链的标识。
  31. 根据权利要求28至30任一项所述的装置,其特征在于,所述处理模块具体用于:
    根据所述通知消息读取所述第二区块链的内容,根据所述第一事件标识确认所述第二交易已写入所述第二区块链中的区块。
  32. 根据权利要求28至31任一项所述的装置,其特征在于,所述处理模块还具体用于:
    获取所述第二区块链中与包含所述第二交易的区块的深度;
    当所述第二区块链中包含所述第二交易的区块的深度大于预设深度时,确定满足所述交易条件。
  33. 根据权利要求25所述的装置,其特征在于,所述装置还包括:
    接收模块,用于接收第一触发消息,所述第一触发消息用于触发所述第一区块链的节点生成所述第一交易;
    所述处理模块还用于根据所述第一触发消息生成所述第一交易。
  34. 根据权利要求25所述的装置,其特征在于,所述发送模块还用于向所述第二区块链的至少一个节点发送第二触发消息,所述第二触发消息用于触发所述第二区块链的节点生成所述第二交易。
  35. 根据权利要求25、32或33任一项所述的装置,其特征在于,
    接收模块用于接收发送的第三触发消息,所述第三触发消息用于触发所述第一区块链的节点生成第三交易;所述第三触发消息包括第二事件标识,所述第二事件标识用于关联所述第一交易;
    处理模块用于根据所述第三触发消息生成所述第三交易;
    或者,
    接收模块用于接收所述第一区块链的其他节点发送的第三交易;
    其中,所述第三交易包括第一连接标识,所述第一连接标识用于关联所述第一区块链中的至少两个交易。
  36. 根据权利要求35所述的装置,其特征在于,所述第二事件标识包括所述第一事件标识。
  37. 一种信息的传输装置,其特征在于,所述装置包括:
    发送模块,用于向所述信息的传输装置所属的所述第二区块链中的其他节点发送第二交易;所述第二交易包括第二连接标识和/或第一事件标识;其中,所述第二连接标识用于关联所述第二区块链中的至少两个交易,所述第一事件标识用于关联所述第二交易和第一区块链中的第一交易;
    处理模块,用于获取包含所述第二交易的区块。
  38. 根据权利要求37所述的装置,其特征在于,所述处理模块具体用于在所述第二区块链中生成包含所述第二交易的区块;
    或者,
    所述装置还包括:接收模块,用于接收所述第二区块链的其他节点发送的包含所述第二交易的区块。
  39. 根据权利要求36或37所述的装置,其特征在于,所述发送模块还用于向所述第一区块链中的至少一个节点发送通知消息;所述通知消息用于通知所述第二交易执行完成。
  40. 根据权利要求39所述的装置,其特征在于,所述发送模块具体用于:
    当包含所述第二交易的区块被生成时,向所述第一区块链中的至少一个节点发送通知消息;
    或者,
    当包含了所述第二交易的区块之后产生预设个数个区块时,向所述第一区块链中的至少一个节点发送通知消息;
    或者,
    满足预设的触发条件时,向所述第一区块链中的至少一个节点发送通知消息;
    其中,所述通知消息用于通知所述第二交易执行完成。
  41. 根据权利要求39或40所述的装置,其特征在于,所述发送模块还用于向所述第一区块链的至少一个节点发送第一触发消息,所述第一触发消息用于触发所述第一区块链的节点生成所述第一交易。
  42. 根据权利要求39或40所述的装置,其特征在于,所述接收模块还用于接收发送的第二触发消息,所述第二触发消息用于触发所述第二区块链的节点生成所述第二交易;
    所述发送模块还用于根据所述第二触发消息向设备发送交易消息;所述交易消息用于指示所述设备执行所述交易消息中通知的操作和内容;
    所述接收模块还用于接收所述设备返回的反馈消息;
    所述处理模块还用于根据所述反馈消息生成所述第二交易。
  43. 根据权利要求39至42任一项所述的装置,其特征在于,所述处理模块还用于生成第四交易;
    所述发送模块还用于向所述第二区块链中的其他节点发送所述第四交易;所述第四交易包括:第二连接标识;所述第二连接标识用于关联所述第四交易和所述第二交易;
    所述处理模块还用于获取包含所述第四交易的区块。
  44. 根据权利要求43所述的装置,其特征在于,所述发送模块还用于:
    当包含所述第四交易的区块被生成时,向所述第一区块链中的至少一个节点发送第三触发消息;
    或者,
    当包含了所述第四交易的区块之后产生预设个数个区块时,向所述第一区块链中的至少一个节点发送第三触发消息;
    或者,
    满足预设的触发条件时,向所述第一区块链中的至少一个节点发送第三触发消息;
    其中,所述第三触发消息用于触发所述第一区块链的节点生成第三交易;所述第三触发消息包括第二事件标识,所述第二事件标识用于关联所述第一交易。
  45. 一种存储介质,其特征在于,包括:可读存储介质和计算机程序,所述计算机程序存储在所述可读存储介质中,所述计算机程序用于实现权利要求1至12任一项提供的 信息的传输方法。
  46. 一种存储介质,其特征在于,包括:可读存储介质和计算机程序,所述计算机程序存储在所述可读存储介质中,所述计算机程序用于实现权利要求13至20任一项提供的信息的传输方法。
  47. 一种程序产品,其特征在于,所述程序产品包括计算机程序,所述计算机程序存储在可读存储介质中;节点设备的至少一个处理器可以从所述可读存储介质读取所述计算机程序,至少一个处理器执行所述计算机程序使得所述节点设备实现权利要求1至12任一项所述的发射功率控制方法。
  48. 一种程序产品,其特征在于,所述程序产品包括计算机程序,所述计算机程序存储在可读存储介质中;物联网设备或者用户设备的至少一个处理器可以从可读存储介质读取该计算机程序,至少一个处理器执行该计算机程序使得所述物联网设备或者所述用户设备实现权利要求13至20任一项提供的信息的传输方法。
PCT/CN2018/089389 2017-06-27 2018-05-31 信息的传输方法、装置和系统 WO2019001214A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710503177.7 2017-06-27
CN201710503177.7A CN109150943B (zh) 2017-06-27 2017-06-27 信息的传输方法、装置和系统

Publications (1)

Publication Number Publication Date
WO2019001214A1 true WO2019001214A1 (zh) 2019-01-03

Family

ID=64740360

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/089389 WO2019001214A1 (zh) 2017-06-27 2018-05-31 信息的传输方法、装置和系统

Country Status (2)

Country Link
CN (2) CN109150943B (zh)
WO (1) WO2019001214A1 (zh)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111090661A (zh) * 2019-12-10 2020-05-01 北京海益同展信息科技有限公司 一种区块链跨链数据访问方法、装置、适配器及系统
CN112981853A (zh) * 2019-12-13 2021-06-18 青岛海尔洗衣机有限公司 洗涤控制方法及装置
CN113129146A (zh) * 2021-03-31 2021-07-16 南京质子链科技有限公司 智能合约事务处理方法、设备及存储介质
WO2021197097A1 (zh) * 2020-04-02 2021-10-07 支付宝(杭州)信息技术有限公司 跨链数据订阅
US20220179384A1 (en) * 2019-04-12 2022-06-09 Siemens Aktiengesellschaft Method and control system for controlling an execution of transactions
EP3996028A4 (en) * 2019-07-26 2022-08-31 Huawei Technologies Co., Ltd. METHOD AND DEVICE FOR CROSS-CHAIN TRANSACTIONS

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11251966B2 (en) 2019-06-28 2022-02-15 Advanced New Technologies Co., Ltd. Sending cross-chain authenticatable messages
CN110443704B (zh) * 2019-06-28 2021-02-19 创新先进技术有限公司 一种跨链发送资源的方法和装置
US11356282B2 (en) 2019-06-28 2022-06-07 Advanced New Technologies Co., Ltd. Sending cross-chain authenticatable messages
CN112003703B (zh) * 2019-06-28 2023-08-22 创新先进技术有限公司 一种跨链发送可认证消息的方法和装置
CN112308713A (zh) * 2019-07-26 2021-02-02 华为技术有限公司 一种跨链交易方法和装置
CN111125476A (zh) * 2019-12-23 2020-05-08 北京每日优鲜电子商务有限公司 事件数据处理方法及装置
CN111597077B (zh) * 2020-05-13 2022-04-29 腾讯科技(深圳)有限公司 数据处理方法、装置、计算机设备以及存储介质
CN111756816B (zh) * 2020-06-04 2022-07-26 江苏荣泽信息科技股份有限公司 一种基于区块链的车库管理系统
CN116152968A (zh) * 2023-04-23 2023-05-23 安徽中科晶格技术有限公司 基于区块链合约事件机制的智能锁的控制方法及装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105719185A (zh) * 2016-01-22 2016-06-29 杭州复杂美科技有限公司 区块链的数据对比及共识方法
US20160300222A1 (en) * 2015-04-07 2016-10-13 Modernity Financial Holdings, Ltd. Off network identity tracking in anonymous cryptocurrency exchange networks
CN106354994A (zh) * 2016-08-22 2017-01-25 布比(北京)网络技术有限公司 处理医疗数据的方法及系统
CN106530083A (zh) * 2016-10-27 2017-03-22 上海亿账通区块链科技有限公司 基于区块链的多链管理方法及系统

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160342977A1 (en) * 2015-05-20 2016-11-24 Vennd.io Pty Ltd Device, method and system for virtual asset transactions
CN105976231A (zh) * 2016-06-24 2016-09-28 深圳前海微众银行股份有限公司 基于区块链智能合约的资产管理方法及节点
CN106447309A (zh) * 2016-11-13 2017-02-22 杭州复杂美科技有限公司 源链侧链跨链交易
WO2018090331A1 (zh) * 2016-11-18 2018-05-24 深圳前海达闼云端智能科技有限公司 区块链网络、物品交易方法、装置及节点设备
CN106682907A (zh) * 2016-12-10 2017-05-17 江苏恒为信息科技有限公司 区块链数据对比及共识方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160300222A1 (en) * 2015-04-07 2016-10-13 Modernity Financial Holdings, Ltd. Off network identity tracking in anonymous cryptocurrency exchange networks
CN105719185A (zh) * 2016-01-22 2016-06-29 杭州复杂美科技有限公司 区块链的数据对比及共识方法
CN106354994A (zh) * 2016-08-22 2017-01-25 布比(北京)网络技术有限公司 处理医疗数据的方法及系统
CN106530083A (zh) * 2016-10-27 2017-03-22 上海亿账通区块链科技有限公司 基于区块链的多链管理方法及系统

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220179384A1 (en) * 2019-04-12 2022-06-09 Siemens Aktiengesellschaft Method and control system for controlling an execution of transactions
EP3996028A4 (en) * 2019-07-26 2022-08-31 Huawei Technologies Co., Ltd. METHOD AND DEVICE FOR CROSS-CHAIN TRANSACTIONS
US11966378B2 (en) 2019-07-26 2024-04-23 Huawei Technologies Co., Ltd. Cross-chain transaction method and apparatus
CN111090661A (zh) * 2019-12-10 2020-05-01 北京海益同展信息科技有限公司 一种区块链跨链数据访问方法、装置、适配器及系统
CN111090661B (zh) * 2019-12-10 2024-03-01 京东科技信息技术有限公司 一种区块链跨链数据访问方法、装置、适配器及系统
CN112981853A (zh) * 2019-12-13 2021-06-18 青岛海尔洗衣机有限公司 洗涤控制方法及装置
CN112981853B (zh) * 2019-12-13 2024-01-16 青岛海尔洗衣机有限公司 洗涤控制方法及装置
WO2021197097A1 (zh) * 2020-04-02 2021-10-07 支付宝(杭州)信息技术有限公司 跨链数据订阅
CN113129146A (zh) * 2021-03-31 2021-07-16 南京质子链科技有限公司 智能合约事务处理方法、设备及存储介质
CN113129146B (zh) * 2021-03-31 2023-11-24 南京质子链科技有限公司 智能合约事务处理方法、设备及存储介质

Also Published As

Publication number Publication date
CN109150943B (zh) 2022-03-29
CN114866543A (zh) 2022-08-05
CN109150943A (zh) 2019-01-04
CN114866543B (zh) 2023-11-17

Similar Documents

Publication Publication Date Title
WO2019001214A1 (zh) 信息的传输方法、装置和系统
JP7436568B2 (ja) ブロックチェーンにより実現される方法及びシステム
CN109302415B (zh) 一种认证方法、区块链节点及存储介质
CN110457875B (zh) 基于区块链的数据授权方法及装置
US11637746B2 (en) Object identification for groups of IoT devices
CN110443704B (zh) 一种跨链发送资源的方法和装置
TWI716140B (zh) 基於區塊鏈的資料處理方法和裝置
TWI729719B (zh) 基於區塊鏈的資料授權方法及裝置、電子設備及電腦可讀儲存媒介
CN109584066B (zh) 基于区块链的隐私交易及其应用方法和装置
TWI607334B (zh) 安全無線充電技術
JP2019526120A (ja) ブロックチェーンにより実現される方法及びシステム
CN109614813B (zh) 基于区块链的隐私交易方法、装置及其应用方法、装置
WO2016188153A1 (zh) 访问角色获取方法、装置及系统
CN109003185A (zh) 一种智能合约的建立方法、装置、计算设备及存储介质
CN109472576A (zh) 数字资产的处理方法及装置、存储介质
CN111951074A (zh) 基于联盟链的共享设备系统
CN115526629A (zh) 基于区块链网络的收单交易方法、装置及身份认证装置
Hong et al. Blockchain-based fair payment for ABE with outsourced decryption
Bezahaf et al. BCWAN: a federated low-power WAN for the internet of things (industry track)
CN113300853B (zh) 金融征信信息管理方法、装置、电子设备及存储介质
CN117592991B (zh) 一种基于门限签名的高效区块链跨链数据交换方法
WO2024082818A1 (zh) 基于多区块链的跨链处理方法、装置、设备、系统及介质
Alves Architecture and negotiation protocols for a smart parking system
CN116961873A (zh) 一种面向发布订阅模式的区块链跨链监管方法
CN117255081A (zh) 基于区块链系统的数据处理方法及装置、设备、介质

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: 18825003

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: 18825003

Country of ref document: EP

Kind code of ref document: A1