Data update method and device based on blockchain
By conducting proposal voting and automatic execution on the blockchain, the problem of low proposal processing efficiency in blockchain data updates is solved, achieving a more efficient data update and transparent voting process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-01
- Publication Date
- 2026-04-03
AI Technical Summary
In existing technologies, the efficiency of proposal processing during blockchain data updates is low, the data update speed is slow, and the automation of governance cannot be achieved.
By sending proposal information to the blockchain and voting after the resource threshold is met, the number of votes is recorded. When the number of votes meets the passing condition, the proposal information is automatically executed, realizing on-chain governance and reducing off-chain human intervention.
It improved the efficiency of proposal information processing and data update speed, made voting more open and transparent, and reduced off-chain operation steps.
Smart Images

Figure CN117194441B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a data update method based on blockchain. Background Technology
[0002] With the development of blockchain technology, it has been widely applied in various scenarios, playing an increasingly important role, especially in the governance of blockchain communities. In existing technologies, when updating blockchain data, proposals are typically uploaded to the blockchain and a vote is initiated. Participants vote, and after the proposal passes, relevant personnel participate in its implementation off-chain. However, this method of manual intervention results in low proposal processing efficiency and slow data update speed. Summary of the Invention
[0003] In view of this, embodiments of this application provide a blockchain-based data update method. This application also relates to a blockchain-based data update apparatus, another blockchain-based data update method, another blockchain-based data update apparatus, a computing device, and a computer-readable storage medium, to solve the problems of low proposal processing efficiency and slow data update speed in the prior art.
[0004] According to a first aspect of the embodiments of this application, a blockchain-based data update method is provided, comprising:
[0005] The proposal information is sent to the blockchain, wherein the proposal information carries a first resource for the proposal information;
[0006] In response to determining that the first resource has reached the first resource threshold, a vote is taken on the proposal information, and the number of votes is recorded;
[0007] In response to determining that the number of votes meets the passing condition, the proposal information is applied to the blockchain.
[0008] Optionally, after recording the number of votes, the following is included:
[0009] Store the proposal information and the number of votes in the proposal list;
[0010] Accordingly, in response to determining that the number of votes meets the passing condition, the proposal information is applied to the blockchain, including:
[0011] If the number of votes meets the passing condition by traversing the proposal list, the execution function corresponding to the proposal information is obtained and executed.
[0012] Optionally, if the number of votes determines that the proposal meets the passing condition, obtaining and executing the execution function corresponding to the proposal information includes:
[0013] If the number of votes meets the passage condition and the proposal information carries the proposal effectiveness condition, determine whether the proposal information meets the proposal effectiveness condition;
[0014] If so, execute the execution function corresponding to the proposal information.
[0015] Optionally, after sending the proposal information to the blockchain, the process further includes:
[0016] In response to determining that the first resource has not reached the first resource threshold, the first voting resource is obtained;
[0017] The first proposal resource is determined based on the first voting resource and the first resource, and it is determined whether the first proposal resource has reached the first resource threshold.
[0018] In response to determining that the first proposal resource has reached the first resource threshold, a step of voting on the proposal information is performed.
[0019] Optionally, the step of voting on the proposal information in response to determining that the first resource has reached a first resource threshold includes:
[0020] If the proposal duration reaches the proposal duration threshold, and the first resource is greater than the first resource threshold, then the step of voting on the proposal information is executed;
[0021] If the proposal duration reaches the proposal duration threshold and the first proposal resource is greater than the first resource threshold, then the step of voting on the proposal information is executed.
[0022] If the proposal duration does not reach the proposal duration threshold, and the first resource is greater than the first resource threshold, then the step of voting on the proposal information is executed;
[0023] If the proposal duration does not reach the proposal duration threshold, and the first proposal resource is greater than the first resource threshold, then the step of voting on the proposal information is executed.
[0024] Optionally, the blockchain-based data update method further includes:
[0025] If the proposal duration reaches the proposal duration threshold and the first resource is not greater than the first resource threshold, then the proposal information and the first resource information of the first resource are uploaded to the blockchain.
[0026] If the proposal duration reaches the proposal duration threshold and the first proposal resource is not greater than the first resource threshold, then the proposal information and the first proposal resource information of the first proposal resource are uploaded to the blockchain.
[0027] Optionally, if the number of votes determines that the proposal meets the passing condition, obtaining and executing the execution function corresponding to the proposal information includes:
[0028] If the voting duration reaches the voting duration threshold and the number of votes meets the passing condition, then the step of obtaining and executing the execution function corresponding to the proposal information is executed.
[0029] If the voting duration does not reach the voting duration threshold, and the number of votes meets the passing condition, then the step of obtaining and executing the execution function corresponding to the proposal information is executed.
[0030] Optionally, the blockchain-based data update method further includes:
[0031] If the voting duration reaches the voting duration threshold and the number of votes does not meet the passing condition, the voting status of the proposal information is switched to the stopped voting status, and the proposal information, the first resource information of the first resource, and the proposal voting information corresponding to the number of votes are uploaded to the blockchain.
[0032] Optionally, the blockchain-based data update method further includes:
[0033] If the first resource reaches the first resource threshold, the first resource is sent to the resource space corresponding to the first resource, or
[0034] When the first proposal resource reaches the first resource threshold, the first resource is sent to the resource space corresponding to the first resource, and the first voting resource is sent to the resource space corresponding to the first voting resource.
[0035] Optionally, determining whether the first proposal resource has reached the first resource threshold includes:
[0036] If the first proposal resource does not reach the first resource threshold within a preset time range, the proposal information and the first proposal resource information corresponding to the first proposal resource are uploaded to the blockchain.
[0037] Optionally, after applying the proposal information to the blockchain, the process further includes:
[0038] Obtain function execution information and upload the function execution information to the blockchain.
[0039] According to a second aspect of the embodiments of this application, a blockchain-based data update device is provided, comprising:
[0040] The first sending module is configured to send proposal information to the blockchain, wherein the proposal information carries a first resource for the proposal information;
[0041] The first voting module is configured to vote on the proposal information and record the number of votes in response to determining that the first resource has reached a first resource threshold.
[0042] The first processing module is configured to apply the proposal information to the blockchain in response to determining that the number of votes meets the passing condition.
[0043] According to a third aspect of the embodiments of this application, a blockchain-based data update method is provided, comprising:
[0044] Send the proposal information to each node in the blockchain;
[0045] Obtain a second resource from each blockchain node regarding the proposal information;
[0046] In response to the second resource reaching the second resource threshold, a vote is initiated on the proposal information;
[0047] Acquire and record the number of votes cast by each node in the blockchain for the proposed information;
[0048] In response to determining that the number of votes meets the passing condition, the proposal corresponding to the proposal information is applied to each node of the blockchain.
[0049] According to a fourth aspect of the embodiments of this application, a blockchain-based data update apparatus is provided, comprising:
[0050] The second sending module is configured to send proposal information to each node of the blockchain.
[0051] The first acquisition module is configured to acquire a second resource from each blockchain node regarding the proposal information;
[0052] The second voting module is configured to initiate a vote on the proposal information in response to the second resource reaching the second resource threshold.
[0053] The second acquisition module is configured to acquire and record the number of votes cast by each node in the blockchain for the proposal information;
[0054] The second processing module is configured to apply the proposal corresponding to the proposal information to each node of the blockchain in response to determining that the number of votes meets the passing condition.
[0055] According to a fifth aspect of the present application, a computing device is provided, including a memory, a processor, and computer instructions stored in the memory and executable on the processor, wherein the processor executes the instructions to implement the steps of the blockchain-based data update method.
[0056] According to a sixth aspect of the embodiments of this application, a computer-readable storage medium is provided that stores computer instructions, which, when executed by a processor, implement the steps of the blockchain-based data update method.
[0057] This application provides a blockchain-based data update method. The method involves sending proposal information to the blockchain, where the proposal information carries a first resource. Upon determining that the first resource has reached a first resource threshold, a vote is taken on the proposal information, and the number of votes is recorded. Upon determining that the number of votes meets the passing condition, the proposal information is applied to the blockchain. This achieves open and transparent voting; once the number of votes meets the passing condition, the proposal information can be directly applied to the blockchain, thereby reducing the operational steps for off-chain personnel and improving the timeliness of proposal information utilization. Attached Figure Description
[0058] Figure 1 This is a flowchart illustrating a blockchain-based data update method according to an embodiment of this application;
[0059] Figure 2 This is a schematic diagram of a blockchain-based data update method provided in an embodiment of this application;
[0060] Figure 3 This is a flowchart illustrating a blockchain-based data update method for data updating, provided in one embodiment of this application.
[0061] Figure 4 This is a schematic diagram of the structure of a blockchain-based data update device provided in one embodiment of this application;
[0062] Figure 5 This is a flowchart of another blockchain-based data update method provided in one embodiment of this application;
[0063] Figure 6 This is a schematic diagram of another blockchain-based data update device provided in one embodiment of this application;
[0064] Figure 7 This is a structural block diagram of a computing device provided in one embodiment of this application. Detailed Implementation
[0065] Many specific details are set forth in the following description to provide a full understanding of this application. However, this application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this application; therefore, this application is not limited to the specific embodiments disclosed below.
[0066] The terminology used in one or more embodiments of this application is for the purpose of describing particular embodiments only and is not intended to limit the scope of one or more embodiments of this application. The singular forms “a,” “the,” and “the” used in one or more embodiments of this application and in the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” used in one or more embodiments of this application refers to and includes any or all possible combinations of one or more associated listed items.
[0067] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this application, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this application, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."
[0068] First, the terms and concepts involved in one or more embodiments of this application will be explained.
[0069] On-chain governance: On-chain governance is a system for managing and implementing blockchain changes.
[0070] Blockchain is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and cryptographic algorithms. Due to its transparent and immutable characteristics, blockchain is increasingly widely used in finance, traceability, and insurance, especially in the financial sector where it enables highly efficient collaboration between financial institutions. Any improvements to this system or confirmation of certain matters require consensus—a consensus across the entire network. Not only does the blockchain's accounting method require network-wide consensus, but any change to the rules must also be agreed upon by the entire network and community before it can be implemented. To achieve consensus among members within the blockchain community, a practical and feasible mechanism is needed for community governance.
[0071] Blockchain can be categorized into three types: public blockchain, private blockchain, and consortium blockchain, each with different community governance schemes. Public blockchains require complete democracy in their consensus mechanism, with no final arbiter. Private blockchains do not require complete democracy and can be decided by a centralized institution. Consortium blockchains have fewer requirements for their consensus mechanism than public blockchains, but more than private blockchains.
[0072] The technical community controls the power to update code, while miners control computing power; the two check and balance each other, participating in governance through joint consultation. For various consortium blockchains and private blockchains, community governance takes the form of a parliamentary system, where members of the community committee negotiate and vote on important decisions offline. The power of community governance is entirely controlled by a small number of members, including the community committee. The governance process and the execution of governance results in these blockchains are entirely off-chain, making automation impossible.
[0073] For public blockchains, differing economic interests between the technical community and miners can lead to community splits. For example, public blockchains like BCH and BSV arose from forks between the technical and miner communities. As for consortium and private blockchains, even with governance through community committees, the degree of centralization is high, preventing blockchain application users from participating in community governance. Furthermore, the governance process, decision outcomes, and execution all require off-chain personnel, making automation impossible.
[0074] This embodiment provides a blockchain-based data update method that places the blockchain governance process on-chain, using proposals for on-chain governance. The entire governance process is transparently displayed on the blockchain, and the content of the proposals is automatically executed after approval without human intervention. The on-chain governance content is transformed into proposals and sent to the blockchain in the form of transactions. Stakeholders vote on the proposals, and once approved, the proposal content automatically takes effect without off-chain human intervention.
[0075] This application provides a blockchain-based data update method, and also relates to a blockchain-based data update device, another blockchain-based data update method, another blockchain-based data update device, a computing device, and a computer-readable storage medium, which will be described in detail in the following embodiments.
[0076] Figure 1 The flowchart illustrates a blockchain-based data update method according to an embodiment of this application, which specifically includes the following steps:
[0077] Step S102: Send the proposal information to the blockchain, wherein the proposal information carries a first resource for the proposal information.
[0078] Specifically, proposal information refers to the proposal content written off-chain by the proposer, which can be used to update data. When the proposal information is a blockchain governance scheme, the proposer writes the blockchain governance scheme off-chain and writes the corresponding execution function. The scheme information and execution function information are then uploaded to the blockchain as proposal information. The first resource refers to the resources pledged by the proposer when uploading the proposal information to the blockchain through an on-chain account. The first resource includes, but is not limited to, funds, items, and other resources that can be pledged. After the pledged resources reach a certain amount, voters can vote on the proposal information through accounts existing on the blockchain. Voters can be stakeholders related to the proposal information within the blockchain community, i.e., participants within the blockchain community.
[0079] Based on this, after the proposer completes the proposal information, the proposer determines the quantity of the first resource, and the server uploads the proposal information to the blockchain in the form of a transaction. At the same time, the quantity information of the first resource is also uploaded to the blockchain, so that when the first resource reaches the first resource threshold, voting on the proposal information can begin.
[0080] In practical applications, within blockchain community governance, when participants in a blockchain community wish to govern the community, they can do so by initiating a proposal. A participant uploads a governance plan and its corresponding executable function to the blockchain as a proposal, simultaneously staking a certain amount of resources as collateral (the first resource). After the proposal is uploaded to the blockchain, the amount of collateral is used to determine whether the proposal is ready for voting.
[0081] Step S104: In response to determining that the first resource has reached the first resource threshold, vote on the proposal information and record the number of votes.
[0082] Specifically, after uploading the proposal information carrying the first resource to the blockchain, voting can be conducted on the proposal information if the first resource reaches a first resource threshold. The first resource threshold refers to a pre-set quantity of the first resource corresponding to its type, used for comparison with the quantity of the first resource. The first resource threshold can be a pre-set resource value, resource quantity, or proportion. When the first resource reaches the first resource threshold, it indicates that the first resource meets the conditions for starting voting, and voting can proceed on the proposal information. When the first resource does not reach the first resource threshold, it indicates that the first resource does not meet the conditions for starting voting. When the first resource reaches the first resource threshold, voting can proceed on the proposal information, and the voting result can be either "yes" or "no." Correspondingly, the number of each type of vote needs to be recorded; this recorded number of each type of vote is the vote count.
[0083] Based on this, after determining the proposal information and the first resource carried by the proposal information, a pre-set threshold for the first resource is determined, and the first resource is judged to determine whether the first resource has reached the first resource threshold. If it is determined that the first resource has reached the first resource threshold, it means that the first resource corresponding to the proposal information meets the conditions for voting, and voting on the proposal information can begin. During the voting process, the number of votes and the voting situation are recorded, and the votes for and against are recorded respectively.
[0084] Furthermore, to ensure the accuracy of voting information during the voting process, each vote needs to be recorded, and both the proposal information and the number of votes need to be stored in a proposal list. This allows for the subsequent execution of the corresponding functions for proposals that meet the passing conditions in the proposal list. The specific implementation is as follows:
[0085] The proposal information and the number of votes are stored in the proposal list; correspondingly, in response to determining that the number of votes meets the passing condition, the proposal information is applied to the blockchain, including: if it is determined by traversing the proposal list that the number of votes meets the passing condition, obtaining and executing the execution function corresponding to the proposal information.
[0086] Specifically, the proposal list is a collection used to store proposal information. When a proposal is detected to be on the blockchain, the proposal information is stored in the proposal list, and resource staking is performed on the proposal information. During voting, the first resource information corresponding to the resource staking, as well as voting information such as the number of votes in favor and the number of votes against are recorded. If the number of votes corresponding to the proposal information in the proposal list meets the passing condition, the proposal information in the proposal list is selected, and the execution function corresponding to this proposal information is obtained and executed.
[0087] Based on this, after the proposal information is uploaded to the blockchain, the proposal information is stored in the proposal list, along with the first resource information, the number of votes, and the passing conditions corresponding to the proposal information. By traversing the proposal list, if the number of votes corresponding to this proposal information meets the passing conditions, the execution function corresponding to this proposal information is selected from the function set, and the execution function is obtained and executed.
[0088] For example, after the proposer completes the proposal "to change the block time of the blockchain from 5 seconds to 3 seconds," they upload the proposal content and the corresponding execution function to the blockchain's proposal list. The proposal list is then iterated through to identify proposals that meet the approval criteria. The corresponding execution function is then retrieved and executed, thus changing the blockchain's block time from 5 seconds to 3 seconds.
[0089] In summary, by storing proposal information in a proposal list, proposal information management is achieved. By traversing the proposal list to determine whether a proposal meets the approval criteria, centralized management of proposal information is realized. When a proposal meets the approval criteria, the corresponding execution function can be executed immediately, thus improving the processing efficiency of proposal information.
[0090] Furthermore, considering that the execution function corresponding to the proposal information may have a suitable execution time, the effectiveness can be delayed if the proposal information meets the approval conditions. That is, the execution function corresponding to the proposal information is not executed immediately, but rather the execution function corresponding to the proposal information is executed by judging the proposal effectiveness conditions carried in the proposal information. The specific implementation is as follows:
[0091] If the number of votes meets the passing condition and the proposal information carries the proposal taking effect condition, determine whether the proposal information meets the proposal taking effect condition; if so, execute the execution function corresponding to the proposal information.
[0092] Specifically, the conditions for a proposal to take effect refer to the criteria for determining whether the execution function corresponding to the proposal information can begin execution. The conditions for a proposal to take effect can be a pre-set effective time, that is, after the proposal information meets the passing conditions and the effective time is reached, the execution function corresponding to the proposal information is executed; the conditions for a proposal to take effect can also be a pre-set effective height / block height, that is, after the proposal information meets the passing conditions and the effective height is reached, the execution function corresponding to the proposal information is executed; the conditions for a proposal to take effect are pre-set when the proposal information is written and are uploaded to the blockchain along with the proposal information.
[0093] Therefore, after confirming that the number of votes for a proposal meets the pass condition, it is also necessary to determine whether the proposal information carries a condition for its effectiveness. If the proposal information does not carry an effectiveness condition, the corresponding execution function can be executed directly. If the proposal information carries an effectiveness condition, it is determined whether the proposal information meets the effectiveness condition. If the proposal information meets the effectiveness condition, the corresponding execution function is executed. If the proposal information does not meet the effectiveness condition, the process is repeated at fixed intervals to check whether the proposal information meets the effectiveness condition. This process continues until the proposal information meets the effectiveness condition, at which point the loop ends, and the corresponding execution function is executed.
[0094] Continuing with the previous example, when the proposer uploads the proposal "to change the blockchain block time from 5 seconds to 3 seconds" and the corresponding execution function to the blockchain's proposal list, they also stake 51 resources. The pre-determined staking threshold is 50 resources, thus confirming that the proposer's staked resources have reached the threshold. At this point, stakeholders related to this proposal, acting as voters, can vote on the proposal through their accounts on the blockchain, and their voting information is stored in the proposal list. Pre-set voting conditions: when the number of affirmative votes is greater than or equal to two-thirds of the total votes, or when the number of affirmative votes is greater than half of the total votes and the number of negative votes is less than one-third of the total votes, it is determined whether the proposer has set an effective condition for the proposal. If not, the execution function corresponding to the proposal is executed, changing the blockchain block time from 5 seconds to 3 seconds. If the effective condition is that the proposal takes effect when the block height reaches 100, then the execution function corresponding to the proposal is executed when the block height reaches 100, changing the blockchain block time from 5 seconds to 3 seconds.
[0095] In summary, by determining whether the proposal information meets the conditions for the proposal to take effect, the execution time of the execution function corresponding to the proposal information can be determined, thereby improving the flexibility of executing the execution function corresponding to the proposal information.
[0096] Furthermore, considering the possibility that the number of first resources may be insufficient to reach the first resource threshold, in order to ensure that the first resources of the proposal information meet the first resource threshold, the sum of the first resources and the first voting resources can be obtained and added together to reach the first resource threshold, thereby enabling voting on the proposal information. The specific implementation is as follows:
[0097] In response to determining that the first resource has not reached the first resource threshold, a first voting resource is obtained; a first proposal resource is determined based on the first voting resource and the first resource, and it is determined whether the first proposal resource has reached the first resource threshold; in response to determining that the first proposal resource has reached the first resource threshold, a step of voting on the proposal information is performed.
[0098] Specifically, the first voting resource refers to the tokens staked by voters who can vote on the proposal information, i.e., resources. When the first resource is less than the first resource threshold, in order for the first resource corresponding to the proposal information to reach the first resource threshold and start voting, it is necessary for those who can participate in voting to continue to stake resources. The first resource and the first voting resource constitute the first proposal resource. When the first proposal resource reaches the first resource threshold, voting on the proposal information begins.
[0099] Based on this, if the first resource of the proposal information does not reach the first resource threshold, the number of first resources is increased by acquiring first voting resources. The first proposal resource is composed of the first resource and the first voting resource. The first proposal resource is compared with the first resource threshold. If the first proposal resource is greater than the first resource threshold, voting on the proposal information can begin.
[0100] Using the previous example, when the proposer uploads the proposal "to change the block time of the blockchain from 5 seconds to 3 seconds" and the corresponding execution function to the blockchain's proposal list, they also stake 51 resources. The pre-determined staking threshold is 100 resources. Therefore, it is determined that the number of resources staked by the proposer has not reached the staking threshold. At this time, multiple stakeholders related to this proposal, acting as voters, can stake resources for this proposal through their accounts on the blockchain. The voters stake a total of 50 resources, bringing the total number of staked resources to 101, which is greater than the staking threshold of 100. This meets the conditions for starting voting, and voting on the proposal information can begin.
[0101] In summary, when the first resource threshold is not reached, the first proposal resource can be determined by obtaining the first voting resource, thereby bringing the first proposal resource threshold to the required level and increasing the approval rate of the proposal information.
[0102] Furthermore, if the proposal information meets the passing conditions, the first resource can be sent to the corresponding resource space, or the first resource can be sent to the resource space corresponding to the first resource, and the first voting resource can be sent to the resource space corresponding to the first voting resource, thereby realizing the return of the first resource. The specific implementation is as follows:
[0103] When the first resource reaches the first resource threshold, the first resource is sent to the resource space corresponding to the first resource; or when the first proposal resource reaches the first resource threshold, the first resource is sent to the resource space corresponding to the first resource, and the first voting resource is sent to the resource space corresponding to the first voting resource.
[0104] Specifically, resource space refers to the storage location of the resources pledged by the proposer or voter in the corresponding account. Based on this, the proposer uploads the proposal information to the blockchain and pledges resources. When the first resource reaches the first resource threshold, voting on the proposal can begin. Regardless of whether the vote passes or fails, the pledged resources are returned to the proposer. Conversely, if the first resource has not reached the first resource threshold, but the proposer acquires the first voting resource, the first proposal resource, composed of the first voting resource and the first resource, reaches the first resource threshold, indicating that voting on the proposal can begin. Regardless of whether the vote passes or fails, the first resource corresponding to the proposer is returned to the proposer, and the first voting resource pledged by the voter is returned to the voter.
[0105] Continuing with the previous example, if the collateral threshold is 50 resources and the proposer has collateralized 51 resources, then voters can vote on the proposal. Regardless of whether the vote count meets the passage requirements, the 51 collateralized resources will be returned to the proposer, i.e., sent to the proposer's account. Similarly, if the collateral threshold is 100 resources and the proposer has collateralized 51 resources, and voters have collectively collateralized 50 resources, then voters can vote on the proposal. Regardless of whether the vote count meets the passage requirements, the 51 collateralized resources will be returned to the proposer, and the 50 collateralized resources will be returned to the respective voters, i.e., sent to the accounts of both the proposer and the voters.
[0106] In summary, when the first resource or the first voting resource reaches the first resource threshold, regardless of whether the number of votes for the proposal information meets the passing conditions, the first resource or the first voting resource will be sent to the corresponding resource space to realize resource return, thereby increasing the participation enthusiasm of blockchain participants and improving the fairness among participants.
[0107] Furthermore, considering the possibility that the resources for the first proposal may not reach the first resource threshold within a preset time frame, the proposal will be deemed invalid. Subsequently, the proposal information corresponding to the invalid proposal and the first proposal resource information need to be uploaded to the blockchain. The specific implementation is as follows:
[0108] If the first proposal resource does not reach the first resource threshold within a preset time range, the proposal information and the first proposal resource information corresponding to the first proposal resource are uploaded to the blockchain.
[0109] Specifically, the first proposal resource information refers to the first resource information and the first voting resource information included in the first proposal resource. The first resource information refers to the proposer information corresponding to the first resource, as well as the quantity information and the source or storage location information of the first resource. The first voting resource information refers to the information of one or more voters corresponding to the first voting resource, as well as the quantity information and the source or storage location information of the first voting resource corresponding to each voter.
[0110] Based on this, a preset time range is determined for the first resource. If the first resource threshold is not reached, the first voting resource can only be acquired within the preset time range, thus forming the first voting resource. If the first voting resource threshold is not reached within the preset time range, voting on the proposal information is not possible, the proposal information becomes invalid, and the proposal information, along with the related first resource information, is uploaded to the blockchain to achieve information storage and data updates.
[0111] Using the previous example, the time frame for the resource staking phase is set to 24 hours. The timer starts after the proposal is uploaded to the blockchain. Within these 24 hours, voters can stake resources. 24 hours after the proposal is uploaded to the blockchain, if the resources staked in the proposal have not reached the staking threshold of 100, the resource staking information of the voters will be uploaded to the blockchain.
[0112] In summary, by setting a time limit during the resource collateralization phase, and refraining from further collateralization if the time limit is exceeded, the timeliness of proposal information is improved, and resource waste caused by real-time recording and updating of proposal information is avoided.
[0113] Furthermore, in the stage of determining whether the first resource of the proposal information has reached the first resource threshold, considering the large amount of proposal information on the blockchain, recording the first resource and first proposal resource of each proposal information would consume a lot of resources. Therefore, it is also necessary to set a proposal duration threshold. When the proposal duration reaches the proposal duration threshold, the proposal information is processed accordingly based on whether the first resource or first proposal resource is greater than the first resource threshold. The specific implementation of the first resource is as follows:
[0114] If the proposal duration reaches the proposal duration threshold and the first resource is greater than the first resource threshold, then the step of voting on the proposal information is executed; if the proposal duration does not reach the proposal duration threshold and the first resource is greater than the first resource threshold, then the step of voting on the proposal information is executed; if the proposal duration does not reach the proposal duration threshold and the first resource is greater than the first resource threshold, then the step of voting on the proposal information is executed; if the proposal duration does not reach the proposal duration threshold and the first resource is greater than the first resource threshold, then the step of voting on the proposal information is executed.
[0115] Specifically, the proposal duration refers to the time consumed when pledging resources for the proposal information. If the first resource threshold is not reached, voters need to continue pledging resources for the proposal information. The proposal duration is also updated when voters pledge resources. The proposal duration threshold is a pre-set time length, which can be set to 6 hours, 12 hours, etc., depending on the actual situation. The timer for the proposal duration starts from the point when resource pledging begins. When the timer reaches 6 hours or other duration thresholds, it indicates that the proposal duration has reached the threshold. The first proposal resource refers to the resources pledged by the proposer when making the proposal, and the resources pledged by the voters during the resource pledging stage; that is, the sum of the first resources corresponding to the proposer and the first resources corresponding to the voters.
[0116] Based on this, when the proposal duration reaches the proposal duration threshold and the first resource is greater than the first resource threshold, it means that when the proposer pledges resources, the first resource is greater than the first resource threshold, and voting can be done directly on the proposal information; when the proposal duration reaches the proposal duration threshold and the first proposal resource is greater than the first resource threshold, it means that when the proposer pledges resources, the first resource is less than the first resource threshold, and the voter needs to continue to pledge resources. The first resource corresponding to the proposer and the first voting resource corresponding to the voter constitute the first proposal resource. When the first proposal resource is greater than the first resource threshold, voting can be done on the proposal information.
[0117] If the proposal duration does not reach the proposal duration threshold and the first resource is greater than the first resource threshold, it means that when the proposer pledges resources, if the first resource is greater than the first resource threshold, voting can be done directly on the proposal information. If the proposal duration does not reach the proposal duration threshold and the first proposal resource is greater than the first resource threshold, it means that when the proposer pledges resources, if the first resource is less than the first resource threshold, the voter needs to continue pledging resources. The first proposal resource is composed of the first resource corresponding to the proposer and the first voting resource corresponding to the voter. When the first proposal resource is greater than the first resource threshold, voting can be done on the proposal information.
[0118] Using the previous example, the staking threshold is 100 resources. If the proposal duration reaches the 24-hour threshold and the proposer has staked 101 resources, then voting can begin. If the proposal duration reaches the 24-hour threshold and the proposer has staked 50 resources, and the voter has staked 51 resources, then the total staked resources are 101, which is greater than the staking threshold. In this case, the execution function corresponding to the proposal information is executed, changing the blockchain block time from 5 seconds to 3 seconds. If the proposal duration has not reached the 24-hour threshold and the proposer has staked 101 resources, which is greater than the staking threshold, then voting can begin. If the proposal duration has not reached the 24-hour threshold and the proposer has staked 50 resources, and the voter has staked 51 resources, then the total staked resources are 101, which is greater than the staking threshold, then voting can begin.
[0119] In summary, by setting a proposal duration threshold to limit the time of the mortgage operation, the timeliness of the proposal information is improved, and the waste of resources caused by long-term real-time recording and updating of the information corresponding to the first resource and the first proposal resource is avoided.
[0120] Furthermore, when the proposal duration reaches the proposal duration threshold, considering the possibility of a first resource or a first proposal resource not exceeding the first resource threshold, the proposal information needs to be processed accordingly. The specific implementation is as follows:
[0121] If the proposal duration reaches the proposal duration threshold and the first resource is not greater than the first resource threshold, then the proposal information and the first resource information of the first resource are uploaded to the blockchain; if the proposal duration reaches the proposal duration threshold and the first proposal resource is not greater than the first resource threshold, then the proposal information and the first proposal resource information of the first proposal resource are uploaded to the blockchain.
[0122] Specifically, the first resource information refers to the quantity of resources pledged by the proposer when making resource pledges; the first proposal resource information refers to the quantity of resources pledged by the voter when making resource pledges, and the quantity of resources pledged by the proposer when making resource pledges, that is, the sum of the first resource quantity corresponding to the voter and the first resource quantity corresponding to the proposer.
[0123] Based on this, when the proposal duration reaches the proposal duration threshold and the first resource is not greater than the first resource threshold, it indicates that the proposer needs to pledge resources. In this case, the first resource is not greater than the first resource threshold, and the proposal information and the first resource information are uploaded to the blockchain. When the proposal duration reaches the proposal duration threshold and the first proposal resource is not greater than the first resource threshold, it indicates that the proposer needs to pledge resources. In this case, the first resource is not greater than the first resource threshold, and the voter needs to pledge resources. The first resource corresponding to the proposer and the first voting resource corresponding to the voter constitute the first proposal resource. When the first proposal resource is not greater than the first resource threshold, the proposal information and the first proposal resource information are uploaded to the blockchain.
[0124] Continuing with the previous example, the staking threshold is 100 resources. If the proposal duration reaches the 24-hour threshold and the proposer has staked less than 100 resources, the proposal becomes invalid, and the amount of staked resources, the staking time, and their correspondence with the proposal information are uploaded to the blockchain. If the proposal duration reaches the 24-hour threshold and the voter has staked 40 resources, the total staked resources are 90, which is less than the staking threshold. In this case, the amount of staked resources, the staking time, and their correspondence with the proposal information for both the voter and the proposer are uploaded to the blockchain.
[0125] In summary, voting on proposal information is implemented when the proposal duration reaches the proposal duration threshold and the first resource is greater than the first resource threshold or the first proposal resource is greater than the first resource threshold. This shortens the resource staking period for proposal information, saves resources, and improves the experience of blockchain participants.
[0126] Furthermore, during the voting phase, considering the large amount of proposal information on the blockchain, recording each proposal would consume significant resources. Therefore, a voting duration threshold needs to be set when voting on proposals. When the voting duration reaches the threshold, the proposal information is processed accordingly based on whether the number of votes meets the passing criteria. The specific implementation is as follows:
[0127] If the voting duration reaches the voting duration threshold and the number of votes meets the passing condition, then the step of obtaining and executing the execution function corresponding to the proposal information is executed; if the voting duration does not reach the voting duration threshold and the number of votes meets the passing condition, then the step of obtaining and executing the execution function corresponding to the proposal information is executed.
[0128] Specifically, voting duration refers to the time consumed by the voting process; the voting duration threshold refers to a pre-set time length, which can be set to 12 hours, 24 hours, etc., according to the actual situation; the voting duration is started from the time corresponding to the start of voting, and when the time reaches 12 hours or other duration thresholds, it means that the voting duration has reached the voting duration threshold.
[0129] Based on this, if the voting duration reaches the voting duration threshold and the number of votes meets the passing condition, it means that the voter performed the voting operation when the voting duration threshold was reached, and the number of votes for the corresponding voting operation met the passing condition, then the execution function corresponding to the proposal information can be obtained and executed; if the voting duration does not reach the voting duration threshold, but the number of votes meets the passing condition, it means that the voter performed the voting operation within the voting duration threshold, and the number of votes for the corresponding voting operation met the passing condition, then the execution function corresponding to the proposal information can be obtained and executed.
[0130] In summary, by setting a voting duration threshold to limit the voting operation time, the timeliness of proposal information is improved, and the waste of resources caused by long-term real-time recording and updating of the number of votes corresponding to proposal information is avoided.
[0131] Furthermore, considering the possibility that the number of votes may not meet the passage requirements when the voting time reaches the voting time threshold, it is also necessary to change the voting status of the proposal information and store information related to the proposal. The specific implementation is as follows:
[0132] If the voting duration reaches the voting duration threshold and the number of votes does not meet the passing condition, the voting status of the proposal information is switched to the stopped voting status, and the proposal information, the first resource information of the first resource, and the proposal voting information corresponding to the number of votes are uploaded to the blockchain.
[0133] Specifically, the voting status refers to the stage of the voting operation, which includes starting voting and stopping voting. Within the voting duration threshold, the voting status is "starting voting". After exceeding the voting duration threshold, the voting status changes to "stopping voting". The first resource information refers to the amount of resources that the proposer pledged when uploading the proposal information to the blockchain. The proposal voting information refers to the voter's voting on the proposal information, the corresponding voter information, and the information of the votes for or against.
[0134] Based on this, if the voting duration reaches the voting duration threshold and the number of votes does not meet the passing condition, it means that the voting operation performed by the voter when the voting duration threshold is reached does not meet the passing condition. The voting status of the proposal information is switched from the start voting status to the stop voting status, and the proposal information, the first resource information of the first resource, and the proposal voting information corresponding to the number of votes are uploaded to the blockchain.
[0135] Continuing with the previous example, when uploading proposal information to the blockchain, the proposal information includes a pre-set voting duration threshold, set to 24 hours. Voting begins with a timer. After 24 hours, it's determined whether the vote count meets the passing conditions: either the number of "yes" votes is greater than or equal to two-thirds of the total votes, or the number of "yes" votes is greater than half of the total votes and the number of "no" votes is less than one-third of the total votes. If the vote count meets the passing conditions, the corresponding execution function for the proposal information is executed, i.e., the blockchain's block time is changed from 5 seconds to 3 seconds. If the vote count does not meet the passing conditions, the proposal information "change the blockchain's block time from 5 seconds to 3 seconds" and the corresponding voting information are uploaded to the blockchain. If the voting timer has not reached 24 hours but the vote count meets the passing conditions, the corresponding execution function for the proposal information is executed, i.e., the blockchain's block time is changed from 5 seconds to 3 seconds.
[0136] In summary, by changing the voting status of proposal information when the voting time reaches the threshold and the number of votes does not meet the pass conditions, the voting management of proposal information is realized, the voting cycle of proposal information is shortened, resources are saved, and the experience of blockchain participants is improved.
[0137] Step S106: In response to determining that the number of votes meets the passing condition, the proposal information is applied to the blockchain.
[0138] Specifically, the passing condition refers to pre-set rules or limitations. In this embodiment, the passing condition can be the quantitative relationship between affirmative and negative votes. The execution function refers to the executable function corresponding to the proposal information, which corresponds to the content of the proposal information. When the proposal information modifies relevant data, after the proposal information is passed, it is applied to the blockchain. That is, the application of the proposal information can be realized by executing the execution function corresponding to the proposal information. The passing condition can be that the affirmative votes are greater than or equal to two-thirds of the total votes, or that the affirmative votes are greater than one-half of the total votes and the negative votes are less than one-third of the total votes. It should be noted that the passing condition can be set according to the actual situation, and this embodiment does not impose any limitations on it.
[0139] Based on this, the number of votes and voting details are recorded during the voting process. Votes in favor and votes against are recorded separately. The number of votes in favor and votes against is used to determine whether the number of votes meets the conditions for passing the vote. If the number of votes meets the conditions for passing the vote, the proposal information is applied to the blockchain, thereby realizing on-chain governance of the blockchain.
[0140] Furthermore, after the execution function corresponding to the proposal information has been executed, the execution result of the execution function can be uploaded to the blockchain, that is, the function execution information can be uploaded to the blockchain. The specific implementation is as follows:
[0141] Obtain function execution information and upload the function execution information to the blockchain.
[0142] Specifically, the function execution information is the execution result of the execution function corresponding to the proposal information. In this embodiment, when the execution function corresponding to the proposal information is to change the blockchain data, the information after the blockchain data is changed is uploaded to the blockchain after the execution function is completed.
[0143] In practical applications, when the number of votes meets the conditions for passing the vote, the execution function corresponding to the proposal is obtained and executed. After the execution function is completed, the execution result "the block time of the blockchain is changed from 5s to 3s" is uploaded to the blockchain for broadcast.
[0144] In summary, after the execution of the function is completed, the function execution information is uploaded to the blockchain, thereby enabling changes to the blockchain data, i.e., blockchain governance, which improves the efficiency of blockchain governance.
[0145] Figure 2 A schematic diagram illustrating a blockchain-based data update method provided in an embodiment of this application is shown below. Figure 2As shown, when updating data, the relevant update method is uploaded to the blockchain in the form of a proposal and resources are staked. It is then determined whether the amount of staked resources has reached the staking threshold. If so, the voting phase begins; otherwise, voters continue to stake resources, updating the total amount of staked resources. It is then determined whether the staking time threshold has been reached. If not, the staked resources are checked again to see if the updated staking resources have reached the threshold. If so, the voting phase begins; otherwise, the proposal information is recorded and distributed, and the proposal becomes invalid. In the voting phase, voters cast their votes. After voting, it is determined whether the number of votes meets the passing condition. If so, the execution function corresponding to the proposal information is executed, and the staked resources are returned to the corresponding proposer and voters. If not, it is determined whether voting has ended. If so, the proposal information is recorded and distributed, and the proposal becomes invalid; otherwise, voting continues. This method achieves open and transparent voting. The execution function corresponding to the proposal information is executed as long as the number of votes meets the passing condition, thereby reducing the operational steps for off-chain personnel and improving the timeliness of function execution.
[0146] The following is in conjunction with the appendix Figure 3 Taking the blockchain-based data update method provided in this application as an example, the blockchain-based data update method will be further explained. Figure 3 This application provides a flowchart illustrating a blockchain-based data update method for data updating according to an embodiment of the present application, which specifically includes the following steps:
[0147] Step S302: Receive proposal information carrying collateral resources and upload the proposal information to the blockchain.
[0148] After the proposer completes the proposal information, the proposer determines the amount of collateral resources. The server then uploads the proposal information to the blockchain in the form of a transaction, along with the amount of collateral resources.
[0149] Step S304: Determine whether the collateral resources have reached the collateral threshold. If yes, proceed to step S306; otherwise, proceed to step S308.
[0150] After determining the proposal information and the collateral resources carried by the proposal information, a pre-set collateral threshold is determined, and the collateral resources are judged to determine whether the collateral resources have reached the collateral threshold.
[0151] Step S306: Voters vote on the proposal information.
[0152] Step S308: Voters pledge resources for the proposal information and update the pledged resources.
[0153] If the pledged resources in the proposal information have not reached the pledge threshold, the voters shall continue to pledge resources and update the current pledged resource quantity.
[0154] Step S310: Determine whether the mortgage time threshold has been reached. If yes, proceed to step S312; otherwise, proceed to step S304.
[0155] The timing is started from the time the proposal information is uploaded to the blockchain to determine whether the staking time threshold has been reached.
[0156] Step S312: Determine whether the updated collateral resources have reached the collateral threshold. If yes, proceed to step S306; otherwise, proceed to step S314.
[0157] After a voter performs a resource collateralization operation, it is determined whether the current amount of collateralized resources has reached the collateralization threshold.
[0158] Step S314: Upload the proposal information and collateral resource information to the blockchain.
[0159] If the current amount of collateralized resources has not reached the collateralization threshold, the proposal information and the corresponding collateralized resource information will be uploaded to the blockchain. The collateralized resource information includes the amount of resources pledged by the proposer and the amount of resources pledged by the voters.
[0160] Step S316: Determine whether the number of votes meets the passing condition. If yes, proceed to step S318; otherwise, proceed to step S314.
[0161] The passage is considered successful when the number of votes in favor is greater than or equal to two-thirds of the total votes, or when the number of votes in favor is greater than one-half of the total votes and the number of votes against is less than one-third of the total votes.
[0162] Step S318: Execute the execution function corresponding to the proposal information and return the collateral resources.
[0163] If the conditions for approval are met, the execution function corresponding to the proposal information will be executed.
[0164] This application provides a blockchain-based data update method. The method involves receiving proposal information and uploading it to the blockchain. The proposal information includes collateral resources. The method then determines whether the collateral resources have reached a collateral threshold. Upon determining that the threshold has been reached, a vote is taken on the proposal information, and the number of votes is recorded. Finally, upon determining that the number of votes meets the passing condition, the corresponding execution function for the proposal information is executed. This achieves open and transparent voting; the execution function is executed as soon as the number of votes meets the passing condition, thereby reducing the operational steps for off-chain personnel and improving the timeliness of function execution.
[0165] Corresponding to the above method embodiments, this application also provides embodiments of a blockchain-based data update device. Figure 4 A schematic diagram of a blockchain-based data update device according to an embodiment of this application is shown. Figure 4 As shown, the device includes:
[0166] The first sending module 402 is configured to send proposal information to the blockchain, wherein the proposal information carries a first resource for the proposal information;
[0167] The first voting module 404 is configured to vote on the proposal information and record the number of votes in response to determining that the first resource has reached a first resource threshold.
[0168] The first processing module 406 is configured to apply the proposal information to the blockchain in response to determining that the number of votes meets the passing condition.
[0169] In an optional embodiment, the first voting module 404 is further configured to:
[0170] The proposal information and the number of votes are stored in the proposal list; correspondingly, in response to determining that the number of votes meets the passing condition, the proposal information is applied to the blockchain, including: if it is determined by traversing the proposal list that the number of votes meets the passing condition, obtaining and executing the execution function corresponding to the proposal information.
[0171] In an optional embodiment, the first voting module 404 is further configured to:
[0172] If the number of votes meets the passing condition and the proposal information carries the proposal taking effect condition, determine whether the proposal information meets the proposal taking effect condition; if so, execute the execution function corresponding to the proposal information.
[0173] In an optional embodiment, the first sending module 402 is further configured to:
[0174] In response to determining that the first resource has not reached the first resource threshold, a first voting resource is obtained; a first proposal resource is determined based on the first voting resource and the first resource, and it is determined whether the first proposal resource has reached the first resource threshold; in response to determining that the first proposal resource has reached the first resource threshold, a step of voting on the proposal information is performed.
[0175] In an optional embodiment, the first voting module 404 is further configured to:
[0176] If the proposal duration reaches the proposal duration threshold and the first resource is greater than the first resource threshold, then the step of voting on the proposal information is executed; if the proposal duration does not reach the proposal duration threshold and the first resource is greater than the first resource threshold, then the step of voting on the proposal information is executed; if the proposal duration does not reach the proposal duration threshold and the first resource is greater than the first resource threshold, then the step of voting on the proposal information is executed; if the proposal duration does not reach the proposal duration threshold and the first resource is greater than the first resource threshold, then the step of voting on the proposal information is executed.
[0177] In an optional embodiment, the first voting module 404 is further configured to:
[0178] If the proposal duration reaches the proposal duration threshold and the first resource is not greater than the first resource threshold, then the proposal information and the first resource information of the first resource are uploaded to the blockchain; if the proposal duration reaches the proposal duration threshold and the first proposal resource is not greater than the first resource threshold, then the proposal information and the first proposal resource information of the first proposal resource are uploaded to the blockchain.
[0179] In an optional embodiment, the first voting module 404 is further configured to:
[0180] If the voting duration reaches the voting duration threshold and the number of votes meets the passing condition, then the step of obtaining and executing the execution function corresponding to the proposal information is executed; if the voting duration does not reach the voting duration threshold and the number of votes meets the passing condition, then the step of obtaining and executing the execution function corresponding to the proposal information is executed.
[0181] In an optional embodiment, the first voting module 404 is further configured to:
[0182] If the voting duration reaches the voting duration threshold and the number of votes does not meet the passing condition, the voting status of the proposal information is switched to the stopped voting status, and the proposal information, the first resource information of the first resource, and the proposal voting information corresponding to the number of votes are uploaded to the blockchain.
[0183] In an optional embodiment, the first voting module 404 is further configured to:
[0184] When the first resource reaches the first resource threshold, the first resource is sent to the resource space corresponding to the first resource; or when the first proposal resource reaches the first resource threshold, the first resource is sent to the resource space corresponding to the first resource, and the first voting resource is sent to the resource space corresponding to the first voting resource.
[0185] In an optional embodiment, the first sending module 402 is further configured to:
[0186] If the first proposal resource does not reach the first resource threshold within a preset time range, the proposal information and the first proposal resource information corresponding to the first proposal resource are uploaded to the blockchain.
[0187] In an optional embodiment, the first processing module 406 is further configured to:
[0188] Obtain function execution information and upload the function execution information to the blockchain.
[0189] This application provides a blockchain-based data update device that receives proposal information and uploads it to the blockchain. The proposal information carries a first resource specific to the proposal. The device determines whether the first resource has reached a first resource threshold. In response to the threshold, it votes on the proposal and records the vote count. Finally, it executes the corresponding function for the proposal if the vote count meets the passing condition. This achieves open and transparent voting; the function is executed as soon as the vote count meets the passing condition, reducing the number of steps required by off-chain personnel and improving the timeliness of function execution.
[0190] The above is an illustrative scheme of a blockchain-based data update device according to this embodiment. It should be noted that the technical solution of this blockchain-based data update device and the technical solution of the aforementioned blockchain-based data update method belong to the same concept. Details not described in detail in the technical solution of the blockchain-based data update device can be found in the description of the technical solution of the aforementioned blockchain-based data update method.
[0191] Figure 5 A flowchart of another blockchain-based data update method according to an embodiment of this application is shown, which specifically includes the following steps:
[0192] Step S502: Send the proposal information to each node of the blockchain.
[0193] Step S504: Obtain the second resource of each blockchain node for the proposal information.
[0194] After the proposer completes the proposal information, the proposer determines the quantity of the second resource. The server then uploads the proposal information to each node of the blockchain in the form of a transaction, and at the same time, the quantity information of the second resource is also uploaded to each node of the blockchain.
[0195] Step S506: In response to the second resource reaching the second resource threshold, initiate a vote on the proposal information.
[0196] Step S508: Obtain and record the number of votes cast by each node in the blockchain for the proposed information.
[0197] After determining the proposal information and the secondary resources carried by the proposal information, a pre-set threshold for the secondary resources is determined, and the secondary resources are judged to see if they meet the threshold. If the secondary resources meet the threshold, it means that the secondary resources corresponding to the proposal information meet the conditions for voting, and voting on the proposal information can begin. During the voting process, the number of votes and the voting situation are recorded, and the votes for and against are recorded separately.
[0198] Step S510: In response to determining that the number of votes meets the passing condition, the proposal corresponding to the proposal information is applied to each node of the blockchain.
[0199] The number of votes determines whether the vote count meets the conditions for passing the vote. If the vote count meets the conditions for passing the vote, the proposal information is applied to each node of the blockchain, thereby realizing on-chain governance of the blockchain.
[0200] In summary, by sending proposal information to all blockchain nodes; acquiring the second resource from each node regarding the proposal information; initiating voting on the proposal information when the second resource reaches a threshold; acquiring and recording the number of votes cast by each node; and applying the proposal to all blockchain nodes upon confirming that the vote count meets the passing condition, the proposal information is utilized. This achieves open and transparent voting; once the vote count meets the passing condition, the proposal information can be directly applied to the blockchain, reducing off-chain operational steps and improving the timeliness of proposal information utilization.
[0201] Corresponding to the above method embodiments, this application also provides embodiments of a blockchain-based data update device. Figure 6 A schematic diagram of another blockchain-based data update device provided in one embodiment of this application is shown. Figure 6 As shown, the device includes:
[0202] The second sending module 602 is configured to send proposal information to each node of the blockchain.
[0203] The first acquisition module 604 is configured to acquire a second resource for the proposal information from each node in the blockchain.
[0204] The second voting module 606 is configured to initiate voting on the proposal information in response to the second resource reaching the second resource threshold.
[0205] The second acquisition module 608 is configured to acquire and record the number of votes cast by each node in the blockchain for the proposal information;
[0206] The second processing module 610 is configured to apply the proposal corresponding to the proposal information to each node of the blockchain in response to determining that the number of votes meets the passing condition.
[0207] In summary, the alternative blockchain-based data update device provided in this application works by: sending proposal information to each node of the blockchain; acquiring second resources from each node regarding the proposal information; initiating voting on the proposal information when the second resources reach a second resource threshold; acquiring and recording the number of votes cast by each node for the proposal information; and applying the proposal information to each node when the number of votes meets the passing condition. This achieves open and transparent voting, allowing the proposal information to be directly applied to the blockchain once the number of votes meets the passing condition, thereby reducing the operational steps for off-chain personnel and improving the timeliness of proposal information utilization.
[0208] The above is an illustrative scheme of a blockchain-based data update device according to this embodiment. It should be noted that the technical solution of this blockchain-based data update device and the technical solution of the aforementioned blockchain-based data update method belong to the same concept. Details not described in detail in the technical solution of the blockchain-based data update device can be found in the description of the technical solution of the aforementioned blockchain-based data update method.
[0209] Figure 7 A structural block diagram of a computing device 700 according to an embodiment of this application is shown. The components of the computing device 700 include, but are not limited to, a memory 710 and a processor 720. The processor 720 is connected to the memory 710 via a bus 730, and a database 750 is used to store data.
[0210] The computing device 700 also includes an access device 740, which enables the computing device 700 to communicate via one or more networks 760. Examples of these networks include a Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the Internet. The access device 740 may include one or more of any type of wired or wireless network interface (e.g., a Network Interface Card (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) interface, a Wi-MAX interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, and so on.
[0211] In one embodiment of this application, the aforementioned components of the computing device 700 and Figure 7 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 7 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this application. Those skilled in the art can add or replace other components as needed.
[0212] The computing device 700 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or PCs. The computing device 700 can also be a mobile or stationary server.
[0213] Specifically, when the processor 720 executes the instructions, it implements the steps of the blockchain-based data update method.
[0214] The above is an illustrative scheme of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the blockchain-based data update method described above belong to the same concept. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the blockchain-based data update method described above.
[0215] An embodiment of this application also provides a computer-readable storage medium storing computer instructions that, when executed by a processor, implement the steps of the blockchain-based data update method described above.
[0216] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium belongs to the same concept as the technical solution of the blockchain-based data update method described above. Details not described in detail in the technical solution of the storage medium can be found in the description of the technical solution of the blockchain-based data update method described above.
[0217] The foregoing has described specific embodiments of this application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired results. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0218] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or certain intermediate forms. The computer-readable medium may include any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added to or subtracted according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.
[0219] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0220] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0221] The preferred embodiments disclosed above are merely illustrative of this application. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the content of this application. These embodiments are selected and specifically described in this application to better explain the principles and practical applications of this application, thereby enabling those skilled in the art to better understand and utilize this application. This application is limited only by the claims and their full scope and equivalents.
Claims
1. A data update method based on blockchain, characterized in that, The method, applied to blockchain nodes in a blockchain system, includes: The proposal information is sent to the blockchain, wherein the proposal information carries a first resource for the proposal information; In response to determining that the first resource has reached the first resource threshold, a vote is taken on the proposal information, and the number of votes is recorded; In response to determining that the number of votes meets the passing condition, the proposal information is applied to the blockchain; The section following the recorded vote count includes: Store the proposal information and the number of votes in the proposal list; Accordingly, in response to determining that the number of votes meets the passing condition, the proposal information is applied to the blockchain, including: If the number of votes meets the passing condition by traversing the proposal list, the execution function corresponding to the proposal information is obtained and executed. Wherein, the step of determining that the number of votes meets the passing condition, obtaining and executing the execution function corresponding to the proposal information, includes: If the number of votes meets the passage condition and the proposal information carries the proposal effectiveness condition, determine whether the proposal information meets the proposal effectiveness condition; If so, execute the execution function corresponding to the proposal information; The conditions for a proposal to take effect are a pre-set effective time, effective height, and / or block height.
2. The method according to claim 1, characterized in that, After sending the proposal information to the blockchain, the process also includes: In response to determining that the first resource has not reached the first resource threshold, the first voting resource is obtained; The first proposal resource is determined based on the first voting resource and the first resource, and it is determined whether the first proposal resource has reached the first resource threshold. In response to determining that the first proposal resource has reached the first resource threshold, a step of voting on the proposal information is performed.
3. The method according to claim 1, characterized in that, The step of voting on the proposal information in response to determining that the first resource has reached a first resource threshold includes: If the proposal duration reaches the proposal duration threshold, and the first resource is greater than the first resource threshold, then the step of voting on the proposal information is executed; If the proposal duration reaches the proposal duration threshold and the first proposal resource is greater than the first resource threshold, then the step of voting on the proposal information is executed. If the proposal duration does not reach the proposal duration threshold, and the first resource is greater than the first resource threshold, then the step of voting on the proposal information is executed; If the proposal duration does not reach the proposal duration threshold, and the first proposal resource is greater than the first resource threshold, then the step of voting on the proposal information is executed.
4. The method according to claim 3, characterized in that, Also includes: If the proposal duration reaches the proposal duration threshold and the first resource is not greater than the first resource threshold, then the proposal information and the first resource information of the first resource are uploaded to the blockchain. If the proposal duration reaches the proposal duration threshold and the first proposal resource is not greater than the first resource threshold, then the proposal information and the first proposal resource information of the first proposal resource are uploaded to the blockchain.
5. The method according to claim 1, characterized in that, When the number of votes is determined to meet the passing condition, the execution function corresponding to the proposal information is obtained and executed, including: If the voting duration reaches the voting duration threshold and the number of votes meets the passing condition, then the step of obtaining and executing the execution function corresponding to the proposal information is executed. If the voting duration does not reach the voting duration threshold, and the number of votes meets the passing condition, then the step of obtaining and executing the execution function corresponding to the proposal information is executed.
6. The method according to claim 5, characterized in that, Also includes: If the voting duration reaches the voting duration threshold and the number of votes does not meet the passing condition, the voting status of the proposal information is switched to the stopped voting status, and the proposal information, the first resource information of the first resource, and the proposal voting information corresponding to the number of votes are uploaded to the blockchain.
7. The method according to claim 2, characterized in that, Also includes: If the first resource reaches the first resource threshold, the first resource is sent to the resource space corresponding to the first resource, or When the first proposal resource reaches the first resource threshold, the first resource is sent to the resource space corresponding to the first resource, and the first voting resource is sent to the resource space corresponding to the first voting resource.
8. The method according to claim 2, characterized in that, Determining whether the first proposal resource has reached the first resource threshold includes: If the first proposal resource does not reach the first resource threshold within a preset time range, the proposal information and the first proposal resource information corresponding to the first proposal resource are uploaded to the blockchain.
9. The method according to claim 1, characterized in that, After applying the proposal information to the blockchain, the process also includes: Obtain function execution information and upload the function execution information to the blockchain.
10. A data update device based on blockchain, characterized in that, include: The first sending module is configured to send proposal information to the blockchain, wherein the proposal information carries a first resource for the proposal information; The first voting module is configured to vote on the proposal information and record the number of votes in response to determining that the first resource has reached a first resource threshold. The first processing module is configured to apply the proposal information to the blockchain in response to determining that the number of votes meets the passing condition. The first voting module is further configured as follows: The proposal information and the number of votes are stored in the proposal list; accordingly, in response to determining that the number of votes meets the passing condition, the proposal information is applied to the blockchain, including: if it is determined by traversing the proposal list that the number of votes meets the passing condition, obtaining and executing the execution function corresponding to the proposal information; The first voting module is further configured to: determine whether the proposal information meets the proposal effectiveness conditions when the number of votes meets the passing condition and the proposal information carries the proposal effectiveness conditions; if so, execute the execution function corresponding to the proposal information; wherein the proposal effectiveness conditions are a pre-set effectiveness time, effectiveness height and / or block height.
11. A data update method based on blockchain, characterized in that, include: Send the proposal information to each node in the blockchain; Obtain a second resource from each blockchain node regarding the proposal information; In response to the second resource reaching the second resource threshold, a vote is initiated on the proposal information; Acquire and record the number of votes cast by each node in the blockchain for the proposed information; In response to determining that the number of votes meets the passing condition, the proposal corresponding to the proposal information is applied to each node of the blockchain; After recording the number of votes, the following is included: Store the proposal information and the number of votes in the proposal list; Accordingly, in response to determining that the number of votes meets the passing condition, the proposal information is applied to the blockchain, including: If the number of votes meets the passing condition by traversing the proposal list, the execution function corresponding to the proposal information is obtained and executed. Wherein, the step of determining that the number of votes meets the passing condition, obtaining and executing the execution function corresponding to the proposal information, includes: If the number of votes meets the passage condition and the proposal information carries the proposal effectiveness condition, determine whether the proposal information meets the proposal effectiveness condition; If so, execute the execution function corresponding to the proposal information; The conditions for a proposal to take effect are a pre-set effective time, effective height, and / or block height.
12. A data update device based on blockchain, characterized in that, include: The second sending module is configured to send proposal information to each node of the blockchain. The first acquisition module is configured to acquire a second resource from each blockchain node regarding the proposal information; The second voting module is configured to initiate a vote on the proposal information in response to the second resource reaching the second resource threshold. The second acquisition module is configured to acquire and record the number of votes cast by each node in the blockchain for the proposal information; The second processing module is configured to apply the proposal corresponding to the proposal information to each node of the blockchain in response to determining that the number of votes meets the passing condition. The second acquisition module is further configured as follows: The proposal information and the number of votes are stored in the proposal list; accordingly, in response to determining that the number of votes meets the passing condition, the proposal information is applied to the blockchain, including: if it is determined by traversing the proposal list that the number of votes meets the passing condition, obtaining and executing the execution function corresponding to the proposal information; The second acquisition module is further configured to: determine whether the proposal information meets the proposal effectiveness conditions when the number of votes meets the passing condition and the proposal information carries the proposal effectiveness conditions; if so, execute the execution function corresponding to the proposal information; wherein the proposal effectiveness conditions are a pre-set effectiveness time, effectiveness height and / or block height.
13. A computing device, comprising a memory, a processor, and computer instructions stored in the memory and executable on the processor, characterized in that, When the processor executes the instructions, it implements the steps of the method according to any one of claims 1-9 or 11.
14. A computer-readable storage medium storing computer instructions, characterized in that, When executed by a processor, this instruction implements the steps of the method according to any one of claims 1-9 or 11.
15. A computer program product comprising computer instructions, characterized in that, When executed by a processor, the computer instructions implement the steps of the method according to any one of claims 1-9 or 11.