Transaction processing method and system of payment channel network
By adopting a multi-path routing algorithm in the payment channel network, and using deep reinforcement learning and maximum flow algorithm to determine multiple target decision subpaths, the transaction failure and channel load imbalance caused by the single-path routing algorithm are solved, and high throughput and transaction success rate are improved.
Patent Information
- Application Number
- CN202510380929.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2025-06-20
AI Technical Summary
The existing payment channel network transaction processing methods are mainly based on single-path routing algorithms, which leads to transaction failures due to the lack of high-capacity channels when processing large-value transactions, and are prone to causing routing centralization, channel blockage and channel imbalance, thereby reducing throughput.
The multi-path routing algorithm is adopted, and the forwarding transaction amount corresponding to multiple target decision subpaths and each target decision subpath is determined based on preset optimization algorithms (such as deep reinforcement learning algorithms and maximum flow algorithms) through the routing service provision cluster. The forwarding transaction amount corresponding to the multiple target decision subpaths and each target decision subpath is determined based on the target routing decision to the receiving user node.
Through multi-path routing, the impact of each transaction on network load during the routing process is reduced, the success rate and throughput of transaction processing are improved, and the centralization and channel blockage problems caused by single-path routing algorithm are avoided.
Smart Images

Figure CN120186084A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of network transactions, and in particular, to a transaction processing method and system for a payment channel network. Background Art
[0002] The payment channel network is currently the most widely used off-chain scaling solution. Current research on the payment channel network mainly focuses on improving the system throughput by optimizing the payment channel network algorithm. According to whether transactions are split during path search and transaction processing, the routing algorithms in the payment channel network can be divided into two categories: single-path routing and multi-path routing.
[0003] In the initial stage of the development of the payment channel network routing, algorithms such as source routing improved from traditional networks were used for routing decisions. In the transaction initiation stage, the source node can use classic path-finding algorithms such as Dijkstra and A* to find a set of paths that meet multiple conditions such as channel capacity, processing time, and transaction fees. In the path selection and transaction execution stage, the principle of cost or processing time priority can be used to attempt one by one to achieve off-chain transactions.
[0004] Most of the existing transaction processing methods for payment channel networks execute transactions based on single-path routing algorithms. This algorithm only selects one path for payment in each transaction. However, the single-path routing algorithm may cause transaction failures due to the lack of high-capacity channels when processing large transactions. At the same time, due to the preference for high-capacity channels, it is easy to cause the problem of routing selection centralization, resulting in a small number of channels bearing too much transaction load, leading to channel congestion and channel imbalance, and further resulting in a decrease in throughput. Summary of the Invention
[0005] The present invention provides a transaction processing method and system for a payment channel network, which is used to solve the technical problem that most of the existing transaction processing methods for payment channel networks execute transactions based on single-path routing algorithms, resulting in a decrease in throughput.
[0006] A payment channel network provided in the first aspect of the present invention includes a sending user node, a receiving user node, and a routing service providing cluster. The method includes:
[0007] In response to a transaction instruction, the sending user node obtains the address information of the receiving user node, the address information of the sending user node, and the transaction amount to be processed, and packs them to generate a transaction service request and sends it to the routing service providing cluster;
[0008] The routing service providing cluster, based on a preset optimization algorithm, uses a preset objective function to determine multiple target decision sub-paths and the corresponding forwarded transaction amounts for each of the target decision sub-paths according to the transaction service request, the network topology of the payment channel network, and the observable channel deposits;
[0009] The routing service providing cluster packages each of the target decision sub-paths and the forwarding transaction amounts corresponding to the target decision sub-paths, generates a target routing decision, and sends it to the sending user node;
[0010] The sending user node forwards the forwarding transaction amounts corresponding to the target decision sub-paths to the receiving user node according to each target decision sub-path in the target routing decision;
[0011] The receiving user node generates a transaction result based on each of the forwarding transaction amounts and the amount to be transacted.
[0012] Optionally, the preset optimization algorithms include a deep reinforcement learning algorithm and a maximum flow algorithm; based on the preset optimization algorithms, the routing service providing cluster uses a preset objective function to determine multiple target decision sub-paths and the forwarding transaction amounts corresponding to the target decision sub-paths according to the transaction service request, the network topology of the payment channel network, and the observable channel deposits, including:
[0013] The routing service providing cluster generates a candidate path set according to the network topology of the payment channel network and the transaction service request;
[0014] The routing service providing cluster uses the candidate path set, the transaction service request, and the observable channel deposits of the payment channel network to solve the preset objective function based on the deep reinforcement learning algorithm, and determines multiple target decision sub-paths;
[0015] The routing service providing cluster calculates the forwarding transaction amounts corresponding to the target decision sub-paths according to each target decision sub-path by using the maximum flow algorithm.
[0016] Optionally, the receiving user node generates a transaction result based on each of the forwarding transaction amounts and the amount to be transacted, including:
[0017] The receiving user node sums up each of the forwarding transaction amounts to determine the sum value of the forwarding transaction amounts;
[0018] The receiving user node compares the sum value of the forwarding transaction amounts with the amount to be transacted. If the sum of the forwarding transaction amounts is equal to the amount to be transacted, the transaction result is determined to be a successful transaction. If the sum of the forwarding transaction amounts is not equal to the amount to be transacted, the transaction result is determined to be a failed transaction.
[0019] Optionally, the preset objective function is specifically:
[0020] ;
[0021] Wherein, is the reward for time period t is the discount factor of ; is the transaction service request; is the candidate sub-path in the candidate path set; is the observable channel deposit in the direction from node i to node j in the payment channel network; is the channel in the direction from node i to node j in the payment channel network; is the transaction set; E is the set of all channels in the payment channel network; is the state of the payment channel network in time period t, including the network topology of the payment channel network, the transaction service request, and the observable channel deposit of the payment channel network; is the target decision sub-path for time period t.
[0022] A transaction processing method for a payment channel network provided in the second aspect of the present invention is applied to a sending user node in the payment channel network. The method includes:
[0023] Obtain the amount to be transacted, the address information of the receiving user node in the payment channel network, and the address information of the sending user node, and pack them to generate a transaction service request and send it to the routing service providing cluster in the payment channel network;
[0024] When receiving the target routing decision sent by the routing service providing cluster, forward the forwarding transaction amount corresponding to each target decision sub-path to the receiving user node according to each target decision sub-path in the target routing decision.
[0025] A transaction processing method for a payment channel network provided in the third aspect of the present invention is applied to a routing service providing cluster in the payment channel network. The method includes:
[0026] When receiving the transaction service request sent by the sending user node in the payment channel network, based on a preset optimization algorithm, use a preset objective function to determine multiple target decision sub-paths and the forwarding transaction amount corresponding to each target decision sub-path according to the transaction service request, the network topology of the payment channel network, and the observable channel deposit;
[0027] Pack each target decision sub-path and the forwarding transaction amount corresponding to each target decision sub-path to generate a target routing decision and send it to the sending user node.
[0028] A transaction processing system for a payment channel network provided in the fourth aspect of the present invention. The payment channel network includes a sending user node, a receiving user node, and a routing service providing cluster. The system includes:
[0029] A response module, configured to respond to a transaction instruction. The sending user node obtains the address information of the receiving user node, the address information of the sending user node, and the amount to be transacted, and packs them to generate a transaction service request and send it to the routing service providing cluster;
[0030] A path determination module, configured to enable the routing service providing cluster to determine, based on a preset optimization algorithm and using a preset objective function, multiple target decision sub-paths and the corresponding forwarded transaction amounts for each of the target decision sub-paths according to the transaction service request, the network topology of the payment channel network, and the observable channel deposit;
[0031] A packing module, configured to enable the routing service providing cluster to pack each of the target decision sub-paths and the corresponding forwarded transaction amounts for each of the target decision sub-paths to generate a target routing decision and send it to the sending user node;
[0032] A forwarding module, configured to enable the sending user node to forward the corresponding forwarded transaction amounts for each of the target decision sub-paths to the receiving user node according to each of the target decision sub-paths in the target routing decision;
[0033] A transaction module, configured to enable the receiving user node to generate a transaction result according to each of the forwarded transaction amounts and the amount to be transacted.
[0034] A computer device provided in the fifth aspect of the present invention includes a memory and a processor. A computer program is stored in the memory. When the computer program is executed by the processor, the processor is enabled to execute the steps of the transaction processing method of the payment channel network as described in any one of the above.
[0035] A computer-readable storage medium provided in the sixth aspect of the present invention has a computer program stored thereon. When the computer program is executed, the steps of the transaction processing method of the payment channel network as described in any one of the above are implemented.
[0036] A computer program product provided in the seventh aspect of the present invention includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer is enabled to execute the steps of the transaction processing method of the payment channel network as described in any one of the above.
[0037] It can be seen from the above technical solutions that the present invention has the following advantages:
[0038] The above technical solution of the present invention provides a transaction processing method for a payment channel network. The payment channel network includes a sending user node, a receiving user node, and a routing service providing cluster. When the payment channel network needs to execute a transaction, the sending user node obtains the address information of the receiving user node, the address information of the sending user node, and the transaction amount to be processed, and packs them to generate a transaction service request and sends it to the routing service providing cluster. The routing service providing cluster, based on a preset optimization algorithm and using a preset objective function, determines multiple target decision sub-paths and the corresponding forwarded transaction amounts for each target decision sub-path according to the transaction service request, the network topology of the payment channel network, and the observable channel deposits. The routing service providing cluster packs each target decision sub-path and the corresponding forwarded transaction amount for each target decision sub-path to generate a target routing decision and sends it to the sending user node. The sending user node forwards the forwarded transaction amount corresponding to each target decision sub-path to the receiving user node according to each target decision sub-path in the target routing decision. The receiving user node generates a transaction result based on each forwarded transaction amount and the transaction amount to be processed. Based on the above solution, by generating multiple target decision sub-paths and the corresponding forwarded transaction amounts for each target decision sub-path through the routing service providing cluster, the sending user node forwards the forwarded transaction amount corresponding to each target decision sub-path to the receiving user node according to each target decision sub-path, and the receiving user node generates a transaction result according to each forwarded transaction amount and the transaction amount to be processed. The present invention adopts multi-path routing to reduce the impact of each transaction on the network load during the routing process, thereby achieving high throughput. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0040] Figure 1 It is a flowchart of the steps of a transaction processing method for a payment channel network provided in Embodiment 1 of the present invention;
[0041] Figure 2 It is a schematic framework diagram of an incentive routing model for a payment channel network provided in Embodiment 1 of the present invention;
[0042] Figure 3 It is a schematic diagram of the MDRL-IR (Memory-based Deep Reinforcement Learning for Intelligent Routing) routing framework provided in Embodiment 1 of the present invention;
[0043] Figure 4 Schematic diagram of the memory-based Actor-Critic network structure according to the first embodiment of the present invention;
[0044] Figure 5 Schematic diagram of the algorithm training of the memory-based Actor-Critic network according to the first embodiment of the present invention;
[0045] Figure 6 Flowchart of the steps of a transaction processing method for a payment channel network of a sending user node applied in a payment channel network according to the second embodiment of the present invention;
[0046] Figure 7 Flowchart of the steps of a transaction processing method for a payment channel network of a routing service providing cluster applied in a payment channel network according to the third embodiment of the present invention;
[0047] Figure 8 Block diagram of the structure of a transaction processing system for a payment channel network according to the fourth embodiment of the present invention. Detailed implementation manners
[0048] The embodiments of the present invention provide a transaction processing method and system for a payment channel network, which are used to solve the technical problem that most of the existing transaction processing methods for payment channel networks execute transactions based on a single-path routing algorithm, resulting in a decrease in throughput.
[0049] In order to make the object, features, and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the embodiments described below are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0050] Term explanation:
[0051] Blockchain: A shared database, and the data or information stored therein has characteristics such as "non-falsifiable", "traceable throughout the process", "traceable", "open and transparent", and "collectively maintained".
[0052] Account: A ledger in the blockchain that stores relevant states, and a transaction is a record of performing account operations in the blockchain. Generally includes smart contract accounts and user accounts.
[0053] Smart Contract (SC): A program deployed on the blockchain that automates the processing of traditional contracts in the form of computer instructions, i.e., a piece of code that is triggered and executed when two parties conduct a blockchain transaction. It has a code part and a state part.
[0054] Payment Channel: An off-chain payment protocol between two users. Users lock a certain amount of funds by creating a smart contract on the blockchain and can then conduct multiple transactions within the channel without broadcasting each transaction to the blockchain every time. When the channel is closed, the final balance of the users within the channel is updated and settled on the blockchain.
[0055] Payment Channel Network (PCN): A network interconnected by multiple payment channels.
[0056] Routing: If user A and user B do not have a direct payment channel but can forward payments through user C, the transaction can be completed through intermediate nodes, and this mechanism is called routing.
[0057] Reinforcement Learning: A machine learning method in which the model learns the optimal policy by interacting with the environment. The basic components include an agent (the learning entity that executes actions), the environment (the external system in which the agent is located, which provides feedback on the agent's actions), the state (information describing the current situation of the environment), the action (the behavior that the agent can execute in the current state), the reward (the signal feedback from the environment to the agent, used to evaluate the quality of the action), and the policy (the rule that maps the state to the action by the agent, aiming to maximize the cumulative reward through the policy). The goal of reinforcement learning is to find a set of policies that maximize the total reward obtained by the agent in the long term.
[0058] Deep Learning: A machine learning technique that automatically extracts features from data using neural networks. Through the structure of multi-layer neural networks, deep learning can learn effective representations from complex high-dimensional data.
[0059] Deep Reinforcement Learning (DRL): Incorporates deep learning into reinforcement learning and uses deep neural networks to approximate the policy or value function in reinforcement learning, thereby solving problems that cannot be handled by traditional methods in complex and high-dimensional state spaces.
[0060] Please refer to Figure 1 , Figure 1 which is the flowchart of the steps of a transaction processing method for a payment channel network provided in Embodiment 1 of the present invention.
[0061] A transaction processing method for a payment channel network provided by the present invention. The payment channel network includes a sending user node, a receiving user node, and a routing service provider cluster. The method includes:
[0062] Step 101: In response to a transaction instruction, the sending user node obtains the address information of the receiving user node, the address information of the sending user node, and the amount to be transacted, and packs them to generate a transaction service request and sends it to the routing service provider cluster;
[0063] It should be noted that, please refer to Figure 2 , the active routing incentive model of the payment channel network divides all nodes in the network into user nodes (User) and routing nodes. The routing nodes can be regarded as routing service provider nodes (RoutingService Provider, RSP). In the incentive routing model, it generally includes four parts: sending a transaction request, routing decision-making, transaction routing, and transaction settlement. The routing service includes finding a routing path, forwarding a transaction, and paying routing fees for other intermediate nodes. In order to increase the profit of the routing nodes and the system throughput of the network, the present invention adopts multi-path routing. For a transaction from a sending node to a receiving node, the sending node can purchase a service from the RSPC. Among them, the user nodes include the sending user node and the receiving user node. A routing node is usually connected to many user nodes, and a user node can also be connected to multiple routing nodes. All the routing nodes form a routing service provider cluster (RoutingService Provider Cluster, RSPC). Here, it is assumed that the routing service provider cluster composed of all routing service provider nodes forms a win-win interest community, and the competition between routing service nodes is not considered temporarily. The routing algorithm can be deployed on the routing service provider cluster, and the user nodes purchase routing services from the RSPC. In this way, the user nodes can reduce the costs of network topology storage and routing calculation, and the routing nodes can obtain corresponding service fees.
[0064] Furthermore, the sending user node packs the address information (ID, Identifier) of the receiving user node, the address information of the sending user node, the amount to be transacted, etc., and sends it as a transaction service request to the RSPC (one of the RSPs connected to the sending user node). At the same time, the sending user node locks a service fee according to the charging standard of the RSPC.
[0065] Step 102: The routing service provider cluster, based on a preset optimization algorithm, uses a preset objective function to determine multiple target decision sub-paths and the corresponding forwarded transaction amounts for each target decision sub-path according to the transaction service request, the network topology of the payment channel network, and the observable channel deposit;
[0066] The preset optimization algorithms include the deep reinforcement learning algorithm and the maximum flow algorithm.
[0067] It should be noted that, please refer to Figure 3 , when the RSPC receives a routing service request (transaction service request), it makes a routing decision according to the stored network topology and other information as well as the routing algorithm. Then, the RSPC returns the routing decision to the sending user node, and the decision includes which paths the sending user node should use for routing and the forwarding amount for each sub-path; specifically, when processing a transaction, the present invention generates a candidate path set P according to the network topology G(V,E) of the payment channel network and the sender-receiver information (transaction service request) of the transaction tx through the path generation algorithm. Then, the DRL (Deep Reinforcement Learning) agent takes the information of the transaction tx (transaction service request), the candidate path set P, and the observable channel deposit B o as its observation o input and runs the corresponding DRL algorithm to output an action a, that is, make a choice of the routing path (output the target decision sub-path). Next, the maximum flow algorithm is used to calculate the amount to be forwarded for each sub-path, which together with the action a output by the DRL constitutes the routing decision. The maximum flow algorithm uses the small topology formed by the routing paths after the DRL action selection, greatly reducing the calculation overhead. When using the maximum flow algorithm, it may be necessary to detect the deposit information of a small number of channels because the maximum flow algorithm requires the deposit information of all channels in the small topology, and some of them may not be observed by the DRL agent.
[0068] It is worth mentioning that the calculation process of the maximum flow algorithm for calculating the forwarding transaction amount corresponding to each sub-path can refer to the step process of the prior art, and the present invention will not elaborate too much.
[0069] Further, step 102 may include the following sub-steps S21-S23:
[0070] Step S21, the routing service providing cluster generates a candidate path set according to the network topology of the payment channel network and the transaction service request;
[0071] It should be noted that based on the path generation algorithm, the present invention pre-finds all possible path combinations for transmitting the amount according to the network topology of the payment channel network and the amount to be traded, forming a candidate path set. The path generation algorithm can be regarded as a preprocessing of DRL. It only generates a candidate path set according to the network topology G(V,E) and the amount to be traded, without the need for channel deposit information B. The preprocessing of the path generation algorithm not only reduces the difficulty of DRL decision-making, but also increases the scalability of the MDRL-IR algorithm, because it converts a large and variable payment channel network topology G into a path set P of fixed size as the input of DRL, not only greatly reducing the input of the state space, but also not requiring any adjustment of the internal structure of DRL. The core of the framework is DRL, which needs to select a routing path based on the incomplete deposit information that can be obtained and its historical interaction with the PCN (Payment Channel Network) environment. At the same time, in order to achieve the goal of maximizing the long-term profit of RSPC, it must consider the cost of routing fees and try to avoid channel deposit imbalance.
[0072] Further, please refer to Table 1. The candidate path set generation algorithm takes the network topology G, the sending node s (i.e., the address information of the sending user node), the receiving node t (i.e., the geological information of the receiving user node), the upper limit k of the number of paths, the path length threshold l max and the channel coincidence times threshold m as inputs. First, initialize the path set P as an empty set. When the number of paths in the path set is less than k, search for whether there is a path from s to t. If not, end the exploration process and output the candidate path set P. If so, use the Dijkstra algorithm to find the shortest path p from s to t based on the current topology. At this time, if the length of p is not less than l max , then discard the path that exceeds the length threshold, otherwise traverse all the paths in the shortest path p and judge whether the channel coincidence times exceed the threshold m. If not, p is added to the path set P and the usage times of the channels are updated. Note that the channel coincidence times refer to the channel coincidence times of all the paths in the path set P, rather than the channel coincidence times in p.
[0073] Table 1 Candidate Path Set Generation Algorithm
[0074]
[0075] Step S22: The routing service providing cluster solves the preset objective function based on the deep reinforcement learning algorithm, using the candidate path set, the transaction service request, and the observable channel deposits of the payment channel network to determine multiple target decision sub-paths;
[0076] Note that the payment channel network is regarded as a directed graph structure G(V, E), where E is the set of all channels in the payment channel network, and V is the set of all nodes in the network. For nodes i ∈ V and j ∈ V, since the payment channel is bidirectional, if channel e ij ∈ E, then there must exist e ij ∈ E. At the same time, define the channel deposit corresponding to channel e ij as b ij ≥ 0, which represents the maximum available amount that node i can forward in the direction of i → j. Note that b ij is not necessarily equal to b ji . In the present invention, B represents the set of each channel deposit of the PCN. Then, define as the set of all transactions in the PCN system. For tx k ∈ , it contains information such as the address information of the receiving user node, the address information of the sending user node, and the amount to be traded.
[0077] Furthermore, one characteristic of routing in the PCN is the high dynamicity of channel deposits. After a transaction is successfully executed, the channel deposit will be updated. For example, in the model, assume that nodes i and j are directly connected. If node i forwards a transaction with an amount of s to node j, then the channel deposit b ij will become b ij - s, while the channel deposit b ji will become b ji + s. Another characteristic of routing in the PCN is that intermediate nodes will charge routing fees. The present invention defines the routing fee function k of transaction tx ij and channel e as:
[0078] ;
[0079] where, is the basic fee of the routing fee; is the routing charge rate; is the amount of transaction ; is the basic fee of the routing fee of channel ; is the routing charge rate of channel .
[0080] Furthermore, and are related to channel because different nodes or even different channels of the same node may have different routing charge standards. Similar to the routing fee function, the present invention defines the fee function of the routing service is:
[0081] ;
[0082] wherein, and are the basic fee and the service charging rate of the RSPC routing service respectively; since the routing service not only includes finding a routing path, but also includes paying the routing fee to other intermediate nodes on behalf of the sending node, there are and , to ensure that the routing node obtains a positive profit.
[0083] In the system model of the present invention, when the user node purchases the routing service from the RSPC and the transaction is successfully executed under the routing decision of the RSPC, the RSPC will obtain the service profit, that is minus the total routing fee. The corresponding total routing fee for forwarding the transaction is: is:
[0084] ;
[0085] wherein, is the path set for forwarding the transaction ; is the channel set on the path p that needs to charge the routing fee; is the amount of the transaction forwarded on the path p; is the routing fee for forwarding the transaction on the channel of the path p. In each path used for routing, the sum of the sub-amounts is equal to the original amount of the transaction before splitting, so the present invention has .
[0086] It should be noted that the total transaction amount here is constant because it does not include the routing fee to be paid to the intermediate node. The routing fee is included in the service fee locked when the user node sends a transaction request, and the net profit of the RSPC for processing the transaction comes from the service fee minus the sum of the routing fees it pays, that is .
[0087] The present invention sets the optimization goal as maximizing the net profit of the RSPC routing service:
[0088] ;
[0089] wherein, the first half in the brackets is the RSPC successfully processing the transaction The service fee obtained , the second half is the cost of the total routing fee that RSPC pays for forwarding transactions . .
[0090] Furthermore, at time period t, assume the environment is in state s t ∈S, and RSPC is the agent interacting with the environment. The agent can receive an observation o t ∈Ω. Then, based on the observation o t and its policy, the agent executes an action a t ∈A, which will bring about a transfer of the environmental state, from state s t to state s t+1 with a probability of P(s t+1 |s t ,a). Meanwhile, the agent will receive an observation o (o t+1 |s t ,a) with a probability of t+1 , and obtain a reward R(s t ,a t ) equal to. The optimization objective of the present invention is to maximize the long-term profit of RSPC. For this purpose, the reward function is set to the total profit of RSPC in each time period, expressed as:
[0091] ;
[0092] wherein, is a function of state s t , representing the set of transaction requests generated within time period t.
[0093] Based on the above, the agent needs to select an action that maximizes the future discounted reward in each time period. The present invention uses to represent the discount factor of the reward in time period t. Therefore, the preset objective function can be expressed as:
[0094] ;
[0095] wherein, is the discount factor of the reward in time period t, determines how much discount is given to rewards at a relatively long distance; is the transaction service request; is the candidate sub-path in the candidate path set; is the observable channel deposit in the direction from node i to node j in the payment channel network; is the channel in the direction from node i to node j in the payment channel network is a transaction set; is the state of the payment channel network in the future time period t, including the network topology of the payment channel network, transaction service requests, and observable channel deposits of the payment channel network; is the target decision sub-path in the future time period t; E is to find the expected value; is a transaction is the set of candidate paths on.
[0096] It is worth mentioning that, please refer to Figure 4 , the MDRL-IR routing framework proposed by the present invention uses a memory-based Actor-Critic network architecture. As Figure 4 shown, this architecture includes two networks, Actor and Critic. Among them, the Actor network represents the mapping from observation information to action selection probability and plays a decision-making role. The Critic network is used to fit the state-action value function and plays an evaluation role. MDRL-IR simultaneously introduces the recurrent neural network component LSTM into the Actor and Critic networks to more effectively process and utilize sequence historical information. The Actor network contains , , three components, and the Critic network contains , , three components. Among them, and are responsible for the extraction of current features, and are responsible for the role of memory extraction, and are responsible for perception integration.
[0097] Furthermore, please refer to Figure 5 , which shows the training process of the MDRL-IR algorithm using the actor-critic architecture. The Actor is responsible for interacting with the payment channel network environment and learning a better policy with policy gradients under the guidance of the Critic value function. The Critic learns the value function through the data of the interaction between the Actor and the payment channel network, and then better judges the value of the actions output by the Actor to help the Actor update the policy.
[0098] Specifically, please refer to Table 2. During the training process of MDRL-IR, first use random parameters , to initialize the Critic network , , and use random parameters to initialize the Actor network , then initialize the target networks of each network , , , and finally initialize the replay experience pool D. At time t, the Actor network selects an action a t , which consists of two parts: the action obtained by the policy of the Actor network according to the observation o t at the current time and the historical data , where l is the length of the historical data; the random noise is sampled from a normal distribution with a mean of 0 and a standard deviation of . After executing the action, the agent obtains a reward r t , a new observation o t+1 and the history , and constructs a tuple (o t , a t , r t , o t+1 , d t , ) and stores it in the experience pool D. Among them, d t is a termination flag, which is a boolean value used to indicate whether the current time is the termination state of the current episode. Then, sample a batch of N experiences from the experience pool D, and calculate the Q-value function by two Critic target networks to obtain y, where clip is a truncation function. y is used to update the parameters of the two Critic networks. Then, every d time steps, apply the chain rule to the expected reward function J to update the parameters of the Actor network. Finally, use the exponential smoothing method to update the parameters of the target network, where is the soft update factor.
[0099] Table 2 MDRL-IR training algorithm for actor-critic architecture
[0100]
[0101] Step S23: The routing service providing cluster uses the maximum flow algorithm to calculate the forwarding transaction amount corresponding to each target decision sub-path according to each target decision sub-path.
[0102] It should be noted that calculating the amount forwarded by each target decision sub-path using the maximum flow algorithm, together with the target decision sub-path a output by DRL, constitutes an optimal routing decision (target routing decision).
[0103] Step 103: The routing service providing cluster packs each target decision sub-path and the corresponding forwarding transaction amount of each target decision sub-path, generates a target routing decision, and sends it to the sending user node.
[0104] It should be noted that the routing service provider cluster packages each target decision sub-path and the corresponding forwarding transaction amount of each target decision sub-path to generate a target routing decision. When the sending user node receives the target routing decision, the sending user node forwards the transaction according to the target routing decision sent by the RSPC. In this process, it pays routing fees to the intermediate routing nodes and records the total routing fees paid to the intermediate routing nodes.
[0105] Step 104: The sending user node forwards the corresponding forwarding transaction amount of each target decision sub-path to the receiving user node according to each target decision sub-path in the target routing decision.
[0106] It should be noted that the sending user node forwards the corresponding forwarding transaction amount of each target decision sub-path to the receiving user node according to each target decision sub-path in the target routing decision. For example, the number of target decision sub-paths is 3, the forwarding amount corresponding to the first target decision sub-path is 50, the forwarding amount corresponding to the second target decision sub-path is 10, and the forwarding amount corresponding to the third target decision sub-path is 60. The sending user node forwards the corresponding forwarding amounts of these three sub-paths to the receiving user node.
[0107] Step 105: The receiving user node generates a transaction result based on each forwarding transaction amount and the amount to be transacted.
[0108] Specifically, Step 105 may include the following sub-steps S51 - S52:
[0109] Step S51: The receiving user node sums up each forwarding transaction amount to determine the sum value of the forwarding transaction amounts;
[0110] Step S52: The receiving user node compares the sum value of the forwarding transaction amounts with the amount to be transacted. If the sum of the forwarding transaction amounts is equal to the amount to be transacted, the transaction result is determined to be a successful transaction. If the sum of the forwarding transaction amounts is not equal to the amount to be transacted, the transaction result is determined to be a failed transaction.
[0111] It should be noted that if the transaction is successfully processed, the RSPC will obtain service profits, that is, the initially locked service fees minus the routing fees paid. The intermediate routing nodes will obtain the routing fees. Otherwise, the RSPC will not obtain service profits, and the routing fees obtained by other intermediate nodes will also be refunded to the sending node.
[0112] Furthermore, the target routing decision may include multiple paths because the present invention adopts multi-path routing. Only when the sum of the sub-path transaction amounts received by the receiving node is equal to the total amount that should be received within a specified time, the transaction is considered to be successfully processed, that is, if the sum of the forwarded transaction amounts is equal to the amount to be transacted, the transaction result is determined to be a successful transaction; if the sum of the forwarded transaction amounts is not equal to the amount to be transacted, the transaction result is determined to be a failed transaction.
[0113] As a comparison of technical effects, reference can be made in combination with the prior art. The instant capacity and node status of off-chain channels are not uploaded to the chain in real time. Especially, the longer the channel survival time is, the less reliable the channel deposit status information originally from the blockchain chain is. The early solutions could not accurately obtain the latest channel capacity information, which is very likely to cause transaction failures due to insufficient channel capacity or node offline during the transaction process. This algorithm that does not detect channel deposits during routing is also called static routing. In order to reduce the transaction failure rate, the onion routing technology is introduced to explore paths by sending onion packets to obtain the instant channel deposit status information, while minimizing the exposure of sensitive information to enhance privacy protection. Corresponding to the routing algorithm that only relies on on-chain status information, this routing algorithm based on channel deposit detection is also called dynamic routing. As the network scale grows, the maintenance of global state becomes extremely demanding for storage space and network bandwidth, and it is difficult for ordinary nodes to meet. Global beacon routing strategies such as Landmark randomly select a few nodes as global beacons, supplemented by other nodes to restore the destination node path based on beacon path information, trying to relieve the pressure of maintaining global network topology information. The Flare algorithm combines local beacon and global beacon mechanisms, allowing ordinary nodes to only maintain the local network state related to themselves, significantly reducing the requirements for node performance. However, the limitation of the single-path routing algorithm is that it may fail when processing large-value transactions due to the lack of high-capacity channels, or it may lead to centralization of routing selection, channel congestion, and channel imbalance due to preference for high-capacity channels, which reduces the liquidity of the payment channel network.
[0114] In the field of payment channel networks, in response to problems such as high transaction success rates, overly concentrated routing selections, and frequent channel blockages faced by single-path routing, researchers have gradually incorporated advanced algorithmic ideas such as Landmark positioning, network traffic control, and packet forwarding to reconstruct the off-chain transaction processing model. These studies utilize the divisible nature of off-chain transactions to split large transactions into multiple smaller transactions, developing single-path routing into multi-path routing to reduce the impact of each transaction on network load during the routing process. This multi-path routing method effectively enhances the scalability and liquidity of the payment channel network, greatly improving the success rate and throughput of transaction processing. For example, the Spider algorithm uses a packet forwarding mechanism that subdivides large transactions into multiple small units and distributes them through parallel paths to address insufficient channel capacity. Additionally, when the capacity of a certain path is temporarily insufficient to handle more transactions, the transaction unit will be placed in a waiting queue and processed immediately once the channel capacity is restored, reducing the likelihood of transaction failures. Spider further reasonably allocates transaction units on different paths by dynamically adjusting the size of the sending window to promote the balance of fund flows in the network. To better balance the channels, Spider also adjusts the routing fees according to the congestion status of the channels, using fee incentives to attract funds to flow in the direction that needs to be balanced, achieving the balance of the entire network load.
[0115] Based on the above, the existing multi-path routing algorithms have the following problems:
[0116] 1. Most start from the perspective of improving network availability and efficiency, often neglecting the design of the routing node incentive mechanism. This leads to insufficient enthusiasm for routing nodes to participate in routing. At the same time, existing algorithms rarely consider the cost-benefit of routing, that is, while ensuring transaction success, reducing the transaction fees required for each unit of asset transfer, which may not be economically attractive enough for payment channel network user nodes to actively participate.
[0117] 2. The issue of channel deposit balance in the routing algorithm has not been fully considered. When the algorithm tends to use a specific path for transactions, it is easy to cause channel deposit imbalance, which in turn leads to a long-term decline in throughput. The problem of centralized routing selection also further reduces the income of intermediate nodes on paths that are not frequently selected, thus affecting the healthy and stable development of the entire payment channel network.
[0118] 3. For off-chain payment channel network routing algorithms, they are highly dependent on payment channel deposits, and the situation of channel deposits is highly dynamic and uncertain. Moreover, the principle of privacy protection restricts the public access to deposit information. To ensure the success rate of transactions, traditional routing algorithms need to conduct a large number of channel deposit detections before routing decisions, which not only increases the upfront costs of transactions but also limits the algorithm efficiency and increases the overall system overhead.
[0119] In view of the above problems, the present invention proposes a transaction processing method for a payment channel network, taking into account the low-cost experience of off-chain user nodes and the routing revenue incentives of intermediate nodes, and combining the characteristics of the payment channel network to achieve a more efficient, fair and economical off-chain transaction environment. Specifically, the present invention transforms the passive income model of PCN intermediate nodes into an active model and proposes a routing optimization goal that integrates the interests of all participants. At the same time, deep reinforcement learning is introduced to better consider channel deposit balance and optimize long-term incentives, and a PCN routing algorithm framework using DRL is designed. In addition, channel deposit features are extracted from historical interactions, and efficient routing decisions are made based on incomplete channel deposit information, greatly reducing the difficulty of applying the DRL algorithm to PCN routing, improving the applicability and scalability of DRL in PCN routing, and ensuring high throughput while protecting privacy and reducing the overhead of PCN routing for channel deposit detection.
[0120] In an embodiment of the present invention, a transaction processing method for a payment channel network is provided. The payment channel network includes a sending user node, a receiving user node, and a routing service providing cluster. When the payment channel network needs to execute a transaction, the sending user node obtains the address information of the receiving user node, the address information of the sending user node, and the transaction amount to be processed and packs them to generate a transaction service request, which is sent to the routing service providing cluster; the routing service providing cluster, based on a preset optimization algorithm and using a preset objective function, determines multiple target decision sub-paths and the corresponding forwarded transaction amounts for each target decision sub-path according to the transaction service request, the network topology of the payment channel network, and the observable channel deposits; the routing service providing cluster packs each target decision sub-path and the corresponding forwarded transaction amount for each target decision sub-path to generate a target routing decision and sends it to the sending user node; the sending user node forwards the corresponding forwarded transaction amount for each target decision sub-path to the receiving user node according to each target decision sub-path in the target routing decision; the receiving user node generates a transaction result based on each forwarded transaction amount and the transaction amount to be processed; based on the above solution, by the process that the routing service providing cluster generates multiple target decision sub-paths and the corresponding forwarded transaction amounts for each target decision sub-path, the sending user node forwards the corresponding forwarded transaction amount for each target decision sub-path to the receiving user node according to each target decision sub-path, and the receiving user node generates a transaction result, the present invention adopts multi-path routing to reduce the impact of each transaction on the network load during the routing process, thereby achieving high throughput.
[0121] Please refer to Figure 6 , Figure 6 which is a flowchart of the steps of a transaction processing method for a payment channel network applied to a sending user node in a payment channel network provided in the second embodiment of the present invention.
[0122] A transaction processing method for a payment channel network provided by the present invention is applied to a sending user node in the payment channel network, and includes:
[0123] Step 601: Obtain the amount to be transacted, the address information of the receiving user node in the payment channel network, and the address information of the sending user node, and perform packaging to generate a transaction service request and send it to the routing service providing cluster in the payment channel network;
[0124] Step 602: When receiving the target routing decision sent by the routing service providing cluster, forward the forwarding transaction amount corresponding to each target decision sub-path to the receiving user node according to each target decision sub-path in the target routing decision.
[0125] In the embodiment of the present invention, the sending user node obtains the amount to be transacted, the address information of the receiving user node in the payment channel network, and the address information of the sending user node, and performs packaging to generate a transaction service request and send it to the routing service providing cluster in the payment channel network; when receiving the target routing decision sent by the routing service providing cluster, forward the forwarding transaction amount corresponding to each target decision sub-path to the receiving user node according to each target decision sub-path in the target routing decision. The present invention adopts multi-path routing to reduce the impact of each transaction on the network load during the routing process, thereby achieving high throughput.
[0126] Please refer to Figure 7 , Figure 7 which is the step flowchart of a transaction processing method for a payment channel network applied to a routing service providing cluster in the payment channel network provided in Embodiment III of the present invention.
[0127] A transaction processing method for a payment channel network provided by the present invention is applied to a routing service providing cluster in the payment channel network, and includes:
[0128] Step 701: When receiving the transaction service request sent by the sending user node in the payment channel network, based on a preset optimization algorithm, use a preset objective function to determine multiple target decision sub-paths and the forwarding transaction amount corresponding to each target decision sub-path according to the transaction service request, the network topology of the payment channel network, and the observable channel deposit;
[0129] Step 702: Package each target decision sub-path and the forwarding transaction amount corresponding to each target decision sub-path to generate a target routing decision and send it to the sending user node.
[0130] In an embodiment of the present invention, when the routing service providing cluster receives a transaction service request sent by a sending user node in the payment channel network, based on a preset optimization algorithm, using a preset objective function, according to the transaction service request, the network topology of the payment channel network, and the observable channel deposit, multiple target decision sub-paths and the forwarding transaction amount corresponding to each target decision sub-path are determined; each target decision sub-path and the forwarding transaction amount corresponding to each target decision sub-path are packaged to generate a target routing decision and sent to the sending user node. The present invention adopts multi-path routing to reduce the impact of each transaction on the network load during the routing process, thereby achieving high throughput.
[0131] Please refer to Figure 8 , Figure 8 which is a structural block diagram of a transaction processing system for a payment channel network provided in Embodiment 4 of the present invention.
[0132] A transaction processing system for a payment channel network provided by the present invention, the payment channel network includes a sending user node, a receiving user node, and a routing service providing cluster, and the system includes:
[0133] A response module 801, configured to respond to a transaction instruction, the sending user node obtains the address information of the receiving user node, the address information of the sending user node, and the amount to be transacted and packages them to generate a transaction service request and send it to the routing service providing cluster;
[0134] A path determination module 802, configured to the routing service providing cluster, based on a preset optimization algorithm, using a preset objective function, according to the transaction service request, the network topology of the payment channel network, and the observable channel deposit, determines multiple target decision sub-paths and the forwarding transaction amount corresponding to each target decision sub-path;
[0135] A packaging module 803, configured to the routing service providing cluster packages each target decision sub-path and the forwarding transaction amount corresponding to each target decision sub-path to generate a target routing decision and send it to the sending user node;
[0136] A forwarding module 804, configured to the sending user node forwards the forwarding transaction amount corresponding to each target decision sub-path to the receiving user node according to each target decision sub-path in the target routing decision;
[0137] A transaction module 805, configured to the receiving user node generates a transaction result according to each forwarding transaction amount and the amount to be transacted.
[0138] Further, the preset optimization algorithm includes a deep reinforcement learning algorithm and a maximum flow algorithm; the path determination module 802 is specifically configured to:
[0139] The routing service providing cluster generates a candidate path set according to the network topology of the payment channel network and the transaction service request;
[0140] The routing service providing cluster solves a preset objective function by using a candidate path set, a transaction service request, and observable channel deposits of a payment channel network based on a deep reinforcement learning algorithm, and determines multiple target decision sub-paths;
[0141] The routing service providing cluster uses the maximum flow algorithm to calculate the forwarding transaction amount corresponding to each target decision sub-path according to each target decision sub-path.
[0142] Further, the transaction module 805 is specifically configured to:
[0143] Receive the user node to sum up each forwarding transaction amount to determine the sum value of the forwarding transaction amount;
[0144] Receive the user node to compare the sum value of the forwarding transaction amount with the amount to be traded. If the sum of the forwarding transaction amounts is equal to the amount to be traded, the transaction result is determined to be a successful transaction. If the sum of the forwarding transaction amounts is not equal to the amount to be traded, the transaction result is determined to be a failed transaction.
[0145] Further, the preset objective function is specifically:
[0146] ;
[0147] Wherein, is the reward at time period t is the discount factor of ; is the transaction service request; is the candidate sub-path in the candidate path set; is the observable channel deposit in the direction from node i to node j in the payment channel network; is the channel in the direction from node i to node j in the payment channel network; is the transaction set; E is the set of all channels in the payment channel network; is the state of the payment channel network at time period t, including the network topology of the payment channel network, the transaction service request, and the observable channel deposits of the payment channel network; is the target decision sub-path at time period t.
[0148] Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems and modules described above can refer to the corresponding processes in the foregoing method embodiments, and will not be elaborated herein.
[0149] An embodiment of the present invention further provides a computer device, including a memory and a processor, where a computer program is stored in the memory; when the computer program is executed by the processor, the processor executes the steps of the transaction processing method of the payment channel network in any of the above embodiments.
[0150] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program / instruction is stored, and when the computer program / instruction is executed by the processor, the steps of the transaction processing method of the payment channel network in any of the above embodiments are implemented.
[0151] An embodiment of the present invention further provides a computer program product, including a computer program / instruction, and when the computer program / instruction is executed by the processor, the steps of the transaction processing method of the payment channel network in any of the above embodiments are implemented.
[0152] In several embodiments provided by the present application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces, and the indirect coupling or communication connection of devices or units can be in an electrical, mechanical or other form.
[0153] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0154] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A transaction processing method for a payment channel network, characterized in that: The payment channel network includes a sending user node, a receiving user node and a routing service providing cluster, and the method includes: In response to the transaction instruction, the sending user node obtains the address information of the receiving user node, the address information of the sending user node, and the amount to be traded and packages them, generates a transaction service request and sends it to the routing service providing cluster; The routing service providing cluster determines a plurality of target decision sub-paths and the forwarding transaction amount corresponding to each of the target decision sub-paths based on a preset optimization algorithm and a preset objective function according to the transaction service request, the network topology of the payment channel network, and the observable channel deposit; The routing service providing cluster packages each of the target decision sub-paths and the forwarding transaction amount corresponding to each of the target decision sub-paths, generates a target routing decision and sends it to the sending user node; The sending user node forwards the forwarding transaction amount corresponding to each target decision sub-path in the target routing decision to the receiving user node; The receiving user node generates a transaction result according to each of the forwarded transaction amounts and the pending transaction amount.
2. The transaction processing method of the payment channel network according to claim 1, characterized in that: The preset optimization algorithm includes a deep reinforcement learning algorithm and a maximum flow algorithm; the routing service providing cluster determines multiple target decision sub-paths and the forwarding transaction amount corresponding to each target decision sub-path based on the preset optimization algorithm and a preset objective function according to the transaction service request, the network topology of the payment channel network, and the observable channel deposit, including: The routing service providing cluster generates a candidate path set according to the network topology of the payment channel network and the transaction service request; The routing service providing cluster solves the preset objective function based on a deep reinforcement learning algorithm using the candidate path set, the transaction service request, and the observable channel deposit of the payment channel network to determine a plurality of target decision sub-paths; The routing service providing cluster uses a maximum flow algorithm to calculate the forwarding transaction amount corresponding to each target decision sub-path according to each target decision sub-path.
3. The transaction processing method of the payment channel network according to claim 1, characterized in that: The receiving user node generates a transaction result according to each of the forwarded transaction amounts and the pending transaction amount, including: The receiving user node sums up the forwarding transaction amounts to determine the forwarding transaction amount and value; The receiving user node compares the forwarded transaction amount and value with the pending transaction amount. If the sum of the forwarded transaction amounts is equal to the pending transaction amount, the transaction result is determined to be a successful transaction. If the sum of the forwarded transaction amounts is not equal to the pending transaction amount, the transaction result is determined to be a failed transaction.
4. The transaction processing method of the payment channel network according to claim 1, characterized in that: The preset objective function is specifically: ; in, is the reward for time period t The discount factor, ; To service transaction requests; is a candidate subpath in the candidate path set; It is the observable channel deposit from node i to node j in the payment channel network; It is the channel from node i to node j in the payment channel network; is the transaction set; E is the set of all channels in the payment channel network; is the state of the payment channel network in time period t, including the network topology of the payment channel network, transaction service requests, and observable channel deposits of the payment channel network; is the target decision subpath for time period t.
5. A transaction processing method for a payment channel network, characterized in that: Applied to a sending user node in a payment channel network, the method comprises: Obtaining the amount to be traded, the address information of the receiving user node in the payment channel network, and the address information of the sending user node, and packaging them, generating a transaction service request and sending it to the routing service provider cluster in the payment channel network; When the target routing decision sent by the routing service providing cluster is received, the forwarding transaction amount corresponding to each target decision sub-path in the target routing decision is forwarded to the receiving user node.
6. A transaction processing method for a payment channel network, characterized in that: A routing service provider cluster is applied to a payment channel network, and the method comprises: When receiving a transaction service request sent by a sending user node in the payment channel network, based on a preset optimization algorithm, a preset objective function is used to determine multiple target decision sub-paths and the forwarding transaction amount corresponding to each target decision sub-path according to the transaction service request, the network topology of the payment channel network, and the observable channel deposit; Each of the target decision sub-paths and the forwarding transaction amount corresponding to each of the target decision sub-paths are packaged, and a target routing decision is generated and sent to the sending user node.
7. A transaction processing system for a payment channel network, characterized in that: The payment channel network includes a sending user node, a receiving user node and a routing service provider cluster, and the system includes: A response module, used to respond to a transaction instruction, wherein the sending user node obtains the address information of the receiving user node, the address information of the sending user node, and the amount to be traded and packages them, generates a transaction service request and sends it to the routing service providing cluster; A path determination module is used for the routing service providing cluster to determine multiple target decision sub-paths and the forwarding transaction amount corresponding to each target decision sub-path based on a preset optimization algorithm and a preset objective function according to the transaction service request, the network topology of the payment channel network, and the observable channel deposit; A packaging module, used for the routing service providing cluster to package each of the target decision sub-paths and the forwarding transaction amount corresponding to each of the target decision sub-paths, generate a target routing decision and send it to the sending user node; A forwarding module, used for the sending user node to forward the forwarding transaction amount corresponding to each target decision sub-path in the target routing decision to the receiving user node; The transaction module is used for the receiving user node to generate a transaction result according to each of the forwarded transaction amounts and the amount to be traded.
8. A computer device, characterized in that: It comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the transaction processing method of the payment channel network as described in any one of claims 1 to 4.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed, the transaction processing method of the payment channel network as described in any one of claims 1 to 4 is implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program stored on a non-transitory computer-readable storage medium, wherein the computer program comprises program instructions, wherein when the program instructions are executed by a computer, the computer is caused to execute the transaction processing method for a payment channel network as described in any one of claims 1 to 4.