CN109242299A - Distribution digs mine method, digs mine machine and block catenary system - Google Patents

Distribution digs mine method, digs mine machine and block catenary system Download PDF

Info

Publication number
CN109242299A
CN109242299A CN201811013780.8A CN201811013780A CN109242299A CN 109242299 A CN109242299 A CN 109242299A CN 201811013780 A CN201811013780 A CN 201811013780A CN 109242299 A CN109242299 A CN 109242299A
Authority
CN
China
Prior art keywords
miner
node
block
cryptographic hash
hash
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.)
Pending
Application number
CN201811013780.8A
Other languages
Chinese (zh)
Inventor
李成龙
蒋义新
刘强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Bei Bei Technology Co Ltd
Original Assignee
Shenzhen Bei Bei Technology Co Ltd
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
Application filed by Shenzhen Bei Bei Technology Co Ltd filed Critical Shenzhen Bei Bei Technology Co Ltd
Priority to CN201811013780.8A priority Critical patent/CN109242299A/en
Publication of CN109242299A publication Critical patent/CN109242299A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0631Resource planning, allocation, distributing or scheduling for enterprises or organisations
    • G06Q10/06313Resource planning in a project environment

Landscapes

  • Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Engineering & Computer Science (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Development Economics (AREA)
  • Quality & Reliability (AREA)
  • Biodiversity & Conservation Biology (AREA)
  • Game Theory and Decision Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Educational Administration (AREA)
  • Tourism & Hospitality (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The present invention relates to block chain technical fields, more particularly to a kind of distributed digging mine method, dig mine machine and block catenary system.Method includes: to obtain miner's list;According to block information, each miner's identity information and random number that block head in block records, the corresponding cryptographic Hash to be verified of random number is calculated, block information is sent by miner's node;The corresponding cryptographic Hash to be verified of random number is sent to miner's node, so that miner's node is packaged block according to cryptographic Hash to be verified and target cryptographic Hash.On the one hand, since agent node first completes the calculating to the high cryptographic Hash to be verified of force request is calculated, cryptographic Hash to be verified is sent to miner's node again and makees common recognition verifying, therefore, miner's node can choose the calculation lower digging mine machine of power and can complete to dig miner's work, therefore, can satisfy and calculates the low equipment participation digging mine of power, universality is improved, makees to become more fair so that digging miner.On the other hand, energy consumption can relatively be saved.

Description

Distribution digs mine method, digs mine machine and block catenary system
Technical field
The present invention relates to block chain technical fields, more particularly to a kind of distributed digging mine method, dig mine machine and block chain System.
Background technique
Some block catenary systems support proof of work mechanism ((Proof of Work, POW), according to proof of work machine System, each miner's node disjoint are completed proof of work and are calculated, when finding the random number for meeting preset condition, be just packaged The right of book keeping operation.
Inventor in the implementation of the present invention, has found traditional technology the prior art has at least the following problems: due to each miner Node disjoint completes proof of work, therefore each miner's node is easy to compute repeatedly same workload, to cause the energy unrestrained Take.
Summary of the invention
One purpose of the embodiment of the present invention be intended to provide it is a kind of it is distributed dig mine method, dig mine machine and block catenary system, It can be energy saving.
In order to solve the above technical problems, the embodiment of the present invention the following technical schemes are provided:
In a first aspect, the embodiment of the present invention provides a kind of distributed digging mine method, applied to agent node, the method Include:
Miner's list is obtained, miner's list records have miner's identity information of each miner's node, any two institute It is all different to state miner's identity information;
According to block information, each miner's identity information and random number that block head in block records, calculate The corresponding cryptographic Hash to be verified of the random number, the block information are sent by miner's node;
The corresponding cryptographic Hash to be verified of the random number is sent to miner's node, so that miner's node is according to institute Cryptographic Hash to be verified and target cryptographic Hash are stated, the block is packaged.
Optionally, described to send the corresponding cryptographic Hash to be verified of the random number to miner's node, so that the mine Work node is packaged the block according to the cryptographic Hash to be verified and target cryptographic Hash, comprising:
According to the corresponding cryptographic Hash to be verified of the random number, block data is generated;
Signature processing is made to the block data;
Block data after sending from signature to miner's node, so that when it is legal for verifying the signature, the mine Work node is packaged the block according to the cryptographic Hash to be verified and target cryptographic Hash.
Optionally, it is described according in each miner's identity information, block block head record block information and with Machine number calculates the corresponding cryptographic Hash to be verified of the random number, comprising:
Determine target Hash seed, wherein any two Hash seed is all different, and each Hash seed includes at least The component values being combined by block information, miner's identity information and random number;
According to the target Hash seed, the cryptographic Hash to be verified of the random number is generated.
Optionally, described according to the target Hash seed, generate the cryptographic Hash to be verified of the random number, comprising:
According to following syntagmatic: Hm-2Hm-3Hm-4......H2H1H0Z is combined into m-th of Hash seed, wherein m is positive Integer, Hm-1For m-th of cryptographic Hash, Z is the 1st Hash seed, and Z is combined by block information, miner's identity information and random number At;
Select m-th of Hash seed as target Hash seed;
The target seed is made into Hash operation, generates the cryptographic Hash H to be verified of the random numberm-1
Optionally, described according to following syntagmatic: Hm-2Hm-3Hm-4......H2H1H0Z is combined into m-th of Hash kind Son, comprising:
Judge Hm-2Hm-3Hm-4......H2H1H0Whether the data bits of Z is greater than presetting digit capacity threshold value;
If more than selection is in Hm-2Hm-3Hm-4......H2H1H0It sorts in Z in the data conduct of the presetting digit capacity of forefront M-th of Hash seed;
If being less than, H is selectedm-2Hm-3Hm-4......H2H1H0Z is as m-th of Hash seed.
Optionally, the method also includes:
The digging mine request that miner's node is sent is received, the digging mine request carries miner's identity information;
Detect whether miner's identity information matches default identity information;
If not matching, forbid miner's node that miner's list is added;
If matching allows miner's node that miner's list is added.
Optionally, miner's identity information includes the equipment Serial Number for digging mine machine.
Optionally, the data bits of the cryptographic Hash to be verified is 64 bytes.
In second aspect, the embodiment of the present invention provides a kind of non-transient computer readable storage medium, the non-transient meter Calculation machine readable storage medium storing program for executing is stored with computer executable instructions, and the computer executable instructions are for executing agent node Described in any item distributed digging mine methods.
In the third aspect, the embodiment of the present invention provides a kind of digging mine machine, comprising:
At least one processor;And
The memory being connect at least one described processor communication;Wherein, the memory be stored with can by it is described extremely The instruction that a few processor executes, described instruction are executed by least one described processor, so that at least one described processing Device can be used in executing described in any item distributed digging mine methods.
In fourth aspect, the embodiment of the present invention provides a kind of block catenary system, comprising:
Miner's node;
Agent node, the agent node and miner's node communication;
Wherein, the agent node includes:
At least one processor;And
The memory being connect at least one described processor communication;Wherein, the memory be stored with can by it is described extremely The instruction that a few processor executes, described instruction are executed by least one described processor, so that at least one described processing Device can be used in executing described in any item distributed digging mine methods.
It in distributed digging mine method provided in an embodiment of the present invention, digs in mine machine and block catenary system, firstly, obtaining miner List, miner's list records have miner's identity information of each miner's node, and any two miner's identity information is all different;Its It is secondary, according to block information, each miner's identity information and random number that block head in block records, it is corresponding to calculate random number Cryptographic Hash to be verified, block information sends by miner's node;Again, corresponding to be verified to miner's node transmission random number Cryptographic Hash, so that miner's node is packaged block according to cryptographic Hash to be verified and target cryptographic Hash.On the one hand, due to agent node The calculating to the high cryptographic Hash to be verified of force request is calculated first is completed, then cryptographic Hash to be verified is sent to miner's node work common recognition and is tested Card, therefore, miner's node can choose the calculation lower digging mine machine of power and can complete to dig miner's work, therefore, can satisfy calculation The low equipment of power participates in digging mine, improves universality, makees to become more fair so that digging miner.On the other hand, due to any two Miner's identity information is all different, and the recurrence probability between the different calculated cryptographic Hash to be verified of miner's node is relatively low, Therefore, miner's node can be to avoid same verifying work be repeated, to relatively save energy consumption.
Detailed description of the invention
One or more embodiments are illustrated by the picture in corresponding attached drawing, these exemplary theorys The bright restriction not constituted to embodiment, the element in attached drawing with same reference numbers label are expressed as similar element, remove Non- to have special statement, composition does not limit the figure in attached drawing.
Fig. 1 is the configuration diagram of traditional virtual encryption money-system;
Fig. 2 is that the embodiment of the present invention provides a kind of configuration diagram of block catenary system;
Fig. 3 is that the embodiment of the present invention provides a kind of distributed flow diagram for digging mine method;
Fig. 4 a is the Hash operation process schematic of the 1st Hash seed provided in an embodiment of the present invention;
Fig. 4 b is the Hash operation process schematic of the 2nd Hash seed provided in an embodiment of the present invention;
Fig. 4 c is the Hash operation process schematic of the 3rd Hash seed provided in an embodiment of the present invention;
Fig. 5 is that the embodiment of the present invention provides a kind of structural schematic diagram for digging mine machine.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right The present invention is further elaborated.It should be appreciated that described herein, specific examples are only used to explain the present invention, not For limiting the present invention.
Block catenary system has the characteristics that decentralization, is different from conventional center server, since block catenary system does not have There is centralization node, the mechanism that needs to know together maintains normal operation, for example, common recognition mechanism includes POW algorithm, it is based on POW algorithm, Block catenary system can be realized the common recognition verifying of block.
POW algorithm is a kind of strategy of a kind of reply Denial of Service attack and other service abuses, a proof of work Refer to that a data for meeting specified conditions calculate, it is relatively difficult to generate correct result, but it is simpler to verify correct result It is single.The generation of correct result can only carry out verifying trial and error by constantly enumerating random number, to eventually find correct option. Wherein, which realized using Hash (hash) algorithm.Hash algorithm is a kind of one-way Hash algorithm, calculates Kazakhstan The process of uncommon value is fairly simple, but inversely to obtain initial data according to fixed cryptographic Hash, then can only by enumerate trial and error come It carries out.
In some virtual encryption money-systems, when carrying out random hash operation, POW algorithm is introduced to some spy The scanning work of definite value, for example, at SHA-256, random hash value with one or more 0 start, with 0 quantity gradually Increase, traversing out workload required for solution corresponding with the random hash value in the case of this will be exponentially increased, and to result It tests, only needs a random hash operation.
A random number (Nonce) is augmented in the block of some virtual encryption money-systems, which needs to meet So that there is the condition of required specified quantity 0 in the cryptographic Hash of given block.It, can only due to the irreversible property of Hash operation The random number of the condition of satisfaction is traversed out by making repeated attempts.
As long as block chain node traverses go out to meet the random number of condition, which just completes the card of workload It is bright, to obtain the packing book keeping operation power of block.
In the following, the embodiment of the present invention elaborates the common recognition verifying process of traditional virtual encryption money-system.It is as described below:
1, Transaction Information is collected and selected to block chain link point, and calculates Merkel (Merkle) root Hash of transaction List Table Value.
2, block chain node tectonic province build, wherein block head includes version, the cryptographic Hash of upper block head, Merkel Root cryptographic Hash, timestamp (timestamp), difficulty value (difficulty) and random number.
3, block chain node calculates the block head cryptographic Hash of construction, and whether test zone build cryptographic Hash is less than or equal to target Value.If so, completing proof of work, the block of packing is broadcasted into the whole network, other block chain nodes in block chain will be examined Survey the legitimacy of the block.If it is not, then returning to step 2, continue workload computing.
The block chain node for executing above-mentioned process can also be known as miner's node.
Firstly, since each block chain node in the whole network needs to obtain the packing book keeping operation of block by proof of work Power, therefore when using POW common recognition mechanism, each miner's node requires to constantly generate random number to be examined with trial and error, with this time Suitable random number is gone through out, which needs a large amount of electric power support, to cause a large amount of energy waste.
Secondly as independently carrying out proof of work calculating between each miner's node, there are biggish for working space It repeats, so as to cause in the identical situation of difficulty value, the time needed for miner's node completes workload is long, out block low efficiency Under.
In fact, riseing with the encryption money price in virtual encryption money-system, people dig mine by improvement and set It is standby, to realize the block out of higher efficiency, for example, from using CPU (Central Processing Unit, central processing unit) to dig Mine digs mine to using GPU (Graphics Processing Unit, graphics processor), then arrives FPGA (Field Programmable Gate Array, field programmable gate array) dig mine, the ASIC of the customization finally occurred (Application Specific Integrated Circuit, specific integrated circuit) digs mine.
It digs mine calculation power exponentially to increase every year, since some virtual encryption money-systems can be adjusted according to power dynamic is calculated Therefore whole digging mine disaster angle value increases, difficulty value is also increased with exponential with power is calculated.It is such to increase so that independent miner digs Mine can not obtain income, therefore there has been the appearance in mine pond.Miner's node is combined together by mine pond by certain agreement, It concentrates and calculates power progress workload computing, obtain and the miner to work in mine pond is given into reward after rewarding.
There are mine pond administrator, mine pond administrator is responsible for coordinating and managing all miner's work in mine pond.Therefore, mine pond administrator Customized related protocol is needed, is communicated with miner.At the same time, miner administrator is responsible for being packaged transaction, distributes for miner Related work amount, therefore, the relevant reward of system also can all be sent to mine pond administrator, and mine pond administrator is responsible for mine Work sends the reward of related work amount.It is also easier to complete for independent miner since mine pond summarizes a large amount of power of calculating Proof of work and obtain system award, this makes the income of miner that can become relatively stable, and mine pond administrator can be with Obtain its certain mine pond management return.
In the following, combination of embodiment of the present invention Fig. 1 elaborates the common recognition verifying process of traditional virtual encryption money-system.Such as It is lower described:
1, miner's client 11 sends common recognition instruction to management server 12, wherein common recognition instruction includes miner's client 11 identity information, operation information and relevant parameter information, parameter information specify dbase and the version number of miner's client.
2, after management server 12 receives this information, information can be confirmed, after confirming successfully, returns to relevant information.
3, miner's client 11 sends authentication information, and authentication information includes the wallet address of miner's client 11.
4, the legitimacy of 12 authentication verification information of management server, after being verified, it is logical that management server 12 returns to verifying Cross information.
5, management server 12 sends difficulty setting information to miner's client 11.
6, management server 12 is by sending the block information that carry out proof of work to miner's client 11.
7, the common recognition of miner's client 11 verifying block will when miner's client 11 traverses out the random number of the condition of satisfaction The random number is sent to management server 12.
8, management server 12 verifies the random number that miner's client 11 provides, and transmits verification result to miner client End 11.
As previously mentioned, all rewards are distributed on mine pond manager, in the online lower mine pond formed for the miner of its work Reward is distributed by mine pond manager, therefore mine pond manager possesses absolute right.Also, the formation in the pond line Xia Kuang, it is fixed to need Adopted relevant communication protocol and mechanism, it is comparatively laborious.
Based on this, the embodiment of the present invention provides a kind of block catenary system.Referring to Fig. 2, block catenary system 200 includes agency Node 21, miner's node 22 and wallet node 23, agent node 21 and miner's node 22 communicate, miner's node 22 also with wallet section 23 communication of point, wallet node 23 are also communicated with agent node 21.Wherein, it is propped up between any two node in each block chain node It holds point-to- point communication (Point to point communication, P2P), also, agent node 21, miner's node 22 and money Packet node 23 all can be used as the block chain node in block catenary system, undertake different responsibilities in each leisure block catenary system, Work, stabilization and the safety of common maintenance block catenary system.
Cryptographic Hash to be verified is sent to miner's node for calculating cryptographic Hash to be verified by agent node 21.Some In embodiment, agent node 21 also needs to make authentication to miner's node 22.
Miner's node 22 needs that mine can be dug in 21 successful registration of agent node.Wherein, register flow path is as follows:
1, miner's node 22 submits registration information to agent node 21.
Wherein, which includes one or more of information: dig the equipment Serial Number SN of mine machine, user information and Miner's wallet address.
2, agent node 21 checks registration information.
Checking process includes: that whether correct, SN whether there is in database detection SN number format, whether SN has been bound Other users etc..
3, agent node 21 records registration information.
4, registering result is returned to miner's node 22 by agent node 21.
5, agent node 21 broadcasts new log-on data to block catenary system 200.
6, all wallet nodes 23 store and synchronize the log-on data of newest miner's node in block catenary system 200.
Wallet node 23 for recording, inquire account balance, transaction record, initiate it is new transfer accounts, and in block catenary system Middle synchronization, verifying block data.
It is understood that above-mentioned agent node 21, miner's node 22 and wallet node 23 can be a physical services A logical server made of device or multiple physical servers are virtual.Server be also possible to it is multiple can interconnected communication clothes The server zone of business device composition, and each functional module can be respectively distributed on each server in server zone.
It is understood that the block chain work that above-mentioned agent node 21, miner's node 22 and wallet node 23 are responsible for Be not it is fixed, above-described embodiment only show block catenary system 200 in application scenes, answered there may also be other Use scene.
It is understood that agent node 21 or miner's node 22 can all be taken as digging mine machine, wherein digging mine machine can be with Including POS machine (point of sales terminal) mobile terminal, smart phone, computer, palm PC (Personal Digital Assistant, PDA), tablet computer, smartwatch or desktop computer etc..
Referring to Fig. 3, Fig. 3 is that the embodiment of the present invention provides a kind of distributed digging mine method.As shown in figure 3, distributed dig Mine method S300 includes:
S31, miner's list is obtained, miner's list records have miner's identity information of each miner's node, any two mine Work identity information is all different;
In the present embodiment, it digs before mine, miner's node is sent to agent node digs mine request, and digging mine request carries Miner's identity information, wherein miner's identity information includes the equipment Serial Number SN for digging mine machine or block catenary system is each The distribution of miner's node has unique identification information, and it can also be other expressions that miner's identity information is made of character string Mode.
Whether agent node detection miner's identity information matches default identity information, if not matching, miner's node is forbidden to add Enter miner's list;If matching allows miner's node that miner's list is added.After each miner's node successful registration, agent node Miner's identity information of miner's node by successful registration etc. information is recorded in miner's list, and agent node runs and safeguards Miner's list.When miner's node changes in block catenary system, agent node updates miner's list again.
Default identity information is customized by the manager of block catenary system, can be equipment Serial Number SN or block chain System is that the distribution of each miner's node has unique identification information.For example, presetting identity information is POS machine sequence Number SN.When mobile phone needs to be added block chain network as miner's node, since the equipment Serial Number of mobile phone is not belonging to POS machine sequence Row number SN, then, the mobile phone have not been able to be successfully joined in block chain network as miner's node.
In the present embodiment, by verifying the legitimacy of miner's node, be conducive to facilitate management block catenary system.
S32, block information, each miner's identity information and the random number recorded according to block head in block, calculate The corresponding cryptographic Hash to be verified of random number, block information are sent by miner's node;
Block includes block head and block body, the following any one or more block letters of the block head record of each block Breath:
1, random number;
2, difficulty value (Difficulty): difficulty value is for adjusting block formation speed, and every 24 blocks can adjust one It is secondary, it is ensured that block increases according to the speed of average 5 minutes blocks;
3, target cryptographic Hash (Base Target): target cryptographic Hash is calculated according to difficulty value, is used for test zone Whether the random number submitted in block meets the requirements;
4, digit (Bits): the integer type that target cryptographic Hash be compressed into one 64 is stored;
5, miner's wallet address;
6, it generates signature (Generate Singature): the generation signature of a upper block and miner's wallet address is breathed out Obtained from uncommon operation, for digging the calculating during mine;
7, block signature (Block Signature): agent node is using own private key to the Hash content of current block Obtained from making signature operation, whether created by legal agent node for wallet node verification block.
The block information and random number that agent node is recorded according to block head in each miner's identity information, block, meter When calculating the corresponding cryptographic Hash to be verified of random number, firstly, agent node determines target Hash seed, wherein any two are breathed out Uncommon seed is all different, and each Hash seed includes at least being combined by block information, miner's identity information and random number Component values.Secondly, agent node generates the cryptographic Hash to be verified of random number according to target Hash seed.
Agent node is according to target Hash seed, when generating the cryptographic Hash to be verified of random number, firstly, according to following combination Relationship: Hm-2Hm-3Hm-4......H2H1H0Z is combined into m-th of Hash seed, wherein m is positive integer, Hm-1For m-th of Hash Value, Z are the 1st Hash seed, and Z is combined by block information, miner's identity information and random number.Secondly, m-th of selection For Hash seed as target Hash seed, m is customized by designer, for example, m can for 1 or 2 or ... or 8192 or 100000, in the present embodiment, select the 8192nd Hash seed as target Hash seed.Again, agent node is by target Hash seed makees Hash operation, generates the cryptographic Hash H to be verified of random numberm-1
For example, Fig. 4 a is please referred to, the 1st Hash seed is by miner's wallet address+miner's identity information+random number (Z) it is combined into, the 1st Hash seed Z is made into Hash operation, obtains the 1st cryptographic Hash H0, remember the 1st cryptographic Hash H0For Hash# 8191。
Please refer to Fig. 4 b, the 2nd Hash seed is by the 1st cryptographic Hash+miner's wallet address+miner's identity information+random Number (H0+ Z) it is combined into, the 2nd Hash seed is made into Hash operation, obtains the 2nd cryptographic Hash H1, remember the 2nd cryptographic Hash H1For Hash#8190。
Fig. 4 c is please referred to, the 3rd Hash seed is by 1 cryptographic Hash of the 2nd cryptographic Hash+the+miner's wallet address+miner's body Part information+random number (H1+H0+ Z) it is combined into, the 3rd Hash seed is made into Hash operation, obtains the 3rd cryptographic Hash H2, note the 3rd A cryptographic Hash H2For Hash#8189.
……
And so on, obtain the cryptographic Hash of preset quantity.
In the present embodiment, select the last one calculated cryptographic Hash of Hash seed as cryptographic Hash to be verified.
The data bits of each cryptographic Hash to be verified is 64byte, and preset quantity is 4096, that is, one shares 4096 Cryptographic Hash to be verified.When cryptographic Hash to be verified is 64byte, fairness is helped to improve, relatively weakens and calculates the strong digging of power Absolute predominance brought by mine machine relatively improves and calculates the chance that the weaker digging mine machine of power participates in digging mine.Cause are as follows: 64byte to To be verified cryptographic Hash of the cryptographic Hash relative to 32byte is verified, in the verifying of subsequent common recognition, improves the complexity of data calculation amount. Since the existing calculation power for digging mine machine is more and more stronger, according to the cryptographic Hash to be verified of 32byte, calculating the strong digging mine machine of power can be real Mine is dug to when property, and calculates the weak digging mine machine such as POS machine of power, but has not been able to rapidly dig mine and be exceeded or eliminate.However, working as Using the cryptographic Hash to be verified of 64byte, calculating the strong digging mine machine real-time of power cannot effectively be met the requirements, then, dig mine it Before, calculate power by force with the search space of calculating weak the diggings mine machine of power and all construct in advance random number, at this point, due to not starting also to dig mine, calculation Power by force with calculate the weak digging mine machine of power and do not embody significant difference also.When Deng digging mine, due to be verified in the search space of random number Cryptographic Hash is all ready for, and is calculated power and is insignificantly dug mine efficiency with calculating the weak digging mine machine of power and can reach difference by force, thus phase Over the ground, digging mine can be participated in by calculating the weak digging mine machine of power.
As previously mentioned, next Hash seed is that constantly group closes a Hash to be verified on the basis of upper Hash seed Value, then, the data volume of Hash seed the more is rolled the more big.When the data volume of Hash seed is excessive, the meter of miner's node can be reduced Calculate efficiency.In order to improve the computational efficiency of agent node, in some embodiments, agent node is according to following syntagmatic:
Hm-2Hm-3Hm-4......H2H1H0Z is combined into m-th of Hash seed.For example, agent node judges first Hm-2Hm-3Hm-4......H2H1H0Whether the data bits of Z is greater than presetting digit capacity threshold value;
If more than selection is in Hm-2Hm-3Hm-4......H2H1H0It sorts in Z in the data conduct of the presetting digit capacity of forefront M-th of Hash seed;
If being less than, H is selectedm-2Hm-3Hm-4......H2H1H0Z is as m-th of Hash seed.
For example: when the data bits of Hash seed has been over 4096byte, later step is adopted when calculating Hash seed is selected at Hm-2Hm-3Hm-4......H2H1H0It is sorted in Z in the data of the presetting digit capacity of forefront, wherein The presetting digit capacity is 4096byte.Therefore, the maximum data digit of each Hash seed is not exceed 4096byte.
S33, the corresponding cryptographic Hash to be verified of random number is sent to miner's node, so that miner's node is according to Hash to be verified Value and target cryptographic Hash, are packaged block.
The verification mode for verifying current block is varied, for example: when miner's node verification current block, firstly, Cryptographic Hash to be verified and generation signature are made into Hash operation, obtain expectation cryptographic Hash.Due to generating signature in block catenary system With uniqueness and consistency, the randomness of cryptographic Hash to be verified is relatively high originally, subsequent recyclings generate sign with it is to be verified Cryptographic Hash makees Hash operation, to improve randomness again, reduces the probability that miner's node makees repeatability verifying work.Secondly, Miner's node judges it is expected that whether cryptographic Hash is less than target cryptographic Hash;If being less than, the corresponding random number of cryptographic Hash to be verified is determined To be effective, and it is packaged block;If more than determining that the corresponding random number of cryptographic Hash to be verified is invalid.
In some embodiments, some strong digging mine machines of power of calculating can be completed in real time without the cooperation of agent node S31 to S32, to be packaged block, it is clear that the weak digging mine machine of calculation power is not able to the competition strong with power is calculated and goes down.In order to improve digging mine Fairness so that some POS machine etc. are calculated the weak digging mine machine of power and are added and dig mine task, in some embodiments, Dai Lijie Point generates block data according to the corresponding cryptographic Hash to be verified of random number.Secondly, agent node also makees at signature block data Reason.Again, the block data after agent node sends signature to miner's node, so that when verifying signature is legal, Kuang Gongjie Point is packaged block according to cryptographic Hash to be verified and target cryptographic Hash.Therefore, miner's node needs to verify the signer of agent node It can continue to dig mine, so that agent node can be got around to implement to dig mine by avoiding lacking signing, so that calculating the weak digging mine of power Machine can have an opportunity to participate in digging mine, improve fairness.
In summary, on the one hand, since agent node first completes the calculating to the high cryptographic Hash to be verified of force request is calculated, then Cryptographic Hash to be verified is sent to miner's node and makees common recognition verifying, therefore, miner's node, which can choose, calculates the lower digging mine machine of power It can complete to dig miner's work, therefore, can satisfy and calculate the low equipment participation digging mine of power, universality is improved, so that digging miner Work becomes more fair.On the other hand, miner's identity information as described in any two is all different, and different miner's nodes calculate Cryptographic Hash to be verified between recurrence probability it is relatively low, therefore, miner's node can to avoid repeating same verifying work, To relatively save energy consumption.
It should be noted that not necessarily there is centainly successive between above steps in above-mentioned each embodiment Sequentially, those of ordinary skill in the art, according to an embodiment of the present invention to describe to be appreciated that in different embodiments, above-mentioned each step Suddenly there can be the different sequences that executes, also i.e., it is possible to execute parallel, execution etc. can also be exchanged.
As the another aspect of the embodiment of the present invention, the embodiment of the present invention provides a kind of digging mine machine, which can be Agent node can also be miner's node.Referring to Fig. 5, the digging mine machine 500 includes: one or more processors 51 and deposits Reservoir 52.Wherein, in Fig. 5 by taking a processor 51 as an example.
Processor 51 can be connected with memory 52 by bus or other modes, to be connected as by bus in Fig. 5 Example.
Memory 52 is used as a kind of non-volatile computer readable storage medium storing program for executing, can be used for storing non-volatile software journey Sequence, non-volatile computer executable program and module, such as the corresponding journey of distributed digging mine method in the embodiment of the present invention Sequence instruction/module.Non-volatile software program, instruction and the module that processor 51 is stored in memory 52 by operation, Distributed thereby executing above-mentioned each embodiment digs mine method.
Memory 52 may include high-speed random access memory, can also include nonvolatile memory, for example, at least One disk memory, flush memory device or other non-volatile solid state memory parts.In some embodiments, memory 52 Optional includes the memory remotely located relative to processor 51, these remote memories can pass through network connection to processor 51.The example of above-mentioned network includes but is not limited to internet, intranet, local area network, mobile radio communication and combinations thereof.
Described program instruction/module is stored in the memory 52, is held when by one or more of processors 51 When row, the distributed digging mine method in above-mentioned any means embodiment is executed, for example, thereby executing point of above-mentioned each embodiment Cloth digs mine method.
The embodiment of the invention also provides a kind of non-transient computer readable storage medium, the non-transient computer is readable Storage medium is stored with computer executable instructions, and the computer executable instructions are as above any for executing agent node Distributed digging mine method described in.
The embodiment of the invention provides a kind of computer program product, the computer program product is non-easy including being stored in Computer program on the property lost computer readable storage medium, the computer program includes program instruction, when described program refers to When proxied node being enabled to execute, the agent node is made to execute described in any item distributed digging mine methods.
In summary, on the one hand, since agent node first completes the calculating to the high cryptographic Hash to be verified of force request is calculated, then Cryptographic Hash to be verified is sent to miner's node and makees common recognition verifying, therefore, miner's node, which can choose, calculates the lower digging mine machine of power It can complete to dig miner's work, therefore, can satisfy and calculate the low equipment participation digging mine of power, universality is improved, so that digging miner Work becomes more fair.On the other hand, miner's identity information as described in any two is all different, and different miner's nodes calculate Cryptographic Hash to be verified between recurrence probability it is relatively low, therefore, miner's node can to avoid repeating same verifying work, To relatively save energy consumption.
Device or apparatus embodiments described above is only schematical, wherein it is described as illustrated by the separation member Unit module may or may not be physically separated, and the component shown as modular unit can be or can also Not to be physical unit, it can it is in one place, or may be distributed on multiple network module units.It can basis It is actual to need that some or all of the modules therein is selected to achieve the purpose of the solution of this embodiment.
Through the above description of the embodiments, those skilled in the art can be understood that each embodiment can It is realized by the mode of software plus general hardware platform, naturally it is also possible to pass through hardware.Based on this understanding, above-mentioned technology Scheme substantially in other words can be embodied in the form of software products the part that the relevant technologies contribute, the computer Software product may be stored in a computer readable storage medium, such as ROM/RAM, magnetic disk, CD, including some instructions to So that computer equipment (can be personal computer, server or the network equipment etc.) execute each embodiment or Method described in certain parts of embodiment.
Finally, it should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;At this It under the thinking of invention, can also be combined between the technical characteristic in above embodiments or different embodiment, step can be with It is realized with random order, and there are many other variations of different aspect present invention as described above, for simplicity, they do not have Have and is provided in details;Although the present invention is described in detail referring to the foregoing embodiments, the ordinary skill people of this field Member is it is understood that it is still possible to modify the technical solutions described in the foregoing embodiments, or to part of skill Art feature is equivalently replaced;And these are modified or replaceed, each reality of the application that it does not separate the essence of the corresponding technical solution Apply the range of a technical solution.

Claims (10)

1. a kind of distributed digging mine method, is applied to agent node, which is characterized in that the described method includes:
Miner's list is obtained, miner's list records have miner's identity information of each miner's node, mine described in any two Work identity information is all different;
According to block information, each miner's identity information and random number that block head in block records, calculate described The corresponding cryptographic Hash to be verified of random number, the block information are sent by miner's node;
Send the corresponding cryptographic Hash to be verified of the random number to miner's node so that miner's node according to Cryptographic Hash and target cryptographic Hash are verified, the block is packaged.
2. the method according to claim 1, wherein described corresponding to miner's node transmission random number Cryptographic Hash to be verified so that miner's node is packaged the block according to the cryptographic Hash to be verified and target cryptographic Hash, Include:
According to the corresponding cryptographic Hash to be verified of the random number, block data is generated;
Signature processing is made to the block data;
Block data after sending from signature to miner's node, so that when it is legal for verifying the signature, miner's section Point is packaged the block according to the cryptographic Hash to be verified and target cryptographic Hash.
3. the method according to claim 1, wherein described according in each miner's identity information, block The block information and random number of block head record, calculate the corresponding cryptographic Hash to be verified of the random number, comprising:
Determine target Hash seed, wherein any two Hash seed is all different, and each Hash seed includes at least by area The component values that block message, miner's identity information and random number are combined into;
According to the target Hash seed, the cryptographic Hash to be verified of the random number is generated.
4. according to the method described in claim 3, it is characterized in that, described according to the target Hash seed, generate it is described with The cryptographic Hash to be verified of machine number, comprising:
According to following syntagmatic: Hm-2Hm-3Hm-4......H2H1H0Z is combined into m-th of Hash seed, wherein m is positive whole Number, Hm-1For m-th of cryptographic Hash, Z is the 1st Hash seed, and Z is combined by block information, miner's identity information and random number 's;
Select m-th of Hash seed as target Hash seed;
The target seed is made into Hash operation, generates the cryptographic Hash H to be verified of the random numberm-1
5. according to the method described in claim 4, it is characterized in that, described according to following syntagmatic: Hm-2Hm-3Hm- 4......H2H1H0Z is combined into m-th of Hash seed, comprising:
Judge Hm-2Hm-3Hm-4......H2H1H0Whether the data bits of Z is greater than presetting digit capacity threshold value;
If more than selection is in Hm-2Hm-3Hm-4......H2H1H0Sequence is in the data of the presetting digit capacity of forefront as m-th in Z Hash seed;
If being less than, H is selectedm-2Hm-3Hm-4......H2H1H0Z is as m-th of Hash seed.
6. method according to any one of claims 1 to 5, which is characterized in that the method also includes:
The digging mine request that miner's node is sent is received, the digging mine request carries miner's identity information;
Detect whether miner's identity information matches default identity information;
If not matching, forbid miner's node that miner's list is added;
If matching allows miner's node that miner's list is added.
7. according to the method described in claim 6, it is characterized in that, miner's identity information includes the equipment sequence for digging mine machine Number.
8. a kind of non-transient computer readable storage medium, which is characterized in that the non-transient computer readable storage medium is deposited Computer executable instructions are contained, the computer executable instructions are for executing agent node as claim 1 to 7 is any Distributed digging mine method described in.
9. a kind of digging mine machine characterized by comprising
At least one processor;And
The memory being connect at least one described processor communication;Wherein, be stored with can be by described at least one for the memory The instruction that a processor executes, described instruction is executed by least one described processor, so that at least one described processor energy It is enough in and executes distributed digging mine method as described in any one of claim 1 to 7.
10. a kind of block catenary system characterized by comprising
Miner's node;
Agent node, the agent node and miner's node communication;
Wherein, the agent node includes:
At least one processor;And
The memory being connect at least one described processor communication;Wherein, be stored with can be by described at least one for the memory The instruction that a processor executes, described instruction is executed by least one described processor, so that at least one described processor energy It is enough in and executes distributed digging mine method as described in any one of claim 1 to 7.
CN201811013780.8A 2018-08-31 2018-08-31 Distribution digs mine method, digs mine machine and block catenary system Pending CN109242299A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811013780.8A CN109242299A (en) 2018-08-31 2018-08-31 Distribution digs mine method, digs mine machine and block catenary system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811013780.8A CN109242299A (en) 2018-08-31 2018-08-31 Distribution digs mine method, digs mine machine and block catenary system

Publications (1)

Publication Number Publication Date
CN109242299A true CN109242299A (en) 2019-01-18

Family

ID=65059953

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811013780.8A Pending CN109242299A (en) 2018-08-31 2018-08-31 Distribution digs mine method, digs mine machine and block catenary system

Country Status (1)

Country Link
CN (1) CN109242299A (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109977166A (en) * 2019-02-18 2019-07-05 陕西优米数据技术有限公司 A kind of block chain common recognition mechanism
CN110430045A (en) * 2019-07-17 2019-11-08 上海朝夕网络技术有限公司 A kind of random digit generation method based on distributed common recognition algorithm
CN110535658A (en) * 2019-09-02 2019-12-03 紫光展锐(重庆)科技有限公司 Block chain data processing method, apparatus and system
CN111371558A (en) * 2020-02-26 2020-07-03 百度在线网络技术(北京)有限公司 Block chain data processing method and device, electronic equipment and medium
CN111563277A (en) * 2020-04-03 2020-08-21 上海坤振集成电路有限公司 Workload proving method in block chain network and block chain
CN112231754A (en) * 2020-10-21 2021-01-15 南方电网科学研究院有限责任公司 Method, system and storage medium for monitoring configuration information of power edge computing node
CN112258046A (en) * 2020-10-23 2021-01-22 上海物融智能科技有限公司 Data processing method, related node and system applied to block chain
CN112749304A (en) * 2019-10-31 2021-05-04 富泰华工业(深圳)有限公司 Method for limiting calculation force of mining machine, mining machine and storage medium
CN113033826A (en) * 2021-05-25 2021-06-25 北京百度网讯科技有限公司 Model joint training method, device, equipment and medium based on block chain
CN113052596A (en) * 2019-12-28 2021-06-29 中移(成都)信息通信科技有限公司 Block chain-based block output method, device, equipment and medium
CN113364596A (en) * 2021-05-27 2021-09-07 南方科技大学 Ore digging method and device based on block chain, mobile terminal and storage medium
CN113806440A (en) * 2020-06-15 2021-12-17 富泰华工业(深圳)有限公司 Block packing method of block chain, electronic device and storage medium
CN114138756A (en) * 2020-09-03 2022-03-04 金篆信科有限责任公司 Data deduplication method, node and computer-readable storage medium
CN115034794A (en) * 2022-08-09 2022-09-09 北京航天奥祥通风科技股份有限公司 Node consensus method and device for block chain system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104915249A (en) * 2015-05-21 2015-09-16 北京比特大陆科技有限公司 Method and device for digging virtual digital coins in mining pool
WO2016046820A1 (en) * 2014-09-23 2016-03-31 Spondoolies Tech Ltd. System and method for providing shared hash engines architecture for a bitcoin block chain
CN106850775A (en) * 2017-01-13 2017-06-13 算丰科技(北京)有限公司 The method of ore deposit pond and ore deposit machine interaction data, agent side, ore deposit pond and system
CN107493340A (en) * 2017-08-23 2017-12-19 广州市易彩乐网络科技有限公司 Data distribution method of calibration in block chain network, apparatus and system
CN107819756A (en) * 2017-10-31 2018-03-20 浙江师范大学 It is a kind of to improve the new method and system for digging ore deposit income
CN108038954A (en) * 2017-12-01 2018-05-15 中国联合网络通信集团有限公司 Transaction operation method and digging ore deposit node based on block chain
CN108234470A (en) * 2017-12-28 2018-06-29 江苏通付盾科技有限公司 Block packaging method and system, electronic equipment, storage medium in block chain network

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016046820A1 (en) * 2014-09-23 2016-03-31 Spondoolies Tech Ltd. System and method for providing shared hash engines architecture for a bitcoin block chain
CN104915249A (en) * 2015-05-21 2015-09-16 北京比特大陆科技有限公司 Method and device for digging virtual digital coins in mining pool
CN106850775A (en) * 2017-01-13 2017-06-13 算丰科技(北京)有限公司 The method of ore deposit pond and ore deposit machine interaction data, agent side, ore deposit pond and system
CN107493340A (en) * 2017-08-23 2017-12-19 广州市易彩乐网络科技有限公司 Data distribution method of calibration in block chain network, apparatus and system
CN107819756A (en) * 2017-10-31 2018-03-20 浙江师范大学 It is a kind of to improve the new method and system for digging ore deposit income
CN108038954A (en) * 2017-12-01 2018-05-15 中国联合网络通信集团有限公司 Transaction operation method and digging ore deposit node based on block chain
CN108234470A (en) * 2017-12-28 2018-06-29 江苏通付盾科技有限公司 Block packaging method and system, electronic equipment, storage medium in block chain network

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
RUBEN RECABARREN,BOGDAN CARBUNAR: "Hardening Stratum, the Bitcoin Pool Mining", 《ARXIV》 *
吕楠: "Bitcoin合作式矿区挖矿研究", 《计算机技术与发展》 *
黄取治: "随机投影技术数据挖掘隐私的保护方法", 《安顺学院学报》 *

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109977166B (en) * 2019-02-18 2022-12-20 陕西优米数据技术有限公司 Block chain consensus mechanism
CN109977166A (en) * 2019-02-18 2019-07-05 陕西优米数据技术有限公司 A kind of block chain common recognition mechanism
CN110430045A (en) * 2019-07-17 2019-11-08 上海朝夕网络技术有限公司 A kind of random digit generation method based on distributed common recognition algorithm
CN110535658A (en) * 2019-09-02 2019-12-03 紫光展锐(重庆)科技有限公司 Block chain data processing method, apparatus and system
CN112749304B (en) * 2019-10-31 2023-06-02 富泰华工业(深圳)有限公司 Method for limiting computing power of server, server and storage medium
CN112749304A (en) * 2019-10-31 2021-05-04 富泰华工业(深圳)有限公司 Method for limiting calculation force of mining machine, mining machine and storage medium
CN113052596B (en) * 2019-12-28 2024-04-09 中移(成都)信息通信科技有限公司 Block chain-based block discharging method, device, equipment and medium
CN113052596A (en) * 2019-12-28 2021-06-29 中移(成都)信息通信科技有限公司 Block chain-based block output method, device, equipment and medium
CN111371558A (en) * 2020-02-26 2020-07-03 百度在线网络技术(北京)有限公司 Block chain data processing method and device, electronic equipment and medium
CN111371558B (en) * 2020-02-26 2024-01-16 百度在线网络技术(北京)有限公司 Block chain data processing method and device, electronic equipment and medium
CN111563277A (en) * 2020-04-03 2020-08-21 上海坤振集成电路有限公司 Workload proving method in block chain network and block chain
CN113806440A (en) * 2020-06-15 2021-12-17 富泰华工业(深圳)有限公司 Block packing method of block chain, electronic device and storage medium
CN114138756A (en) * 2020-09-03 2022-03-04 金篆信科有限责任公司 Data deduplication method, node and computer-readable storage medium
CN112231754A (en) * 2020-10-21 2021-01-15 南方电网科学研究院有限责任公司 Method, system and storage medium for monitoring configuration information of power edge computing node
CN112258046A (en) * 2020-10-23 2021-01-22 上海物融智能科技有限公司 Data processing method, related node and system applied to block chain
CN113033826B (en) * 2021-05-25 2021-09-10 北京百度网讯科技有限公司 Model joint training method, device, equipment and medium based on block chain
CN113033826A (en) * 2021-05-25 2021-06-25 北京百度网讯科技有限公司 Model joint training method, device, equipment and medium based on block chain
CN113364596A (en) * 2021-05-27 2021-09-07 南方科技大学 Ore digging method and device based on block chain, mobile terminal and storage medium
WO2022247069A1 (en) * 2021-05-27 2022-12-01 南方科技大学 Blockchain-based mining method and apparatus, and mobile terminal and storage medium
CN115034794B (en) * 2022-08-09 2023-01-13 北京航天奥祥通风科技股份有限公司 Node consensus method and device for block chain system
CN115034794A (en) * 2022-08-09 2022-09-09 北京航天奥祥通风科技股份有限公司 Node consensus method and device for block chain system

Similar Documents

Publication Publication Date Title
CN109242299A (en) Distribution digs mine method, digs mine machine and block catenary system
CN109146484A (en) Common recognition verification method, digging mine machine and block catenary system based on block chain
CN109087111A (en) Common recognition verification method, digging mine machine and block catenary system based on block chain
US11522706B2 (en) Method and system for publicly verifiable proofs of retrievability in blockchains
CN109075964B (en) Block chaining supporting multiple one-way functions for block verification
CN108717630B (en) Block output method and implementation system thereof
CN107612973B (en) Block chain structure for intelligent mobile terminal, generation method and transaction verification method
CN109087105A (en) For digging the Hash Search method of mine, digging mine machine and block catenary system
CN108776929A (en) Bill processing method, system based on block chain database and readable storage medium storing program for executing
CN108492183A (en) Account trading method, system and the computer readable storage medium of block chain
CN107480990A (en) Block chain bookkeeping methods and device
JP2020522919A (en) Computer-implemented system and method for managing transactions in a blockchain network
CN111865587B (en) Data processing method, block link point device, electronic device, and computer program
CN110519297A (en) A kind of data processing method and equipment based on block chain private key
CN109242491A (en) It digs mine identity identifying method, dig mine machine and block catenary system
CN106296196A (en) Digital cash transaction signature method and system and digital cash transaction system thereof
CN108596627A (en) A kind of big data computational methods and system calculated based on block chain and mist
CN108898440A (en) Flow exchanging method and device
CN110298657A (en) A kind of block chain common recognition method, relevant apparatus and system
CN112651830A (en) Block chain consensus method applied to power resource sharing network
CN109255614A (en) Digging mine method and device, digging mine machine and block catenary system based on block chain
CN112862303A (en) Crowdsourcing quality evaluation system and method based on block chain
Kumar et al. Front-End IoT application for the bitcoin based on proof of elapsed time (PoET)
Sallal Evaluation of Security and Performance of Clustering in the Bitcoin Network, with the Aim of Improving the Consistency of the Blockchain
CN116595094A (en) Federal learning incentive method, device, equipment and storage medium based on block chain

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
AD01 Patent right deemed abandoned

Effective date of abandoning: 20210427

AD01 Patent right deemed abandoned