Communication system, method, and computer program

By adopting blockchain communication protocol and controller management mechanism between IoT devices, the problem of low communication efficiency of low power consumption devices is solved, local storage and authentication of data is realized, and communication efficiency and security are improved.

CN118975192APending Publication Date: 2024-11-15NCHAIN LICENSING AG
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380032490.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-03-31
Filing Date
2023-03-02
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

Existing blockchain communication protocols are inefficient in communication between low-power devices such as Internet of Things (IoT) devices, and are difficult to implement local storage and authentication of data.

Method used

Using a blockchain-based communication protocol, the device network is managed through the controller, blockchain transactions are used for authentication and data transmission, and index numbers are assigned in the communication round to optimize data signature and transmission.

Benefits of technology

It realizes low-power and low bandwidth communication protocols, ensures data integrity and authentication, and improves communication efficiency and security between IoT devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118975192A_ABST
    Figure CN118975192A_ABST
Patent Text Reader

Abstract

A computer-implemented method performed by a controller configured to communicate with a blockchain and with a network, the network comprising one or more devices, the method comprising: maintaining identification information, the identification information comprising an index number assigned to each of the one or more devices; receiving one or more input-output pairs of the blockchain transaction, where each input-output pair is associated with the assigned index number, and where each input-output pair includes data from a device of the one or more devices; generating a blockchain transaction based on the one or more input-output pairs; and sending the block chain transaction to the block chain.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to systems, methods, and computer programs for communication. Some embodiments relate to a communication protocol for storing information on a blockchain. Background Art

[0002] Blockchain refers to a distributed data structure in which a copy of the blockchain is maintained at each of a plurality of nodes in a distributed peer-to-peer (P2P) network (hereinafter referred to as a "blockchain network") and is widely disclosed. The blockchain includes a series of data blocks, each of which includes one or more transactions. Except for the so-called "coinbase transaction", each transaction points to a previous transaction in a sequence, which can span one or more blocks back to one or more coinbase transactions. The coinbase transaction will be discussed further below. Transactions submitted to the blockchain network are included in new blocks. The process of creating a new block is generally referred to as "mining", which involves each of a plurality of nodes competing to perform "proof of work", i.e., solving a cryptographic puzzle based on a representation of a defined set of ordered and verified valid pending transactions waiting to be included in a new block of the blockchain. It should be noted that the blockchain can be pruned at some nodes, and the publication of blocks can be achieved by publishing only the block header.

[0003] Transactions in a blockchain may be used for one or more of the following purposes: transferring digital assets (i.e., a certain number of digital tokens); ordering a set of entries in a virtualized ledger or registry; receiving and processing time-stamped entries; and / or ordering index pointers in time. Blockchains may also be used to implement additional functions on top of the blockchain. For example, a blockchain protocol may allow for the storage of additional user data or data indexes in a transaction. There is no pre-specified limit on the maximum amount of data that can be stored in a single transaction, so increasingly complex data can be incorporated. For example, this can be used to store electronic documents, audio, or video data in a blockchain.

[0004] The nodes of the blockchain network (commonly referred to as "miners") perform a distributed transaction registration and verification process, which will be described in more detail later. In summary, in this process, nodes verify transactions and insert them into block templates, which attempt to identify a valid proof-of-work solution for the block template. Once a valid solution is found, the new block is propagated to other nodes of the network, so that each node can record the new block on the blockchain. In order to record a transaction in the blockchain, a user (e.g., a blockchain client application) sends the transaction to one of the nodes in the network for propagation. The nodes receiving the transaction can compete to find a proof-of-work solution that incorporates the verified valid transaction into the new block. Each node is configured to execute the same node protocol, which will include one or more conditions for confirming that the transaction is valid. Invalid transactions will not be propagated or incorporated into the block. Assuming that the transaction has been verified to be valid and thus accepted on the blockchain, the transaction (including any user data) will therefore be registered and indexed as an immutable public record on each node in the blockchain network.

[0005] The node that successfully solves the proof-of-work puzzle to create the latest block is usually rewarded with a new transaction called a "coinbase transaction" that distributes the amount of digital assets, i.e. the number of tokens. The detection and rejection of invalid transactions is performed by the actions of competing nodes, which act as agents of the network and are incentivized to report and prevent improper behavior. The widespread publication of information allows users to continuously audit the performance of nodes. Publishing only block headers allows participants to ensure the continued integrity of the blockchain.

[0006] In the "output-based" model (sometimes referred to as the UTXO-based model), the data structure of a given transaction includes one or more inputs and one or more outputs. Any spendable output includes an element that specifies the amount of a digital asset, which can be derived from the ongoing sequence of transactions. Spendable outputs are sometimes called UTXOs ("unspent transaction outputs"). Outputs may also include a locking script that specifies future redemption conditions for the output. A locking script is a predicate that defines the conditions necessary to verify and transfer a digital token or asset. Each input of a transaction (except for a coinbase transaction) includes a pointer (i.e., a reference) to such an output in a previous transaction, and may also include an unlocking script for unlocking the locking script pointing to the output. Thus, consider a pair of transactions, referred to as a first transaction and a second transaction (or "target" transaction). The first transaction includes at least one output that specifies the amount of a digital asset, and includes a locking script that defines one or more conditions for unlocking the output. The second (target) transaction includes at least one input and an unlocking script, the at least one input including a pointer to the output of the first transaction; the unlocking script is used to unlock the output of the first transaction.

[0007] In such a model, when the second (target) transaction is sent to the blockchain network to be propagated and recorded in the blockchain, one of the validity conditions applied at each node will be that the unlocking script satisfies all of the one or more conditions defined in the locking script of the first transaction. Another condition will be that the output of the first transaction has not been redeemed by another earlier valid transaction. Any node that finds the target transaction invalid according to any of these conditions will not propagate the transaction (as a valid transaction, but may register an invalid transaction) nor include the transaction in a new block to be recorded in the blockchain.

[0008] Another transaction model is the account-based model. In this case, each transaction is defined not by reference to the UTXO of the previous transaction in the past transaction sequence, but by reference to the absolute account balance. The current state of all accounts is stored individually by the node in the blockchain and is constantly updated. Summary of the invention

[0009] Examples described herein provide a low-power protocol for enabling communication between devices (e.g., Internet of Things (IoT) devices) and a blockchain using a self-organizing local network. In some examples, a controller can manage a network of devices. The devices can communicate locally or externally with the network. External communications can be stored on the blockchain.

[0010] According to one aspect disclosed herein, there is provided a computer-implemented method, the method being performed by a controller configured to communicate with a blockchain and a network, the network comprising one or more devices. The method may include maintaining identification information, the identification information including an index number assigned to each of the one or more devices; and receiving one or more input-output pairs of a blockchain transaction, wherein each input-output pair is associated with the assigned index number, and wherein each input-output pair includes data from a device of the one or more devices, the data being signed by a signature corresponding to a public key of the device. The method may also include generating a blockchain transaction based on the one or more input-output pairs; and sending the blockchain transaction to the blockchain. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] To facilitate an understanding of the embodiments of the present disclosure and to show how such embodiments may be implemented, reference will now be made, by way of example only, to the accompanying drawings, in which:

[0012] Figure 1 is a schematic block diagram of a system for implementing a blockchain;

[0013] Figure 2 Some examples of transactions that may be recorded in a blockchain are schematically shown;

[0014] Figure 3A A schematic block diagram of a client application is shown;

[0015] Figure 3B It shows that Figure 3A a schematic model of an exemplary user interface represented by a client application of

[0016] Figure 4 A schematic block diagram of some node software for processing transactions is shown;

[0017] Figure 5 is a schematic diagram showing different layers of a communication protocol;

[0018] Figure 6 is a schematic block diagram of the network;

[0019] Figure 7 is a schematic block diagram illustrating an example of a controller operating in a first mode;

[0020] Figure 8 is a schematic block diagram illustrating an example of a controller operating in a second mode. DETAILED DESCRIPTION

[0021] Exemplary System Overview

[0022] Figure 1 An exemplary system 100 for implementing a blockchain 150 is shown. The system 100 may include a packet-switched network 101, typically a wide area internet such as the Internet. The packet-switched network 101 includes a plurality of blockchain nodes 104, which may be arranged to form a peer-to-peer (P2P) network 106 within the packet-switched network 101. Although not shown, the blockchain nodes 104 may be arranged as a nearly complete graph. Thus, each blockchain node 104 is highly connected to other blockchain nodes 104.

[0023] Each blockchain node 104 includes a computer device of a peer, and different nodes 104 belong to different peers. Each blockchain node 104 includes a processing device, which includes one or more processors, such as one or more central processing units (CPUs), accelerator processors, special processors and / or field programmable gate arrays (FPGAs), and other devices, such as application-specific integrated circuits (ASICs). Each node also includes a memory, that is, a computer-readable memory in the form of a non-transitory computer-readable medium. The memory may include one or more memory units, which use one or more memory media, such as magnetic media such as hard disks, electronic media such as solid-state drives (SSDs), flash memory, or electrically erasable programmable read-only memories (EEPROMs), and / or optical media such as optical disk drives.

[0024] The blockchain 150 includes a series of data blocks 151, wherein a respective copy of the blockchain 150 is maintained at each of the plurality of blockchain nodes 104 in the distributed or blockchain network 106. As described above, maintaining a copy of the blockchain 150 does not necessarily mean storing the blockchain 150 in its entirety. Instead, the blockchain 150 can be pruned as long as each blockchain node 150 stores a block header (discussed below) for each block 151. Each block 151 in the blockchain includes one or more transactions 152, wherein a transaction in this context refers to a data structure. The nature of the data structure will depend on the type of transaction protocol used as part of the transaction model or plan. A given blockchain uses a particular transaction protocol throughout. In a common transaction protocol, the data structure of each transaction 152 includes at least one input and at least one output. Each output specifies an amount of a digital asset represented as a property, an example of which is an output that is cryptographically locked to a user 103 (requiring the user's signature or other solution to unlock, thereby redeeming or spending). Each input points to the output of a previous transaction 152, thereby linking these transactions.

[0025] Each block 151 also includes a block pointer 155, which points to a previously created block 151 in the blockchain to define the order of blocks 151. Each transaction 152 (except for the coinbase transaction) includes a pointer to a previous transaction to define the order of the transaction sequence (Note: the sequence of transactions 152 can branch). The blockchain of blocks 151 is traced back to the genesis block (Gb) 153, which is the first block in the blockchain. One or more original transactions 152 earlier in the blockchain 150 point to the genesis block 153, not to the previous transaction.

[0026] Each blockchain node 104 is configured to forward transactions 152 to other blockchain nodes 104, so that transactions 152 are propagated throughout the network 106. Each blockchain node 104 is configured to create blocks 151 and store corresponding copies of the same blockchain 150 in its corresponding memory. Each blockchain node 104 also maintains an ordered set (or "pool") 154 of transactions 152 waiting to be incorporated into block 151. Ordered pools 154 are often referred to as "memory pools". In this article, the term is not intended to be limited to any particular blockchain, protocol, or model. The term refers to a set of ordered transactions that a node 104 has accepted as valid, and for which the node 104 is forced to not accept any other transaction that attempts to spend the same output.

[0027] In a given current transaction 152j, an input (or each input) includes a pointer that references an output of a previous transaction 152i in the transaction sequence, specifying that the output is to be redeemed or "spent" in the current transaction 152j. Spending or redeeming does not necessarily mean transferring a financial asset, although this is certainly a common application. More generally, spending can be described as consuming an output, or allocating it to one or more outputs in another subsequent transaction. In general, a previous transaction can be any transaction in an ordered set 154 or any block 151. Although a previous transaction 152i will need to exist and be verified to be valid in order to ensure that the current transaction is valid, it is not necessary for a previous transaction 152i to exist when the current transaction 152j is created or even sent to the network 106. Therefore, in this article, "previous" refers to the predecessor in a logical sequence linked by a pointer, and not necessarily the creation time or sending time in a time sequence, and therefore, does not necessarily exclude the situation where transactions 152i, 152j are created or sent out of order (see the discussion of isolated transactions below). A previous transaction 152i can also be called a predecessor transaction or a predecessor transaction.

[0028] The inputs of the current transaction 152j also include input authorizations, such as the signature of the user 103a to whom the outputs of the previous transaction 152i are locked. In turn, the outputs of the current transaction 152j may be cryptographically locked to the new user or entity 103b. Thus, the current transaction 152j may transfer the amounts defined in the inputs of the previous transaction 152i to the new user or entity 103b defined in the outputs of the current transaction 152j. In some cases, a transaction 152 may have multiple outputs to split the input amounts among multiple users or entities (one of which may be the original user or entity 103a for changes). In some cases, a transaction may also have multiple inputs to aggregate the amounts from multiple outputs of one or more previous transactions and reallocate them to one or more outputs of the current transaction.

[0029] According to an output-based transaction protocol, such as Bitcoin, when a party 103, such as an individual user or an organization, wishes to issue a new transaction 152j (either by an automated program employed by the party or manually), the issuing party sends the new transaction from its computer terminal 102 to a recipient. The issuing party or recipient will ultimately send the transaction to one or more blockchain nodes 104 of the network 106 (now typically a server or data center, but in principle it can also be other user terminals). It is also not excluded that the party 103 issuing the new transaction 152j can send the transaction directly to one or more blockchain nodes 104, and in some examples, the transaction may not be sent to the recipient. The blockchain node 104 receiving the transaction checks whether the transaction is valid according to the blockchain node protocol applied at each blockchain node 104. The blockchain node protocol typically requires the blockchain node 104 to check whether the cryptographic signature in the new transaction 152j matches the expected signature, which depends on the previous transaction 152i in the ordered sequence of transactions 152. In such an output-based transaction protocol, this may include checking whether the cryptographic signature or other authorization of the party 103 included in the input of the new transaction 152j matches the condition defined in the output of the previous transaction 152i that the new transaction spends (or "allocates"), where the condition typically includes at least checking whether the cryptographic signature or other authorization in the input of the new transaction 152j unlocks the output of the previous transaction 152i to which the input of the new transaction is linked. The condition may be defined at least in part by a script included in the output of the previous transaction 152i. Alternatively, this may be determined solely by the blockchain node protocol, or may be determined by a combination thereof. In either case, if the new transaction 152j is valid, the blockchain node 104 forwards it to one or more other blockchain nodes 104 in the blockchain network 106. These other blockchain nodes 104 apply the same test according to the same blockchain node protocol, and therefore forward the new transaction 152j to one or more other nodes 104, and so on. In this way, the new transaction is propagated throughout the network of blockchain nodes 104.

[0030] In the output-based model, the definition of whether a given output (e.g., UTXO) is allocated (or "spent") is whether it is validly redeemed by the input of another subsequent transaction 152j according to the blockchain node protocol. Another condition for a transaction to be valid is that the output of the previous transaction 152i that it attempts to redeem has not been redeemed by another transaction. Similarly, if invalid, transaction 152j will not be propagated (unless marked as invalid and propagated for reminder) or recorded in the blockchain 150. This prevents double spending, that is, the transaction processor allocates the output of the same transaction more than once. On the other hand, the account-based model prevents double spending by maintaining account balances. Because there is also a defined transaction order, the account balance has a single defined state at all times.

[0031] In addition to verifying that transactions are valid, blockchain nodes 104 compete to be the first node to create a block of transactions in a process generally referred to as mining, which is supported by "proof of work". At a blockchain node 104, a new transaction is added to an ordered pool 154 of valid transactions that have not yet appeared in a block 151 recorded on the blockchain 150. The blockchain nodes then compete to assemble a new valid transaction block 151 of transactions 152 in the ordered transaction set 154 by attempting to solve a cryptographic puzzle. Typically, this involves searching for a "nonce" value such that when the nonce is juxtaposed with a representation of the ordered pool 154 of pending transactions and hashed, the output of the hash value satisfies a predetermined condition. For example, the predetermined condition may be that the output of the hash value has a certain predefined number of leading zeros. Note that this is only one specific type of proof of work puzzle, and other types are not excluded. A property of a hash function is that it has an unpredictable output relative to its input. Therefore, this search can only be performed by brute force, consuming a large amount of processing resources at each blockchain node 104 that attempts to solve the puzzle.

[0032] The first blockchain node 104 that solves the puzzle announces the puzzle solution on the network 106, providing the solution as proof, which can then be easily checked by other blockchain nodes 104 in the network (once a solution to the hash value is given, it is directly possible to check whether the solution satisfies the output of the hash value). The first blockchain node 104 propagates a block to other nodes that accept the block to reach a threshold consensus, thereby enforcing the protocol rules. The ordered set of transactions 154 is then recorded by each blockchain node 104 as a new block 151 in the blockchain 150. A block pointer 155 is also assigned to the new block 151n pointing to the previously created block 151n-1 in the blockchain. The large amount of work required to create a proof-of-work solution (e.g., in the form of a hash) signals the intention of the first node 104 to follow the blockchain protocol. These rules include not accepting a transaction as valid if it spends or allocates the same output as a previously verified valid transaction, otherwise it is called a double spend. Once created, the block 151 cannot be modified because it is identified and maintained at each blockchain node 104 in the blockchain network 106. The block pointers 155 also impose an order on the blocks 151. Because transactions 152 are recorded in ordered blocks at each blockchain node 104 in the network 106, an immutable public ledger of transactions is provided.

[0033] It should be noted that the different blockchain nodes 104 competing to solve a puzzle at any given time may do so based on different snapshots of the pool 154 of transactions that have not yet been published at any given time, depending on when they began searching for a solution or the order in which they received the transactions. The person solving the corresponding puzzle first defines the transactions 152 included in the new block 151n and their order, and updates the current pool of unpublished transactions 154. The blockchain nodes 104 then continue to compete to create blocks from the newly defined ordered pool of unpublished transactions 154, and so on. In addition, there is a protocol to resolve any "forks" that may occur, where two blockchain nodes 104 solve puzzles within a short time of each other, thereby propagating conflicting views of the blockchain between the nodes 104. In short, the fork direction that is the longest becomes the final blockchain 150. It should be noted that this does not affect users or agents of the network, as the same transaction will appear in both forks.

[0034] According to the Bitcoin blockchain (and most other blockchains), a node that successfully constructs a new block 104 is granted the ability to newly allocate an additional, accepted amount of digital assets in a new special type of transaction that allocates an additional limited amount of digital assets (as opposed to an inter-agent or inter-user transaction, which transfers a certain amount of digital assets from one agent or user to another). This special type of transaction is often called a "coinbase transaction", but may also be called a "starting transaction" or "generating transaction". It usually forms the first transaction of a new block 151n. The proof of work signals the intention of the node that constructs the new block to follow the protocol rules, thereby allowing the particular transaction to be redeemed later. The blockchain protocol rules may require a maturation period, such as 100 blocks, before the special transaction can be redeemed. Typically, a regular (non-generating) transaction 152 will also specify an additional transaction fee in one of its outputs to further reward the blockchain node 104 that created the block 151n in which the transaction was published. This fee is often called a "transaction fee" and is discussed below.

[0035] Due to the resources involved in transaction verification and publication, typically at least each blockchain node 104 takes the form of a server comprising one or more physical server units, or even an entire data center. However, in principle, any given blockchain node 104 may take the form of a user terminal or a group of user terminals networked together.

[0036] The memory of each blockchain node 104 stores software configured to run on the processing device of the blockchain node 104 to perform its corresponding role according to the blockchain node protocol and process transactions 152. It should be understood that any action attributed to the blockchain node 104 herein can be performed by software running on the processing device of the corresponding computer device. The node software can be implemented in one or more applications at the application layer or a lower layer such as an operating system layer or a protocol layer, or any combination of these layers.

[0037] Computer devices 102 of each of the parties 103 acting as consuming users are also connected to the network 101. These users can interact with the blockchain network 106 but do not participate in verifying transactions or constructing blocks. Some of these users or agents 103 can act as senders and receivers in transactions. Other users can interact with the blockchain 150 without acting as senders or receivers. For example, some parties can act as storage entities that store a copy of the blockchain 150 (e.g., having obtained a copy of the blockchain from the blockchain node 104).

[0038] Some or all of the parties 103 may be connected as part of a different network, such as a network overlaid on the blockchain network 106. Users of the blockchain network (often referred to as "clients") may be referred to as being part of a system that includes the blockchain network 106; however, these users are not blockchain nodes 104 because they do not perform the roles required of blockchain nodes. Instead, each party 103 may interact with the blockchain network 106, thereby utilizing the blockchain 150 by connecting to (i.e., communicating with) the blockchain node 106. For illustrative purposes, two parties 103 and their corresponding devices 102 are shown: a first party 103a and its corresponding computer device 102a, and a second party 103b and its corresponding computer device 102b. It should be understood that more such parties 103 and their corresponding computer devices 102 may exist and participate in the system 100, but for convenience, they are not illustrated. Each party 103 may be an individual or an organization. For illustrative purposes only, in this document, the first party 103a is referred to as Alice and the second party 103b is referred to as Bob, but it should be understood that this is not limited to Alice or Bob, and any reference to Alice or Bob in this document can be replaced with "first party" and "second party" respectively.

[0039] The computer device 102 of each party 103 includes a corresponding processing device, which includes one or more processors, such as one or more CPUs, graphics processing units (GPUs), other accelerator processors, specific application processors and / or FPGAs. The computer device 102 of each party 103 also includes a memory, that is, a computer-readable memory in the form of a non-temporary computer-readable medium. The memory may include one or more memory units, which use one or more memory media, such as magnetic media such as hard disks, electronic media such as SSDs, flash memory or EEPROMs, and / or optical media such as optical disk drives. The memory on the computer device 102 of each party 103 stores software, which includes a corresponding instance of at least one client application 105 that is set to run on the processing device. It should be understood that any action attributed to a given party 103 in this article can be executed by software running on the processing device of the corresponding computer device 102. The computer device 102 of each party 103 includes at least one user terminal, such as a desktop or laptop computer, a tablet computer, a smart phone, or a wearable device such as a smart watch. The computer device 102 of a given party 103 may also include one or more other network resources, such as cloud computing resources accessed through a user terminal.

[0040] The client application 105 may initially be provided to the computer device 102 of any given party 103 via a suitable computer-readable storage medium downloaded from a server, for example, or via a removable storage device such as a removable SSD, flash memory key, removable EEPROM, removable disk drive, floppy disk or tape, an optical disk such as a CD or DVD ROM, or a removable optical drive, etc.

[0041] The client application 105 includes at least a "wallet" function. This has two main functions. One of the functions is to enable the corresponding party 103 to create, authorize (e.g., sign) and send transactions 152 to one or more Bitcoin nodes 104, which are then propagated in the network of blockchain nodes 104 and included in the blockchain 150. Another function is to report to the corresponding party the amount of digital assets it currently owns. In an output-based system, this second function includes collating the amounts defined in the outputs of various transactions 152 belonging to the relevant parties scattered in the blockchain 150.

[0042] Note: While various client functions may be described as being integrated into a given client application 105, this is not necessarily limiting, and rather, any client function described herein may be implemented in a suite consisting of two or more different applications, such as interfacing via an API or one application as a plug-in to another application. More generally, the client functions may be implemented at the application layer or at a lower layer such as an operating system, or any combination of these layers. The following description will be based on the client application 105, but it should be understood that this is not limiting.

[0043] An instance of a client application or software 105 on each computer device 102 is operably coupled to at least one of the blockchain nodes 104 of the network 106. This can enable a wallet function of the client 105 to send transactions 152 to the network 106. The client 105 can also contact the blockchain node 104 to query the blockchain 150 for any transactions to which the corresponding party 103 is a recipient (or indeed to check other parties' transactions in the blockchain 150, because in an embodiment, the blockchain 150 is a public facility that provides transaction trust to some extent through its public visibility). The wallet function on each computer device 102 is configured to formulate and send transactions 152 according to a transaction protocol. As described above, each blockchain node 104 runs software that is configured to verify transactions 152 according to the blockchain node protocol and forward transactions 152 for propagation in the blockchain network 106. The transaction protocol and the node protocol correspond to each other, and a given transaction protocol and a given node protocol together implement a given transaction model. The same transaction protocol is used for all transactions 152 in the blockchain 150. All nodes 104 in the network 106 use the same node protocol.

[0044] When a given party 103 (say Alice) wishes to send a new transaction 152j to be included in the blockchain 150, she will formulate the new transaction according to the relevant transaction protocol (using the wallet function in her client application 105). She will then send the transaction 152 from the client application 105 to one or more blockchain nodes 104 to which she is connected. For example, this may be the blockchain node 104 that Alice's computer 102 is best connected to. When any given blockchain node 104 receives the new transaction 152j, it will process it according to the blockchain node protocol and its corresponding role. This includes first checking whether the newly received transaction 152j meets certain conditions for becoming "valid", specific examples of which will be discussed in detail later. In some transaction protocols, the validity conditions may be configurable on a per-transaction basis through a script included in the transaction 152. Alternatively, the conditions may simply be a built-in function of the node protocol, or defined by a combination of script and node protocol.

[0045] If the newly received transaction 152j passes the validity test (i.e., under the “valid” condition), any blockchain node 104 that receives the transaction 152j will add the new verified valid transaction 152 to the ordered transaction set 154 maintained at the blockchain node 104. Further, any blockchain node 104 that receives the transaction 152j will then propagate the verified valid transaction 152 to one or more other blockchain nodes 104 in the network 106. Since each blockchain node 104 applies the same protocol, it is assumed that the transaction 152j is valid, which means that the transaction will soon be propagated throughout the network 106.

[0046] Once in the ordered pool 154 of pending transactions maintained at a given blockchain node 104, that blockchain node 104 will begin racing to solve the proof-of-work puzzle on the latest version of its respective pool 154 containing the new transaction 152 (keep in mind that other blockchain nodes 104 can attempt to solve the puzzle based on different transaction pools 154. However, whoever solves the puzzle first will define the set of transactions included in the latest block 151. Ultimately, the blockchain node 104 will solve the puzzle for a portion of the ordered pool 154, which includes Alice's transaction 152j). Once the pool 154 including the new transaction 152j completes the proof-of-work, it will immutably become part of one of the blocks 151 in the blockchain 150. Each transaction 152 includes a pointer to an earlier transaction, so the order of transactions is also immutably recorded.

[0047] Different blockchain nodes 104 may initially receive different instances of a given transaction and therefore have conflicting views about which instance is “valid” before one instance is published in a new block 151, at which point all blockchain nodes 104 agree that the published instance is the only valid instance. If a blockchain node 104 accepts one instance as valid and then discovers that a second instance has been recorded in the blockchain 150, the blockchain node 104 must accept this and will discard (i.e., treat as invalid) the instance it originally accepted (i.e., the instance that has not yet been published in block 151).

[0048] Another type of transaction protocol operated by some blockchain networks as part of the account-based transaction model can be called an "account-based" protocol. In the account-based case, each transaction is defined not by reference to the UTXO of a previous transaction in the past sequence of transactions, but by reference to an absolute account balance. The current state of all accounts is stored individually in the blockchain by the nodes of the network and is continuously updated. In such systems, transactions are ordered using an account's running transaction record (also called a "position"). This value is signed by the sender as part of their cryptographic signature and hashed as part of the transaction reference calculation. In addition, optional data fields can also be signed in the transaction. For example, a data field can point to a previous transaction if it contains the ID of the previous transaction.

[0049] UTXO-based model

[0050] Figure 2 An exemplary transaction protocol is shown. This is an example of a UTXO-based protocol. A transaction 152 ("Tx" for short) is the basic data structure of the blockchain 150 (each block 151 includes one or more transactions 152). The following will be described with reference to an output-based or "UTXO"-based protocol. However, this is not limited to all possible embodiments. It should be noted that although the exemplary UTXO-based protocol is described with reference to Bitcoin, it can also be implemented on other exemplary blockchain networks.

[0051] In the UTXO-based model, each transaction ("Tx") 152 includes a data structure that includes one or more inputs 202 and one or more outputs 203. Each output 203 may include an unspent transaction output (UTXO), which can be used as a source of input 202 for another new transaction (if the UTXO has not been redeemed). The UTXO includes a value that specifies the amount of a digital asset. This represents a set of tokens on a distributed ledger. The UTXO may also include a transaction ID of its source transaction and other information. The transaction data structure may also include a header 201, which may include an indicator of the size of the input field 202 and the output field 203. The header 201 may also include an ID for the transaction. In an embodiment, the transaction ID is a hash value of the transaction data (excluding the transaction ID itself) and is stored in the header 201 of the original transaction 152 submitted to the node 104.

[0052] Let's say Alice 103a wishes to create a transaction 152j that transfers the relevant amount of digital assets to Bob 103b. Figure 2 In , Alice's new transaction 152j is labeled "Tx1". This new transaction takes the amount of digital assets locked to Alice in output 203 of the previous transaction 152i in the sequence and transfers at least a portion of such amount to Bob. Figure 2, the previous transaction 152i is labeled "Tx0". Tx0 and Tx1 are just arbitrary labels that do not necessarily mean that Tx0 refers to the first transaction in blockchain 151 and Tx1 refers to a subsequent transaction in pool 154. Tx1 can point to any previous (i.e., preceding) transaction that still has unspent output 203 locked to Alice.

[0053] When Alice creates her new transaction Tx1, or at least when she sends it to the network 106, the previous transaction Tx0 may already be valid and included in block 151 of the blockchain 150. The transaction may have been included in one of the blocks 151 at this time, or it may still be waiting in the ordered set 154, in which case it will be included in the new block 151 soon. Alternatively, Tx0 and Tx1 may be created and sent to the network 106 together; or, if the node protocol allows buffering of "orphan" transactions, Tx0 may even be sent after Tx1. The terms "previous" and "successor" as used herein in the context of transaction sequences refer to the order of transactions in the sequence defined by the transaction pointers specified in the transactions (which transaction points to which other transaction, etc.). They may equally be replaced by "predecessors" and "successors", "predecessors" and "descendants", or "parents" and "children", etc. This does not necessarily refer to the order in which they are created, sent to the network 106, or arrive at any given blockchain node 104. However, subsequent transactions (descendant transactions or "child transactions") pointing to a previous transaction (predecessor transaction or "parent transaction") will not be valid unless the parent transaction is valid. A child transaction that arrives at the blockchain node 104 before the parent transaction is considered an orphan transaction. Depending on the node protocol and / or node behavior, it may be discarded or buffered for a period of time to wait for the parent transaction.

[0054] One of the one or more outputs 203 of the previous transaction Tx0 includes a specific UTXO, labeled UTXO0. Each UTXO includes a value specifying the amount of digital assets represented by the UTXO and a locking script that defines the conditions that the unlocking script in the input 202 of the subsequent transaction must satisfy in order for the subsequent transaction to be valid and thus successfully redeem the UTXO. Typically, the locking script locks the amount to a specific party (the beneficiary of the transaction for that amount). That is, the locking script defines the unlocking condition, which typically includes the following conditions: the unlocking script in the input of the subsequent transaction includes the cryptographic signature of the party to which the previous transaction was locked.

[0055] The locking script (also known as scriptPubKey) is a piece of code written in a domain-specific language recognized by the node protocol. A specific example of such a language is called a "Script" (with a capital S), which can be used by the blockchain network. The locking script specifies the information required to spend the transaction output 203, such as the requirement for Alice's signature. The unlocking script appears in the output of the transaction. The unlocking script (also known as scriptSig) is a piece of code written in a domain-specific language that provides the information required to meet the locking script criteria. For example, it can contain Bob's signature. The unlocking script appears in the input 202 of the transaction.

[0056] Thus in the example shown, UTXO0 in output 203 of Tx0 includes a locking script [Checksig P A ], the locking script requires Alice’s signature Sig P A , in order to redeem UTXO0 (strictly speaking, to make subsequent transactions that attempt to redeem UTXO0 valid). A ] contains Alice's public key P from her public-private key pair A The input 202 of Tx1 includes a pointer to Tx1 (e.g., by its transaction ID (TxID0), which in the embodiment is the hash value of the entire transaction Tx0). The input 202 of Tx1 includes an index identifying UTXO0 in Tx0 to identify it among any other possible outputs of Tx0. The input 202 of Tx1 further includes an unlocking script <Sig P A >, the unlocking script includes Alice's cryptographic signature, which is created by Alice by applying the private key of her key pair to a predetermined portion of data (sometimes called a "message" in cryptography). The data (or "message") that Alice needs to sign to provide a valid signature can be defined by the locking script, the node protocol, or a combination thereof.

[0057] When a new transaction Tx1 arrives at a blockchain node 104, the node applies the node protocol. This includes running the locking script and the unlocking script together to check whether the unlocking script satisfies the conditions defined in the locking script (where the conditions may include one or more criteria). In an embodiment, this involves juxtaposing two scripts:

[0058] <Sig PA> <pa>||[Checksig PA]

[0059] Where "||" means concatenation, "<…>" means putting data on the stack, and "[…]" means a function consisting of locked scripts (in this case, a stack-based language). Similarly, scripts can be run one after another using a common stack instead of concatenating the scripts. In either case, when run together, the scripts use Alice's public key P A (included in the locking script of the output of Tx0) to verify that the unlocking script in the input of Tx1 contains Alice's signature when signing the expected portion of the data. The expected partial data itself (the "message") also needs to be included in order to perform this verification. In an embodiment, the signed data includes the entire Tx1 (so there is no need to include a separate element to plaintext specify the signed partial data, as it is already present).

[0060] Those skilled in the art will be familiar with the details of verification by public-private cryptography. Basically, if Alice has signed a message using her private key encryption, then given Alice's public key and the message in plain text, other entities such as node 104 can verify that the message must have been signed by Alice. Signing typically includes hashing the message, signing the hash value, and marking this to the message as a signature, so that any holder of the public key can verify the signature. Therefore, it should be noted that in embodiments, any reference to signing a particular data fragment or transaction portion, etc. herein can mean signing the hash value of the data fragment or transaction portion.

[0061] If the unlocking script in Tx1 satisfies one or more conditions specified in the locking script of Tx0 (so, in the example shown, if Alice's signature is provided and verified in Tx1), then the blockchain node 104 considers Tx1 to be valid. This means that the blockchain node 104 will add Tx1 to the pending transaction ordered pool 154. The blockchain node 104 will also forward the transaction Tx1 to one or more other blockchain nodes 104 in the network 106 so that it will propagate throughout the network 106. Once Tx1 is valid and included in the blockchain 150, this will define UTXO0 from Tx0 as spent. It should be noted that Tx1 is only valid if it spends unspent transaction output 203. If it attempts to spend an output that has already been spent by another transaction 152, then Tx1 will be invalid even if all other conditions are met. Therefore, the blockchain node 104 also needs to check whether the UTXO referenced in the previous transaction Tx0 has been spent (that is, whether it has formed a valid input for another valid transaction). This is one of the reasons why it is important for the blockchain 150 to impose a defined order on transactions 152. In practice, a given blockchain node 104 may maintain a separate database marking the UTXO 203 of a transaction 152 as having been spent, but ultimately defining whether a UTXO has been spent depends on whether it has formed a valid input to another valid transaction in the blockchain 150.

[0062] If the total amount specified in all outputs 203 of a given transaction 152 is greater than the total amount pointed to by all its inputs 202, this is another basis for failure in most transaction models. Therefore, such a transaction will not be propagated or included in block 151.

[0063] Note that in the UTXO-based transaction model, a given UTXO needs to be spent as a whole. You cannot "leave behind" a portion of the amount defined in a UTXO as spent while spending another portion. However, the amount of a UTXO can be split between multiple outputs of subsequent transactions. For example, the amount defined in UTXO0 of Tx0 can be split between multiple UTXOs in Tx1. Therefore, if Alice does not want to give all of the amount defined in UTXO0 to Bob, she can use the remaining portion to make change for herself in the second output of Tx1, or to pay another party.

[0064] In practice, Alice will also typically need to include a fee for the Bitcoin node 104 that successfully includes Alice's transaction 104 in block 151. If Alice does not include such a fee, Tx0 may be rejected by the blockchain node 104, and therefore, although technically valid, may not be propagated and included in the blockchain 150 (if the blockchain node 104 does not want to accept transaction 152, the node protocol does not force the blockchain node 104 to accept it). In some protocols, the transaction fee does not require its own separate output 203 (i.e., no separate UTXO is required). Instead, any difference between the total amount pointed to by input 202 and the total amount specified by output 203 of a given transaction 152 will be automatically provided to the blockchain node 104 that issued the transaction. For example, assume that a pointer to UTXO0 is the only input to Tx1, and Tx1 has only one output UTXO1. If the amount of digital assets specified in UTXO0 is greater than the amount specified in UTXO1, the difference may be allocated (or spent) by the node 104 that wins the proof-of-work race to create the block containing UTXO1. Alternatively or additionally, this does not necessarily preclude the possibility of explicitly specifying a transaction fee in one of the UTXOs 203 in its own transaction 152.

[0065] Alice and Bob's digital assets consist of the UTXO locked to them in any transaction 152 anywhere in the blockchain 150. Therefore, in general, the assets of a given party 103 are scattered among the UTXOs of various transactions 152 throughout the blockchain 150. No single number defining the total balance of a given party 103 is stored anywhere in the blockchain 150. The role of the wallet function of the client application 105 is to collate the various UTXO values ​​locked to the respective parties and not yet spent in other subsequent transactions. To achieve this, it can query a copy of the blockchain 150 stored at any one Bitcoin node 104.

[0066] It should be noted that script code is often represented schematically (i.e., using an imprecise language). For example, an opcode (opcode) may be used to represent a particular function. "OP_..." refers to a particular opcode of the scripting language. For example, OP_RETURN is a scripting language opcode that, when preceded by OP_FALSE at the beginning of a locking script, creates an unspendable output of a transaction that can store data within the transaction, thereby immutably recording the data in the blockchain 150. For example, the data may include a file to be stored in the blockchain.

[0067] Typically, the inputs to a transaction contain a digital signature corresponding to the public key PA. In an embodiment, this is based on ECDSA using the elliptic curve secp256k1. The digital signature signs a specific piece of data. In an embodiment, for a given transaction, the signature will sign part of the transaction input and part or all of the transaction output. Signing a specific part of the output depends on the SIGHASH flag. The SIGHASH flag is typically a 4-byte code included at the end of the signature that selects the output to be signed (and is therefore fixed at the time of signing).

[0068] The locking script is sometimes referred to as "scriptPubKey", which means that it usually includes the public key of the party to which the corresponding transaction is locked. The unlocking script is sometimes referred to as "scriptSig", which means that it usually provides the corresponding signature. However, more generally speaking, in all applications of blockchain 150, the conditions for UTXO redemption do not necessarily include verification of the signature. More generally speaking, the scripting language can be used to define any one or more conditions. Therefore, the more general terms "locking script" and "unlocking script" may be preferred.

[0069] Side Channel

[0070] like Figure 1 As shown, the client application on each of Alice and Bob's computer devices 102a, 120b can include additional communication functionality. This additional functionality enables Alice 103a to establish a separate side channel 107 with Bob 103b (at the instigation of any party or third party). The side channel 107 enables data to be exchanged away from the blockchain network. Such communications are sometimes referred to as "off-chain" communications. For example, this can be used to exchange transactions 152 between Alice and Bob without registering the transaction (yet) on the blockchain network 106 or publishing it on the chain 150 until one of the parties chooses to broadcast it to the network 106. Sharing transactions in this way is sometimes referred to as sharing "transaction templates". The transaction template may lack one or more inputs and / or outputs required to form a complete transaction. Alternatively or additionally, the side channel 107 can be used to exchange any other transaction-related data, such as keys, negotiation amounts or terms, data content, etc.

[0071] The side channel 107 may be established via the same packet switching network 101 as the blockchain network 106. Alternatively or additionally, the side channel 301 may be established via a different network such as a mobile cellular network or a local area network such as a wireless local area network, or even via a direct wired or wireless link between Alice's and Bob's devices 102a, 102b. In general, a side channel 107 referred to anywhere in this document may include any one or more links via one or more networking technologies or communication media that are used to exchange data "off-chain", i.e., off-chain. The bundle or collection of off-chain links may be referred to as a side channel 107 as a whole. Therefore, it should be noted that if Alice and Bob are said to exchange certain information or data, etc., via a side channel 107, this does not necessarily mean that all of this data must be sent over exactly the same link or even the same type of network.

[0072] Client Software

[0073] Figure 3A An exemplary implementation of a client application 105 for implementing an embodiment of the disclosed solution is shown. The client application 105 includes a transaction engine 401 and a user interface (UI) layer 402. According to the solution discussed above and discussed in further detail later, the transaction engine 401 is configured to implement basic transaction-related functions of the client 105, such as formulating transactions 152, receiving and / or sending transactions and / or other data through the side channel 301, and / or sending transactions to one or more nodes 104 for propagation through the blockchain network 106. According to the embodiments disclosed herein, the transaction engine 401 of each client 105 may include a function 403.

[0074] The UI layer 402 is configured to present a user interface through a user input / output (I / O) mode of the corresponding user's computer device 102, including outputting information to the corresponding user 103 through the user output mode of the device 102, and receiving input from the corresponding user 103 through the user input mode of the device 102. For example, the user output mode may include one or more screens (touch or non-touch screen) that provide visual output, one or more speakers that provide audio output, and / or one or more tactile output devices that provide tactile output, etc. The user input mode may include, for example, an input array of one or more touch screens (which may be the same or different from that / those used for the output mode); one or more cursor-based devices such as a mouse, trackpad, or trackball; one or more microphones and voice or sound recognition algorithms for receiving voice or sound input; one or more gesture-based input devices for receiving input in the form of manual or physical gestures; or one or more mechanical buttons, switches, or joysticks, etc.

[0075] Note: Although various functions in this document may be described as being integrated into the same client application 105, this does not necessarily constitute a limitation. Instead, they can be implemented in a suite of two or more different applications, such as one application as a plug-in to another application or interfacing via an API (application programming interface). For example, the functionality of the transaction engine 401 can be implemented in a separate application rather than in the UI layer 402, or the functionality of a given module such as the transaction engine 401 can be split between multiple applications. At the same time, it is not excluded that some or all of the described functions can be implemented, for example, at the operating system level. Where a single or given application 105 or the like is referenced anywhere in this document, it should be understood that this is only by way of example, and more generally, the described functions can be implemented in any form of software.

[0076] Figure 3B A model is given of an example of a user interface (UI) 500 that may be presented by the UI layer 402 of the client application 105a on Alice's device 102a. It should be understood that a similar UI may be presented by the client 105b on Bob's device 102b or any other party's device.

[0077] By means of diagrams, Figure 3B The UI 500 is shown from Alice's perspective. The UI 500 may include one or more UI elements 501, 502, 503, which are presented as different UI elements through user output.

[0078] For example, the UI elements may include one or more user-selectable elements 501, which may be different buttons on a screen, different options in a menu, or the like. The user input method is configured to enable the user 103 (in this case, Alice 103a) to select or otherwise operate one of the options, such as by clicking or touching the UI element on the screen, or speaking the name of the desired option (Note: the term "manual" as used herein is only used to contrast with automatic, and is not necessarily limited to performing operations by hand).

[0079] Alternatively or additionally, the UI element may include one or more data input fields 502 through which a user may ... These data input fields may be presented via a user output means, such as on a screen, and data may be entered into the fields via a user input means, such as a keyboard or touch screen. Alternatively, the data may be received verbally based on speech recognition or the like.

[0080] Alternatively or additionally, the UI element may include one or more information elements 503 that output information to the user. For example, this / these may be presented on a screen or audibly.

[0081] It should be understood that the specific manner in which various UI elements, selection options, and input data are presented is not important. The functions of these UI elements will be discussed in more detail later. It should also be understood that the UI 500 shown in Figure 3 is only a diagram model, and in practice, it may include one or more further UI elements, which are not described for the sake of brevity.

[0082] Node software

[0083] Figure 4 An example of node software 450 running on each blockchain node 104 of the network 106 in an example of a UTXO-based or output-based model is shown. It should be noted that another entity may run the node software 450 without being classified as a node 104 on the network 106, i.e., not performing the actions required of the node 104. The node software 450 may include, but is not limited to, a protocol engine 451, a scripting engine 452, a stack 453, an application-level decision engine 454, and a collection of one or more blockchain-related functional modules 455. Each node 104 may run node software that includes, but is not limited to, all three of the following: a consensus module 455C (e.g., proof of work), a propagation module 455P, and a storage module 455S (e.g., a database). The protocol engine 401 is typically configured to identify different fields of a transaction 152 and process such fields according to the node protocol. When a transaction 152i (Tx m-1 )’s output (e.g., UTXO) is an input transaction 152j (Tx j ), the protocol engine 451 identifies Tx j The unlocking script in and passes it to the script engine 452. The protocol engine 451 also j Pointer in the input to identify and retrieve Tx i .Tx i may be published on blockchain 150, in which case the protocol engine may retrieve Tx from the copy of block 151 of blockchain 150 stored at node 104 i . Or, Tx i It can also be published on blockchain 150. In this case, protocol engine 451 can retrieve Tx from unpublished ordered transaction set 154 maintained by node 104. i Regardless of the method used, the script engine 451 will identify Tx i The locked script in the reference output is passed to the script engine 452.

[0084] Therefore, the script engine 452 has Tx i The locking script and the j The unlocking script for the corresponding input. For example, Figure 2 Transaction labels Tx0 and Tx1 are shown in FIG, but the same transaction can also be applied to any transaction pair. As previously described, the script engine 452 runs two scripts together, which will include placing data on and retrieving data from the stack 453 according to the stack-based scripting language used (e.g., script).

[0085] By running the scripts simultaneously, the script engine 452 determines whether the unlocking script satisfies one or more criteria defined in the locking script, i.e., whether the unlocking script unlocks the output including the locking script? The script engine 452 returns the result of the determination to the protocol engine 451. If the script engine 452 determines that the unlocking script does meet one or more criteria specified in the corresponding locking script, the result "TRUE" is returned. Otherwise, the result "FALSE" is returned.

[0086] In the output-based model, the result "TRUE" from the script engine 452 is one of the conditions for the validity of the transaction. Typically, one or more further protocol-level conditions evaluated by the protocol engine 451 must also be satisfied; for example, Tx j The total amount of digital assets specified in the inputs of tx does not exceed the total amount pointed to in its outputs, and tx i The pointed output of has not been spent by another valid transaction. The protocol engine 451 evaluates the result from the script engine 452 and one or more protocol-level conditions, and only if they are all TRUE, the protocol engine verifies the transaction Tx j The protocol engine 451 outputs an indication of whether the transaction is valid to the application-level decision engine 454. j Only when the conditions are really valid, the decision engine 454 can choose to control the consensus module 455C and the propagation module 455P at the same time to execute its Tx j . This includes the consensus module 455C, adding Tx to the corresponding ordered transaction set 154 of the node j , for incorporation into block 151; and propagation module 455P, Tx j Forwarded to another blockchain node 104 in the network 106. Optionally, in an embodiment, the application-level decision engine 454 may apply one or more additional conditions before triggering one or both of these functions. For example, the decision engine may choose to publish a transaction only if the transaction is valid and sufficient transaction fees are reserved.

[0087] In addition, it should be noted that in this article, the terms "TRUE" and "FALSE" are not necessarily limited to returning results that are expressed only in the form of a single binary number (bit), although this is indeed a possible implementation. More generally, "TRUE" can refer to any state indicating a successful or positive result, while "FALSE" can refer to any state indicating an unsuccessful or non-positive result. For example, in an account-based model, the combination of implicit protocol-level verification of signatures and additional positive outputs of smart contracts can be used to indicate that the result is "TRUE" (if both individual results are TRUE, the overall result is considered to be TRUE).

[0088] Communication system, method and computer program

[0089] The network can be used to communicate with one or more devices and manage one or more devices. Each network can have a corresponding controller. In some examples, the devices in the network (non-controller devices) may include devices that use a small amount of energy to run. Such devices may be referred to as low-power electronic devices (Low-Power Electronics, LPE). In the following, the devices in the local network controlled by the controller may be referred to as "LPE", but it should be understood that one or more of these LPE devices may be replaced by other devices that are not LPE devices. For example, the LPE device may include an Internet of Things (IoT) device, such as an IoT sensor. It should be noted that although some examples are applicable to systems including LPE devices, the methods and systems disclosed herein are also applicable to other types of devices.

[0090] In an example, a controller creates and manages a local network including the controller and one or more devices. The network is capable of participating in internal communications and external communications through blockchain transactions. Transactions in the network can be authenticated using blockchain.

[0091] As the use of LPE devices such as IoT devices becomes more common, communication protocols that adapt to the efficiency requirements of LPE devices are needed. These communication protocols can also be used with other types of devices to improve operational efficiency. Some examples disclosed herein also maintain data integrity of some forms of communication within the system. Some examples disclosed herein also provide a system capable of authenticating communications within the system.

[0092] Some examples describe blockchain-based communication protocols. The blockchain-based communication protocols may include Bitcoin-based communication protocols. The blockchain-based communication protocols may allow low-bandwidth and / or low-energy communications while natively embedding blockchain-based specific functions as underlying services for notarization, data integrity, and authentication.

[0093] Some examples could provide a communication protocol within a system that communicates internally at some network layer. External communications with the system (incoming or outgoing) could be authenticated as transactions on the blockchain.

[0094] Figure 5 An example of the network layer is shown in Figure 5 In the example of FIG, the Internet Protocol Suite (Transmission Control Protocol / Internet Protocol (TCP / IP)) is shown, but it should be understood that the method disclosed in this article can be applied to other network configurations.

[0095] The Internet Protocol Suite (TCP / IP) defines a set of protocols for communication in computer networks. The Internet Protocol Suite (TCP / IP) is conceptually built into a system 558 that includes four layers that describe how data is transmitted at different granularities. The first layer 550 includes the link layer. The link layer 550 can be used for Ethernet, Wi-Fi, or digital subscriber line (DSL) communications.

[0096] An internet layer 552 is provided above the link layer 550, which may be used, for example, for internet protocol communications. A transport layer 554 is provided above the internet layer 552. The transport layer 554 may be used for transmission control protocol (TCP) and user datagram protocol (UDP) communications. The application layer 556 may be used for at least one of the following: hypertext transfer protocol (HTTP) communications; transport layer security (TLS) / secure socket layer (SSL) communications; domain name system (DNS) communications; point of presence (POP) communications.

[0097] The Internet layer 552 defines how devices identify and locate themselves in the network. The Internet layer 552 includes methods, protocols, and specifications for addressing and transmitting packets across and between networks. At the core of the Internet layer 552 is the IP protocol, which is widely used to specify packet destinations and for routing purposes.

[0098] Some of the examples disclosed herein define a peer-to-peer (P2P) protocol that can be employed at the same level as the Internet layer 552, enabling low-power devices (e.g., IoT devices) to communicate within the network and communicate with the blockchain. The protocols disclosed herein can be applied to systems of any type of device, but are useful for LPE devices (e.g., IoT devices that are typically very small, low-power tools that are not connected to a power source). Due to the limited available energy, LPE devices require efficient hardware and low-rate, low-energy communication protocols. The protocols disclosed herein allow communication between devices and blockchains using a local network. The local network may include a self-organizing local network.

[0099] In a specific example, the protocol may be referred to as the "P2P Bitcoin Internet Layer Protocol (BILP)". However, it should be noted that the protocol is not limited to use with Bitcoin (other blockchains may also be used) nor is it limited to the Internet layer (it may operate in different layers of a communication network).

[0100] The system 600 includes a controller device 660. One or more devices 662a, 662b, and 662c can communicate with an external network through the controller 660. At least one of the one or more devices 662a, 662b, and 662c can include an LPE. The local network 690 can include the controller 660 and the one or more devices 662a, 662b, and 662c. The controller 660 can be used to manage the network 690 and coordinate the one or more devices 662a, 662b, and 662c. Although three devices 662a, 662b, and 662c are shown in the system 600, the network 690 can include more or fewer devices.

[0101] The controller 690 and one or more devices 662a, 662b, and 662c may communicate within a certain network layer within the local network 690. For example, communication within the local network 690 may occur at the Internet layer.

[0102] exist Figure 6 In the example of FIG. 6 , controller 690 can communicate with device 662a via connection 666a. Controller 690 can also communicate with device 662b via connection 666b. Device 662b can communicate with device 662c via connection 666d. Device 662c can communicate with device 662a via connection 666c.

[0103] Controller 660 can communicate with devices external to network 690. Controller can communicate with blockchain 150 (which can be a blockchain node or blockchain network) via connection 664. In some examples, connection 664 includes a TCP / IP connection. In some examples, connections 666a, 666b, and 666c include low-power connections. For example, the low-power connection can include, for example, a low-energy Bluetooth connection.

[0104] Controller 660 can collate messages from devices 662a, 662b, and 662c into blockchain transactions (e.g., Bitcoin transactions) and send the blockchain transactions to blockchain 150. By exchanging information constructed within blockchain transactions, devices 662a, 662b, and 662c can communicate with each other (exchange updates and pass messages), communicate with external resources, and upload / retrieve data to / from blockchain 150. Therefore, the communication protocol can provide local data integrity and authentication through low-bandwidth, low-energy communication.

[0105] In some examples, the only device in system 690 connected to the Internet is controller 690, and devices 662a, 662b, and 662c communicate with the controller or with each other over a low-power connection.

[0106] In some examples, network 690 includes a local network. In some examples, network 690 includes an ad hoc network. Network 690 that follows BILP rules can be considered to include a "BILP network."

[0107] Controller 660 may be the most powerful device in network 690. Controller 660 may act as a coordinator for other devices 662a, 662b, and 662c. Controller 660 may be the only device in network 660 that interacts with blockchain 150. In some examples, controller 660 may include a wired device with sufficient power and bandwidth to maintain a stable connection with the blockchain and receive and broadcast blockchain transactions. In some examples, controller 660 may manage other devices in network 690. In some examples, controller 660 may collect and route transactions from / to devices 662a, 662b, and 662c.

[0108] Devices 662a, 662b, and 662c may include LPE devices, such as IoT sensors. The design of such devices may sacrifice some performance in exchange for low energy consumption and long battery life. Such devices are typically wireless IoT devices that communicate with a central coordinator (which may be controller 690) at low power consumption and low frequency. To improve network robustness and resilience, in some implementations, devices 662a, 662b, and / or 662c may also broadcast messages from other devices (e.g., other LPEs) to controller 690, and vice versa, thereby creating a mesh network 690.

[0109] In BILP, the power requirements of one or more devices 662a, 662b, or 662c are low. In addition to the energy / computation required to complete its designed task (e.g., measuring temperature, recording some actions), devices 662a, 662b, and 662c only need enough computing power to create and sign the original transaction and transmit it to the controller 660.

[0110] Devices 662a, 662b, and 662c can uniquely identify themselves using an identifier (e.g., a public key). For simplicity and to ensure compatibility, in some examples, the public key can be derived from the private key following the same rules used to generate the public key for blockchain (e.g., Bitcoin) transactions. Data from devices 662a, 662b, and 662c transmitted within and outside the network 690 can be signed using the corresponding private key of device 662a, 662b, or 662c to create an immutable association between the data from the device and the device that published the data. For example, it is always possible to track which device has published some given information, or to retrieve all information published by a single device. Since the private key is embedded in the device, the signature can also be used as a form of authentication.

[0111] The networks described herein (including the BILP network) can be divided into two categories, depending on who funds the transactions containing the messages and data to be published on the blockchain 150. In the first category, "the controller pays all fees", the controller 660 acts as the master peer, broadcasting messages to the blockchain and funding transactions for the entire BILP network. This method can be selected when the LPE devices 662a, 662b, and 662c are trusted and managed by the controller 660 (e.g., a group of IoT sensors in a building). In the second category, "LPEs pay for themselves", the controller 660 acts as a coordinator and gateway for the blockchain 150, but each LPE 662a, 662b, and 662c is responsible for funding the information they want to share and publish. This method should be selected when the LPE devices 662a, 662b, and 662c are independent entities and can be temporarily connected to the BILP network 690 (e.g., electric vehicles connected to vehicle charging stations).

[0112] BILP networks such as network 690 can be used in system-to-system exchanges and IoT groups, where transactions are signed by multiple parties and collated by a gateway to be sent to blockchain 150. Controller 660 can be connected to blockchain 150. In some examples, controller 660 can connect to blockchain 150 through a mAPI gateway using a standard Internet connection (i.e., IP protocol), as described in the "Merchant API Documentation" (https: / / github.com / bitcoin-sv-specs / brfc-merchantapi). In this way, controller 660 can act as a gateway and transaction broadcaster to / from the blockchain and LPEs 662a, 662b, and 662c.

[0113] Communications 666a, 666b, and 666c between LPEs 662a, 662b, and 662c within the same BILP network 690 may include P2P or peer-to-peer controller connections compliant with BILP. For specific cases, such as when transactions have an implicit hierarchical structure or require access control, the Metanet protocol [BSV wiki, "Metanet Protocol," https: / / wiki.bitcoinsv.io / index.php / Metanet_Protocol] may be used to construct some BILP transactions in BILP transactions.

[0114] A unique ID may be used to identify devices such as LPEs 662a, 662b, and 662c that belong to the same network 690. Each LPE 662a, 662b, and 662c communicates its ID to relevant parties (including the controller 660). The ID of a device may be a public key selected by the corresponding device (generated from a private key controlled by them) or a hash derived from unique LPE hardware and software. In the following, without loss of generality, a public key is used to identify LPEs 662a, 662b, and 662c in a local network, but it should be understood that a hash or any other form of identification may be used. The controller 660 maintains identification information for LPEs 662a, 662b, and 662c. The identification information may include a list of IDs, referred to as an ID table, including all identifiers (e.g., public keys) of the connected LPEs 662a, 662b, and 662c.

[0115] The identification information stored at the controller 660 may include a list of identifiers (ID table) of the connected LPEs 662a, 662b, and 662c. If the LPEs actively communicate that they will leave the network 690, or if the LPEs stop replying to controller 660 messages for an excessive period of time (exceeding a predetermined time threshold), the LPEs may be removed from the ID table.

[0116] Three modules can be used for the communication protocol disclosed herein. An outbound communication module and an inbound communication module can be used for external devices, and a local communication module can be used in a local network 690. The three modules include:

[0117] ● Outbound communication: Devices 662a, 662b, and 662c (e.g., LPEs) want to transmit messages to other devices or applications outside of network 690 (e.g., upload data to a blockchain).

[0118] ● Inbound communication: Devices 662a, 662b, and 662c (e.g., LPEs) want to receive messages from other devices or applications outside the network 690 (e.g., download data from a blockchain).

[0119] ● Local communication: Devices 662a, 662b, and 662c (eg, LPEs) want to communicate with other devices 662a, 662b, and 662c within the same network 690.

[0120] Messages may include any type of information transmitted from / to devices 662a, 662b, 662c (e.g., to LPE devices). This includes communication messages, plaintext data or encrypted data, and any other type of information. The information may be simply data (e.g., other protocols in the Internet layer), such as data received from upper layers of the Internet protocol suite (e.g., from TCP or UDP). Alternatively, the information may be application layer information (e.g., communication messages). In the latter case, BILP is considered to be a protocol ranging from the Internet to the application layer of the Internet protocol suite.

[0121] For auditability reasons (outbound and inbound communication protocols), communication between multiple BILP networks is usually carried out through the blockchain. In specific cases, such as when higher privacy is required, two or more BILP networks can be connected through their respective controllers (e.g., through a VPN). In this case, the communication is not stored on the chain, but follows a local communication protocol, with the controller collecting and broadcasting message transactions between the networks.

[0122] Depending on the network configuration, a controller such as controller 690 can operate in two modes (as a router or as a peer).

[0123] Figure 7 The first mode "router mode" is shown in FIG. If the controller 660 is in router mode, in addition to the ID table, the controller 660 also tracks all connected LPEs 762a, 762b, 762c, and 762d in the local network 790, and also stores information about how to contact each LPE device individually. This additional information is stored in a separate table called an LPE address table 764. The controller 660 transmits messages only to the indicated LPE, using the LPE address table 764 to locate the indicated LPE. The router acts as a central communication point. In some examples, router mode may be the preferred mode for a network with a star topology. In router mode, all devices are connected to the controller 660, which maintains the address table 764 and sends direct messages to the intended recipient. The LPE address table can be viewed as including address information including the address of each device in one or more devices 762a, 762b, 762c, and 762d in the network 790. In router mode, the controller 660 sending a message to at least one of the one or more devices may include transmitting at least one message directly to at least one of the one or more devices 762a, 762b, 762c, and 762d in the network 790 based on the address information. Figure 6 , Figure 7 and Figure 8 The controller 660 shown in FIG. 6 can be the same controller operating in different modes or network configurations. However, in some examples, a different controller can be used in each mode or network configuration. In addition, although Figure 6 , Figure 7 and Figure 8 The LPEs shown in each of the figures are labeled with different reference numerals, but there may be some overlap between the LPE devices shown in these figures. For example, LPE device 662a may include LPE device 762a. In another example, LPE device 762a may include LPE device 862a.

[0124] Figure 8 The second mode "peer mode" is shown in the figure. If the controller 660 is in peer mode, the controller 660 does not need to track LPEs 862a, 862b, 862c, and 862d in the local network 890 (i.e., there is no need to store the LPE address table, only maintain the ID table). Messages are broadcast to the neighbors of the controller 660, which in turn broadcast the messages to their own neighbors until the message reaches all peers. A device can be considered adjacent to another device in the network, provided that the devices are directly connected to each other. The relevant peers identify (and optionally decrypt) messages sent to them. This configuration allows redundant interconnections to be created between peers. For networks with a mesh topology, peer mode may be the preferred mode. In peer mode, a device can be connected to a controller or another device, and messages are broadcast to all peers until they reach the recipient. In peer mode, sending a message to at least one of one or more devices 862a, 862b, 862c and 862d in the network 890 may include: the controller 660 broadcasts at least one message to one or more neighboring devices in the network, wherein the one or more neighboring devices broadcast the at least one message to one or more other neighboring devices until the at least one message is delivered to at least one of the one or more devices.

[0125] In peer mode, communication relies on LPEs broadcasting messages to their neighbors. However, LPEs may want to be as efficient as possible and may not propagate messages in some examples. In some implementations, message propagation may be enforced, for example, by blacklisting LPEs that do not broadcast messages. This may be accomplished by the controller 660 actively monitoring the network and removing identifiers (e.g., public keys) of dishonest LPEs from the ID table (i.e., disabling outbound communications for these LPEs).

[0126] In some examples, for increased security, the message can be encrypted using the public key of the receiver (or intended recipient). In this way, only the intended receiver can decrypt the message using the corresponding private key. In some examples, an encryption scheme can be used to provide data validity, so the LPE knows that the data has not been changed after being submitted to the blockchain or similarly when it is received by the LPE from an external transmitter.

[0127] The outbound communication module can be used to communicate with external devices (e.g. Figure 6 The BILP local network can be used to communicate with devices outside the network 690. The outbound communication module can be used to store / authenticate data on the chain. Uploads from the BILP local network to the blockchain can use coordination between the LPE and the network's controller 660. When a blockchain transaction is published on the chain, fund management can be used to pay the correct amount of fees.

[0128] The outbound communication module can be managed by communication rounds (BILP communication rounds). The controller 660 can maintain identification information for each device 662a, 662b, and 662c in the network 690. The identification information may include an index number assigned to each device. Each communication round may be initiated by the controller 660. The controller 660 assigns an index number to each device in the network. This can be performed using an ID table. The index number of a particular device can be transmitted from the controller 660 to the corresponding particular device. The index number indicates the output point index reserved for the particular device. Each device (e.g., LPE device) identifier (e.g., public key) can be mapped to an output point. Each device can then create a blockchain partial transaction (e.g., an input-output pair), in which each device inserts the data it wants to broadcast using the index number assigned to it. The data can be signed using the private key of the device. The data may include measurements made by the device (e.g., sensor measurements). For example, the data may be inserted using an OP_RETURN function or using OP_PUSH and OP_DROP functions. The partial transactions (input-output pairs) generated by each LPE are then broadcast to the connected LPEs, which in turn rebroadcast them to their neighbors. If an LPE has multiple connections, it may receive the same partial transaction multiple times, in which case all duplicate messages can be safely discarded.

[0129] When a new communication round begins, a device (eg, LPE) may create a blockchain (eg, Bitcoin) transaction with the SIGHASH_SINGLE|ANYONECANPAY flag, filling in the inputs and outputs corresponding to the index assigned by the controller 660. This partial transaction is transmitted to the controller 660.

[0130]

[0131] Table 1: Example of a partial transaction (input-output pair) created by LPE i, where index i is assigned by the controller for a particular communication round. Fields surrounded by asterisks (*) may be signed when SIGHASH_SINGLE|ANYONECANPAY is in effect.

[0132] At the end of each communication round, the controller 660 can organize the partial transactions into new transactions ("BILP transactions") for publication on the chain.

[0133] A BILP transaction is a data structure that uses a blockchain (e.g., Bitcoin) transaction protocol to broadcast information within the network and publish it to the blockchain 150 via the controller 660. Each transaction contains an input / output pair for each LPE connected to the network (indexed by the assigned output point) and a signature from the controller 660.

[0134] When a communication round begins, a device (e.g., LPE) can create its own partial transaction or append its inputs and outputs to an existing partial transaction if they have already received at least one of the inputs and outputs. In both cases, the device simply fills in the input / output pairs with the index assigned by the controller 660 so that the controller 660 can check and merge a single transaction in the final BILP transaction. Depending on the network type, the output point TxID LPEi This can be a simple dust transaction to sign and authenticate data ("controller pays all" type), or can contain enough value (e.g., satoshis) to fund the transaction ("LPE pays itself" type). It should be noted that the device does not have a change address, and in the latter method, any additional funds are collected by the controller 660. In both cases, each device can use a pre-loaded list of UTXOs to be consumed over time.

[0135] In some implementations, communication rounds may be preceded by confirmation rounds, where only devices willing to communicate express their intent to do so. In this case, in the next BILP transaction, the controller 660 allocates output point indexes only to devices that express their interest. Devices may skip some rounds to gain additional energy efficiency at the expense of output frequency. Before the controller 660 receives one or more input-output pairs for generating blockchain transactions from one or more devices in the network 690, the controller 660 may send a request to each of the one or more devices to confirm the intent to participate in a round of communication. In response to the request, the controller 660 may receive an indication of the intent to participate in the round of communication from at least one of the one or more devices.

[0136] Once all intended devices broadcast their portion of the transaction, the controller 660 may generate a blockchain transaction based on one or more input-output pairs received from the devices. This may be performed by the controller 660 collating the input-output pairs into the same transaction. Before sending the blockchain transaction to the blockchain, the controller 660 may add additional output points to the blockchain transaction indicating that the controller has signed all inputs and all outputs of the blockchain transaction. For example, the controller 660 may add additional output points with the SIGHASH_ALL flag to authenticate the transaction and make it immutable. If the network is "controller pays all", the controller 660 output points may also include the amount (e.g., Satoshi) required to fund all other output points in the transaction, and may also add relevant controller 660 change outputs (see Table 1). Finally, the controller 660 broadcasts the final BILP transaction to the blockchain (i.e., to the blockchain 150) to authenticate the data and message.

[0137]

[0138] Table 2: Example of the final BILP transaction created by the controller. When SIGHASH_ALL is in effect, the fields surrounded by asterisks (*) may be signed.

[0139] The Inbound Communication Module can be used to download data from the blockchain to the local (BILP) network. The Inbound Communication Module can also be used to retrieve external messages.

[0140] In some examples, in order to maintain compatibility with other modules, the inbound module can follow the same rules and structure as the outbound module. The controller 660 retrieves the message from the blockchain and transmits the message to the relevant device according to the configured controller type (router mode or peer mode as described above).

[0141] ● Router Mode : The controller 660 transmits the message to the indicated LPE (based on the public key or other identifier). The associated device decrypts the message.

[0142] ● Peer Mode : The controller 660 broadcasts the message to its neighbors, who in turn broadcast the message to their own neighbors until the message reaches all peers. The relevant peers recognize the message and decrypt it.

[0143] An example of transactions retrieved from the blockchain and transmitted to 3 LPEs is shown in Table 3.

[0144]

[0145] Table 3: Example of a BILP inbound transaction. In this example, three LPEs (i.e., LPE alice 、LPE bob and LPE charlie ) receives a message from a transmitter located outside the BILP network. The data can be encrypted using the receiver’s public key to enhance privacy.

[0146] The controller 660 may identify transactions intended to be sent to its internal (BILP) network by monitoring transactions in the blockchain for an identifier (e.g., a public key) identifying (including) at least one of the one or more devices 662a, 662b, and 662c in the network 690, or by using other available techniques (e.g., an external transmitter may notify the controller 660 of these techniques, the notification including the public key or other identifier of at least one of the one or more devices 662a, 662b, and 662c). The controller 660 may identify a transaction on the blockchain (the transaction including at least one message intended to be sent to at least one of the one or more devices in the network), then retrieve the at least one message from the blockchain and send the at least one message to at least one of the one or more devices 662a, 662b, and 662c in the network 690. The method for identifying and retrieving inbound transactions is similar to other applications (e.g., wallets).

[0147] Local communication modules can be used to exchange messages within the same network, and these locally communicated messages will not be recorded on the chain. For inbound modules, the controller 660 can act as a router or a peer depending on the network configuration.

[0148] ● Router Mode : The device always sends the message to the controller 660, which transmits the message to the indicated LPE (based on the public key or other identifier). The relevant peer decrypts the message.

[0149] ● Peer Mode : The device broadcasts the message to its neighbors, who in turn broadcast the message to their own neighbors until the message reaches all peers. The relevant peers recognize the message and decrypt it.

[0150] To maintain compatibility and consistency with other modules, the local communication module can follow the same rules and structure as the previously described modules. Since in this module, transactions do not need to be finalized by the controller 660 or broadcast externally, there is no need to use the BILP communication round protocol (defined in the outbound module) to pre-assign indexes (i.e., sequence numbers). After internal sharing, transactions can be discarded. Any LPE willing to communicate can create a Bitcoin transaction with the SIGHASH_SINGLE|ANYONECANPAY flag (Table 4). Depending on the network configuration, transactions are transmitted to the controller 660 (router mode) or the LPE's neighbors (peer mode).

[0151] From the perspective of the controller 660, when using the local communication module and operating in router mode, the method may include: receiving a message from a first device in the network intended to be sent to a second device in the network; and transmitting the message to the second device in the network. The controller 660 may then discard the message after transmitting the message to the second device in the network.

[0152] From the perspective of the controller 660, when using the local communication module and operating in peer mode, the method may include: receiving a message broadcasted from a neighboring device in the network, the message intended to be sent to a third device in the network; and broadcasting the message to one or more neighboring devices in the network. The controller 660 may then discard the message after transmitting the message to the one or more neighboring devices in the network.

[0153] It should be noted that these transactions are only used for internal communication (they are not published on-chain), so there is no need to fund them (e.g., spent transaction outputs can be reused). They maintain the blockchain transaction structure only for compatibility with other communication modules. Regarding other communications, for increased security, the messages can be encrypted using the receiver's public key.

[0154]

[0155] Table 4: Example of a (BILP) partial transaction for local communication. In this example, LPE alice Using LPE bob The public key of LPE bob Transfer some data.

[0156] For some use cases, it may be useful to maintain and prove the order of message transmission (for example, internal communication between two devices exchanging data). In this case, messages can be grouped into threads. Threads do not require any additional logic; they simply reach consensus between two or more devices. If a message is part of a message thread, other LPEs can attach their messages to the same transaction (such as using SIGHASH_SINGLE|ANYONECANPAY). Using sequence numbers, the order in which the messages were created is recorded in the transaction. This allows the creation of an ordered sequence of messages for internal communication. Since internal communication occurs entirely off-chain, ordering cannot be enforced, but LPEs can choose to respond to existing threads by attaching their messages to existing transactions.

[0157] Each time a transaction is updated with new data (ie, output pairs), the message transmission protocol (router mode or peer mode) can be reinitiated (ie, locally rebroadcasted) since the updated message is equivalent to a new message.

[0158]

[0159] Table 5: Example of a partial transaction for a local communication update. A new input / output pair is appended to a previous communication message. In this example, LPE bob Replying to LPE alice . Sequence numbers ensure transaction order.

[0160] When using the inbound or outbound communication module, a record of data sent from the local network can be stored on the blockchain. When using the local communication module, records may not be sent.

[0161] In some examples, communications within the local network are performed at the Internet layer of the Internet protocol suite.

[0162] The data sent by one or more devices (LPE) of the network may include at least one of the following: temperature; humidity; air quality; image information of an area of ​​the environment.

[0163] The above protocol can be used for building management. IoT devices can communicate and share information through the BILP network. All data and messages are automatically authenticated on-chain. Public information can be directly broadcast and made available to possible users, while private information can be authenticated by publishing only its hash digest. For example, IoT sensors can monitor the temperature and humidity of a workplace to authenticate air quality, while other sensors can record entry into restricted areas.

[0164] The above protocol can be used in vehicle charging stations. Electric vehicles can connect to the charging station BILP network and use it to record information such as charging time and cost. This information can be used later for analysis or billing purposes. In addition, the car can securely receive updates or notifications from the car manufacturer or other services. In such examples, one or more parameters of the electric vehicle charging session can be recorded. For example, these parameters can include at least one of the following: charging time; cost; energy used.

[0165] Further comments

[0166] Other variations or uses of the disclosed technology may become apparent to those skilled in the art once given the disclosure herein.The scope of the present disclosure is not limited by the described embodiments but only by the appended claims.

[0167] For example, some of the embodiments above have been described in terms of the Bitcoin network 106, the Bitcoin blockchain 150, and the Bitcoin node 104. However, it should be understood that the Bitcoin blockchain is a specific example of a blockchain 150, and the above description can generally be applied to any blockchain. That is, the present invention is in no way limited to the Bitcoin blockchain. More generally, any references to the Bitcoin network 106, the Bitcoin blockchain 150, and the Bitcoin node 104 above can be replaced with reference to the blockchain network 106, the blockchain 150, and the blockchain node 104, respectively. Blockchains, blockchain networks, and / or blockchain nodes can share some or all of the characteristics of the Bitcoin blockchain 150, the Bitcoin network 106, and the Bitcoin node 104 described above.

[0168] In a preferred embodiment of the present invention, the blockchain network 106 is a Bitcoin network, and the Bitcoin node 104 performs at least all of the functions described in creating, publishing, propagating and storing blocks 151 of the blockchain 150. It is not excluded that there may be other network entities (or network elements) that perform only one or some of these functions but not all of them. That is, a network entity may perform the functions of propagating and / or storing blocks without creating and publishing blocks (remember that these entities are not considered to be nodes of the preferred Bitcoin network 106).

[0169] In other embodiments of the present invention, the blockchain network 106 may not be a Bitcoin network. In these embodiments, it is not excluded that the node can perform at least one or part of the functions of creating, publishing, propagating and storing blocks 151 of the blockchain 150, but not all of the functions. For example, on these other blockchain networks, "node" may be used to refer to a network entity that is configured to create and publish blocks 151 but does not store and / or propagate these blocks 151 to other nodes.

[0170] Even more generally, any reference above to the term "Bitcoin node" 104 may be replaced with the term "network entity" or "network element," where such entity / element is configured to perform some or all of the roles in creating, publishing, propagating, and storing blocks. The functionality of such a network entity / element may be implemented in hardware in the same manner as described above with reference to blockchain node 104.

[0171] It should be understood that the above embodiments are described by way of example only. In more general terms, a method, apparatus or program may be provided according to any one or more of the following statements.

[0172] Statement 1: A computer-implemented method, the method being performed by a controller, the controller being configured to communicate with a blockchain and a network, the network comprising one or more devices, the method comprising: maintaining identification information, the identification information comprising an index number, the index number being assigned to each of the one or more devices; receiving one or more input-output pairs of a blockchain transaction, wherein each input-output pair is associated with an assigned index number, and wherein each input-output pair comprises data from a device of the one or more devices; generating a blockchain transaction based on the one or more input-output pairs; and sending the blockchain transaction to the blockchain.

[0173] Statement 2: A method according to statement 1, wherein the method comprises: assigning the index number to each of the one or more devices by mapping an identifier of each of the one or more devices to the index number; and communicating (also translated as communicating) the index number assigned to the device to each of the one or more devices.

[0174] Statement 3: A method according to statement 1 or 2, wherein the method includes: before receiving the one or more input-output pairs of the blockchain transaction, sending a request to each of the one or more devices to confirm an intention to participate in a round of communication; in response to the request, receiving an indication of the intention to participate in the round of communication from at least one of the one or more devices.

[0175] Statement 4: A method as described in any of the preceding statements, wherein the data from a device of the one or more devices is signed with a signature corresponding to a public key of the device.

[0176] Statement 5: A method according to any of the preceding statements, wherein the method includes: before sending the blockchain transaction to the blockchain, adding an additional output point to the blockchain transaction, the additional output point indicating that the controller has signed all inputs and all outputs of the blockchain transaction.

[0177] Clause 6: The method of clause 5, wherein the additional output comprises an amount that funds all other outputs in the blockchain transaction.

[0178] Statement 7: A method according to any of the preceding statements, wherein the method comprises: identifying a transaction on the blockchain, the transaction comprising at least one message intended to be sent to at least one of the one or more devices in the network; retrieving the at least one message from the blockchain; and sending the at least one message to the at least one of the one or more devices.

[0179] Statement 8: The method of statement 7, wherein identifying the transaction in the blockchain comprises: monitoring the blockchain for transactions for an identifier that identifies at least one of the one or more devices.

[0180] Statement 9: The method of statement 7 or 8, wherein identifying the transaction in the blockchain comprises: receiving a notification from a device external to the network, the notification comprising an identifier of at least one of the one or more devices.

[0181] Statement 10: A method according to any one of statements 7 to 9, wherein the method includes: maintaining address information, the address information including the address of each device in the one or more devices; and wherein sending the at least one message to the at least one device in the one or more devices includes: based on the address information, transmitting the at least one message directly to the at least one device in the one or more devices.

[0182] Statement 11: A method according to any one of statements 7 to 9, wherein sending the at least one message to the at least one device among the one or more devices includes: the controller broadcasting the at least one message to one or more adjacent devices in the network; wherein the one or more adjacent devices broadcast the at least one message to one or more other adjacent devices until the at least one message is delivered to the at least one device among the one or more devices.

[0183] Statement 12: A method according to any of the preceding statements, wherein the method comprises: receiving a message intended to be sent to a second device in the network from a first device in the network; and transmitting the message to the second device in the network.

[0184] Statement 13: The method of statement 12, wherein the method comprises discarding the message after transmission to the second device in the network.

[0185] Statement 14: A method according to any one of statements 1 to 11, wherein the method comprises: receiving a message broadcast from an adjacent device in the network, wherein the message is intended to be sent to a third device in the network; and broadcasting the message to one or more adjacent devices in the network.

[0186] Statement 15: The method of statement 14, wherein the method comprises discarding the message after transmission to the one or more neighboring devices in the network.

[0187] Statement 16: The method of any one of statements 7 to 15, wherein at least one message is encrypted using a public key of an intended recipient device of the network.

[0188] Statement 17: A method according to any of the preceding statements, wherein the index number of a device in the one or more devices is removed, or the index number of a device in the one or more devices is assigned to a different device if at least one of the following situations occurs: the device communicates (also translated as communicates) that the device has left the network; the device does not respond to a message from the controller within a predetermined time period; the device is identified by the controller as not broadcasting messages to adjacent devices.

[0189] Statement 18: A method as described in any of the preceding statements, wherein the one or more devices include one or more Internet of Things (IoT) devices.

[0190] Statement 19: A method as described in any of the preceding statements, wherein: for any communication from an external entity to the network, a record is stored on the blockchain; for any communication from the network to an external entity, a record is stored on the blockchain.

[0191] Statement 20: A method as described in any of the preceding statements, wherein communications within the network are performed at the Internet layer of the Internet Protocol Suite.

[0192] Statement 21: A method as described in any of the preceding statements, wherein the controller is connected to one or more blockchain nodes via a Transmission Control Protocol / Internet Protocol (TCP / IP) connection.

[0193] Statement 22: The method of any preceding statement, wherein the data from a device of the two or more devices comprises measurements made by the device.

[0194] Statement 23: A method according to any of the preceding statements, wherein the one or more devices of the network are used to monitor parameters of the environment, the parameters including at least one of the following: temperature; humidity; air quality; image information of the area of ​​the environment.

[0195] Statement 24: A method according to any of the preceding statements, wherein the one or more devices of the network are used to record parameters of an electric vehicle charging session, the parameters including at least one of the following: charging time; cost; energy used.

[0196] Statement 25: A method according to any of the preceding statements, wherein the one or more devices include two or more devices, and wherein generating the blockchain transaction based on the one or more input-output pairs includes: collating the input-output pairs to generate the blockchain transaction.

[0197] Statement 26: A method performed by a system, the system comprising one or more devices, and a controller, the controller being configured to communicate with a blockchain, the method comprising: maintaining, by the controller, identification information, the identification information comprising an index number assigned to each of the one or more devices; generating, by each of the one or more devices, an input-output pair of a blockchain transaction associated with the assigned index number, the input-output pair comprising data from the device; transmitting, by each of the one or more devices, the input-output pair to the controller; collating, by the controller, the input-output pair to generate a blockchain transaction; and sending, by the controller, the blockchain transaction to the blockchain.

[0198] Statement 27: A method performed by a system, the system comprising one or more devices, and a controller, the controller being configured to communicate with a blockchain, the method comprising: maintaining, by the controller, identification information, the identification information comprising an index number assigned to each of the one or more devices; generating, by each of the one or more devices, an input-output pair of a blockchain transaction associated with the assigned index number, the input-output pair comprising data from the device; transmitting, by each of the one or more devices, the input-output pair to the controller so that the controller receives one or more input-output pairs; generating, by the controller, a blockchain transaction based on the one or more input-output pairs; and sending, by the controller, the blockchain transaction to the blockchain.

[0199] Statement 28: The method of statement 27, wherein the one or more devices include two or more devices, and wherein generating the blockchain transaction based on the one or more input-output pairs includes: collating the input-output pairs to generate the blockchain transaction.

[0200] Statement 29: A computer device comprising: a memory, the memory comprising one or more memory units; and a processing device, the processing device comprising one or more processing units, wherein the memory stores code configured to run on the processing device, the code being configured to execute a method according to any one of statements 1 to 28 when running on the processing device.

[0201] Clause 30: A computer program embodied on a computer readable memory and configured to, when executed on one or more processors, perform the method of any one of clauses 1 to 28.

[0202] According to another aspect disclosed herein, a method may be provided, the method comprising actions of the controller.

[0203] According to another aspect disclosed herein, a method may be provided, the method comprising actions of an LPE device.

[0204] According to another aspect disclosed herein, a method may be provided, the method comprising acts of a system including the controller and one or more LPE devices.

[0205] According to another aspect disclosed herein, a system may be provided, the system comprising a computer device of the controller.

[0206] According to another aspect disclosed herein, a system may be provided, the system comprising a computer device of an LPE device.

[0207] According to another aspect disclosed herein, a system may be provided, the system comprising a computer device of the system, the system comprising the controller and one or more LPE devices.< / pa>

Claims

1. A computer-implemented method, the method being performed by a controller, the controller being configured to communicate with a blockchain and with a network, the network comprising one or more devices, the method comprising: maintaining identification information, the identification information comprising an index number assigned to each of the one or more devices; receiving one or more input-output pairs of a blockchain transaction, wherein each input-output pair is associated with an assigned index number, and wherein each input-output pair includes data from a device of the one or more devices; generating a blockchain transaction based on the one or more input-output pairs; The blockchain transaction is sent to the blockchain.

2. The method according to claim 1, wherein the method comprises: assigning the index number to each of the one or more devices by mapping an identifier of each of the one or more devices to the index number; To each of the one or more devices, an index number assigned to the device is communicated.

3. The method according to claim 1 or 2, wherein the method comprises: prior to receiving the one or more input-output pairs of the blockchain transaction, sending a request to each of the one or more devices to confirm an intent to participate in a round of communication; In response to the request, an indication of the intent to participate in the turn of communications is received from at least one of the one or more devices.

4. A method according to any preceding claim, wherein the data from the device of the one or more devices is signed by a signature corresponding to a public key of the device.

5. A method according to any preceding claim, wherein the method comprises: Before sending the blockchain transaction to the blockchain, an additional output point is added to the blockchain transaction, the additional output point indicating that the controller has signed all inputs and all outputs of the blockchain transaction.

6. The method of claim 5, wherein the additional output point comprises an amount that funds all other output points in the blockchain transaction.

7. A method according to any preceding claim, wherein the method comprises: identifying a transaction on the blockchain, the transaction comprising at least one message intended for at least one of the one or more devices in the network; retrieving the at least one message from the blockchain; The at least one message is sent to the at least one device of the one or more devices.

8. The method of claim 7, wherein identifying the transaction in the blockchain comprises: Monitoring the blockchain for transactions for an identifier that identifies at least one of the one or more devices.

9. The method of claim 7 or 8, wherein identifying the transaction in the blockchain comprises: A notification is received from a device external to the network, the notification including an identifier of at least one of the one or more devices.

10. The method according to any one of claims 7 to 9, wherein the method comprises: maintaining address information, the address information comprising an address of each of the one or more devices; And wherein sending the at least one message to the at least one device among the one or more devices comprises: transmitting the at least one message directly to the at least one device among the one or more devices based on the address information.

11. The method according to any one of claims 7 to 9, wherein sending the at least one message to the at least one device among the one or more devices comprises: broadcasting, by the controller, the at least one message to one or more neighboring devices in the network; The one or more neighboring devices broadcast the at least one message to one or more other neighboring devices until the at least one message is delivered to the at least one device among the one or more devices.

12. A method according to any preceding claim, wherein the method comprises: receiving, from a first device in the network, a message intended for transmission to a second device in the network; The message is transmitted to the second device in the network.

13. The method according to claim 12, wherein the method comprises: The message is discarded after transmission to the second device in the network.

14. The method according to any one of claims 1 to 11, wherein the method comprises: receiving, from a neighboring device in the network, a message broadcasted from the neighboring device, the message being intended for a third device in the network; The message is broadcast to one or more neighboring devices in the network.

15. The method according to claim 14, wherein the method comprises: The message is discarded after transmission to the one or more neighboring devices in the network.

16. A method according to any one of claims 7 to 15, wherein at least one message is encrypted using a public key of an intended recipient device of the network.

17. The method of any preceding claim, wherein the index number of a device in the one or more devices is removed or assigned to a different device if at least one of the following occurs: The device communicates that the device will leave the network; the device does not respond to a message from the controller within a predetermined period of time; The device is identified by the controller to not broadcast messages to neighboring devices.

18. The method of any preceding claim, wherein the one or more devices comprise one or more Internet of Things (IoT) devices.

19. A method according to any preceding claim, wherein: storing a record on the blockchain of any communication from an external entity to the network; For any communication from the network to an external entity, a record is stored on the blockchain.

20. A method according to any preceding claim, wherein communications within the network are performed at the Internet layer of the Internet Protocol Suite.

21. A method according to any preceding claim, wherein the controller is connected to one or more blockchain nodes via a Transmission Control Protocol / Internet Protocol (TCP / IP) connection.

22. A method as claimed in any preceding claim, wherein the data from a device of the two or more devices comprises measurements made by the device.

23. A method according to any preceding claim, wherein the one or more devices of the network are used to monitor parameters of an environment, the parameters comprising at least one of: temperature; humidity; air quality; image information of an area of ​​the environment.

24. A method according to any preceding claim, wherein the one or more devices of the network are used to record parameters of an electric vehicle charging session, the parameters comprising at least one of: charging time; cost; energy used.

25. The method of any preceding claim, wherein the one or more devices comprises two or more devices, and wherein generating the blockchain transaction based on the one or more input-output pairs comprises: The input-output pairs are collated to generate the blockchain transaction.

26. A method performed by a system, the system comprising a controller and one or more devices, the controller being configured to communicate with a blockchain, the method comprising: maintaining, by the controller, identification information including an index number assigned to each of the one or more devices; generating, by each of the one or more devices, an input-output pair of a blockchain transaction associated with the assigned index number, the input-output pair comprising data from the device; transmitting, by each of the one or more devices, the input-output pairs to the controller so that the controller receives the one or more input-output pairs; generating, by the controller, a blockchain transaction based on the one or more input-output pairs; The controller sends the blockchain transaction to the blockchain.

27. The method of claim 26, wherein the one or more devices include two or more devices, and wherein generating the blockchain transaction based on the one or more input-output pairs includes: The input-output pairs are collated to generate the blockchain transaction.

28. A computer device, comprising: a memory, the memory comprising one or more memory units; as well as A processing device comprising one or more processing units, wherein the memory stores a code arranged to be executed on the processing device, the code being configured to execute the method according to any one of claims 1 to 27 when executed on the processing device.

29. A computer program embodied on a computer readable memory and configured to, when run on one or more processors, perform the method according to any one of claims 1 to 27.