Disclosure of Invention
In view of this, the present application provides a voting method based on a block chain to solve the technical defects in the prior art. The application also provides a second voting method based on the block chain, a voting device based on the block chain, a computing device and a computer readable storage medium.
The application provides a voting method based on a block chain, which comprises the following steps:
acquiring voting data submitted by auditing group members of a project aiming at a project case generated in the running process of the project;
determining whether a voting intelligence contract meets an execution condition based on the voting data;
executing the voting intelligent contract on the voting data meeting the executing condition of the voting intelligent contract in the voting data, and uploading the voting data to a block chain corresponding to the project in the executing process of the voting intelligent contract;
and in the executing process of the voting intelligent contract, obtaining a voting result according to the voting data meeting the executing condition of the voting intelligent contract, and uploading the voting result to the block chain.
Optionally, before the step of obtaining the voting data submitted by the auditing group member of the project according to the project case generated in the project running process is executed, the method further includes:
creating the voting intelligence contract for the auditing group members to vote based on the project case;
uploading the voting intelligence contracts to the blockchain.
Optionally, before the step of determining whether the voting intelligence contract meets the execution condition based on the voting data is executed, after the step of obtaining the voting data submitted by the auditing group member of the project with respect to the project case generated in the project running process is executed, the method includes:
and determining the corresponding voting intelligent contract according to the voting data.
Optionally, the obtaining of voting data submitted by members of the audit team of the project with respect to the project case generated in the project operation process includes:
acquiring identity data of the auditing group members voting aiming at the project case generated in the project operation process;
obtaining the voting time of the auditing group members for voting aiming at the project case generated in the project operation process; and
and obtaining the voting content of the auditing group members for voting aiming at the project case generated in the project operation process.
Optionally, the determining whether the voting intelligence contract satisfies the execution condition based on the voting data includes:
judging whether the voting is from the auditing group members of the project or not based on the identity data, judging whether the voting times of the auditing group members do not exceed a preset threshold value or not and judging whether the voting time reaches a preset time limit of the voting effective time or not;
if the three conditions are all met, determining that the voting data meets the voting intelligent contract execution condition;
and if any one of the three conditions is not met, determining that the voting data does not meet the voting intelligent contract execution condition.
Optionally, the obtaining a voting result according to the voting data meeting the execution condition of the voting intelligence contract includes:
determining whether the voting content in the voting data is in favor or in opposition based on the voting data voting intelligence contract meeting the voting intelligence contract execution condition;
if the voting content is approved, adding 1 to the numerical value M of the approved votes;
if the voting content is against, the number value N of the anti-vote quantifier is added with 1;
if the positive vote quantity value M is larger than the negative vote quantity value N, determining the voting result as a positive result based on the voting intelligent contract;
if the positive vote count value M is less than the negative vote count value N, determining the voting result as a negative result based on the voting intelligent contract;
the vote count value M is the number of votes for which the voting content is votes, and the vote count value N is the number of votes for which the voting content is votes against.
The second voting method based on the block chain provided by the application comprises the following steps:
after the voting period of the project is finished, acquiring at least two pieces of voting data submitted by the auditing group members of the project aiming at the project case generated in the running process of the project;
determining whether a voting intelligence contract meets an execution condition based on the at least two pieces of voting data;
executing the voting intelligent contract on the voting data meeting the executing condition of the voting intelligent contract in the at least two pieces of voting data, and uploading the voting data meeting the executing condition of the voting intelligent contract to a block chain corresponding to the project in the executing process of the voting contract;
and in the executing process of the voting intelligent contract, obtaining a voting result according to the voting data meeting the executing condition of the voting intelligent contract, and uploading the voting result to the block chain.
Optionally, before the step of obtaining at least two voting data submitted by the auditing group member of the project for the project case generated in the project running process is executed, the method includes:
creating the voting intelligence contract for the auditing group members to vote based on the project case;
uploading the voting intelligence contracts to the blockchain.
Optionally, before the step of determining whether the voting intelligence contract satisfies the execution condition based on the at least two pieces of voting data is executed, after the step of obtaining at least two pieces of voting data submitted by the auditing group members of the project with respect to the project case generated in the running process of the project is executed, the method includes:
and determining the corresponding voting intelligence contract according to the at least two pieces of voting data.
Optionally, the obtaining at least two pieces of voting data submitted by the auditing group members of the project with respect to the project case generated in the project running process includes:
acquiring identity data of the auditing group members voting aiming at the project case generated in the project operation process;
obtaining the voting time of the auditing group members for voting aiming at the project case generated in the project operation process; and
and obtaining the voting content of the auditing group members for voting aiming at the project case generated in the project operation process.
Optionally, the determining whether the voting intelligence contract satisfies the execution condition based on the at least two pieces of voting data includes:
judging whether the voting is from the auditing group members of the project or not based on the identity data, judging whether the voting times of the auditing group members do not exceed a preset threshold value or not and judging whether the voting time reaches a preset time limit of the voting effective time or not;
if the three conditions are all met, determining that the at least two voting data meet the voting intelligent contract execution condition;
and if any one of the three conditions is not met, determining that the at least two pieces of voting data do not meet the voting intelligence contract execution condition.
Optionally, the obtaining a voting result according to the voting data meeting the execution condition of the voting intelligence contract includes:
determining whether the voting content in the voting data is in favor or in opposition based on the voting data voting intelligence contract meeting the voting intelligence contract execution condition;
if the voting content is approved, adding 1 to the numerical value M of the approved votes;
if the voting content is against, the number value N of the anti-vote quantifier is added with 1;
if the positive vote quantity value M is larger than the negative vote quantity value N, determining the voting result as a positive result based on the voting intelligent contract;
if the positive vote count value M is less than the negative vote count value N, determining the voting result as a negative result based on the voting intelligent contract;
the vote count value M is the number of votes for which the voting content is votes, and the vote count value N is the number of votes for which the voting content is votes against.
The present application further provides a voting system based on a block chain, including:
at least two blockchain nodes, wherein the at least two blockchain nodes comprise: project agency nodes and project service agency nodes;
the project agency mechanism node is configured to acquire voting data of a voting group member of a project for a project case generated in the project running process, determine whether a voting intelligent contract meets an execution condition based on the voting data, execute the voting intelligent contract on the voting data meeting the voting intelligent contract execution condition in the voting data, in the voting intelligent contract execution process, upload the voting data meeting the voting intelligent contract execution condition in the voting intelligent contract execution process to a block chain corresponding to the project, obtain a voting result according to the voting data meeting the voting intelligent contract execution condition, and upload the voting result to the block chain;
and the project service organization node is configured to acquire the voting result through the block chain and execute project operation according to the voting result.
Optionally, the voting system based on the block chain further includes:
a regulatory agency node configured to create the voting intelligence contract for the audit team members to vote based on the project case and upload the voting intelligence contract to the blockchain.
Optionally, the project agency node is further configured to:
creating the voting intelligence contract for the auditing group members to vote based on the project case;
and uploading the voting intelligence contracts to the block chain.
Optionally, the project service organization node is further configured to:
creating the voting intelligence contract for the auditing group members to vote based on the project case;
and uploading the voting intelligence contracts to the block chain.
The present application further provides a voting apparatus based on a block chain, including:
the acquisition module is configured to acquire voting data submitted by auditing group members of a project aiming at a project case generated in the running process of the project;
a decision module configured to determine whether a voting intelligence contract satisfies an execution condition based on the voting data;
the data uploading module is configured to execute the voting intelligent contract on voting data meeting the executing condition of the voting intelligent contract in the voting data, and in the executing process of the voting intelligent contract, the voting data is uploaded to a block chain corresponding to the project;
and the result uploading module is configured to obtain a voting result according to the voting data meeting the execution condition of the voting intelligent contract in the execution process of the voting intelligent contract and upload the voting result to the block chain.
The present application further provides a computing device comprising:
a memory and a processor;
the memory is to store computer-executable instructions, and the processor is to execute the computer-executable instructions to:
acquiring voting data submitted by auditing group members of a project aiming at a project case generated in the running process of the project;
determining whether a voting intelligence contract meets an execution condition based on the voting data;
executing the voting intelligent contract on the voting data meeting the executing condition of the voting intelligent contract in the voting data, and uploading the voting data to a block chain corresponding to the project in the executing process of the voting intelligent contract;
and in the executing process of the voting intelligent contract, obtaining a voting result according to the voting data meeting the executing condition of the voting intelligent contract, and uploading the voting result to the block chain.
The present application also provides a computer readable storage medium storing computer instructions that, when executed by a processor, implement the steps of the above two blockchain-based voting methods.
Compared with the prior art, the method has the following advantages:
the application provides a voting method, a device and a system based on a block chain, wherein the method comprises the following steps: acquiring voting data submitted by auditing group members of a project aiming at a project case generated in the running process of the project; determining whether a voting intelligence contract meets an execution condition based on the voting data; executing the voting intelligent contract on the voting data meeting the executing condition of the voting intelligent contract in the voting data, and uploading the voting data to a block chain corresponding to the project in the executing process of the voting intelligent contract; and in the executing process of the voting intelligent contract, obtaining a voting result according to the voting data meeting the executing condition of the voting intelligent contract, and uploading the voting result to the block chain.
According to the voting method based on the block chain, the voting data aiming at the project case in the project operation process of the auditing group members are obtained, the intelligent contract is executed to screen and count the voting data, and the voting data and the result are uploaded to the block chain, so that the fairness and justness of voting are ensured, the calculation efficiency of the voting result is improved, and the accuracy of the voting result is ensured.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. This application is capable of implementation in many different ways than those herein set forth and of similar import by those skilled in the art without departing from the spirit of this application and is therefore not limited to the specific implementations disclosed below.
The terminology used in the one or more embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of the present application. As used in one or more embodiments of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used in one or more embodiments of the present application refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It will be understood that, although the terms first, second, etc. may be used herein in one or more embodiments of the present application to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first can also be referred to as a second and, similarly, a second can also be referred to as a first without departing from the scope of one or more embodiments of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
The application provides a voting method based on a block chain, and also provides a second voting method based on the block chain, a voting device based on the block chain, a computing device and a computer readable storage medium. The following detailed description and the description of the steps of the method are individually made with reference to the drawings of the embodiments provided in the present application.
The embodiment of the voting method based on the block chain provided by the application is as follows:
referring to fig. 1, a flowchart of a voting method based on a block chain according to the present embodiment is shown.
Step S102, obtaining voting data submitted by the auditing group members of the project aiming at the project case generated in the running process of the project.
The items in the embodiment of the present application include insurance items, crowd funding items, investment items, and the like, which are not limited herein. The insurance includes health risks, serious risks, medical risks, nursing risks, accidental injury risks and the like. Accordingly, the project cases, including insurance cases, crowd-funding cases, investment cases, etc., are not limited herein.
In this embodiment, the audit group member refers to an audit group member participating in the project, and includes: the group members of insurance audit participating in the insurance project, the group members of crowd audit participating in the crowd audit project, the group members of investment audit participating in the investment project, and the like.
Taking insurance as an example, the auditing group members are selected from the insurers who join the insurance, specifically, after the insurers apply for joining the insurance auditing group, the insurers join the insurance auditing group member authentication of the insurance auditing group, and after passing the insurance auditing group member authentication of the insurance auditing group, the insurers join the insurance auditing group to become the health insurance auditing group members of the insurance; the project case is an insurance case which is generated by the participator in the insurance process and needs to apply for claim settlement.
In this embodiment of the present application, before obtaining voting data submitted by members of an audit team of a project with respect to a project case generated during the running of the project, the method further includes:
creating the voting intelligence contract for the auditing group members to vote based on the project case;
uploading the voting intelligence contracts to the blockchain.
The voting intelligent contract in the embodiment of the application is a computer protocol which is built in a block chain, and is an intelligent contract which is agreed by multiple parties such as a project agency mechanism, a project service mechanism and a supervision mechanism and is used for checking voting data and automatically executing statistical voting data to determine a voting result after meeting the execution conditions.
In this embodiment of the present application, obtaining voting data submitted by members of the audit team of the project with respect to the project case generated in the project operation process optionally includes:
acquiring identity data of the auditing group members voting aiming at the project case generated in the project operation process;
obtaining the voting time of the auditing group members for voting aiming at the project case generated in the project operation process; and
and obtaining the voting content of the auditing group members for voting aiming at the project case generated in the project operation process.
In addition, in the embodiment of the present application, the obtaining of the voting data of the auditing member of the project voting for the project case generated in the project running process may further include obtaining other data related to the voting, which is not limited herein.
For example, in a scenario where the project is an insurance-type project, an insurance audit group member is an insurance audit group member, an insurance participant applies for adding an insurance audit group of the insurance, and becomes an insurance audit group member of the insurance after passing the authentication of the insurance audit group, after contracting the voting intelligent contract of the insurance, the insurance agency, the insurance company, the supervision organization and the like of the insurance upload the voting intelligent contract to a block chain corresponding to the insurance, and after the insurance audit group member audits the insurance case generated in the insurance operation process, the voting data of the insurance audit group member is obtained, where the voting data includes the identity data, the voting time, and the voting content of the insurance audit group member.
Therefore, according to the embodiment of the application, after the auditing group members vote for the project case, the voting data of the auditing group members are automatically obtained, and the intelligent contract for checking the voting data and counting the voting results is established in advance, so that the voting process is standardized, the voting process is fairer and more fair, and the voting statistical efficiency is improved.
And step S104, determining whether the voting intelligence contract meets the execution condition based on the voting data.
After the voting data of the auditing group members are obtained, whether the voting intelligent contract meets the execution condition is determined based on the voting data.
Optionally, in this embodiment of the present application, before determining whether the voting intelligence contract satisfies the execution condition based on the voting data, and after obtaining the voting data submitted by the auditing group members of the project with respect to the project case generated during the running process of the project, the method includes:
and determining the corresponding voting intelligent contract according to the voting data.
In an optional implementation of the embodiment of the present application, the determining whether the voting intelligence contract satisfies the execution condition based on the voting data is implemented by:
judging whether the voting is from the auditing group members of the project or not based on the identity data, judging whether the voting times of the auditing group members do not exceed a preset threshold value or not and judging whether the voting time reaches a preset time limit of the voting effective time or not;
if the three conditions are all met, determining that the voting data meets the voting intelligent contract execution condition;
and if any one of the three conditions is not met, determining that the voting data does not meet the voting intelligent contract execution condition.
In addition, the determination of whether the voting intelligence contract execution condition is satisfied based on the voting data may also be implemented in other manners, for example, the historical voting record of the auditing group members is determined, which is not limited herein, and meanwhile, the determination order of the three conditions may also be adjusted according to the actual situation, and the number that needs to be satisfied may also be specified according to the actual situation, which is not limited herein.
For example, after obtaining the voting data of the insurance audit team members, determining whether the voting intelligent contract meets the execution condition based on the voting data, specifically, determining whether the vote is from the insurance audit team members of the insurance based on the identity data, determining whether the voting number of the insurance audit team members does not exceed a preset threshold (1 time), and determining whether the voting time passes a preset time limit of the voting effective time, if the vote is from the insurance audit team members, the voting number of the insurance audit team members is 1 time, the preset time limit of the voting effective time is 1 month to 1 month 10 days, and the voting time is 1 month 2 days, all the three conditions are met, and determining that the voting data meets the execution condition of the voting intelligent contract.
According to the method and the device, whether the voting data meet the execution condition of the voting intelligent contract or not is judged, the voting data are screened while the execution time of the voting intelligent contract is determined, the voting of the auditing group members which are not positive or have low voting quality is not adopted, the fairness and the justness of project voting are ensured, and the occurrence of low-quality voting condition is avoided.
Step S106, the voting intelligent contract is executed for the voting data meeting the executing condition of the voting intelligent contract in the voting data, and the voting data is uploaded to the block chain corresponding to the project in the executing process of the voting intelligent contract.
After determining whether the voting intelligent contract meets the execution condition based on the voting data, executing the voting intelligent contract on the voting data meeting the voting intelligent contract execution condition in the voting data, and uploading the voting data to a block chain corresponding to the project in the executing process of the voting intelligent contract.
For example, after the voting data meeting the execution condition of the voting smart contract is determined, the voting smart contract is executed on the voting data meeting the execution condition of the voting contract in the voting data, and the voting data is uploaded to the block chain corresponding to the insurance in the process of executing the voting smart contract.
The voting data are uploaded to the block chain, so that the data are not tampered and safe, the fairness of the voting process is guaranteed, the automatic execution after the execution conditions are judged through the voting intelligent contract is carried out, the carrying speed of the voting process is increased, the process of manually participating in voting is omitted, and the cost is saved.
And step S108, in the executing process of the voting intelligent contract, obtaining a voting result according to the voting data meeting the executing condition of the voting intelligent contract, and uploading the voting result to the block chain.
After the voting data meeting the executing conditions of the voting intelligent contract are determined, the voting result is obtained according to the voting data meeting the executing conditions of the voting intelligent contract, and the voting result is uploaded to the block chain.
In an optional implementation of the embodiment of the present application, the obtaining of the voting result according to the voting data meeting the execution condition of the voting intelligence contract is implemented by:
determining whether the voting content in the voting data is in favor or in opposition based on the voting data voting intelligence contract meeting the voting intelligence contract execution condition;
if the voting content is approved, adding 1 to the numerical value M of the approved votes;
if the voting content is against, the number value N of the anti-vote quantifier is added with 1;
if the positive vote quantity value M is larger than the negative vote quantity value N, determining the voting result as a positive result based on the voting intelligent contract;
if the positive vote count value M is less than the negative vote count value N, determining the voting result as a negative result based on the voting intelligent contract;
the vote count value M is the number of votes for which the voting content is votes, and the vote count value N is the number of votes for which the voting content is votes against.
In practical applications, the initial values of the positive vote quantity value M and the negative vote quantity value N may be 0, or may be any other preset values, which are not limited herein, and the positive vote quantity value M and the negative vote quantity value N change with the corresponding votes during the voting process.
The method and the device have the advantages that the voting result is counted and determined through the intelligent contract, the efficiency and the correctness of the voting calculation process are guaranteed, meanwhile, the voting result is uploaded to the block chain, and the non-tampering property and the safety of the voting result data are guaranteed.
For example, after the voting data is uploaded to the block chain corresponding to the insurance, the voting intelligence contract determines whether the voting content is approved or disapproved according to the voting data meeting the execution condition of the voting intelligence contract, if the voting content is approved, the approved-vote-quantity-counting numerical value M (the initial value is 0) is added by 1, if the voting content is disapproved, the disapproved-vote-quantity-counting numerical value N (the initial value is 0) is added by 1, and so on, each piece of voting data meeting the execution condition of the voting intelligence contract is determined, and finally, the approved-vote-quantity-counting numerical value M is greater than the disapproved-vote-quantity-counting numerical value, the result is approved, and the insurer of the insurance can read the voting result from the block chain and settle the claims for the insurer of the insurance case corresponding to the voting result.
The block chain based voting method provided by the present application is further described below with reference to fig. 2, taking an application of the block chain based voting method provided by the present application in an insurance scenario as an example, where the method includes steps S202 to S224.
In step S202, voting data is acquired.
In a scene that a project is an insurance project, an insurance audit group member is an insurance audit group member, an insurance participant applies for adding an insurance audit group of the insurance, and becomes an insurance audit group member of the insurance after passing the authentication of the insurance audit group, after contracting a voting intelligent contract of the insurance, an insurance agency, an insurance company, a supervision organization and the like of the insurance upload the voting intelligent contract to a block chain corresponding to the insurance, and after the insurance audit group member audits an insurance case generated in the insurance operation process, voting data of the insurance audit group member is obtained, wherein the voting data comprises identity data, voting time and voting content of the insurance audit group member.
And step S204, judging whether the voting intelligence contract meets the execution condition based on the voting data.
After the voting data of the insurance audit team members is obtained in step S202, it is determined whether the voting intelligent contract meets the execution condition based on the voting data, specifically, it is determined whether the vote is from the insurance audit team members of the insurance based on the identity data, it is determined whether the voting number of times of the insurance audit team members does not exceed a preset threshold (1 time) and it is determined whether the voting time has passed a preset time limit of the voting effective time, if the vote is from the insurance audit team members, the voting number of times of the insurance audit team members is 1 time, the preset time limit of the voting effective time is 1 month 1 day to 1 month 10 days, and the voting time is 1 month 2 days, then all the three conditions are met, step S208 is executed, and if any one of the three conditions is not met, step S206 is executed.
In step S206, the voting intelligence contract need not be executed.
After the step S204 is executed, it is determined that the voting data does not satisfy the voting intelligence contract execution condition, and the voting intelligence contract does not need to be executed.
Step S208, upload the voting data to the blockchain.
After the voting data is determined to meet the voting intelligence contract execution condition in the step S204, executing the voting intelligence contract on the voting data meeting the voting intelligence contract execution condition in the voting data, and uploading the voting data to the block chain corresponding to the project in the process of executing the voting intelligence contract.
Step S210, determining a voting result according to the voting data.
After the voting data are uploaded to the block chain corresponding to the insurance, the voting intelligent contract judges whether the voting content is approved or disapproved according to the voting data meeting the execution conditions of the voting intelligent contract, if the voting content is approved, the voting result is approved, and if the voting content is disapproved, the voting result is disapproved.
In step S212, whether the voting result is approval or not.
And judging whether the voting result is approval, executing the step S216 when the voting result is approval, and executing the step S214 when the voting result is disapproval.
Step S214, add 1 to the number of anti-tickets.
When the voting result is negative, the negative vote quantifier value N (initial value is 0) is added with 1.
In step S216, the number of votes approved is increased by 1.
When the voting result is positive, the number value M (the initial value is 0) of the positive votes is added with 1.
In step S218, whether the voting validity period ends.
And judging whether the preset time limit of the voting valid time is finished, if so, executing the step S220, otherwise, returning to the step S202.
In step S220, whether the number of positive tickets is greater than the number of negative tickets.
If the voting validity time is over, determining whether the positive vote number M is greater than the negative vote number N, if the positive vote number value M is greater than the negative vote number value N, executing step S224, and if the positive vote number value M is less than the negative vote number value N, executing step S222.
In step S222, the claim is objected to.
If finally the positive vote count value M is less than the negative vote count value N, a claim is negative and a negative claim decision is uploaded to the blockchain.
In step S224, the claim is approved.
If finally the positive vote quantity value M is larger than the negative vote quantity value N, the claim is approved and the decision of the claim approval is uploaded to the block chain. When the insurance company reads the approval claim decision from the block chain, the insurance file refers to the participant for claim.
According to the embodiment of the application, the voting data of the members of the insurance audit group are acquired, the insurance audit group votes the insurance cases of the insured person, the voting result is determined by executing the voting intelligent contract, and the voting data and the voting result are uploaded to the block chain corresponding to the insurance, so that supervision and audit are facilitated, fairness and justness of the voting process are guaranteed, and meanwhile the voting counting efficiency is improved.
Referring to fig. 3, it shows a flowchart of a second block chain-based voting method provided in this embodiment of the application.
Step S302, after the voting period of the project is finished, at least two pieces of voting data submitted by the auditing group members of the project aiming at the project case generated in the running process of the project are obtained.
And after the preset voting period of the project is finished, acquiring at least two pieces of voting data submitted by the auditing group members of the project aiming at the project case generated in the running process of the project. In this step, after a preset voting period of the project, voting data of the auditing group members are collectively acquired, the number of the voting data is at least two, and is not specifically limited, and the voting period may be one week or one month, and is not limited herein.
In an optional implementation of the embodiment of the present application, before acquiring at least two pieces of voting data submitted by members of an audit team of the project with respect to the project case generated in the process of operating the project, the method includes:
creating the voting intelligence contract for the auditing group members to vote based on the project case;
uploading the voting intelligence contracts to the blockchain.
In the embodiment of the present application, obtaining voting data for voting by a member of an audit team of a project on a project case generated in a running process of the project includes:
acquiring identity data of the auditing group members voting aiming at the project case generated in the project operation process;
and obtaining the voting content of the auditing group members for voting aiming at the project case generated in the project operation process.
Step S304, whether the voting intelligence contract meets the execution condition is determined based on the at least two pieces of voting data.
In an optional implementation of the embodiment of the present application, the determining whether the voting intelligence contract satisfies the execution condition based on the at least two pieces of voting data includes:
judging whether the vote is from the auditing group members of the project based on the identity data and judging whether the voting times of the auditing group members do not exceed a preset threshold value;
if the two conditions are both yes, the at least two pieces of voting data meet the voting intelligent contract execution condition;
and if any one of the two conditions is negative, the at least two pieces of voting data do not meet the voting intelligence contract execution condition.
Step S306, executing the voting intelligent contract on the voting data meeting the executing condition of the voting intelligent contract in the at least two pieces of voting data, and uploading the voting data meeting the executing condition of the voting intelligent contract to the block chain corresponding to the project in the executing process of the voting contract.
After the voting data meeting the voting intelligent contract execution condition in the at least two pieces of voting data are determined, executing the voting intelligent contract on the voting data meeting the voting intelligent contract execution condition, and uploading the voting data meeting the voting intelligent contract execution condition to a block chain corresponding to the project in the voting intelligent contract execution process.
According to the embodiment of the application, the voting data meeting the executing condition of the voting intelligent contract is uploaded to the block chain corresponding to the project, and not all the voting data are uploaded to the block chain.
Step S308, in the executing process of the voting intelligent contract, obtaining a voting result according to the voting data meeting the executing condition of the voting intelligent contract, and uploading the voting result to the block chain.
According to the embodiment of the application, after the preset project voting period is finished, the voting data of the auditing group members are subjected to unified summarizing processing, the voting time is saved, the calculation amount of data processing is reduced, the process of screening the voting data for multiple times is avoided, meanwhile, the fairness and justness of the voting process are guaranteed through the block chain, and the labor cost is saved.
Referring to fig. 4, a voting system based on a block chain according to an embodiment of the present application further includes:
at least two blockchain nodes, wherein the at least two blockchain nodes comprise: project broker node 402 and project service broker node 404;
the project agency mechanism node 402 is configured to acquire voting data of an audit group member of a project voting for a project case generated in a project running process, determine whether a voting intelligence contract meets an execution condition based on the voting data, execute the voting intelligence contract on the voting data meeting the voting intelligence contract execution condition in the voting data, in the voting intelligence contract execution process, upload the voting data meeting the voting intelligence contract execution condition in the voting intelligence contract execution process to a block chain corresponding to the project, obtain a voting result according to the voting data meeting the voting intelligence contract execution condition, and upload the voting result to the block chain;
the project service organization node 404 is configured to obtain the voting result through the block chain, and execute project operation according to the voting result.
Optionally, the voting system based on the block chain further includes:
a regulatory agency node configured to create the voting intelligence contract for the audit team members to vote based on the project case and upload the voting intelligence contract to the blockchain.
Optionally, the project agency node 402 is further configured to:
creating the voting intelligence contract for the auditing group members to vote based on the project case;
and uploading the voting intelligence contracts to the block chain.
Optionally, the project service organization node 404 is further configured to:
creating the voting intelligence contract for the auditing group members to vote based on the project case;
and uploading the voting intelligence contracts to the block chain.
In practical applications, the project case is uploaded to the block chain through the project service mechanism 404, and voted by the audit team members, the block chain uploaded by the project agent mechanism 402 is used for voting data, the project agent mechanism 402 determines a voting result through the voting intelligence contract, and the project service mechanism 404 can read the voting result through the block chain, and at the same time, the supervision mechanism can supervise the above process through the block chain.
Since the system embodiment is basically similar to the method embodiment, the description is simple, and the relevant portions only need to refer to the corresponding description of the embodiment of the voting method based on the block chain provided above.
According to the embodiment of the application, through the block chain for uploading the data and the result generated in the voting process, the data and the result can not be tampered, meanwhile, a supervision mechanism or other organizations can conveniently monitor and check the voting process and the data, the fairness and the fairness of voting are realized, and the possibility that the voting result is maliciously tampered or maliciously voted is not discovered is avoided.
The embodiment of the voting device based on the block chain provided by the embodiment of the application is as follows:
referring to fig. 5, a schematic diagram of an embodiment of a voting device based on a block chain provided in the present application is shown.
In the foregoing embodiment, a voting method based on a block chain is provided, and accordingly, a voting apparatus based on a block chain is also provided in the present application, which is described below with reference to fig. 5.
Since the apparatus embodiments are substantially similar to the method embodiments, they are described in a relatively simple manner, and reference may be made to the corresponding description of the method embodiments provided above for relevant portions. The device embodiments described below are merely illustrative.
The application provides a voting device based on a block chain, which comprises:
an obtaining module 502, configured to obtain voting data submitted by auditing group members of a project with respect to a project case generated in the running process of the project;
a decision module 504 configured to determine whether the voting intelligence contract satisfies an execution condition based on the voting data;
a data uploading module 506, configured to execute the voting intelligence contract on the voting data meeting the voting intelligence contract execution condition in the voting data, and upload the voting data to the block chain corresponding to the project in the voting intelligence contract execution process;
and a result uploading module 508 configured to, in the voting smart contract execution process, obtain a voting result according to the voting data meeting the voting smart contract execution condition, and upload the voting result to the block chain.
Optionally, the voting apparatus based on the block chain further includes:
a creation module configured to create the voting intelligence contract for the audit team members to vote based on the project case;
a smart contract upload module configured to upload the voting smart contracts to the blockchain.
Optionally, the voting apparatus based on the block chain further includes:
and the intelligent contract determining module is configured to determine the corresponding voting intelligent contract according to the voting data.
Optionally, the obtaining module 502 includes:
the identity data acquisition submodule is configured to acquire identity data of voting performed by the auditing group members aiming at the project case generated in the project operation process;
the voting time acquisition submodule is configured to acquire the voting time of the auditing group members for voting for the project case generated in the project operation process; and
and the voting content acquisition submodule is configured to acquire the voting content voted by the auditing group members for the project case generated in the project operation process.
Optionally, the determining module 504 includes:
the judging submodule is configured to judge whether the voting is from the auditing group members of the project based on the identity data, judge whether the voting times of the auditing group members do not exceed a preset threshold value and judge whether the voting time reaches a preset time limit of the voting effective time; if all the three conditions are met, executing the voting intelligent contract to meet the sub-module, and if any one of the three conditions is not met, executing the voting intelligent contract to not meet the sub-module;
the voting intelligent contract satisfaction submodule is configured to determine that the voting data meets the voting intelligent contract execution condition;
the voting intelligence contract unsatisfying submodule is configured to determine that the voting data does not satisfy the voting intelligence contract execution condition.
Optionally, the result uploading module 508 includes:
a voting content judgment sub-module configured to judge whether the voting content in the voting data is in favor or in opposition based on the voting data voting smart contract meeting the voting smart contract execution condition; if the voting content is approved, executing an approved vote increasing submodule, and if the voting content is objected, executing an objected vote increasing submodule;
the vote approval increment submodule is configured to add 1 to the vote count value M;
the anti-vote increment submodule is configured to add 1 to an anti-vote quantifier value N;
if the positive vote quantity value M is larger than the negative vote quantity value N, executing a positive result determining submodule, and if the positive vote quantity value M is smaller than the negative vote quantity value N, executing a negative result determining submodule;
the vote result determining submodule is configured to determine that the voting result is a vote result based on the voting intelligence contract;
the objection result determination submodule is configured to determine that the voting result is an objection result based on the voting intelligence contract;
the vote count value M is the number of votes for which the voting content is votes, and the vote count value N is the number of votes for which the voting content is votes against.
According to the voting device based on the block chain, the voting data aiming at the project case in the project operation process of the auditing group members are obtained, the intelligent contract is executed to screen and count the voting data, and the voting data and the result are uploaded to the block chain, so that the fairness and justness of voting are ensured, the calculation efficiency of the voting result is improved, and the accuracy of the voting result is ensured.
The embodiment of the computing device provided by the application is as follows:
FIG. 6 is a block diagram illustrating a configuration of a computing device 600 according to an embodiment of the present application. The components of the computing device 600 include, but are not limited to, a memory 610 and a processor 620. The processor 620 is coupled to the memory 610 via a bus 630 and a database 650 is used to store data.
Computing device 600 also includes access device 640, access device 640 enabling computing device 600 to communicate via one or more networks 660. Examples of such networks include the 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. Access device 640 may include one or more of any type of network interface (e.g., a Network Interface Card (NIC)) whether wired or wireless, such as an IEEE802.11 Wireless Local Area Network (WLAN) wireless interface, a worldwide interoperability for microwave access (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 forth.
In one embodiment of the present application, the above-described components of computing device 600, as well as other components not shown in FIG. 6, may also be connected to each other, such as by a bus. It should be understood that the block diagram of the computing device architecture shown in FIG. 6 is for purposes of example only and is not limiting as to the scope of the present application. Those skilled in the art may add or replace other components as desired.
Computing device 600 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., tablet, personal digital assistant, laptop, notebook, netbook, etc.), mobile phone (e.g., smartphone), wearable computing device (e.g., smartwatch, smartglasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop computer or PC. Computing device 600 may also be a mobile or stationary server.
The present application provides a computing device comprising a memory 610, a processor 620, and computer instructions stored on the memory and executable on the processor, the processor 620 being configured to execute the following computer-executable instructions:
acquiring voting data submitted by auditing group members of a project aiming at a project case generated in the running process of the project;
determining whether a voting intelligence contract meets an execution condition based on the voting data;
executing the voting intelligent contract on the voting data meeting the executing condition of the voting intelligent contract in the voting data, and uploading the voting data to a block chain corresponding to the project in the executing process of the voting intelligent contract;
and in the executing process of the voting intelligent contract, obtaining a voting result according to the voting data meeting the executing condition of the voting intelligent contract, and uploading the voting result to the block chain.
Optionally, before the step of obtaining the voting data submitted by the auditing group member of the project according to the project case generated in the project running process is executed, the method further includes:
creating the voting intelligence contract for the auditing group members to vote based on the project case;
uploading the voting intelligence contracts to the blockchain.
Optionally, before the step of determining whether the voting intelligence contract meets the execution condition based on the voting data is executed, after the step of obtaining the voting data submitted by the auditing group member of the project with respect to the project case generated in the project running process is executed, the method includes:
and determining the corresponding voting intelligent contract according to the voting data.
Optionally, the obtaining of voting data submitted by members of the audit team of the project with respect to the project case generated in the project operation process includes:
acquiring identity data of the auditing group members voting aiming at the project case generated in the project operation process;
obtaining the voting time of the auditing group members for voting aiming at the project case generated in the project operation process; and
and obtaining the voting content of the auditing group members for voting aiming at the project case generated in the project operation process.
Optionally, the determining whether the voting intelligence contract satisfies the execution condition based on the voting data includes:
judging whether the voting is from the auditing group members of the project or not based on the identity data, judging whether the voting times of the auditing group members do not exceed a preset threshold value or not and judging whether the voting time reaches a preset time limit of the voting effective time or not;
if the three conditions are all met, determining that the voting data meets the voting intelligent contract execution condition;
and if any one of the three conditions is not met, determining that the voting data does not meet the voting intelligent contract execution condition.
Optionally, the obtaining a voting result according to the voting data meeting the execution condition of the voting intelligence contract includes:
determining whether the voting content in the voting data is in favor or in opposition based on the voting data voting intelligence contract meeting the voting intelligence contract execution condition;
if the voting content is approved, adding 1 to the numerical value M of the approved votes;
if the voting content is against, the number value N of the anti-vote quantifier is added with 1;
if the positive vote quantity value M is larger than the negative vote quantity value N, determining the voting result as a positive result based on the voting intelligent contract;
if the positive vote count value M is less than the negative vote count value N, determining the voting result as a negative result based on the voting intelligent contract;
the vote count value M is the number of votes for which the voting content is votes, and the vote count value N is the number of votes for which the voting content is votes against.
In one embodiment of the present application, the processor 620 is further configured to execute the following computer-executable instructions:
after the voting period of the project is finished, acquiring at least two pieces of voting data submitted by the auditing group members of the project aiming at the project case generated in the running process of the project;
determining whether a voting intelligence contract meets an execution condition based on the at least two pieces of voting data;
executing the voting intelligent contract on the voting data meeting the executing condition of the voting intelligent contract in the at least two pieces of voting data, and uploading the voting data meeting the executing condition of the voting intelligent contract to a block chain corresponding to the project in the executing process of the voting contract;
and in the executing process of the voting intelligent contract, obtaining a voting result according to the voting data meeting the executing condition of the voting intelligent contract, and uploading the voting result to the block chain.
Optionally, before the step of obtaining at least two voting data submitted by the auditing group member of the project for the project case generated in the project running process is executed, the method includes:
creating the voting intelligence contract for the auditing group members to vote based on the project case;
uploading the voting intelligence contracts to the blockchain.
Optionally, before the step of determining whether the voting intelligence contract satisfies the execution condition based on the at least two pieces of voting data is executed, after the step of obtaining at least two pieces of voting data submitted by the auditing group members of the project with respect to the project case generated in the running process of the project is executed, the method includes:
and determining the corresponding voting intelligence contract according to the at least two pieces of voting data.
Optionally, the obtaining at least two pieces of voting data submitted by the auditing group members of the project with respect to the project case generated in the project running process includes:
acquiring identity data of the auditing group members voting aiming at the project case generated in the project operation process;
obtaining the voting time of the auditing group members for voting aiming at the project case generated in the project operation process; and
and obtaining the voting content of the auditing group members for voting aiming at the project case generated in the project operation process.
Optionally, the determining whether the voting intelligence contract satisfies the execution condition based on the at least two pieces of voting data includes:
judging whether the voting is from the auditing group members of the project or not based on the identity data, judging whether the voting times of the auditing group members do not exceed a preset threshold value or not and judging whether the voting time reaches a preset time limit of the voting effective time or not;
if the three conditions are all met, determining that the at least two voting data meet the voting intelligent contract execution condition;
and if any one of the three conditions is not met, determining that the at least two pieces of voting data do not meet the voting intelligence contract execution condition.
Optionally, the obtaining a voting result according to the voting data meeting the execution condition of the voting intelligence contract includes:
determining whether the voting content in the voting data is in favor or in opposition based on the voting data voting intelligence contract meeting the voting intelligence contract execution condition;
if the voting content is approved, adding 1 to the numerical value M of the approved votes;
if the voting content is against, the number value N of the anti-vote quantifier is added with 1;
if the positive vote quantity value M is larger than the negative vote quantity value N, determining the voting result as a positive result based on the voting intelligent contract;
if the positive vote count value M is less than the negative vote count value N, determining the voting result as a negative result based on the voting intelligent contract;
the vote count value M is the number of votes for which the voting content is votes, and the vote count value N is the number of votes for which the voting content is votes against.
The embodiment of a computer-readable storage medium provided by the application is as follows:
embodiments of the present application also provide a computer-readable storage medium storing computer instructions, which when executed by a processor, are configured to:
acquiring voting data submitted by auditing group members of a project aiming at a project case generated in the running process of the project;
determining whether a voting intelligence contract meets an execution condition based on the voting data;
executing the voting intelligent contract on the voting data meeting the executing condition of the voting intelligent contract in the voting data, and uploading the voting data to a block chain corresponding to the project in the executing process of the voting intelligent contract;
and in the executing process of the voting intelligent contract, obtaining a voting result according to the voting data meeting the executing condition of the voting intelligent contract, and uploading the voting result to the block chain.
Optionally, before the step of obtaining the voting data submitted by the auditing group member of the project according to the project case generated in the project running process is executed, the method further includes:
creating the voting intelligence contract for the auditing group members to vote based on the project case;
uploading the voting intelligence contracts to the blockchain.
Optionally, before the step of determining whether the voting intelligence contract meets the execution condition based on the voting data is executed, after the step of obtaining the voting data submitted by the auditing group member of the project with respect to the project case generated in the project running process is executed, the method includes:
and determining the corresponding voting intelligent contract according to the voting data.
Optionally, the obtaining of voting data submitted by members of the audit team of the project with respect to the project case generated in the project operation process includes:
acquiring identity data of the auditing group members voting aiming at the project case generated in the project operation process;
obtaining the voting time of the auditing group members for voting aiming at the project case generated in the project operation process; and
and obtaining the voting content of the auditing group members for voting aiming at the project case generated in the project operation process.
Optionally, the determining whether the voting intelligence contract satisfies the execution condition based on the voting data includes:
judging whether the voting is from the auditing group members of the project or not based on the identity data, judging whether the voting times of the auditing group members do not exceed a preset threshold value or not and judging whether the voting time reaches a preset time limit of the voting effective time or not;
if the three conditions are all met, determining that the voting data meets the voting intelligent contract execution condition;
and if any one of the three conditions is not met, determining that the voting data does not meet the voting intelligent contract execution condition.
Optionally, the obtaining a voting result according to the voting data meeting the execution condition of the voting intelligence contract includes:
determining whether the voting content in the voting data is in favor or in opposition based on the voting data voting intelligence contract meeting the voting intelligence contract execution condition;
if the voting content is approved, adding 1 to the numerical value M of the approved votes;
if the voting content is against, the number value N of the anti-vote quantifier is added with 1;
if the positive vote quantity value M is larger than the negative vote quantity value N, determining the voting result as a positive result based on the voting intelligent contract;
if the positive vote count value M is less than the negative vote count value N, determining the voting result as a negative result based on the voting intelligent contract;
the vote count value M is the number of votes for which the voting content is votes, and the vote count value N is the number of votes for which the voting content is votes against.
In embodiments provided herein, the instructions are further executable by the processor to:
after the voting period of the project is finished, acquiring at least two pieces of voting data submitted by the auditing group members of the project aiming at the project case generated in the running process of the project;
determining whether a voting intelligence contract meets an execution condition based on the at least two pieces of voting data;
executing the voting intelligent contract on the voting data meeting the executing condition of the voting intelligent contract in the at least two pieces of voting data, and uploading the voting data meeting the executing condition of the voting intelligent contract to a block chain corresponding to the project in the executing process of the voting contract;
and in the executing process of the voting intelligent contract, obtaining a voting result according to the voting data meeting the executing condition of the voting intelligent contract, and uploading the voting result to the block chain.
Optionally, before the step of obtaining at least two voting data submitted by the auditing group member of the project for the project case generated in the project running process is executed, the method includes:
creating the voting intelligence contract for the auditing group members to vote based on the project case;
uploading the voting intelligence contracts to the blockchain.
Optionally, before the step of determining whether the voting intelligence contract satisfies the execution condition based on the at least two pieces of voting data is executed, after the step of obtaining at least two pieces of voting data submitted by the auditing group members of the project with respect to the project case generated in the running process of the project is executed, the method includes:
and determining the corresponding voting intelligence contract according to the at least two pieces of voting data.
Optionally, the obtaining at least two pieces of voting data submitted by the auditing group members of the project with respect to the project case generated in the project running process includes:
acquiring identity data of the auditing group members voting aiming at the project case generated in the project operation process;
obtaining the voting time of the auditing group members for voting aiming at the project case generated in the project operation process; and
and obtaining the voting content of the auditing group members for voting aiming at the project case generated in the project operation process.
Optionally, the determining whether the voting intelligence contract satisfies the execution condition based on the at least two pieces of voting data includes:
judging whether the voting is from the auditing group members of the project or not based on the identity data, judging whether the voting times of the auditing group members do not exceed a preset threshold value or not and judging whether the voting time reaches a preset time limit of the voting effective time or not;
if the three conditions are all met, determining that the at least two voting data meet the voting intelligent contract execution condition;
and if any one of the three conditions is not met, determining that the at least two pieces of voting data do not meet the voting intelligence contract execution condition.
Optionally, the obtaining a voting result according to the voting data meeting the execution condition of the voting intelligence contract includes:
determining whether the voting content in the voting data is in favor or in opposition based on the voting data voting intelligence contract meeting the voting intelligence contract execution condition;
if the voting content is approved, adding 1 to the numerical value M of the approved votes;
if the voting content is against, the number value N of the anti-vote quantifier is added with 1;
if the positive vote quantity value M is larger than the negative vote quantity value N, determining the voting result as a positive result based on the voting intelligent contract;
if the positive vote count value M is less than the negative vote count value N, determining the voting result as a negative result based on the voting intelligent contract;
the vote count value M is the number of votes for which the voting content is votes, and the vote count value N is the number of votes for which the voting content is votes against.
The above is an illustrative scheme of a computer-readable storage medium of the present embodiment. It should be noted that the technical solution of the storage medium and the above-mentioned technical solutions of the voting method based on the block chain and the second voting method based on the block chain belong to the same concept, and details that are not described in detail in the technical solutions of the storage medium can be referred to the description of the technical solutions of the two voting methods based on the block chain.
The computer instructions comprise computer program code which may be in the form of source code, object code, an executable file or some intermediate form, or the like. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
It should be noted that, for the sake of simplicity, the above-mentioned method embodiments are described as a series of acts or combinations, but those skilled in the art should understand that the present application is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
The preferred embodiments of the present application disclosed above are intended only to aid in the explanation of the application. Alternative embodiments are not exhaustive and do not limit the invention to the precise embodiments described. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the application and its practical applications, to thereby enable others skilled in the art to best understand and utilize the application. The application is limited only by the claims and their full scope and equivalents.