A blockchain consensus resource allocation method and device
By dividing sub-regions and building a consensus resource game model in the blockchain IoT system, the problem of uneven node reward income and resource consumption is solved, the consensus efficiency is improved, and the security of IoT data is guaranteed.
Patent Information
- Application Number
- CN202210826756.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-13
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2042-07-13
AI Technical Summary
The existing blockchain IoT system lacks a resource allocation optimization solution, resulting in an imbalance between node reward income and communication provider resource consumption, and low consensus efficiency.
By dividing the IoT network into multiple sub-areas, determining the management nodes, building a blockchain consensus resource game model, generating multiple resource allocation plans based on the service requirements and resource consumption of the nodes, and using improved optimization algorithms to solve the optimal resource allocation. plan.
It maximizes node reward income and minimizes communication provider resource consumption, improves the consensus efficiency of the blockchain network, and provides a foundation for the real-time security of IoT data.
Smart Images

Figure CN115277721B
Abstract
Description
Technical Field
[0001] The present application relates to the field of blockchain technology, and specifically to a blockchain consensus resource allocation method and device. Background Art
[0002] Blockchain has become one of the important technologies for major application scenarios of the Internet of Things due to its distributed and tamper-proof characteristics. Each node in the Internet of Things generates a large amount of data of different types when it is active in the network. Data broadcast and consensus are required in the network to improve its service quality and obtain personal rewards for participating in the consensus of the blockchain network. However, with the rapid growth of economic strength, the demand for communication services in the Internet of Things needs to be timely and optimal, resulting in more consumption of communication resources provided by communication suppliers, resulting in problems such as difficulty in balancing node reward benefits and communication supplier scheduling resource consumption in the Internet of Things, uneven resource consumption, and low benefits. It is necessary to consider resource allocation to maximize the reward benefits of Internet of Things nodes and minimize the consumption of communication supplier scheduling resources.
[0003] At present, scholars at home and abroad focus on building blockchain frameworks for IoT scenarios to meet the needs of short-term transaction response and high transaction throughput in IoT network environments. For example, Cebe M et al. first integrated public key management into blockchain, provided membership establishment and privacy, and designed a ledger that will store node-related data, such as maintenance information, historical records, diagnostic reports, etc. Bagga P et al. proposed a blockchain-based batch authentication scheme for IoT identity authentication. By broadcasting a message to its own members and respective roadside units in the signature phase of the proposed scheme, each node in the dynamically formed cluster allows the authentication of neighboring IoT nodes in its cluster. Finally, a group key is established in their cluster and multiple transactions are formed. Wang X et al. proposed an effective decentralized authentication mechanism for IoT based on the consensus algorithm of blockchain technology, and verified the feasibility of the scheme in reducing selfish behavior and malicious attacks in IoT. However, the above researchers studied the blockchain framework of IoT network environment without considering the reward benefits and resource consumption of consensus nodes, lacked research on resource consumption in blockchain networks, and could not achieve optimal resource allocation in IoT environments.
[0004] To sum up, due to the large scale of IoT data, there is currently a lack of evaluation models and solutions to maximize the interests of both parties for the rewards of IoT nodes and the resource consumption of communication suppliers in the blockchain IoT system. There is a lack of solutions to the game model for large-scale IoT data. There are problems such as unreasonable resource allocation within the network, low consensus enthusiasm and efficiency, making it difficult for the existing blockchain framework to achieve consensus on IoT data safely and efficiently. Summary of the invention
[0005] The present application provides a blockchain consensus resource game allocation optimization method for an IoT node to solve the problems of unreasonable resource allocation within the network, low consensus enthusiasm and efficiency in the existing blockchain IoT system.
[0006] In order to solve the above technical problems, this application is implemented as follows:
[0007] In the first aspect, the present application proposes a blockchain consensus resource allocation method, comprising:
[0008] Divide the Internet of Things network into multiple sub-areas, determine the nodes of each sub-area, and determine the management node of each sub-area;
[0009] Determine the scheduling resource consumption of each of the sub-areas through the management node, and determine the personal reward income of each of the nodes through the management node;
[0010] Constructing a blockchain consensus resource game model according to the scheduling resource consumption of each sub-area and the personal reward income of each node;
[0011] Generate multiple resource allocation plans according to the blockchain consensus resource game model;
[0012] The best resource allocation scheme among the multiple resource allocation schemes is determined by solving an improved optimization algorithm, and blockchain consensus resource allocation is performed.
[0013] Furthermore, the determination of the management node of each sub-area is specifically:
[0014] Determine whether the current consensus is the first blockchain consensus;
[0015] When the current consensus is the first blockchain consensus, the management node of the sub-area is determined according to the historical data of the base stations in the area;
[0016] In the case that the current consensus is not the first blockchain consensus, the historical management node of the sub-area is used as the management node of the sub-area.
[0017] Further, the determining of the scheduling resource consumption of each sub-area by the management node is specifically:
[0018] The management node determines the scheduling resource consumption of each node according to the service demand, relative computing capacity and number of regional nodes of each node;
[0019] The individual reward income of each node determined by the management node is specifically:
[0020] The individual reward income of each node is determined by the fixed block reward, variable reward and the probability of each node successfully packaging a block.
[0021] Furthermore, the generation of multiple resource allocation schemes according to the blockchain consensus resource game model is specifically as follows:
[0022] Construct a search space range according to the blockchain consensus resource game model, and generate multiple resource allocation schemes within the search space range;
[0023] Among them, the blockchain consensus resource game model is specifically as follows:
[0024]
[0025] The Ri is the personal benefit obtained by node i, the Ck is the scheduling resource consumption in the kth area, and the is the current service demand of node i.
[0026] Further, the determining of the best resource allocation scheme among the multiple resource allocation schemes is specifically:
[0027] The multiple resource allocation schemes are iterated multiple times, and when the number of iterations reaches a preset threshold or the fitness value does not change for a preset number of rounds, the resource allocation scheme is determined to be the optimal resource allocation scheme.
[0028] In a second aspect, an embodiment of the present application provides a blockchain consensus resource allocation device, including:
[0029] A region division module, used to divide the Internet of Things network into multiple sub-regions, determine the nodes of each sub-region, and determine the management node of each sub-region;
[0030] A determination module, used to determine the scheduling resource consumption of each of the sub-areas through the management node, and to determine the personal reward income of each of the nodes through the management node;
[0031] A modeling module, used to construct a blockchain consensus resource game model according to the scheduling resource consumption of each sub-area and the personal reward income of each node;
[0032] An optimal solution solving module, used to generate multiple resource allocation solutions according to the blockchain consensus resource game model;
[0033] The allocation module is used to determine the best resource allocation scheme among the multiple resource allocation schemes through an improved optimization algorithm, and perform blockchain consensus resource allocation.
[0034] Furthermore, the area division module includes:
[0035] The judgment submodule is used to determine whether the current consensus is the first blockchain consensus;
[0036] The management node determination submodule is used to determine the management node of the sub-area according to the historical data of the base stations in the area when the current consensus is the first blockchain consensus; or to use the historical management node of the sub-area as the management node of the sub-area when the current consensus is not the first blockchain consensus.
[0037] Furthermore, the determination module includes:
[0038] A scheduling resource consumption determination submodule, used to determine the scheduling resource consumption of each node according to the service requirements, relative computing capabilities and number of regional nodes of each node;
[0039] The individual reward income determination submodule is used to determine the individual reward income of each node through the block fixed reward, variable reward and the probability of each node successfully packaging a block.
[0040] Furthermore, the optimal solution solving module is specifically used for:
[0041] Construct a search space range according to the blockchain consensus resource game model, and generate multiple resource allocation schemes within the search space range;
[0042] Among them, the blockchain consensus resource game model is specifically as follows:
[0043]
[0044] The Ri is the personal benefit obtained by node i, the Ck is the scheduling resource consumption in the kth area, and the is the current service demand of node i.
[0045] Furthermore, the allocation module includes:
[0046] An iteration submodule, configured to iterate the multiple resource allocation schemes for multiple times, and determine that the resource allocation scheme is the best resource allocation scheme when the number of iterations reaches a preset threshold or the fitness value does not change for a preset number of rounds;
[0047] The allocation submodule is used to perform consensus resource allocation according to the optimal resource allocation scheme.
[0048] This application divides the Internet of Things network into multiple sub-areas, determines the nodes and management nodes of each sub-area, determines the scheduling resource consumption of each sub-area and the personal reward income of each node through the management node, builds a blockchain consensus resource game model based on the scheduling resource consumption and personal reward income, and then generates multiple resource allocation plans, and selects the best resource allocation plan from multiple resource allocation plans for consensus resource allocation. This application can achieve a resource allocation plan that maximizes the reward income of Internet of Things nodes and minimizes the scheduling resource consumption of communication providers, thereby improving the consensus efficiency of the blockchain network and laying the foundation for real-time security protection of Internet of Things data. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 This is a flowchart of a blockchain consensus resource allocation method provided by an embodiment of the present application;
[0050] Figure 2 This is a schematic diagram of a blockchain consensus resource allocation device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical scheme and advantages of the present invention clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0052] The message sending method and device provided in the embodiments of the present application are described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.
[0053] Reference Figure 1 , showing a blockchain consensus resource game allocation optimization method provided by an embodiment of the present application. The method comprises the following steps:
[0054] S101: Divide the Internet of Things network into multiple sub-areas, determine the nodes of each sub-area, and determine the management node of each sub-area;
[0055] When the IoT network is divided into multiple sub-areas, the IoT network is divided into sub-areas of the same size with the base station having greater computing power in the network as the center. After being divided into multiple sub-areas, a node is determined for each sub-area.
[0056] It is understandable that a node of the Internet of Things can be a sensor or an RFID reader. The characteristics of an IoT node can be characterized from several aspects, such as power supply, mobility, perception, storage capacity, computing power, networking capability, and connectivity.
[0057] In an optional solution, IoT nodes are divided into three categories: management nodes, consensus nodes, and other nodes. Among them, management nodes are the cross-connection points of signals in the communication transmission network, the intersection points of business insertion and extraction, the entry points of the network management system, the amplification points of signal power and the regeneration points of digital signals in transmission, and are responsible for the management of nodes and services in the region; consensus nodes include individual nodes and communication providers. Individual nodes are responsible for participating in the transaction consensus verification and packaging in the network, and communication providers are responsible for resource scheduling in the region. In addition to management nodes and consensus nodes, other nodes are called other nodes, which are responsible for participating in and initiating transactions.
[0058] It is worth noting that after dividing the sub-areas and determining the nodes, it is necessary to initialize the characteristic parameters of each node in each sub-area. Specifically, the service demand V of each node in the initialization area is i 、Number of regional nodes k , relative computing power H i 、Block fixed reward A s Variable Reward A v , where the variable reward is given by the variable reward factor A v-f and the transaction data T of node i i Determine, current number of iterations t=1, iteration number threshold T, etc.
[0059] Specifically, when determining the management node of each sub-area, it is possible to first determine whether the current consensus is the first blockchain consensus. Consensus refers to reaching a community solution that is accepted by all parties to the disagreement. In the blockchain world, due to its decentralized blockchain design, nodes are scattered and parallel, so a system must be designed to maintain the operating order and fairness of the system, unify the version of the blockchain, and reward users who provide resources to maintain the blockchain, and punish malicious harmers. Such a system must rely on some way to prove who has obtained the packaging right (or accounting right) of a blockchain and can obtain the reward for packaging this block; or whoever intends to harm will receive a certain punishment, which is the consensus mechanism. Blockchain consensus is used to maintain the operating order and fairness of the system and maintain the stable operation of the system through rewards and punishments.
[0060] If the current consensus is the first blockchain consensus, then the nodes in the area can be evaluated and counted based on the historical data of the base stations in the area. Each node can be scored and counted from several aspects such as power supply, mobility, perception, storage capacity, computing power, networking capacity and connection capacity, and the scores of each node are arranged in descending order, and the nodes with the highest scores are selected as management nodes. In an optional solution, the top 30% of the nodes are selected and given the regional management function, that is, they become regional management nodes.
[0061] S102: Determine the scheduling resource consumption of each of the sub-areas through the management node, and determine the personal reward income of each of the nodes through the management node;
[0062] After determining the management nodes of each sub-area, the computing power, service requirements, expected benefits and other parameters of each management node can be counted and analyzed.
[0063] Specifically, the management node in the region calculates and updates the current service demand V of each node i i , adjust the minimum service demand V min and the maximum service demand V max And calculate the service demand V in the area by formula (1) i The relative computing power of node i is H i .
[0064]
[0065] Furthermore, the variable reward A for each node i in the region v Perform statistical analysis to obtain the expected return of each node. Specifically, the corresponding variable reward A is calculated by formula (2): v , calculate the node's individual expected return R through (3) i .
[0066] A v =A v-f ×T i (2)
[0067] R i =(A s +A v ) i (H i ,T i ) (3)
[0068] Among them, A v represents variable reward, A v-f represents the variable reward factor, T i Represents the transaction data packaged by node i, P i(H i ,T i ) represents the probability of successful block packaging by an IoT node individual.
[0069] Since packing blocks requires not only computing power provided by each node, but also resources dispatched by communication providers. In order to fully dispatch the computing power of each node in the area to obtain the maximum benefit, communication providers need to dispatch resources for the transaction activities of each node. Therefore, the management node in each sub-area needs to count the resource consumption c required by node i in each sub-area. i The communication provider scheduling resource consumption C can be calculated by formula (4) k .
[0070]
[0071] Among them, C k represents the scheduling resource consumption provided by the communication provider in the kth region, represents the number of times node i participates in packaging in the kth region, N k Represents the number of nodes in the kth region.
[0072] In this step, the individual reward income of each node is determined through statistical calculations of the management nodes of each sub-region, and the scheduling resource consumption required by the communication provider in each sub-region is obtained. In order to achieve the optimal allocation of resources, it is hoped that the individual reward income of each node is maximized and the scheduling resource consumption required by the communication provider in each sub-region is minimized.
[0073] S103: Constructing a blockchain consensus resource game model according to the scheduling resource consumption of each sub-area and the personal reward income of each node;
[0074] In the embodiment of the present application, since it is necessary to maximize the personal benefit R obtained by node i i , and satisfy the constraint V min ≤V i ≤V max , a node personal reward benefit maximization model can be constructed (5).
[0075]
[0076] SV min ≤V i ≤V max
[0077] Among them, V max Indicates the maximum service demand, V min Indicates the minimum service demand.
[0078] In addition, the communication provider hopes to coordinate the computing power of the Internet of Things and allow all nodes to participate in consensus computing as much as possible, thereby maximizing network efficiency. Therefore, the communication provider's scheduling resource consumption is minimized to satisfy equation (6).
[0079]
[0080] SV min ≤V i ≤V max
[0081] Similarly, V max Indicates the maximum service demand, V min Indicates the minimum service demand.
[0082] Understandably, blockchain is a decentralized database without a centralized organization, so in the process of value transfer and information transmission, it is necessary to solve the consistency and correctness problems on all packaging nodes. A multi-party collaboration mechanism is needed to coordinate the participation of multiple parties to reach a unified and unique result, and to ensure that this process is difficult to be deceived, so as to ensure the stable operation of the system. Therefore, to reach a consensus, it is necessary to consider the game between individuals to achieve equilibrium.
[0083] Common game models in blockchain consensus algorithms include Nash equilibrium, Pareto optimality, gambler's ruin problem, and Byzantine generals' problem. The scenarios they target are technologies well known to technicians in this field and will not be elaborated here.
[0084] Specifically, the embodiment of the present application adopts the Stackelberg game model. The Stackelberg model is a production leadership model, and there are differences in the order of action between competing individuals. The production is determined according to the following order: the leading competitive individual determines a production, and then the follower competitive individual can observe this production, and then determine his own production based on the production of the leading competitive individual. It should be noted that when the leading competitive individual determines his own production, he fully understands how the follower competitive individual will act-this means that the leading competitive individual can know the reaction function of the follower competitive individual. Therefore, the leading competitive individual will naturally anticipate the impact of the production he decides on the follower competitive individual. It is precisely in consideration of this impact that the production determined by the leading competitive individual will be a profit-maximizing production constrained by the reaction function of the follower competitive individual.
[0085] According to the Stackelberg model, the blockchain consensus resource game model formula (7) can be constructed through formula (5) and formula (6).
[0086]
[0087] SV min ≤V i ≤V max
[0088] Among them, R i is the personal benefit R obtained by node i i , the C k is the scheduling resource consumption in the kth region, and the V i is the current service demand of node i.
[0089] S104: Generate multiple resource allocation schemes according to the blockchain consensus resource game model;
[0090] After the consensus resource game model is established, multiple resource allocation plans can be generated through the consensus resource game model.
[0091] According to the blockchain consensus resource game model formula (7), the search space range is constructed, and Q resource allocation schemes with randomly distributed age and personal service demand of each node are generated within the search space range, that is, the group, and the allocation scheme matrix Y = {y1, y2, ..., y q ,...,y Q}, where y q Represents the age of the qth resource allocation plan, that is, the individual.
[0092] Understandably, there is no “certainty” in the entire situation, and individuals in the blockchain are constantly engaging in dynamic multi-party games.
[0093] S105: Determine the best resource allocation scheme among the multiple resource allocation schemes through an improved optimization algorithm, and perform blockchain consensus resource allocation;
[0094] Specifically, the management node in each sub-area calculates the fitness value of each resource allocation scheme (individual) according to formula (8), and selects the resource allocation scheme with the largest fitness value as the optimal resource allocation scheme y best .
[0095]
[0096] Among them, F k Represents the fitness value of the resource allocation scheme in the kth region.
[0097] After determining the fitness value of the resource allocation scheme in each sub-area, the management node sorts the calculated resource allocation schemes (individuals) in descending order and classifies the individuals according to the age of the resource allocation schemes. An optional method is to select the top 10% of resource allocation schemes as Age_A individuals, the top 10%-30% of resource allocation schemes as Age_B individuals, the top 40%-70% of resource allocation schemes as Age_C individuals, and the bottom 30% of resource allocation schemes as Age_D individuals.
[0098] After sorting and classifying the individuals, the algorithm calculates and simulates each plan, and then updates the parameters. During the operation of the algorithm model, each individual will experience the grazing, ranking, social, imitation, defense and roaming stages. The parameter changes and updates in each stage are as follows:
[0099] 1) When the individual is in the grazing stage, the individual eats continuously in a specific area, that is, grazing slowly, and the individual's motion parameters are updated by formula (9).
[0100]
[0101] in, represents the movement parameters of the mth individual at different ages in the t iteration round, that is, the individual grazing tendency, AGE represents the age group, represents the upper bound parameter of the grazing space, represents the lower bound parameter of the grazing space, r represents a random number between 0 and 1, represents the correlation coefficient of grazing stage, represents the mth individual position at the t-1 iteration, Represents the position of the mth individual in the t-1 iteration round.
[0102] 2) When individuals are in the hierarchical stage, the group of individuals will follow the leader, that is, the best individual. According to the different behaviors of the groups of individuals at different ages, the parameters affecting the speed of the best individual position are updated through formula (10), thereby updating the resource allocation plan.
[0103]
[0104] in, It represents the influence parameter of the best individual position on the motion parameters of the mth individual at different ages in the t iteration rounds, represents the level stage coefficient, Represented as the position of the best individual.
[0105] 3) When the individual group is in the social stage, the individual group will usher in different social lives. According to the different behaviors of the individual groups at different ages, the social movement vector of the individual group is updated through formula (11).
[0106]
[0107] in, represents the social movement vector of the mth individual at different ages in the t iteration round, It is expressed as the direction coefficient of the individual towards the group of individuals in t iterations, and N is the total number of individuals.
[0108] 4) When the individual group is in the imitation stage, the individual group learns each other's habitual behaviors. According to the different performance behaviors of the individual groups at different ages, the motion vector of the individual group toward the optimal individual position is updated through formula (12).
[0109]
[0110] in, represents the motion vector of the mth individual at different ages towards the best individual position at t iteration rounds, represents the imitation stage coefficient, represents the best individual position in the t-1 iteration round, ψ N Indicates the number of individuals ranked in the top 10%.
[0111] 5) When the group is in the defense mechanism stage, the group will defend and resist against predators. According to the different behaviors of the group at different ages, the escape vector of the group from the worst position is updated by formula (13).
[0112]
[0113] in, represents the escape vector of the mth individual from the worst position at different ages in the t iteration round, represents the defense mechanism stage coefficient, ζ N Indicates the number of individuals ranked in the bottom 10%.
[0114] 6) When the swarm is in the roaming stage, when a new area is suddenly placed in the swarm, it will wander and update. According to the different behaviors of the swarm at different ages, the random speed vector of local search and escape from local minimum is updated through formula (14).
[0115]
[0116] in, represents the random velocity vector of the mth individual performing local search and escaping from the local minimum at different ages in t iteration rounds, The roaming phase coefficient, r represents a random number between 0 and 1.
[0117] After the individual has been operated in the grazing, level, social, imitation, defense and roaming stages, the individual's movement speed can be further updated according to the current iteration number t and the individual's age, thereby updating the individual's new speed in the search space. The speed update method of different individuals is as follows:
[0118] 1) Age_A individual updates its velocity through formula (15).
[0119]
[0120] in, represents the speed of the mth individual in the Age_A group at the t iteration time; represents the movement parameters of the mth individual in the Age_A group at the t iteration time, reflecting the grazing tendency of the relevant individuals. Represents the parameter vector of the mth individual escaping from the worst position in the Age_A population at the t iteration time.
[0121] 2) Age_B individual updates its velocity using formula (16).
[0122]
[0123] in, represents the speed of the mth individual in the Age_B population at the t iteration time, represents the motion parameters of the mth individual in the Age_B group at the t iteration time, It represents the influence parameter of the position of the mth individual and the best individual in the Age_B individual group on the speed parameter at the t iteration time; represents the social movement vector of the mth individual in the Age_B group at the t iteration time, It represents the parameter vector of the mth individual in the Age_B group escaping from the average value of individuals in worse positions at the t iteration time.
[0124] 3) Age_C updates its speed through formula (17).
[0125]
[0126] in, represents the speed of the mth individual in the Age_C population at the t iteration time, represents the motion parameters of the mth individual in the Age_C group at the t iteration time, It represents the influence parameter of the position of the mth individual and the best individual in the Age_C individual group on the speed parameter at the t iteration time; represents the social movement vector of the mth individual in the Age_C group at the t iteration time, represents the motion vector of the mth individual in the Age_C group towards the best position at the t iteration time, represents the parameter vector of the mth individual escaping from the worst position in the Age_C population at the t iteration time, Represents the random velocity vector of the mth individual in the Age_C group performing local search and escaping from the local minimum at the t iteration time.
[0127] 4) Age_D updates its speed through formula (18).
[0128]
[0129] in, represents the speed of the mth individual in the Age_D population at the t iteration time, represents the motion parameters of the mth individual in the Age_D individual group at the t iteration time, represents the motion vector of the mth individual in the Age_D group towards the best position at the t iteration time, Represents the random velocity vector of the mth individual in the Age_D population performing local search and escaping from the local minimum at the t iteration time.
[0130] After the speed of each individual is updated, the current position of the individual is updated according to the speed of the individual in different age groups and the position at the previous moment. The number of iterations is t=t+1, and the age of the individual is updated.
[0131] After performing the above operation for multiple iterations, it is determined whether the number of iterations reaches a preset threshold, or whether the fitness value remains unchanged for a preset number of rounds.
[0132] If the number of iterations last time reaches the preset threshold T, such as 20,000 rounds, it means that the individual has experienced sufficient iterative algorithms; or if the fitness value has not changed for 200 rounds, it means that the individual has reached a stable state, and it can be determined that the individual, that is, the resource allocation scheme has passed the algorithm test and is the best resource allocation scheme. Otherwise, if the resource allocation scheme has not passed the algorithm test, it is necessary to recalculate the fitness value of each resource allocation scheme, and select the resource allocation scheme with the largest fitness value as the best resource allocation scheme for algorithm iteration until the number of iterations reaches the preset threshold or it is determined that the fitness value has not changed for the preset number of rounds.
[0133] After obtaining the best resource allocation plan, the node individual reward income and communication supplier scheduling resources in the blockchain network can be allocated according to the best resource allocation plan. In this way, the node individual reward income can be maximized and the communication supplier scheduling resource consumption can be minimized, thereby improving the consensus efficiency and resource utilization of the blockchain network.
[0134] In order to solve the problem that the IoT blockchain framework lacks the optimal resource allocation solution and leads to low consensus efficiency, the embodiment of the present application divides the IoT network into regions, allocates consensus resources in each region according to the device load, and improves the utilization rate of consensus resources; according to the optimal service requirements required by each node in the region, the relative computing power of each node is calculated, and the consensus reward, reward factor, probability of successful block packaging, etc. are considered to obtain consensus rewards, reward factors, and the probability of successful block packaging, etc., and the node's personal expected benefit constraints are set, and the node's personal expected benefit is modeled, thereby refining the node's personal reward benefit maximization model. According to the scheduling computing resources of the communication providers in the region, the scheduling resource consumption is modeled, the scheduling resource consumption minimization model is refined, and the blockchain consensus resource game model is constructed. For the Stackelberg game model, each solution is defined as each individual during iteration, and the individual age is determined; according to the different individual ages, the optimization solution is sorted, and the individual set of different age groups is determined; according to the six general behaviors and social behaviors of different age groups in the individual set, it is iteratively updated, and the optimal solution is finally obtained quickly. This application can effectively analyze the optimal service requirements of nodes, study the solution of mobile blockchain resource management, balance the maximum interests of nodes and communication service providers, thereby improving the consensus enthusiasm and efficiency of IoT nodes, and ultimately realize the blockchain framework in the IoT environment. High-efficiency data communication and update.
[0135] Furthermore, the present application embodiment also provides a blockchain consensus resource allocation device, please refer to Figure 2 , shows a schematic diagram of a blockchain consensus resource allocation device 20 provided in an embodiment of the present application. The message sending device 20 includes:
[0136] The area division module 201 is used to divide the Internet of Things network into multiple sub-areas, determine the nodes of each sub-area, and determine the management node of each sub-area;
[0137] Optionally, the area division module 201 includes a judgment submodule 2011 and a management node determination submodule 2012. The judgment submodule 2011 is used to judge whether the current consensus is the first blockchain consensus, and the management node determination submodule 2012 is used to determine the management node of the sub-area according to the historical data of the base stations in the area when the current consensus is the first blockchain consensus; or when the current consensus is not the first blockchain consensus, the historical management node of the sub-area is used as the management node of the sub-area.
[0138] A determination module 202 is used to determine the scheduling resource consumption of each sub-area through the management node, and to determine the personal reward income of each node through the management node;
[0139] In an optional embodiment, the determination module 202 includes a scheduling resource consumption determination submodule 2021 and a personal reward income determination submodule 2022. The scheduling resource consumption determination submodule 2021 is used to determine the scheduling resource consumption of each node according to the service requirements, relative computing power and number of regional nodes of each node; the personal reward income determination submodule 2022 is used to determine the personal reward income of each node according to the fixed block reward, variable reward and the probability of each node successfully packaging a block.
[0140] Modeling module 203, used to build a blockchain consensus resource game model based on the scheduling resource consumption of each sub-area and the personal reward income of each node;
[0141] The optimal solution solving module 204 is used to generate multiple resource allocation solutions according to the blockchain consensus resource game model;
[0142] Specifically, the optimal solution solving module 204 constructs a search space range according to the blockchain consensus resource game model, and generates multiple resource allocation solutions within the search space range;
[0143] Among them, the blockchain consensus resource game model is specifically as follows:
[0144]
[0145] Ri is the personal benefit obtained by node i, Ck is the scheduling resource consumption in the kth region, and is the current service demand of node i.
[0146] The allocation module 205 is used to determine the best resource allocation scheme among the multiple resource allocation schemes through an improved optimization algorithm, and perform blockchain consensus resource allocation.
[0147] Optionally, the allocation module 205 includes an iteration submodule 2051 and an allocation submodule 2052. The iteration submodule 2051 is used to iterate multiple resource allocation schemes for multiple times, and when the number of iterations reaches a preset threshold or the fitness value does not change for a preset number of rounds, determine that the resource allocation scheme is the best resource allocation scheme; the allocation submodule 2052 is used to perform consensus resource allocation according to the best resource allocation scheme.
[0148] The blockchain consensus resource allocation device 20 provided in the embodiment of the present application can implement each process implemented in the above blockchain consensus resource allocation method embodiment. For its specific principles and implementation details, please refer to the above sending method embodiment. To avoid repetition, it will not be repeated here.
[0149] In the embodiment of the present application, by setting the area division module 201, the determination module 202, the modeling module 203, the optimal solution solution module 204 and the allocation module 205, the Internet of Things network is divided into multiple sub-areas, the nodes and management nodes of each sub-area are determined, and the scheduling resource consumption of each sub-area and the personal reward income of each node are determined by the management node. The blockchain consensus resource game model is constructed according to the scheduling resource consumption and the personal reward income, and then multiple resource allocation schemes are generated, and the best resource allocation scheme is selected from the multiple resource allocation schemes for consensus resource allocation. This application can maximize the reward income of the Internet of Things nodes and minimize the scheduling resource consumption of the communication supplier, thereby improving the consensus efficiency of the blockchain network and laying the foundation for the real-time security protection of the Internet of Things data.
[0150] The virtual device in the embodiment of the present application may be a device, or a component, an integrated circuit, or a chip in a terminal.
[0151] The above description is only an embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.
Claims
1. A blockchain consensus resource allocation method, characterized in that: include: Divide the Internet of Things network into multiple sub-areas, determine the nodes of each sub-area, and determine the management node of each sub-area; Determine the scheduling resource consumption of each of the sub-areas through the management node, and determine the personal reward income of each of the nodes through the management node; Constructing a blockchain consensus resource game model according to the scheduling resource consumption of each sub-area and the personal reward income of each node; Generate multiple resource allocation plans according to the blockchain consensus resource game model; Determine the best resource allocation scheme among the multiple resource allocation schemes through an improved optimization algorithm, and perform blockchain consensus resource allocation; The specific method for determining the personal reward income is as follows: The management node in the region calculates and updates the current service demand V of each node i i , adjust the minimum service demand V min and the maximum service demand V max And calculate the service demand V in the area by formula (1) i The relative computing power of node i is H i : The corresponding variable reward A is calculated by formula (2): v , calculate the node's individual expected return R through (3) i : A v =A v-f ×T i (2) R i =(A s +A v )P i (H i ,T i )(3) Among them, A v represents variable reward, A v-f represents the variable reward factor, T i Represents the transaction data packaged by node i, P i (H i ,T i ) represents the probability of successful block packaging by an IoT node individual.
2. The blockchain consensus resource allocation method according to claim 1, characterized in that: The specific step of determining the management node of each sub-area is: Determine whether the current consensus is the first blockchain consensus; When the current consensus is the first blockchain consensus, the management node of the sub-area is determined according to the historical data of the base stations in the area; In the case that the current consensus is not the first blockchain consensus, the historical management node of the sub-area is used as the management node of the sub-area.
3. The blockchain consensus resource allocation method according to claim 1, characterized in that: The determination of the scheduling resource consumption of each sub-area by the management node is specifically as follows: The management node determines the scheduling resource consumption of each node according to the service demand, relative computing capacity and number of regional nodes of each node; The individual reward income of each node determined by the management node is specifically: The individual reward income of each node is determined by the fixed block reward, variable reward and the probability of each node successfully packaging a block.
4. The blockchain consensus resource allocation method according to claim 1, characterized in that: The generation of multiple resource allocation schemes according to the blockchain consensus resource game model is specifically as follows: Constructing a search space range according to the blockchain consensus resource game model, and generating a plurality of resource allocation schemes within the search space range; Among them, the blockchain consensus resource game model is specifically as follows: The R i The personal benefit R obtained by node i i , the C k is the scheduling resource consumption in the kth region, and the V i is the current service demand of node i.
5. The blockchain consensus resource allocation method according to claim 1, characterized in that: The determining of the best resource allocation scheme among the multiple resource allocation schemes is specifically: The multiple resource allocation schemes are iterated multiple times, and when the number of iterations reaches a preset threshold or the fitness value does not change for a preset number of rounds, the resource allocation scheme is determined to be the optimal resource allocation scheme.
6. A blockchain consensus resource allocation device, characterized in that: include: A region division module, used to divide the Internet of Things network into multiple sub-regions, determine the nodes of each sub-region, and determine the management node of each sub-region; A determination module, used to determine the scheduling resource consumption of each of the sub-areas through the management node, and to determine the personal reward income of each of the nodes through the management node; A modeling module, used to construct a blockchain consensus resource game model according to the scheduling resource consumption of each sub-area and the personal reward income of each node; An optimal solution solving module, used to generate multiple resource allocation solutions according to the blockchain consensus resource game model; An allocation module, used to determine the best resource allocation scheme among the multiple resource allocation schemes through an improved optimization algorithm, and perform blockchain consensus resource allocation; The specific method for determining the personal reward income is as follows: The management node in the region calculates and updates the current service demand V of each node i i , adjust the minimum service demand V min and the maximum service demand V max And calculate the service demand V in the area by formula (1) i The relative computing power of node i is H i : The corresponding variable reward A is calculated by formula (2): v , calculate the node's individual expected return R through (3) i : A v =A v-f ×T i (2) R i =(A s +A v )P i (H i ,T i )(3) Among them, A v represents variable reward, A v-f represents the variable reward factor, T i Represents the transaction data packaged by node i, P i (H i ,T i ) represents the probability of successful block packaging by an IoT node individual.
7. The blockchain consensus resource allocation device according to claim 6, characterized in that: The area division module comprises: The judgment submodule is used to determine whether the current consensus is the first blockchain consensus; The management node determination submodule is used to determine the management node of the sub-area according to the historical data of the base stations in the area when the current consensus is the first blockchain consensus; or to use the historical management node of the sub-area as the management node of the sub-area when the current consensus is not the first blockchain consensus.
8. The blockchain consensus resource allocation device according to claim 6, characterized in that: The determination module comprises: A scheduling resource consumption determination submodule, used to determine the scheduling resource consumption of each node according to the service requirements, relative computing capabilities and number of regional nodes of each node; The individual reward income determination submodule is used to determine the individual reward income of each node through the block fixed reward, variable reward and the probability of each node successfully packaging a block.
9. The blockchain consensus resource allocation device according to claim 6, characterized in that: The optimal solution solving module is specifically used for: Constructing a search space range according to the blockchain consensus resource game model, and generating a plurality of resource allocation schemes within the search space range; Among them, the blockchain consensus resource game model is specifically as follows: The R i The personal benefit R obtained by node i i , the C k is the scheduling resource consumption in the kth region, and the V i is the current service demand of node i.
10. The blockchain consensus resource allocation device according to claim 6, characterized in that: The allocation module comprises: An iterative submodule, configured to iterate the multiple resource allocation schemes for multiple times, and determine that the resource allocation scheme is the best resource allocation scheme when the number of iterations reaches a preset threshold or the fitness value does not change for a preset number of rounds; The allocation submodule is used to perform consensus resource allocation according to the optimal resource allocation scheme.
Citation Information
Patent Citations
Block chain computing power optimization scheduling method oriented to intelligent data processing
CN112769641A
Block chain medical data sharing incentive method based on game theory
CN113808694A
KR20200034171A
