Blockchain-based resource exchange method, device, equipment, medium and product

By constructing a blockchain-based utility function and resource exchange model, and optimizing the resource exchange strategy using the Stackelberg game model, the problem of low security and satisfaction in resource exchange between IoT devices and edge servers in non-cooperative edge scenarios is solved, and a secure and transparent resource exchange process is achieved.

CN120045310BActive Publication Date: 2026-01-06DONGGUAN UNIV OF TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411872421.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2026-01-06
Estimated Expiration
2044-12-18

AI Technical Summary

Technical Problem

In non-cooperative edge scenarios, resource exchange between IoT devices and edge servers suffers from security and low satisfaction issues, mainly due to the lack of transparency in privacy information and the insufficient consideration of the edge server's reputation.

Method used

By constructing a blockchain-based utility function and resource exchange model, optimizing resource exchange strategies using the Stackelberg game model, and combining edge server reputation evaluation and IoT device security function, secure and transparent resource exchange is achieved.

Benefits of technology

This improves the security and satisfaction of resource exchange, incentivizes the participation of high-reputation edge servers, promotes the stable development of resource exchange, and ensures the openness and transparency of the resource exchange process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120045310B_ABST
    Figure CN120045310B_ABST
Patent Text Reader

Abstract

The present disclosure relates to the technical field of Internet of Things, blockchain and mobile edge computing, and discloses a resource exchange method and device based on blockchain, equipment, medium and product. The method comprises: acquiring a plurality of edge servers and a plurality of Internet of Things devices; constructing a utility function according to the edge servers, the Internet of Things devices and a preset blockchain, wherein the utility function is used to represent the resource exchange satisfaction degree between the Internet of Things devices and the edge servers; 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 of the edge servers, the Internet of Things devices and the preset blockchain according to the resource exchange strategy. The present disclosure constructs a utility function according to the edge servers, the Internet of Things devices and the preset blockchain to perform resource exchange, directly reflects the security of the Internet of Things devices in resource exchange on the preset blockchain, encourages the edge servers to actively participate in resource exchange, and improves the security and satisfaction of resource exchange.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the fields of Internet of Things, blockchain and mobile edge computing technologies, and specifically to blockchain-based resource exchange methods, devices, equipment, media and products. Background Technology

[0002] With the rapid development of IoT and 5G technologies, the number of IoT devices is exploding, and various computationally intensive and latency-sensitive applications are emerging. Resource-constrained IoT devices cannot meet the service quality requirements of these applications, which demand low latency and low power consumption.

[0003] To address the aforementioned issues, relevant technologies typically employ methods based on mobile edge computing and blockchain. However, this approach suffers from the following shortcomings: In non-cooperative edge scenarios, different edge servers belong to different resource providers, and the privacy information of the parties exchanging resources, such as their actual needs, is opaque. Consequently, it is difficult to achieve trustworthy resource exchange under asymmetric information, resulting in low security. Furthermore, existing resource exchange methods often prioritize the conditions for exchanging resources within the edge server, neglecting the impact of the edge server's reputation on the exchange, thus reducing the success rate and user satisfaction.

[0004] Therefore, the relevant technologies suffer from low security and low satisfaction when exchanging resources. Summary of the Invention

[0005] In view of this, this disclosure provides a blockchain-based resource exchange method, apparatus, device, medium, and product to address the issues of low security and satisfaction in related technologies when conducting resource exchange.

[0006] Firstly, this disclosure provides a blockchain-based resource exchange method, which includes:

[0007] Acquire multiple edge servers and multiple IoT devices;

[0008] Based on edge servers, IoT devices, and a pre-defined blockchain, a utility function is constructed, which is used to characterize the satisfaction of resource exchange between IoT devices and edge servers.

[0009] Construct a resource exchange model based on the utility function;

[0010] Based on the resource exchange model, determine the resource exchange strategy;

[0011] Resource exchange is completed between edge servers, IoT devices, and a pre-defined blockchain based on a resource exchange strategy.

[0012] In this embodiment, multiple edge servers and multiple IoT devices are acquired; a utility function is constructed based on the edge servers, IoT devices, and a preset blockchain, wherein the utility function characterizes the satisfaction level of resource exchange between IoT devices and 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 between the edge servers, IoT devices, and the preset blockchain according to the resource exchange strategy. Because this embodiment constructs a utility function based on the edge servers, IoT devices, and the preset blockchain for resource exchange, it directly reflects the security of resource exchange between IoT devices on the preset blockchain, incentivizing edge servers to actively participate in resource exchange and improving the security and satisfaction level of resource exchange.

[0013] In one optional implementation, the utility function includes the utility function of the edge server. The utility function is constructed based on the edge server, IoT devices, and a pre-defined blockchain, including:

[0014] Based on edge servers, IoT devices, and a pre-defined blockchain, a reputation evaluation function for edge servers is constructed.

[0015] Based on the reputation evaluation function of the edge server, the first parameter of the edge server is determined, where the first parameter is used to characterize the conditions for exchanging resources within the edge server;

[0016] The second parameter of the IoT device is determined based on the first parameter, wherein the second parameter is used to determine the amount of resources that the IoT device requests from the edge server;

[0017] Based on the first parameter, the second parameter, and the third parameter, a utility function for the edge server is constructed, where the third parameter is used to characterize the preset conditions for exchanging resources within the edge server.

[0018] In this embodiment of the disclosure, by evaluating the reputation of edge servers and determining the first parameter based on the reputation evaluation function, a utility function for the edge servers is constructed. This incentivizes high-reputation edge servers, encourages more edge servers to participate in resource exchange, improves the security of resource exchange, and promotes the long-term stable development of resource exchange.

[0019] In one optional implementation, the utility function includes a utility function for IoT devices. The utility function is constructed based on the edge server, the IoT devices, and a pre-defined blockchain, including:

[0020] Based on edge servers, IoT devices, and a pre-defined blockchain, construct a resource exchange security function for IoT devices.

[0021] Based on the resource exchange security degree function of IoT devices, construct the resource exchange security satisfaction function of IoT devices;

[0022] The fourth parameter of the IoT device is determined based on the first and second parameters, wherein the fourth parameter is used to characterize the cost required for the IoT device to successfully exchange resources within the edge server.

[0023] Based on the resource exchange security satisfaction function and the fourth parameter of the IoT device, construct the utility function of the IoT device.

[0024] In this embodiment of the disclosure, by constructing a resource exchange security degree function for IoT devices, and based on the resource exchange security degree function, constructing a resource exchange security satisfaction function for IoT devices, and then constructing a utility function for IoT devices, the security of resource exchange by IoT devices on a preset blockchain can be intuitively reflected.

[0025] In one alternative implementation, a resource exchange model is constructed based on a utility function, including:

[0026] Based on the utility function of the edge server, construct the first parameter optimization subproblem;

[0027] Based on the utility function of IoT devices, construct a second-parameter optimization subproblem;

[0028] Based on the first parameter optimization subproblem and the second parameter optimization subproblem, construct a resource exchange model.

[0029] In this embodiment of the disclosure, by constructing a first parameter optimization subproblem and a second parameter optimization subproblem based on 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.

[0030] In one alternative implementation, a resource exchange strategy is determined based on a resource exchange model, including:

[0031] The first parameter optimization sub-problem is processed according to the preset algorithm to determine the first strategy;

[0032] The second parameter optimization sub-problem is processed according to the preset algorithm to determine the second strategy;

[0033] Based on the first and second strategies, determine the resource exchange strategy.

[0034] In this embodiment of the disclosure, by processing the first parameter optimization sub-problem and the second parameter optimization sub-problem according to a preset algorithm, the first strategy and the second strategy are determined, and then the resource exchange strategy is determined, which can solve the resource exchange problem between the edge server and the IoT device.

[0035] In one optional implementation, after completing the resource exchange between the edge server, IoT device, and preset blockchain according to the resource exchange strategy, the method further includes:

[0036] The reputation value of the edge server is obtained based on the reputation evaluation function of the edge server.

[0037] Based on IoT devices, the optimized first parameter, the optimized second parameter, and the reputation value of the edge server are sent 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] If the verification is successful, the optimized first parameter, the optimized second parameter, and the reputation value of the edge server are added to the preset blockchain based on the edge server.

[0040] In this embodiment, verification of resource exchange information is achieved by verifying the optimized first parameter, the optimized second parameter, and the reputation value of the edge server based on an edge server. Upon successful verification, the optimized first parameter, the optimized second parameter, and the reputation value of the edge server are added to a preset blockchain, ensuring transparency in the resource exchange process and improving its security.

[0041] Secondly, this disclosure provides a blockchain-based resource exchange device, the device comprising:

[0042] The acquisition module is used to acquire information from multiple edge servers and multiple IoT devices.

[0043] The first construction module is used to construct a utility function based on the edge server, IoT devices and the preset blockchain. The utility function is used to characterize the satisfaction of resource exchange between IoT devices and the edge server.

[0044] The second building module is used to construct a resource exchange model based on the utility function;

[0045] The determination module is used to determine the resource exchange strategy based on the resource exchange model;

[0046] The exchange module is used to complete resource exchange between edge servers, IoT devices, and a pre-set blockchain according to the resource exchange strategy.

[0047] Thirdly, this 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 perform the blockchain-based resource exchange method described in the first aspect or any corresponding embodiment thereof.

[0048] Fourthly, this disclosure provides a computer-readable storage medium storing computer instructions for causing a computer to execute the blockchain-based resource exchange method described in the first aspect or any corresponding embodiment thereof.

[0049] Fifthly, this disclosure provides a computer program product, including computer instructions for causing a computer to execute the blockchain-based resource exchange method described in the first aspect or any corresponding embodiment thereof. Attached Figure Description

[0050] To more clearly illustrate the technical solutions in the specific embodiments of this disclosure or the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

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

[0052] Figure 2 This is a system model diagram of a blockchain-based resource exchange method according to embodiments of this disclosure;

[0053] Figure 3 This is a resource exchange model diagram of a blockchain-based resource exchange method according to embodiments of this disclosure;

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

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

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

[0057] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.

[0058] With the rapid development of IoT and 5G technologies, the number of IoT devices is exploding, and various computationally intensive and latency-sensitive applications are emerging. Resource-constrained IoT devices cannot meet the service quality requirements of these applications, which demand low latency and low power consumption.

[0059] To address the aforementioned issues, relevant technologies typically employ methods based on mobile edge computing and blockchain. However, this approach suffers from the following shortcomings: In non-cooperative edge scenarios, different edge servers belong to different resource providers, and the privacy information of the parties exchanging resources, such as their actual needs, is opaque. Consequently, it is difficult to achieve trustworthy resource exchange under asymmetric information, resulting in low security. Furthermore, existing resource exchange methods often prioritize the conditions for exchanging resources within the edge server, neglecting the impact of the edge server's reputation on the exchange, thus reducing the success rate and user satisfaction.

[0060] Therefore, the relevant technologies suffer from low security and low satisfaction when exchanging resources.

[0061] To address the aforementioned issues, according to an embodiment of this disclosure, a blockchain-based resource exchange method is provided. It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowcharts, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0062] This embodiment provides a blockchain-based resource exchange method, such as... Figure 1 As shown, Figure 1 This is a schematic flowchart of a blockchain-based resource exchange method according to an embodiment of the present disclosure. The process can be applied to a server and includes the following steps:

[0063] Step S101: Obtain multiple edge servers and multiple IoT devices.

[0064] Optionally, such as Figure 2As shown in this embodiment, the system model of the blockchain-based resource exchange method includes an edge layer and an IoT device layer. The edge layer includes multiple edge servers, and the IoT device layer includes multiple IoT devices. IoT devices can access the edge servers via 4G / 5G / Wi-Fi, etc. During the resource exchange process, edge servers with sufficient resources provide resources to IoT devices with limited resources, and IoT devices with limited resources request resources from 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 at the logical edge of a network. Its service environment and cloud computing capabilities are provided by Mobile Edge Computing (MEC), a distributed computing paradigm that pushes central cloud services and resources down to the edge, closer to the user. IoT devices can offload computing tasks to edge servers for execution, meeting the diverse task needs of users.

[0066] Step S102: Construct a utility function based on the edge server, IoT devices, and a pre-defined blockchain. The utility function is used to characterize the satisfaction level of resource exchange between IoT devices and the edge server.

[0067] Optionally, such as Figure 2 As shown in this embodiment, the system model of the blockchain-based resource exchange method includes, in addition to the edge layer and IoT device layer mentioned in the above embodiments, a blockchain layer. 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, not only allows resource suppliers and demanders to complete resource exchanges through the blockchain, making the resource exchange process more secure and transparent, but also ensures the trusted sharing of data through a consensus mechanism. The preset blockchain selected in this disclosure embodiment is a blockchain based on a Directed Acyclic Graph (DAG). DAG blockchains allow new resource exchanges to join in parallel without limiting the throughput of resource exchanges.

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

[0070] Step S103: Construct a resource exchange model based on the utility function.

[0071] Optionally, in this embodiment of the disclosure, the resource exchange model is used to model the resource exchange problem between edge servers and IoT devices.

[0072] It should be noted that the resource exchange model selected in this embodiment is the Stackelberg model. The Stackelberg model is a leader-follower game model that reflects asymmetric competition. The leader takes the first action, and the followers adjust their strategies according to the leader's actions. That is, the leader influences the followers' decisions by deciding on their own strategies, and the followers choose their optimal strategies after observing the leader's choices.

[0073] Specifically, the server models the resource exchange problem between the edge server and IoT devices based on the utility function, and constructs a Stackelberg game model, in which the edge server acts as the leader and the IoT devices act as followers.

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

[0075] Optionally, in this embodiment of the disclosure, the resource exchange strategy is used to address the resource exchange problem between the edge server and the IoT device.

[0076] Specifically, the server uses the Stackelberg game model to solve the resource exchange problem between edge servers and IoT devices and determine the optimal resource exchange strategy.

[0077] Step S105: Complete resource exchange between edge servers, IoT devices, and the preset blockchain according to the resource exchange strategy.

[0078] Optionally, in this embodiment of the disclosure, the server completes resource exchange with the edge server, IoT device, and DAG blockchain according to the resource exchange strategy.

[0079] In this embodiment, multiple edge servers and multiple IoT devices are acquired; a utility function is constructed based on the edge servers, IoT devices, and a preset blockchain, wherein the utility function characterizes the satisfaction level of resource exchange between IoT devices and 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 between the edge servers, IoT devices, and the preset blockchain according to the resource exchange strategy. Because this embodiment constructs a utility function based on the edge servers, IoT devices, and the preset blockchain for resource exchange, it directly reflects the security of resource exchange between IoT devices on the preset blockchain, incentivizing edge servers to actively participate in resource exchange and improving the security and satisfaction level of resource exchange.

[0080] In some optional implementations, the utility function includes a utility function for the edge server. The utility function is constructed based on the edge server, IoT devices, and a pre-defined blockchain, including:

[0081] Based on edge servers, IoT devices, and a pre-defined blockchain, a reputation evaluation function for edge servers is constructed.

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

[0083] The second parameter of the IoT device is determined based on the first parameter, wherein the second parameter is used to determine the amount of resources that the IoT device requests from the edge server;

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

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

[0086] Specifically, the server first evaluates the credibility of the edge servers based on the security of resource exchanges published by the edge servers on the DAG blockchain, and then constructs a dAG blockchain for the IoT devices. i The reputation evaluation function r for edge servers i (λ i ), evaluation function r i (λ i The definition is as follows:

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

[0088] Where, λ iIndicates IoT device d i The arrival rate of the task (exchange) follows a Poisson distribution.

[0089] Because a higher exchange arrival rate results in shorter latency for exchange verification, on-chain exchanges are more secure, and resource exchanges published by edge servers have higher security on the DAG blockchain, leading to higher edge server credibility, the credibility evaluation function r... i (λ i ) and exchange arrival rate λ i There is a positive correlation between them.

[0090] Then, the server evaluates the reputation based on the reputation function r. i (λ i Determine the first parameter of the edge server. First parameter The definition is as follows:

[0091]

[0092] Where, p i The initial conditions used to characterize resources within the exchange edge server, and the edge server reputation level r. i The higher the first parameter The higher.

[0093] Next, the server, based on the first parameter Determine the second parameter k of the IoT device i λ i , where k i Indicates IoT device d i The amount of resources required to execute each task, and then based on the first parameter. The second parameter k i λ i And the third parameter c, which constructs the utility function U of the edge server. ESP The utility function U of the edge server ESP The definition is as follows:

[0094]

[0095] Where N represents the number of IoT devices.

[0096] In this embodiment of the disclosure, by evaluating the reputation of edge servers and determining the first parameter based on the reputation evaluation function, a utility function for the edge servers is constructed. This incentivizes high-reputation edge servers, encourages more edge servers to participate in resource exchange, improves the security of resource exchange, and promotes the long-term stable development of resource exchange.

[0097] In some optional implementations, the utility function includes a utility function for IoT devices. The server constructs the utility function based on the edge server, the IoT devices, and a pre-defined blockchain, including:

[0098] Based on edge servers, IoT devices, and a pre-defined blockchain, construct a resource exchange security function for IoT devices.

[0099] Based on the resource exchange security degree function of IoT devices, construct the resource exchange security satisfaction function of IoT devices;

[0100] The fourth parameter of the IoT device is determined based on the first and second parameters, wherein the fourth parameter is used to characterize the cost required for the IoT device to successfully exchange resources within the edge server.

[0101] Based on the resource exchange security satisfaction function and the fourth parameter of the IoT device, construct the utility function of the IoT device.

[0102] Optionally, in this embodiment of the disclosure, the utility function includes not only the utility function of the edge server mentioned in the above embodiments, but also the utility function of the Internet of Things device.

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

[0104] Because a higher exchange arrival rate results in a shorter latency for exchange verification, on-chain exchanges are more secure. Therefore, the resource exchange security function s i (λ i ) and exchange arrival rate λ i There is a positive correlation between them.

[0105] Then, the server uses the resource exchange security function s i (λ i Construct a resource exchange security satisfaction function S for IoT devices. i Resource exchange security satisfaction function S i The definition is as follows:

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

[0107] Where θ is the safety satisfaction factor, and the value of θ is greater than 0.

[0108] Next, the server, based on the first parameter Second parameter k i λ i Determine the fourth parameter of an IoT device Furthermore, based on the resource exchange security satisfaction function S i and the fourth parameter Utility functions for IoT devices Utility functions of IoT devices The definition is as follows:

[0109]

[0110] In this embodiment of the disclosure, by constructing a resource exchange security degree function for IoT devices, and based on the resource exchange security degree function, constructing a resource exchange security satisfaction function for IoT devices, and then constructing a utility function for IoT devices, the security of resource exchange by IoT devices on a preset blockchain can be intuitively reflected.

[0111] In some alternative implementations, a resource exchange model is constructed based on a utility function, including:

[0112] Based on the utility function of the edge server, construct the first parameter optimization subproblem;

[0113] Based on the utility function of IoT devices, construct a second-parameter optimization subproblem;

[0114] Based on the first parameter optimization subproblem and the second parameter optimization subproblem, construct a resource exchange model.

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

[0116] Specifically, the server first determines the utility function U of the edge server. ESP Construct a subproblem P1 for optimizing the first parameter, and then optimize p. i Then optimize the first parameter The first parameter optimization subproblem P1 can be expressed as:

[0117]

[0118] Where, p min p i The lower limit, p max p i The upper limit.

[0119] Then, the server uses the utility function U of the IoT device. i UEConstruct a second parameter optimization subproblem P2, and optimize λ. i Then optimize the second parameter k i λ i The second parameter optimization subproblem P2 can be expressed as:

[0120]

[0121] Among them, h r This indicates the time of the displayed stage in the DAG blockchain. is the average arrival interval 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] like Figure 3 As shown, the server constructs a Stackelberg game model based on the first parameter optimization subproblem P1 and the second parameter optimization subproblem P2, which includes two phases: the first phase models the first parameter optimization subproblem P1, and the edge server, as the leader, determines p. i The strategy for the edge server is obtained; in the second stage, the optimization subproblem P2 of the second parameter is modeled, and the IoT devices, as followers, determine λ. i In this context, competition among IoT devices creates a non-cooperative game, where each IoT device needs to consider the p determined by the edge server. i λ determined by other IoT devices -i Thus, determine its own λ i .

[0123] In this embodiment of the disclosure, by constructing a first parameter optimization subproblem and a second parameter optimization subproblem based on 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 implementations, a resource exchange strategy is determined based on the resource exchange model, including:

[0125] The first parameter optimization sub-problem is processed according to the preset algorithm to determine the first strategy;

[0126] The second parameter optimization sub-problem is processed according to the preset algorithm to determine the second strategy;

[0127] Based on the first and second strategies, determine the resource exchange strategy.

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

[0129] Input: pi initialization The algorithm's convergence accuracy is ε, the iteration update step size is η, and the number of iterations is t.

[0130] Output: λ * p * .

[0131] 1: Iteration;

[0132] 2: Optimize the second parameter for each IoT device;

[0133] 3: The edge server updates the first strategy according to the subgradient algorithm, which is defined as follows: in, The utility function U of the edge server ESP Gradients in all directions;

[0134] 4: t = t + 1;

[0135] 5: Until satisfied condition;

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

[0137] Where, p * p i The optimal solution, λ * Indicates λ i The optimal solution. When the equilibrium condition is met, the Stackelberg game model reaches Nash equilibrium, and the utility function U of the edge server is obtained. ESP The utility function U of IoT devices i UE To maximize, (λ) * ,p * Let be the equilibrium point of the Stackelberg game model, and the equilibrium condition can be expressed as:

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

[0139]

[0140] in, This represents the optimal exchange arrival rate vector for all IoT devices except IoT device i.

[0141] Specifically, such as Figure 3As shown, the server first processes the second parameter optimization subproblem P2, given p i Below, optimize λ through IoT devices i This optimizes the second parameter k. i λ i Maximize the utility function of IoT devices Strategies for acquiring IoT devices.

[0142] Then, the server substitutes the IoT device's strategy into the first stage, processing the first parameter optimization subproblem P1, given λ. i Below, optimize p through edge servers i This optimizes the first parameter. Maximize the utility function U of the edge server ESP Optimize edge server strategies.

[0143] Finally, the server iteratively processes the optimal solutions to the second parameter optimization subproblem P2 and the first parameter optimization subproblem P1. In each iteration, the gradient descent algorithm is used to adjust the strategy for optimizing the edge server, thereby updating the strategy for optimizing the IoT device. When the condition is met... When the condition is met, the algorithm terminates, determines the first and second strategies, and based on the first and second strategies, determines the resource exchange strategy, obtaining and outputting the unique Stackelberg game model equilibrium point (λ). * ,p * ).

[0144] In addition, the server can also provide s based on actual user needs. i (·) and r i The function expression of (·) is used to verify the existence and uniqueness of the equilibrium in the Stackelberg game model.

[0145] In this embodiment of the disclosure, by processing the first parameter optimization sub-problem and the second parameter optimization sub-problem according to a preset algorithm, the first strategy and the second strategy are determined, and then the resource exchange strategy is determined, which can solve the resource exchange problem between the edge server and the IoT device.

[0146] In some optional implementations, after completing the resource exchange with the edge server, IoT device, and preset blockchain according to the resource exchange strategy, the method further includes:

[0147] The reputation value of the edge server is obtained based on the reputation evaluation function of the edge server.

[0148] Based on IoT devices, the optimized first parameter, the optimized second parameter, and the reputation value of the edge server are sent 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] If the verification is successful, the optimized first parameter, the optimized second parameter, and the reputation value of the edge server are added to the preset blockchain based on the edge server.

[0151] Optionally, in this embodiment of the disclosure, after the server completes the resource exchange, it can process the resource exchange information, which 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 evaluates the reputation of the edge server using the reputation function r. i (λ i ), to obtain the reputation value r of the edge server. i Then, the optimized first parameter, optimized second parameter, and reputation value of the edge server are sent to the edge server through IoT devices. Then, according to the blockchain consensus algorithm, the edge server verifies the resource exchange information. If the verification is successful, the edge server packages the resource exchange information into a block and adds it to the DAG blockchain.

[0153] In this embodiment, verification of resource exchange information is achieved by verifying the optimized first parameter, the optimized second parameter, and the reputation value of the edge server based on an edge server. Upon successful verification, the optimized first parameter, the optimized second parameter, and the reputation value of the edge server are added to a preset blockchain, ensuring transparency in the resource exchange process and improving its security.

[0154] In some alternative implementations, such as Figure 4 As shown, Figure 4This is a flowchart illustrating a blockchain-based resource exchange method according to another embodiment of this disclosure. The server first initializes the system through IoT devices and an edge server, obtaining corresponding identity identifiers (public key, private key, and security certificate) and device information to complete identity construction. Then, the IoT devices publish resource requests based on their own business needs. In the first stage, the edge server, acting as a leader, sets first parameters for different user devices and sends these parameters to the IoT devices. In the second stage, the IoT devices, acting as followers, determine second parameters based on the first parameters in a non-cooperative game with other IoT devices. Then, the reputation of the edge server and the exchange security on the preset blockchain are evaluated based on the exchange arrival rate of the IoT devices. If Nash equilibrium is not reached, the process returns to the step of the IoT devices publishing resource requests based on their own business needs, continuing iterative processing until Nash equilibrium is reached. Once Nash equilibrium is reached, the IoT devices send resource exchange business demand information to the edge server, which then provides resources to the IoT devices. The IoT devices then send the optimized fourth parameter to the edge server. Finally, the IoT 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] This embodiment also provides a blockchain-based resource exchange device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0156] This embodiment provides a blockchain-based resource exchange device, such as... Figure 5 As shown, it includes:

[0157] The acquisition module 501 is used to acquire multiple edge servers and multiple IoT devices;

[0158] The first construction module 502 is used to construct a utility function based on the edge server, IoT device and preset blockchain, wherein the utility function is used to characterize the satisfaction of resource exchange between IoT device and edge server;

[0159] The second construction module 503 is used to construct a resource exchange model based on the utility function;

[0160] Module 504 is used to determine the resource exchange strategy based on the resource exchange model;

[0161] The exchange module 505 is used to complete resource exchange between edge servers, IoT devices and a preset blockchain according to the resource exchange strategy.

[0162] In this embodiment, multiple edge servers and multiple IoT devices are acquired; a utility function is constructed based on the edge servers, IoT devices, and a preset blockchain, wherein the utility function characterizes the satisfaction level of resource exchange between IoT devices and 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 between the edge servers, IoT devices, and the preset blockchain according to the resource exchange strategy. Because this embodiment constructs a utility function based on the edge servers, IoT devices, and the preset blockchain for resource exchange, it directly reflects the security of resource exchange between IoT devices on the preset blockchain, incentivizing edge servers to actively participate in resource exchange and improving the security and satisfaction level of resource exchange.

[0163] In some alternative implementations, the first building module 502 includes:

[0164] The first building unit is used to build a reputation evaluation function for the edge server based on the edge server, IoT devices and the preset blockchain.

[0165] The determining unit is used to determine the first parameter of the edge server based on the reputation evaluation function of the edge server, wherein the first parameter is used to characterize the conditions for exchanging resources within the edge server;

[0166] The second determining unit is used to determine the second parameters of the IoT device based on the first parameters, wherein the second parameters are used to determine the amount of resources that the IoT device requests from the edge server;

[0167] The second construction unit is used to construct the utility function of the edge server based on the first parameter, the second parameter and the third parameter, wherein the third parameter is used to characterize the preset conditions for exchanging resources within the edge server.

[0168] In some alternative implementations, the first building module 502 includes:

[0169] The third building unit is used to build the resource exchange security function of IoT devices based on the edge server, IoT devices and the preset blockchain;

[0170] The fourth building unit is used to construct the resource exchange security satisfaction function of IoT devices based on the resource exchange security degree function of IoT devices.

[0171] The third determining unit is used to determine the fourth parameter of the Internet of Things (IoT) device based on the first parameter and the second parameter, wherein the fourth parameter is used to characterize the cost required for the IoT device to successfully exchange resources within the edge server.

[0172] The fifth building unit is used to construct the utility function of the IoT device based on the resource exchange security satisfaction function of the IoT device and the fourth parameter.

[0173] In some alternative implementations, the second building module 503 includes:

[0174] The sixth building unit is used to construct the first parameter optimization subproblem based on the utility function of the edge server;

[0175] The seventh building unit is used to construct the second parameter optimization subproblem based on the utility function of the IoT device;

[0176] The eighth building unit is used to construct a resource exchange model based on the first parameter optimization subproblem and the second parameter optimization subproblem.

[0177] In some alternative implementations, the determining module 504 includes:

[0178] The fourth determining unit is used to process the first parameter optimization sub-problem according to the preset algorithm and determine the first strategy;

[0179] The fifth determining unit is used to process the second parameter optimization sub-problem according to the preset algorithm and determine the second strategy;

[0180] The sixth determining unit is used to determine the resource exchange strategy based on the first strategy and the second strategy.

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

[0182] The module is used to obtain the reputation value of the edge server based on the reputation evaluation function of the edge server;

[0183] The sending module is used 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 IoT device;

[0184] The verification module is used to verify the optimized first parameter, the optimized second parameter, and the reputation value of the edge server based on the edge server.

[0185] Add a module to add the optimized first parameter, the optimized second parameter, and the reputation value of the edge server to the preset blockchain, based on the edge server, after successful verification.

[0186] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.

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

[0188] This disclosure also provides a computer device having the above-described features. Figure 5 The illustrated resource exchange device is based on blockchain.

[0189] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of this disclosure, such as... Figure 6 As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 6 Take a processor 10 as an example.

[0190] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.

[0191] The memory 20 stores instructions executable by at least one processor 10 to cause the at least one processor 10 to perform the method shown in the above embodiments.

[0192] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

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

[0194] The computer device also includes a communication interface 30 for communicating with other devices or communication networks.

[0195] This disclosure also provides a computer-readable storage medium in which the methods described in this disclosure can be implemented in hardware or firmware, or implemented as recordable on a storage medium, or implemented as computer code originally stored on a remote storage medium or a non-transitory machine-readable storage medium and subsequently stored on a local storage medium after being downloaded over a network. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium may be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium may also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code that, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.

[0196] A portion of this disclosure can be applied to computer program products, such as computer program instructions, which, when executed by a computer, can invoke or provide methods and / or technical solutions according to this disclosure through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, and installation package files. Accordingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions; the computer compiling the instructions and then executing the corresponding compiled program; the computer reading and executing the instructions; or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.

[0197] Although embodiments of the present disclosure have been 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 blockchain-based resource exchange method, characterized by, The method comprises: obtaining a plurality of edge servers and a plurality of Internet of Things devices; constructing a utility function according to the edge servers, the Internet of Things devices, and a preset blockchain, the utility function being used to represent a resource exchange satisfaction degree between the Internet of Things devices and the edge servers; wherein the utility function comprises an edge server utility function, and the constructing of the utility function according to the edge servers, the Internet of Things devices, and the preset blockchain comprises: constructing a credibility evaluation function of the edge server according to the edge servers, the Internet of Things devices, and the preset blockchain; the preset blockchain is a directed acyclic graph-based blockchain, and the preset blockchain allows new resource exchanges to be added in parallel, so that resource suppliers and resource demanders complete resource exchanges through the preset blockchain; determining a first parameter of the edge server according to the credibility evaluation function of the edge server, wherein the first parameter is used to represent a condition for exchanging resources in the edge server; determining a second parameter of the Internet of Things device according to the first parameter, wherein the second parameter is used to determine a quantity of resources that the Internet of Things device demands from the edge server; constructing the utility function of the edge server according to the first parameter, the second parameter, and a third parameter, wherein the third parameter is used to represent a preset condition for exchanging resources in the edge server; the utility function comprises an Internet of Things device utility function, and the constructing of the utility function according to the edge servers, the Internet of Things devices, and the preset blockchain comprises: constructing a resource exchange security function of the Internet of Things device according to the edge servers, the Internet of Things devices, and the preset blockchain; constructing a resource exchange security satisfaction degree function of the Internet of Things device according to the resource exchange security function of the Internet of Things device; determining a fourth parameter of the Internet of Things device according to the first parameter and the second parameter, wherein the fourth parameter is used to represent a cost that the Internet of Things device needs to consume when successfully exchanging resources in the edge server; constructing the utility function of the Internet of Things device according to the resource exchange security satisfaction degree function of the Internet of Things device and the fourth parameter; constructing a resource exchange model according to the utility function; determining a resource exchange strategy based on the resource exchange model; completing resource exchanges of the edge servers, the Internet of Things devices, and the preset blockchain according to the resource exchange strategy.

2. The method of claim 1, wherein, The constructing of the resource exchange model according to the utility function comprises: According to the utility function of the edge server, a first parameter optimization sub-problem is constructed, wherein the first parameter optimization sub-problem may be expressed as: wherein the utility function of the edge server is , denotes a lower bound of , denotes an upper bound of , is used to characterize the initial conditions of the resources within the exchange edge server; A second parameter optimization sub-problem is constructed according to the utility function of the Internet of Things device, wherein the second parameter optimization sub-problem may be represented as: where the utility function of the IoT device is , denotes the time of the display phase in the DAG blockchain, denotes the task arrival rate of the IoT device , which is subject to a Poisson distribution, is the average inter-arrival time between two exchanges, is the wireless channel service rate, constraint ensures that the network load is in a stable high-load state, constraint requires that the task arrival rate cannot exceed the service rate; constructing the resource exchange model according to the first parameter optimization sub-problem and the second parameter optimization sub-problem.

3. The method of claim 2, wherein, The determining of the resource exchange strategy based on the resource exchange model comprises: determining a first strategy according to a preset algorithm processing the first parameter optimization sub-problem; determining a second strategy according to the preset algorithm processing the second parameter optimization sub-problem; The first strategy is a strategy for adjusting and optimizing the edge server using a gradient descent algorithm, and the obtained strategy satisfies a convergence condition. The policy of the IoT device is obtained by the server first processing a second parameter optimization sub-problem , at a given , by the IoT device optimizing , in turn optimizing the second parameter , maximizing the utility function of the IoT device , where the second parameter , at a given , represents the number of resources needed by the IoT device to perform each task, , represents the task arrival rate of the IoT device . The policy of the edge server is obtained by the server substituting the policy of the internet of things device into the first stage, processing the first parameter optimization sub-problem , in a given , by the edge server optimization , in turn, the first parameter , maximizing the utility function of the edge server , wherein the first parameter is expressed as: , is a reputation evaluation function, used to represent the initial condition of exchanging resources in the edge server; According to the first strategy and the second strategy, the resource exchange strategy is determined.

4. The method of claim 3, wherein, After the resource exchange between the edge server, the Internet of Things device and the preset blockchain is completed according to the resource exchange strategy, the method further includes: According to the reputation evaluation function of the edge server, the reputation value of the edge server is obtained. 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, the optimized first parameter, the optimized second parameter and the reputation value of the edge server are verified. If 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. 5.A blockchain-based resource exchange apparatus, characterized by, The device includes: An acquisition module is configured to acquire a plurality of edge servers and a plurality of Internet of Things devices. A first construction module is configured to construct an utility function according to the edge server, the Internet of Things device and a preset blockchain, the utility function being used to represent the resource exchange satisfaction degree between the Internet of Things device and the edge server; wherein the utility function includes an utility function of the edge server, the first construction module being configured to construct a reputation evaluation function of the edge server according to the edge server, the Internet of Things device and the preset blockchain; the preset blockchain is a directed acyclic graph-based blockchain, the preset blockchain allowing new resource exchanges to be added in parallel, allowing resource suppliers and resource demanders to complete resource exchange through the preset blockchain; the first parameter of the edge server is determined according to the reputation evaluation function of the edge server, wherein the first parameter is used to represent the condition of exchanging resources in the edge server; the second parameter of the Internet of Things device is determined according to the first parameter, wherein the second parameter is used to determine the number of resources demanded by the Internet of Things device from the edge server; the 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 represent a preset condition of exchanging resources in the edge server. The utility function comprises a utility function of the Internet of Things device, the first construction module is used for constructing 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; constructing a resource exchange security satisfaction function of the Internet of Things device according to the resource exchange security degree function of the Internet of Things device; determining a fourth parameter of the Internet of Things device according to the first parameter and the second parameter, wherein the fourth parameter is used to represent the cost required to be consumed when the Internet of Things device has successfully exchanged into the resource in the edge server; and constructing the utility function of the Internet of Things device according to the resource exchange security satisfaction function of the Internet of Things device and the fourth parameter; The second construction module is used for constructing a resource exchange model according to the utility function; The determination module is used for determining a resource exchange strategy based on the resource exchange model; The exchange module is used for completing resource exchange of the edge server, the Internet of Things device and the preset blockchain according to the resource exchange strategy.

6. A computer device, comprising: Comprise: A memory and a processor, which are mutually connected in communication, the memory stores computer instructions, and the processor executes the computer instructions to perform the blockchain-based resource exchange method in any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions, and the computer instructions are used to make the computer execute the blockchain-based resource exchange method in any one of claims 1 to 4.

8. A computer program product, characterised in that, Comprise computer instructions, and the computer instructions are used to make the computer execute the blockchain-based resource exchange method in any one of claims 1 to 4.

Citation Information

Patent Citations

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

    CN112543115A