Method and device for utilizing block chain, computer equipment and storage medium
Patent Information
- Application Number
- CN202280094219.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-14
- Publication Date
- 2024-11-08
AI Technical Summary
During the cryptocurrency mining process, most of the energy consumption of computing resources is not used for meaningful calculations, resulting in a waste of energy.
Submit computing tasks as workload proof tasks through the blockchain task publishing node, and set rewards based on task standards. The blockchain computing nodes generate and verify the results to ensure the effective use of computing resources.
Using the blockchain's computing resources for valuable tasks, such as password recovery and mathematical constant calculations, improves the utilization of computing resources and avoids energy waste.
Smart Images

Figure CN118923079A_ABST
Abstract
Description
Method, device, computer equipment and storage medium for utilizing blockchain Technical Field
[0001] The present application relates to blockchain technology, and specifically, to a method, apparatus, computer device, and storage medium for utilizing blockchain computing resources. Background Art
[0002] In the computational process of mining some cryptocurrencies, a lot of energy is consumed but not used for meaningful computation. This application proposes a method to use this energy for more valuable purposes.
[0003] Summary of the Invention
[0004] In blockchain implementations, proof-of-work (PoW) mechanisms are often used. These mechanisms typically consume significant computing resources. In reality, many meaningful tasks require similar computations, such as password recovery, solving equations, and calculating mathematical constants (e, π, etc.).
[0005] To this end, the present application proposes a method for utilizing blockchain computing resources, including: a blockchain task issuing node submits a task as a proof-of-work task; the blockchain task issuing node sets a standard for completing the proof-of-work task, and the blockchain task issuing node sets a reward based on the standard of the proof-of-work task; based on the proof-of-work task and the reward, the blockchain computing node creates an implementation module; using the implementation module, the blockchain computing node generates a result of the proof-of-work task; the blockchain task issuing node verifies the result of the proof-of-work task generated by the blockchain computing node, and based on the verification, outputs the reward to the blockchain computing node.
[0006] In one embodiment of the present application, the blockchain task issuing node submitting the task as a proof-of-work task includes: calculating the password corresponding to the hash value.
[0007] In one embodiment of the present application, the blockchain task issuing node sets the standard for completing the proof-of-work task, including: verifying that the results of the proof-of-work task generated by the multiple blockchain computing nodes are the same.
[0008] In one embodiment of the present application, the number of the blockchain computing nodes is determined based on the computing resources used by the proof-of-work task.
[0009] In one embodiment of the present application, the blockchain task issuing node sets a reward based on the standard of the proof-of-work task, including: the blockchain task issuing node determines a reward value based on the computing resources used by the proof-of-work task, wherein the reward value is the value of a digital cryptocurrency.
[0010] In one embodiment of the present application, the blockchain task issuing node sets a reward based on the standard of the proof-of-work task, further comprising: the blockchain task issuing node determines a reward value based on the computing resources used by the proof-of-work task and determines the number of blockchain computing nodes, wherein the reward value is the value of a digital cryptocurrency.
[0011] In one embodiment of the present application, the blockchain task issuing node sets the standard for completing the proof-of-work task, including: in response to the results of the proof-of-work task generated by a first number of blockchain computing nodes being the same, determining that the first number of blockchain computing nodes have completed the proof-of-work task, and determining that the second number of blockchain computing nodes have not completed the proof-of-work task, wherein the first number is greater than the second number.
[0012] In this way, the energy consumption of the blockchain can be used in more valuable places. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The following drawings are only intended to illustrate and explain the present application and do not limit the scope of the present application.
[0014] FIG1 is a block diagram of a system utilizing blockchain computing resources according to an embodiment of the present application.
[0015] FIG2 is a flow chart of a method for utilizing blockchain computing resources according to an embodiment of the present application.
[0016] FIG3 is a schematic diagram of the structure of an apparatus for utilizing blockchain computing resources according to an embodiment of the present application.
[0017] FIG4 is a schematic diagram of the structure of a device utilizing blockchain computing resources according to an embodiment of the present application.
[0018] The accompanying drawings are numerals as follows:
[0019] 10: Blockchain
[0020] 101, 102, 103: Client
[0021] 1011, 1021, 1031: Proof of Work module
[0022] 1012, 1022, 1032: Dynamic Proof-of-Work Module
[0023] 104: Input
[0024] S202, S204, S206, S208, S210: Steps
[0025] 300: Blockchain computing resource device
[0026] 301: Blockchain task release module
[0027] 302: Blockchain computing module
[0028] 400: Computer equipment
[0029] 402: Processor
[0030] 404: Memory DETAILED DESCRIPTION
[0031] In order to have a clearer understanding of the technical features, purposes and effects of this application, the specific implementation methods of this application are now described with reference to the accompanying drawings.
[0032] Figure 1 is a block diagram of a system utilizing blockchain computing resources according to one embodiment of the present application. The system includes clients 101, 102, and 103. However, the present application is not limited thereto and may include more or fewer clients. Client 101 may, for example, include a proof-of-work module 1011 and a dynamic proof-of-work module 1012. Furthermore, in one embodiment, the client may include a dynamic proof-of-work module.
[0033] The proof-of-work module 1011 and the dynamic proof-of-work module 1012 are introduced below.
[0034] The proof-of-work module 1011 can implement the function of universal proof-of-work.
[0035] Proof of Work is a mechanism that blocks service attacks by abusing resources. This mechanism requires users to perform time-consuming and complex calculations as a guarantee to ensure that services and resources are used by the real demanders.
[0036] The dynamic proof-of-work module 1012 is capable of processing the current task. In one embodiment, the input 104 to the dynamic proof-of-work module may include task criteria and task input, but the present application is not limited thereto. The input 104 may also include other input parameters for completing the current task and parameters for interacting with the proof-of-work module. In one embodiment, the output of the dynamic proof-of-work module may include a reward, but the present application is not limited thereto and may also include other valuable resources.
[0037] FIG2 is a flow chart of a method for utilizing blockchain computing resources according to an embodiment of the present application.
[0038] In step S202, the blockchain task issuing node submits the task as a proof-of-work task.
[0039] In one embodiment, the blockchain task publishing node can be a desktop computer, a laptop computer, a mobile phone or other terminal, but the present application is not limited thereto. Any device that can publish tasks to nodes on the blockchain can serve as a blockchain publishing node.
[0040] In one embodiment, the submitted tasks may include: tasks related to passwords, such as password recovery, but the present application is not limited thereto, and may also include calculating passwords corresponding to hash values. In one embodiment, the submitted tasks may also include: calculating constant values by solving equations.
[0041] In step S204, the blockchain task issuing node sets a standard for completing the proof-of-work task, and the blockchain task issuing node sets a reward based on the standard for the proof-of-work task.
[0042] The following describes how to set the criteria for completing a task. In one embodiment, the criteria for completing the proof-of-work task can include ensuring that the results calculated by multiple nodes are identical. In this way, the task results can be cross-verified to ensure that the task was completed correctly.
[0043] Setting the task completion criteria also involves determining the number of nodes. The following describes how to determine the number of nodes. In one embodiment, the number of blockchain computing nodes is determined based on the computing resources used by the proof-of-work task. For example, the blockchain task issuing node can assess the computing resources used by the task. If the computing resources required are high, more nodes can be assigned to verify the task.
[0044] The following describes how to determine the reward value. In one embodiment, the blockchain task issuing node setting a reward based on the criteria of the proof-of-work task includes: the blockchain task issuing node determining a reward value based on the computing resources used by the proof-of-work task, wherein the reward value is a value of a digital cryptocurrency.
[0045] The process of determining the reward value also involves evaluating the computing resources used. The following describes how to evaluate computing resources used. In one embodiment, algorithm complexity can be used to measure computing resource usage. In another embodiment, the average time it takes to complete the task can be used to measure computing resource usage. For example, for password cracking, the amount of time spent by three nodes to calculate the password corresponding to the hash value can be used to determine computing resource usage.
[0046] Next, we will describe how to determine the reward value. In another embodiment, the blockchain task issuing node sets a reward based on the criteria for the proof-of-work task, including: the blockchain task issuing node determines a reward value based on the computing resources used by the proof-of-work task and the number of blockchain computing nodes, wherein the reward value is a digital cryptocurrency. In this way, the reward value can be set more efficiently, allowing the task to be completed more quickly.
[0047] The standards set by the blockchain task issuing node to complete the proof-of-work task include:
[0048] In response to the first number of blockchain computing nodes generating the same result for the proof-of-work task, determining that the first number of blockchain computing nodes has completed the proof-of-work task, and determining that the second number of blockchain computing nodes has not completed the proof-of-work task, wherein the first number is greater than the second number. In this manner, even if a node fails to correctly complete the computation task, it is still guaranteed that other nodes will compute the correct result, thereby completing the verification.
[0049] In step S206, based on the proof-of-work task and the reward, the blockchain computing node creates an implementation module. In one embodiment, creating an implementation module by the blockchain computing node involves calling a function to calculate the password corresponding to the hash value. This can be done using a public function or a customized function. Using a public function can expedite the implementation module construction process, while for complex tasks, a customized function can be created to optimize the time required to calculate the hash value.
[0050] In step S208, the blockchain computing node generates the result of the proof-of-work task using the implementation module.
[0051] In one embodiment, the result of the proof-of-work task may be a password corresponding to a hash value.
[0052] In step S210, the blockchain task issuing node verifies the result of the proof-of-work task generated by the blockchain computing node, and based on the verification, outputs the reward to the blockchain computing node.
[0053] In one embodiment, verifying the result of the proof-of-work task generated by the blockchain computing node can be determining that the blockchain computing node has completed the task in response to multiple computing nodes generating the same result.
[0054] Through the above method, this application can expand the functionality of existing blockchain nodes to enable them to accept customized PoW, making meaningless PoW generate value and avoiding energy waste. The new PoW consists of general atomic tasks, including calculating hash values and mathematical constants.
[0055] It should be understood that, although the various steps in the flowchart of FIG2 are shown in sequence as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be performed in other orders. Moreover, at least a portion of the steps in FIG2 may include multiple steps or multiple stages, and these steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily to be performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0056] Figure 3 provides an apparatus (300) for utilizing blockchain computing resources, comprising: a blockchain task publishing module (301), for submitting a task as a proof-of-work task, setting a standard for completing the proof-of-work task, and setting a reward based on the standard for the proof-of-work task; for verifying the result of the proof-of-work task generated by a blockchain computing module (302), and based on the verification, outputting the reward to the blockchain computing module; the blockchain computing module, for creating an implementation module based on the proof-of-work task and the reward, and using the implementation module to generate the result of the proof-of-work task.
[0057] The specific definition of the device for utilizing blockchain computing resources can be found in the definition of the method for utilizing blockchain computing resources above and will not be repeated here. The various modules in the above-mentioned device can be implemented in whole or in part through software, hardware, or a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of the above modules.
[0058] Figure 4 provides a computer device for utilizing blockchain computing resources. According to one embodiment, computer device 400 may include a processor 402 that executes a computer program stored in memory 404. When executed by the processor, the computer program implements a method for utilizing blockchain computing resources.
[0059] Those skilled in the art will understand that the structure shown in Figure 4 is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0060] The present application also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the above steps when executed by a processor.
[0061] Those skilled in the art will appreciate that all or part of the processes in the methods for implementing the above embodiments can be accomplished by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0062] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0063] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.
Claims
1. A method for utilizing blockchain computing resources, comprising: The blockchain task publishing node submits the task as a proof-of-work task; The blockchain task issuing node sets a standard for completing the proof-of-work task, and the blockchain task issuing node sets a reward based on the standard for the proof-of-work task; Based on the workload proof task and the reward, the blockchain computing node creates an implementation module; Using the implementation module, the blockchain computing node generates the result of the proof-of-work task; The blockchain task issuing node verifies the result of the proof-of-work task generated by the blockchain computing node, and based on the verification, outputs the reward to the blockchain computing node.
2. The method according to claim 1, wherein The blockchain task issuing node submits the task as a proof-of-work task, including: calculating the password corresponding to the hash value.
3. The method according to claim 1, wherein The blockchain task issuing node sets the standard for completing the proof-of-work task, including: verifying that the results of the proof-of-work task generated by the multiple blockchain computing nodes are the same.
4. The method according to claim 3, further comprising: The number of the blockchain computing nodes is determined based on the computing resources used by the proof-of-work task.
5. The method according to claim 1, wherein The blockchain task issuing node sets rewards based on the standard of the proof-of-work task, including: The blockchain task issuing node determines a reward value based on the computing resources used by the proof-of-work task, wherein the reward value is a value of a digital cryptocurrency.
6. The method according to claim 5, wherein: The blockchain task issuing node further includes: The blockchain task issuing node determines a reward value based on the computing resources used by the proof-of-work task and the number of blockchain computing nodes, wherein the reward value is the value of a digital cryptocurrency.
7. The method according to claim 1, wherein The standards set by the blockchain task issuing node to complete the proof-of-work task include: In response to the results of the proof-of-work task generated by the first number of blockchain computing nodes being the same, it is determined that the first number of blockchain computing nodes have completed the proof-of-work task, and it is determined that the second number of blockchain computing nodes have not completed the proof-of-work task, wherein the first number is greater than the second number.
8. A device for utilizing blockchain computing resources, comprising: A blockchain task publishing module, configured to submit tasks as proof-of-work tasks, set criteria for completing the proof-of-work tasks, and set rewards based on the criteria for the proof-of-work tasks; and Verifying the result of the proof-of-work task generated by a blockchain computing module and, based on the verification, outputting the reward to the blockchain computing module; The blockchain computing module is used to create an implementation module based on the proof-of-work task and the reward, and use the implementation module to generate a result of the proof-of-work task.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
