Route processing method, system, and non-transitory storage medium

By determining the escrow amount and selecting candidate nodes in the PCN network, a combination of network resource balance and privacy protection is achieved, solving the problem of privacy leakage risk in existing technologies and improving transaction processing efficiency and stability.

CN116389348BActive Publication Date: 2025-10-10PURPLE MOUNTAIN LAB
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310344129.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-31
Publication Date
2025-10-10
Estimated Expiration
2043-03-31

AI Technical Summary

Technical Problem

In the existing technology, there is a risk of privacy leakage when the blockchain network implements network balanced routing, and the privacy protection strategy is separated from the network balance strategy, resulting in the PCN network being unable to conduct stable transactions.

Method used

By determining the escrow amount between the source node and the destination node in the PCN network, selecting candidate nodes that know each other's escrow amount, and determining the next node based on the escrow amount, and selecting subsequent nodes in sequence until the destination node is reached, a routing path is implemented to avoid obtaining the escrow amount of non-directly connected nodes, combining network resource balancing and privacy protection.

Benefits of technology

It achieves the combination of network resource balance and privacy protection, reduces the risk of network privacy leakage, and improves transaction processing efficiency and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116389348B_ABST
    Figure CN116389348B_ABST
Patent Text Reader

Abstract

The application discloses a routing processing method and system and a nonvolatile storage medium. The method comprises the following steps: determining a source node for sending a transaction request and a destination node for responding to the transaction request, wherein the source node and the destination node are nodes in a PCN network, and any two connected nodes in a plurality of nodes included in the PCN network are respectively provided with a hosting amount corresponding to another connected node; determining at least one candidate node which is aware of the hosting amount of the source node; determining a next node of the source node based on the hosting amount of the source node and the hosting amounts corresponding to the at least one candidate node respectively; and determining subsequent nodes in sequence by using the method of determining the next node of the source node until the next node of a determined node is the destination node, so as to obtain a routing path from the source node to the destination node. The application solves the technical problem that, in order to realize network balanced routing, a privacy leakage risk is caused in the related art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of Internet of Things, and in particular to a routing processing method, system and non-volatile storage medium. Background Art

[0002] Currently, blockchain is being used in financial services, the Internet of Things, supply chain management, and other fields. However, the strict consensus process required for each transaction limits its application in latency-sensitive services. Related technologies utilize paid channel networks (PCNs) to enable high-frequency, real-time transactions between mutually untrusted entities, independent of the blockchain backbone. Due to the privacy requirements and the risk of node resource exhaustion in PCNs, these technologies separate privacy protection strategies from network balancing strategies. This results in significant imbalance in the PCN network when protecting privacy, making stable transactions impossible. However, these technologies require network-wide information to achieve network balancing, creating the risk of privacy leaks.

[0003] To address the above-mentioned problems, no effective solutions have been proposed so far. Summary of the Invention

[0004] The embodiments of the present invention provide a routing processing method, system, and non-volatile storage medium to at least solve the technical problem that related technologies, in order to achieve network balanced routing, create a risk of privacy leakage.

[0005] According to one aspect of an embodiment of the present invention, a routing processing method is provided, comprising: determining a source node that issues a transaction request, and a destination node to respond to the transaction request, wherein the source node and the destination node are nodes in a PCN network, and any two connected nodes among a plurality of nodes included in the PCN network are respectively set with an escrow amount corresponding to another connected node, for the any two connected nodes to perform transaction processing in the PCN network; determining at least one candidate node whose escrow amount is mutually known to the source node; determining the next node of the source node based on the escrow amount of the source node and the escrow amount corresponding to each of the at least one candidate node; and determining subsequent nodes in sequence using the method for determining the next node of the source node until the next node of the determined node is the destination node, thereby obtaining a routing path from the source node to the destination node.

[0006] According to another aspect of an embodiment of the present invention, a routing processing system is provided, comprising: an application layer for obtaining a transaction request; a PCN network layer connected to the application layer, for determining a source node that issues a transaction request, and a destination node to be responded to the transaction request, wherein the source node and the destination node are nodes in a PCN network, and any two connected nodes among a plurality of nodes included in the PCN network are respectively set with an escrow amount corresponding to another connected node, so that the any two connected nodes perform transaction processing in the PCN network; determining at least one candidate node whose escrow amount is mutually known to the source node; determining the next node of the source node based on the escrow amount of the source node and the escrow amount corresponding to each of the at least one candidate node; and determining subsequent nodes in sequence by adopting a method for determining the next node of the source node until the next node of the determined node is the destination node, thereby obtaining a routing path from the source node to the destination node.

[0007] According to another aspect of an embodiment of the present invention, a non-volatile storage medium is provided, wherein the non-volatile storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executed by any one of the routing processing methods.

[0008] In an embodiment of the present invention, a source node issuing a transaction request and a destination node to respond to the transaction request are determined, wherein the source node and the destination node are nodes in a PCN network, and any two connected nodes among a plurality of nodes included in the PCN network respectively set an escrow amount corresponding to another connected node, so that the two connected nodes can execute transaction processing in the PCN network; at least one candidate node whose escrow amount is mutually known to the source node is determined; based on the escrow amount of the source node and the escrow amount corresponding to the at least one candidate node, the next node of the source node is determined; and using a method for determining the next node of the source node, subsequent nodes are sequentially determined until the next node of the determined node is the destination node, thereby obtaining a routing path from the source node to the destination node. The purpose of combining network resource balancing and privacy protection is achieved, achieving balanced network routing while reducing the risk of network privacy leakage, thereby resolving the technical problem that related technologies create privacy leakage risks in order to achieve balanced network routing. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0010] Figure 1is a flowchart of an optional routing processing method provided according to an embodiment of the present invention;

[0011] Figure 2 It is an optional PCN network model diagram;

[0012] Figure 3 It is an optional diagram of PCN transaction results;

[0013] Figure 4 is a flow chart of an optional routing processing method provided according to an embodiment of the present invention;

[0014] Figure 5 is a flow chart of selecting an optional routing processing method provided according to an embodiment of the present invention;

[0015] Figure 6 is a structural block diagram of a routing processing system provided according to an embodiment of the present invention;

[0016] Figure 7 FIG. 1 is a schematic diagram of a routing processing system provided according to an embodiment of the present invention. DETAILED DESCRIPTION

[0017] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0018] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0019] For ease of description, some nouns or terms involved in the embodiments of the present application are explained below:

[0020] Blockchain is a new type of distributed infrastructure and computing method. It uses smart contract programming composed of automatic scripts and operates data, uses Merkle tree data structure to verify and store data, uses distributed node consensus algorithm to generate and update data, and uses cryptography to ensure the security of data transmission and access. Due to the characteristics of transparent storage, tamper-proofing, and content security, blockchain has penetrated into the fields of financial services, Internet of Things, supply chain management, etc.

[0021] A payment channel network (PCN) can realize high-frequency and real-time transactions between mutually distrustful entities without relying on the main chain of the blockchain. The PCN is composed of multiple payment channels, each of which connects two users who have payment needs. Each user hosts a certain amount of money in the channel and continuously executes transactions off-chain. Only when the payment channel resources are exhausted will the transaction be written to the blockchain. Users who do not have a direct payment channel can forward transactions through intermediate nodes.

[0022] It should be noted that the PCN network has privacy protection needs and the risk of node resource exhaustion. First, the hosting amount between two nodes that are not directly connected through the PCN channel is invisible. Therefore, routing selection must be performed before transaction execution. If the transaction execution fails, a new path is selected to continue the above process. The separation of the above routing and transaction execution process leads to frequent transaction failures, which in turn affects transaction performance. In addition, transactions between users are forwarded through intermediate nodes, and the hosting amount input and output on both sides of the intermediate node are equal. The input on one side means the output on the other side. When the input and output sides of a node are completely unbalanced, the node will be unable to initiate any transaction in that direction and cannot act as an intermediate node for other transactions.

[0023] In view of the above problems, extensive research has been conducted in the industry. This includes privacy protection strategies and network balancing strategies. The privacy protection strategy ensures transaction privacy at the routing level or hardware level. The network balancing strategy realizes off-chain channel balancing and plans to transmit transactions along a path that increases channel balance. Related technologies usually consider node privacy or channel imbalance problems separately, but do not consider the combination of the two. For the network balancing strategy: full-path balancing increases network burden, and the network balancing strategy usually realizes network balancing at the entire routing level. Full-path balancing has large latency, which affects the normal transaction process. For the privacy protection strategy, the privacy protection cost is high: the privacy protection strategy is usually implemented by changing hardware or protocol, resulting in high privacy cost. In the case of separation of the privacy protection strategy and the network balancing strategy, protecting privacy causes serious imbalance of the PCN network, which cannot perform stable transactions. To achieve network balance, the entire network information is required, which causes the risk of privacy leakage.

[0024] To address the above-mentioned issues, an embodiment of the present invention provides a method embodiment for routing processing. It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0025] Figure 1 : is a flow chart of a routing processing method according to an embodiment of the present invention. Figure 1 As shown, the method includes the following steps:

[0026] Step S102: Determine the source node that issues the transaction request and the destination node to respond to the transaction request, wherein the source node and the destination node are nodes in the PCN network, and any two connected nodes among the multiple nodes included in the PCN network respectively set a custodial amount corresponding to the other connected node, so that the any two connected nodes can perform transaction processing in the PCN network.

[0027] It is understood that the PCN network comprises multiple nodes, some of which are interconnected. Any two connected nodes each set an escrow amount corresponding to the other connected node. Transactions within the PCN network are processed by transferring escrow amounts between these two connected nodes. The source node in the PCN network is the node that issues a transaction request, requiring the destination node to respond to the request.

[0028] Optionally, the PCN network is a PCN network, or a network with the following characteristics: each node in the PCN network is preset with one or more nodes with mutually known amounts, and each of the above nodes can realize transaction processing with the corresponding nodes with mutually known amounts. It should be noted that there are multiple channels in the PCN network that are directly or indirectly connected, and only the two nodes in the directly connected channels know each other's escrow amounts. In the case that there is no directly connected channel between the source node and the destination node, it is necessary to transfer through the intermediate nodes in the PCN network to realize the transaction request between the source node and the destination node. Since the PCN network has the problem of node escrow amount exhaustion, the intermediate nodes between the source node and the destination node are not optional, but need to be obtained through network balancing routing calculation.

[0029] To facilitate understanding, the PCN network model is described below with a specific example. For example, Grap = (V, L) is a PCN network, where V represents the node set and L represents the edge set. Figure 2 It is an optional PCN network model diagram. Figure 2 The leftmost node n p and the rightmost node no are two nodes with a paid channel, n p and n o There are multiple nodes between them, including: n p_adj , v m , v m+1 , n o_adj The connection between any two nodes is recorded as an edge, and the path P(n p ,n o ) is the edge l1, ..., l q The set of q represents P(n p ,n o ) edge. When q=1, it means n p and n o There are direct edges between them. m =(v m ,v m+1 ) means v m and v m+1 The direct edges between them, where 1≤m≤q-1. a(v m ,v m+1 ) means v m and v m+1 In addition, define P(n p ,n o )'s maximum tradable amount, you can get As shown in the following mathematical expression:

[0030]

[0031] Among them, min() represents the minimum function.

[0032] Figure 3 This is an optional diagram of PCN transaction results. At time t, there is a p To node n o Transaction request re_tran t (n p ,n o ,a), where a represents the transaction amount. It is considered that the PCN network supports the transaction amount a for transaction processing, from v m to v m+1 The tradable amount becomes a(v m ,v m+1 )-a, from v m+1 to v m The tradable amount becomes a(v m ,v m+1 )+a.

[0033] Based on the above Figure 2 and Figure 3 , we can understand the role of the escrow amount of each node in the PCN network. Since the way the amount is transferred determines that the transaction cannot be processed when the escrow amount in the node is exhausted, it is necessary to balance the node resources in the PCN network.

[0034] Step S104: determining at least one candidate node that has mutual knowledge of the escrow amount with the source node;

[0035] It can be understood that the above-mentioned source node and the above-mentioned at least one candidate node are mutually aware of the escrow amount.

[0036] It should be noted that, in the case of a PCN network, the source node and nodes with which it has a direct PCN channel know each other's escrow amounts. However, the source node and nodes without direct PCN channels do not know each other's escrow amounts. In order to achieve balanced routing across the entire network, the related art requires not only the known escrow amounts of nodes with direct PCN channels, but also the escrow amounts of all indirectly connected nodes. This is because the related art relies on network-wide escrow amount information to perform path calculation and thus determine the optimal path. It is precisely because the escrow amounts of indirectly connected nodes in the PCN network are required to perform path calculation that the related art needs to obtain network-wide information, creating a risk of privacy leakage. To ensure privacy, the related art encrypts the obtained node information, which increases algorithm complexity, increases interaction time, and reduces transaction processing efficiency. Therefore, the embodiments of the present invention avoid the risk of privacy leakage by not obtaining information about indirectly connected nodes, that is, avoiding the acquisition of unknown information.

[0037] Step S106: determining the next node of the source node based on the escrow amount of the source node and the escrow amount corresponding to the at least one candidate node;

[0038] It is understood that since the escrow amounts of the source node and at least one candidate node are known, the next node after the source node is selected from the at least one candidate node based on the escrow amount of the source node and the escrow amount corresponding to the at least one candidate node. The escrow amounts of other unknown nodes are not additionally obtained in the above process.

[0039] In an optional embodiment, the above-mentioned determination of the next node of the above-mentioned source node based on the custodial amount of the above-mentioned source node and the custodial amount corresponding to the above-mentioned at least one candidate node includes: determining the node quantity of the above-mentioned at least one candidate node; determining the node balance index corresponding to the above-mentioned at least one candidate node based on the custodial amount of the above-mentioned source node, the custodial amount corresponding to the above-mentioned at least one candidate node and the above-mentioned node quantity, wherein the node balance index corresponding to the above-mentioned at least one candidate node is used to indicate the balance status of the consumption of the custodial amount corresponding to the above-mentioned at least one candidate node; based on the node balance index corresponding to the above-mentioned at least one candidate node, selecting the next node of the above-mentioned source node from the above-mentioned at least one candidate node.

[0040] It can be understood that the number of nodes of at least one candidate node is determined, and based on the escrow amount of the source node, and the escrow amount and number of nodes corresponding to at least one candidate node, the node balance index corresponding to at least one candidate node is calculated. According to the node balance index corresponding to at least one candidate node, the next node of the source node is selected from at least one candidate node. The corresponding node balance index is used to indicate the balance of consumption of the escrow amount corresponding to at least one candidate node. The corresponding balance of consumption of the escrow amount can reflect the balance of node resources of at least one candidate node in the PCN network. It should be noted that the most balanced one of the at least one candidate node is selected to respond to the above-mentioned transaction request to prevent the exhaustion of the escrow amount in the node due to inappropriate scheduling.

[0041] Optionally, in the case where the PCN network is a PCN network, the source node and the at least one candidate node have a direct PCN channel, and the node balance index corresponding to the at least one candidate node is obtained in the following manner, for example: the source node is recorded as n i , the kth candidate node in at least one candidate node is recorded as n k , for the kth candidate node n k Corresponding node balance index k is the identifier of at least one candidate node, and the mathematical expression is as follows:

[0042]

[0043] Where μ represents the node n i Compared to the average value of the escrow amount of at least one candidate node, Δ represents the Gini mean difference. The Gini mean difference can be calculated by the following mathematical expression:

[0044]

[0045] Where N represents the source node n iThe number of direct connections with at least one candidate node, the kth candidate node n k and source node n i There are direct edges between them. a(n i ) is the escrow amount in the source node, a(n k ) is the escrow amount corresponding to the k-th candidate node.

[0046] According to the above two formulas, we can get The final mathematical expression is as follows:

[0047]

[0048] In an optional embodiment, the above-mentioned selection of the next node of the above-mentioned source node from the above-mentioned at least one candidate node based on the node balance index corresponding to the above-mentioned at least one candidate node includes: selecting the node with the smallest node balance index among the above-mentioned at least one candidate node as the next node of the above-mentioned source node.

[0049] It can be understood that the node with the largest decrease in node balance index is selected as the next hop node, that is, the node with the smallest node balance index among at least one candidate node is selected as the next hop node of the source node. It should be noted that since the source node issues a transaction request, the node selected during routing will pass the amount to the determined next node, which consumes the selected node's resources. Therefore, it is important to select the most balanced node, that is, the one with the lowest consumption, to minimize node exhaustion, thereby ensuring stable network operation and improving processing efficiency.

[0050] Optionally, multiple methods can be used to select the next node, such as a greedy algorithm. A greedy algorithm is an algorithm that performs local optimal selection and can select the node with the smallest balance index as the optimal solution. Based on the node balance index corresponding to the at least one candidate node, a preset greedy algorithm is used to select the next node of the source node from the at least one candidate node. Multiple greedy algorithms can be used, such as the Dijkstra shortest path algorithm and the minimum spanning tree algorithm, to select a strategy that disregards the global optimal solution and only determines the optimal solution for the current process.

[0051] It should be noted that in order to select the next hop for balancing node resources from at least one candidate node with mutually known escrow balances, and without network-wide information to support a global optimal solution, a local optimal solution is required to select the next node from at least one candidate node. Through this process, when only the node balance index corresponding to at least one candidate node is known, the balance of a node is evaluated and the local optimal solution for the next node is determined, thus ensuring node privacy while achieving local network balance.

[0052] Step S108 , using the method of determining the next node of the source node, sequentially determining subsequent nodes until the next node of the determined node is the destination node, thereby obtaining a routing path from the source node to the destination node.

[0053] It can be understood that the same method as the method for determining the next node of the above-mentioned source node can be used to determine the subsequent nodes in sequence. Compared with the related art that directly plans the entire path, the embodiment of the present invention adopts a method of selecting one node after another until the next node of the determined node is the destination node, and it is considered that the routing path from the source node to the destination node is successfully completed.

[0054] In an optional embodiment, the above method of determining the next node of the above source node is used to determine subsequent nodes in sequence, and the method also includes: in the case that the determined node does not have a next node, determining the previous node of the node that does not have a next node among the above subsequent nodes; returning to the above previous node; determining multiple first nodes that have mutual custody amounts with the above previous node, wherein the above multiple first nodes include the node that does not have a next node; eliminating the node that does not have a next node from the above multiple first nodes to obtain at least one node to be reselected; based on the node balance index of the above at least one node to be reselected, selecting the next node of the above previous node from the above at least one node to be reselected.

[0055] It is understandable that, in order to ensure privacy, no direct path is planned and nodes need to be selected one by one. Therefore, the next hop node determined may not be able to select a node that meets the requirements, that is, there is no next node. The absence of a next node will result in the inability to inherit the routing process. In order to continue to execute the transaction request, it is necessary to return to the previous node for reselection. Determine multiple first nodes that know the escrow amount with the previous node. The multiple first nodes include the above-mentioned node that does not have a next node. Since the above-mentioned node that does not have a next node has been tried and errored, the above-mentioned node that does not have a next node cannot be selected. Eliminate the above-mentioned node that does not have a next node from the multiple first nodes to obtain at least one node to be reselected. Based on the node balance index of at least one node to be reselected, select the next node of the above-mentioned previous node from at least one node to be reselected, so that routing processing can continue until the destination node is reached.

[0056] In an optional embodiment, the above method further includes: after determining the subsequent nodes in sequence by adopting the above method of determining the next node of the above source node, the above method further includes: when there is no next node for the determined node and the above determined node is the above source node, determining that the above transaction request has failed.

[0057] It can be understood that the method of determining the next node of the above-mentioned source node is adopted to determine the subsequent nodes in sequence. When there is no next node for the determined node, there may also be a situation where the determined node is the source node. When the determined node is the source node, it is equivalent to a loop selection of the route, that is, the end is connected, and it is determined that the transaction request has failed, and the transaction is terminated.

[0058] Optionally, in the event of a transaction request failure, it can be processed using blockchain, i.e., on-chain.

[0059] In an optional embodiment, after determining the source node that issues the transaction request and the destination node to respond to the transaction request, the method further includes: in the case where the PCN network is composed of a plurality of preset PCN sub-networks, determining the transaction amount of the transaction request and the maximum supported amounts corresponding to the plurality of PCN sub-networks respectively; determining a target PCN sub-network whose maximum supported amount is greater than or equal to the transaction amount among the plurality of PCN sub-networks; and based on the nodes included in the target PCN sub-network, determining subsequent nodes in sequence using a method for determining the next node of the source node, until the next node of the determined node is the destination node, thereby obtaining a routing path from the source node to the destination node.

[0060] It is understood that if the escrow balance at a node is depleted, transactions cannot proceed. Furthermore, a transaction request with a balance exceeding the minimum escrow balance in the network may also result in a transaction failure. Therefore, if the PCN network is composed of multiple pre-defined PCN subnetworks, the transaction balance of the transaction request and the maximum balances supported by each of the multiple PCN subnetworks are determined. A balance determination is then made based on the transaction balance and the maximum balances supported by each of the multiple PCN subnetworks. A target PCN subnetwork whose maximum balance is greater than or equal to the transaction balance is identified among the multiple PCN subnetworks. The target PCN subnetwork is deemed capable of fulfilling the transaction request. The nodes included in the target PCN subnetwork serve as the range for selecting the next node. Using the method for determining the next node of the source node, subsequent nodes are sequentially determined until the next node of the determined node is the destination node. A routing path from the source node to the destination node is then determined. Through this process, if a single PCN subnetwork is capable of fulfilling the transaction request, processing can be performed only within the selected target PCN subnetwork, limiting the range of next node selection, thereby reducing computational complexity and improving processing efficiency.

[0061] In an optional embodiment, the above method also includes: when the maximum supported amount in the above multiple PCN subnetworks is less than the above transaction amount, determining a first number of PCN subnetworks in the above multiple PCN subnetworks, so that the sum of the maximum supported amounts of the above first number of PCN subnetworks is greater than or equal to the above transaction amount; dividing the above transaction request into multiple sub-requests, so that the transaction amounts corresponding to the above multiple sub-requests are less than or equal to the maximum supported amount of the corresponding PCN subnetworks in the above first number of PCN subnetworks; based on the nodes included in the corresponding PCN subnetwork, respectively adopting the method of determining the next node of the above source node, and determining subsequent nodes in sequence, until the next node of the determined node is the above destination node, obtaining multiple routing paths from the above source node to the above destination node for the above multiple sub-requests.

[0062] As can be understood, to complete transaction requests with relatively large amounts, transactions are divided. If the maximum supported amount across multiple PCN subnetworks is less than the transaction amount, a single PCN subnetwork is deemed unable to complete the transaction amount transfer. Therefore, multiple PCN subnetworks are required for combined transfer. A first number of PCN subnetworks is determined within the multiple PCN subnetworks, such that the sum of the maximum supported amounts across the first number of PCN subnetworks is greater than or equal to the transaction amount. These first number of PCN subnetworks are deemed able to support the transaction request. The transaction request is then divided into multiple subrequests, such that the transaction amounts corresponding to each of the multiple subrequests are less than or equal to the maximum supported amounts of the corresponding PCN subnetworks within the first number of PCN subnetworks. Each subrequest selects a routing node within the corresponding PCN subnetwork. Based on the nodes within the corresponding PCN subnetwork, the method for determining the next node of a source node is used to sequentially determine subsequent nodes. This process continues until the next node of the determined node is the destination node, resulting in multiple routing paths from the source node to the destination node for each of the multiple subrequests. Through the above processing, the processing capacity of the PCN network can be maximized. Through the combined processing of multiple PCN sub-networks, the support capacity for transaction amounts can be stronger than that of a single PCN sub-network.

[0063] According to the above optional embodiment, the processing strategy implemented within the PCN subnetwork is specifically described. For example, the PCN channel balanced routing strategy employed can primarily consist of three components: transaction block segmentation, greedy transaction routing, and transaction execution. Transaction block segmentation involves dividing a transaction request into sub-requests smaller than the original request size. These sub-requests are independently transmitted across multiple PCN subnetworks within the PCN network. Greedy transaction routing, to ensure local network balance while maintaining node privacy, uses a node balance indicator to assess whether a node is balanced, selecting the node with the greatest reduction in the node balance indicator as the next hop. Greedy transaction routing, as described above, utilizes a pre-set greedy algorithm to find a local optimal solution to respond to a transaction request, rather than seeking a global optimal solution (from all nodes within the PCN network). Transaction execution involves selecting a transaction route and transmitting the transaction along the selected path. During transaction execution, each intermediate node must communicate the transaction amount and update its routing table.

[0064] Through the above steps S102 to S108, the purpose of combining network resource balancing and privacy protection can be achieved, and the technical effect of reducing the risk of network privacy leakage while achieving network balanced routing is achieved, thereby solving the technical problem that the related technology creates the risk of privacy leakage in order to achieve network balanced routing.

[0065] Based on the above embodiments and optional embodiments, the present invention proposes an optional implementation mode: Figure 4 This is a flow chart of an optional routing processing method provided according to an embodiment of the present invention, which is described in detail below.

[0066] Step S1: At time t, the PCN network receives a transaction request, which is recorded as re_tran t (n i ,n j ,a), where n i is the source node, n j is the destination node, a represents the transaction amount, U out ={} is used to record the nodes that have been removed. Used to record n i to n j The nodes determined by routing between them are initially recorded as source nodes n i ,make

[0067] Step S2, set the number of PCN sub-networks to num Tunit , Max_UT is the maximum supported amount of the PCN sub-network. If a≤Max_UT, it is considered that a single PCN sub-network can independently process the transaction request with a transaction amount of a. Let num Tunit=1, go to step S4, otherwise go to step S3.

[0068] Step S3: If a > Max_UT, it is considered that a single PCN sub-network cannot independently process the transaction request with the transaction amount a, and it is necessary to combine the PCN sub-networks and divide the transaction request. First, calculate the number of PCN sub-networks num Tunit :

[0069]

[0070] Among them, RoundU() means rounding. When the transaction amount a is greater than the maximum supported amount of a single PCN sub-network, num Tunit is an integer of at least 2, indicating that at least two PCN sub-networks are required to process the sub-requests respectively, and the process goes to step S4.

[0071] Step S4, in num Tunit ≥1, the node selection strategy is used to calculate the next hop node by finding the local optimal solution, n i_behop Perform step S5 for the calculated next hop;

[0072] Step S5, after determining n i_behop If there is no next node, execute step S6, otherwise execute step S9;

[0073] Step S6, after determining n i_behop If the next node does not exist and is not the source node, the transaction fails. Otherwise, go to step S7.

[0074] Step S7, after determining n i_behop There is no next node, and the determined n i_behop When it is the source node, it is considered to be the selected n i_behop is wrong and needs to return n i_behop To prevent the previous node of n from being reselected, i_behop , n i_behop with U out The purpose of taking the union is to add the nodes that have been tried and failed to the set of nodes that have been deleted, and to update U out , remove the selectable nodes from the returned previous node, and continue to select new n i_behop .

[0075] Step S8, continue to execute step S4, and record the determined nodes in Until the destination node is reached in all PCN sub-networks, obtain as a routing path.

[0076] Figure 5 is an optional routing processing method according to an embodiment of the present application, as shown in the flow chart of Figure 5 The method for obtaining a local optimal solution in step S4 includes the following sub-steps:

[0077] Step S41, a candidate node set is formed by n i and at least one candidate node adjacent to n i .

[0078] Step S42, the eliminated nodes recorded in U out are removed from the candidate node set.

[0079] Step S43, if U is empty, it is determined that there is no next hop node, otherwise, step S4 is entered.

[0080] Step S44, the node balance index of each node is calculated by using the following mathematical expression, and each node is sorted in ascending order of the node balance index:

[0081]

[0082] wherein μ represents the average value of the hosting amount of n i and at least one candidate node, N represents the number of direct connections of n i and at least one candidate node, there is a direct connection edge between the kth candidate node n k and the source node n i , k is the identifier of the at least one candidate node, a(n i ) is the hosting amount of the source node, and a(n k ) is the hosting amount corresponding to the kth candidate node.

[0083] Step S45, the first node in U , i.e., the node with the smallest node balance index in the at least one candidate node, is selected as the next hop node.

[0084] Through steps S41 to S45, the at least one candidate node is taken as a local PCN network, and the node with the smallest node balance index (the most balanced) is selected as the next node in the at least one candidate node, so that the local optimal solution is obtained.

[0085] ​This optional implementation achieves at least the following: By designing a node balance index as an indicator for determining node balance, local equilibrium in the PCN is achieved by selecting the node with the smallest node balance index as the next hop, without requiring knowledge of all node information. Because the mutual escrow amounts between nodes at both ends of a connected PCN channel are known, there is no need to obtain additional information about other nodes. This eliminates the need to know the escrow amounts of other nodes in the path when selecting a route, thereby ensuring node privacy.

[0086] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0087] A routing processing system is also provided in an embodiment of the present invention. The routing processing system provided in an embodiment of the present invention is introduced below.

[0088] Figure 6 is a structural block diagram of a routing processing system provided according to an embodiment of the present invention. Figure 6 As shown, the system includes: an application layer 602 and a PCN network layer 604. The system is described below.

[0089] Application layer 602, used to obtain transaction requests;

[0090] The PCN network layer 604 is connected to the application layer 602 and is used to determine the source node that issues the transaction request and the destination node to respond to the transaction request, wherein the source node and the destination node are nodes in the PCN network, and any two connected nodes among the multiple nodes included in the PCN network are respectively set with an escrow amount corresponding to the other connected node, so that the any two connected nodes perform transaction processing in the PCN network; determine at least one candidate node that has a mutual escrow amount with the source node; determine the next node of the source node based on the escrow amount of the source node and the escrow amount corresponding to the at least one candidate node; and determine subsequent nodes in sequence by adopting the method of determining the next node of the source node until the next node of the determined node is the destination node, thereby obtaining a routing path from the source node to the destination node.

[0091] In a routing processing system provided by an embodiment of the present invention, the purpose of combining network resource balancing and privacy protection is achieved through the application layer 602 and the PCN network layer 604, thereby achieving the technical effect of reducing the risk of network privacy leakage while achieving network balanced routing, thereby solving the technical problem that related technologies, in order to achieve network balanced routing, create the risk of privacy leakage.

[0092] As an optional embodiment, the above-mentioned system also includes: a blockchain service layer, which is connected to the above-mentioned PCN network layer and is used to respond to transaction requests in the above-mentioned PCN network layer when there is a node in the above-mentioned PCN network layer whose escrow amount is exhausted.

[0093] It is understood that the PCN network can perform continuous off-chain processing while maintaining normal and stable operation, avoiding the inefficiency caused by on-chain processing. However, if there is a node in the PCN network layer that has exhausted its escrow balance, the blockchain service layer will respond to the transaction request in the PCN network layer.

[0094] Optionally, the blockchain service layer may also respond to the transaction request in the event of a transaction failure.

[0095] Based on the above embodiments and optional embodiments, the present invention proposes an optional implementation manner. Figure 7 Schematic diagram of a routing processing system provided according to an embodiment of the present invention. Figure 7 As shown in the figure, the routing processing system is divided into five layers: application layer, PCN network layer, blockchain service layer, blockchain storage layer, and interface layer. The application layer contains numerous paid applications. These applications are connected to the PCN network layer through the interface layer.

[0096] The PCN network layer and the paid channel network layer primarily complete transaction requests issued by the application layer. Furthermore, the PCN network layer incorporates a module that combines privacy protection with network balancing to ensure both application layer privacy and local network balancing requirements.

[0097] The blockchain service layer consists of modules such as smart contracts, consensus algorithms, encryption algorithms, digital signatures, transaction broadcasting, and permission control. It connects to the PCN network layer through corresponding interfaces, ensuring the final transaction consistency of the PCN network layer.

[0098] The blockchain storage layer is responsible for storing blockchain transactions. Depending on the volume of transaction data, it can be stored on-chain or in a combination of on-chain and off-chain storage. It is connected to the blockchain service layer through the interface layer.

[0099] The interface layer runs through the entire system architecture, providing appropriate interfaces for interactions at each layer. The system supports software and hardware interface models such as RESTful API (an interface developed in a RESTful style) and RPC (remote procedure call). It also includes HTTP (request-response protocol) and the Uniform SDK (software development kit).

[0100] An embodiment of the present invention provides a non-volatile storage medium on which a program is stored. When the program is executed by a processor, a routing processing method is implemented.

[0101] An embodiment of the present invention provides an electronic device including a processor, a memory, and a program stored in the memory and executable on the processor, wherein the processor executes the program to implement any of the above-mentioned routing processing methods. The device herein may be a server, a PC, or the like.

[0102] The present invention also provides a computer program product, which, when executed on a data processing device, is suitable for executing and initializing any one of the above-mentioned routing processing methods.

[0103] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0104] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0105] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0106] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0107] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0108] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0109] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0110] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a..." does not preclude the presence of additional identical elements in the process, method, commodity, or apparatus that includes the element.

[0111] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0112] The above are merely embodiments of the present invention and are not intended to limit the present invention. It will be apparent to those skilled in the art that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention are intended to be included within the scope of the claims of the present invention.

Claims

1. A routing processing method, characterized in that: include: Determining a source node that issues a transaction request and a destination node that is to respond to the transaction request, wherein the source node and the destination node are nodes in a PCN network, and any two connected nodes among a plurality of nodes included in the PCN network respectively set an escrow amount corresponding to the other connected node, for the any two connected nodes to perform transaction processing in the PCN network; Determining at least one candidate node that has mutual knowledge of the escrow amount with the source node; Determining the next node of the source node based on the escrow amount of the source node and the escrow amounts corresponding to the at least one candidate node; By adopting a method of determining the next node of the source node, subsequent nodes are determined in sequence until the next node of the determined node is the destination node, a routing path from the source node to the destination node is obtained; Among them, the determining of the next node of the source node based on the custodial amount of the source node and the custodial amount corresponding to the at least one candidate node includes: determining the number of nodes of the at least one candidate node; determining the node balance index corresponding to the at least one candidate node based on the custodial amount of the source node, the custodial amount corresponding to the at least one candidate node, and the number of nodes, wherein the node balance index corresponding to the at least one candidate node is used to indicate the balance status of the consumption of the custodial amount corresponding to the at least one candidate node; based on the node balance index corresponding to the at least one candidate node, selecting the next node of the source node from the at least one candidate node.

2. The method according to claim 1, characterized in that The selecting a next node of the source node from the at least one candidate node based on the node balance index corresponding to each of the at least one candidate node includes: A node with the smallest node balance index among the at least one candidate node is selected as the next node of the source node.

3. The method according to claim 1, characterized in that The method of determining the next node of the source node to determine subsequent nodes in sequence includes: In the case that the determined node does not have a next node, determining a previous node of the node that does not have the next node among the subsequent nodes; Return to the previous node; Determining a plurality of first nodes that mutually know the escrow amount with the previous node, wherein the plurality of first nodes includes the node for which there is no next node; Eliminating the nodes without a next node from the multiple first nodes to obtain at least one node to be reselected; Based on the node balance index of the at least one node to be reselected, a next node of the previous node is selected from the at least one node to be reselected.

4. The method according to claim 1, wherein After determining subsequent nodes in sequence using the method for determining the next node of the source node, the method further includes: If the determined node does not have a next node and the determined node is the source node, it is determined that the transaction request has failed.

5. The method according to any one of claims 1 to 4, characterized in that After determining the source node that issues the transaction request and the destination node to respond to the transaction request, the method further includes: In a case where the PCN network is composed of a plurality of preset PCN sub-networks, determining a transaction amount of the transaction request and a maximum supported amount corresponding to each of the plurality of PCN sub-networks; Determine a target PCN subnetwork among the multiple PCN subnetworks whose maximum supported amount is greater than or equal to the transaction amount; Based on the nodes included in the target PCN subnetwork, a method of determining the next node of the source node is adopted to determine subsequent nodes in sequence until the next node of the determined node is the destination node, thereby obtaining a routing path from the source node to the destination node.

6. The method according to claim 5, characterized in that The method further comprises: If the maximum supported amount among the multiple PCN sub-networks is less than the transaction amount, determining a first number of PCN sub-networks among the multiple PCN sub-networks such that the sum of the maximum supported amounts of the first number of PCN sub-networks is greater than or equal to the transaction amount; Divide the transaction request into multiple sub-requests, so that the transaction amounts corresponding to the multiple sub-requests are less than or equal to the maximum supported amount of the corresponding PCN sub-networks in the first number of PCN sub-networks; Based on the nodes included in the corresponding PCN sub-network, the method of determining the next node of the source node is respectively adopted to determine the subsequent nodes in sequence until the next node of the determined node is the destination node, thereby obtaining multiple routing paths for the multiple sub-requests from the source node to the destination node.

7. A routing processing system, characterized in that: include: Application layer, used to obtain transaction requests; The PCN network layer is connected to the application layer and is used to determine a source node that issues a transaction request and a destination node to respond to the transaction request, wherein the source node and the destination node are nodes in the PCN network, and any two connected nodes among a plurality of nodes included in the PCN network respectively set an escrow amount corresponding to another connected node, so that the any two connected nodes perform transaction processing in the PCN network; determine at least one candidate node that has a mutual escrow amount with the source node; determine the next node of the source node based on the escrow amount of the source node and the escrow amount corresponding to each of the at least one candidate node; and sequentially determine subsequent nodes using a method for determining the next node of the source node until the next node of the determined node is the destination node, thereby obtaining a routing path from the source node to the destination node; The PCN network layer is further used to determine the number of nodes of the at least one candidate node; based on the custodial amount of the source node, and the custodial amount and the number of nodes corresponding to the at least one candidate node, determine the node balance index corresponding to the at least one candidate node, wherein the node balance index corresponding to the at least one candidate node is used to indicate the balance status of the consumption of the custodial amount corresponding to the at least one candidate node; based on the node balance index corresponding to the at least one candidate node, select the next node of the source node from the at least one candidate node.

8. The system according to claim 7, characterized in that The system further comprises: The blockchain service layer is connected to the PCN network layer and is used to respond to the transaction request in the PCN network layer when there is a node with exhausted escrow amount in the PCN network layer.

9. A non-volatile storage medium, characterized in that: The non-volatile storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executed by the routing processing method according to any one of claims 1 to 6.