Resource exchange method and device based on block chain, equipment, medium and product

By building a blockchain-based utility function and resource exchange model between IoT devices and edge servers, the problem of low security and satisfaction of resource exchange in edge non-cooperation scenarios is solved, and efficient and secure resource exchange is achieved.

CN120045310AActive Publication Date: 2025-05-27DONGGUAN UNIV OF TECH
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411872421.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-05-27
Estimated Expiration
2044-12-18

AI Technical Summary

Technical Problem

In the edge non-cooperation scenario, IoT devices cannot achieve trusted resource exchange under low latency and low energy consumption, and the existing technology ignores the impact of the reputation of edge servers on resource exchange, resulting in low security and satisfaction.

Method used

By acquiring multiple edge servers and IoT devices, a blockchain-based utility function is built to characterize the satisfaction of resource exchange, and based on this, a resource exchange model is built, a resource exchange strategy is determined, and resource exchange is realized.

Benefits of technology

It improves the security and satisfaction of resource exchange, incentivizes edge servers to actively participate in resource exchange, and promotes the long-term and stable development of resource exchange.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120045310A_ABST
    Figure CN120045310A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of Internet of Things, block chains and mobile edge computing, and discloses a block chain-based resource exchange method, device and equipment, a medium and a product, and the method comprises the steps: obtaining a plurality of edge servers and a plurality of pieces of Internet of Things equipment; according to the edge server, the Internet of Things equipment and a preset block chain, a utility function is constructed, and the utility function is used for representing the resource exchange satisfaction degree between the Internet of Things equipment and the edge server; constructing a resource exchange model according to the utility function; determining a resource exchange strategy based on the resource exchange model; and completing resource exchange for the edge server, the Internet of Things equipment and the preset block chain according to the resource exchange strategy. According to the resource exchange method and device, the utility function is constructed according to the edge server, the Internet of Things equipment and the preset block chain for resource exchange, the security of resource exchange of the Internet of Things equipment on the preset block chain is visually reflected, the edge server is stimulated to actively participate in resource exchange, and the security and satisfaction of resource exchange are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical fields of the Internet of Things, blockchain, and mobile edge computing, and particularly relates to a resource exchange method, device, equipment, medium, and product based on blockchain. Background Art

[0002] With the rapid development of the Internet of Things and 5G technologies, the number of Internet of Things devices is increasing exponentially, and various computationally intensive and latency-sensitive applications emerge in an endless stream. For Internet of Things devices with scarce resources, they cannot meet the service quality requirements of low latency and low energy consumption for such applications.

[0003] In view of the above problems, related technologies usually adopt methods based on mobile edge computing and blockchain technologies. However, this method has the following deficiencies: in an edge non-cooperative scenario, different edge servers belong to different resource providers, and privacy information such as real demands of both resource exchange parties is opaque. Therefore, it is difficult to achieve trusted resource exchange under asymmetric information, and the security of resource exchange is low. In addition, existing resource exchanges usually take the conditions for exchanging resources within the edge server as the main factor, ignoring the impact of the reputation of the edge server on resource exchange, reducing the success rate of resource exchange and user satisfaction.

[0004] Therefore, related technologies have problems of low security and low satisfaction when performing resource exchange. Summary of the Invention

[0005] In view of this, the present disclosure provides a resource exchange method, device, equipment, medium, and product based on blockchain to solve the problems of low security and low satisfaction existing in related technologies when performing resource exchange.

[0006] In a first aspect, the present disclosure provides a resource exchange method based on blockchain, and the method includes:

[0007] Obtain a plurality of edge servers and a plurality of Internet of Things devices;

[0008] Construct a utility function according to the edge servers, Internet of Things devices, and a preset blockchain, where the utility function is used to represent the resource exchange satisfaction between the Internet of Things devices and the edge servers;

[0009] Construct a resource exchange model according to the utility function;

[0010] Determine a resource exchange strategy based on the resource exchange model;

[0011] Complete resource exchange for the edge servers, Internet of Things devices, and the preset blockchain according to the resource exchange strategy.

[0012] In the embodiments of the present disclosure, multiple edge servers and multiple Internet of Things (IoT) devices are obtained; a utility function is constructed based on the edge servers, IoT devices, and a preset blockchain, where the utility function is used to represent the satisfaction degree of resource exchange between the IoT devices and the edge servers; a resource exchange model is constructed according to the utility function; a resource exchange strategy is determined based on the resource exchange model; and resource exchange is completed for the edge servers, IoT devices, and the preset blockchain according to the resource exchange strategy. Since the embodiments of the present disclosure construct a utility function based on the edge servers, IoT devices, and the preset blockchain for resource exchange, it intuitively reflects the security of resource exchange of IoT devices on the preset blockchain, encourages edge servers to actively participate in resource exchange, and improves the security and satisfaction degree of resource exchange.

[0013] In an alternative embodiment, the utility function includes the utility function of the edge server. Constructing the utility function based on the edge servers, IoT devices, and the preset blockchain includes:

[0014] Construct a reputation evaluation function for the edge server according to the edge server, IoT devices, and the preset blockchain;

[0015] Determine a first parameter of the edge server according to the reputation evaluation function of the edge server, where the first parameter is used to represent the conditions for exchanging resources within the edge server;

[0016] Determine a second parameter of the IoT device according to the first parameter, where the second parameter is used to determine the quantity of resources that the IoT device requests from the edge server;

[0017] Construct a utility function for the edge server according to the first parameter, the second parameter, and a third parameter, where the third parameter is used to represent the preset conditions for exchanging resources within the edge server.

[0018] In the embodiments of the present disclosure, by evaluating the reputation of the edge server and determining the first parameter based on the reputation evaluation function, and then constructing the utility function of the edge server, the incentive for high-reputation edge servers is realized, more edge servers are encouraged to participate in resource exchange, the security of resource exchange is improved, and the long-term stable development of resource exchange is promoted.

[0019] In an alternative embodiment, the utility function includes the utility function of the IoT device. Constructing the utility function based on the edge servers, IoT devices, and the preset blockchain includes:

[0020] Construct a resource exchange security degree function for the IoT device according to the edge server, IoT devices, and the preset blockchain;

[0021] Construct a resource exchange security satisfaction function for the IoT device according to the resource exchange security degree function of the IoT device;

[0022] Determine a fourth parameter of the Internet of Things device according to a first parameter and a second parameter, where the fourth parameter is used to characterize the cost required for the Internet of Things device to successfully exchange resources within the edge server;

[0023] Construct a utility function of the Internet of Things device according to the resource exchange security satisfaction function and the fourth parameter of the Internet of Things device.

[0024] In the embodiments of the present disclosure, by constructing a resource exchange security degree function of the Internet of Things device, constructing a resource exchange security satisfaction function of the Internet of Things device based on the resource exchange security degree function, and further constructing a utility function of the Internet of Things device, the security of resource exchange of the Internet of Things device on a preset blockchain can be intuitively reflected.

[0025] In an alternative implementation manner, construct a resource exchange model according to the utility function, including:

[0026] Construct a first parameter optimization sub-problem according to the utility function of the edge server;

[0027] Construct a second parameter optimization sub-problem according to the utility function of the Internet of Things device;

[0028] Construct a resource exchange model according to the first parameter optimization sub-problem and the second parameter optimization sub-problem.

[0029] In the embodiments of the present disclosure, by constructing a first parameter optimization sub-problem and a second parameter optimization sub-problem according to the utility function of the edge server and the utility function of the Internet of Things device, and further constructing a resource exchange model, the resource exchange problem between the edge server and the Internet of Things device can be modeled.

[0030] In an alternative implementation manner, determine a resource exchange strategy based on the resource exchange model, including:

[0031] Process the first parameter optimization sub-problem according to a preset algorithm to determine a first strategy;

[0032] Process the second parameter optimization sub-problem according to a preset algorithm to determine a second strategy;

[0033] Determine a resource exchange strategy according to the first strategy and the second strategy.

[0034] In the embodiments of the present disclosure, by processing the first parameter optimization sub-problem and the second parameter optimization sub-problem according to a preset algorithm to determine the first strategy and the second strategy, and further determining the resource exchange strategy, the resource exchange problem between the edge server and the Internet of Things device can be solved.

[0035] In an alternative embodiment, after the resource exchange between the edge server, the Internet of Things device, and the preset blockchain is completed according to the resource exchange policy, the method further includes:

[0036] Obtain the reputation value of the edge server according to the reputation evaluation function of the edge server;

[0037] Based on the Internet of Things device, send the optimized first parameter, the optimized second parameter, and the reputation value of the edge server to the edge server;

[0038] Based on the edge server, verify the optimized first parameter, the optimized second parameter, and the reputation value of the edge server;

[0039] When the verification is passed, based on the edge server, add the optimized first parameter, the optimized second parameter, and the reputation value of the edge server to the preset blockchain.

[0040] In the embodiments of the present disclosure, by verifying the optimized first parameter, the optimized second parameter, and the reputation value of the edge server based on the edge server, the verification of resource exchange information is realized. By adding the optimized first parameter, the optimized second parameter, and the reputation value of the edge server to the preset blockchain when the verification is passed, the transparency of the resource exchange process is realized, and the security of the resource exchange is improved.

[0041] In a second aspect, the present disclosure provides a resource exchange device based on a blockchain, and the device includes:

[0042] An acquisition module, configured to acquire a plurality of edge servers and a plurality of Internet of Things devices;

[0043] A first construction module, configured to construct a utility function according to the edge server, the Internet of Things device, and the preset blockchain, where the utility function is used to characterize the resource exchange satisfaction between the Internet of Things device and the edge server;

[0044] A second construction module, configured to construct a resource exchange model according to the utility function;

[0045] A determination module, configured to determine a resource exchange policy based on the resource exchange model;

[0046] An exchange module, configured to complete resource exchange between the edge server, the Internet of Things device, and the preset blockchain according to the resource exchange policy.

[0047] In a third aspect, the present disclosure provides a computer device, including: a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to execute the blockchain-based resource exchange method according to the first aspect or any corresponding embodiment thereof.

[0048] In a fourth aspect, the present disclosure provides a computer-readable storage medium, on which computer instructions are stored. The computer instructions are used to cause a computer to execute the blockchain-based resource exchange method according to the first aspect or any corresponding embodiment thereof.

[0049] In a fifth aspect, the present disclosure provides a computer program product, including computer instructions, which are used to cause a computer to execute the blockchain-based resource exchange method according to the first aspect or any corresponding embodiment thereof. Description of the Drawings

[0050] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the following will briefly introduce the drawings required for use in the description of the specific embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present disclosure. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0051] Figure 1 is a flowchart of the blockchain-based resource exchange method according to an embodiment of the present disclosure;

[0052] Figure 2 is a system model diagram of the blockchain-based resource exchange method according to an embodiment of the present disclosure;

[0053] Figure 3 is a resource exchange model diagram of the blockchain-based resource exchange method according to an embodiment of the present disclosure;

[0054] Figure 4 is a flowchart of the blockchain-based resource exchange method according to another embodiment of the present disclosure;

[0055] Figure 5 is a structural block diagram of the blockchain-based resource exchange device according to an embodiment of the present disclosure;

[0056] Figure 6 is a hardware structure diagram of the computer device according to an embodiment of the present disclosure. Detailed Embodiments

[0057] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure. Apparently, the described embodiments are some, but not all, of the embodiments of the present disclosure. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present disclosure without creative efforts shall fall within the protection scope of the present disclosure.

[0058] With the rapid development of the Internet of Things (IoT) and 5G technologies, the number of IoT devices is increasing exponentially, and various computing-intensive and latency-sensitive applications are emerging in an endless stream. For resource-constrained IoT devices, it is impossible to meet the service quality requirements of low latency and low energy consumption for such applications.

[0059] To address the above problems, related technologies usually adopt methods based on mobile edge computing and blockchain technologies. However, this method has the following drawbacks: In an edge non-cooperative scenario, different edge servers belong to different resource providers, and privacy information such as the real demands of both parties in resource exchange is opaque. Therefore, it is difficult to achieve trusted resource exchange under asymmetric information, and the security of resource exchange is low. In addition, existing resource exchanges usually take the conditions for exchanging resources within the edge server as the main factor, ignoring the impact of the reputation of the edge server on resource exchange, which reduces the success rate of resource exchange and user satisfaction.

[0060] Therefore, related technologies have problems of low security and low satisfaction when performing resource exchange.

[0061] To solve the above problems, according to the embodiments of the present disclosure, an embodiment of a resource exchange method based on blockchain is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.

[0062] In this embodiment, a resource exchange method based on blockchain is provided, as Figure 1 shown, Figure 1 is a flowchart of a resource exchange method based on blockchain according to the embodiments of the present disclosure. This process can be applied to a server and includes the following steps:

[0063] Step S101, obtain a plurality of edge servers and a plurality of IoT devices.

[0064] Optionally, as Figure 2As shown in the figure, in the embodiment of the present disclosure, the system model of the blockchain-based resource exchange method includes an edge layer and an Internet of Things (IoT) device layer. Among them, the edge layer includes multiple edge servers, and the IoT device layer includes multiple IoT devices. The IoT devices can access the edge servers through 4G / 5G / Wi-Fi and other means. During the resource exchange process, the edge servers with sufficient resources provide resources to the IoT devices with limited resources, and the IoT devices with limited resources request resources from the edge servers with sufficient resources. Each IoT device can only select one edge server to request resources, but each edge server can provide resources to multiple IoT devices simultaneously.

[0065] Specifically, an edge server refers to any type of server residing on the logical edge of the network, and its service environment and cloud computing capabilities are provided by Mobile Edge Computing (MEC). Mobile Edge Computing is a distributed computing paradigm that sinks central cloud services and resources to the edge close to users. IoT devices can offload computing tasks to the edge servers for execution to meet the diverse task requirements of users.

[0066] Step S102: Construct a utility function based on the edge servers, IoT devices, and a preset blockchain, where the utility function is used to represent the satisfaction of resource exchange between the IoT devices and the edge servers.

[0067] Optionally, as Figure 2 shown in the figure, in the embodiment of the present disclosure, the system model of the blockchain-based resource exchange method further includes a blockchain layer in addition to the edge layer and the IoT device layer mentioned in the above embodiment. Among them, the IoT devices act as blockchain users, and the edge servers act as blockchain consensus nodes.

[0068] It should be noted that blockchain, as a technology for multi-party co-construction, sharing, and co-management, can not only enable resource suppliers and resource demanders to complete resource exchange through the blockchain, making the resource exchange process safer and more transparent, but also ensure the trusted sharing of data through the consensus mechanism. The preset blockchain selected in the embodiment of the present disclosure is a blockchain based on a Directed Acyclic Graph (DAG). The DAG blockchain allows new resource exchanges to be added in parallel without restricting the throughput of resource exchanges.

[0069] Specifically, the server constructs a utility function according to the relationship between the edge servers and IoT devices and the resource exchange security on the DAG blockchain, and the utility function is used to represent the satisfaction of resource exchange between the IoT devices and the edge servers.

[0070] Step S103: Construct a resource exchange model according to the utility function.

[0071] Optionally, in the embodiments of the present disclosure, a resource exchange model is used to model the resource exchange problem between an edge server and an Internet of Things device.

[0072] It should be noted that the selected resource exchange model in this embodiment is the Stackelberg game model. The Stackelberg game model is a leader-follower game model that reflects asymmetric competition. The leader takes action first, and the follower adjusts its strategy according to the leader's action. That is, the leader influences the follower's decision by determining its own strategy, and the follower selects its optimal strategy after observing the leader's choice.

[0073] Specifically, the server models the resource exchange problem between the edge server and the Internet of Things device according to the utility function, and constructs a Stackelberg game model, where the edge server is the leader and the Internet of Things device is the follower.

[0074] Step S104: Determine a resource exchange strategy based on the resource exchange model.

[0075] Optionally, in the embodiments of the present disclosure, the resource exchange strategy is used to solve the resource exchange problem between the edge server and the Internet of Things device.

[0076] Specifically, the server solves the resource exchange problem between the edge server and the Internet of Things device based on the Stackelberg game model, and determines the optimal resource exchange strategy.

[0077] Step S105: Complete the resource exchange for the edge server, the Internet of Things device, and a preset blockchain according to the resource exchange strategy.

[0078] Optionally, in the embodiments of the present disclosure, the server completes the resource exchange for the edge server, the Internet of Things device, and a DAG blockchain according to the resource exchange strategy.

[0079] In the embodiments of the present disclosure, multiple edge servers and multiple Internet of Things (IoT) devices are obtained; a utility function is constructed based on the edge servers, the IoT devices, and a preset blockchain, where the utility function is used to characterize the satisfaction degree of resource exchange between the IoT devices and the edge servers; a resource exchange model is constructed based on the utility function; a resource exchange strategy is determined based on the resource exchange model; and resource exchange is completed for the edge servers, the IoT devices, and the preset blockchain according to the resource exchange strategy. Since the embodiments of the present disclosure construct a utility function for resource exchange based on the edge servers, the IoT devices, and the preset blockchain, it intuitively reflects the security of resource exchange of the IoT devices on the preset blockchain, encourages the edge servers to actively participate in resource exchange, and improves the security and satisfaction degree of resource exchange.

[0080] In some alternative embodiments, the utility function includes the utility function of the edge server. Constructing the utility function based on the edge servers, the IoT devices, and the preset blockchain includes:

[0081] Constructing a reputation evaluation function for the edge server based on the edge servers, the IoT devices, and the preset blockchain;

[0082] Determining a first parameter of the edge server based on the reputation evaluation function of the edge server, where the first parameter is used to characterize the conditions for exchanging resources within the edge server;

[0083] Determining a second parameter of the IoT device based on the first parameter, where the second parameter is used to determine the quantity of resources that the IoT device requests from the edge server;

[0084] Constructing the utility function of the edge server based on the first parameter, the second parameter, and a third parameter, where the third parameter is used to characterize the preset conditions for exchanging resources within the edge server.

[0085] Optionally, in the embodiments of the present disclosure, the utility function includes the utility function of the edge server.

[0086] Specifically, the server first evaluates the reputation of the edge server through the IoT devices according to the security of the resource exchange published by the edge server on the DAG blockchain, and constructs the reputation evaluation function r i of the edge server i (λ i ), and the evaluation function r i (λ i ) is defined as follows:

[0087] r i (λ i ) ∈ [-0.5, 0.5]

[0088] where λ iDenote the task (exchange) arrival rate of the Internet of Things device d i which follows a Poisson distribution.

[0089] Since the higher the exchange arrival rate, the shorter the latency required for the exchange to be verified, the safer the on-chain exchange, and the higher the security of the resource exchange published by the edge server on the DAG blockchain, and the higher the edge server's credibility, therefore, the credibility evaluation function r i (λ i ) has a positive correlation with the exchange arrival rate λ i .

[0090] Then, the server determines the first parameter of the edge server according to the credibility evaluation function r i (λ i ), and the first parameter The first parameter is defined as follows:

[0091]

[0092] where p i is used to characterize the initial condition of the resources in the exchange edge server, and the higher the edge server credibility r i , the higher the first parameter .

[0093] Next, the server determines the second parameter k of the Internet of Things device according to the first parameter , where k i λ i , and k i represents the amount of resources required for the Internet of Things device d i to execute each task. Furthermore, according to the first parameter , the second parameter k i λ i and the third parameter c, the server constructs the utility function U ESP of the edge server, and the utility function U ESP of the edge server is defined as follows:

[0094]

[0095] where N is the number of Internet of Things devices.

[0096] In the embodiments of the present disclosure, by evaluating the credibility of the edge server, determining the first parameter based on the credibility evaluation function, and then constructing the utility function of the edge server, the incentive for high-credibility edge servers is realized, encouraging more edge servers to participate in resource exchange, improving the security of resource exchange, and promoting the long-term stable development of resource exchange.

[0097] In some alternative embodiments, the utility function includes the utility function of the Internet of Things (IoT) device. The server constructs the utility function based on the edge server, the IoT device, and a preset blockchain, including:

[0098] Construct a resource exchange security degree function of the IoT device according to the edge server, the IoT device, and the preset blockchain;

[0099] Construct a resource exchange security satisfaction function of the IoT device according to the resource exchange security degree function of the IoT device;

[0100] Determine a fourth parameter of the IoT device according to a first parameter and a second parameter, where the fourth parameter is used to represent the cost required for the IoT device to successfully exchange resources into the edge server;

[0101] Construct the utility function of the IoT device according to the resource exchange security satisfaction function of the IoT device and the fourth parameter.

[0102] Optionally, in the embodiments of the present disclosure, the utility function includes, in addition to the utility function of the edge server mentioned in the above embodiments, the utility function of the IoT device.

[0103] Specifically, the server first constructs a resource exchange security degree function s i of the IoT device d i (λ i ) according to the security of the resource exchange published by the edge server on the DAG blockchain, where s i (·) is a mapping function of λ i .

[0104] Since the higher the exchange arrival rate, the shorter the delay required for the exchange to be verified and the safer the on-chain exchange, there is a positive correlation between the resource exchange security degree function s i (λ i ) and the exchange arrival rate λ i .

[0105] Then, the server constructs a resource exchange security satisfaction function S i (λ i ) of the IoT device according to the resource exchange security degree function s i . The resource exchange security satisfaction function S i is defined as follows:

[0106] S i = θ log(1 + s i (λ i ))

[0107] where θ is a security satisfaction factor, and the value of θ is greater than 0.

[0108] Next, the server, according to the first parameter and the second parameter k i λ i determines the fourth parameter of the Internet of Things device Furthermore, according to the resource exchange security satisfaction function S i and the fourth parameter constructs the utility function of the Internet of Things device The utility function of the Internet of Things device is defined as follows:

[0109]

[0110] In the embodiments of the present disclosure, by constructing the resource exchange security degree function of the Internet of Things device and constructing the resource exchange security satisfaction function of the Internet of Things device based on the resource exchange security degree function, and then constructing the utility function of the Internet of Things device, the security of the Internet of Things device for resource exchange on the preset blockchain can be intuitively reflected.

[0111] In some alternative embodiments, according to the utility function, a resource exchange model is constructed, including:

[0112] According to the utility function of the edge server, a first parameter optimization sub-problem is constructed;

[0113] According to the utility function of the Internet of Things device, a second parameter optimization sub-problem is constructed;

[0114] According to the first parameter optimization sub-problem and the second parameter optimization sub-problem, a resource exchange model is constructed.

[0115] Optionally, the selected resource exchange model in this embodiment is the Stackelberg game model.

[0116] Specifically, the server first constructs the first parameter optimization sub-problem P1 according to the utility function U ESP of the edge server, and optimizes p i to further optimize the first parameter The first parameter optimization sub-problem P1 can be expressed as:

[0117]

[0118] where p min represents the lower limit of p i and p max represents the upper limit of p i

[0119] Then, the server constructs the second parameter optimization sub-problem P2 according to the utility function U i UE of the Internet of Things device and optimizes λ​i Furthermore, optimize the second parameter k i λ i , and the second-parameter optimization sub-problem P2 can be expressed as:

[0120]

[0121] where h r represents the time of the display phase in the DAG blockchain, is the average inter-arrival time between two exchanges, and μ is the wireless channel service rate. Constraint C1 ensures that the network load is in a stable high-load state, and constraint C2 requires that the task arrival rate cannot exceed the service rate.

[0122] As Figure 3 shown, the server optimizes the first-parameter optimization sub-problem P1 and the second-parameter optimization sub-problem P2 to construct a Stackelberg game model, including two stages: in the first stage, model the first-parameter optimization sub-problem P1, and the edge server, as the leader, determines p i , to obtain the strategy of the edge server; in the second stage, model the second-parameter optimization sub-problem P2, and the IoT device, as the follower, determines λ i . Among them, the competition among IoT devices forms a non-cooperative game, and each IoT device needs to consider the p i determined by the edge server and the λ -i determined by other IoT devices, and then determine its own λ i .

[0123] In the embodiments of the present disclosure, by constructing the first-parameter optimization sub-problem and the second-parameter optimization sub-problem according to the utility function of the edge server and the utility function of the IoT device, and then constructing a resource exchange model, the resource exchange problem between the edge server and the IoT device can be modeled.

[0124] In some alternative embodiments, based on the resource exchange model, determine a resource exchange strategy, including:

[0125] Process the first-parameter optimization sub-problem according to a preset algorithm to determine a first strategy;

[0126] Process the second-parameter optimization sub-problem according to a preset algorithm to determine a second strategy;

[0127] Determine a resource exchange strategy according to the first strategy and the second strategy.

[0128] Optionally, the preset algorithm adopted in the embodiments of the present disclosure is an iterative algorithm based on backward induction, and this algorithm can be expressed as:

[0129] Input: p i Initialize Algorithm convergence accuracy ε, iterative update step size η, number of iterations t.

[0130] Output: λ * , p * .

[0131] 1: Iterate;

[0132] 2: Each IoT device optimizes the second parameter;

[0133] 3: The edge server updates the first policy according to the subgradient algorithm, and the subgradient algorithm is defined as follows: Where, represents the gradient of the utility function U of the edge server in each direction; ESP in each direction;

[0134] 4: t = t + 1;

[0135] 5: Until the condition is satisfied;

[0136] 6: The algorithm terminates and outputs λ * and p * .

[0137] Where, p * represents the optimal solution of p i , λ * represents the optimal solution of λ i . When the balance condition is satisfied, the Stackelberg game model reaches the Nash equilibrium, and the utility functions U ESP of the edge server and the utility function U i UE of the IoT device reach the maximum. (λ * , p * ) is the equilibrium point of the Stackelberg game model, and the balance condition can be expressed as:

[0138] U ESP (λ * , p * ) ≥ U ESP (λ * , p)

[0139]

[0140] Where, represents the optimal exchange arrival rate vector of all IoT devices except IoT device i.

[0141] Specifically, as Figure 3 shown, the server first processes the second parameter optimization sub-problem P2, with the given p iUnder this condition, optimize λ through the Internet of Things device i , and then optimize the second parameter k i λ i , maximize the utility function of the Internet of Things device Obtain the strategy of the Internet of Things device.

[0142] Then, the server substitutes the strategy of the Internet of Things device into the first stage, processes the first parameter optimization sub-problem P1, and optimizes p through the edge server under the given λ i , and then optimize the first parameter i Maximize the utility function U of the edge server , optimize the strategy of the edge server. ESP

[0143] Finally, the server iteratively processes the optimal solutions of the second parameter optimization sub-problem P2 and the first parameter optimization sub-problem P1. In each iteration, the gradient descent algorithm is used to adjust and optimize the strategy of the edge server, and then update and optimize the strategy of the Internet of Things device. When the condition is satisfied, the algorithm terminates, determines the first strategy and the second strategy, and determines the resource exchange strategy according to the first strategy and the second strategy, and obtains and outputs the unique equilibrium point (λ * , p * ) of the Stackelberg game model.

[0144] In addition, the server can also give the function expressions of s i (·) and r(·) according to the actual user needs to verify the existence and uniqueness of the equilibrium of the Stackelberg game model. i (·), verify the existence and uniqueness of the equilibrium of the Stackelberg game model.

[0145] In the embodiment of the present disclosure, by processing the first parameter optimization sub-problem and the second parameter optimization sub-problem according to the preset algorithm, determining the first strategy and the second strategy, and then determining the resource exchange strategy, the resource exchange problem between the edge server and the Internet of Things device can be solved.

[0146] In some alternative embodiments, after completing the resource exchange for the edge server, the Internet of Things device, and the preset blockchain according to the resource exchange strategy, the method further includes:

[0147] Obtain the reputation value of the edge server according to the reputation evaluation function of the edge server;

[0148] Based on the Internet of Things device, send the optimized first parameter, the optimized second parameter, and the reputation value of the edge server to the edge server;

[0149] Based on the edge server, verify the optimized first parameter, the optimized second parameter, and the reputation value of the edge server;

[0150] When the verification is passed, based on the edge server, the optimized first parameter, the optimized second parameter, and the reputation value of the edge server are added to the preset blockchain.

[0151] Optionally, in the embodiments of the present disclosure, after the server completes the resource exchange, the resource exchange information can be processed, where the resource exchange information refers to the information in the resource exchange process, including the optimized first parameter, the optimized second parameter, and the reputation value of the edge server, etc.

[0152] Specifically, the server obtains the reputation value r of the edge server according to the reputation evaluation function r i (λ i ), and then sends resource exchange information such as the optimized first parameter, the optimized second parameter, and the reputation value of the edge server to the edge server through the IoT device. Then, according to the blockchain consensus algorithm, the edge server verifies the resource exchange information. When the verification is passed, the edge server packages the resource exchange information into blocks and adds them to the DAG blockchain. i In the embodiments of the present disclosure, by verifying the optimized first parameter, the optimized second parameter, and the reputation value of the edge server based on the edge server, the verification of the resource exchange information is realized. By adding the optimized first parameter, the optimized second parameter, and the reputation value of the edge server to the preset blockchain when the verification is passed, the openness and transparency of the resource exchange process are realized, and the security of the resource exchange is improved.

[0153] In some alternative embodiments, as

[0154] shown, Figure 4 Figure 4It is a schematic flowchart of a blockchain-based resource exchange method according to another embodiment of the present disclosure. In the figure, the server first initializes the system through Internet of Things devices and edge servers, obtains corresponding identity identifiers (public key, private key, and security certificate) and device information to complete identity construction, and then the Internet of Things devices issue resource requests according to their own business needs. In the first stage, the edge server acts as the leader to formulate the first parameter for different user devices and send the first parameter to the Internet of Things devices; in the second stage, the Internet of Things devices act as followers and, in the non-cooperative game with other Internet of Things devices, determine the second parameter according to the first parameter, and then evaluate the credibility of the edge server and the exchange security degree on the preset blockchain according to the exchange arrival rate of the Internet of Things devices. If the Nash equilibrium is not reached, return to the step where the Internet of Things devices issue resource requests according to their own business needs and continue iterative processing until the Nash equilibrium is reached. When the Nash equilibrium is reached, the Internet of Things devices send the resource exchange service requirement information to the edge server, then the edge server provides resources for the Internet of Things devices, and then the Internet of Things devices send the optimized fourth parameter to the edge server. Finally, the Internet of Things devices send the resource exchange information to the edge server for verification, and the edge server packages the resource exchange information and adds it to the preset blockchain.

[0155] In this embodiment, a blockchain-based resource exchange device is also provided. This device is used to implement the above embodiments and preferred implementation manners, and those that have been described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.

[0156] This embodiment provides a blockchain-based resource exchange device, as Figure 5 shown, including:

[0157] An acquisition module 501, configured to acquire a plurality of edge servers and a plurality of Internet of Things devices;

[0158] A first construction module 502, configured to construct a utility function according to the edge server, the Internet of Things device, and the preset blockchain, where the utility function is used to characterize the resource exchange satisfaction degree between the Internet of Things device and the edge server;

[0159] A second construction module 503, configured to construct a resource exchange model according to the utility function;

[0160] A determination module 504, configured to determine a resource exchange strategy based on the resource exchange model;

[0161] An exchange module 505 is configured to perform resource exchange on edge servers, Internet of Things devices, and a preset blockchain according to a resource exchange policy.

[0162] In an embodiment of the present disclosure, a plurality of edge servers and a plurality of Internet of Things devices are obtained; a utility function is constructed according to the edge servers, the Internet of Things devices, and a preset blockchain, where the utility function is used to characterize the resource exchange satisfaction degree between the Internet of Things devices and the edge servers; a resource exchange model is constructed according to the utility function; a resource exchange policy is determined based on the resource exchange model; and resource exchange is performed on the edge servers, the Internet of Things devices, and the preset blockchain according to the resource exchange policy. Since the embodiment of the present disclosure constructs a utility function according to the edge servers, the Internet of Things devices, and the preset blockchain for resource exchange, it intuitively reflects the security of resource exchange of the Internet of Things devices on the preset blockchain, encourages the edge servers to actively participate in resource exchange, and improves the security and satisfaction degree of resource exchange.

[0163] In some alternative embodiments, the first construction module 502 includes:

[0164] A first construction unit is configured to construct a reputation evaluation function of an edge server according to the edge server, the Internet of Things device, and the preset blockchain;

[0165] A determination unit is configured to determine a first parameter of the edge server according to the reputation evaluation function of the edge server, where the first parameter is used to characterize the condition for exchanging resources within the edge server;

[0166] A second determination unit is configured to determine a second parameter of the Internet of Things device according to the first parameter, where the second parameter is used to determine the quantity of resources that the Internet of Things device requests from the edge server;

[0167] A second construction unit is configured to construct a utility function of the edge server according to the first parameter, the second parameter, and a third parameter, where the third parameter is used to characterize a preset condition for exchanging resources within the edge server.

[0168] In some alternative embodiments, the first construction module 502 includes:

[0169] A third construction unit is configured to construct a resource exchange security degree function of the Internet of Things device according to the edge server, the Internet of Things device, and the preset blockchain;

[0170] A fourth construction unit is configured to construct a resource exchange security satisfaction degree function of the Internet of Things device according to the resource exchange security degree function of the Internet of Things device;

[0171] A third determination unit, configured to determine a fourth parameter of the Internet of Things device according to a first parameter and a second parameter, where the fourth parameter is used to characterize the cost required for the Internet of Things device to successfully exchange resources into the edge server;

[0172] A fifth construction unit, configured to construct a utility function of the Internet of Things device according to the resource exchange security satisfaction function and the fourth parameter of the Internet of Things device.

[0173] In some alternative embodiments, the second construction module 503 includes:

[0174] A sixth construction unit, configured to construct a first parameter optimization sub-problem according to the utility function of the edge server;

[0175] A seventh construction unit, configured to construct a second parameter optimization sub-problem according to the utility function of the Internet of Things device;

[0176] An eighth construction unit, configured to construct a resource exchange model according to the first parameter optimization sub-problem and the second parameter optimization sub-problem.

[0177] In some alternative embodiments, the determination module 504 includes:

[0178] A fourth determination unit, configured to determine a first strategy by processing the first parameter optimization sub-problem according to a preset algorithm;

[0179] A fifth determination unit, configured to determine a second strategy by processing the second parameter optimization sub-problem according to a preset algorithm;

[0180] A sixth determination unit, configured to determine a resource exchange strategy according to the first strategy and the second strategy.

[0181] In some alternative embodiments, the apparatus further includes:

[0182] An obtaining module, configured to obtain a reputation value of the edge server according to the reputation evaluation function of the edge server;

[0183] A sending module, configured to send the optimized first parameter, the optimized second parameter, and the reputation value of the edge server to the edge server based on the Internet of Things device;

[0184] A verification module, configured to verify the optimized first parameter, the optimized second parameter, and the reputation value of the edge server based on the edge server;

[0185] An adding module, configured to add the optimized first parameter, the optimized second parameter, and the reputation value of the edge server to a preset blockchain based on the edge server in case of successful verification.

[0186] The further function descriptions of the above-mentioned modules and units are the same as those in the corresponding embodiments above, and will not be elaborated here.

[0187] The blockchain-based resource exchange device in this embodiment is presented in the form of functional units. Here, the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and a memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.

[0188] This disclosure embodiment also provides a computer device having the above-mentioned Figure 5 shown blockchain-based resource exchange device.

[0189] Please refer to Figure 6 , Figure 6 which is a schematic structural diagram of a computer device provided by an optional embodiment of this disclosure. As Figure 6 shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Each component communicates with each other using different buses and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed within the computer device, including instructions stored in the memory or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a set of blade servers, or a multi-processor system). Figure 6 Take one processor 10 as an example in

[0190] The processor 10 can be a central processor, a network processor, or a combination thereof. Among them, the processor 10 can further include a hardware chip. The above hardware chip can be an application specific integrated circuit, a programmable logic device, or a combination thereof. The above programmable logic device can be a complex programmable logic device, a field programmable gate array, a generic array logic, or any combination thereof.

[0191] Among them, the memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiments.

[0192] The memory 20 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created according to the use of the computer device and the like. In addition, the memory 20 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some alternative embodiments, the memory 20 may optionally include a memory remotely provided with respect to the processor 10, and these remote memories can be connected to the computer device through a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0193] The memory 20 may include volatile memory, for example, random access memory; the memory may also include non-volatile memory, for example, flash memory, a hard disk, or a solid-state drive; the memory 20 may further include a combination of the above types of memory.

[0194] The computer device further includes a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0195] The embodiments of the present disclosure also provide a computer-readable storage medium. The methods according to the embodiments of the present disclosure can be implemented in hardware, firmware, or be implemented as computer code that can be recorded on a storage medium, or be implemented as computer code originally stored in a remote storage medium or a non-transitory machine-readable storage medium and to be downloaded through a network and stored in a local storage medium, so that the methods described herein can be stored in such software processes on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, or a solid-state drive, etc.; further, the storage medium can also include a combination of the above types of memory. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code, and when the software or computer code is accessed and executed by the computer, the processor, or the hardware, the methods shown in the above embodiments are implemented.

[0196] A part of the present disclosure can be applied as a computer program product, for example, computer program instructions, which when executed by a computer, through the operation of the computer, can call or provide the methods and / or technical solutions according to the present disclosure. Those skilled in the art should understand that the forms of existence of computer program instructions in a computer-readable medium include but are not limited to source files, executable files, installation package files, etc. Correspondingly, the ways for a computer to execute computer program instructions include but are not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Herein, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible by the computer.

[0197] Although the embodiments of the present disclosure are described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A resource exchange method based on blockchain, characterized in that: The method comprises: Get multiple edge servers and multiple IoT devices; Constructing a utility function according to the edge server, the IoT device, and a preset blockchain, wherein the utility function is used to characterize the satisfaction of resource exchange between the IoT device and the edge server; According to the utility function, construct a resource exchange model; Determining a resource exchange strategy based on the resource exchange model; The resource exchange is completed for the edge server, the IoT device and the preset blockchain according to the resource exchange strategy.

2. The method according to claim 1, characterized in that: The utility function includes a utility function of an edge server, and constructing a utility function according to the edge server, the IoT device, and a preset blockchain includes: Constructing a reputation evaluation function of the edge server according to the edge server, the IoT device, and the preset blockchain; Determining a first parameter of the edge server according to the reputation evaluation function of the edge server, wherein the first parameter is used to characterize a condition for exchanging resources in the edge server; Determine a second parameter of the IoT device according to the first parameter, wherein the second parameter is used to determine the quantity of the resource requested by the IoT device from the edge server; A utility function of the edge server is constructed according to the first parameter, the second parameter, and a third parameter, wherein the third parameter is used to characterize a preset condition for exchanging resources in the edge server.

3. The method according to claim 2, characterized in that The utility function includes a utility function of an IoT device, and constructing the utility function according to the edge server, the IoT device, and a preset blockchain includes: Constructing a resource exchange security function of the IoT device according to the edge server, the IoT device and the preset blockchain; According to the resource exchange security function of the Internet of Things device, construct a resource exchange security satisfaction function of the Internet of Things device; Determine a fourth parameter of the IoT device according to the first parameter and the second parameter, wherein the fourth parameter is used to represent the cost consumed when the IoT device has successfully exchanged resources in the edge server; A utility function of the Internet of Things device is constructed according to the resource exchange security satisfaction function of the Internet of Things device and the fourth parameter.

4. The method according to claim 3, characterized in that The step of constructing a resource exchange model according to the utility function includes: Constructing a first parameter optimization subproblem according to the utility function of the edge server; According to the utility function of the IoT device, construct a second parameter optimization sub-problem; The resource exchange model is constructed according to the first parameter optimization sub-problem and the second parameter optimization sub-problem.

5. The method according to claim 4, characterized in that The determining of the resource exchange strategy based on the resource exchange model includes: Processing the first parameter optimization sub-problem according to a preset algorithm to determine a first strategy; Processing the second parameter optimization sub-problem according to the preset algorithm to determine a second strategy; The resource exchange strategy is determined according to the first strategy and the second strategy.

6. The method according to claim 5, characterized in that After completing the resource exchange for the edge server, the IoT device, and the preset blockchain according to the resource exchange strategy, the method further includes: Obtaining a reputation value of the edge server according to a reputation evaluation function of the edge server; Based on the Internet of Things device, the optimized first parameter, the optimized second parameter, and the reputation value of the edge server are sent to the edge server; Based on the edge server, verifying the optimized first parameter, the optimized second parameter, and the reputation value of the edge server; When the verification passes, based on the edge server, the optimized first parameter, the optimized second parameter, and the reputation value of the edge server are added to the preset blockchain.

7. A resource exchange device based on blockchain, characterized in that: The device comprises: An acquisition module, used to acquire multiple edge servers and multiple IoT devices; A first construction module is used to construct a utility function according to the edge server, the IoT device and a preset blockchain, wherein the utility function is used to characterize the satisfaction of resource exchange between the IoT device and the edge server; A second construction module is used to construct a resource exchange model according to the utility function; A determination module, used to determine a resource exchange strategy based on the resource exchange model; The exchange module is used to complete resource exchange for the edge server, the Internet of Things device and the preset blockchain according to the resource exchange strategy.

8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the blockchain-based resource exchange method according to any one of claims 1 to 6 by executing the computer instructions.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the blockchain-based resource exchange method described in any one of claims 1 to 6.

10. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the resource exchange method based on blockchain according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Unmanned aerial vehicle edge computing network resource allocation method and device based on block chain

    CN112543115A

  • Game-based edge computing resource management method

    CN113269461A

  • Energy internet transaction method and system based on reinforcement learning block chain enabling

    CN113888327A

  • Federal learning participation equipment excitation method for timeliness perception in industrial Internet of Things

    CN116582568A

  • Privacy-efficiency joint optimization method based on Stackelberg game

    CN116614504A