CN114285552A - Block chain-based N-th power voting method and device - Google Patents

Block chain-based N-th power voting method and device Download PDF

Info

Publication number
CN114285552A
CN114285552A CN202111500085.6A CN202111500085A CN114285552A CN 114285552 A CN114285552 A CN 114285552A CN 202111500085 A CN202111500085 A CN 202111500085A CN 114285552 A CN114285552 A CN 114285552A
Authority
CN
China
Prior art keywords
voting
information
intelligent contract
project
class
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111500085.6A
Other languages
Chinese (zh)
Other versions
CN114285552B (en
Inventor
王林东
何彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Jiansu Network Technology Co ltd
Original Assignee
Shanghai Jiansu Network Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Jiansu Network Technology Co ltd filed Critical Shanghai Jiansu Network Technology Co ltd
Priority to CN202111500085.6A priority Critical patent/CN114285552B/en
Publication of CN114285552A publication Critical patent/CN114285552A/en
Application granted granted Critical
Publication of CN114285552B publication Critical patent/CN114285552B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

A block chain-based N-power voting method and device comprise the following steps: receiving a request for deploying voting project intelligent contract information, and generating factory intelligent contract information matched with the voting-like by a first code executor; the second code executor obtains a project voting request of an initiator client, and constructs project intelligent contract information corresponding to the project voting by using the factory intelligent contract information; and when the triggering condition of voting is met, starting the project intelligent contract, receiving voting requests of a plurality of voting party clients, generating and outputting the third code information, completing the voting process and improving the voting efficiency.

Description

Block chain-based N-th power voting method and device
Technical Field
The present invention relates to a block chain technology, and in particular, to a block chain-based N-th power voting method and apparatus.
Background
Blockchain 2.0 is a second generation programmable blockchain whose main feature is to allow the user to write more sophisticated and intelligent protocols, so-called intelligent contracts. Due to the characteristics of the blockchain, such as difficulty in tampering and data disclosure, the intelligent contract with problems cannot be repaired in time, and huge loss is caused, so that strict security audit before deployment of the intelligent contract becomes important.
The current mainstream intelligent contract security auditing scheme is formal verification, and the contract implementation is proved to meet expectations through mathematical logic derivation. The voting intelligent contract is used as a common contract application field, and the key premise of ensuring the fairness and fairness of voting business is to verify and audit the safety of the voting intelligent contract through a form. At present, an intelligent contract development community has no security standard corresponding to a voting service, so that security holes are easy to appear in the development of a voting intelligent contract, a set of general intelligent contract form verification methods related to a voting process is needed, and development reference and security standards are provided for the development of the voting intelligent contract. Hangzhou interest chain technology limited company 201911088334.8 discloses a form verification method for voting intelligent contracts, which specifically comprises the following steps: (1) defining a voting intelligent contract for realizing the function of voting to a specified candidate party according to a defined flow and a defined authority;
the definition includes: data structures of candidate parties and voters, state variables, modifiers for checking contract owners and voting flows, and common functions of voting-related services; the data structure of the candidate party at least comprises two fields of a main key and a vote number, and the data structure of the voter at least comprises two fields of a main key and whether to vote or not; the state variables are arrays and mappings for recording the information of contract owners, voting flows, candidate parties and voters; the public function comprises a contract owner managing a candidate party and a voter information function in a correct voting process, a contract owner managing a voting process function in a correct voting process, anyone with voting rights performing a voting function on a specified candidate party in a correct voting process, a related party checking a voting result function in a correct voting process, and a related party inquiring the candidate party and the voter information function in a correct voting process; the modifier comprises a contract owner modifier for checking whether the contract owner is the contract owner and a voting process modifier for checking whether the contract owner is in a correct voting process, wherein the contract owner modifier is used for modifying the functions of the contract owner, namely, managing the candidate party and the voter information function in the correct voting process and managing the voting process function in the correct voting process; the voting process modifier acts on all functions; when defining, defining data structures, state variables, modifiers for checking contract owners and voting processes and public functions of voting related services of candidate parties and voters in sequence;
(2) and defining formal verification specifications for describing functions of the voting intelligent contract, and defining exceptions, return values and specifications of state variables of each voting related function in the intelligent contract. The method is realized based on a software formal verification method, a safe formal specification is designed and established based on the voting service, and the safe formal specification is converted into a mathematical model which can be formally verified, so that the safety of the voting intelligent contract is improved.
The scheme does improve the security of the voting intelligence contract, but the voting efficiency is not improved.
The one-person-one-vote mechanism gives indifferent people the same voting right and makes the concerned parties with a large influence on the voting result lose the possibility of further influencing the result. The one-vote mechanism makes the average voting cost of the wealthy as that of the ordinary person, which is unfair. The voting principle of the power of N:
Figure BDA0003401239270000021
c is the total ticket number;
pia voting cost for the ith individual;
n is the number of people participating in the vote;
n is the square root of the order of N;
as shown in fig. 1, which is a graph of the cost paid for a single person vote. The horizontal axis is paid cost, and the vertical axis is obtained ticket number; the three lines of blue, red and green (the uppermost line, the second line and the lowermost line) respectively represent the cases when N is 1, 2 and 3, and the cost for a single voter to acquire more votes increases exponentially as N increases.
Each voting event needs developers to complete a complete source file for writing the voting intelligent contract, and long events need to be consumed to complete the construction of the contract file of the intelligent contract, so that the efficiency is very low.
Disclosure of Invention
The invention aims to provide an efficient N-power voting method and device based on a block chain.
A block chain-based N-power voting method comprises the following steps:
receiving a request for deploying voting project intelligent contract information, generating factory intelligent contract information matched with the class voting by a first code executor, wherein the factory intelligent contract comprises first input parameter information and class voting information which are input into the factory intelligent contract and output second code information, establishing a transmission mapping relation between the first input parameter information and the class voting information, and generating execution code information for outputting the second code information by using the class voting information;
the second code executor obtains a project voting request of an initiator client, constructs project intelligent contract information corresponding to the project voting by using the factory intelligent contract information, wherein the project intelligent contract information comprises second input parameter information, project voting information and output third code information, establishes a transmission mapping relation between the second input parameter information and the project voting information, and generates execution code information for outputting the third code information by using the project voting information;
and when the triggering condition of voting is met, starting the project intelligent contract, receiving voting requests of a plurality of voter clients, generating and outputting the third code information, and finishing the voting process.
Preferably, the voter information in the class voting information further includes a data structure for setting the voter, and if the voter needs the authentication information, an authentication algorithm is set and/or registration code information is generated;
if the first input parameter information analyzed by the second code executor comprises the authentication information of the voter, the generated project intelligent contract comprises the registration code information for generating the voter;
in the voting process, firstly, generating public and private key information by using the registration code information, and distributing the public key information to the corresponding voting party client;
the voter client is allowed to participate in the vote for which it passed the verification. A voting algorithm implementing the following formula in a (concrete) project contract:
Figure BDA0003401239270000041
compared with the prior art, the method has the following advantages:
firstly, the voting items are pre-integrated into a plurality of classes to generate a factory intelligent contract corresponding to class voting, the specific related voting items of each class generate a corresponding item intelligent contract through the factory intelligent contract, and the voting operation is started after the voting triggering condition is met: and receiving the votes of the clients of the voters, and counting and summarizing the votes meeting the conditions to complete the votes. The voting of the same type only needs to define a factory intelligent contract once, and then only needs to call the factory intelligent contract to generate a project intelligent contract of a specific project, so that the efficiency is high.
Then, the class voting information can be set according to an influence dimension array, wherein the influence dimension array comprises a single-dimension array and a multi-dimension array; receiving a request for deploying voting project intelligent contract information, and analyzing each dimension information in input multi-dimension data; and the first code executor finds out the default information corresponding to each dimension to generate the plant intelligent contract information matched with the class voting. The class voting set in the mode can be dynamically generated, corresponding default information is set in each dimensionality, and the class voting completed in the mode not only achieves the dynamism, but also is very high in execution efficiency.
Then, in the voting process, firstly, generating public and private key information by using the registration code information, and distributing the public key information to the corresponding voting party client; the voter client is allowed to participate in the vote for which it passed the verification. These arrangements can enhance the security of the anti-scrub sheet.
Drawings
FIG. 1 is a graph of cost paid for a single person vote;
FIG. 2 is a schematic flow chart of a block chain-based N-th power voting method;
FIG. 3 is a diagram of an example of a block chain-based N-th power voting method;
fig. 4 is a flowchart of an example of a block chain-based N-th-party voting method.
Detailed Description
The present invention will be described in detail below with reference to the accompanying drawings.
The intelligent contract file includes not only code/instructions for implementing predetermined transactions that developers desire to implement through intelligent contracts, but also code for implementing other functions, for example, the intelligent contracts generally cannot directly interact with external applications for complex types of data, which requires that a decoding code and an encoding code for decoding input data from outside the intelligent contract and encoding output data provided outside the intelligent contract are configured in the contract file of the intelligent contract, and different encoding codes and decoding codes are actually used in different intelligent contracts. Correspondingly, in the process of constructing the contract file of the intelligent contract, namely in the process of obtaining the source file or the byte code file of the intelligent contract, developers need to completely write the source file of the intelligent contract, and need to consume longer events to complete the construction of the contract file of the intelligent contract, so that the efficiency is extremely low.
Taking voting as an example, usually, a corresponding intelligent contract file is compiled for a voting project, the voting relates to a voting configuration interface, and the voting configuration interface also relates to the input of dynamic information of a candidate party.
The core thought of the invention is as follows: the voting items are pre-integrated into a plurality of classes to generate a factory intelligent contract corresponding to class voting, specific related voting items of each class generate a corresponding item intelligent contract through the factory intelligent contract, and the voting operation is started after the voting triggering condition is met: and receiving the votes of the clients of the voters, and counting and summarizing the votes meeting the conditions to complete the votes. The voting of the same type only needs to define a factory intelligent contract once, and then only needs to call the factory intelligent contract to generate a project intelligent contract of a specific project, so that the efficiency is high.
The core involved in voting is efficiency and security. The efficiency comprises automatic generation of a voting configuration interface template and online compilation of dynamic information of a candidate party; the safety comprises anti-bill-swiping safety level design, voting flow logic control, high-performance processing control of a background and the like.
And setting the class voting information according to the influence dimension array. The influence dimension array can be a single dimension array or a multi-dimension array.
Scheme one
The influence dimension array takes a single-dimension array as an example, and a factory intelligent contract corresponding to the class voting information is established. And establishing a single-dimensional array by taking voting logic as an example, and establishing class voting information according to the single-dimensional array, thereby setting a factory intelligent contract.
The voting logic comprises single-thread voting flow settings such as single-option voting, multi-option voting, grouping voting, single-group voting and the like. The class voting information comprises single-option single-group votes, multi-option votes and the like.
Please refer to fig. 2, which is a flowchart illustrating a voting method based on the power N of a block chain according to a first embodiment. It includes:
s110, receiving a request for deploying voting item intelligent contract information, generating factory intelligent contract information matched with the class voting by a first code executor, wherein the factory intelligent contract comprises first input parameter information, class voting information and output second code information of a factory intelligent contract, establishing a transmission mapping relation between the first input parameter information and the class voting information, and generating execution code information for outputting the second code information by using the class voting information, wherein the class voting information further comprises attribute information of the class voting, initiator information, voting party information, voting triggering condition information, voting process information and voting ending condition information.
In the blockchain network, a user can initiate a factory intelligent contract information request corresponding to class voting related to a deployment voting project or call project intelligent contract information of factory intelligent contract deployment project voting through an account registered in the blockchain network. Also, the method may involve a user side and a platform side, the platform side being performed by any device, apparatus, platform or cluster having computing/processing capabilities, for example, by a contract development platform integrating functions of development and testing of intelligent contracts, and the user side may include a voting side client, an initiator side client, and the like. Similarly, a plurality of candidate clients and the like may be included.
The user can write the factory intelligent contract information matched with the voting by himself, and the contract description information of the factory intelligent contract can be stored through the description file special for the user.
The first code executor may directly execute the factory intelligent contract information written by the user to generate corresponding factory intelligent contract information. And related information can be analyzed from the description file of the user to generate corresponding intelligent contract information of the factory. Illustrated as a single-option single-group class of votes. The class voting information further comprises attribute information (single-option single-group voting class) of the class voting, initiator information (structure body defining the initiator), voting party information (structure body information defining the voting party), triggering condition information of the voting, flow information of the voting (candidate party input, voting configuration interface generation, security level control and the like) and finishing condition information of the voting.
The structural body information defining the voter further includes a structure type, a field content, and the like defining the voter data. For example, the voter data at least includes whether the voter needs authentication, whether the voter sets blacklist information, and the like.
The generation of the voting configuration interface comprises setting a voting configuration interface generation template, configuring interface settings of each template, and configuring picture output information, video output information and input information of a candidate party in the interface. The security level control comprises a first level, a second level and a third level, for example, the first level generates the verification code of the voter; the second level also comprises setting blacklist information and red list information of the voter, and the third level also comprises setting a voting anti-refresh mechanism and the like. The voting end condition information sets voting time information, voting number limitation, a voting anti-refresh mechanism unsatisfied condition and the like.
The method comprises the steps that initiator information (a structural body for defining an initiator), voting party information (structural body information for defining a voting party), voting triggering condition information, voting process information (candidate party input, voting configuration interface generation, security level control and the like), voting ending condition information and the like can be given to default values, then factory intelligent contract information matched with the voting is generated, and only when the type of a factory intelligent contract is required to be input and is a single-option single-group voting class, the default first input parameter information can be transmitted into a first code actuator, so that the factory intelligent contract is established. And establishing a transmission mapping relation between the first input parameter information and the voting-like information, and directly establishing a transmission mapping relation between default parameters and the voting information, for example, adopting a default generation template for a voting configuration interface generation template. And directly utilizing the class voting information to generate execution code information for outputting second code information, namely a project intelligent contract for configuring project voting.
At least one of the following information defined by the user can be described in the contract description information input by the user:
contract name (contract name) of a factory intelligence contract;
class voting information of the contract;
a contract version;
and the data exchange format is used for indicating the data format of input data provided by a computer program outside the intelligent contract to the intelligent contract and output data returned by the intelligent contract to the computer program. For example, for Token context as described above, the corresponding data exchange format may be defined as json (javascript Object notification), xml (extensible Markup language), or other data exchange format;
authority or rules of a factory intelligence contract: namely, initiator information (structure defining initiator), voter information (structure defining voter), trigger condition information of voting, flow information of voting (candidate input, generation of voting configuration interface, security level control, etc.), end condition information of voting, and the like.
The data structure form of the output project intelligent contract is as follows: and setting second input parameter information, project voting information and output third code information.
And S120, a second code executor obtains a project voting request of an initiator client, finds matched class voting information, calls the factory intelligent contract information to make a call request, analyzes first input parameter information from the project voting request, inputs the input parameters into the factory intelligent contract matched with the class voting, constructs project intelligent contract information corresponding to the specific project voting, wherein the project intelligent contract information comprises second input parameter information, project voting information and output third code information, establishes a transmission mapping relation between the second input parameter information and the project voting information, and generates execution code information for outputting the third code information by using the project voting information.
The second code executor obtains the project voting request of the initiator client, and the user can write the project intelligent contract information matched with the project voting by himself or store the contract description information of the project intelligent contract through a description file special for the user. The second code executor receives the information and finds out the matched class voting information, the most common mode is that the initiator client side directly selects the class voting information and the corresponding factory intelligent contract information, and second input parameter information or part of the second input parameter information is defined to adopt default values.
And S130, when the triggering condition of the voting is met, starting the project intelligent contract, receiving voting requests of a plurality of voting party clients, generating and outputting the third code information, and finishing the voting process.
The present example is illustrated below by way of an application example. Referring to fig. 3 and 4, which are schematic diagrams of a logic flow of voting, the chain environment is shown in the dashed box of fig. 3.
The voting initiator client: the method comprises the steps of deploying a factory intelligent contract and a project intelligent contract for voting, setting project information, initiating voting problems and options, setting qualified registration codes and voting related time regulations, triggering a voting result and the like.
The voting party client: the login and registration become a qualified voter for voting, and the functions comprise: login and registration, participation in voting, submission of votes, check of voting results and the like.
Intelligent contract: can be deployed on any blockchain supporting intelligent contracts, including factory intelligent contracts and project contracts. Intelligent contract of factory: and generating the project contract according to the reference. And (3) item contracts: the core contract of the N-power voting algorithm also comprises the functions of registration verification and triggering the ticket counting result publication.
One example that may be used for implementation is: and (3) whether the Ethernet source code analysis is carried out or not at the next stage is carried out by an open source community, voting is initiated on the topic, one piece of lowest support is agreed, a vote is correspondingly obtained, the topic research can be started when the vote is 1000, and all users participating in voting share the final research result by adopting an N-power voting method (N is 1000).
First, the core steps of the voting initiator include the following procedures, which can be referred to fig. 3 or fig. 4:
1. the community party of the open source project logs in the voting system APP of the power of N provided by the patent and is connected with the wallet application at the same time;
2. initializing a voting project, and setting a project name, a voting question and options.
Setting a project name: staged research topic one
Setting a voting question: and analyzing and outputting a research report aiming at the source code of the Ether house.
Setting options: and (4) supporting.
3. Setting time parameters, registration starting time, registration deadline, voting starting time and voting deadline.
4. Setting an N power parameter N, wherein N is 1000;
after the steps are completed, the voting system APP calls the factory intelligent contract of the block chain to generate a project intelligent contract. The factory intelligence contract is a single-option single-group voting class, and the first input parameter of the factory intelligence contract is a default value. Generating a project intelligent contract according to the factory intelligent contract, wherein the second input parameters comprise a project contract name, a voting question, a voting time parameter, an N value and an output parameter
This project contract name: step-wise study topic one, voting problem: and analyzing the source codes of the Ether house and outputting a research report to complete parameter configuration of the project contract.
Note: the plant intelligence contracts and project contracts may be in a one-to-many relationship.
5. After the voting is finished, the voting initiator needs to trigger the project contract to generate a voting result, and the second code executor generates execution code information for outputting third code information, which further comprises information of finished voting and specific vote values, and information of unfinished voting and reasons thereof.
Then, the core steps of the voter comprise the following processes:
1. logging in an APP (application) of the voting system of the power of N, browsing voting items through the APP, and searching items needing voting;
2. and clicking registration, wherein the registration process is only a one-time click event for the voting user, the actual system finishes the encryption of the registration code by the public key, sends the encrypted registration code to the server and decrypts the private key of the server, verifies whether the registration code is valid or not, and returns the success/failure of registration.
Finally, executing the project intelligent contract, triggering voting, selecting supported options for voting, sending the voting amount, and calling a project contract voting method in the process;
if 1 block is sent, the number of corresponding support tickets is increased by 1;
if 8 blocks are sent, the corresponding number of the support tickets is increased by 2; (1000 ═ N)
And (4) result publication, counting the sum of the tickets, meeting 1000 tickets, and publishing a result: the voting is successful; and subsequently, performing subject research, and sending a research report to the voter account for viewing after the research is finished.
Not meeting 1000 tickets or other conditions that cannot be successful, publish results: if the voting fails, the voting amount is returned to the voting party, and the voting party sends an account to the voting party, thereby giving up the subject and voting for the next subject.
Where a project intelligence contract is executed, which may be defined as a contract access class. I.e., may also be expressed as a Blockchain Access Object (BAO) class, which is essentially code that may Access a project intelligence contract in the form of a Remote Procedure Call (RPC) function Call, dedicated to handling data interactions between an external computer program and the intelligence contract. Correspondingly, a container (e.g. docker) for testing the project intelligent contract can be set up locally, and the contract file is called in the container through the project intelligent contract, so that the automatic testing of the intelligent contract is completed.
It should be noted that the security level control may be implemented by setting a verification code technique for a voter, that is, the voter information in the class voting information further includes a data structure for setting the voter, and if the voter needs authentication information, an authentication algorithm is set and/or registration code information is generated; if the first input parameter information analyzed by the second code executor comprises the authentication information of the voter, the generated project intelligent contract comprises the registration code information for generating the voter; in the voting process, public and private key information is generated by using the registration code information, public key information is distributed to the corresponding voting party client, and voting is allowed to be carried out only for the voting party client which passes the verification. This method is popular and by means of a randomly generated verification code, it is possible to prevent someone of no particular interest from using the instrument for swiping a ticket. The security level control not only comprises the above settings, but also comprises the step of setting a platform equalization processing mode when the value set by N exceeds a certain preset value.
Scheme two
And setting the class voting information according to the influence dimension array. The influence dimension array may be a multi-dimension array in addition to the single-dimension array of the scheme one.
For example, in addition to setting the voting logic, the system also includes a security level dimension, and each security level corresponds to a set of security process control. The voting logic further comprises single-threaded voting flow settings such as single-option voting, multi-option voting, grouping voting, single-group voting and the like. The class voting information comprises single-option single-group votes, multi-option votes and the like.
The scheme further comprises the following steps:
setting class voting information according to an influence dimension array, wherein the influence dimension array comprises a single-dimension array and a multi-dimension array; receiving a request for deploying voting project intelligent contract information, and analyzing each dimension information in input multi-dimension data; the first code executor finds out default information corresponding to each dimension; and generating the factory intelligent contract information matched with the class vote.
For example, the user selects a single thread or multiple threads, a security level, a voting type and the like, the corresponding first code executor obtains configuration information of the user, then finds out dimension factor information, finds out a default value corresponding to each dimension, and then generates corresponding intelligent contract information of the plant. The processing mode is more flexible and more efficient.
An N-th power voting device based on a block chain comprises:
the first code executor: the system comprises a receiving module, a sending module, a receiving module, a voting project intelligent contract information deploying module and a voting project intelligent contract information deploying module, wherein the receiving module is used for receiving a voting project intelligent contract information deploying request and generating factory intelligent contract information matched with the voting-like;
a second code executor: the system comprises a client, a client side, a system server and a client side, wherein the client is used for acquiring a project voting request of an initiator client side and constructing project intelligent contract information corresponding to the project voting by utilizing the factory intelligent contract information;
and the project intelligent contract executor is used for starting the project intelligent contract when the triggering condition for voting is met, receiving voting requests of a plurality of voting party clients, generating and outputting the third code information, and finishing the voting process.
An N-th power voting device based on a block chain comprises:
public-private key generating unit: the public and private key information is generated according to the registration code information of the voting party;
a distribution unit: the public key information is distributed to the corresponding voter client;
a verification unit: for allowing the voter client to participate in the vote on the authenticated voter client.
Also provided in an embodiment of the present specification is a computer-readable storage medium having stored thereon a computer program/instructions, which when executed in a computing device, performs the method for generating an intelligent contract file class provided in any one of the embodiments of the present specification.
There is also provided in an embodiment of this specification a computing device, including a memory and a processor, where the memory stores therein a computer program/instruction, and the processor, when executing the computer program/instruction, implements the method for generating a contract class of an intelligent contract file provided in any one of the embodiments of this specification. The embodiments in the present description are described in a progressive manner, and the same and similar parts in the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment. The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The foregoing description of specific embodiments of the present invention has been presented. It is to be understood that the present invention is not limited to the specific embodiments described above, and that various changes or modifications may be made by one skilled in the art within the scope of the appended claims without departing from the spirit of the invention. The embodiments and features of the embodiments of the present application may be combined with each other arbitrarily without conflict.

Claims (10)

1. A block chain-based N-power voting method is characterized by comprising the following steps:
receiving a request for deploying voting project intelligent contract information, generating factory intelligent contract information matched with class voting by a first code executor, wherein the factory intelligent contract comprises first input parameter information and class voting information which are input into the factory intelligent contract and output second code information, establishing a transmission mapping relation between the first input parameter information and the class voting information, and generating execution code information for outputting the second code information by using the class voting information;
a second code executor obtains a project voting request of an initiator client, constructs project intelligent contract information corresponding to the project voting by using the factory intelligent contract information, wherein the project intelligent contract information comprises second input parameter information, project voting information and output third code information, establishes a transmission mapping relation between the second input parameter information and the project voting information, and generates execution code information for outputting the third code information by using the project voting information;
and when the triggering condition of voting is met, starting the project intelligent contract, receiving voting requests of a plurality of voter clients, generating and outputting the third code information, and finishing the voting process.
2. The method of claim 1,
the voting party information in the class voting information further comprises a data structure body for setting the voting party, and if the voting party needs authentication information, an authentication algorithm is set and/or registration code information is generated;
if the first input parameter information analyzed by the second code executor comprises the authentication information of the voter, the generated project intelligent contract comprises the registration code information for generating the voter;
in the voting process, firstly, generating public and private key information by using the registration code information, and distributing the public key information to the corresponding voting party client;
the voter client is allowed to participate in the vote for which it passed the verification.
3. The method of claim 1, wherein constructing project intelligent contract information corresponding to the project vote using the plant intelligent contract information further comprises:
finding corresponding class voting information, making a calling request for the adapted plant intelligent contract information, analyzing first input parameter information from the project voting request, inputting the input parameter into the plant intelligent contract adapted by the class voting, and deploying the input parameter into the corresponding project intelligent contract information.
4. The method of claim 1,
setting the class voting information, further setting a setting mode and a default mode, wherein the setting mode further comprises setting information including attribute information, initiator information, voting party information, voting triggering condition information, voting process information and voting ending condition information of the class voting, and the set voting process information further comprises template library information of a voting configuration interface;
if the received request for deploying the voting item intelligent contract information only contains attribute information of the class voting, a default mode is started, and the first code executor directly generates factory intelligent contract information matched with the class voting according to the default mode.
5. The method of claim 1,
setting class voting information according to an influence dimension array, wherein the influence dimension array comprises a single-dimension array and a multi-dimension array;
receiving a request for deploying voting project intelligent contract information, and analyzing each dimension information in input multi-dimension data;
the first code executor finds out default information corresponding to each dimension;
and generating the factory intelligent contract information matched with the class vote.
6. The method of claim 1, wherein the class voting information comprises a single-choice single-set voting class, a multiple-choice single-set voting class, or a multiple-choice voting class.
7. An N-th power voting device based on a block chain, comprising:
the first code executor: the system comprises a database, a database server and a database server, wherein the database is used for storing a voting project intelligent contract information request;
a second code executor: the system comprises a client, a client side, a system server and a client side, wherein the client is used for acquiring a project voting request of an initiator client side and constructing project intelligent contract information corresponding to the project voting by utilizing the factory intelligent contract information;
and the project intelligent contract executor is used for starting the project intelligent contract when the triggering condition for voting is met, receiving voting requests of a plurality of voting party clients, and generating and outputting the third code information.
8. The block chain-based power-N voting apparatus according to claim 7, further comprising:
public-private key generating unit: the public and private key information is generated according to the registration code information of the voting party;
a distribution unit: the public key information is distributed to the corresponding voter client;
a verification unit: for allowing the voter client to participate in the vote on the authenticated voter client.
9. A computer-readable storage medium, on which a computer program is stored, characterized in that when the computer program is executed in a computing device, the computing device performs the method of any of claims 1-6.
10. A computing device comprising a memory and a processor, wherein the memory has stored therein a computer program that, when executed by the processor, implements the method of any of claims 1-6.
CN202111500085.6A 2021-12-09 2021-12-09 N-th voting method and device based on block chain Active CN114285552B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111500085.6A CN114285552B (en) 2021-12-09 2021-12-09 N-th voting method and device based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111500085.6A CN114285552B (en) 2021-12-09 2021-12-09 N-th voting method and device based on block chain

Publications (2)

Publication Number Publication Date
CN114285552A true CN114285552A (en) 2022-04-05
CN114285552B CN114285552B (en) 2023-08-22

Family

ID=80871572

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111500085.6A Active CN114285552B (en) 2021-12-09 2021-12-09 N-th voting method and device based on block chain

Country Status (1)

Country Link
CN (1) CN114285552B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108805703A (en) * 2017-04-28 2018-11-13 埃森哲环球解决方案有限公司 Right management system
CN110929295A (en) * 2019-11-08 2020-03-27 杭州趣链科技有限公司 Form verification method of voting intelligent contract
CN110933020A (en) * 2018-09-20 2020-03-27 埃森哲环球解决方案有限公司 Cryptographic logic exports submissions from execution blockchain
CN111404876A (en) * 2020-02-20 2020-07-10 江苏荣泽信息科技股份有限公司 Voting method based on block chain
US20200334674A1 (en) * 2019-04-19 2020-10-22 Coinbase, Inc. Systems and methods for blockchain administration
CN113037827A (en) * 2021-03-02 2021-06-25 上海旺链信息科技有限公司 Voting method based on block chain, self-organization management method and computer equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108805703A (en) * 2017-04-28 2018-11-13 埃森哲环球解决方案有限公司 Right management system
CN110933020A (en) * 2018-09-20 2020-03-27 埃森哲环球解决方案有限公司 Cryptographic logic exports submissions from execution blockchain
US20200334674A1 (en) * 2019-04-19 2020-10-22 Coinbase, Inc. Systems and methods for blockchain administration
CN110929295A (en) * 2019-11-08 2020-03-27 杭州趣链科技有限公司 Form verification method of voting intelligent contract
CN111404876A (en) * 2020-02-20 2020-07-10 江苏荣泽信息科技股份有限公司 Voting method based on block chain
CN113037827A (en) * 2021-03-02 2021-06-25 上海旺链信息科技有限公司 Voting method based on block chain, self-organization management method and computer equipment

Also Published As

Publication number Publication date
CN114285552B (en) 2023-08-22

Similar Documents

Publication Publication Date Title
US11743137B2 (en) Systems, methods, and apparatuses for implementing a metadata driven rules engine on blockchain using distributed ledger technology (DLT)
TWI797512B (en) Agent-based turing complete transactions integrating feedback within a blockchain system
US11824970B2 (en) Systems, methods, and apparatuses for implementing user access controls in a metadata driven blockchain operating via distributed ledger technology (DLT) using granular access objects and ALFA/XACML visibility rules
US20230091605A1 (en) Accessing an internet of things device using blockchain metadata
US20200169546A1 (en) Systems, methods, and apparatuses for seeding community sidechains with consent written onto a blockchain interfaced with a cloud based computing environment
US20190236562A1 (en) Systems, methods, and apparatuses for implementing document interface and collaboration using quipchain in a cloud based computing environment
US20190236559A1 (en) Systems, methods, and apparatuses for implementing smart flow contracts using distributed ledger technologies in a cloud based computing environment
US20190238316A1 (en) Systems, methods, and apparatuses for implementing intelligent consensus, smart consensus, and weighted consensus models for distributed ledger technologies in a cloud based computing environment
US20190236606A1 (en) Systems, methods, and apparatuses for implementing a virtual chain model for distributed ledger technologies in a cloud based computing environment
US8312097B1 (en) Segmenting access to electronic message boards
CN110780847B (en) Random number generation method, random number generation device and electronic equipment
CN110585715A (en) Game data processing method, device, equipment and storage medium based on block chain
CN106164917B (en) User's specific application for remote session activates
CN111177246B (en) Service data processing method and device
Ma Using blockchain to build decentralized access control in a peer-to-peer e-learning platform
Wang et al. MetaOJ: A massive distributed online judge system
CN114830158B (en) Method and system for transaction verification in a distributed computing system
WO2021203817A1 (en) Open interface management method, electronic device, and storage medium
CN117785975A (en) System for checking service data by using rule set
CN112181599A (en) Model training method, device and storage medium
CN114285552B (en) N-th voting method and device based on block chain
US11677746B2 (en) Device capability model sharing
CN113014540B (en) Data processing method, device, equipment and storage medium
CN112734455B (en) Method, device and equipment for generating prize exchanging result and readable storage medium
CN111062060B (en) Voting proposal life cycle management method based on intelligent contract

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant