CN111682946A - Ore digging method and device based on block chain, computer equipment and storage medium - Google Patents

Ore digging method and device based on block chain, computer equipment and storage medium Download PDF

Info

Publication number
CN111682946A
CN111682946A CN202010478510.5A CN202010478510A CN111682946A CN 111682946 A CN111682946 A CN 111682946A CN 202010478510 A CN202010478510 A CN 202010478510A CN 111682946 A CN111682946 A CN 111682946A
Authority
CN
China
Prior art keywords
block
miners
verified
hash value
pool
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
CN202010478510.5A
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.)
Southwest University of Science and Technology
Southern University of Science and Technology
Original Assignee
Southwest University of Science and Technology
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 Southwest University of Science and Technology filed Critical Southwest University of Science and Technology
Priority to CN202010478510.5A priority Critical patent/CN111682946A/en
Publication of CN111682946A publication Critical patent/CN111682946A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3239Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/04Payment circuits
    • G06Q20/06Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme
    • G06Q20/065Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme using e-cash
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Accounting & Taxation (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Computer Hardware Design (AREA)
  • Finance (AREA)
  • Strategic Management (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 embodiment of the invention discloses a block chain-based ore digging method and device, computer equipment and a storage medium. The method comprises the following steps: acquiring block header information of a block to be generated, which is issued by a mine pool; generating a random item according to the public key of the mine pool, the public key of the miners, the workload certification of the miners and the physical interaction information broadcast by other miners in the mine pool; calculating a hash value to be verified according to the block header information and the random item; and if the hash value to be verified meets the block output condition, transmitting the hash value to be verified to the ore pool, so that the ore pool generates a block to be generated after the hash value to be verified passes verification. According to the technical scheme provided by the embodiment of the invention, the random item is generated by utilizing the physical interaction information among miners, so that the original random item which needs to be randomly generated at a high speed is replaced, and the problems of calculation power and power waste caused by carrying out a large number of hash operations and random number searching processes are avoided.

Description

Ore digging method and device based on block chain, computer equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of block chains, in particular to a block chain-based ore digging method and device, computer equipment and a storage medium.
Background
Blockchain networks ensure consistency in blockchain states and their changes at any one time in the network, which requires uniqueness in the transaction sets (i.e., blocks) generated at any one time throughout the network. However, in the peer-to-peer (P2P) network, any node has the right to generate a new block on the basis of the previous block, so that from any moment, the newly generated block may cause different changes of the state of the whole network, thereby destroying the consistency of the ledger in the network.
In the prior art, the uniqueness of a block newly generated at a certain time and accepted by a network is ensured through a consensus mechanism, wherein the most common consensus mechanism is a Proof of Work (POW). However, the POW consensus process highly depends on the computational power contributed by the node of the blockchain network, and the computational power is mainly used for solving the processes of Secure Hash Algorithm (SHA) -256 hash and random number search without generating any actual social value, so that a large amount of computational power resources are wasted, and a large amount of power resources are wasted.
Disclosure of Invention
The embodiment of the invention provides a block chain-based ore digging method, a block chain-based ore digging device, computer equipment and a storage medium, so as to reduce resource waste caused in an ore digging process.
In a first aspect, an embodiment of the present invention provides a block chain-based ore excavation method, which is applied to miners, and includes:
acquiring block header information of a block to be generated, which is issued by a mine pool;
generating a random item according to the public key of the mine pool, the public key of the miners, the workload certification of the miners and the physical interaction information broadcast by other miners in the mine pool;
calculating a hash value to be verified according to the block header information and the random item;
and if the hash value to be verified meets the block outlet condition, transmitting the hash value to be verified to the ore pool, so that the ore pool generates the block to be generated after the hash value to be verified is verified by the ore pool.
In a second aspect, an embodiment of the present invention further provides a block chain-based ore digging device, which is applied to miners, and includes:
the information acquisition module is used for acquiring block header information of a block to be generated, which is issued by the mine pool;
the random item generating module is used for generating a random item according to the public key of the mine pool, the public key of the miners, the workload certification of the miners and the physical interaction information broadcast by other miners in the mine pool;
the hash value calculation module is used for calculating a hash value to be verified according to the block header information and the random item;
and the hash value transmission module is used for transmitting the hash value to be verified to the ore pool if the hash value to be verified meets the block output condition, so that the ore pool generates the block to be generated after the hash value to be verified is verified by the ore pool.
In a third aspect, an embodiment of the present invention further provides a computer device, where the computer device includes:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement a blockchain-based mining method provided by any embodiment of the present invention.
In a fourth aspect, the embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor, implements the block chain-based mining method provided in any embodiment of the present invention.
The embodiment of the invention provides a mining method based on a block chain, which is applied to miners, and comprises the steps of firstly obtaining block head information of a block to be generated, which is issued by a mine pool, on the one hand, generating a random item according to a public key of the mine pool, a public key and workload certification of the miners and physical interaction information broadcast by other miners in the mine pool, then calculating a hash value to be verified according to the obtained block head information and the generated random item, and transmitting the hash value to be verified to the mine pool when the hash value to be verified meeting a block-out condition is obtained through calculation, so that the mine pool verifies the hash value to be verified, and generates the block to be generated after the verification is passed. The method provided by the embodiment of the invention has the advantages that the random item is generated by utilizing the physical interaction information among miners, so that the original random item which needs to be generated at high speed randomly is replaced, the problem of computing power and power waste caused by carrying out a large number of hash operations and a random number searching process is avoided, and meanwhile, the mine pool is only used for distributing block header information and is blocked after the hash value to be verified is verified, so that the mine pool can obtain a certain reward only by consuming little bandwidth and electric quantity, and the method is favorable for encouraging a site with a wireless internet access (WIFI) function to actively become the mine pool.
Drawings
Fig. 1 is a flowchart of a method for mining based on a block chain according to an embodiment of the present invention;
fig. 2 is a flowchart of a block chain-based ore mining method according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a block chain-based ore excavating device according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a computer device according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the steps as a sequential process, many of the steps can be performed in parallel, concurrently or simultaneously. In addition, the order of the steps may be rearranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
Example one
Fig. 1 is a flowchart of a method for mining based on a block chain according to an embodiment of the present invention. The embodiment is applicable to the situation of mining based on the block chain in a mining pond system established in any fixed place, and the method can be executed by the block chain based mining device provided by the embodiment of the invention, the device can be realized by hardware and/or software, and can be generally integrated in computer equipment, and the computer equipment can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, portable wearable equipment and the like. As shown in fig. 1, the method specifically comprises the following steps:
and S11, acquiring block header information of the to-be-generated block issued by the mine pool.
Specifically, before the block header information is distributed, the mine pool may select a packed transaction from the undetermined transaction pool, and obtain a block size, a block transaction number, a transaction list, and constants in the block header of the block structure to be generated, where the constants in the block header may include a version number and a parent block hash value. Alternatively, where transactions are selected from a pool of undetermined transactions, transactions with higher commission fees may be preferred as much as possible.
Optionally, before obtaining the block header information, the miners may first establish connection with the mine pool, specifically, by providing a connection request to the mine pool, and completing logging in the mine pool after the mine pool responds to the request, and then obtaining the block header information of the block to be generated after the mine pool allocates the block task, where the block header information may include all information used for constructing the block header of the block to be generated, except for the random item.
And S12, generating random items according to the public key of the mine pool, the public key of the miners, the workload certification of the miners and the physical interaction information broadcast by other miners in the mine pool.
Optionally, the physical interaction information is periodically broadcast by other miners through the wireless internet access system. Specifically, miners in the mine pool can interact with each other in a physical interaction manner, for example, the physical interaction process can be an interaction process after connection is performed through a wireless hotspot of the mobile terminal, that is, direct communication between the mobile terminal and the mobile terminal is realized. The specific process can refer to a broadcast function of an Access Point (AP), one end serving as broadcast information can add interactive information carried in a predefined instruction into a Beacon frame (Beacon) or other data packets through the predefined instruction broadcast function and broadcast the interactive information outwards periodically, and one end serving as information receiving end can open a WIFI access function periodically, scan surrounding AP information, store data and execute other required logic functions when the predefined instruction is obtained.
When physical interaction information broadcasted by other miners is received, the physical interaction information can be stored, and when the block header information is obtained to carry out a mine digging task, the stored physical interaction information can be used for generating a random item, and meanwhile, a public key of a mine pool and a public key and a workload certificate of the miners who are digging mines are used together for generating the random item. Specifically, the order of each item in the random item may be, in order, a public key of the mine pool, a public key of the miners, a workload certificate of the miners, and physical interaction information broadcast by other miners, so as to identify that the current random item is generated by the miners themselves ranked first. The physical interaction information may be a public key corresponding to other miners of the broadcast information, and may be used to identify, in the random term, the mining task in which the other miners corresponding to the public key participate, so as to distribute the subsequent rewards.
Optionally, the physical interaction information includes: public key and workload certification for other miners. Specifically, a malicious mine digging person may exist in the mine pool, and only the public key information of the malicious mine digging person is transmitted to other people in a physical interaction mode, so that the obligation of mine digging is not fulfilled. Therefore, the method not only can not consume own computing resources, but also can keep the probability of obtaining the reward by oneself. When the physical interaction information used for generating the random item comprises the public key and the workload certification, other miners who can distribute the current mine digging reward must participate in the mine digging task and contribute to the calculation power of the miners, so that the fairness of subsequent reward distribution is improved, and the enthusiasm of each miner for mine digging can be improved.
And S13, calculating the hash value to be verified according to the block header information and the random item.
And S14, if the hash value to be verified meets the block output condition, transmitting the hash value to be verified to the ore pool, so that the ore pool generates a block to be generated after the hash value to be verified passes verification.
Specifically, the secure hash algorithm SHA-256 may be used to calculate a hash value to be verified of a chunk header composed of the chunk header information and the random entry. Meanwhile, the blocking difficulty can be reduced, and illustratively, when two or three 0 s appear in the hash value to be verified, the blocking condition can be determined to be met. Since the update of the random item depends on the physical interaction information broadcast by other miners, the time required for block output can be adjusted by reducing the block output difficulty.
And when the calculated hash value to be verified meets the block outlet condition, transmitting the hash value to be verified to the ore pool, further verifying whether the hash value to be verified can meet the block outlet condition or not by the ore pool, if so, generating a block to be generated and broadcasting to all miners in the ore pool, thereby terminating the ore excavation task for the current block and starting the ore excavation task for the next block.
Optionally, after calculating the hash value to be verified according to the block header information and the random item, the method further includes: if the hash value to be verified does not meet the block-out condition, adjusting the arrangement sequence of the physical interaction information transmitted by other miners in the random item to generate a new random item; and calculating the hash value to be verified again according to the block header information and the new random item.
Specifically, when the calculated hash value to be verified does not satisfy the condition of block generation, the random item needs to be updated, but the random item is not randomly generated by null and depends on physical interaction information broadcast by other miners. On one hand, miners can regenerate random items through newly received physical interaction information broadcasted by other miners, and on the other hand, the arrangement sequence of the physical interaction information contained in the original random items can be adjusted to regenerate the random items, so that the possible number of the random items is increased, and the possibility of meeting the block output condition is improved. And then, repeating the processes of generating a new random item and calculating the hash value to be verified according to the block header information and the new random item until the calculated hash value to be verified can meet the condition of block generation or a message of completing block generation broadcasted by the mine pool is received, and the like.
On the basis of the technical scheme, optionally, a miner can have two types of accounts including a mining account and a trading account, wherein the trading account is used for trading, the used public and private key pair can be the same as a public and private key used in the prior art, the mining account is used for mining, the used public and private key pair is longer, illustratively, the length of the public and private key pair of the mining account is hundreds of times of that of the public and private key pair of the trading account, so that the existing mining machine generates a public and private key pair nearly ten minutes or the time for generating the public and private key pair is longer than the time for single block output of the existing mining machine, the difficulty for creating the public and private key pair of the mining account is improved, a certain storage space is required for storing the public and private key pair, the malicious miners can be prevented from establishing accounts ceaselessly, then random items of block heads are generated by themselves, and mining is carried out by adopting a large-scale computer, meanwhile, a certain amount of calculation time is needed for establishing a large number of accounts, and the feasibility of mining by repeatedly generating accounts through a large-scale computer is reduced. Relatively speaking, the mining account creation method is more suitable for multi-user participation, and can be a device with certain storage capacity and simple physical interaction, for example, a mobile phone, a mobile tablet computer and the like, and each user only needs to create one own mining account, namely, the mining process can be continuously performed, so that the cost for creating the mining account by each user is reduced.
The technical scheme provided by the embodiment of the invention is applied to miners, firstly, the block header information of a block to be generated issued by an ore pool is obtained, on the other hand, a random item is generated according to a public key of the ore pool, a public key and workload certification of the miners and physical interaction information broadcast by other miners in the ore pool, then, a hash value to be verified is calculated according to the obtained block header information and the generated random item, and when the hash value to be verified meeting a block-out condition is obtained through calculation, the hash value to be verified is transmitted to the ore pool, so that the ore pool verifies the hash value to be verified, and the block to be generated is generated after the verification is passed. According to the method provided by the embodiment of the invention, the random item which needs to be generated at high speed is replaced by the random item generated by utilizing the physical interaction information among miners, so that the problems of calculation power and power waste caused by carrying out a large amount of hash operations and random number searching processes are solved, and meanwhile, the mine pool is only used for distributing the block header information and is blocked after the hash value to be verified is verified, so that the mine pool can obtain a certain reward only by consuming little bandwidth and electric quantity, and the method is favorable for encouraging a site with a WIFI function to actively become the mine pool.
Example two
Fig. 2 is a flowchart of a block chain-based ore mining method according to a second embodiment of the present invention. The technical scheme of the embodiment is further refined on the basis of the technical scheme, and optionally, on the basis that the physical interaction information comprises public keys of other miners and workload certificates, the reward machine after the block is finished is further optimized. Specifically, in this embodiment, after the to-be-generated block is generated after the to-be-verified hash value of the mine pool passes verification, the method further includes: acquiring a mine digging reward; the mine digging reward is determined by dividing rewards for generating the to-be-generated blocks by miners and other miners according to the proportion proved by the workload. Correspondingly, as shown in fig. 2, the method specifically includes the following steps:
and S21, acquiring block header information of the to-be-generated block issued by the mine pool.
And S22, generating random items according to the public key of the mine pool, the public key of the miners, the workload certification of the miners and the physical interaction information broadcast by other miners in the mine pool.
And S23, calculating the hash value to be verified according to the block header information and the random item.
And S24, if the hash value to be verified meets the block output condition, transmitting the hash value to be verified to the ore pool, so that the ore pool generates a block to be generated after the hash value to be verified passes verification.
S25, acquiring mine digging rewards; the mine digging reward is determined by dividing rewards for generating the to-be-generated blocks by miners and other miners according to the proportion proved by the workload.
Specifically, the random term includes workload proofs of the miners and other miners who have physically interacted with the miners, that is, which miners participate in the process of mining in the mine pool and provide contribution of calculation power can be determined, so that the reward obtained by generating the block to be generated can be uniformly distributed in proportion according to the contribution degree of the workload proofs of the miners. Optionally, when the workload proofs of other miners are farther from the current block, the available reward proportion is lower, that is, the reward obtained by generating the block to be generated is more reasonably distributed according to the proportion of the workload proofs and the distance between the block where the workload proofs is located and the current block.
Optionally, obtaining a mine excavation reward includes: the mine digging reward is claimed, and the mine digging reward is obtained when the claims of miners and other miners reach the preset claim proportion. Specifically, after the piece is drawn and the rewards available to each miner are distributed, each miner is required to claim the rewards, specifically, the reward can be claimed by sending a claim request to the mine pool, and only when the claiming of the rewards by all miners capable of distributing the rewards reaches a preset claim proportion, the claim of the rewards for generating the to-be-generated piece can be regarded as legal claim, and the corresponding rewards can be transferred into the account of each miner, wherein the preset claim proportion can be ninety percent or ninety-five percent and the like. Because malicious miners may exist in the mine pool, only the public key and the workload certification of the miners are contained in the process of generating the random item, and the random number is used for replacing physical interaction information of other miners, namely, the situation that the random item contains a plurality of illegal accounts is equivalent to the situation that the random item contains a plurality of illegal accounts, so that a large-scale computer is adopted for mining, and through designing a claim mechanism, if the random item contains a plurality of illegal accounts, the mining reward cannot be obtained even if mining succeeds.
Optionally, the reward for generating the block to be generated is proportional to the number of bills contained in the block to be generated. Specifically, when the mine pool is in a packaging transaction, the more bills are included, the more remuneration obtained by generating the block to be generated is correspondingly generated, so that the mine pool can be encouraged to package more bills, meanwhile, in order to reduce the time delay of miners for obtaining the information issued by the mine pool, the mine pool can be more easily become the longest legal chain, and the mine pool can be encouraged to obtain more profits by increasing the bandwidth of the mine pool.
According to the technical scheme provided by the embodiment of the invention, the rewards of miners participating in mine excavation are divided according to the proportion of respective workload certificates, so that when more users participate in the division, the block rewards obtained by each user are less, the economy of mine excavation by adopting a large-scale computer is reduced, and the problem of great waste of computer computing power and electric power is further avoided.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a block chain-based mining apparatus according to a third embodiment of the present invention, which may be implemented by hardware and/or software, and may be generally integrated into a computer device, where the computer device may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, portable wearable devices, and the like, for performing the block chain-based mining method according to any embodiment of the present invention. As shown in fig. 3, the apparatus includes:
the information obtaining module 31 is configured to obtain block header information of a block to be generated, which is issued by the mine pool;
the random item generating module 32 is configured to generate a random item according to the public key of the mine pool, the public key of the miners, the workload certification of the miners, and physical interaction information broadcast by other miners in the mine pool;
the hash value calculation module 33 is configured to calculate a hash value to be verified according to the block header information and the random item;
and the hash value transmission module 34 is configured to transmit the hash value to be verified to the ore pool if the hash value to be verified meets the block output condition, so that the ore pool generates a block to be generated after the hash value to be verified passes verification.
The technical scheme provided by the embodiment of the invention is applied to miners, firstly, the block header information of a block to be generated issued by an ore pool is obtained, on the other hand, a random item is generated according to a public key of the ore pool, a public key and workload certification of the miners and physical interaction information broadcast by other miners in the ore pool, then, a hash value to be verified is calculated according to the obtained block header information and the generated random item, and when the hash value to be verified meeting a block-out condition is obtained through calculation, the hash value to be verified is transmitted to the ore pool, so that the ore pool verifies the hash value to be verified, and the block to be generated is generated after the verification is passed. According to the method provided by the embodiment of the invention, the random item which needs to be generated at high speed is replaced by the random item generated by utilizing the physical interaction information among miners, so that the problems of calculation power and power waste caused by carrying out a large amount of hash operations and random number searching processes are solved, and meanwhile, the mine pool is only used for distributing the block header information and is blocked after the hash value to be verified is verified, so that the mine pool can obtain a certain reward only by consuming little bandwidth and electric quantity, and the method is favorable for encouraging a site with a WIFI function to actively become the mine pool.
On the basis of the above technical solution, optionally, the physical interaction information includes: public key and workload certification for other miners.
On the basis of the above technical solution, optionally, the block chain-based ore excavation device further includes:
the reward acquisition module is used for acquiring the mine digging reward after the mine pool passes the verification of the hash value to be verified and generating a block to be generated; the mine digging reward is determined by dividing rewards for generating the to-be-generated blocks by miners and other miners according to the proportion proved by the workload.
On the basis of the above technical solution, optionally, the reward obtaining module includes:
and the reward claiming unit is used for claiming the mine digging reward and obtaining the mine digging reward when the claiming of miners and other miners reaches a preset claiming proportion.
On the basis of the above technical solution, optionally, the reward for generating the block to be generated is in direct proportion to the number of bills contained in the block to be generated.
On the basis of the above technical solution, optionally, the block chain-based ore excavation device further includes:
the new random item generating module is used for adjusting the arrangement sequence of the physical interaction information transmitted by other miners in the random item to generate a new random item if the hash value to be verified does not meet the block condition after calculating the hash value to be verified according to the block header information and the random item;
and the secondary verification module is used for calculating the hash value to be verified again according to the block header information and the new random item.
On the basis of the technical scheme, optionally, the physical interaction information is regularly broadcasted by other miners through a wireless internet access system.
The block chain-based ore digging device provided by the embodiment of the invention can execute the block chain-based ore digging method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
It should be noted that, in the embodiment of the mining device based on the block chain, the included units and modules are only divided according to the functional logic, but are not limited to the above division as long as the corresponding functions can be realized; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
Example four
Fig. 4 is a schematic structural diagram of a computer device provided in the fourth embodiment of the present invention, and shows a block diagram of an exemplary computer device suitable for implementing the embodiment of the present invention. The computer device shown in fig. 4 is only an example, and should not bring any limitation to the function and the scope of use of the embodiments of the present invention. As shown in fig. 4, the computer apparatus includes a processor 41, a memory 42, an input device 43, and an output device 44; the number of the processors 41 in the computer device may be one or more, one processor 41 is taken as an example in fig. 4, the processor 41, the memory 42, the input device 43 and the output device 44 in the computer device may be connected by a bus or in other ways, and the connection by the bus is taken as an example in fig. 4.
The memory 42, as a computer-readable storage medium, may be used for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the mining method based on block chains in the embodiment of the present invention (for example, the information obtaining module 31, the random item generating module, the hash value calculating module 33, and the hash value transferring module 34 in the mining device based on block chains). The processor 41 executes various functional applications of the computer device and data processing by running software programs, instructions and modules stored in the memory 42, that is, implements the above-described block chain-based mining method.
The memory 42 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the computer device, and the like. Further, the memory 42 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, memory 42 may further include memory located remotely from processor 41, which may be connected to the mobile terminal through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input means 43 may be used to obtain the tile header information of the tiles to be generated issued by the mine and to generate key signal inputs and the like relating to user settings and function control of the computer apparatus. The output means 44 may be arranged to communicate the calculated hash value to be verified to a mine or the like.
EXAMPLE five
An embodiment of the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a method for block chain based ore mining, the method including:
acquiring block header information of a block to be generated, which is issued by a mine pool;
generating a random item according to the public key of the mine pool, the public key of the miners, the workload certification of the miners and the physical interaction information broadcast by other miners in the mine pool;
calculating a hash value to be verified according to the block header information and the random item;
and if the hash value to be verified meets the block output condition, transmitting the hash value to be verified to the ore pool, so that the ore pool generates a block to be generated after the hash value to be verified passes verification.
Storage medium-any of various types of memory devices or storage devices. The term "storage medium" is intended to include: mounting media such as CD-ROM, floppy disk, or tape devices; computer system memory or random access memory such as DRAM, DDR RAM, SRAM, EDO RAM, Lanbas (Rambus) RAM, etc.; non-volatile memory such as flash memory, magnetic media (e.g., hard disk or optical storage); registers or other similar types of memory elements, etc. The storage medium may also include other types of memory or combinations thereof. In addition, the storage medium may be located in the computer system in which the program is executed, or may be located in a different second computer system connected to the computer system through a network (such as the internet). The second computer system may provide the program instructions to the computer for execution. The term "storage medium" may include two or more storage media that may reside in different locations, such as in different computer systems that are connected by a network. The storage medium may store program instructions (e.g., embodied as a computer program) that are executable by one or more processors.
Of course, the storage medium provided by the embodiments of the present invention contains computer-executable instructions, and the computer-executable instructions are not limited to the method operations described above, and may also perform related operations in the block chain based mining method provided by any embodiment of the present invention.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A mining method based on a block chain is applied to miners and is characterized by comprising the following steps:
acquiring block header information of a block to be generated, which is issued by a mine pool;
generating a random item according to the public key of the mine pool, the public key of the miners, the workload certification of the miners and the physical interaction information broadcast by other miners in the mine pool;
calculating a hash value to be verified according to the block header information and the random item;
and if the hash value to be verified meets the block outlet condition, transmitting the hash value to be verified to the ore pool, so that the ore pool generates the block to be generated after the hash value to be verified is verified by the ore pool.
2. The block chain-based ore mining method of claim 1, wherein the physical interaction information comprises: the public key and the workload certification of the other miners.
3. The method for mining based on the block chain according to claim 2, wherein after the enabling the mine pool to generate the block to be generated after the verifying the hash value to be verified passes, the method further comprises:
acquiring a mine digging reward; and dividing the reward for generating the block to be generated by the miners and other miners according to the proportion proved by the workload, and determining the mine digging reward.
4. The block chain-based excavation method according to claim 3, wherein the acquiring of the excavation reward includes:
claiming the ore excavation reward, and obtaining the ore excavation reward when the claiming of the miners and the other miners reaches a preset claiming proportion.
5. The block chain-based mining method according to claim 3, wherein the reward for generating the block to be generated is proportional to the number of bills contained in the block to be generated.
6. The method for mining based on the block chain according to claim 1, wherein after the calculating the hash value to be verified according to the block header information and the random item, the method further comprises:
if the hash value to be verified does not meet the blocking condition, adjusting the arrangement sequence of the physical interaction information transmitted by other miners in the random item to generate a new random item;
and calculating the hash value to be verified again according to the block header information and the new random item.
7. The block chain-based excavation method of claim 1, wherein the physical interaction information is periodically broadcast by the other miners through a wireless internet system.
8. The utility model provides an ore digging device based on block chain, is applied to the miner, its characterized in that includes:
the information acquisition module is used for acquiring block header information of a block to be generated, which is issued by the mine pool;
the random item generating module is used for generating a random item according to the public key of the mine pool, the public key of the miners, the workload certification of the miners and the physical interaction information broadcast by other miners in the mine pool;
the hash value calculation module is used for calculating a hash value to be verified according to the block header information and the random item;
and the hash value transmission module is used for transmitting the hash value to be verified to the ore pool if the hash value to be verified meets the block output condition, so that the ore pool generates the block to be generated after the hash value to be verified is verified by the ore pool.
9. A computer device, comprising:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the blockchain-based mining method of any one of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a method of block chain based ore mining according to any one of claims 1-7.
CN202010478510.5A 2020-05-29 2020-05-29 Ore digging method and device based on block chain, computer equipment and storage medium Pending CN111682946A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010478510.5A CN111682946A (en) 2020-05-29 2020-05-29 Ore digging method and device based on block chain, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010478510.5A CN111682946A (en) 2020-05-29 2020-05-29 Ore digging method and device based on block chain, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111682946A true CN111682946A (en) 2020-09-18

Family

ID=72453888

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010478510.5A Pending CN111682946A (en) 2020-05-29 2020-05-29 Ore digging method and device based on block chain, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111682946A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113364596A (en) * 2021-05-27 2021-09-07 南方科技大学 Ore digging method and device based on block chain, mobile terminal and storage medium
WO2022213546A1 (en) * 2021-04-06 2022-10-13 南方科技大学 Blockchain-based mining method and apparatus, computer device and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022213546A1 (en) * 2021-04-06 2022-10-13 南方科技大学 Blockchain-based mining method and apparatus, computer device and storage medium
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

Similar Documents

Publication Publication Date Title
Yue et al. A survey of decentralizing applications via blockchain: The 5G and beyond perspective
Jiang et al. Fairness-based packing of industrial IoT data in permissioned blockchains
Gramoli From blockchain consensus back to Byzantine consensus
Xu et al. Blockchain-based trustworthy edge caching scheme for mobile cyber-physical system
US11228439B2 (en) Scale out blockchain with asynchronized consensus zones
Zhao et al. Coalition game-based computation resource allocation for wireless blockchain networks
Foti et al. Decentralized blockchain-based consensus for Optimal Power Flow solutions
CN109168139B (en) WiFi sharing method based on block chain and server
CN108769150A (en) Data processing method, device, clustered node and the storage medium of block chain network
CN104580253A (en) Method and device for processing user data
US20160358164A1 (en) Method and system for digital currency transaction signature and digital currency transaction device thereof
Alam et al. Blockchain, fog and iot integrated framework: review, architecture and evaluation
Asfia et al. Energy trading of electric vehicles using blockchain and smart contracts
CN103023653A (en) Low-power-consumption communication method and device for safety group of internet of things
CN112231741B (en) Data processing method, device, medium and electronic equipment based on block chain system
CN112651830B (en) Block chain consensus method applied to power resource sharing network
CN111682946A (en) Ore digging method and device based on block chain, computer equipment and storage medium
Xue et al. STBC: A novel blockchain-based spectrum trading solution
CN114339733A (en) Model training method and related equipment
KR102254127B1 (en) Blockchain network having a lightening node based on a cloud and a lightening node of the blockchain network
CN113098677A (en) Ore digging method and device based on block chain, computer equipment and storage medium
Cong et al. DTNB: A blockchain transaction framework with discrete token negotiation for the delay tolerant network
Chen et al. On the latency performance in private blockchain networks
Wang et al. Faster service with less resource: A resource efficient blockchain framework for edge computing
Alam Blockchain-based big data analytics approach for smart cities

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200918

RJ01 Rejection of invention patent application after publication