CN106897150B - Resource quota management method based on permission chain - Google Patents
Resource quota management method based on permission chain Download PDFInfo
- Publication number
- CN106897150B CN106897150B CN201710198968.3A CN201710198968A CN106897150B CN 106897150 B CN106897150 B CN 106897150B CN 201710198968 A CN201710198968 A CN 201710198968A CN 106897150 B CN106897150 B CN 106897150B
- Authority
- CN
- China
- Prior art keywords
- user
- quota
- resource
- block
- transaction
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5083—Techniques for rebalancing the load in a distributed system
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer And Data Communications (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a resource quota management method based on a permit chain, which is characterized in that a quota management system is arranged for the permit chain, the distribution capability of an administrator on system resources is enhanced, a token system and a commission charge system do not need to be set, the distribution of block chain resources and a node incentive mechanism are simplified, different quotas and periods can be set for different users, and different requirements of different types of users are met. By setting the periodic user quota, the user can flexibly manage the frequency and peak value of the transaction, the direct control of the quota of each block is avoided, and the granularity is too fine.
Description
Technical Field
The invention relates to a resource quota management method based on a permit chain, which is characterized in that a resource quota management method is added on the basis of the existing permit chain protocol, so that an administrator can reasonably distribute computing resources, storage resources and the like of the permit chain.
Background
Blockchains are a new distributed technology that can be classified into public and license chains according to access and management rights. The public chain is a block chain without an admission mechanism, and anyone in the world can generate a legal account, participate in reading, send transactions, confirm transactions and even participate in consensus according to a public protocol.
The permission chain refers to a block chain with admission mechanisms for nodes and users, and a community is formed by a plurality of mechanisms, each mechanism runs one node, and in order to enable each block to take effect, the confirmation of most mechanisms is needed. The identity of the user on the block chain is also checked, mostly in a real name system, and corresponds to the identity relationship in the real world.
All nodes store the same copy of the global account book, consume the same computing resources and storage resources, but machine resources of all nodes are limited, so that the resource consumption of a user needs to be reasonably distributed. If a public chain user needs to perform writing operations such as transfer or contract arrangement, a certain token needs to be purchased firstly, and after a certain amount of commission fees charged by the token are paid, the commission fees are packaged into blocks by nodes, and the commission fees are also owned by the nodes. However, in the case of strictly controlling admission in a alliance chain, there is generally no token system, and the token fee pattern is easily abused by users, which causes the problem of blocking the block chain, and reduces the control degree of the administrator on the permission chain.
Disclosure of Invention
The invention aims to provide a resource quota management method based on a permission chain aiming at the defects of the prior art.
The purpose of the invention is realized by the following technical scheme: a resource quota management method based on a permission chain is disclosed, which comprises the following steps:
(1) the administrator generates its own account and places the initial "administrator address" and "block resource quota" into the created block. A variable usersqualaalimit of a user resource quota is constructed in a founding block, the structure is map (user address ═ user quota), "user resource resetting period" variable UsersResetBlocks, the structure is map (user address ═ resetting block number), and a "quota management" function, and the parameters are as follows: the user address, the user quota and the reset block number are used for modifying the corresponding UserQuotaLimit and UserResetBlocks according to the user address. All transactions packed in each block must not exceed the "block resource limit".
(2) Each node generates a 'user resource residual' variable after creating a block: usersqualacleft, defined as map (user address > remaining quota).
(3) And the user generates an account address of the user and submits a quota application to an administrator.
(4) The administrator specifies the "user quota" and "reset block number" for the user, invokes the "quota management" function, and initiates the transaction.
(5) After receiving the call transaction of the quota management function, the node firstly verifies whether a transaction initiator is an administrator, and if so, packages the transaction, and respectively inputs a user address, a user quota and a reset block number into a user resource quota variable and a user resource reset period variable. Meanwhile, the 'remaining quota' of the user in the 'user resource remaining' is initialized to 'user quota'.
(6) After the user initiates other transactions tx, the node calculates the resource quantity required to be consumed by the transaction tx according to the transaction quota consumption calculation method f: f (tx); obtaining the 'residual resource' of the user according to the user address, and if the 'residual resource' > (f) (tx), performing a packaging transaction, and updating the 'residual resource' into the 'residual resource' -f (tx); if "resources remaining" < f (tx), the transaction is not packaged.
Before packing and synchronizing each block, the node needs to traverse all users in the 'user resource surplus', and if the height of the current block minus the height of the block for resetting the user last time is more than or equal to the 'reset block number' of the user, the 'surplus resource' of the user is reset to be 'user quota'.
Further, the quota consumption calculation method in the step 6 is that the number of resources consumed for the transaction is calculated according to the weighing standards such as the consumption of each unit of storage space and the consumption of each step of operation
Further, the administrator may also modify the quota setting of the user, calling the "quota management" function again to initiate the transaction.
The invention has the beneficial effects that: the quota management system is set for the permission chain, the allocation capacity of an administrator to system resources is enhanced, a token system and a commission charge system do not need to be set any more, the allocation of block chain resources and a node incentive mechanism are simplified, different quotations and periods can be set for different users, and different requirements of different types of users are met. By setting the periodic user quota, the user can flexibly manage the frequency and peak value of the transaction, the direct control of the quota of each block is avoided, and the granularity is too fine.
Detailed Description
The invention relates to a resource quota management method based on a permission chain, which is characterized in that an administrator sets global 'block resource quota', the administrator sets 'user resource quota' for each user, and 'user resource resetting period', the user resource setting can be adjusted according to different user categories, user resources do not need to be purchased by self, but are distributed by a system, and the user resources are reset periodically according to the number of a plurality of blocks as the period. After receiving the transaction of the user, the node checks whether the user has a quota in the current period and whether the consumption of the current transaction can be met, if so, the transaction is legal, and if not, the transaction is illegal. The method comprises the following specific steps:
(1) the administrator generates its own account and places the initial "administrator address" and "block resource quota" into the created block. A variable usersqualaalimit of a user resource quota is constructed in a founding block, the structure is map (user address ═ user quota), "user resource resetting period" variable UsersResetBlocks, the structure is map (user address ═ resetting block number), and a "quota management" function, and the parameters are as follows: the user address, the user quota and the reset block number are used for modifying the corresponding UserQuotaLimit and UserResetBlocks according to the user address. All transactions packed in each block must not exceed the "block resource limit".
(2) Each node generates a 'user resource residual' variable after creating a block: usersqualacleft, defined as map (user address > remaining quota).
(3) And the user generates an account address of the user and submits a quota application to an administrator.
(4) The administrator specifies the "user quota" and "reset block number" for the user, invokes the "quota management" function, and initiates the transaction.
(5) After receiving the call transaction of the quota management function, the node firstly verifies whether a transaction initiator is an administrator, and if so, packages the transaction, and respectively inputs a user address, a user quota and a reset block number into a user resource quota variable and a user resource reset period variable. Meanwhile, the 'remaining quota' of the user in the 'user resource remaining' is initialized to 'user quota'.
(6) After the user initiates other transactions tx, the node calculates the resource quantity required to be consumed by the transaction tx according to the transaction quota consumption calculation method f: f (tx); obtaining the 'residual resource' of the user according to the user address, and if the 'residual resource' > (f) (tx), performing a packaging transaction, and updating the 'residual resource' into the 'residual resource' -f (tx); if "resources remaining" < f (tx), the transaction is not packaged.
Before packing and synchronizing each block, the node needs to traverse all users in the 'user resource surplus', and if the height of the current block minus the height of the block for resetting the user last time is more than or equal to the 'reset block number' of the user, the 'surplus resource' of the user is reset to be 'user quota'.
The quota consumption calculation method in the step 6 is that the number of resources consumed by the transaction is calculated according to the balance standards of the consumption of each unit of storage space and the consumption of each step of operation
In addition, the administrator may modify the quota setting of the user, and invoke the "quota management" function again to initiate the transaction.
Claims (3)
1. A resource quota management method based on a permission chain is characterized by comprising the following steps:
(1) the administrator generates own account and puts the initial 'administrator address' and 'block resource quota' into the created block; a variable usersqualaalimit of a user resource quota is constructed in a founding block, the structure is map (user address ═ user quota), "user resource resetting period" variable UsersResetBlocks, the structure is map (user address ═ resetting block number), and a "quota management" function, and the parameters are as follows: the user address, the user quota and the reset block number are used for modifying corresponding usersQuotaLimit and usersResetBlocks according to the user address; the "block resource quota" must not be exceeded by all transactions packed in each block;
(2) each node generates a 'user resource surplus' after the creation block: usersqualacleft, defined as map (user address > remaining quota);
(3) a user generates an account address of the user and submits a quota application to an administrator;
(4) the administrator specifies the user quota and the reset block number of the user, calls a quota management function and initiates a transaction;
(5) after receiving the call transaction of a quota management function, the node firstly verifies whether a transaction initiator is an administrator, if so, the transaction is packaged, and a user address, a user quota and a reset block number are respectively input into a user resource quota variable and a user resource reset period variable; meanwhile, initializing the 'residual quota' of the user in 'user resource residual' as 'user quota';
(6) after the user initiates other transactions tx, the node calculates the resource quantity required to be consumed by the transaction tx according to the transaction quota consumption calculation method f: f (tx); obtaining the 'residual resource' of the user according to the user address, and if the 'residual resource' > (f) (tx), performing a packaging transaction, and updating the 'residual resource' into the 'residual resource' -f (tx); if "resources remaining" < f (tx), the transaction is not packaged;
before packing and synchronizing each block, the node needs to traverse all users in the 'user resource surplus', and if the height of the current block minus the height of the block for resetting the user last time is more than or equal to the 'reset block number' of the user, the 'surplus resource' of the user is reset to be 'user quota'.
2. The method according to claim 1, wherein the quota consumption in step (6) is calculated by calculating the amount of resources consumed for the transaction according to a balance standard of consumption per unit of storage space and consumption per step of operation.
3. The method of claim 1, wherein the administrator can further modify the quota setting of the user, and invoke the quota management function again to initiate the transaction.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710198968.3A CN106897150B (en) | 2017-03-29 | 2017-03-29 | Resource quota management method based on permission chain |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710198968.3A CN106897150B (en) | 2017-03-29 | 2017-03-29 | Resource quota management method based on permission chain |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106897150A CN106897150A (en) | 2017-06-27 |
CN106897150B true CN106897150B (en) | 2020-04-10 |
Family
ID=59192729
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710198968.3A Active CN106897150B (en) | 2017-03-29 | 2017-03-29 | Resource quota management method based on permission chain |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106897150B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107481146A (en) * | 2017-10-13 | 2017-12-15 | 深圳市招股科技有限公司 | One kind is based on the safe and efficient financial trade method of block chain |
CN113421089A (en) * | 2018-06-13 | 2021-09-21 | 创新先进技术有限公司 | Block chain-based available resource quota exchange method and device |
CN108960902B (en) * | 2018-06-13 | 2021-04-27 | 创新先进技术有限公司 | Block chain-based set exchange method and device for available resource quota |
CN108960672B (en) * | 2018-07-23 | 2023-01-03 | 上海品唯信息技术有限公司 | Quota and time-limited wind control method and device and computer readable storage medium |
CN109690600B (en) * | 2018-08-22 | 2023-05-26 | 区链通网络有限公司 | Block chain resource use control method, device and storage medium |
CN109982435B (en) * | 2019-03-15 | 2020-12-01 | 北京交通大学 | Spectrum access and management method based on block chain |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105488431A (en) * | 2015-11-30 | 2016-04-13 | 布比(北京)网络技术有限公司 | Authority management method and device for block chain system |
CN105844505A (en) * | 2016-03-17 | 2016-08-10 | 深圳市新世纪启航科技开发有限公司 | Method of carrying out digital currency trading through block chain technology |
WO2016171349A2 (en) * | 2015-04-20 | 2016-10-27 | (주)코인플러그 | Digital virtual currency transaction system and method having block chain between concerned parties |
CN106301794A (en) * | 2016-10-17 | 2017-01-04 | 特斯联(北京)科技有限公司 | Block chain is used to carry out the method and system of authorization identifying |
-
2017
- 2017-03-29 CN CN201710198968.3A patent/CN106897150B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2016171349A2 (en) * | 2015-04-20 | 2016-10-27 | (주)코인플러그 | Digital virtual currency transaction system and method having block chain between concerned parties |
CN105488431A (en) * | 2015-11-30 | 2016-04-13 | 布比(北京)网络技术有限公司 | Authority management method and device for block chain system |
CN105844505A (en) * | 2016-03-17 | 2016-08-10 | 深圳市新世纪启航科技开发有限公司 | Method of carrying out digital currency trading through block chain technology |
CN106301794A (en) * | 2016-10-17 | 2017-01-04 | 特斯联(北京)科技有限公司 | Block chain is used to carry out the method and system of authorization identifying |
Also Published As
Publication number | Publication date |
---|---|
CN106897150A (en) | 2017-06-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106897150B (en) | Resource quota management method based on permission chain | |
CN110163590B (en) | Payment withholding method and device based on block chain, electronic equipment and storage medium | |
Ariyarathna et al. | Dynamic spectrum access via smart contracts on blockchain | |
CN103974221B (en) | The distribution method and device of packet domain real time billing flow quota | |
WO2020015406A1 (en) | Method and device for credit evaluation of copyright user based on block chain | |
US20140348030A1 (en) | Method and Apparatus for Controlling Charging in a Communication Network | |
TW202006639A (en) | Method and apparatus for distributing copyright income based on block chain | |
CN111242619B (en) | Alliance chain consensus method introducing supervision mechanism, blockchain network and storage medium | |
CN107995003A (en) | The charging and settlement method of international roaming communication, relevant apparatus and distributed system | |
Sanghavi et al. | A new mechanism for the free-rider problem | |
CN106453127A (en) | Token processing method and device | |
CN102118727A (en) | Online charging method and device | |
CN101431745B (en) | Account resource reservation and distribution method used for IMS multi-service on-line charging | |
US11734004B2 (en) | Computing system and method | |
CN106304007A (en) | A kind of charging method, communications platform and communication system | |
CN109428735A (en) | Charging method and charge system | |
CN103841200B (en) | A kind of control method and device of software license | |
CN106327273A (en) | STS-based prepaid electricity selling system and method | |
CN106407636A (en) | Integration result statistics method and apparatus | |
CN106775925A (en) | A kind of limit treating method and apparatus of virtual machine CPU | |
CN109492847B (en) | Multi-resource platform based on block chain and multi-resource allocation method | |
CN104468755B (en) | The method and apparatus for realizing application performance guarantee | |
CN108111534A (en) | A kind of method and device for controlling authorization | |
CN113781214A (en) | Packaging method, device and equipment for promoting transaction TPS (transaction transfer protocol) based on PoW (PoW) | |
TW201524151A (en) | Dynamic billing cloud system and method thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20200323 Address after: 310012 no.1001, 10 / F, block a, Huaxing Times Square, No.478, Wensan Road, Xihu District, Hangzhou City, Zhejiang Province Applicant after: Hangzhou Xita Technology Co.,Ltd. Address before: Seven 310030 Hangzhou Road, Zhejiang province Xihu District three Town Xiyuan No. 3 Building 3 Room 203 Applicant before: CRYPTAPE Co.,Ltd. |
|
TA01 | Transfer of patent application right |