WO2018036441A1 - Block chain write permission assignment method and system - Google Patents

Block chain write permission assignment method and system Download PDF

Info

Publication number
WO2018036441A1
WO2018036441A1 PCT/CN2017/098233 CN2017098233W WO2018036441A1 WO 2018036441 A1 WO2018036441 A1 WO 2018036441A1 CN 2017098233 W CN2017098233 W CN 2017098233W WO 2018036441 A1 WO2018036441 A1 WO 2018036441A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal
write
rule
candidate
preset
Prior art date
Application number
PCT/CN2017/098233
Other languages
French (fr)
Chinese (zh)
Inventor
杨鹏
Original Assignee
杨鹏
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Priority to CN201610740849.1A priority Critical patent/CN106203178B/en
Priority to CN201610740849.1 priority
Application filed by 杨鹏 filed Critical 杨鹏
Publication of WO2018036441A1 publication Critical patent/WO2018036441A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules

Abstract

A block chain write permission assignment method and system. The method comprises: recording calculation time periods spent by multiple terminals in resolving difficulties generated according to a preset algorithm (S101); sorting the calculation time periods corresponding to the terminals in ascending order, and using the terminals, the calculation time periods of which are shorter than a preset time period, as candidate terminals (S102); and selecting a terminal from the candidate terminals according to a preset permission rule to serve as a write terminal, and assigning a write permission for writing data into a block chain database to the write terminal (S103). A write terminal is selected according to a preset permission rule, a write permission is assigned to the write terminal, the write permission is not assigned to a terminal the calculation time period of which is the shortest, and accordingly the problem of hidden security risks of a block chain database caused by concentration of write permissions on "miners" corresponding to a small number of terminals is resolved, the security of the block chain database is improved, and the practicability is high.

Description

一种区块链的写入权限分配方法及系统Method and system for assigning write permission of blockchain 技术领域Technical field
本发明涉及区块链技术领域,具体涉及一种区块链的写入权限分配方法及系统。The present invention relates to the field of blockchain technology, and in particular, to a method and system for assigning a write permission of a blockchain.
背景技术Background technique
现有技术中,在向区块链数据库中写入数据时,其写入权限的分配是按照计算出难题结果的速度进行分配的,如果某个终端最先解出难题的结果,那么该终端拥有向区块链中写入数据的写入权限。采用该写入权限分配方法会导致写入权限被集中在少数计算速度快的“矿机”对应的“旷工”手中,导致“中心化”问题产生,如果少数“旷工”达成一致一起对区块链数据库进行攻击,或者一起改变区块链数据库记录数据的规则,会让区块链数据库产生极大的安全隐患。因而如何解决“中心化”问题,实现“去中心化”是现在区块链技术领域中亟待解决的问题。In the prior art, when data is written into the blockchain database, the allocation of write permissions is allocated according to the speed at which the difficult result is calculated. If a terminal first solves the problem of the puzzle, then the terminal Has write access to write data to the blockchain. Adopting the write permission allocation method will result in the write permission being concentrated in the hands of a few miners with a fast calculation speed, resulting in a "centralization" problem, if a few "achievement" agrees on the block together Attacking the chain database, or changing the rules of the blockchain database to record data together, will cause a huge security risk in the blockchain database. Therefore, how to solve the problem of "centralization" and realize "decentralization" is an urgent problem to be solved in the field of blockchain technology.
发明内容Summary of the invention
本发明所要解决的技术问题是提供一种区块链的数据记账方法及系统,解决了区块链数据库的写入权限被少数“旷工”所掌握的“中心化”问题,提高了区块链数据库的安全性。The technical problem to be solved by the present invention is to provide a data accounting method and system for a blockchain, which solves the problem of "centralization" that the write permission of the blockchain database is mastered by a few "completed work", and improves the block. The security of the chain database.
本发明解决上述技术问题的技术方案如下:The technical solution of the present invention to solve the above technical problems is as follows:
依据本发明的一个方面,提供了一种区块链的写入权限分配方法,所述方法包括:According to an aspect of the present invention, a method for assigning a write permission of a blockchain is provided, the method comprising:
S101、记录多个终端解决按照预设算法规则生成的难题所花费的计算时 间;S101. Recording calculation time when multiple terminals solve the problem generated by the preset algorithm rule between;
S102、对各个终端对应的计算时间进行升序排序,并将计算时间小于预设时间对应的多个终端作为备选终端;S102: Perform an ascending ordering on the calculation time corresponding to each terminal, and use a plurality of terminals whose calculation time is less than the preset time as the candidate terminal;
S103、按照预设权限规则从所述备选终端中选择一个终端作为写入终端,将向区块链数据库中写入数据的写入权限分配给所述写入终端。S103. Select one terminal from the candidate terminals as a write terminal according to a preset authority rule, and allocate write permission for writing data in the blockchain database to the write terminal.
本发明的有益效果:本发明提供的一种区块链的写入权限分配方法,能够记录并统计各个终端计算难题的计算时间,并从多个终端中筛选出计算时间小于预设时间的多个终端作为备选终端,然后按照预设权限规则从备选终端中选择一个终端作为写入终端,赋予其写入权限。本发明按照预设权限规则选择写入终端并赋予写入权限,而不是将写入权限赋予计算时间最短的终端,解决了写入权限集中于少数终端对应的“旷工”手中造成的区块链数据库的安全隐患问题,提高了区块链数据库的安全性,实用性较强。Advantageous Effects of the Invention The present invention provides a method for assigning a write permission of a blockchain, which can record and count the calculation time of each terminal calculation difficulty, and filter out the calculation time from the plurality of terminals to be less than the preset time. The terminals are used as candidate terminals, and then one terminal is selected as a write terminal from the candidate terminals according to a preset authority rule, and the write authority is given. The invention selects the write terminal according to the preset authority rule and gives the write permission, instead of assigning the write permission to the terminal with the shortest calculation time, and solves the blockchain caused by the write permission concentrated in the "achievement" hand corresponding to a few terminals. The security risks of the database improve the security of the blockchain database and have strong practicability.
进一步的,所述S103中所述预设权限规则具体包括随机分配规则或者效率分配规则。Further, the preset permission rule in the S103 specifically includes a random allocation rule or an efficiency allocation rule.
采用上述进一步方案的有益效果:采用不同的权限规则来从备选终端中选择一个终端作为写入终端,避免写入权限过于集中。The beneficial effect of adopting the above further solution is that different permission rules are used to select one terminal from the candidate terminals as the writing terminal, so as to avoid excessive concentration of writing authority.
进一步的,所述预设权限规则为随机分配规则时,所述S103中所述按照预设权限规则从所述备选终端中选择一个终端作为写入终端具体包括:Further, when the preset permission rule is a random allocation rule, the selecting, by the S103, that the terminal is selected from the candidate terminal as the write terminal according to the preset permission rule includes:
从所述备选终端中随机选取一个终端,将其作为写入终端,所述备选终端中每个终端被选取的概率相同。A terminal is randomly selected from the candidate terminals as a write terminal, and each terminal of the candidate terminal is selected with the same probability.
采用上述进一步方案的有益效果:采用随机分配规则挑选终端,保证每一个备选终端都有相同的概率被选中成为写入终端,避免写入权限过于集中。The beneficial effects of the above further solution are adopted: the terminal is selected by using a random allocation rule, and each candidate terminal has the same probability to be selected as the writing terminal, so as to avoid excessive concentration of writing authority.
进一步的,所述预设权限规则为效率分配规则时,所述S103中所述按照预设权限规则从所述备选终端中选择一个终端作为写入终端具体包括: Further, when the preset permission rule is an efficiency allocation rule, the selecting, by the S103, that the terminal is selected from the candidate terminal as the write terminal according to the preset permission rule includes:
根据公式
Figure PCTCN2017098233-appb-000001
计算出效率参数,然后根据所述效率参数计算得到各个备选终端被选择成为所述写入终端的概率,并按照所述概率从所述备选终端中选择一个终端作为写入终端,其中,ti为各个备选终端对应的计算时间,d为效率参数,
Figure PCTCN2017098233-appb-000002
为第i个备选终端被选择成为所述写入终端的概率。
According to the formula
Figure PCTCN2017098233-appb-000001
Calculating an efficiency parameter, and then calculating a probability that each candidate terminal is selected as the writing terminal according to the efficiency parameter, and selecting one terminal from the candidate terminal as the writing terminal according to the probability, wherein t i is the calculation time corresponding to each candidate terminal, and d is an efficiency parameter.
Figure PCTCN2017098233-appb-000002
The probability that the ith candidate terminal is selected to be the write terminal.
采用上述进一步方案的有益效果:采用效率分配规则挑选终端,在基于计算时间的基础上相对公平的挑选写入终端,避免写入权限过于集中。The beneficial effect of adopting the above further solution is that the terminal is selected by using the efficiency allocation rule, and the writing terminal is relatively fairly selected based on the calculation time, so as to avoid excessive concentration of writing authority.
依据本发明的另一个方面,提供了一种区块链的写入权限分配系统,所述系统包括:According to another aspect of the present invention, a write chain allocation system for a blockchain is provided, the system comprising:
记录单元,用于记录多个终端解决按照预设算法规则生成的难题所花费的计算时间;a recording unit, configured to record a calculation time taken by a plurality of terminals to solve a puzzle generated according to a preset algorithm rule;
排序确定单元,用于对各个终端对应的计算时间进行升序排序,并将计算时间小于预设时间对应的多个终端作为备选终端;a sorting determining unit, configured to sort the computing time corresponding to each terminal in ascending order, and use a plurality of terminals whose computing time is less than the preset time as the candidate terminal;
权限分配单元,用于按照预设权限规则从所述备选终端中选择一个终端作为写入终端,将向区块链数据库中写入数据的写入权限分配给所述写入终端。The authority assigning unit is configured to select one terminal from the candidate terminals as the writing terminal according to the preset authority rule, and allocate the writing authority for writing data to the blockchain database to the writing terminal.
本发明的有益效果:本发明提供的一种区块链的写入权限分配系统,能够记录并统计各个终端计算难题的计算时间,并从多个终端中筛选出计算时间小于预设时间的多个终端作为备选终端,然后按照预设权限规则从备选终端中选择一个终端作为写入终端,赋予其写入权限。本发明按照预设权限规则选择写入终端并赋予写入权限,而不是将写入权限仅仅赋予计算时间最短的终端,解决了写入权限集中于少数速度快的终端对应的“旷工”手中造成的区块链数据库的安全隐患问题,提高了区块链数据库的安全性,实用性较 Advantageous Effects of the Invention The present invention provides a block chain write permission distribution system capable of recording and counting the calculation time of each terminal calculation difficulty, and filtering out the calculation time from the plurality of terminals to be less than the preset time. The terminals are used as candidate terminals, and then one terminal is selected as a write terminal from the candidate terminals according to a preset authority rule, and the write authority is given. The invention selects the write terminal according to the preset authority rule and gives the write permission, instead of assigning the write permission only to the terminal with the shortest calculation time, and solves the problem that the write permission is concentrated in the "achieving" hand corresponding to a few fast terminals. The security problem of the blockchain database improves the security of the blockchain database, and the practicability is better.
进一步的,所述权限分配单元中所述预设权限规则具体包括随机分配规则或者效率分配规则。Further, the preset permission rule in the rights allocation unit specifically includes a random allocation rule or an efficiency allocation rule.
采用上述进一步方案的有益效果:采用不同的权限规则来从备选终端中选择一个终端作为写入终端,避免写入权限过于集中。The beneficial effect of adopting the above further solution is that different permission rules are used to select one terminal from the candidate terminals as the writing terminal, so as to avoid excessive concentration of writing authority.
进一步的,所述预设权限规则为随机分配规则时,所述权限分配单元具体用于:Further, when the preset permission rule is a random allocation rule, the rights allocation unit is specifically configured to:
从所述备选终端中随机选取一个终端,将其作为写入终端,所述备选终端中每个终端被选取的概率相同。A terminal is randomly selected from the candidate terminals as a write terminal, and each terminal of the candidate terminal is selected with the same probability.
采用上述进一步方案的有益效果:采用随机分配规则挑选终端,保证每一个备选终端都有相同的概率被选中成为写入终端,避免写入权限过于集中。The beneficial effects of the above further solution are adopted: the terminal is selected by using a random allocation rule, and each candidate terminal has the same probability to be selected as the writing terminal, so as to avoid excessive concentration of writing authority.
进一步的,所述预设权限规则为效率分配规则时,所述权限分配单元具体用于:Further, when the preset permission rule is an efficiency allocation rule, the rights allocation unit is specifically configured to:
根据公式
Figure PCTCN2017098233-appb-000003
计算出效率参数,然后根据所述效率参数计算得到各个备选终端被选择成为所述写入终端的概率,并按照所述概率从所述备选终端中选择一个终端作为写入终端,其中,ti为各个备选终端对应的计算时间,d为效率参数,
Figure PCTCN2017098233-appb-000004
为第i个备选终端被选择成为所述写入终端的概率。
According to the formula
Figure PCTCN2017098233-appb-000003
Calculating an efficiency parameter, and then calculating a probability that each candidate terminal is selected as the writing terminal according to the efficiency parameter, and selecting one terminal from the candidate terminal as the writing terminal according to the probability, wherein t i is the calculation time corresponding to each candidate terminal, and d is an efficiency parameter.
Figure PCTCN2017098233-appb-000004
The probability that the ith candidate terminal is selected to be the write terminal.
采用上述进一步方案的有益效果:采用效率分配规则挑选终端,在基于计算时间的基础上相对公平的挑选写入终端,避免写入权限过于集中。The beneficial effect of adopting the above further solution is that the terminal is selected by using the efficiency allocation rule, and the writing terminal is relatively fairly selected based on the calculation time, so as to avoid excessive concentration of writing authority.
附图说明DRAWINGS
图1为本发明实施例一的一种区块链的写入权限分配方法流程图;1 is a flowchart of a method for allocating a write permission of a blockchain according to Embodiment 1 of the present invention;
图2为本发明实施例二的一种区块链的写入权限分配系统示意图。 2 is a schematic diagram of a write permission allocation system for a blockchain according to a second embodiment of the present invention.
具体实施方式detailed description
以下结合附图对本发明的原理和特征进行描述,所举实例只用于解释本发明,并非用于限定本发明的范围。The principles and features of the present invention are described in the following with reference to the accompanying drawings.
实施例一、一种区块链的写入权限分配方法。下面结合图1对本实施例提供的方法进行详细说明。Embodiment 1 A method for allocating a write permission of a blockchain. The method provided in this embodiment will be described in detail below with reference to FIG. 1.
参见图1,S101、记录多个终端解决按照预设算法规则生成的难题所花费的计算时间。Referring to FIG. 1, S101 records the calculation time taken by a plurality of terminals to solve a puzzle generated according to a preset algorithm rule.
具体的,记录多个终端分别解决按照预设算法规则生成的难题并得到计算结果所花费的计算时间,其中,所述预设算法规则具体包括POW(Proof of Work,工作量证明)算法以及POS(Proof of Stake,权益证明)算法,所述POW算法具体包括比特币算法、莱特币算法以及X11算法,所述POS算法具体包括点点币算法和以太坊算法。另外,每个终端计算的都是同一个难题。Specifically, the calculation time that the plurality of terminals respectively solve the problem generated according to the preset algorithm rule and obtain the calculation result, wherein the preset algorithm rule specifically includes a POW (Proof of Work) algorithm and a POS (Proof of Stake) algorithm, the POW algorithm specifically includes a bitcoin algorithm, a Litecoin algorithm, and an X11 algorithm, and the POS algorithm specifically includes a dot currency algorithm and an Ethereum algorithm. In addition, each terminal calculates the same problem.
S102、对各个终端对应的计算时间进行升序排序,并将计算时间小于预设时间对应的多个终端作为备选终端。S102. Perform the ascending ordering on the calculation time corresponding to each terminal, and use the multiple terminals corresponding to the preset time as the candidate terminal.
具体的,每个终端解决所述难题花费的时间不同,对各个终端对应的计算时间进行升序排序,并设定一个预设时间,将计算时间在所述预设时间之内的终端作为备选终端,其余计算时间大于所述预设时间的终端被排除在外,例如,将预设时间设为1分钟,则在计算时间1分钟之外的终端都没有资格作为备选终端,只有计算时间小于1分钟的终端有资格作为备选终端。Specifically, each terminal solves the problem in a different time, and the calculation time corresponding to each terminal is sorted in ascending order, and a preset time is set, and the terminal whose calculation time is within the preset time is used as an alternative. The terminal, the remaining terminals whose calculation time is greater than the preset time are excluded. For example, if the preset time is set to 1 minute, the terminal outside the calculation time of 1 minute is not qualified as an alternative terminal, and only the calculation time is less than A 1-minute terminal is eligible as an alternative terminal.
S103、按照预设权限规则从所述备选终端中选择一个终端作为写入终端,将向区块链数据库中写入数据的写入权限分配给所述写入终端。S103. Select one terminal from the candidate terminals as a write terminal according to a preset authority rule, and allocate write permission for writing data in the blockchain database to the write terminal.
具体的,按照预设权限规则从所述备选终端中选择一个终端作为写入终端,将向区块链数据库中写入数据的写入权限分配给所述写入终端,所述预 设权限规则具体包括随机分配规则或者效率分配规则。Specifically, a terminal is selected from the candidate terminals as a write terminal according to a preset authority rule, and write permission for writing data to the blockchain database is allocated to the write terminal, where the pre- The permission rule specifically includes a random allocation rule or an efficiency allocation rule.
当所述预设权限规则为随机分配规则时,所述按照预设权限规则从所述备选终端中选择一个终端作为写入终端具体包括:从所述备选终端中随机选取一个终端,将其作为写入终端,所述备选终端中每个终端被选取的概率相同。例如,如果总共有五个终端,A终端的计算时间为1s,B终端的计算时间为2s,C终端的计算时间为5s,D终端的计算时间为10s,E终端的计算时间为20s,若预设时间设置为15s,则A、B、C、D四个终端成为备选终端,每个终端被选中成为所述写入终端的概率均为1/4。When the preset permission rule is a random allocation rule, the selecting a terminal from the candidate terminal as the writing terminal according to the preset permission rule specifically includes: randomly selecting a terminal from the candidate terminal, It serves as a write terminal, and each of the candidate terminals has the same probability of being selected. For example, if there are five terminals in total, the calculation time of the A terminal is 1 s, the calculation time of the B terminal is 2 s, the calculation time of the C terminal is 5 s, the calculation time of the D terminal is 10 s, and the calculation time of the E terminal is 20 s. When the preset time is set to 15s, the four terminals A, B, C, and D become candidate terminals, and the probability that each terminal is selected as the write terminal is 1/4.
当所述预设权限规则为效率分配规则时,所述按照预设权限规则从所述备选终端中选择一个终端作为写入终端具体包括:根据公式(1)计算效率参数,然后根据所述效率参数计算得到各个备选终端被选择成为所述写入终端的概率,并按照所述概率从所述备选终端中选择一个终端作为写入终端,,所述公式(1)如下所示:When the preset permission rule is an efficiency allocation rule, the selecting a terminal from the candidate terminal as the writing terminal according to the preset authority rule specifically includes: calculating an efficiency parameter according to formula (1), and then according to the The efficiency parameter calculates a probability that each candidate terminal is selected as the writing terminal, and selects one terminal from the candidate terminal as the writing terminal according to the probability, and the formula (1) is as follows:
Figure PCTCN2017098233-appb-000005
Figure PCTCN2017098233-appb-000005
其中,ti为各个备选终端对应的计算时间,d为效率参数,
Figure PCTCN2017098233-appb-000006
为第i个备选终端被选择成为所述写入终端的概率。计算时间越短的终端被选择成为写入终端的概率越高。例如,如果总共有五个终端,A终端的计算时间为1s,B终端的计算时间为2s,C终端的计算时间为5s,D终端的计算时间为10s,E终端的计算时间为20s,若预设时间设置为15s,则A、B、C、D四个终端成为备选终端,根据公式(1)计算得到为效率参数d的值为5/9,并分别得到A、B、C、D四个终端被选中成为写入终端的概率分别为10/18,5/18,2/18,1/18,因而计算时间越短的终端被选中成为写入终端的概率更高。
Where t i is the calculation time corresponding to each candidate terminal, and d is an efficiency parameter.
Figure PCTCN2017098233-appb-000006
The probability that the ith candidate terminal is selected to be the write terminal. The shorter the calculation time, the higher the probability that the terminal is selected to be the write terminal. For example, if there are five terminals in total, the calculation time of the A terminal is 1 s, the calculation time of the B terminal is 2 s, the calculation time of the C terminal is 5 s, the calculation time of the D terminal is 10 s, and the calculation time of the E terminal is 20 s. When the preset time is set to 15s, the four terminals A, B, C, and D become candidate terminals. According to formula (1), the value of the efficiency parameter d is 5/9, and A, B, and C are obtained respectively. The probability that four terminals are selected to be written to the terminal is 10/18, 5/18, 2/18, 1/18, respectively, and thus the terminal with the shorter calculation time is selected to be a higher probability of writing to the terminal.
实施例二、一种区块链的写入权限分配系统。下面结合图2对本实施例提供的系统进行详细说明。 Embodiment 2 A write permission allocation system for a blockchain. The system provided in this embodiment will be described in detail below with reference to FIG.
参见图2,本发明提供的一种区块链的写入权限分配系统包括记录单元、排序确定单元以及权限分配单元。Referring to FIG. 2, a write permission distribution system for a blockchain provided by the present invention includes a record unit, a sort determination unit, and a rights assignment unit.
记录单元,用于记录多个终端解决按照预设算法规则生成的难题所花费的计算时间。A recording unit is configured to record a calculation time taken by a plurality of terminals to solve a puzzle generated according to a preset algorithm rule.
具体的,所述预设算法规则具体包括POW(Proof of Work,工作量证明)算法以及POS(Proof of Stake,权益证明)算法,所述POW算法具体包括比特币算法、莱特币算法以及X11算法,所述POS算法具体包括点点币算法和以太坊算法。Specifically, the preset algorithm rule specifically includes a POW (Proof of Work) algorithm and a POS (Proof of Stake) algorithm, where the POW algorithm specifically includes a bitcoin algorithm, a Litecoin algorithm, and an X11 algorithm. The POS algorithm specifically includes a dot currency algorithm and an Ethereum algorithm.
排序确定单元,用于对各个终端对应的计算时间进行升序排序,并将计算时间小于预设时间对应的多个终端作为备选终端。The order determining unit is configured to perform an ascending ordering on the calculation time corresponding to each terminal, and use a plurality of terminals whose calculation time is less than the preset time as the candidate terminal.
权限分配单元,用于按照预设权限规则从所述备选终端中选择一个终端作为写入终端,将向区块链数据库中写入数据的写入权限分配给所述写入终端。The authority assigning unit is configured to select one terminal from the candidate terminals as the writing terminal according to the preset authority rule, and allocate the writing authority for writing data to the blockchain database to the writing terminal.
具体的,所述权限分配单元中所述预设权限规则具体包括随机分配规则或者效率分配规则。Specifically, the preset permission rule in the rights allocation unit specifically includes a random allocation rule or an efficiency allocation rule.
在所述预设权限规则为随机分配规则时,所述权限分配单元具体用于从所述备选终端中随机选取一个终端,将其作为写入终端,所述备选终端中每个终端被选取的概率相同。When the preset permission rule is a random allocation rule, the rights allocation unit is specifically configured to randomly select one terminal from the candidate terminal as a writing terminal, where each terminal in the candidate terminal is The probability of selection is the same.
在所述预设权限规则为效率分配规则时,所述权限分配单元具体用于根据公式
Figure PCTCN2017098233-appb-000007
计算出效率参数,然后根据所述效率参数计算得到各个备选终端被选择成为所述写入终端的概率,并按照所述概率从所述备选终端中选择一个终端作为写入终端,其中,ti为各个备选终端对应的计算时间,d为效率参数,
Figure PCTCN2017098233-appb-000008
为第i个备选终端被选择成为所述写入终端的概率。计算时间越短的终端被选择成为写入终端的概率越高。
When the preset permission rule is an efficiency allocation rule, the authority assigning unit is specifically used according to a formula
Figure PCTCN2017098233-appb-000007
Calculating an efficiency parameter, and then calculating a probability that each candidate terminal is selected as the writing terminal according to the efficiency parameter, and selecting one terminal from the candidate terminal as the writing terminal according to the probability, wherein t i is the calculation time corresponding to each candidate terminal, and d is an efficiency parameter.
Figure PCTCN2017098233-appb-000008
The probability that the ith candidate terminal is selected to be the write terminal. The shorter the calculation time, the higher the probability that the terminal is selected to be the write terminal.
本发明提供的一种区块链的写入权限分配方法及系统,能够记录并统计各个终端计算难题的计算时间,并从多个终端中筛选出计算时间小于预设时间的多个终端作为备选终端,然后按照预设权限规则从备选终端中选择一个终端作为写入终端,赋予其写入权限。本发明按照预设权限规则选择写入终端并赋予写入权限,而不是将写入权限赋予计算时间最短的终端,解决了写入权限集中于少数“旷工”手中造成的区块链数据库的安全隐患问题,提高了区块链数据库的安全性,实用性较强。The method and system for assigning a write permission of a blockchain according to the present invention can record and count the calculation time of each terminal's calculation difficulty, and select multiple terminals whose calculation time is less than the preset time from multiple terminals as a backup The terminal is selected, and then one terminal is selected as a write terminal from the candidate terminal according to the preset authority rule, and the write permission is given. The invention selects the write terminal according to the preset authority rule and gives the write permission, instead of assigning the write permission to the terminal with the shortest calculation time, and solves the security of the blockchain database caused by the write permission concentrated in a few "associated" hands. The hidden danger problem has improved the security of the blockchain database and has strong practicability.
以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。 The above are only the preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalents, improvements, etc., which are within the spirit and scope of the present invention, should be included in the protection of the present invention. Within the scope.

Claims (8)

  1. 一种区块链的写入权限分配方法,其特征在于,所述方法包括:A method for assigning a write permission of a blockchain, the method comprising:
    S101、记录多个终端解决按照预设算法规则生成的难题所花费的计算时间;S101. Record a calculation time taken by multiple terminals to solve a puzzle generated according to a preset algorithm rule.
    S102、对各个终端对应的计算时间进行升序排序,并将计算时间小于预设时间对应的多个终端作为备选终端;S102: Perform an ascending ordering on the calculation time corresponding to each terminal, and use a plurality of terminals whose calculation time is less than the preset time as the candidate terminal;
    S103、按照预设权限规则从所述备选终端中选择一个终端作为写入终端,将向区块链数据库中写入数据的写入权限分配给所述写入终端。S103. Select one terminal from the candidate terminals as a write terminal according to a preset authority rule, and allocate write permission for writing data in the blockchain database to the write terminal.
  2. 如权利要求1所述的一种区块链的写入权限分配方法,其特征在于,所述S103中所述预设权限规则具体包括随机分配规则或者效率分配规则。The method for assigning a write permission of a blockchain according to claim 1, wherein the preset permission rule in the S103 specifically includes a random allocation rule or an efficiency allocation rule.
  3. 如权利要求2所述的一种区块链的写入权限分配方法,其特征在于,所述预设权限规则为随机分配规则时,所述S103中所述按照预设权限规则从所述备选终端中选择一个终端作为写入终端具体包括:The method for assigning a write permission of a blockchain according to claim 2, wherein when the preset permission rule is a random assignment rule, the S103 performs the preparation according to the preset permission rule. Selecting a terminal as the write terminal in the selected terminal specifically includes:
    从所述备选终端中随机选取一个终端,将其作为写入终端,所述备选终端中每个终端被选取的概率相同。A terminal is randomly selected from the candidate terminals as a write terminal, and each terminal of the candidate terminal is selected with the same probability.
  4. 如权利要求2所述的一种区块链的写入权限分配方法,其特征在于,所述预设权限规则为效率分配规则时,所述S103中所述按照预设权限规则从所述备选终端中选择一个终端作为写入终端具体包括:The method for assigning a write permission of a blockchain according to claim 2, wherein when the preset permission rule is an efficiency assignment rule, the S103 performs the preparation according to the preset permission rule. Selecting a terminal as the write terminal in the selected terminal specifically includes:
    根据公式
    Figure PCTCN2017098233-appb-100001
    计算出效率参数,然后根据所述效率参数计算得到各个备选终端被选择成为所述写入终端的概率,并按照所述概率从所述备选终端中选择一个终端作为写入终端,其中,ti为各个备选终端对应的计算时间,d为效率参数,
    Figure PCTCN2017098233-appb-100002
    为第i个备选终端被选择成为所述写入终端的概率。
    According to the formula
    Figure PCTCN2017098233-appb-100001
    Calculating an efficiency parameter, and then calculating a probability that each candidate terminal is selected as the writing terminal according to the efficiency parameter, and selecting one terminal from the candidate terminal as the writing terminal according to the probability, wherein t i is the calculation time corresponding to each candidate terminal, and d is an efficiency parameter.
    Figure PCTCN2017098233-appb-100002
    The probability that the ith candidate terminal is selected to be the write terminal.
  5. 一种区块链的写入权限分配系统,其特征在于,所述系统包括:A write chain allocation system for a blockchain, characterized in that the system comprises:
    记录单元,用于记录多个终端解决按照预设算法规则生成的难题所花费的计算时间;a recording unit, configured to record a calculation time taken by a plurality of terminals to solve a puzzle generated according to a preset algorithm rule;
    排序确定单元,用于对各个终端对应的计算时间进行升序排序,并将计算时间小于预设时间对应的多个终端作为备选终端;a sorting determining unit, configured to sort the computing time corresponding to each terminal in ascending order, and use a plurality of terminals whose computing time is less than the preset time as the candidate terminal;
    权限分配单元,用于按照预设权限规则从所述备选终端中选择一个终端作为写入终端,将向区块链数据库中写入数据的写入权限分配给所述写入终端。The authority assigning unit is configured to select one terminal from the candidate terminals as the writing terminal according to the preset authority rule, and allocate the writing authority for writing data to the blockchain database to the writing terminal.
  6. 如权利要求5所述的一种区块链的写入权限分配系统,其特征在于,所述权限分配单元中所述预设权限规则具体包括随机分配规则或者效率分配规则。The write permission allocation system of the blockchain according to claim 5, wherein the preset permission rule in the authority allocation unit specifically includes a random allocation rule or an efficiency allocation rule.
  7. 如权利要求6所述的一种区块链的写入权限分配系统,其特征在于,所述预设权限规则为随机分配规则时,所述权限分配单元具体用于:The system for assigning rights to a blockchain according to claim 6, wherein when the preset permission rule is a random allocation rule, the authority assigning unit is specifically configured to:
    从所述备选终端中随机选取一个终端,将其作为写入终端,所述备选终端中每个终端被选取的概率相同。A terminal is randomly selected from the candidate terminals as a write terminal, and each terminal of the candidate terminal is selected with the same probability.
  8. 如权利要求6所述的一种区块链的写入权限分配系统,其特征在于,所述预设权限规则为效率分配规则时,所述权限分配单元具体用于:The system for assigning rights to a blockchain according to claim 6, wherein when the preset permission rule is an efficiency allocation rule, the authority assigning unit is specifically configured to:
    根据公式
    Figure PCTCN2017098233-appb-100003
    计算出效率参数,然后根据所述效率参数计算得到各个备选终端被选择成为所述写入终端的概率,并按照所述概率从所述备选终端中选择一个终端作为写入终端,其中,ti为各个备选终端对应的计算时间,d为效率参数,
    Figure PCTCN2017098233-appb-100004
    为第i个备选终端被选择成为所述写入终端的概率。
    According to the formula
    Figure PCTCN2017098233-appb-100003
    Calculating an efficiency parameter, and then calculating a probability that each candidate terminal is selected as the writing terminal according to the efficiency parameter, and selecting one terminal from the candidate terminal as the writing terminal according to the probability, wherein t i is the calculation time corresponding to each candidate terminal, and d is an efficiency parameter.
    Figure PCTCN2017098233-appb-100004
    The probability that the ith candidate terminal is selected to be the write terminal.
PCT/CN2017/098233 2016-08-26 2017-08-21 Block chain write permission assignment method and system WO2018036441A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201610740849.1A CN106203178B (en) 2016-08-26 2016-08-26 A kind of the write-in authority distributing method and system of block chain
CN201610740849.1 2016-08-26

Publications (1)

Publication Number Publication Date
WO2018036441A1 true WO2018036441A1 (en) 2018-03-01

Family

ID=57527072

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/098233 WO2018036441A1 (en) 2016-08-26 2017-08-21 Block chain write permission assignment method and system

Country Status (2)

Country Link
CN (1) CN106203178B (en)
WO (1) WO2018036441A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109166037A (en) * 2018-07-25 2019-01-08 上海魅联信息技术有限公司 The common recognition method of block chain

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106203178B (en) * 2016-08-26 2018-11-20 杨鹏 A kind of the write-in authority distributing method and system of block chain
CN106357405A (en) * 2016-09-19 2017-01-25 弗洛格(武汉)信息科技有限公司 Method and system for managing data on basis of block chain technology consistency algorithms
CN108694189A (en) * 2017-04-07 2018-10-23 微软技术许可有限责任公司 The management of the Database Systems of co-ownership
CN107424066B (en) * 2017-07-19 2020-11-10 武汉凤链科技有限公司 Method and system for establishing consensus mechanism based on value quantity
CN109241763B (en) * 2018-07-04 2020-03-24 青岛闪收付信息技术有限公司 Block generating method based on permission issue
CN109039646B (en) * 2018-07-12 2021-07-27 北京易智能科技有限公司 Block chain block packaging and verifying method and system based on node capability
CN112015547A (en) * 2020-07-31 2020-12-01 中标慧安信息技术股份有限公司 Miner task allocation method and system for block chain evidence storage platform
CN112507033B (en) * 2021-02-07 2021-06-22 北京全息智信科技有限公司 Multi-master service cluster access method and device based on block chain and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130166455A1 (en) * 2011-12-23 2013-06-27 Douglas Feigelson Creating and using digital currency
CN103327636A (en) * 2013-06-04 2013-09-25 北京邮电大学 Resource scheduling method directing at large-data-rate service
CN104915249A (en) * 2015-05-21 2015-09-16 北京比特大陆科技有限公司 Method and device for digging virtual digital coins in mining pool
CN106203178A (en) * 2016-08-26 2016-12-07 杨鹏 The write authority distributing method of a kind of block chain and system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105827410A (en) * 2016-03-11 2016-08-03 邓迪 Block chain transmission method and system with trusted node/satellite node construction
CN105844505A (en) * 2016-03-17 2016-08-10 深圳市新世纪启航科技开发有限公司 Method of carrying out digital currency trading through block chain technology

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130166455A1 (en) * 2011-12-23 2013-06-27 Douglas Feigelson Creating and using digital currency
CN103327636A (en) * 2013-06-04 2013-09-25 北京邮电大学 Resource scheduling method directing at large-data-rate service
CN104915249A (en) * 2015-05-21 2015-09-16 北京比特大陆科技有限公司 Method and device for digging virtual digital coins in mining pool
CN106203178A (en) * 2016-08-26 2016-12-07 杨鹏 The write authority distributing method of a kind of block chain and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109166037A (en) * 2018-07-25 2019-01-08 上海魅联信息技术有限公司 The common recognition method of block chain

Also Published As

Publication number Publication date
CN106203178A (en) 2016-12-07
CN106203178B (en) 2018-11-20

Similar Documents

Publication Publication Date Title
WO2018036441A1 (en) Block chain write permission assignment method and system
CN105701028B (en) Disk management method in distributed memory system and equipment
CN107368259A (en) A kind of method and apparatus that business datum is write in the catenary system to block
CN104915879B (en) The method and device that social relationships based on finance data are excavated
JP2018535490A (en) Service processing method and apparatus
Chen et al. Analyzing bilateral trade barriers under global trade context: a gravity model adjusted trade intensity index approach
CN110046193A (en) Data processing method, device and computer equipment based on block chain
CN110443618A (en) The generation method and device of air control strategy
CN112597525B (en) Data processing method and device based on privacy protection and server
US8881299B2 (en) Dynamic community generator
JP2018514019A (en) Method and system for identifying unique mobile devices based on changes in mobile device attributes over time
CN109617695A (en) Voting method, device, electronic equipment and storage medium based on block chain
CN110046990A (en) Data processing method, device and server based on block chain
CN106155913A (en) The method and apparatus that cache hit rate is analyzed
Adepeju et al. Anchored k-medoids: a novel adaptation of k-medoids further refined to measure long-term instability in the exposure to crime
WO2018075839A1 (en) Controlled execution of queries for protecting sensitive data in query responses in an on-demand services environment
WO2020118860A1 (en) Chip research and development and transaction data storage method and system
CN106372977B (en) A kind of processing method and equipment of virtual account
CN109583731A (en) A kind of Risk Identification Method, device and equipment
CN108985562A (en) A kind of class information acquisition methods, electronic equipment and readable storage medium storing program for executing
CN104462448B (en) A kind of packet name classification method and device
Aurich et al. Periodic-orbit theory of the number variance Σ2 (L) of strongly chaotic systems
RU2699577C1 (en) Fraudulent transactions search method and system
CN107330709A (en) Determine the method and device of destination object
CN107180051A (en) A kind of blog management method, server

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17842864

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase in:

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 26.07.2019)

122 Ep: pct application non-entry in european phase

Ref document number: 17842864

Country of ref document: EP

Kind code of ref document: A1