Computing power security perception and coordination method based on blockchain in computing network

CN115473894BInactive Publication Date: 2024-12-13BEIJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211059634.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-31
Publication Date
2024-12-13
Estimated Expiration
Not applicable · inactive patent

Smart Images

  • Figure CN115473894B_ABST
    Figure CN115473894B_ABST
Patent Text Reader

Abstract

The present invention discloses a computing power security perception and collaboration method based on blockchain in a computing network, which belongs to the field of computing power network; specifically: first, the user initiates a task request to the edge node connected, and the edge node allocates computing resources and bandwidth resources to the user by evaluating the wireless channel; after local resource optimization, the edge node calculates its own remaining resources and identifies its own type, and the collaborative node generates a computing power transaction and publishes it to the network; then, the requesting node generates a request transaction; the collaborative node makes a collaborative decision and provides collaborative computing services to generate a collaborative transaction; finally, the trust value of the collaborative node is calculated and a block generation node is selected; the block generation node packages all transactions into blocks; broadcast to the network and recorded in the blockchain. The present invention adopts blockchain technology to realize real-time information release and transaction records in the network, and can ensure the security of computing power perception and collaboration in the computing network in real time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computing power networks, and in particular to a computing power security perception and coordination method based on blockchain in a computing network. Background Art

[0002] In the "6G+MEC" era, computing networks integrate multi-level computing power, storage and other resource islands through ubiquitous network connections, and combine network information (such as bandwidth, latency, etc.) with different types of user needs to provide users with the best resource allocation solution. The computing network can achieve load balancing of network nodes through resource collaboration between nodes, optimize the use of resources across the entire network, ensure flexible and dynamic deployment of services and consistency of user experience, and users do not need to care about the location and deployment status of various basic resources. The network coordinates and dispatches various resources. [1] .

[0003] However, the computing network is a distributed network. The resource devices in the computing network are highly heterogeneous and are prone to security trust crises when sharing or trading. At present, the computing network still lacks a safe and reliable computing power perception and management solution. How to safely perceive the resource status of the entire network and achieve traceability of resource information and transaction information, and then achieve safe and efficient management of distributed resources in the computing network is a challenge facing the computing network. On the other hand, the computing network is a dynamic network. The lag and inaccuracy of resource perception will seriously affect the collaboration efficiency between computing nodes, thereby reducing the service quality of users. How to achieve real-time and accurate perception of computing power information across the entire network is another important challenge.

[0004] Reference [2] explored and studied multiple technologies such as the phased development of computing power networks, computing power-aware technology architecture, computing power measurement and identification, and computing power routing, and proposed multiple deployment modes for computing power networks; Reference [3] proposed a computing power-aware routing allocation system in a computing power-aware network, modeled a computing task scheduling problem composed of communication delays, and proposed a Floyd-based computing power-aware routing allocation strategy, which jointly optimized the routing strategy and computing power resource allocation; Reference [4] proposed a cloud-fog hybrid multi-level computing power network and computing offloading system, and defined a weighted cost function composed of delay, energy consumption, and payment. , modeling it as a cost-aware task scheduling problem, and designing a distributed task scheduling algorithm; Reference [5] studies the collaborative offloading incentive mechanism of tasks in mobile edge computing networks, and proposes an online resource allocation algorithm that maximizes the utility of the system by jointly optimizing the selection of collaborators, communication and computing resource allocation, and pricing strategy; Reference [6] designs a distributed resource management mechanism for mobile edge networks, and designs a pricing scheme using the Stackelberg game model, which enables MEC operators to obtain maximum utility by considering the trade-off between revenue and energy consumption.

[0005] Regarding the research on computing power perception and collaboration in computing power networks, there are still some problems that need to be solved in the existing work. First, how to ensure the security of computing power transactions between nodes? References [4] [5] [6] have considered computing power collaboration between nodes, but some key information in the collaboration process, such as resource information and price information, may be tampered with by malicious nodes, resulting in a decrease in system performance and user service quality.

[0006] Although a few studies have proposed blockchain-based solutions to enhance system security (such as references [7]-[9]), most of these works focus on offloading or resource allocation problems in MEC networks and are not applicable to computing power-aware scenarios in computing power networks. In addition, the above-mentioned references use a low-performance consensus mechanism and do not support services with low latency requirements (such as augmented reality tasks).

[0007] The computing power network is a dynamic network. However, some of the above work is designed and optimized based on one-time time slots. Considering dynamic factors such as node resource status, user needs, and network environment, these factors need to be carefully considered when designing computing power perception solutions, so as to achieve accurate and real-time perception of the computing power information of the entire network. In addition, the tasks of edge nodes arrive at different times, which makes traditional static solutions infeasible, so it is even more necessary to design dynamic solutions.

[0008] [1] Lei Bo, Chen Yunqing. Edge computing and computing network: new computing platform and network connection in the 5G+AI era[M]. Beijing: Publishing House of Electronics Industry, 2020.

[0009] [2] Duan Xiaodong, Yao Huijuan, Fu Yuexia, Lu Lu, Sun Tao. Computing network technology for computing-network integration evolution[J]. Telecommunications Science, 2021, 37(10): 76-85.

[0010] [3] Sun Yukun, Zhang Xing, Lei Bo. Research on intelligent computing power-aware routing allocation strategy in edge computing network[J]. Radio Communication Technology, 2022, 48(01): 60-67.

[0011] [4] Liu Zening, Li Kai, Wu Liantao, Wang Zhi, Yang Yang. Cost-aware task scheduling algorithm in multi-level computing power network[J]. Journal of Computer Research and Development, 2020, 57(09): 1810-1822.

[0012] [5]G.Li and J.Cai, "An online incentive mechanism for collaborativetask offloading in mobile edge computing," IEEE Transactions on WirelessCommunications, vol.19, no.1, pp.624–636, 2020.

[0013] [6] J.Lee, D.Kim, and D.Niyato, "Market analysis of distributed learning resource management for internet of things: A game-theoretic approach," IEEEInternet of Things Journal, vol.7, no.9, pp.8430–8439, 2020.

[0014] [7] Lv Hang, Li Jiacong, Lei Bo, Xie Yunpeng. Research on computing power trading mechanism based on blockchain combined with smart contracts [J / OL]. ZTE Communications Technology: 1-8 [2022-08-09]. http: / / kns.cnki.net / kcms / detail / 34.1228.TN.20220722.1742.018.html

[0015] [8]H.Yin, Z.Zhang, L.Zhu, M.Li,

[0016] [9] W.Sun, J.Liu, Y.Yue, and P.Wang, "Joint resource allocation and incentive design for blockchain-based mobile edge computing," IEEETransactions on Wireless Communications, vol.19, no.9, pp.6050–6064, 2020 Summary of the invention

[0017] The present invention proposes a computing power security perception and collaboration method based on blockchain in a computing network, solving the following problems: 1) In view of the security issues of computing power perception and collaboration between nodes in a computing power network, the present invention applies blockchain technology to the computing power network, evaluates the trust value of the node in combination with the historical behavior and resource capabilities of the node, and designs an efficient consensus mechanism (Proof-of-Trust, PoT) based on the trust value to improve the efficiency of computing network resource perception. 2) In view of the problem that computing power in a computing power network cannot be perceived in real time and accurately, the present invention jointly considers time-varying factors such as the resource status of the node, the channel quality of the user, and the release of the task, and designs a computing power perception solution that supports dynamic scenarios. The node first accurately evaluates its own resource status through self-optimization, and then publishes the information to the network in real time through the blockchain, thereby realizing real-time and accurate perception of information across the entire network.

[0018] The steps of the blockchain-based computing power security perception and coordination method are as follows:

[0019] Step 1: Build a dynamic scenario including users and edge nodes;

[0020] The set of edge nodes is U = {1, 2, ...u, ..., U}, and the set of users accessing node u in time slot t is

[0021] Step 2: At time slot t, user i initiates a task request to the connected edge node u, and the edge node calculates the revenue obtained based on the user's request;

[0022] First, edge node u collects the requests of connected user i and calculates the downlink rate of connected user i:

[0023]

[0024] in represents the bandwidth resources allocated by edge node u to user i, is the signal-to-interference-noise ratio;

[0025] Then, calculate the amount of rendering data provided by edge node u for user i:

[0026]

[0027] in, a is the video rendering conversion rate, is the local rendering resource allocated by node u to local user i, η u is the amount of data rendered by node u in one CPU cycle, and Δt is the time window.

[0028] Finally, edge node u calculates the benefit obtained from user i:

[0029]

[0030] in, is the maximum benefit that node u obtains from user i, is the maximum playback rate requested by user i.

[0031] Step 3: The edge node u calculates the rendering cost and further calculates the utility function based on the revenue;

[0032] First, edge node u calculates the local rendering cost, including rendering energy consumption and corresponding transmission cost:

[0033]

[0034] where α u is the CPU energy conversion efficiency of edge node u, is the unit energy consumption cost, is the unit bandwidth cost;

[0035] Then, the edge node u calculates the locally optimized utility function:

[0036]

[0037] Step 4: Use the utility function to locally optimize the edge node u and determine the local optimal bandwidth allocation decision by optimizing computing resources and bandwidth resources. and optimal computing resource allocation decisions

[0038] First, construct the local optimization problem of the edge node:

[0039]

[0040] stC0-1:

[0041] C0-2:

[0042] C0-3:

[0043] C0-4:

[0044] C0-5:

[0045] f loc (t) is the computing resource,

[0046] b loc (t) is the bandwidth resource,

[0047] C0-1 and C0-2 indicate that resource decisions should be positive values, and C0-3 indicates that the total bandwidth allocated to users cannot exceed the resource capacity of node u. C0-4 means that the total computing resources allocated to node u should not exceed the total computing capacity of node u C0-5 means that the amount of data rendered by node u should not exceed the maximum demand of the user;

[0048] Then, the local optimization problem is transformed;

[0049] definition For variables A lower limit value of , which converts the optimization problem P0 into the following form:

[0050]

[0051] stC1-1:

[0052] C1-2:

[0053] C1-3:

[0054] C1-4:

[0055] C1-5:(C0-1)-(C0-4)

[0056] Next, construct the Lagrangian function:

[0057]

[0058] Among them, τ(t), χ(t), are all Lagrange multipliers.

[0059] According to the Karush-Kuhn-Tucker (KKT) condition, the optimal local computing resource allocation and optimal bandwidth resource allocation of node u are obtained:

[0060]

[0061] Finally, the subgradient optimization method is used to update the Lagrange multiplier, and the iterative optimization is performed to obtain the optimal local optimization result of the edge node. and

[0062] Step 5: Each edge node calculates its own remaining resources based on its own optimization results, and identifies its own type as a requesting node or a collaborative node. Each collaborative node publishes the remaining resources to the network in the form of computing power transactions;

[0063] First, edge node u calculates the local remaining resources using the following formula:

[0064]

[0065] Then, edge node u determines its own type based on the remaining resources, as follows:

[0066]

[0067] Where ε is the node type judgment threshold, and are the requesting nodes and the collaboration nodes respectively, and

[0068] Finally, the node identified as a collaborative node publishes its remaining resources to the network in the form of computing power transactions;

[0069] Step 6: Each requesting node is a resource-scarce node. It determines the resource purchase price based on its own needs and the computing power information published in the network, and broadcasts its own resource purchase price and purchase budget to each collaborative node in the form of a request transaction;

[0070] Step 7: Each collaborative node is a node with sufficient resources. After receiving the request, it combines the bids of each requesting node, makes its own collaborative decision based on convex optimization theory to maximize its own benefits and provides collaborative computing services;

[0071] Collaborative decision-making means selecting the requesting nodes and the number of resources that need to provide services.

[0072] Step 8: After receiving their respective service results, each requesting node pays the resource price to the corresponding collaboration node, and the corresponding collaboration node generates a collaboration transaction after obtaining the payment result.

[0073] Step 9: Each node reads the performance data of the blockchain from the blockchain. Each collaborative node calculates its own trust value based on its own computing power status, and uses the trust value to select a block generation node from the collaborative nodes;

[0074] First, the behavior capability and resource capability are calculated for the collaborative node m′:

[0075]

[0076] in, is the behavior capability of the collaborative node m′, reflecting the average delay capability of the collaborative node m′ in maintaining the blockchain in the past time period Δτ. is the blockchain delay of time slot τ, is the remaining resource capacity of the collaborative node m′ at the current moment;

[0077] Then, the trust value of the collaborative node m′ is calculated:

[0078]

[0079] Where ω1 and ω2 are different trust weights, and ω1+ω2=1;

[0080] Finally, determine whether the cooperating node m′ is a block producer:

[0081]

[0082] where y m′ (t)=1 indicates that the cooperating node m′ is the current block producer, otherwise, the cooperating node m′ is not the current block producer.

[0083] Step 10: The block generation node collects computing power transactions, request transactions, and collaboration transactions in the network, and packages them into blocks for broadcasting in the network;

[0084] First, the block generation node calculates the size of the block:

[0085]

[0086] Where K represents the size of a transaction, Representing a collection size.

[0087] Step 11: Block generation nodes record the generation delay of blocks respectively Block transmission delay in the network And the block verification delay Calculate the overall latency of the blockchain and write it into the block header field, and record the block into the blockchain.

[0088] Overall latency of blockchain The calculation formula is:

[0089]

[0090] The advantages of the present invention are:

[0091] 1) The computing power security perception and collaboration method based on blockchain in the computing network of the present invention adopts blockchain technology to realize real-time information release and transaction records in the network, which can ensure the security of computing power perception and collaboration in real time;

[0092] 2) The computing power security perception and coordination method based on blockchain in the computing network of the present invention designs an optimal local resource optimization scheme based on convex optimization theory, which can accurately calculate the remaining resources of the node in each time slot in real time and identify its own type based on the remaining resources. Based on this optimization scheme, the node publishes this information to the network through the blockchain, ensuring the real-time and accuracy of computing power perception;

[0093] 3) The computing power security perception and collaboration method based on blockchain in the computing network of the present invention evaluates the trust value of the node in combination with the historical behavior and resource capabilities of the node, and proposes a consensus algorithm based on the trust value, which effectively improves the efficiency of computing power perception and collaboration. BRIEF DESCRIPTION OF THE DRAWINGS

[0094] Figure 1 This is a schematic diagram of the blockchain-based computing power security perception and coordination method of the present invention;

[0095] Figure 2 This is a flow chart of the computing power security perception and coordination method based on blockchain in the computing network of the present invention;

[0096] Figure 3 This is a schematic diagram of the computing power perception and collaboration architecture based on blockchain in the computing power network built in an embodiment of the present invention. DETAILED DESCRIPTION

[0097] The present invention is further described below with reference to the accompanying drawings and examples.

[0098] The present invention proposes a secure real-time computing power security perception and collaboration method for the computing power network based on blockchain technology. In this method, blockchain is used as the top-level information platform to realize the real-time release of computing power status and transaction records. Considering the performance of traditional blockchain, the present invention also designs an efficient trust-based consensus mechanism to adapt to the real-time computing power perception and collaboration needs in the computing network, and improve the perception and collaboration efficiency of computing network resources. Through the node local resource optimization scheme designed by the present invention, accurate self-perception of the node computing power status can be achieved, and each node can publish its own resource status to the network in real time through the blockchain, thereby realizing mutual perception of the computing power information of the entire network.

[0099] like Figure 1 As shown in the figure, the computing power security perception and coordination method based on blockchain is mainly divided into the following parts:

[0100] First, the user initiates a task request to the edge node to which he / she is connected. The task request includes the type and size of the task that the user needs to calculate. After receiving the request from the local user, the edge node allocates computing resources and bandwidth resources to the user by evaluating the wireless channel of the connected user. After optimizing local resources, the edge node calculates its own remaining resources and identifies its own type, such as a requesting node or a collaborative node. The collaborative node publishes its remaining resources to the network in the form of transactions (computing power transactions).

[0101] Then, the requesting node determines the resource purchase price based on its own needs and the computing power information published in the network, and sends the collaboration request (including resource price and purchase budget) to the collaboration node in the form of a transaction (called a request transaction); after receiving the collaboration request, the collaboration node begins to make collaboration decisions (selecting the requesting node and the number of resources that need to provide services) and provides collaborative computing services to the requesting node. After receiving the service result, the requesting node pays the resource price to the collaboration node. When the collaboration node obtains the payment result, a collaboration transaction (called a collaboration transaction) is generated on the collaboration node side.

[0102] Finally, each node reads the performance data of the blockchain from the blockchain and calculates the trust value of the nodes in the network based on the computing power of the current node. Then, the block generation node is selected from the collaborative nodes based on the trust value of each collaborative node. The block generation node is responsible for collecting various transactions from the network, including computing power transactions, request transactions, and collaborative transactions, and packaging all transactions into a block. The block is further broadcasted in the network to reach a consensus with other edge nodes. Once the entire network reaches a consensus between nodes, the block will eventually be recorded in the blockchain.

[0103] like Figure 2 As shown, the steps of the computing power security perception and coordination method based on blockchain in the computing network are as follows:

[0104] Step 1: Build a dynamic scenario including users and edge nodes;

[0105] The set of edge nodes is U = {1, 2, ...u, ..., U}, and the set of users accessing node u in time slot t is

[0106] Step 2: At time slot t, user i initiates a task request to the connected edge node u, and the edge node calculates the revenue obtained based on the user's request;

[0107] First, edge node u collects the requests of connected user i and calculates the downlink rate of connected user i:

[0108]

[0109] in represents the bandwidth resources allocated by edge node u to user i, is the signal-to-interference-noise ratio;

[0110] Then, calculate the amount of rendering data provided by edge node u for user i:

[0111]

[0112] in, a is the video rendering conversion rate, is the local rendering resource allocated by node u to local user i, η u is the amount of data rendered by node u in one CPU cycle, and Δt is the time window.

[0113] Finally, edge node u calculates the benefit obtained from user i:

[0114]

[0115] in, is the maximum benefit that node u obtains from user i, is the maximum playback rate requested by user i.

[0116] Step 3: The edge node u calculates the rendering cost and further calculates the utility function based on the revenue;

[0117] First, edge node u calculates the local rendering cost, including rendering energy consumption and corresponding transmission cost:

[0118]

[0119] where α u is the CPU energy conversion efficiency of edge node u, is the unit energy consumption cost, is the unit bandwidth cost;

[0120] Then, the edge node u calculates the locally optimized utility function:

[0121]

[0122] Step 4: Use the utility function to locally optimize the edge node u and determine the local optimal bandwidth allocation decision by optimizing computing resources and bandwidth resources. and optimal computing resource allocation decisions

[0123] First, construct the local optimization problem of the edge node:

[0124]

[0125] stC0-1:

[0126] C0-2:

[0127] C0-3:

[0128] C0-4:

[0129] C0-5:

[0130] f loc (t) is the computing resource,

[0131] b loc (t) is the bandwidth resource,

[0132] C0-1 and C0-2 indicate that resource decisions should be positive values, and C0-3 indicates that the total bandwidth allocated to users cannot exceed the resource capacity of node u. C0-4 means that the total computing resources allocated to node u should not exceed the total computing capacity of node u C0-5 means that the amount of data rendered by node u should not exceed the maximum demand of the user, otherwise it will reduce the rendering efficiency and cause waste of resources.

[0133] Secondly, transform the local optimization problem:

[0134] definition For variables A lower limit value of , then the problem P0 can be equivalently transformed into the following form:

[0135]

[0136] stC1-1:

[0137] C1-2:

[0138] C1-3:

[0139] C1-4:

[0140] C1-5:(C0-1)-(C0-4)

[0141] Again, construct the Lagrangian function for the above problem:

[0142]

[0143] Among them, τ(t), χ(t), are all Lagrange multipliers.

[0144] According to the Karush-Kuhn-Tucker (KKT) condition, the optimal local computing resource allocation and optimal bandwidth resource allocation of node u can be obtained:

[0145]

[0146] Finally, the subgradient optimization method is used to update the Lagrange multiplier, and the iterative optimization is performed to obtain the optimal local optimization result of the edge node. and

[0147] Step 5: Each edge node calculates its own remaining resources based on its own optimization results, and identifies its own type as a requesting node or a collaborative node. Each collaborative node publishes the remaining resources to the network in the form of computing power transactions;

[0148] First, edge node u calculates the local remaining resources:

[0149]

[0150] in, is the maximum computing resource of node u, Optimized for local results.

[0151] Then, edge node u determines its own type based on the remaining resources, as follows:

[0152]

[0153] Where ε is the node type judgment threshold, and are the requesting nodes and the collaboration nodes respectively, and

[0154] Finally, the node identified as a collaborative node publishes its remaining resources to the network in the form of computing power transactions;

[0155] Step 6: Each requesting node is a resource-scarce node. It determines the resource purchase price based on its own needs and the computing power information published in the network, and broadcasts its own resource purchase price and purchase budget to each collaborative node in the form of a request transaction;

[0156] Step 7: Each collaborative node is a node with sufficient resources. After receiving the request, it combines the bids of each requesting node, makes its own collaborative decision based on convex optimization theory to maximize its own benefits and provides collaborative computing services;

[0157] Collaborative decision-making means selecting the requesting nodes and the number of resources that need to provide services.

[0158] Step 8: After receiving their respective service results, each requesting node pays the resource price to the corresponding collaboration node, and the corresponding collaboration node generates a collaboration transaction after obtaining the payment result.

[0159] Step 9: Each node reads the performance data of the blockchain from the blockchain. Each collaborative node calculates its own trust value based on its own computing power status, and uses the trust value to select a block generation node from the collaborative nodes;

[0160] The trust value only needs to calculate the trust value of the collaborative node, and the block generation node must also be selected from the collaborative node set, because the collaborative node resources are more sufficient than the request node resources, which can ensure system performance.

[0161] First, the behavior capability and resource capability are calculated for the collaborative node m′:

[0162]

[0163] in, is the behavioral capability of the collaborative node m′, reflecting the average delay capability of the node to maintain the blockchain in the past time period Δτ, is the blockchain delay of time slot τ, is the remaining resource capacity of the collaborative node m′ at the current moment;

[0164] Then, the cooperation node m′ calculates the trust value according to the following formula:

[0165]

[0166] Where ω1 and ω2 are different trust weights, and ω1+ω2=1;

[0167] Finally, the node selects a block producer from the set of cooperating nodes according to the following formula to determine whether the cooperating node m′ is a block producer:

[0168]

[0169] where y m′ (t)=1 indicates that the cooperating node m′ is the current block producer, otherwise, the cooperating node m′ is not the current block producer.

[0170] Step 10: The block generation node collects computing power transactions, request transactions, and collaboration transactions in the network, packages them into blocks and broadcasts them in the network to reach a consensus with other edge nodes;

[0171] First, the block generation node collects transactions in the network and calculates the size of the block:

[0172]

[0173] Where K represents the size of a transaction, Representing a collection size.

[0174] Step 11: Block generation nodes record the generation delay of blocks respectively Block broadcast to the network, transmission delay in the network As well as the block generation node waiting for other nodes to verify, the corresponding verification delay of the block Calculate the overall latency of the blockchain and write it into the block header field, and record the block into the blockchain.

[0175] Overall latency of blockchain The calculation formula is:

[0176]

[0177] Example:

[0178] like Figure 3 As shown, a computing power perception and coordination architecture based on blockchain in the computing power network is built for this embodiment, in which blockchain is deployed as a trusted management platform for resource release and transaction. Taking the augmented reality task (VR) business as an example, the overall introduction of the architecture is as follows:

[0179] Users can experience immersive VR videos by using VR devices. It is assumed that all VR videos requested by users are cached in the MEC system in advance. If users request VR services, MEC needs to provide computing resources to help users render video blocks. Then, the rendered video blocks are transmitted to the user side through the downlink. Considering the limited computing resources of a single node in the network, nodes can collaborate with each other to complete the user's task request. Through the node local resource optimization scheme designed in this embodiment, each node can accurately calculate its own computing power status and publish the computing power resource situation to the network through the blockchain. According to the resource status, the nodes in the network are divided into two types, such as requesting nodes and collaborative nodes. As a resource-scarce node, the requesting node needs assistance from other nodes in the network to complete the user's computing task; while the collaborative node has sufficient resources, it can publish its own resource status to the network through the blockchain and sell its own computing power resources to obtain network benefits. The specific resource trading scheme between nodes, such as the resource price optimization of the requesting node and the resource selling scheme of the collaborative node, is not the focus, but the resource trading information between them can be recorded in the blockchain to achieve the security of collaboration.

[0180] The specific process is:

[0181] First, a dynamic scene is built in the system, whose rendering service is completed in several time slots, t = {1, 2, ..., T}; define U = {1, 2, ...u, ..., U} as the set of edge nodes, and assume that user requests arrive randomly. Assume that in time slot t, the set of access nodes u is Based on the user's request, each node can determine its own type, i.e., a requesting node or a cooperating node. A requesting node is a node that is short of resources, so it needs to determine a price to purchase resources from the network; a cooperating node is a node with sufficient resources and can sell its own resources to gain profit.

[0182] In the time window Δt, the amount of data rendered by the node for the user is expressed as

[0183] For the local rendering process, the benefit of node u is mainly related to the amount of data received from the user side, which is expressed as:

[0184]

[0185] in is the data transmission rate from downlink node u to user i. According to Shannon's formula, this rate can be expressed as

[0186] Assume that the maximum playback rate supported by user i is In order to obtain benefits and ensure rendering efficiency, the rendering resources provided by node u to user i should satisfy Correspondingly, the benefit obtained by edge node u from user i is expressed as:

[0187]

[0188] The local rendering cost mainly includes two factors: the energy consumption during the rendering process and the corresponding transmission cost. and are the unit energy consumption cost and unit bandwidth cost respectively. Therefore, the local rendering cost can be expressed as:

[0189]

[0190] The utility function of the corresponding edge node u is expressed as:

[0191] The goal of local optimization is to determine the optimal bandwidth and computing resource allocation, thereby obtaining the maximum benefit and determining the remaining resources of the node. Based on the remaining resources, the node can determine its own node type.

[0192] Each node can identify its own node type by calculating the local remaining resources, such as requesting node or cooperating node, and define and is the maximum computing resource and maximum bandwidth resource of node u, and the remaining resources of the node can be expressed as:

[0193]

[0194] The method for determining the type of a node is as follows:

[0195]

[0196] The corresponding users who access the request node and the set of collaborative nodes can be redefined as and

[0197] In the computing network, blockchain is used to record and publish important information. Blockchain needs to complete two steps to process transactions: the first step is block generation, and the second step is block consensus.

[0198] Block producers need to collect information from the network and package it into blocks, defining The computing resources invested by the collaborative node m′ when packaging a block, so it can be concluded that the time taken by the node to package a block is:

[0199]

[0200] Where S b (t) and C b They represent the size of the block and the number of cycles required to generate a 1-bit block. For example, as mentioned above, this embodiment considers three different types of transactions, such as computing power transactions, request transactions, and collaborative transactions. Therefore, the size of the block can be expressed as:

[0201]

[0202] When a block producer completes a block, the block will be further distributed to the network for verification. Assuming that wired transmission is used between nodes, the transmission rate between node m and node u is Therefore, the transmission delay of the block in the network can be obtained, that is, Assumptions is the computing resources required for node u to verify a block, from which the verification test of the block can be obtained, which is

[0203] Assumptions The overall delay of blockchain recording transactions. After the above analysis, the experiment can be expressed as:

[0204]

[0205] Next, the PoT consensus algorithm proposed in this embodiment is introduced. The nodes in the network need to elect the block producer at that moment based on the trust value of the node. The trust value of the node is mainly related to two factors, such as the historical behavior of the node and the resource capacity of the node. On the one hand, the historical capacity of the node is mainly related to the average delay of the node in maintaining the blockchain within the past period of time Δτ, which can be expressed as:

[0206]

[0207] On the other hand, the resource capacity of a node is mainly related to the remaining resources of the node at the current moment and can be expressed as:

[0208]

[0209] Based on the above analysis, the trust value of the node can be expressed as Therefore, it can be concluded

[0210]

[0211] Compared with the Proof of Work (PoW) consensus mechanism, PoT uses trust evaluation combined with real-time voting to select block producers, which improves the consensus speed and saves a lot of resources.

[0212] In this embodiment, all nodes need to perform local optimization, by optimizing the computing resources floc (t) and bandwidth resource b loc (t) to determine the local remaining resources and then judge the node type. The local optimization problem is as follows:

[0213]

[0214] stC0-1:

[0215] C0-2:

[0216] C0-3:

[0217] C0-4:

[0218] C0-5:

[0219] In the network, local resource optimization needs to be allocated to users first, and then the remaining resource status of the node and the identity type of the node can be determined. As mentioned above, the definition For variables A lower limit value of , then the problem P0 can be equivalently transformed into the following form:

[0220]

[0221] stC1-1:

[0222] C1-2:

[0223] C1-3:

[0224] C1-4:

[0225] C1-5:(C0-1)-(C0-4)

[0226] Since this problem is a convex problem, the Lagrange multiplier method can be used to solve it. The Lagrange function can be expressed as:

[0227]

[0228] For formula (13), we can define the variable ξ u,i (t), Finding the first-order partial derivative and setting it to 0, we can get:

[0229]

[0230]

[0231]

[0232] The above formula gives the optimal local computing resource allocation for the node, which is expressed as:

[0233]

[0234] According to the Karush-Kuhn-Tucker (KKT) condition, we can conclude that because So we can know that (ρ u,i (t)-ψ u,i (t))>0, based on the above analysis, the optimal bandwidth resource allocation strategy can be obtained:

[0235]

[0236] in,

[0237]

[0238] Next, the subgradient optimization method is used to update the Lagrange multiplier. The update method is as follows:

[0239]

[0240] in is the step size of the lth iteration.

[0241] The blockchain-based computing power perception and collaboration method proposed in the present invention ensures the security, accuracy and real-time performance of computing power perception in the computing power network; considering the performance of the blockchain, the proposed trust-based consensus algorithm can improve the efficiency of the blockchain, thereby ensuring the efficiency of computing power perception and node collaboration in the computing network; considering various dynamic factors in the computing power network, the present invention designs a resource self-perception scheme for nodes based on convex optimization theory, which enables nodes to accurately perceive their own resource status at every moment, and publish this information in real time through high-performance blockchain, solving the problems of real-time and accuracy of computing power perception in the computing power network.

Claims

1. Security perception and coordination method of computing power based on blockchain in computing network, It is characterized in that The specific steps are as follows: Step 1: Build a dynamic scenario including users and edge nodes; The set of edge nodes is U = {1, 2, ...u, ..., U}, and the set of users accessing node u in time slot t is Step 2: At time slot t, user i initiates a task request to the connected edge node u. The task request includes the task type and task size that the user needs to calculate; The edge node calculates the revenue obtained based on the user’s request; Step 3: After receiving the request from the local user, the edge node u evaluates the wireless channel of the access user, calculates the rendering cost, and further calculates the utility function based on the revenue. The edge node u is optimized locally using the utility function, and the optimal bandwidth allocation decision for the local user is determined by optimizing the computing resources and bandwidth resources. and optimal computing resource allocation decisions The specific process is: First, construct the local optimization problem of the edge node: f loc (t) is the computing resource, b loc (t) is the bandwidth resource, is the maximum benefit that node u obtains from user i, is the amount of rendering data provided by edge node u to user i, is the maximum playback rate requested by user i; Δt is the time window; α u is the CPU energy conversion efficiency of edge node u, is the local rendering resource allocated by node u to local user i, represents the bandwidth resources allocated by edge node u to user i, is the unit energy consumption cost, is the unit bandwidth cost; C0-1 and C0-2 indicate that resource decisions should be positive values, and C0-3 indicates that the total bandwidth allocated to users cannot exceed the resource capacity of node u. C0-4 means that the total computing resources allocated to node u should not exceed the total computing capacity of node u C0-5 means that the amount of data rendered by node u should not exceed the maximum demand of the user; Then, the local optimization problem is transformed; definition For variables A lower limit value of the optimization problem P 0 The equivalent form is as follows: C1-5:(C0-1)-(C0-4) Next, construct the Lagrangian function: Among them, τ(t), χ(t), All are Lagrange multipliers; According to the Karush-Kuhn-Tucker (KKT) condition, the optimal local computing resource allocation and optimal bandwidth resource allocation of node u are obtained: Finally, the subgradient optimization method is used to update the Lagrange multiplier, and the iterative optimization is performed to obtain the optimal local optimization result of the edge node. and Step 4: Each edge node calculates its own remaining resources based on its own optimization results, and identifies its own type as a requesting node or a collaborative node. Each collaborative node publishes the remaining resources to the network in the form of computing power transactions; Step 5: Each requesting node determines the resource purchase price based on its own needs and the computing power information published in the network, and broadcasts its own collaboration request including the resource price and purchase budget to the collaboration node in the form of a request transaction; Step 6: After receiving the collaboration request, each collaboration node combines the bids of each requesting node, and based on the convex optimization theory, starts to make collaboration decisions and provide collaborative computing services to the requesting node with the goal of maximizing its own benefits; Collaborative decision-making means: selecting the requesting nodes and the number of resources that need to provide services; Step 7: After receiving their respective service results, each requesting node pays the resource price to the corresponding collaboration node. When the corresponding collaboration node obtains the payment result, a collaboration transaction is generated; Step 8. Each node reads the performance data of the blockchain from the blockchain. Each collaborative node calculates its own trust value based on its own computing power. It uses the trust value to select a block generation node from the collaborative nodes, collects various transactions from the network, and packages them into blocks. These are broadcast in the network and recorded in the blockchain in order to reach a consensus with other edge nodes.

2. The computing power security perception and coordination method based on blockchain in the computing network as claimed in claim 1, It is characterized in that The calculation process of the benefit obtained by the edge node u is: First, edge node u collects the requests of connected user i and calculates the downlink rate of connected user i: in is the signal-to-interference-noise ratio; Then, calculate the amount of rendering data provided by edge node u for user i: in, a is the video rendering conversion rate, η u The amount of data rendered for one CPU cycle for node u; Finally, edge node u calculates the benefit obtained from user i:

3. The computing power security perception and coordination method based on blockchain in the computing network as claimed in claim 1, It is characterized in that The utility function calculation process is: First, the edge node u calculates the local rendering cost, including rendering energy consumption and corresponding transmission cost: Then, the edge node u calculates the locally optimized utility function:

4. The computing power security perception and coordination method based on blockchain in the computing network as claimed in claim 1, It is characterized in that The process of each edge node calculating the remaining resources and identifying its own type is as follows: First, edge node u calculates the local remaining resources using the following formula: Then, edge node u determines its own type based on the remaining resources, as follows: Where ε is the node type judgment threshold, and are the requesting nodes and the collaboration nodes respectively, and 5. The computing power security perception and coordination method based on blockchain in the computing network as claimed in claim 1, It is characterized in that The specific process of selecting a block generation node from the collaboration nodes is as follows: First, the behavior capability and resource capability are calculated for the collaborative node m′: in, is the behavior capability of the collaborative node m′, reflecting the average delay capability of the collaborative node m′ in maintaining the blockchain in the past time period Δτ. is the blockchain delay of time slot τ: The generation delay of collecting transactions and packaging blocks for block generation nodes; is the transmission delay of the block in the network, The verification delay of the block; is the remaining resource capacity of the collaborative node m′ at the current moment; Then, the trust value of the collaborative node m′ is calculated: where ω 1 and ω 2 are different trust weights, and ω 1 +ω 2 =1; Finally, determine whether the cooperating node m′ is a block producer: where y m′ (t)=1 indicates that the cooperating node m′ is the current block producer, otherwise, the cooperating node m′ is not the current block producer.

6. The computing power security perception and coordination method based on blockchain in the computing network as claimed in claim 1, It is characterized in that The block generation node calculates the size of the block: Where K represents the size of a transaction, Representing a collection size.