CN116797364A - Edge calculation cross-chain computing force transaction method based on predictors - Google Patents

Edge calculation cross-chain computing force transaction method based on predictors Download PDF

Info

Publication number
CN116797364A
CN116797364A CN202310635360.8A CN202310635360A CN116797364A CN 116797364 A CN116797364 A CN 116797364A CN 202310635360 A CN202310635360 A CN 202310635360A CN 116797364 A CN116797364 A CN 116797364A
Authority
CN
China
Prior art keywords
chain
node
computing
edge node
transaction
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.)
Pending
Application number
CN202310635360.8A
Other languages
Chinese (zh)
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.)
Beijing University of Technology
Original Assignee
Beijing University of Technology
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 Beijing University of Technology filed Critical Beijing University of Technology
Priority to CN202310635360.8A priority Critical patent/CN116797364A/en
Publication of CN116797364A publication Critical patent/CN116797364A/en
Pending legal-status Critical Current

Links

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
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Computer Security & Cryptography (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Marketing (AREA)
  • Development Economics (AREA)
  • Technology Law (AREA)
  • Computing Systems (AREA)
  • Strategic Management (AREA)
  • Data Mining & Analysis (AREA)
  • Economics (AREA)
  • General Business, Economics & Management (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention provides a margin calculation cross-chain computing force transaction method based on a predictor. Edge computing brings computing resources to the network edge, meeting the need for efficient computing power for many emerging applications. The coalition chain enables trusted computing power transactions between untrusted transactants. Most of the existing studies ignore the computational effort transactions between blockchains, which greatly reduces the utilization of computational effort. The invention designs a cross-chain computing power transaction framework based on a predictor. The propulsor acts as an intermediary to the connecting blockchain to ensure a trusted cross-chain transaction. The invention provides a prophetic-machine-based computing power transaction mechanism, which realizes trusted on-chain and cross-chain computing power transactions. The invention comprehensively represents profit, time delay and energy consumption of traders through utility functions, and establishes double-layer Stackelberg game so as to realize fair utility balance of the buyer and the seller. The invention demonstrates the existence of Nash equilibrium and utilizes differential evolutionary algorithm to obtain the optimal solution.

Description

Edge calculation cross-chain computing force transaction method based on predictors
Technical Field
The invention mainly relates to the fields of computational power transaction, alliance chain and edge calculation, namely, the problem of computing resource transaction in an edge calculation scene is solved by utilizing the cross-chain technology of the alliance chain and the predictor.
Background
There have been some efforts to implement trusted computing power transactions using federation chains. In order to efficiently and safely manage computing resources, [1] proposes a virtual computing resource transaction scheme among slices based on a alliance chain, and the optimal demand and pricing strategy of unused virtual machine resources are obtained by utilizing a two-stage Stackelberg game. [2] A peer-to-peer computing resource transaction system oriented to the Internet of vehicles is provided. The alliance blockchain is utilized to protect the safety of the computing resource transaction, and the intelligent vehicle is stimulated to participate in the resource transaction by constructing a two-stage Stackelberg game. [3] Work provides an unmanned aerial vehicle auxiliary industrial Internet of things intelligent resource transaction framework integrating multi-agent deep reinforcement learning, alliance blockchain and game theory, so that transaction performance is improved. Work [4] proposes a hybrid blockchain-based resource trading platform, using edge nodes as consensus nodes in the federated blockchain, and the public chain as a payment scheme. Document [5] [6] uses a federated chain authorization framework to effect resource transactions and proposes a reputation-based consensus mechanism to improve efficiency. However, these works focus on the performance optimization of transactions, do not consider the actual situation, and only implement the computational power transactions inside one blockchain, and do not consider the resource transactions among multiple alliance chains.
Disclosure of Invention
The technical problems to be solved are as follows:
1) How to ensure trusted computing power transactions between blockchains. Blockchains are a safe and reliable independent entity and the method of verifying the correctness of a transaction is to check if the previous transaction referenced by the transaction matches the transaction recorded on the block. However, one chain has no way to verify transactions from another chain.
2) How to achieve a fair balance of utility between the buyer and the seller. Utility includes profit, time delay, and energy consumption, as these three metrics are important to computing power traders. In particular, edge nodes, which are power vendors, are monopolys, they are selfish, focusing only on maximizing their utility. This is unfair to the purchasing power of the user. Therefore, a fair trading framework is urgently needed to break autonomy and monopoly and achieve utility balance between buyers and sellers.
The invention designs a cross-chain computing power transaction framework based on a predictor. The propulsor acts as an intermediary to the connecting blockchain to ensure a trusted cross-chain transaction. On the basis, a prophetic machine-based computational power transaction mechanism is provided to realize trusted on-chain and cross-chain transactions. Meanwhile, a double-layer Stackelberg game is formulated so as to realize fair utility balance of both intra-chain and inter-chain computing resource trading buyers and sellers.
Compared with the prior art, the scheme provided by the invention ensures the safety and reliability of intra-chain and inter-chain computational power transactions, comprehensively represents the profit, time delay and energy consumption of traders through the utility function, establishes a double-layer Stackelberg game, realizes the fairness and utility balance of the intra-chain and inter-chain buyers and sellers, and ensures the fairness and benefit balance of the trading parties. The problem of insufficient computing power resources of edge nodes when the requirements in the chain are increased is solved, the system cost is reduced, and the resource utilization rate is greatly improved.
Drawings
FIG. 1 is a cross-chain computing power transaction framework according to the present invention
FIG. 2 double layer Stackelberg gaming process
Detailed Description
1. The cross-chain computing power transaction framework provided by the invention consists of a alliance chain, a prophetic machine and mobile equipment, as shown in fig. 1. A federated blockchain consists of all participating edge nodes within an area.
Mobile device-is a purchaser of the computing power. They send a demand for a power purchase to the edge nodes that cover them, and the power sales information (e.g., available power resources and unit prices) for all edge nodes is received by the edge nodes. Finally, the mobile device purchases computing resources from the edge node based on its own budget and QoS requirements.
Edge Nodes (Edge Nodes, ENs) that have rich computing resources. Edge nodes have two roles in the course of a power transaction. The first role is a power seller. The edge node sells the computing resources to the mobile device as a computing owner. The second role is to proxy mobile devices within its coverage area. The number of nodes and the power transactions on the blockchain is reduced by the mobile device sending power purchase information and receiving power sales information. When localized edge nodes in an area are unable to meet the computational power demands of a mobile device in its coverage area, they act as agents to purchase computational power from edge nodes in other areas.
Nodes affiliated with any federated blockchain are defined herein as on-chain nodes, with the remaining nodes being defined as off-chain nodes. The predictor is used as a bridge for connecting the blockchain and consists of a collecting node, a Proxy Node (PN), a verification node and a monitoring node, wherein the collecting node, the Proxy Node (PN), the verification node and the monitoring node are respectively selected from the Nodes on the chain and the Nodes below the chain, and the predictor is specifically as follows:
collecting node, collecting the cross-link contracts sent by edge nodes to check if the contracts are standard. The collection nodes are randomly selected from the nodes on the chain.
Proxy Nodes (PN) communicate with other blockchains on behalf of the blockchain to obtain global computing resource information. Meanwhile, the cross-chain computing power purchasing requirement is matched with edge nodes of the non-computing power resources in other blockchains, and buyers are informed. The PN is selected from the collection nodes and there is only one PN on the blockchain. The selection method is described in section 2.
Verification node-verification of the validity of the transaction. The verifier selects from the nodes under the chain and expresses the intention of the verifier by freezing a deposit of a certain amount. The selection method is described in section 3.2.3.
The monitoring node verifies the identity of the edge node and prevents malicious nodes from interfering with the power calculation transaction. The monitor is selected from the authentication node candidates that are not selected as authentication nodes.
2. Reputation-based Proxy Node (PN) selection
PN aggregates and matches cross-chain computing power purchase requests with available computing power resources from other blockchains. Thus, it plays an important role in the cross-chain computing process. In order to avoid that malicious collection nodes are selected as pseudo-random networks, a reputation-based pseudo-random network selection method is provided. First, each consensus node in the blockchain uses equation (1) as collection node c i Computing individualsA reputation value;
wherein ,c is i Number of transactions participated in and recorded on blockchain, < >>The benefit of the j transaction recorded; t is t b Representing the duration of generating a block, +.>Representation c i Number of unrecorded transactions involved,/->Representation c i Loss of participating jth unrecorded transaction.
Then randomly selecting one consensus node, and collecting r from all the consensus nodes i And calculates the average value as c i Reputation value of (c); and finally, selecting the collector with the highest reputation as PN. The above method is performed at regular time intervals to avoid selecting disguised malicious collection nodes.
3. Mechanism for trading power
The mechanism of the power transaction consists of two parts, namely an on-chain transaction and a cross-chain transaction.
3.1 on-chain transactions
Mobile equipment E i Send its computing resource requirements to the on-chain ENS that covers it j 。S j Responsible E i Is a legal identity verification of (a). Then S j As E i The agent of (a) invokes an On-chain purchase contract (On-chain Purchase Contract, OPC) and broadcasts the contract to other ENs in the same blockchain so that any EN On the blockchain can get E i Is not limited to the above-mentioned requirements. Upon receipt of a purchase contract, on the blockchainFirst verifying the identity of the calling contract node and then satisfying E by i The ENs of the demand invoke On-chain sales contracts (On-chain Selling Contract, OSC) to issue a calculation unit price and unicast to S j . Finally S j Transmitting the aggregated seller information to E i . Since the mobile device receives information only from other ENs on the chain that have verified legal identity, information from the seller can only be obtained through the on-chain ENs that covers it. OPC and OSC are pre-deployed, the contents of which are as follows:
On-chain purchase contract (OPC): provides a call interface (F, F) min ,F max ) For recording the computational power requirements of a mobile device within its coverage area. F is the computational power demand of a variety of mobile devices. F (F) min and Fmax Representing the maximum and minimum allowable force demands, respectively.
On-chain sales contracts (OSC): providing calling interfaces (P, P) for ENs min ,P max ) To record the unit price of its available computational resources. P is the unit price of the mobile device. P (P) min and Pmax Representing the highest and lowest unit price allowed, respectively.
Through the above-described interactive process, the Seller (ENs) and the buyer (mobile device) get the needs of each other. Both parties agree on the price of the resources and the purchase price, and specific game models and calculation methods are described later. Then, ENs initiates the transaction and broadcasts the transaction within the blockchain to agree on. Finally, the verified power transaction is recorded on the block and the transaction is performed. The Practical Bayesian Fault Tolerance (PBFT) 7 is used herein directly as the on-chain consensus protocol. PBFT is not an important aspect of the invention and therefore the invention does not describe the method in detail.
3.2 Cross-chain transactions
The cross-link transaction proposed by the present invention includes four phases, cross-link contract invocation, transaction creation, validation and execution phases, each of which is described in detail below.
3.2.1 Cross-Link contract invocation phase
An EN acts as a bridge between the mobile devices it covers and other EN bodies on the chain, delivering computing power purchase and sales information, enabling fast acquisition of the computing resource requirements of these mobile devices. When the computational power resources of the blockchain in which the agent is located cannot meet the needs of the mobile device that it covers, the agent invokes a Cross-chain purchase contract (Cross-chainPurchase Contract, CPC). In addition, ENs with available computing resources invoke free resource contracts (Idle Resource Contract, IRC) to issue sales information for computing resources. These contracts are multicast to the same collection node blockchain. CRC and IRC are pre-deployed, the contents of which are as follows:
Cross-Chain Purchase Contracts (CPC) providing a call interface (F, F) min ,F max ) For ENs to record the power demand. F is the actual demand. F (F) min and Fmax Representing maximum and minimum allowable calculation force requirements, respectively.
Free resource contracts (IRC) providing calling interfaces (F, P) min ,P max ) For ENs to record available computing power resource information. F is the available computational resource and P is the unit price of the mobile device. P (P) min and Pmax Representing the highest and lowest unit price allowed, respectively.
3.2.2 transaction creation phase
When the collection node receives the contract (such as CPC and IRC), the collection node firstly detects whether the contract is standard or not, and then sends the node identity of the calling contract to the nm monitoring node selected randomly for verification. If more than 2/3 of the monitoring nodes verify that the identity is legitimate, the collection node will continue to process the contract, otherwise the contract will be deleted. The authentication process is such that the selected monitoring node invokes the internal function CHECKIDENT (iden) to authenticate the identity of the node. Iden is a parameter representing the identity of a node. The identity verification process adopts Schnorr [8], which is an identity verification method utilizing discrete logarithm knowledge verification. Schnorr is not an important point of the present invention and therefore the present invention does not describe the process in detail. After validating the CPC, the collection node inserts it into an ordered queue according to the priority of the EN invoking the contract. If two ENs have the same priority, they are ordered by their initialization time. The collection node inserts the validated IRCs into another queue according to the order of arrival. All collection nodes in the blockchain send CPC and IRC queues to the PN on behalf of the blockchain at fixed time intervals to participate in cross-chain computing transactions. The fixed time interval is defined by reality. The PN in the predictor interacts with other PN to obtain globally available computational resources. The PN will then tell the buyers in the same blockchain which sellers have sufficient resources to meet the demand and sales price, and which buyers want to purchase the resources and demand. These buyers and sellers then game each other in order to maximize their own utility, as well as specific calculation methods, see below. Finally, the buyer and seller reach a transaction, and the buyer initiates the transaction.
3.2.3 transaction verification stage
The transaction requires verification by a verification committee prior to recording to the blockchain. The validation committee is selected from the under-chain nodes that are willing to become a committee member by freezing a certain amount of funds in the account as a deposit. Ordering the nodes under the chain according to deposit, selecting n v The top-ranked nodes. Each member of the validation committee validates the transaction and randomly transmits the validation results to one member for aggregation. If the committee exceeding 2/3 confirms that the transaction is valid, otherwise, the transaction is invalid. When the validation result is opposite to the final result, the validator will be penalized according to equation (2). For dishonest validators with very large account balances, the present invention adds an additional penalty at each fixed interval according to equation (3) to reduce the probability that they become committee members. At the same time, the honest verifier gets a certain amount of rewards according to the received punishment. Through the above-described rewarding and punishing approach, more nodes under the chain are encouraged to participate in the validation committee.
m i =m i -d (2)
wherein mi For verifier v i Money on account, d is v i Deposit of ir i For v in a fixed interval time i The number of invalid validation results, pr i Is a fixed roomV in the interval i Total number of transactions involved in verification.
3.2.4 transaction execution phase
During execution of the transaction, the buyer initiating the transaction obtains compensation when the seller ceases to provide the computational power resources. The accumulated compensation is the priority of the next lease of the buyer, where c is the compensation.
r p =r p +c (4)
Stackelberg game model and optimal transaction strategy
4.1 description of the problem
The invention mainly has two computing resource transaction scenes: 1) Computing resources of the in-chain edge nodes may meet the requirements of the user equipment within their coverage area; 2) The computing resources of the edge nodes in the chain cannot meet the requirements of the user equipment in the area where the edge nodes in the chain are located, for example, the requirements of the computing resources are rapidly increased in a short time when the science and technology park is in activities such as twenty-one, crazy thursday or game welfare, and the situation of the rapid increase of the requirements can be dealt with by purchasing computing resources outside the chain if only the increase of the service capacity of the edge nodes in the chain is considered to result in higher cost.
However, there is gaming between the edge nodes in the chain and the mobile device users, who want better service and cheaper prices, while the edge nodes want higher revenues; in addition, there is gaming between chains and edge nodes of the chains, with the edge nodes in one chain requiring more resources being buyers and the edge nodes in the other chain for which resources can be provided being sellers, the sellers want to sell resources at a higher price and the buyers want to buy at a lower price.
Therefore, the two-layer game problem needs to be solved by the transaction of the computing power resource, namely 1) the user terminal equipment and which edge node in the chain conduct the transaction of the computing power resource, and the user terminal equipment and the edge node in the chain can obtain the maximum benefit respectively; 2) The edge nodes within the chain conduct computing resource transactions with which edge nodes outside the chain and each can obtain the greatest benefit. The invention provides a cross-chain computing resource transaction method based on double-layer Stackelberg game, wherein an outer edge node, an inner edge node and mobile equipment of a chain are used as game participants and are defined as rational independent individuals.
The proposed double-layer Stackelberg gaming flow is illustrated in FIG. 2, and is described in detail below:
the process of the layer 1 Stackelberg game is shown on the right side of fig. 2, firstly, the computing power resource purchasing demand of the user equipment is sent to each edge node in the chain, at this time, each edge node simulates computing power distribution, and if receiving a purchasing request of a certain user, the computing power total amount, quotation, computing time delay, energy consumption and other information can be provided for the user. The edge node sends this speculative information to the requesting user as the leader of the Stackelberg game. The user has resource competition as a follower of the Stackelberg game, and the user can select proper calculation power purchase quantity according to the benefit maximization principle.
The flow of the layer 2 Stackelberg game is shown on the left side of FIG. 2. Firstly, the intra-chain edge node and the outer-chain edge node respectively send the computational power resource purchasing requirements and available computational power information to the prophetic machine, and meanwhile, the intra-chain edge node and the outer-chain edge node can acquire the required computational power buying and selling information through the prophetic machine. And then, the outer edge node of the chain serves as a leader in the Stackelberg game, and according to the information acquired from the predictor and the resource information of the outer edge node, the required computing resource and the corresponding quotation are given to the inner edge node of the chain, wherein competition exists among the edge nodes in the chain. In addition, it is considered that the outer edge node may still sell resources to nodes on its chain if not selling resources to the inner edge node, and therefore, the outer edge node may provide computational resources to the inner edge node according to its own benefit maximization principle.
4.2 modeling
4.2.1 layer 1 in-chain Stackelberg gaming
Layer 1 Stackelberg gaming is a game between an edge node and a user device within a chain. Although this is a transaction scenario between a multi-edge node and a multi-user device, the present invention can abstract it as a game between one resource-limited edge node and multiple users for the following reasons: each edge node in the chain can carry out one-to-many games with the user and give quotations, and finally, the user equipment can select one edge node capable of maximizing profit of the user according to all game results to carry out transactions. The constructed intra-chain Stackelberg game is a two-stage full information dynamic game. The first stage: the edge node is used as a leader to make pricing first; and a second stage: the user decides his own amount of computing resource transactions as a follower based on the pricing of the edge node.
The set of user equipments is denoted as e= { E 1 ,E 2 ...,E i ,...,E N}, wherein Ei Indicating the ith user equipment and N indicating the number of user equipments. Each user device needs to determine its own computing resource requirements, and the set of computing power purchase requirements determined by the user device is denoted as f= { F 1 ,F 2 ,...,F i ,...,F N}, wherein Fi Representing the computational resource requirements of the ith user equipment, F i ∈[F min ,F max]. wherein ,Fmin and Fmax The minimum and maximum computing resources that the user is permitted to request, respectively. The edge node needs to price each user, and the invention represents the pricing set of the edge node as P= { P 1 ,p 2 ,...,p i ,...,p N}, wherein pi Pricing, p, indicated to the ith user i ∈[p min ,p max], wherein pmin and pmax The minimum and maximum prices for the restrictions of the unit computation resources, respectively. To construct a Stackelberg game, the edge nodes and the user's utility functions are constructed separately.
1) Edge node utility function
The edge node considers only the revenue of selling the computing resources as a seller, and therefore its utility function subtracts the cost of service for the user device to purchase the computing payment, as shown in equation (5):
where C is the cost of electricity per computational unit, this revenue incentive mechanism may motivate more in-chain edge nodes to participate in the computing resource trade.
2) Mobile device utility function
Mobile equipment E i In addition to the purchase cost, the time delay, the energy consumption and other factors required by the completion of the calculation task are considered in the process of calculating the resource transaction, so that the invention quantitatively evaluates the cost by using a satisfaction function, as shown in a formula (6):
wherein For user equipment E i The calculation task of (c) is done in the edge node in the chain for a saved time (formula 7),/and (c)>For user equipment E i Is done at the in-chain edge node (equation 8), α 1 and α2 Respectively represent user equipment E i The value weight of unit time and unit energy consumption is considered. The satisfaction function of the user device reflects that the more time and energy consumption the user saves through resource transactions, the more satisfied the user.
wherein ,representing computing tasks at user device E i Time spent executing; t is t i Representing the time it takes for the computational task to offload to the in-chain edge node to complete, comprising: sending data from user equipment to edgeThe transit time of the edge node, the computation time at the edge node, and the transit time required for the edge node to return the result. />Representing computing tasks at user device E i Electric energy spent on execution, e i Representing the power and transmission energy consumption required for the computational task to complete at the in-chain edge node.
The utility function of the mobile equipment is constructed by comprehensively considering the factors such as purchase cost, time delay, energy consumption and the like, and is shown in a formula (9):
wherein Ψi Representing user equipment E i Satisfaction function of (C) as shown in formula (6) b Profit/computation unit for computing tasks with edge nodes, u i (u i >0) Is a weight factor representing the user equipment E i Consider the importance of the cost of payment in the total profit, when 0<u i E is less than or equal to 1 i The cost of payment is considered to be less significant than the total profit; when u is i >1, E i The cost of payment is considered to be larger and more important in the total profit. R represents rewards, the more the proportion of the computing resource demands of the users is, the more the rewards are obtained, and when the users on the alliance chain conduct legal transaction, the rewards can be obtained, so that more users can be stimulated to participate in the legal resource transaction to a certain extent, and the size of the rewards is determined by the alliance chain system.
4.2.2 layer 2 inter-chain Stackelberg gaming
Layer 2 Stackelberg gaming occurs when computing resources of edge nodes on a chain cannot meet user resource requests of the covered area, and computing resource transactions are conducted with the edge nodes of other chains through a predictor. Which is a game between a plurality of on-chain edge nodes and a plurality of off-chain edge nodes. The invention abstracts this to a game between a resource-limited outer-link edge node and a multi-link inner-edge, for reasons similar to layer 1 in-link games, and will not be described in detail. The constructed Stackelberg game is a two-stage full information dynamic game. The first stage: the outer edge node of the chain is used as a leader to make pricing first; and a second stage: the edge node on the chain is used as a follower to decide the own computing resource transaction amount according to the pricing of the edge node on the chain.
The present invention defines the on-chain buyer edge nodes that need to purchase computing resources as wherein />Representing the jth buyer node on the kth chain, and M represents the number of buyer nodes that need to transact resources out of the chain. Each buyer node needs to determine its own computing resource requirements, and the set of computing power purchase requirements determined by the buyer node is denoted +.> wherein />Representing the computational resource requirements of the jth buyer node on the kth chain,/for> wherein ,/> and />The minimum and maximum computing resources that the node on the kth chain allows for the request, respectively. The link takeout node needs to offer each in-link buyer, the present invention represents the set of offers of the link takeout to the in-link buyers as +.> wherein />Representing the seller's offer for computing resources to the jth buyer on the kth chain,/> wherein /> and />The minimum and maximum prices for the unit computing resources are purchased for the kth chain, respectively. To construct the Stackelberg game, utility functions of the chain take-away edge node and the in-chain buyer edge node are respectively constructed.
1) Chain takeaway side edge node utility function
The chain takeaway edge node obviously does not sell its own computational resources to other on-chain edge nodes without limitation, as it would also benefit if it did not sell resources to other on-chain edge nodes, but instead sold to nodes on its chain. Clearly only when it is more advantageous to sell to other on-chain edge nodes. Thus, the utility function of an edge node outside the chain consists of mainly two parts, one part being the profit of selling computing resources to user devices on its chain and one part being the profit of selling computing resources to other edge nodes on the chain, as follows:
wherein ,UI Is a resource transaction utility function of a chain takeaway node on the chain where the node is located, and refers to a formula (5);a utility function representing the seller node performing a cross-chain power transaction with the kth chain, as shown in equation (11), comprising the cost of payment minus the service of the buyer node on the kth chainThe cost is high.
wherein Representing a bid by a seller node for a j-th buyer unit computing resource on a k-th chain; c is the electricity cost of unit calculation resources; />Representing the computational resource requirements of the jth buyer on the kth chain. Such revenue incentives mechanisms may encourage more edge nodes to be willing to participate in cross-chain computing resource transactions.
2) In-chain buyer edge node utility function
In the process of computing resource transaction, the in-chain edge node also needs to consider the factors such as time delay, energy consumption and the like required by the completion of computing tasks besides the purchase cost, and the utility function can be expressed as: the profit obtained by the realization business minus the cost paid by the purchase of off-chain computing resources, plus rewards obtained by participation in legal transactions, and finally minus the transmission cost across chains, as shown in formula (12):
wherein ,Cb Profit/calculation unit brought by the service requirement; y is j (y j >0) Is a weight factor representing the importance of the j-th buyer's edge node to the total profit of the cost of payment, when 0 <y i At less than or equal to 1, indicating that the j-th buyer edge node considers the payment cost to be less than the total profit, and less important; when y is i >1, the j-th buyer edge node considers the payment cost to be larger and more important in the total profit.Representing a computing resource offer from a seller node to a jth buyer node on a kth chain; />Representing a computing resource requirement of a jth buyer node on a kth chain; r is R c The rewards are represented, the more the proportion of the computing resource demands of the edge nodes are, the more the rewards are obtained, when the buyer nodes conduct legal transaction, the rewards can be obtained, and more edge nodes can be stimulated to participate in legal cross-chain resource transaction to a certain extent. />Is a buyer edge node S j Cross-chain transmission costs (including latency and energy consumption) as shown in equation (13):
wherein ,is S j Time it takes for computing tasks to cross-chain, +.>Is S j Is energy which is consumed in the process of crossing chains 1 and β2 Respectively represent S j The value weight of unit time and unit energy consumption.
4.3 Nash equilibrium analysis
The final objective of the Stackelberg game is to find a Nash equilibrium solution, i.e. the seller and the buyer adjust their own strategies in real time through the game process, so as to maximize the profits of both parties. In the computing resource trade of the present invention, nash equilibrium may be defined as follows:
Definition 1 p is set * Is the optimal price of the computing resource set by the seller in the first-layer game, F * Is the buyer's optimal computing resource service requirement, then (p * ,F * ) The conditions that the Nash equilibrium point needs to meet are as follows:
U I (p * ,F * )≥U I (p,F * ) (14)
and is also provided with
wherein UI (p * ,F * ) Is a vendor edge node utility function when set to an optimal price for computing resources and optimal computing resource service requirements;is the utility function of the buyer user device when set to the optimal price of computing resources and optimal computing resource service requirements.
For the seller edge node, when the computing resource price is set to p * The expected profit is higher than any other price. For the buyer user, when the computing resource service requirement is set to F * The expected profit is higher than any other computing resource demand.
Definition 2 setting h * Is the optimal price of the computing resource set by the seller in the second-layer game, G * Is the buyer's optimal computing resource service requirement, then (h * ,G * ) The conditions that the Nash equilibrium point needs to meet are as follows:
U T (h * ,G * )≥U T (h,G * ) (16)
and is also provided with
wherein UT (h * ,G * ) Is a vendor edge node utility function when set to an optimal price for computing resources and optimal computing resource service requirements;is a buyer edge node S when set to an optimal price for computing resources and optimal computing resource service requirements j Utility function of (3).
For the seller edge node, when the computing resource price is set to h * The expected profit is higher than any other price. For buyer edge nodes in the other chain, when the computing resource service requirement is set to G * The expected profit is higher than any other computing resource demand.
Nash equalization is the result of a game: the choices made by each participant are the best response to the choices made by the other participants. The present invention analyzes the existence of nash equilibrium points as follows.
4.3.1 Stackelberg gaming in first tier links
The invention adopts the reverse induction method to process the two-stage Stackelberg game.
1) Stage II: the user equipment optimally calculates the resource requirements.
User equipment E i The first (equation 18) and second derivatives (equation 19) of the utility function of (a) are:
wherein For user equipment E i Utility functions of (2); c (C) b Realizing a service profit/calculation unit for the user equipment; u (u) i (u i >0) Is a weight factor representing the user equipment E i Consider the importance of the cost of payment in the total profit, when 0<u i E is less than or equal to 1 i The cost of payment is considered to be less significant in the total profit, when u i >1, E i Consider the cost of paymentThe ratio of the total profit is larger and more important; p is p i Representing the pricing of the server to the ith user; n represents the total number of user equipments; f (F) l Representing a computing resource requirement of the first user device; r represents rewards given when buyers participate in legal transactions, and is determined by a alliance chain system;representing in addition to user equipment E i Except for the sum of the computing resource requirements of all other user devices.
From equation (19), it can be seen thatSyndrome of immediate->Is a strictly convex function, with a maximum. And for equation (18), let it equal to 0 to solve:
wherein Representing in addition to user equipment E i Except for the sum of the computing resource requirements of all other user devices.
In general, the policy function is shown as follows (equation 21):
wherein Representing optimal computing resource service requirements for buyer i, F min and Fmax The minimum and maximum computing resources that the user is permitted to request, respectively.
2) Stage I: vendor edge node optimal price policy.
When F min <F i <F max When it willSubstituting into the formula (1) to obtain:
wherein UI The utility function representing the edge node, C represents the electricity rate cost per calculation unit.
Obtaining a second derivative of the formula (17), and finishing to obtain:
wherein E={E1 ,E 2 ...,E i ,...,E N And (c) representing a set of user devices within the coalition chain.
When (when)When (I)>Is true, at this time U I Is a strictly convex function, there is a maximum, therefore, p i The nash equilibrium point exists when the following constraints are met.
4.3.2 second layer Cross-chain Stackelberg gaming
1) Stage II: the buyer edge node on the kth chain optimally calculates resource requirements.
Buyer edge device S on kth chain j The first (equation 25) and second derivatives (equation 26) of the utility function are:
wherein Representing buyer edge device S on kth chain j Utility functions of (2); />Representing the computational resource requirements of a jth edge node on a kth chain; />Representing pricing of the representation server to a jth server on a kth chain; c (C) b Profit/calculation unit brought by the service requirement; y is j (y j >0) Is a weight factor representing the importance of the j-th buyer's edge node to the total profit of the cost of payment, when 0<y i At less than or equal to 1, indicating that the j-th buyer edge node considers the payment cost to be less than the total profit, and less important; when y is i >1, the j-th buyer edge node considers the payment cost to be larger and more important in the total profit. />Representing a computing resource offer from a seller node to a jth buyer node on a kth chain;representing a computing resource requirement of a first buyer node on a kth chain; r is R c Representing rewards, the more the edge nodes calculate the proportion of resource demands, the more rewards are obtained, and when the buyer nodes conduct legal transaction, the rewards can be obtained, so that more edge nodes can be stimulated to a certain extent The points participate in legal cross-chain resource transactions, the size settings of which are determined by the federated chain system. M represents the total number of servers that need to transact resources out of the chain; />Representing the kth chain except for edge node S j Except for the sum of the computing resource requirements of all the other edge nodes.
As can be seen from the formula (20),syndrome of immediate->Is a strictly convex function, with a maximum. And for equation (25), let it equal to 0:
wherein Representing the kth chain except for edge node S j Except for the sum of the computing resource requirements of all the other edge nodes.
In general, the policy function is as follows:
wherein Representing optimal computing resource service requirements for the jth buyer node on the kth chain. /> and />The minimum and maximum computing resources that the node on the kth chain allows for the request, respectively. />
2) Stage I: vendor edge node optimal price policy.
Since the seller edge node can act as a seller on its own chain, it can trade computing resources with user equipment on its own chain, or as a seller of a server on other chain requiring computing resources. But only if the out-of-chain transaction is more profitable, the seller edge node will conduct the transaction. Thus, U can be set I Is constant, i.e. it is the maximum profit that it can obtain on the chain. When (when) When in use, will->Substituting into formula (10) to obtain:
wherein UT Representing the utility function of the edge node of the seller, U I Is a resource transaction utility function of a chain takeaway node on a chain where the node is located, and refers to a formula (1);reference is made to equation (7) for a utility function representing a cross-chain computing power transaction with the kth chain by the seller node.
Obtaining a second derivative of the formula (24), and finishing to obtain:
when (when)When (I)>Is true, at this time U T Is a strictly convex function, there is a maximum, and therefore,the nash equilibrium point exists when the following constraints are met.
4.4 Stackelberg game equilibrium solving algorithm
The intelligent contract is a computer protocol, and after the protocol is formulated and deployed, self-execution and self-verification can be realized without additional manual intervention. From a technical perspective, an intelligent contract may be viewed as a computer program that autonomously performs all or part of the operations associated with the contract and produces corresponding evidence that can be validated to demonstrate the effectiveness of performing the contract operation. The logic flow of all terms associated with a contract is established prior to deployment of the smart contract. The method is automatically executed by intelligent contracts on each alliance chain.
4.4.1 solving layer 1 Stackelberg gaming
The invention adopts algorithm 1 to solve the Stackelberg game in the layer 1 chain: firstly, initializing a pricing set by an edge node, and initializing the own computing resource demand by all users; then enter a new round of game, each user equipment E i After obtaining the pricing of the edge node to it, calculating its own optimal response from the sum of the computing resource demands of the other users of the previous round and formula (21); after the edge node obtains the sum of the computing resource demands of all users, the edge node adopts a differential evolution algorithm to find the optimal pricing because the maximum point of the formula (22) is difficult to find by a derivative mode. The specific steps of the differential evolution algorithm are as follows:
(1) Initializing a population P;
(2) Selecting a base vector p of differential variation i (i.eThe edge node offers the price of user i), differential variation is carried out on the current population to obtain variant individuals v i The following are provided:
where f is a given coefficient, f.epsilon.0, 2]Too small f may fall into local optimum, while too large f is not easy to converge, so f is generally controlled at [0.4,1 ]],r 1 and r2 Is less than or equal to N and two different random numbers;
(3) Combining the current population and the variant individuals, and obtaining the test population by adopting a binomial distribution crossover method. Solving for a cross vector u i For u i Is a value of (1), having:
wherein rand () is a random number, rand () ∈0,1]; CR is a crossover operator, CR E [0,1] used to control whether a variant vector value or an original vector value is selected;
(4) And selecting a new generation population from the current population and the test population. By crossing vector u i And the original vector p i In contrast, the optimal one is selected as the new solution vector, and the vector p is updated i The next step is performed. The method comprises the steps of carrying out a first treatment on the surface of the
(5) Repeating the steps (2), (3) and (4) until the end of N iterations (N is the total number of user devices, as mentioned above) to obtain a new pricing decision set P'.
4.4.2 solving layer 2 Stackelberg gaming
The invention adopts the following method to solve the Stackelberg game in the layer 2 chain: firstly, initializing a pricing set by an off-chain seller edge node, and initializing own computing resource demand by all in-chain buyer nodes; then enter a new round of game, each buyer nodeAfter obtaining the pricing of the chain takeaway to it, calculating its own optimal response from the sum of the computing resource requirements of the other in-chain buyer nodes of the previous round and equation (28); after obtaining the sum of the computing resource demands of all users, the edge node adopts a differential evolution algorithm to find the optimal pricing because the maximum point of the formula (29) is difficult to find by a derivative way. The specific algorithm is as follows: / >
Reference to the literature
[1]T.Kwantwi,G.Sun,N.A.E.Kuadey,Blockchain-based computing resource trading in autonomous multi-access edge network slicing:A dueling double deep q-learning approach,IEEE Transactions on Network and Service Management,2023.
[2]X.Lin,J.Wu,S.Mumtaz,S.Garg,J.Li,M.Guizani,Blockchain-based on-demand computing resource trading in iov-assisted smart city,IEEE Transactions on Emerging Topics in Computing 9(3)(2020)1373–1385.
[3]M.S.Abegaz,H.N.Abishu,Y.H.Yacob,Blockchain-based resource trading in multi-uav-assisted industrial iot networks:A multi-agent drl approach,IEEE Transactions on Network and Service Management 20(1)(2022)166–181.
[4]S.Fan,H.Zhang,Y.Zeng,W.Cai,Hybrid blockchain-based resource trading system for federated learning in edge computing,IEEE IoT Journal 8(4)(2020)2252–2264.
[5]G.Qiao,S.Leng,H.Chai,Blockchain empowered resource trading in mobile edge computing and networks,in:ICC,IEEE,2019,pp.1–6.
[6]H.Chai,S.Leng,K.Zhang,S.Mao,Proof-of-reputation based-consortium blockchain for trust resource sharing in internet of vehicles,IEEE Access 7(2019)175744–175757.
[7]W.Li,C.Feng,L.Zhang,A scalable multi-layer pbft consensus for blockchain,IEEE TPDS 32(5)(2020)1146–1160.
[8]J.Nick,T.Ruffing,Y.Seurin,Musig-dn:Schnorr multi-signatures with verifiably deterministic nonces,in:Proceedings of the 2020 ACM SIGSAC Conference on Computer and Communications Security,2020,pp.1717–1731.
Table 1 mathematical symbols used herein
/>
/>

Claims (3)

1. A pre-prediction machine-based edge calculation cross-chain computing force transaction method is characterized in that: the cross-chain computing power transaction framework consists of a alliance chain, a prophetic machine and mobile equipment, wherein one alliance block chain consists of all edge nodes participating in one area;
mobile equipment is a purchaser of the computing power; they send the demand for buying computing power to the edge node covering them, and the edge node receives the information of selling computing power of all edge nodes, and the mobile device purchases computing power resources to the edge node according to its own budget and QoS demand;
edge Nodes (Edge Nodes, ENs) that have rich computing resources; the edge node has two roles in the process of calculating force transaction; the first role is a power seller; the edge node sells the computing resources to the mobile device as a computing owner; the second role is to proxy mobile devices within its coverage area; transmitting the computing power purchase information and receiving the computing power selling information through the mobile equipment, and reducing the number of nodes and computing power transactions on the blockchain; when localized edge nodes in an area cannot meet the computational power requirements of mobile devices in the coverage range of the mobile devices, the localized edge nodes can act as agents to purchase computational power from edge nodes in other areas;
Nodes belonging to any alliance blockchain are defined as on-chain nodes, and the rest nodes are defined as off-chain nodes; the predictor is used as a bridge for connecting the blockchain and consists of a collecting node, an agent node PN, a verification node and a monitoring node, wherein the collecting node, the agent node PN, the verification node and the monitoring node are respectively selected from the nodes on the chain and the nodes below the chain, and the concrete steps are as follows:
collecting the cross-link contracts sent by the edge nodes to check whether the contracts are standard or not; the collection node is randomly selected from the nodes on the chain;
the agent node is used for communicating with other blockchains on behalf of the blockchain to acquire global computing power resource information; meanwhile, matching the cross-chain computing power purchasing demand with edge nodes of the idle computing power resources of other blockchains, and informing a buyer; PN is selected from the collection nodes, and there is only one PN on the blockchain;
a verification node verifying the validity of the transaction; the verifier selects from the nodes under the chain, and expresses the wish of becoming the verifier by freezing a deposit with a certain amount;
the monitoring node verifies the identity of the edge node and prevents malicious nodes from interfering with the power calculation transaction; the monitor is selected from authentication node candidates not selected as authentication nodes;
reputation-based Proxy Node (PN) selection
First, each consensus node in the blockchain uses equation (1) as collection node c i Calculating a personal reputation value;
wherein ,c is i Participation inAnd record the number of transactions on the blockchain, < >>The benefit of the j transaction recorded; t is t b Representing the duration of generating a block, +.>Representation c i Number of unrecorded transactions involved,/->Representation c i Loss of participating jth unrecorded transaction;
then randomly selecting one consensus node, and collecting r from all the consensus nodes i And calculates the average value as c i Reputation value of (c); finally, selecting the collector with the highest reputation as PN; the above method is performed at fixed time intervals;
the power transaction mechanism consists of two parts, namely an on-chain transaction and a cross-chain transaction;
in-chain transactions
Mobile equipment E i Send its computing resource requirements to the on-chain ENS that covers it j ;S j Responsible E i Is validated; then S j As E i The agent of (1) invokes an on-chain purchase contract OPC and broadcasts the contract to other ENs in the same blockchain so that any EN on the blockchain can get E i Is required by the requirements of (2); upon receipt of the purchase contract, the ENs on the blockchain first verify the identity of the calling contract node, then satisfy E i The ENs of the demand invokes the on-chain sales contract OSC to issue a calculation unit price and unicast to S j The method comprises the steps of carrying out a first treatment on the surface of the Finally S j Transmitting the aggregated seller information to E i The method comprises the steps of carrying out a first treatment on the surface of the Since the mobile device only receives information of other ENs on the chain that have verified legal identity, information of the seller can only be obtained through the ENs on the chain that covers it; OPC and OSC are pre-deployed, the contents of which are as follows:
on-chain purchase contract (OPC): provide an ENs withCalling interface (F, F) min ,F max ) Recording the computational power requirements of the mobile device within its coverage area; f is the computational power requirements of various mobile devices; f (F) min and Fmax Representing allowable maximum and minimum calculated force requirements, respectively;
on-chain sales contracts (OSC): providing calling interfaces (P, P) for ENs min ,P max ) To record the unit price of its available computing resources; p is the unit price of the mobile device; p (P) min and Pmax Representing the highest and lowest allowed unit price, respectively;
through the above-mentioned interactive process, the Seller (ENs) and the buyer, i.e., the mobile device, get the needs of each other; the two parties agree on the unit price of the even though resource and the purchase resource, and the specific game model and the calculation method are shown in the following; then, ENs initiates the transaction and broadcasts the transaction within the blockchain to reach consensus; finally, the verified power transaction is recorded on the block and the transaction is performed.
2. The method according to claim 1, characterized in that: the cross-link transaction comprises four stages, namely a cross-link contract calling stage, a transaction creating stage, a transaction verifying stage and an executing stage;
2.1.1 Cross-Link contract invocation phase
One EN acts as a bridge between the mobile device it covers and other EN bodies on the chain, delivering computing force purchase and sales information; when the computational power resources of the blockchain where the agent is located cannot meet the requirements of the mobile device covered by the agent, the agent calls a cross-chain purchase contract CPC; in addition, ENs with available computing resources invoke idle resource contracts IRC to issue sales information for computing resources; these contracts are multicast to the same collection node blockchain; CRC and IRC are pre-deployed, the contents of which are as follows:
Cross-Chain Purchase Contracts (CPC) providing a call interface (F, F) min ,F max ) Recording the power demand for ENs; f is the actual demand; f (F) min and Fmax Representing maximum and minimum allowable calculation force requirements, respectively;
free resource contracts (IRC) providing calling interfaces (F, P) min ,P max ) For ENs recordingThe used computing power resource information; f is the available computational resource and P is the unit price of the mobile device; p (P) min and Pmax Representing the highest and lowest allowed unit price, respectively;
transaction creation phase
When the collection node receives the contract, CPC and IRC are included; firstly, detecting whether a contract is standard or not, and then sending the node identity of the calling contract to a randomly selected nm monitoring node for verification; if the monitoring node exceeding 2/3 verifies that the identity is legal, the collecting node will continue to process the contract, otherwise the contract will be deleted; the identity verification process is as follows, the selected monitoring node calls an internal function CHECKIDENT (iden) to verify the identity of the node; iden is a parameter representing the node identity; after validating the CPC, the collecting node inserts it into an ordered queue according to the priority of the EN invoking the contract; if two ENs have the same priority, then they are ordered by their initialization time; the collection node inserts the verified IRCs into another queue according to the arrival sequence; all collection nodes in the blockchain send CPC and IRC queues to the PN representing the blockchain at fixed time intervals to participate in cross-chain computing transactions; the fixed time interval is defined by reality; PN in the predictor interacts with other PN to obtain globally available computing power resources; the PN will then tell the buyers in the same blockchain which sellers have sufficient resources to meet the demand and sales price, and which buyers want to purchase the resources and demand; these buyers and sellers then game each other in order to maximize their own utility, specific calculation methods are followed; finally, the buyer and the seller reach a transaction, and the buyer initiates the transaction;
Transaction verification stage
The transaction requires verification by a verification committee prior to recording to the blockchain; the validation committee is selected from the under-chain nodes that are willing to become a committee member by freezing a certain amount of funds in the account as a deposit; ordering the nodes under the chain according to deposit, selecting n v Nodes ranked top; each member of the validation committee validates the transaction and randomly transmits the validation result to one memberSummarizing; if the committee exceeding 2/3 confirms that the transaction is valid, otherwise, the transaction is invalid; when the validation result is opposite to the final result, the validator will be penalized according to equation (2); for dishonest verifiers with very large account balances, adding additional penalties at each fixed interval according to equation (3) to reduce their probability of becoming a committee member; meanwhile, the honest verifier obtains a certain amount of rewards according to the received punishment; through the reward and punishment mode, more nodes under the chain are encouraged to participate in the verification committee;
m i =m i -d (2)
wherein mi For verifier v i Money on account, d is v i Deposit of ir i For v in a fixed interval time i The number of invalid validation results, pr i For v in a fixed interval time i A total number of transactions involved in the verification;
transaction execution phase
During execution of the transaction, when the seller stops providing the computing power resource, the buyer initiating the transaction obtains compensation; accumulating compensation as priority of next rent of the buyer, wherein c is compensation;
r p =r p +c (4)。
3. the method according to claim 1, characterized in that:
there are mainly two computing resource transaction scenarios: 1) Computing resources of the in-chain edge nodes may meet the requirements of the user equipment within their coverage area; 2) The computing resources of the edge nodes in the chain cannot meet the requirements of the user equipment in the area where the computing resources are located, the requirements of the computing resources are rapidly increased in a short time, and if only the service capacity of the edge nodes in the chain is increased, the cost is high, and the situation of the rapid increase of the requirements can be dealt with by purchasing the computing resources outside the chain;
however, there is gaming between the edge nodes in the chain and the mobile device users, who want better service and cheaper prices, while the edge nodes want higher revenues; in addition, there is gaming between chains and edge nodes of the chains, where an edge node in one chain that requires more resources is a buyer and an edge node in the other chain that can provide resources for it is a seller, who wants to sell resources at a higher price and the buyer wants to buy at a lower price;
Therefore, the two-layer game problem needs to be solved by the transaction of the computing power resource, namely 1) the user terminal equipment and which edge node in the chain conduct the transaction of the computing power resource, and the user terminal equipment and the edge node in the chain can obtain the maximum benefit respectively; 2) The edge nodes in the chain and which edge node outside the chain conduct the computing resource transaction, and each can obtain the maximum benefit; the proposed double-layer Stackelberg game flow is described in detail as follows:
firstly, the computational power resource purchasing demand of user equipment is sent to each edge node in a chain, and each edge node simulates computational power distribution, and if a user purchase request is received, the computational power total amount, quotation, calculation time delay and energy consumption can be provided for the user; as a leader of the Stackelberg game, the edge node sends the speculative information to the requesting user; the user has resource competition as a follower of the Stackelberg game, and the user selects proper calculation power purchase quantity according to the benefit maximization principle;
firstly, an in-chain edge node and an out-chain edge node respectively send the calculation power resource purchasing requirement and available calculation power information to a prophetic machine, and meanwhile, the prophetic machine acquires the required calculation power buying and selling information; then, the outer edge node of the chain serves as a leader in the Stackelberg game, and according to the information acquired from the predictor and the resource information of the outer edge node, the required computing resource and the corresponding quotation are given to the inner edge node of the chain, wherein competition exists among the edge nodes in the chain; in addition, it is considered that the outer edge node can still sell the resource to the nodes on the chain if the outer edge node does not sell the resource to the inner edge node, so the outer edge node can provide the computational resource for the inner edge node according to the benefit maximization principle;
Layer 1 in-chain Stackelberg game
Layer 1 Stackelberg gaming is gaming between edge nodes and user devices within a chain; although this is a transaction scenario between a multi-edge node and a multi-user device, it is abstracted to a game between one resource-limited edge node and multiple users for the following reasons: each edge node in the chain can carry out one-to-many games with a user and give quotations, and finally, the user equipment can select one edge node capable of maximizing profit of the user according to all game results to carry out transactions; the constructed intra-chain Stackelberg game is a two-stage full information dynamic game; the first stage: the edge node is used as a leader to make pricing first; and a second stage: the user is used as a follower to decide the own computing resource transaction amount according to the pricing of the edge node;
the set of user equipments is denoted as e= { E 1 ,E 2 ...,E i ,...,E N}, wherein Ei Indicating the ith user equipment, N indicating the number of user equipment; each user device needs to determine its own computing resource requirements, and the set of computing power purchase requirements determined by the user device is denoted as f= { F 1 ,F 2 ,...,F i ,...,F N}, wherein Fi Representing the computational resource requirements of the ith user equipment, F i ∈[F min ,F max]; wherein ,Fmin and Fmax Minimum and maximum computing resources, respectively, that allow user requests; the edge node needs to price each user, and the pricing set of the edge node is represented as p= { P 1 ,p 2 ,...,p i ,...,p N}, wherein pi Pricing, p, indicated to the ith user i ∈[p min ,p max], wherein pmin and pmax Minimum and maximum prices for the restrictions of the unit calculation resources, respectively; in order to construct a Stackelberg game, utility functions of the edge node and the user are respectively constructed;
1) Edge node utility function
The edge node considers only the revenue of selling the computing resources as a seller, and therefore its utility function subtracts the cost of service for the user device to purchase the computing payment, as shown in equation (5):
wherein, C is the electricity fee cost per calculation unit, and the income incentive mechanism can motivate more in-chain edge nodes to participate in the calculation resource transaction;
2) Mobile device utility function
Mobile equipment E i In addition to the purchase cost, the time delay and the energy consumption required by the completion of the calculation task are also considered in the process of calculating the resource transaction, and the satisfaction function is utilized for quantitatively evaluating the time delay and the energy consumption, as shown in a formula (6):
wherein For user equipment E i The calculation task of (c) is done in the edge node in the chain for a saved time (formula 7),/and (c)>For user equipment E i Is done at the in-chain edge node (equation 8), α 1 and α2 Respectively represent user equipment E i The value weight of unit time and unit energy consumption; the satisfaction function of the user equipment reflects that the more time and energy consumption are saved by the user through resource transaction, the more satisfied the user;
wherein ,representing computing tasks at user device E i Time spent executing; t is t i Representing the time it takes for the computational task to offload to the in-chain edge node to complete, comprising: the transmission time of data from the user equipment to the edge node, the computation time at the edge node, and the transmission time required for the edge node to return the result; />Representing computing tasks at user device E i Electric energy spent on execution, e i Representing the power and transmission energy consumption required by the completion of the computing task at the in-chain edge node;
comprehensively considering the factors such as purchase cost, time delay, energy consumption and the like, and constructing a utility function of the mobile equipment, wherein the utility function is shown in a formula (9):
wherein Ψi Representing user equipment E i Satisfaction function of (C) as shown in formula (6) b Profit/computation unit for computing tasks with edge nodes, u i (u i >0) Is a weight factor representing the user equipment E i Consider the importance of the cost of payment in the total profit, when 0 <u i E is less than or equal to 1 i The cost of payment is considered to be less significant than the total profit; when u is i >1, E i The payment cost is considered to be larger and more important in the total profit; r represents rewards, and the more the proportion of the computing resource demands of the users is, the more the rewards are obtained, and the size of the rewards is determined by the alliance chain system;
layer 2 inter-link Stackelberg gaming
When the computing resources of the edge nodes on the chain cannot meet the user resource request of the covered area, performing computing resource transaction with the edge nodes of other chains through the predictor; it is a game between a plurality of on-chain edge nodes and a plurality of off-chain edge nodes; abstracting the game as a game between a resource-limited outer edge node of the chain and a multi-chain inner edge, wherein the reason is similar to the layer 1 in-chain game and is not described in detail; the constructed Stackelberg game is a two-stage complete information dynamic game; the first stage: the outer edge node of the chain is used as a leader to make pricing first; and a second stage: the edge node on the chain is used as a follower to decide the own computing resource transaction amount according to the pricing of the edge node on the chain;
defining on-chain buyer edge nodes that require purchase of computing resources as wherein Sj k Representing a jth buyer node on a kth chain, M representing a number of buyer nodes required to conduct a resource transaction out of the chain; each buyer node needs to determine its own computing resource needs, and the set of power purchase needs determined by the buyer node is represented as wherein Gj k Representing the computational resource requirements of the jth buyer node on the kth chain, wherein ,/> and />The minimum and maximum computing resources that the node on the kth chain allows for the request; the chain takeaway node needs to give each chainInward buyer offers, representing the set of offers from chain takeaway to chain buyer as wherein />Representing the seller's offer to the jth buyer's computing resource on the kth chain, wherein /> and />Respectively buying minimum and maximum prices of unit computing resources for the kth chain; in order to construct a Stackelberg game, utility functions of a chain take-out side edge node and an in-chain buyer edge node are respectively constructed;
1) Chain takeaway side edge node utility function
The chain takeaway edge node obviously does not sell its own computational resources to other on-chain edge nodes without limitation, as it would also benefit if it did not sell resources to other on-chain edge nodes, but instead sold to nodes on its chain; obviously only when it is more advantageous to sell to other on-chain edge nodes; thus, the utility function of an edge node outside the chain consists of mainly two parts, one part being the profit of selling computing resources to user devices on its chain and one part being the profit of selling computing resources to other edge nodes on the chain, as follows:
wherein ,UI Is a utility function of resource transaction of a chain takeaway node on the chain where the node is located, and refers toEquation (5);a utility function representing the seller node performing a cross-chain power transaction with a kth chain, as shown in equation (11), including a payment fee minus a service cost for the buyer node on the kth chain;
wherein Representing a bid by a seller node for a j-th buyer unit computing resource on a k-th chain; c is the electricity cost of unit calculation resources; g j k Representing the computing resource requirements of the jth buyer on the kth chain; such revenue incentives mechanisms may encourage more edge nodes to be willing to participate in cross-chain computing resource transactions;
2) In-chain buyer edge node utility function
In the process of computing resource transaction, the in-chain edge node also needs to consider the factors such as time delay, energy consumption and the like required by the completion of computing tasks besides the purchase cost, and the utility function can be expressed as: the profit obtained by the realization business minus the cost paid by the purchase of off-chain computing resources, plus rewards obtained by participation in legal transactions, and finally minus the transmission cost across chains, as shown in formula (12):
wherein ,Cb Profit/calculation unit brought by the service requirement; y is j (y j >0) Is a weight factor representing the importance of the j-th buyer's edge node to the total profit of the cost of payment, when 0 <y i At less than or equal to 1, indicating that the j-th buyer edge node considers the payment cost to be less than the total profitNot important; when y is i >1, the j-th buyer edge node considers that the payment cost is larger and more important in the total profit;representing a computing resource offer from a seller node to a jth buyer node on a kth chain; g j k Representing a computing resource requirement of a jth buyer node on a kth chain; r is R c Representing rewards, wherein the more the edge node calculates the proportion of resource requirements, the more the rewards are obtained, and the rewards can be obtained when the buyer node performs legal transaction;
is a buyer edge node S j Cross-chain transmission costs (including latency and energy consumption) as shown in equation (13):
wherein ,is S j Time it takes for computing tasks to cross-chain, +.>Is S j Is energy which is consumed in the process of crossing chains 1 and β2 Respectively represent S j The value weight of unit time and unit energy consumption;
nash equilibrium analysis
The final objective of the Stackelberg game is to find a Nash equilibrium solution, namely, a seller and a buyer adjust own strategies in real time through a game process so as to maximize profits of the two parties; nash equalization is defined as follows:
definition 1 p is set * Is a computing resource set by a seller in a first-tier game Optimum price, F * Is the buyer's optimal computing resource service requirement, then (p * ,F * ) The conditions that the Nash equilibrium point needs to meet are as follows:
U I (p * ,F * )≥U I (p,F * ) (14)
and is also provided with
wherein UI (p * ,F * ) Is a vendor edge node utility function when set to an optimal price for computing resources and optimal computing resource service requirements;is a utility function of the buyer user device when set to an optimal price for computing resources and optimal computing resource service requirements;
for the seller edge node, when the computing resource price is set to p * When the expected profit is higher than any other price; for the buyer user, when the computing resource service requirement is set to F * Expected profits are higher than any other computing resource demand;
definition 2 setting h * Is the optimal price of the computing resource set by the seller in the second-layer game, G * Is the buyer's optimal computing resource service requirement, then (h * ,G * ) The conditions that the Nash equilibrium point needs to meet are as follows:
U T (h * ,G * )≥U T (h,G * ) (16)
and is also provided with
wherein UT (h * ,G * ) Is the seller when set to an optimal price for computing resources and optimal computing resource service requirementsAn edge node utility function;is a buyer edge node S when set to an optimal price for computing resources and optimal computing resource service requirements j Utility functions of (2);
for the seller edge node, when the computing resource price is set to h * When the expected profit is higher than any other price; for buyer edge nodes in the other chain, when the computing resource service requirement is set to G * Expected profits are higher than any other computing resource demand;
nash equalization is the result of a game: the choices made by each participant are the best response to the choices made by the other participants; the presence of nash equilibrium points is analyzed as follows;
2.1.2 Stackelberg gaming in first tier links
Adopting an inverse induction method to process the two-stage Stackelberg game;
1) Stage II: the user equipment optimally calculates the resource requirement;
user equipment E i The first (equation 18) and second derivatives (equation 19) of the utility function of (a) are:
wherein For user equipment E i Utility functions of (2); c (C) b Realizing a service profit/calculation unit for the user equipment; u (u) i (u i >0) Is a weight factor representing the user equipment E i The importance of the cost of payment in the total profit is considered,when 0 is<u i E is less than or equal to 1 i The cost of payment is considered to be less significant in the total profit, when u i >1, E i The payment cost is considered to be larger and more important in the total profit; p is p i Representing the pricing of the server to the ith user; n represents the total number of user equipments; f (F) l Representing a computing resource requirement of the first user device; r represents rewards given when buyers participate in legal transactions, and is determined by a alliance chain system; />Representing in addition to user equipment E i Except for the sum of the computing resource requirements of all other user devices;
from equation (19), it can be seen thatSyndrome of immediate->Is a strictly convex function, with a maximum; and for equation (18), let it equal to 0 to solve:
wherein Representing in addition to user equipment E i Except for the sum of the computing resource requirements of all other user devices;
in general, the policy function is shown as follows (equation 21):
wherein Representing optimal computing resource service requirements for buyer i, F min and Fmax Minimum and maximum computing resources, respectively, that allow user requests;
2) Stage I: vendor edge node optimal price policy;
when F min <F i <F max When it willSubstituting into the formula (1) to obtain:
wherein UI A utility function representing an edge node, C representing an electricity fee cost per calculation unit;
obtaining a second derivative of the formula (17), and finishing to obtain:
wherein E={E1 ,E 2 ...,E i ,...,E N -representing a set of user equipments within a coalition chain;
when (when)When (I)>Is true, at this time U I Is a strictly convex function, there is a maximum, therefore, p i When the following constraints are met, nash equilibrium points exist;
2.1.3 second layer Cross-chain Stackelberg gaming
1) Stage II: the buyer edge node on the kth chain optimally calculates resource requirements;
buyer edge device S on kth chain j The first (equation 25) and second derivatives (equation 26) of the utility function are:
wherein Representing buyer edge device S on kth chain j Utility functions of (2); g j k Representing the computational resource requirements of a jth edge node on a kth chain; />Representing pricing of the representation server to a jth server on a kth chain; c (C) b Profit/calculation unit brought by the service requirement; y is j (y j >0) Is a weight factor representing the importance of the j-th buyer's edge node to the total profit of the cost of payment, when 0<y i At less than or equal to 1, indicating that the j-th buyer edge node considers the payment cost to be less than the total profit, and less important; when y is i >1, the j-th buyer edge node considers that the payment cost is larger and more important in the total profit; />Representing a computing resource offer from a seller node to a jth buyer node on a kth chain; />Representing a computing resource requirement of a first buyer node on a kth chain; r is R c Representing rewards, wherein the more the edge node calculates the proportion of resource requirements, the more the rewards are obtained, and the rewards can be obtained when the buyer node performs legal transaction, and the size setting is determined by the alliance chain system; m represents the total number of servers that need to transact resources out of the chain; / >Representing the kth chain except for edge node S j Except the sum of the computing resource requirements of all the edge nodes; from equation (20), it is known that +.>Syndrome of immediate->Is a strictly convex function, with a maximum; and for equation (25), let it equal to 0:
wherein Representing the kth chain except for edge node S j Except the sum of the computing resource requirements of all the edge nodes;
in general, the policy function is as follows:
wherein Represents the jth buyer on the kth chainOptimal computing resource service requirements of the nodes; /> and />The minimum and maximum computing resources that the node on the kth chain allows for the request;
2) Stage I: vendor edge node optimal price policy;
the seller edge node can be used as a seller on the chain of the seller, and can conduct computing resource transaction with user equipment on the chain of the seller, and can also be used as a seller of a server on other chains for requiring computing resources; but only if the out-of-chain transaction is more profitable, the seller edge node will conduct the transaction; thus, U can be set I Is constant, i.e. the maximum profit it can obtain on the chain; when (when)When in use, will->Substituting into formula (10) to obtain:
wherein UT Representing the utility function of the edge node of the seller, U I Is a resource transaction utility function of a chain takeaway node on a chain where the node is located, and refers to a formula (1); Efficiency of cross-chain computing power transactions with a kth chain on behalf of the seller nodeReferring to equation (7) with a function;
obtaining a second derivative of the formula (24), and finishing to obtain:
when (when)When (I)>Is true, at this time U T Is a strictly convex function, there is a maximum, therefore, < ->When the following constraints are met, nash equilibrium points exist;
2.2 Stackelberg game equilibrium solving algorithm
Logic flow for all terms associated with a contract is established prior to deployment of the smart contract; the proposed Stackelberg game equilibrium solving algorithm is automatically executed by intelligent contracts on each alliance chain;
2.2.1 solving layer 1 Stackelberg gaming
Algorithm 1 is used to solve for the Stackelberg game in layer 1 chain: firstly, initializing a pricing set by an edge node, and initializing the own computing resource demand by all users; then enter a new round of game, each user equipment E i After obtaining the pricing of the edge node to it, calculating its own optimal response from the sum of the computing resource demands of the other users of the previous round and formula (21); after obtaining the sum of the computing resource demands of all users, the edge node adopts the difference because the maximum point of the formula (22) is difficult to find by a derivation mode Searching optimal pricing by a partialization algorithm; the specific steps of the differential evolution algorithm are as follows:
(1) Initializing a population P;
(2) Selecting a base vector p of differential variation i (i.e. the offer of user i by the edge node) differential variation of the current population to obtain variant individuals v i The following are provided:
where f is a given coefficient, f.epsilon.0, 2]Too small f may fall into local optimum, while too large f is not easy to converge, so f is generally controlled at [0.4,1 ]],r 1 and r2 Is less than or equal to N and two different random numbers;
(3) Combining the current population and the variant individuals, and obtaining a test population by adopting a binomial distribution crossover method; solving for a cross vector u i For u i Is a value of (1), having:
wherein rand () is a random number, rand () ∈0,1]; CR is a crossover operator, CR E [0,1] used to control whether a variant vector value or an original vector value is selected;
(4) Selecting a new generation population from the current population and the test population; by crossing vector u i And the original vector p i In contrast, the optimal one is selected as the new solution vector, and the vector p is updated i Carrying out the next step; the method comprises the steps of carrying out a first treatment on the surface of the
(5) Repeating the steps (2), (3) and (4) until N iterations are finished, wherein N is the total number of the user equipment, and a new pricing decision set P' is obtained; solving layer 2 Stackelberg gaming
The following method is used to solve the Stackelberg game in the layer 2 chain: firstly, initializing a pricing set by an off-chain seller edge node, and initializing own computing resource demand by all in-chain buyer nodes; then enterEntering a new round of games, each buyer node S j k After obtaining the pricing of the chain takeaway to it, calculating its own optimal response from the sum of the computing resource requirements of the other in-chain buyer nodes of the previous round and equation (28); and the edge node searches for optimal pricing by adopting a differential evolution algorithm after obtaining the sum of the computing resource demands of all users.
CN202310635360.8A 2023-05-31 2023-05-31 Edge calculation cross-chain computing force transaction method based on predictors Pending CN116797364A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310635360.8A CN116797364A (en) 2023-05-31 2023-05-31 Edge calculation cross-chain computing force transaction method based on predictors

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310635360.8A CN116797364A (en) 2023-05-31 2023-05-31 Edge calculation cross-chain computing force transaction method based on predictors

Publications (1)

Publication Number Publication Date
CN116797364A true CN116797364A (en) 2023-09-22

Family

ID=88033652

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310635360.8A Pending CN116797364A (en) 2023-05-31 2023-05-31 Edge calculation cross-chain computing force transaction method based on predictors

Country Status (1)

Country Link
CN (1) CN116797364A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117955742A (en) * 2024-03-26 2024-04-30 杭州高新区(滨江)区块链与数据安全研究院 Verification method and device for data cross-link interaction, challenge node and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117955742A (en) * 2024-03-26 2024-04-30 杭州高新区(滨江)区块链与数据安全研究院 Verification method and device for data cross-link interaction, challenge node and storage medium

Similar Documents

Publication Publication Date Title
Tu et al. Incentive mechanisms for federated learning: From economic and game theoretic perspective
Sun et al. Joint resource allocation and incentive design for blockchain-based mobile edge computing
Shi et al. Priority-aware task offloading in vehicular fog computing based on deep reinforcement learning
USRE49334E1 (en) Multifactorial optimization system and method
Luong et al. Data collection and wireless communication in Internet of Things (IoT) using economic analysis and pricing models: A survey
Li et al. Credit-based payments for fast computing resource trading in edge-assisted Internet of Things
Said A decentralized electricity trading framework (DETF) for connected EVs: A blockchain and machine learning for profit margin optimization
Qiu et al. Applications of auction and mechanism design in edge computing: A survey
Dong et al. Collaborative edge computing for social internet of things: Applications, solutions, and challenges
CN110473058A (en) A kind of shared platform method of commerce based on block chain credit value
CN112613861B (en) Electric power pre-selling transaction method, device and system based on alliance chain
CN116797364A (en) Edge calculation cross-chain computing force transaction method based on predictors
Wang et al. Smart contract-based caching and data transaction optimization in mobile edge computing
Cheng et al. Trusted resource allocation based on smart contracts for blockchain-enabled internet of things
Li et al. Multi-blockchain based data trading markets with novel pricing mechanisms
Gupta et al. Federated learning using game strategies: State-of-the-art and future trends
Yue et al. A double auction-based approach for multi-user resource allocation in mobile edge computing
Xu et al. IDADET: iterative double-sided auction-based data-energy transaction ecosystem in internet of vehicles
Courcoubetis et al. Network neutrality [Paid peering: Pricing and adoption incentives]
Kumar et al. Backhaul-aware storage allocation and pricing mechanism for RSU-based caching networks
Jiang et al. Combinatorial double auction for resource allocation with differential privacy in edge computing
Hui et al. On-demand self-media data trading in heterogeneous vehicular networks
Li et al. Pricing-based resource allocation in three-tier edge computing for social welfare maximization
Song et al. On truthful auction mechanism for cloud resources allocation and consumption shifting with different time slots
Liu et al. Resource allocation strategy based on improved auction algorithm in mobile edge computing environment

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