CN116109416A - Block chain-based carbon transaction payment channel routing method and device - Google Patents

Block chain-based carbon transaction payment channel routing method and device Download PDF

Info

Publication number
CN116109416A
CN116109416A CN202310385995.7A CN202310385995A CN116109416A CN 116109416 A CN116109416 A CN 116109416A CN 202310385995 A CN202310385995 A CN 202310385995A CN 116109416 A CN116109416 A CN 116109416A
Authority
CN
China
Prior art keywords
transaction
node
payment
channel
representing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202310385995.7A
Other languages
Chinese (zh)
Other versions
CN116109416B (en
Inventor
熊翱
宋雨
郭少勇
王栋
李艳萍
柏德胜
银洲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
State Grid Digital Technology Holdings Co ltd
Beijing University of Posts and Telecommunications
Chinese Research Academy of Environmental Sciences
Original Assignee
State Grid Digital Technology Holdings Co ltd
Beijing University of Posts and Telecommunications
Chinese Research Academy of Environmental Sciences
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by State Grid Digital Technology Holdings Co ltd, Beijing University of Posts and Telecommunications, Chinese Research Academy of Environmental Sciences filed Critical State Grid Digital Technology Holdings Co ltd
Priority to CN202310385995.7A priority Critical patent/CN116109416B/en
Publication of CN116109416A publication Critical patent/CN116109416A/en
Application granted granted Critical
Publication of CN116109416B publication Critical patent/CN116109416B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9024Graphs; Linked lists
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/085Payment architectures involving remote charge determination or related payment systems
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/80Management or planning
    • Y02P90/84Greenhouse gas [GHG] management systems

Abstract

The invention provides a carbon transaction payment channel route selection method and device based on a blockchain, which are used for optimizing a payment channel network route based on an under-chain payment channel, wherein a directed acyclic graph is constructed for the payment channel network, attribute parameters of procedure cost, channel balance and tolerance time are added for each side, timeliness constraint, feasibility constraint and timeliness constraint are established, and a payment request is combined to find a candidate transaction path meeting the conditions. In each transaction path to be selected, node transaction procedure fees are set according to the balance of the two ends of each payment channel in proportion, the node credit is calculated by counting the correct behavior and the malicious behavior of each node, a distance length constant is added to each node, the weight of the corresponding side of each payment channel is calculated by combining the transaction procedure fees, the node credit and the distance length constant of each node, and finally the optimal transaction path is searched according to the weight of each side.

Description

Block chain-based carbon transaction payment channel routing method and device
Technical Field
The invention relates to the technical field of carbon quota transactions, in particular to a block chain-based carbon transaction payment channel routing method and device.
Background
The current research algorithm for the network route of the payment channel in the carbon transaction process can be divided into a single route and a multi-route. Wherein, the single route does not allow the transaction to be split, and is to search a route path meeting the requirement for transaction asset transfer. The method is mainly applied to scenes with smaller network scale and small transaction transfer quantity. However, if there is a transaction with a large amount in the single route, there is no path meeting the transaction amount, which may cause long-time blocking of the channel and cause a channel deadlock condition. The multipath route is to search at least one path for transaction, and if necessary, transaction amounts can be split for transaction on different paths, so that the problem of channel blockage can be effectively reduced. The multi-route splits the transaction, so that channel blocking can be reduced, the flow property of the network is improved, but the real-time requirement of the multipath routing path on the network state is higher, the node communication cost is high, and the problem of transaction atomicity is introduced, so that the routing efficiency is lower. Thus, a new payment routing method is needed.
Disclosure of Invention
In view of this, the embodiment of the invention provides a blockchain-based carbon transaction payment channel routing method and device, so as to eliminate or improve one or more defects existing in the prior art, and solve the problems of low success rate of payment channel routing path selection and easy channel congestion in the prior art.
One aspect of the present invention provides a blockchain-based carbon transaction payment channel routing method, comprising the steps of:
establishing a directed acyclic graph according to the topological structure of a payment channel network, wherein each node in the directed acyclic graph represents each payment node in the payment channel network, and edges among nodes in the directed acyclic graph represent payment channels among each payment node;
marking transaction procedure fees paid by a first end to a second end, channel balance of the first end, transaction procedure fees paid by the second end to the first end, channel balance of the second end, total balance of channels and tolerance time on each side of the directed acyclic graph;
obtaining a payment request, wherein the payment request comprises a payment initiator, a payment receiver, a transaction amount, a transaction initiation time and a transaction deadline;
establishing timeliness constraint, feasibility constraint and timeliness constraint, wherein on each transaction path, the timeliness constraint requires each payment channel to complete forwarding within corresponding tolerance time, the feasibility constraint requires the total balance of the channels of each payment channel to be more than or equal to the sum of payment amount and all transaction procedure fees after a current node, and the timeliness constraint requires each transaction path to add transaction transfer time to the transaction starting time and not exceed the transaction deadline;
Obtaining a eligible transaction path to be selected in the directed acyclic graph according to the payment request, the timeliness constraint, the feasibility constraint and the timeliness constraint; when no transaction path meeting the transaction amount exists, splitting the transaction amount into a plurality of transaction paths and screening corresponding transaction paths to be selected respectively.
Calculating procedure cost and current credit value corresponding to each node in each transaction path to be selected, obtaining distance length constant corresponding to each node in each transaction path to be selected, calculating weight of corresponding sides of each payment channel in each transaction path to be selected according to the procedure cost corresponding to each node, the current credit value and the distance length constant, constructing a non-negative weighted directed graph, and searching each transaction path to be selected by adopting a preset algorithm to obtain an optimal transaction path;
the procedure fee is collected by combining the proportion of the channel balance of the first end and the channel balance of the second end of the payment channel where each node is located, and the current credit value of each node is calculated according to the correct behavior quantity and the malicious behavior quantity.
In some embodiments, the tolerance time is set using a hash time lock tolerance time.
In some embodiments, the expression of the timeliness constraint is:
Figure SMS_1
wherein ,
Figure SMS_2
representing the tolerance time for node i to wait for node i+1 to provide the key, +.>
Figure SMS_3
A distance unit hop count value representing the distance from the receiver node L at node i;
the expression of the feasibility constraint is:
Figure SMS_4
wherein ,
Figure SMS_5
representing the maximum transaction amount that node i can transfer to node j, a representing the transaction amount,
Figure SMS_6
representing the time of the transaction pathThe sum of transaction procedure fees of the front node and all the nodes after the front node;
the expression of the timeliness constraint is:
Figure SMS_7
wherein ,
Figure SMS_8
representing the transaction start time,/->
Figure SMS_9
Representing the transaction time required for payment channel e, +.>
Figure SMS_10
Representing the transaction deadline.
In some embodiments, the calculation formula of the procedure cost corresponding to each node in each alternative transaction path is as follows:
Figure SMS_11
wherein ,
Figure SMS_14
indicate direction->
Figure SMS_19
The node pays +.>
Figure SMS_23
Procedure cost of node->
Figure SMS_15
Representing the node to which the payment initiator corresponds, +.>
Figure SMS_18
Representation->
Figure SMS_22
Node direction->
Figure SMS_25
Payment amount of node->
Figure SMS_12
A proportionality parameter indicating the charge of a procedure according to said payment amount,/or->
Figure SMS_16
Representation->
Figure SMS_20
Channel balance of node->
Figure SMS_24
Representation->
Figure SMS_13
Channel balance of node->
Figure SMS_17
Is a proportion parameter of procedure charge collected according to balance difference values at two ends of the channel; / >
Figure SMS_21
Representing a fixed portion of the procedure cost.
In some embodiments, the node reputation is calculated as:
Figure SMS_26
Figure SMS_27
wherein ,
Figure SMS_31
representing the influence factor at t iterations, < ->
Figure SMS_34
Is the rewarding factor when node i makes the right behaviour,/->
Figure SMS_37
Is when node->
Figure SMS_29
Penalty factor when malicious behavior is made, +.>
Figure SMS_33
Representing node->
Figure SMS_36
Make correct behavior ++>
Figure SMS_39
Representing nodes
Figure SMS_28
Making malicious behavior->
Figure SMS_32
Representing node->
Figure SMS_35
Total number of participations in the transaction; />
Figure SMS_38
Representing node->
Figure SMS_30
Reputation value at the t-th iteration.
In some embodiments, the distance length constant value range is (0, 1) and is proportional to the transaction duration of each node in the corresponding payment channel.
In some embodiments, calculating the weight of the corresponding edge of each payment channel in each candidate transaction path according to the corresponding procedure cost of each node, the current reputation value and the distance length constant comprises:
the procedure cost of each node in a single transaction path to be selected is normalized, and the calculation formula is as follows:
Figure SMS_40
wherein ,
Figure SMS_41
indicate direction->
Figure SMS_42
The node pays +.>
Figure SMS_43
Procedure cost of node->
Figure SMS_44
Representing +.>
Figure SMS_45
L represents the number of nodes in a single candidate transaction path;
Figure SMS_46
wherein ,
Figure SMS_47
representing edge e in a single alternate transaction path ij Weight of->
Figure SMS_48
Representing node->
Figure SMS_49
Is a node reputation of (1); />
Figure SMS_50
And
Figure SMS_51
the value range is (0, 1) for the fixed parameter; />
Figure SMS_52
Representing the distance length constant.
In some embodiments, the predetermined algorithm is a disco tesla algorithm.
In another aspect, the present invention also provides a blockchain-based carbon transaction payment channel routing device, including a processor and a memory, where the memory stores computer instructions, and the processor is configured to execute the computer instructions stored in the memory, and when the computer instructions are executed by the processor, the device implements the steps of the method.
In another aspect, the present invention also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the above method.
The invention has the advantages that:
according to the blockchain-based carbon transaction payment channel route selection method and device, optimization of payment channel network routes is performed based on the under-chain payment channels, a directed acyclic graph is constructed on the payment channel network, attribute parameters of procedure cost, channel balance and tolerance time are added to each side, timeliness constraint, feasibility constraint and timeliness constraint are established, and a payment request is combined to find a candidate transaction path meeting the conditions. In each transaction path to be selected, node transaction procedure fees are set according to the balance of the two ends of each payment channel in proportion, the node credit is calculated by counting the correct behavior and the malicious behavior of each node, a distance length constant is added to each node, the weight of the corresponding side of each payment channel is calculated by combining the transaction procedure fees, the node credit and the distance length constant of each node, and finally the optimal transaction path is searched according to the weight of each side.
Further, transaction procedure fees of each node are configured according to balances of nodes at two ends of each payment channel, so that balance of the two ends of each payment channel is guaranteed, and channel congestion caused by insufficient balances of the nodes in a transaction process can be effectively prevented.
Additional advantages, objects, and features of the invention will be set forth in part in the description which follows and in part will become apparent to those having ordinary skill in the art upon examination of the following or may be learned from practice of the invention. The objectives and other advantages of the invention may be realized and attained by the structure particularly pointed out in the written description and drawings.
It will be appreciated by those skilled in the art that the objects and advantages that can be achieved with the present invention are not limited to the above-described specific ones, and that the above and other objects that can be achieved with the present invention will be more clearly understood from the following detailed description.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate and together with the description serve to explain the invention. In the drawings:
FIG. 1 is a flowchart of a blockchain-based carbon transaction payment channel routing method according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the following embodiments and the accompanying drawings, in order to make the objects, technical solutions and advantages of the present invention more apparent. The exemplary embodiments of the present invention and the descriptions thereof are used herein to explain the present invention, but are not intended to limit the invention.
It should be noted here that, in order to avoid obscuring the present invention due to unnecessary details, only structures and/or processing steps closely related to the solution according to the present invention are shown in the drawings, while other details not greatly related to the present invention are omitted.
It should be emphasized that the term "comprises/comprising" when used herein is taken to specify the presence of stated features, elements, steps or components, but does not preclude the presence or addition of one or more other features, elements, steps or components.
It is also noted herein that the term "coupled" may refer to not only a direct connection, but also an indirect connection in which an intermediate is present, unless otherwise specified.
The blockchain is applied to carbon transaction, the current blockchain TPS cannot support the requirement of high-frequency carbon transaction, and the network of payment channels under the chain is one method for improving the performance of the blockchain. The invention comprehensively considers the transaction procedure cost, node credit and path length factors and comprehensively considers the optimal routing path to conduct transaction. In order to solve the problems of unbalanced channel resources and channel congestion, the invention charges according to different proportions according to the balance difference at the two ends of the channel, comprehensively considers the transaction procedure cost, and adjusts the balance at the two ends of the channel. And selecting a route path meeting the transaction amount, selecting an optimal route path comprehensively considered to conduct transaction if the route path meeting the transaction amount exists in the channel network, and splitting the transaction amount to select different route paths to conduct transaction if the route path meeting the transaction amount does not exist in the channel network. And further improves the transaction success rate of the payment network under the chain, and reduces channel congestion with less transaction procedure cost.
Specifically, the invention provides a blockchain-based carbon transaction payment channel routing method, as shown in fig. 1, comprising the following steps S101 to S106:
step S101: and establishing a directed acyclic graph according to the topological structure of the payment channel network, wherein each node in the directed acyclic graph represents each payment node in the payment channel network, and the edges between each node in the directed acyclic graph represent the payment channels between each payment node.
Step S102: the transaction fee paid by the first end to the second end on each side of the directed acyclic graph, the channel balance of the first end, the transaction fee paid by the second end to the first end, the channel balance of the second end, the total channel balance and the tolerance time are marked.
Step S103: acquiring a payment request, wherein the payment request comprises a payment initiator, a payment receiver, a transaction amount, a transaction starting time and a transaction ending time; when no transaction path meeting the transaction amount exists, splitting the transaction amount into a plurality of transaction paths and screening corresponding transaction paths to be selected respectively.
Step S104: and constructing timeliness constraint, feasibility constraint and timeliness constraint, wherein on each transaction path, the timeliness constraint requires each payment channel to complete forwarding within corresponding tolerance time, the feasibility constraint requires the total balance of the channels of each payment channel to be more than or equal to the sum of the payment amount and all transaction procedure fees after the current node, and the timeliness constraint requires that the transaction transfer time of each transaction path is added on the basis of the transaction starting time and does not exceed the transaction deadline.
Step S105: and obtaining the eligible transaction paths to be selected in the directed acyclic graph according to the payment request, the timeliness constraint, the feasibility constraint and the timeliness constraint.
Step S106: calculating procedure cost and current credit value corresponding to each node in each transaction path to be selected, obtaining distance length constant corresponding to each node in each transaction path to be selected, calculating weight of corresponding edges of each payment channel in each transaction path to be selected according to the procedure cost corresponding to each node, the current credit value and the distance length constant, constructing a non-negative weighted directed graph, and searching each transaction path to be selected by adopting a preset algorithm to obtain an optimal transaction path.
The procedure fee is collected by combining the proportion of the channel balance of the first end and the channel balance of the second end of the payment channel where each node is located, and the current credit value of each node is calculated according to the correct behavior quantity and the malicious behavior quantity.
The steps S101 to S106 of the invention can be executed by a blockchain agent or by a third party mechanism.
In steps S101 and S102, the payment channel network is represented as a directed acyclic graph, and transaction characteristics of the corresponding payment channel are recorded by the attribute of the label side. Wherein the transaction charges corresponding to each edge are direction-differentiated, e.g. for edge e ij Upper transaction commission f ij Refers to
Figure SMS_53
Node direction->
Figure SMS_54
The node transfers the transaction amount for the procedure charged. Channel balance refers to the maximum amount that can be transferred from one end to the other on the payment channel, e.g. for side e ij Channel balance b ij Representing from->
Figure SMS_55
Node direction->
Figure SMS_56
The maximum amount the node can transfer.
In steps S103, S104 and S105, the payment request is a demand for recording a transaction, and on the basis of the corresponding transaction demand, one or more candidate transaction paths meeting the conditions can be found out on the directed acyclic graph constructed based on the payment channel network by setting constraint conditions. In this embodiment, three conditions of timeliness constraint, feasibility constraint and timeliness constraint are set, and in other embodiments, other constraint conditions may be set according to specific requirements.
In some embodiments, the timeliness constraint is a limitation on the payment channel forwarding time to ensure timeliness of the payment behavior, and the tolerance time is set with a Hash Time Lock (HTLC) tolerance time. The hash-lock mode refers to a mechanism by which a user makes a guess for the original value of a hash value to pay for a prescribed period of time. In short, on the basis of intelligent contracts, both parties lock the asset first, and if the original value of the correct hash value is input in a limited time, the transaction can be completed. Under such a mechanism, a fast confirmation of micropayment, that is to say a fast confirmation of the lightning network, can be achieved.
After the user makes a transaction through a plurality of transaction nodes, the amount is temporarily locked, and to ensure that the receiver has received the amount of the transaction, an R value is returned and sequentially transmitted to the intermediate node, and the intermediate node is released when receiving R and needs to be received within the time range specified by the time lock in the node to be valid, so that the time lock tolerates time
Figure SMS_57
It is necessary to compare the value of the number of hops in units of distance of node i from the receiver node L, the farther from the receiver,/-, the>
Figure SMS_58
The greater the value should be.
In some embodiments, the expression for the timeliness constraint is:
Figure SMS_59
;/>
wherein ,
Figure SMS_60
representing the tolerance time for node i to wait for node i+1 to provide the key, +.>
Figure SMS_61
A value representing the number of hops in units of distance from the receiver at node i.
Further, the feasibility constraint is that the channel balance of each node is larger than the sum of the payment amount, the transaction procedure cost of the node and the subsequent transaction procedure cost of all nodes on the payment path.
The expression for the feasibility constraint is:
Figure SMS_62
wherein ,
Figure SMS_63
representing the maximum transaction amount that node i can transfer to node j, a representing the transaction amount,
Figure SMS_64
representing the sum of transaction procedure fees for the current node and all nodes thereafter on the transaction path.
Further, timeliness constraint means that the time of finally completing the transaction is before the transaction deadline after the transaction is forwarded through the complete transaction path based on the transaction starting time.
The expression of the timeliness constraint is:
Figure SMS_65
wherein ,
Figure SMS_66
indicating transaction start time, ++>
Figure SMS_67
Representing the transaction time required for payment channel e, +.>
Figure SMS_68
Representing the transaction deadline.
In this embodiment, whether a route or a plurality of routes are adopted is determined according to the transaction amount, specifically, if a path satisfying the transaction amount exists in the channel network, an optimal route path in the single route is selected for transaction, and if a path satisfying the transaction amount does not exist in the channel network, the transaction amount is split, and corresponding route paths are selected for transaction respectively.
In step S106, on the basis of the single-path route or the multi-path route, the to-be-selected transaction path corresponding to each transaction amount is selected based on the constraint condition, and then the procedure cost, the current reputation value and the distance length parameter of each node on each path are combined to configure weights for each payment channel in each to-be-selected transaction path, and after the edges of each to-be-selected transaction path are weighted, the shortest and optimal path is searched for each single transaction amount to be used as the optimal transaction path of each single transaction amount.
In some embodiments, the calculation formula of the procedure cost corresponding to each node in each alternative transaction path is as follows:
Figure SMS_69
wherein ,
Figure SMS_72
indicate direction->
Figure SMS_77
The node pays +.>
Figure SMS_82
Procedure cost of node->
Figure SMS_73
Representing the node to which the payment initiator corresponds, +.>
Figure SMS_75
Representation->
Figure SMS_79
Node direction->
Figure SMS_83
Payment amount of node->
Figure SMS_70
A proportionality parameter indicating the charge of a procedure according to said payment amount,/or->
Figure SMS_74
Representation->
Figure SMS_78
Channel balance of node->
Figure SMS_81
Representation->
Figure SMS_71
Channel balance of node->
Figure SMS_76
Is a proportion parameter of procedure charge collected according to balance difference values at two ends of the channel; />
Figure SMS_80
Representing a fixed portion of the procedure cost.
In some embodiments, the node reputation is calculated as:
Figure SMS_84
Figure SMS_85
wherein ,
Figure SMS_87
representing the influence factor at t iterations, < ->
Figure SMS_92
When node i makes the correct behaviorThe prize coefficient is used to determine the prize,
Figure SMS_93
is when node->
Figure SMS_89
Penalty factor when malicious behavior is made, +.>
Figure SMS_91
Representing node->
Figure SMS_94
Make correct behavior ++>
Figure SMS_97
Representing nodes
Figure SMS_86
Making malicious behavior->
Figure SMS_90
Representing node->
Figure SMS_95
Total number of participations in the transaction; />
Figure SMS_96
Representing node->
Figure SMS_88
Reputation value at the t-th iteration.
In some embodiments, the distance length constant value range is (0, 1) and is proportional to the transaction duration of each node in the corresponding payment channel.
In some embodiments, calculating the weight of the corresponding edge of each payment channel in each candidate transaction path according to the corresponding procedure cost of each node, the current reputation value and the distance length constant comprises:
The procedure cost of each node in a single transaction path to be selected is normalized, and the calculation formula is as follows:
Figure SMS_98
wherein ,
Figure SMS_99
indicate direction->
Figure SMS_100
The node pays +.>
Figure SMS_101
Procedure cost of node->
Figure SMS_102
Representing +.>
Figure SMS_103
L represents the number of nodes in a single candidate transaction path;
Figure SMS_104
wherein ,
Figure SMS_105
representing edge e in a single alternate transaction path ij Weight of->
Figure SMS_106
Representing node->
Figure SMS_107
Is a node reputation of (1); />
Figure SMS_108
And
Figure SMS_109
the value range is (0, 1) for the fixed parameter; />
Figure SMS_110
Representing the distance length constant.
In some embodiments, the predetermined algorithm is a disco tesla algorithm. The diels tesla algorithm can be divided into 5 steps: 1) And finding out an unprocessed point which starts from the starting point and can go forward with the least cost. 2) For the neighbors of the node it is checked if there is a shorter path to them and if so, its cost is updated. 3) The node is added to the processed queue and is subsequently not processed. 4) Steps 1-4 are repeated until all nodes in the graph except the endpoint have been checked. 5) A final path is obtained.
In another aspect, the present invention also provides a blockchain-based carbon transaction payment channel routing device, including a processor and a memory, where the memory stores computer instructions, and the processor is configured to execute the computer instructions stored in the memory, and when the computer instructions are executed by the processor, the device implements the steps of the method.
In another aspect, the present invention also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the above method.
The invention is illustrated below with reference to specific examples:
a system model is established for a payment channel network, the system model comprising a network model and a payment model.
The network model is as follows:
the topology of the payment channel network (payment channel network, PCN) is represented as the form g= (V, E) of a directed acyclic graph, V representing a set of nodes in the network, E being a set of payment channels. Each node v i E V denotes a user who owns a funds account and establishes an in-chain payment channel with at least one other node. Each edge e ij =(v i ,v j ) E represents a payment channel, where the representation is v i Is the sender node, v j Is a receiver node, each edge has the following properties:
setting each edge e ij =(v i ,v j ) E has transaction procedure fee f ij Is from v i To v j And transferring the transaction amount.
Setting each edge e ij =(v i ,v j ) E-channel redundancyForehead b ij Representing the ratio from v i Can be transferred to v j Is a maximum transaction amount of (c).
Setting each edge e ij =(v i ,v j ) E has a HTLC time lock tolerance time τ ij Represents v i Wait v j The secret R longest latency is provided.
Setting each edge e ij =(v i ,v j ) E channel total balance c ij Representing the sum of the channel balances of the two parties of the channel. Namely b ij +b ji =c ij =c ji . And the balance always has b ij ≤c ij
For simplicity, the channel total balance c is not considered in this embodiment ij Edge of 0, and channel balance b ij And the balance is equal to or more than 0, the condition of negative balance of the channel is not considered, and the two-way channel is considered by the payment channel.
The payment model is established as follows:
define a payment request r= (v) s ,v t ,a,s t ,d l), wherein vs Is the initiator, i.e. sender, v of the payment request t Is the receiver, a is the transaction amount, does not contain the procedure charge to be paid in the transfer path, s t Is the start time of transaction initiation, d l Is the transaction deadline. de represents the transfer time in lane link e through the transaction that needs to be completed. P is the set in all paths in the PCN, P R Is v satisfying the payment request R s -v t Path set P e P R The representation is that v is satisfied s -v t One path of the payment request. Let the correlation path p be serialized to p=v 0 →v 1 →......→v L. wherein v0 =v s ,v L =v t, wherein vi E p represents the node in path p. Definition of the function F l,m Indicating that a payment is made from v in path p l To v m Sum of the procedure fees paid for transactions on the path, f i,i+1 Representing the charge of the transaction path in the path (i, i+1) through node i. Wherein 0.ltoreq.l<m≤L,F l,m The function is as follows:
Figure SMS_111
; (1)
if the payment request is to be successfully completed, a certain constraint condition is also required:
timeliness constraint: if the payment request R is to be completed, a time lock tolerance time τ of HTLC in each payment channel is required i,i+1 And forwarding the next route inwards. Timeliness is achieved through time locking of the HTLC, and integrity of transactions of the intermediate payment channel can be guaranteed, wherein the concrete formula is as follows:
Figure SMS_112
; (2)
wherein ,
Figure SMS_113
representing the tolerance time for node i to wait for node i+1 to provide the key, +.>
Figure SMS_114
A value representing the number of hops in units of distance from the receiver at node i.
Feasibility constraints: if successful completion of the payment request R is desired, each lane in path p may be successfully traversed, a lane balance b is required i,i+1 At least the payment amount and the transit node v i The sum of all subsequent procedure costs is given by:
Figure SMS_115
; (3)
wherein ,
Figure SMS_116
representing the maximum transaction amount that node i can transfer to node j, a representing the transaction amount,
Figure SMS_117
representing a transaction pathAnd the sum of transaction procedure fees of the current node and all nodes after the current node on the path.
Timeliness constraint: if the payment request R is to be completed, the payment needs to be completed within the time specified by the payment request, and the transaction reaches the receiver. Then it is required to request the payment start time s t Plus the transaction transfer time at which the individual links in the path need to be completed does not exceed the transaction deadline d specified in the payment request l The specific formula is as follows:
Figure SMS_118
; (4)
wherein ,
Figure SMS_119
indicating transaction start time, ++>
Figure SMS_120
Representing the transaction time required for payment channel e, +.>
Figure SMS_121
Representing the transaction deadline.
In this embodiment, a multi-factor routing payment scheme is used, assuming that the initiator Alice initiates a transaction to the recipient Bob, using the payment channel link p=v 0 →v 1 →......→v L The middle is subjected to a plurality of node selections, in the embodiment, the path and the node selections are comprehensively considered to pay the route mainly in consideration of the channel procedure cost, the node historical reputation value and the nearest distance length, and the embodiment provides a Multi-factor payment scheme (Multi-factor payment scheme, MFPS) based route optimization algorithm.
First, calculation of transaction procedure cost:
an important factor in the path selection consideration is the cost of procedures in the transaction path that need to be given to the intermediate nodes, minimizing the cost of transaction procedures while satisfying timeliness, feasibility and timeliness constraints. The transaction procedure fee charging type considers three procedure fees, namely, the channel node charges according to the proportion of the transaction amount, the node charges the fee fixedly and charges according to different proportions of balance differences at two ends of the channel. The procedure cost to be delivered for a transaction path through a certain node i is as follows:
Figure SMS_122
; (5)
wherein ,
Figure SMS_125
indicate direction->
Figure SMS_128
The node pays +.>
Figure SMS_132
Procedure cost of node->
Figure SMS_126
Representing the node to which the payment initiator corresponds, +.>
Figure SMS_127
Representation->
Figure SMS_133
Node direction->
Figure SMS_135
Payment amount of node->
Figure SMS_123
A proportionality parameter indicating the charge of a procedure according to said payment amount,/or->
Figure SMS_129
Representation->
Figure SMS_134
Channel balance of node->
Figure SMS_136
Representation->
Figure SMS_124
Channel balance of node->
Figure SMS_130
Is a proportion parameter of procedure charge collected according to balance difference values at two ends of the channel; />
Figure SMS_131
Representing a fixed portion of the procedure cost.
From the sender v throughout the transaction path s To receiving end v t The procedure cost of the required exchange
Figure SMS_137
The formula is as follows:
Figure SMS_138
; (6)
the embodiment considers the channel congestion situation, namely the situation that balances at two ends of a channel are unbalanced. In the u, v node channel, when the channel is established, the balance is stored in both sides of the user, namely, both ends of the channel are balanced, but as the subsequent transaction occurs, the transaction direction is always that the node u carries out the transaction to the node v, and as a result, the fund of one v node in the channel is sufficient, the fund of the other u node is insufficient, and the balance at both ends is unbalanced. If there is a transaction that requires a transfer of funds from the u-v direction, but the funds at the channel node u cannot meet the monetary requirements of the transaction, the transaction will be jammed at the node until the time lock is set to a time when the transfer of funds has not been performed, and the transaction will be cancelled. The unbalanced balance at the two ends of the channel can cause the success rate of the transaction to be reduced, cause channel congestion, and the balance of the channel passing before the transaction is locked before the transaction is cancelled, thereby causing the dead lock phenomenon of the channel funds. In this embodiment, the procedure fee is collected according to different ratios of balance differences between the two ends of the channel, and if one end path with more balance is selected, the procedure fee is lower than the procedure fee collected by selecting the other end path. If two or more alternative paths exist, the procedure cost is taken as a consideration factor for selecting the paths, and under the condition that other conditions are the same, one path with relatively abundant channel balance at one end is preferably selected, so that the occurrence of unbalanced channel balance and channel congestion can be reduced.
Second, calculation of node reputation:
an important factor to be considered in transaction path selection is the reputation value of a node, and if the reputation value of a certain node is low, the probability of the node being wrongly made is high, so that a transaction cannot reach a transaction receiver within a time lock set time, and the transaction fails. Therefore, in order for a transaction to successfully reach a transaction receiver within a specified time, the selection of a channel where a node with a higher reputation value is located should be considered in the transaction path selection. The present embodiment considers that the reputation value of a node relates to the number of times a node engages in a transaction to make a correct/malicious action. Wherein the correct/malicious behaviour with respect to defining a node is as follows:
proper behavior refers to the transfer of transaction amounts and the transfer of secrets within a specified time lock.
Malicious acts refer to the transfer of privately amounts and undelivered secrets of amounts that fail to transact within a prescribed time lock range, as well as providing counterfeit secret transfers.
The node reputation is calculated as follows:
Figure SMS_139
; (7)
Figure SMS_140
; (8)
wherein ,
Figure SMS_142
representing the influence factor at t iterations, < ->
Figure SMS_147
Is the bonus coefficient when node i is doing the correct behaviour,
Figure SMS_149
is when node->
Figure SMS_144
Penalty factor when malicious behavior is made, +. >
Figure SMS_145
Representing node->
Figure SMS_150
Make correct behavior ++>
Figure SMS_152
Representing nodes
Figure SMS_141
Making malicious behavior->
Figure SMS_146
Representing node->
Figure SMS_148
Total number of participations in the transaction; />
Figure SMS_151
Representing node->
Figure SMS_143
Reputation value at the t-th iteration.
Figure SMS_153
Is a sigmoid function with a value range of (0, 1), wherein I t Is an influencing factor, the penalty of malicious behavior is larger than the reward of correct behavior, so the general penalty coefficient is +.>
Figure SMS_154
Is more than rewarding->
Figure SMS_155
Much larger. In the case of initial state, I t Influence factor 0, reputation value R t 0.5.
Third, setting a distance length parameter:
considering the distance length problem, which is equivalent to the transaction time problem, each node transaction processing time has a tolerance time tau specified by a time lock i In the present embodiment, the minimum number of hops is considered, and the problem of comparing the processing time of each node is not considered. When constructing the weighted directed graph, a constant N E (0, 1) is added to the weight of each edge for quantifying the transmission and processing time of the payment channel.
The time to conduct transactions in the in-chain payment channel is largely considered the processing time through each node, ignoring the funds transfer time within the channel. Among the multiple alternative paths, the path with the least number of nodes is selected as much as possible under the condition of the same other conditions, namely, the shortest path is selected. And comprehensively considering node reputation, transaction procedure cost and distance length factors to construct a weighted directed graph.
The node credit and the transaction procedure cost are weight factors forming the edges, wherein the value of the node credit is a sigmoid function, and the value range is (0, 1).
Normalizing the transaction procedure cost by adopting max-min, wherein the following formula is adopted:
Figure SMS_156
; (9)
wherein ,
Figure SMS_157
indicate direction->
Figure SMS_158
The node pays +.>
Figure SMS_159
Procedure cost of node->
Figure SMS_160
Representing +.>
Figure SMS_161
L represents the number of nodes in a single candidate transaction path;
each edge e ij Weight w of (2) ij The formula is as follows:
Figure SMS_162
; (10)
wherein ,
Figure SMS_163
representing edge e in a single alternate transaction path ij Weight of->
Figure SMS_164
Representing node->
Figure SMS_165
Is a node reputation of (1); />
Figure SMS_166
And
Figure SMS_167
the value range is (0, 1) for the fixed parameter; />
Figure SMS_168
Representing the distance length constant.
And (3) giving weight to each edge, constructing a non-negative weighted directed graph, and finding out the shortest path by using dijkstra algorithm, namely the optimal path comprehensively considering node reputation, transaction procedure cost and distance length.
Furthermore, simulation experiment results show that the route payment scheme provided by the embodiment is compared with the shortest path algorithm and the minimum transaction cost selection path algorithm, and the transaction success rate is obviously improved. The transaction amount provided by the invention is split, and the balance of the channel is balanced, so that the transaction success rate is improved. The average message cost and transaction cost of the scheme in the route payment are less, so that the multi-factor route selection payment scheme provided by the invention can realize higher transaction success rate with lower route cost.
Specifically, the whole transaction process of the embodiment implements a route initialization method, a transaction amount splitting algorithm, a payment routing algorithm and a receiving algorithm of a receiving party. The specific algorithm steps are as follows:
route initialization algorithm: the algorithm describes that when a payment request is initiated, a weighted directed graph is constructed for that particular payment request. Nodes traverse graph G (V, E), building weights for edges. Table T E (i, j) is a storage edge e ij Is a weight value of (a). If v i =v j T is then E (i, j) =0, if v i And v j Without a channel between them, give T E (i, j) infinite value. If v is present i And v j In the channel between v i Balance b of channel segment ij <a+Fp (i+1, L), if the feasibility constraint of the transaction is not satisfied, the edge is given a weight T E (i, j) ≡, and the rest of the cases calculate w (i, j) according to the formula (10) and assign to T E (i, j) a transaction weight table. When the nodes traverse all the nodes of the graph G, the cycle is finished, and T is output E (i, j). After the route initialization is completed, the whole graph is traversed by using a Breadth First algorithm (BFS) algorithm to find v s -v t Path set P between R (s,t)。
Transaction amount splitting algorithm: before forwarding the routing transaction, it should be determined whether there is a funds transfer in which the balance of the channel in one path satisfies the transaction requirements. If no such path exists, the transaction amount splitting is performed to perform transaction forwarding. Find about v s -v t And sorting the channel paths existing between the two paths according to the transferable funds from large to small, adding all the funds capable of being transferred, judging whether the funds required by the tradable transaction are reached, and returning null if the funds required by the tradable transaction are not reached, so that the tradable transaction is failed. If the funds required by the transaction are met, splitting the transaction from the path with the largest funds which can be transferred, thereby reducing the splitting transaction times as much as possible and initializing the route again. And (5) until the split amount meets the funds of the transaction, ending the circulation and returning to the split transaction set.
Payment routing algorithm: the algorithm is to find out the optimal path for forwarding transaction. First, P needs to be judged R If (S, T) is not null, defining s=Φ, Q as the set V of all vertices of the graph G, and if q+.Φ, performing a loop from T E From the starting point v in (s, t) s To v t The intermediate node with the smallest weight is selected, the node is removed from the node set Q, and the node is added to the set S. Pi is P R One path of S-t in (S, t), pi is the optimal path if all nodes in set S ⊇ pi. The transaction request R selects the path for transaction.
The receiving algorithm of the receiving party: when the receiving party receives the fund transfer, whether the transaction timeliness constraint is met or not is verified, if the receiving time is larger than the expiration time specified by the transaction, the receiving party is authorized to refuse to receive the transaction, then the intermediate node participating in the transaction releases the fund, and the fund generated by the transaction is transferred back to the original owner. If the timeliness constraint is satisfied, the recipient receives the transaction and sends a secret original to its last node v t-1
In the embodiment, based on the under-chain payment channel, PCN route optimization is performed, a multi-factor-based route selection payment scheme is provided, and the transaction procedure cost, node reputation and distance length factors are comprehensively considered for route selection. Considering the problem of unbalanced channel, the balance at two ends of the channel is seriously unbalanced, so that the channel congestion is easy to occur. The method and the device have the advantages that transaction procedure fees are charged according to the difference value of the two ends of the balance of the channel, and one end path with the balance of the channel is prioritized when a route is selected, so that the condition of channel congestion in a payment channel network is reduced. In order to improve the success rate of the transaction, when the balance in the payment channel cannot support the amount of the payment transaction, the transaction amount is split in a greedy manner, and the transaction amount is split in sequence according to the balance channel path which can be maximally transacted, so that the splitting times of the transaction amount are reduced. Simulation experiment results show that the scheme provided by the invention can realize higher transaction success rate with lower routing cost.
In summary, according to the blockchain-based carbon transaction payment channel routing method and device, the optimization of the payment channel network routing is performed based on the under-chain payment channel, the attribute parameters of procedure cost, channel balance and tolerance time are added to each side by constructing a directed acyclic graph on the payment channel network, timeliness constraint, feasibility constraint and timeliness constraint are established, and the payment request is combined to find the eligible transaction paths to be selected. In each transaction path to be selected, node transaction procedure fees are set according to the balance of the two ends of each payment channel in proportion, the node credit is calculated by counting the correct behavior and the malicious behavior of each node, a distance length constant is added to each node, the weight of the corresponding side of each payment channel is calculated by combining the transaction procedure fees, the node credit and the distance length constant of each node, and finally the optimal transaction path is searched according to the weight of each side.
Further, transaction procedure fees of each node are configured according to balances of nodes at two ends of each payment channel, so that balance of the two ends of each payment channel is guaranteed, and channel congestion caused by insufficient balances of the nodes in a transaction process can be effectively prevented.
The embodiments of the present invention also provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the edge computing server deployment method described above. The computer readable storage medium may be a tangible storage medium such as Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, floppy disks, hard disk, a removable memory disk, a CD-ROM, or any other form of storage medium known in the art.
Those of ordinary skill in the art will appreciate that the various illustrative components, systems, and methods described in connection with the embodiments disclosed herein can be implemented as hardware, software, or a combination of both. The particular implementation is hardware or software dependent on the specific application of the solution and the design constraints. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention. When implemented in hardware, it may be, for example, an electronic circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, a plug-in, a function card, or the like. When implemented in software, the elements of the invention are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine readable medium or transmitted over transmission media or communication links by a data signal carried in a carrier wave.
It should be understood that the invention is not limited to the particular arrangements and instrumentality described above and shown in the drawings. For the sake of brevity, a detailed description of known methods is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method processes of the present invention are not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between steps, after appreciating the spirit of the present invention.
In this disclosure, features that are described and/or illustrated with respect to one embodiment may be used in the same way or in a similar way in one or more other embodiments and/or in combination with or instead of the features of the other embodiments.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, and various modifications and variations can be made to the embodiments of the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A blockchain-based carbon transaction payment channel routing method, the method comprising the steps of:
establishing a directed acyclic graph according to the topological structure of a payment channel network, wherein each node in the directed acyclic graph represents each payment node in the payment channel network, and edges among nodes in the directed acyclic graph represent payment channels among each payment node;
marking transaction procedure fees paid by a first end to a second end, channel balance of the first end, transaction procedure fees paid by the second end to the first end, channel balance of the second end, total balance of channels and tolerance time on each side of the directed acyclic graph;
obtaining a payment request, wherein the payment request comprises a payment initiator, a payment receiver, a transaction amount, a transaction initiation time and a transaction deadline;
establishing timeliness constraint, feasibility constraint and timeliness constraint, wherein on each transaction path, the timeliness constraint requires each payment channel to complete forwarding within corresponding tolerance time, the feasibility constraint requires the total balance of the channels of each payment channel to be more than or equal to the sum of payment amount and all transaction procedure fees after a current node, and the timeliness constraint requires each transaction path to add transaction transfer time to the transaction starting time and not exceed the transaction deadline;
Obtaining a eligible transaction path to be selected in the directed acyclic graph according to the payment request, the timeliness constraint, the feasibility constraint and the timeliness constraint; when no transaction path meeting the transaction amount exists, splitting the transaction amount into a plurality of transaction paths and screening corresponding transaction paths to be selected respectively;
calculating procedure cost and current credit value corresponding to each node in each transaction path to be selected according to each single transaction amount, obtaining distance length constant corresponding to each node in each transaction path to be selected, calculating weight of corresponding sides of each payment channel in each transaction path to be selected according to the procedure cost corresponding to each node, the current credit value and the distance length constant, constructing a non-negative weighted directed graph, and searching each transaction path to be selected by adopting a preset algorithm to obtain an optimal transaction path;
the procedure fee is collected by combining the proportion of the channel balance of the first end and the channel balance of the second end of the payment channel where each node is located, and the current credit value of each node is calculated according to the correct behavior quantity and the malicious behavior quantity.
2. The blockchain-based carbon transaction payment channel routing method of claim 1, wherein the tolerance time is set using a hash time lock tolerance time.
3. The blockchain-based carbon transaction payment channel routing method of claim 1, wherein the expression of the timeliness constraint is:
Figure QLYQS_1
wherein ,
Figure QLYQS_2
representing the tolerance time for node i to wait for node i+1 to provide the key, +.>
Figure QLYQS_3
A distance unit hop count value representing the distance from the receiver node L at node i;
the expression of the feasibility constraint is:
Figure QLYQS_4
wherein ,
Figure QLYQS_5
representing the maximum transaction amount that node i can transfer to node j, a representing the transaction amount,/->
Figure QLYQS_6
Representing the sum of transaction procedure fees of the current node and all nodes after the current node on the transaction path;
the expression of the timeliness constraint is:
Figure QLYQS_7
;/>
wherein ,
Figure QLYQS_8
representing the transaction start time,/->
Figure QLYQS_9
Representing the transaction time required for payment channel e, +.>
Figure QLYQS_10
Representing the transaction deadline.
4. The blockchain-based carbon transaction payment channel routing method of claim 1, wherein the calculation formula of the procedure cost corresponding to each node in each transaction path to be selected is:
Figure QLYQS_11
wherein ,
Figure QLYQS_14
indicate direction->
Figure QLYQS_18
The node pays +.>
Figure QLYQS_22
Procedure cost of node->
Figure QLYQS_15
Representing the node to which the payment initiator corresponds, +.>
Figure QLYQS_19
Representation->
Figure QLYQS_23
Node direction->
Figure QLYQS_25
Payment amount of node->
Figure QLYQS_12
A proportionality parameter indicating the charge of a procedure according to said payment amount,/or- >
Figure QLYQS_16
Representation->
Figure QLYQS_20
Channel balance of node->
Figure QLYQS_24
Representation->
Figure QLYQS_13
Channel balance of node->
Figure QLYQS_17
Is a proportion parameter of procedure charge collected according to balance difference values at two ends of the channel; />
Figure QLYQS_21
Representing a fixed portion of the procedure cost.
5. The blockchain-based carbon transaction payment channel routing method of claim 4, wherein the node reputation is calculated as:
Figure QLYQS_26
Figure QLYQS_27
wherein ,
Figure QLYQS_30
representing the influence factor at t iterations, < ->
Figure QLYQS_34
Is the rewarding factor when node i makes the right behaviour,/->
Figure QLYQS_37
Is when node->
Figure QLYQS_29
Penalty factor when malicious behavior is made, +.>
Figure QLYQS_33
Representing node->
Figure QLYQS_36
Make correct behavior ++>
Figure QLYQS_39
Representing node->
Figure QLYQS_28
Making malicious behavior->
Figure QLYQS_32
Representing node->
Figure QLYQS_35
Total number of participations in the transaction; />
Figure QLYQS_38
Representing node->
Figure QLYQS_31
Reputation value at the t-th iteration.
6. The blockchain-based carbon transaction payment channel routing method of claim 5, wherein the distance length constant value range is (0, 1) and is proportional to the transaction duration of each node in the corresponding payment channel.
7. The blockchain-based carbon transaction payment channel routing method of claim 6, wherein calculating the weight of the corresponding edge of each payment channel in each candidate transaction path according to the corresponding procedure cost of each node, the current reputation value and the distance length constant comprises:
The procedure cost of each node in a single transaction path to be selected is normalized, and the calculation formula is as follows:
Figure QLYQS_40
wherein ,
Figure QLYQS_41
indicate direction->
Figure QLYQS_42
The node pays +.>
Figure QLYQS_43
Procedure cost of node->
Figure QLYQS_44
Representing +.>
Figure QLYQS_45
L represents the number of nodes in a single candidate transaction path;
Figure QLYQS_46
wherein ,
Figure QLYQS_47
representing edge e in a single alternate transaction path ij Weight of->
Figure QLYQS_48
Representing node->
Figure QLYQS_49
Is a node reputation of (1); />
Figure QLYQS_50
and />
Figure QLYQS_51
The value range is (0, 1) for the fixed parameter; />
Figure QLYQS_52
Representing the distance length constant.
8. The blockchain-based carbon transaction payment channel routing method of claim 1, wherein the predetermined algorithm is a disco tesla algorithm.
9. A blockchain-based carbon transaction payment channel routing device comprising a processor and a memory, wherein the memory has stored therein computer instructions for executing the computer instructions stored in the memory, which when executed by the processor, implement the steps of the method of any of claims 1 to 8.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the steps of the method according to any one of claims 1 to 8.
CN202310385995.7A 2023-04-12 2023-04-12 Block chain-based carbon transaction payment channel routing method and device Active CN116109416B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310385995.7A CN116109416B (en) 2023-04-12 2023-04-12 Block chain-based carbon transaction payment channel routing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310385995.7A CN116109416B (en) 2023-04-12 2023-04-12 Block chain-based carbon transaction payment channel routing method and device

Publications (2)

Publication Number Publication Date
CN116109416A true CN116109416A (en) 2023-05-12
CN116109416B CN116109416B (en) 2023-07-04

Family

ID=86265884

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310385995.7A Active CN116109416B (en) 2023-04-12 2023-04-12 Block chain-based carbon transaction payment channel routing method and device

Country Status (1)

Country Link
CN (1) CN116109416B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210304195A1 (en) * 2020-03-27 2021-09-30 Wuhan University Method for blockchain payment channel network multi-path routing based on genetic algorithm
CN114547695A (en) * 2022-03-04 2022-05-27 昆明理工大学 Block chain transaction privacy protection method based on homomorphic encryption in Internet of things
CN114581070A (en) * 2022-03-10 2022-06-03 南京大学 Block chain payment channel network path selection method and system based on homomorphic encryption
CN114677218A (en) * 2022-03-16 2022-06-28 南京邮电大学 Off-link transaction method based on payment knot
CN115361395A (en) * 2022-07-14 2022-11-18 北京理工大学 Internet of things data sharing method based on block chain payment channel network
CN115587812A (en) * 2021-12-29 2023-01-10 昆明理工大学 Internet of things data transaction method based on paid channel network

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210304195A1 (en) * 2020-03-27 2021-09-30 Wuhan University Method for blockchain payment channel network multi-path routing based on genetic algorithm
CN115587812A (en) * 2021-12-29 2023-01-10 昆明理工大学 Internet of things data transaction method based on paid channel network
CN114547695A (en) * 2022-03-04 2022-05-27 昆明理工大学 Block chain transaction privacy protection method based on homomorphic encryption in Internet of things
CN114581070A (en) * 2022-03-10 2022-06-03 南京大学 Block chain payment channel network path selection method and system based on homomorphic encryption
CN114677218A (en) * 2022-03-16 2022-06-28 南京邮电大学 Off-link transaction method based on payment knot
CN115361395A (en) * 2022-07-14 2022-11-18 北京理工大学 Internet of things data sharing method based on block chain payment channel network

Also Published As

Publication number Publication date
CN116109416B (en) 2023-07-04

Similar Documents

Publication Publication Date Title
US11301602B2 (en) Simulation-based testing of blockchain and other distributed ledger systems
Guan et al. Cumulative prospect theory based dynamic pricing for shared mobility on demand services
Chai et al. Proof-of-reputation based-consortium blockchain for trust resource sharing in internet of vehicles
Anderegg et al. Ad hoc-VCG: a truthful and cost-efficient routing protocol for mobile ad hoc networks with selfish agents
Di Stasi et al. Routing payments on the lightning network
CN112202928A (en) Credible unloading cooperative node selection system and method for sensing edge cloud block chain network
CN111460504B (en) Service processing method, device, node equipment and storage medium
CN111130790B (en) Block co-recognition method based on block chain node network
Shi et al. Mpcstoken: Smart contract enabled fault-tolerant incentivisation for mobile p2p crowd services
US11593898B2 (en) Method for processing data and apparatuses for implementing the same
CN110097218B (en) Unmanned commodity distribution method and system in time-varying environment
CN110751469A (en) Encrypted currency multichannel payment method based on intelligent contract
CN110851531A (en) Cooperative edge computing method, block chain and cooperative edge computing system
CN114978908A (en) Computing power network node evaluation and operation method and device
CN116109416B (en) Block chain-based carbon transaction payment channel routing method and device
Nazih et al. An evolutionary bargaining‐based approach for incentivized cooperation in opportunistic networks
Ryu et al. PayGo: Incentive-comparable payment routing based on contract theory
Lu et al. General congestion attack on HTLC-based payment channel networks
CN103824195A (en) Excitation method based on three-round bargaining in opportunity network
CN114173301B (en) Safe and efficient data sharing method for Internet of vehicles based on DAG block chain
CN116366669A (en) Consensus method based on reputation value weight balance suitable for crowdsourcing system
Bai et al. Understanding the benefit of being patient in payment channel networks
CN113852933B (en) Relay node selection method, device and equipment of Internet of vehicles network and storage medium
CN114677218A (en) Off-link transaction method based on payment knot
WO2021011893A1 (en) Relay system for blockchain

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant