CN109830029A - Voting method, device, system and server, computer readable storage medium - Google Patents

Voting method, device, system and server, computer readable storage medium Download PDF

Info

Publication number
CN109830029A
CN109830029A CN201910047308.4A CN201910047308A CN109830029A CN 109830029 A CN109830029 A CN 109830029A CN 201910047308 A CN201910047308 A CN 201910047308A CN 109830029 A CN109830029 A CN 109830029A
Authority
CN
China
Prior art keywords
ballot
node
voting
user
channel
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
CN201910047308.4A
Other languages
Chinese (zh)
Other versions
CN109830029B (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.)
Guangzhou Zhongxian Technology Co.,Ltd.
Original Assignee
Shenzhen Zhi Chain Physical 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 Shenzhen Zhi Chain Physical Technology Co Ltd filed Critical Shenzhen Zhi Chain Physical Technology Co Ltd
Priority to CN201910047308.4A priority Critical patent/CN109830029B/en
Publication of CN109830029A publication Critical patent/CN109830029A/en
Application granted granted Critical
Publication of CN109830029B publication Critical patent/CN109830029B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

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

Abstract

The embodiment of the present application is suitable for electronic voting technical field, discloses a kind of voting method, device, system and server, computer readable storage medium, wherein method includes: the voted command for obtaining user and being inputted by voting user node;It is expired revocable intelligent contract and the first ballot channel by sequence, according to voted command by corresponding ballot transmission to tank node of voting;By Hash time lock intelligence contract and the second ballot channel, by the ballot transmission in tank node of voting to corresponding candidate node;The ballot paper quantity for counting each candidate node, obtains voting results, and voting results are transmitted to block chain node, so that block chain node stores and broadcasts voting results;Wherein, voting user node, ballot tank node and candidate node are the node in lightning network.The confidence level of voting results and the safety of electronic voting can be improved in the embodiment of the present application, guarantees the high concurrent of voting process, improves the stability under high concurrent.

Description

Voting method, device, system and server, computer readable storage medium
Technical field
The application belongs to electronic voting technical field more particularly to a kind of voting method, device, system and server, meter Calculation machine readable storage medium storing program for executing.
Background technique
With the continuous development of science and technology, electronic voting mode has gradually replaced papery ballot mode.
Electronic voting refers to a kind of ballot mode for poll of electronically being voted, counted.Traditional electronic voting In system, user generally passes through the terminals such as mobile phone and carries out ballot operation, and then server can count the ballot paper number of each candidate Amount.In conditional electronic voting process, it often will appear in the short time the phenomenon that pouring in a large number of users, still, current electronics The concurrency of ballot system is poor, when concurrency is higher in a short time, phenomena such as often will appear blocking, Caton, and serious shadow Ring user experience.In addition, the data of current electronic voting system are easy to be tampered, safety is lower.
To sum up, the safety of current electronic voting mode, stability are lower, and concurrency is poor.
Summary of the invention
In view of this, the embodiment of the present application provides a kind of voting method, device, system and server, computer-readable deposits Storage media, safety, stability and the concurrency to solve the problems, such as existing electronic voting are poor.
The first aspect of the embodiment of the present application provides a kind of voting method, comprising:
Obtain the voted command that user is inputted by voting user node;
Expired the first ballot channel that intelligent contract can be revoked and pre-establish by pre-generated sequence, according to described For voted command by corresponding ballot transmission to tank node of voting, first ballot channel is at least one described voting user section Channel between point and the ballot tank node;
By pre-generated Hash time lock intelligence contract and the second ballot channel pre-established, by the ballot For the ballot transmission in tank node to corresponding candidate node, second ballot channel is the ballot tank node and institute State the channel between at least one described candidate node;
The ballot paper quantity for counting each candidate node, obtains voting results, and the voting results are transmitted to area Block chain node, so that the block chain node stores and broadcasts the voting results;
Wherein, the voting user node, the ballot tank node and the candidate node are in lightning network Node.
With reference to first aspect, defeated by voting user node in the acquisition user in a kind of feasible implementation Before the voted command entered, further includes:
It obtains ballot and initiates instruction;
It initiates to instruct according to the ballot, distributes the ballot paper to each user according to default voting rule;
According to default polling option, the candidate node is established;
Establish the ballot tank node, and establish between the voting user node and the ballot tank node described the Second ballot channel between one ballot channel and the ballot tank node and at least one described candidate node.
With reference to first aspect, it in a kind of feasible implementation, before initiation instruction is voted in the acquisition, also wraps It includes:
Obtain the ballot qualification examination information of the user;
According to the ballot qualification examination information, judge whether the user has ballot qualification;
When the user has the ballot qualification, ballot permission is distributed for the user.
With reference to first aspect, in a kind of feasible implementation, in the choosing of each candidate node of statistics Poll amount, obtains voting results, and the voting results are transmitted to after block chain node, further includes:
Obtain voting results inquiry instruction;
According to the voting results inquiry instruction, corresponding target voting results are searched from the block chain node, and Show the target voting results.
With reference to first aspect, in a kind of feasible implementation, after the display target voting results, also Include:
Acquisition is traced to the source request;
According to the request of tracing to the source, key of tracing to the source corresponding with the target voting results is generated;
The key of tracing to the source is presented to the user that traces to the source, so that the user that traces to the source is by the key of tracing to the source from the area Block chain node obtains the target voting results.
The second aspect of the embodiment of the present application provides a kind of balloting device, comprising:
Voted command obtains module, the voted command inputted for obtaining user by voting user node;
First transmission module, for intelligent contract can be revoked and pre-establish first that expired by pre-generated sequence Ballot channel, according to the voted command by corresponding ballot transmission to tank node of voting, first ballot channel is at least Channel between one voting user node and the ballot tank node;
Second transmission module, for passing through pre-generated Hash time lock intelligence contract and the second throwing pre-established Ticket channel, by the ballot transmission in the ballot tank node to corresponding candidate node, second ballot channel is Channel between the ballot tank node and at least one described described candidate node;
Statistical module obtains voting results, by the ballot for counting the ballot paper quantity of each candidate node As a result it is transmitted to block chain node, so that the block chain node stores and broadcasts the voting results;
Wherein, the voting user node, the ballot tank node and the candidate node are in lightning network Node.
In conjunction with second aspect, in a kind of feasible implementation, further includes:
Instruction acquisition module is initiated in ballot, initiates instruction for obtaining ballot;
Ballot paper distribution module, for initiating instruction according to the ballot, according to default voting rule to each user Distribute the ballot paper;
First establishes module, for establishing the candidate node according to polling option is preset;
Second establishes module, for establishing the ballot tank node, and establishes the voting user node and the ballot Between the first ballot channel and the ballot tank node and at least one described candidate node between tank node Second ballot channel.
In conjunction with second aspect, in a kind of feasible implementation, further includes:
Msu message obtains module, for obtaining the ballot qualification examination information of the user;
Judgment module, for judging whether the user has ballot qualification according to the ballot qualification examination information;
Authority distribution module, for distributing ballot permission for the user when the user has the ballot qualification.
In conjunction with second aspect, in a kind of feasible implementation, further includes:
Inquiry instruction obtains module, for obtaining voting results inquiry instruction;
Enquiry module, for searching corresponding mesh from the block chain node according to the voting results inquiry instruction Voting results are marked, and show the target voting results.
In conjunction with second aspect, in a kind of feasible implementation, further includes:
Request module, for obtaining request of tracing to the source;
Key production module, for request of tracing to the source according to, generate it is corresponding with the target voting results trace to the source it is close Key;
It traces to the source module, for the key of tracing to the source to be presented to the user that traces to the source, so that the user that traces to the source is traced back by described Source key obtains the target voting results from the block chain node.
The third aspect of the embodiment of the present application provides a kind of ballot system, including lightning network and block chain network, described Block chain network includes at least one block chain node, and the lightning network includes server, voting user node, ballot pond section Point and candidate node;At least one described voting user node is connected by the first ballot channel and the ballot tank node It connects, voter's node is connect by the second ballot channel at least one described candidate node;
The server is for obtaining the voted command that user is inputted by the voting user node;By pre-generated Sequence expire revocable intelligent contract and first ballot channel, according to the voted command by corresponding ballot transmission extremely The ballot tank node;By pre-generated Hash time lock intelligence contract and second ballot channel, by the throwing The ballot transmission in ticket tank node is to the corresponding candidate node;Count the ballot paper number of each candidate node Amount, obtain voting results, the voting results be transmitted to the block chain node so that the block chain node storage and it is wide Broadcast the voting results.
The fourth aspect of the embodiment of the present application provides a kind of server, including memory, processor and is stored in described In memory and the computer program that can run on the processor, the processor are realized when executing the computer program As described in above-mentioned any one of first aspect the step of voting method.
5th aspect of the embodiment of the present application provides a kind of computer readable storage medium, the computer-readable storage medium Matter is stored with computer program, and the throwing as described in above-mentioned any one of first aspect is realized when the computer program is executed by processor The step of ticket method.
Existing beneficial effect is the embodiment of the present application compared with prior art:
The embodiment of the present application using the decentralization of block chain, is not easy by the way that voting results are uploaded to difference chain node It the characteristics such as distorts, improves the confidence level of voting results and the safety of electronic voting.In addition, lightning network and block chain are had Machine combines, and voting process is realized using each node and intelligent contract of lightning network, ensure that the high concurrent of voting process, And improve the stability under high concurrent.
Detailed description of the invention
It in order to more clearly explain the technical solutions in the embodiments of the present application, below will be to embodiment or description of the prior art Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description is only some of the application Embodiment for those of ordinary skill in the art without any creative labor, can also be according to these Attached drawing obtains other attached drawings.
Fig. 1 is the framework schematic block diagram of ballot system provided by the embodiments of the present application;
Fig. 2 is the schematic process flow diagram of voting method provided by the embodiments of the present application;
Fig. 3 is another schematic process flow diagram of voting method provided by the embodiments of the present application;
Fig. 4 is the flow diagram of process provided by the embodiments of the present application of tracing to the source;
Fig. 5 is a kind of structural schematic block diagram of balloting device provided by the embodiments of the present application;
Fig. 6 is the schematic diagram of server provided by the embodiments of the present application.
Specific embodiment
In being described below, for illustration and not for limitation, the tool of such as particular system structure, technology etc is proposed Body details, so as to provide a thorough understanding of the present application embodiment.However, it will be clear to one skilled in the art that there is no these specific The application also may be implemented in the other embodiments of details.In other situations, it omits to well-known system, device, electricity The detailed description of road and method, so as not to obscure the description of the present application with unnecessary details.
In order to illustrate technical solution described herein, the following is a description of specific embodiments.
Embodiment one
It referring to Figure 1, is a kind of framework schematic block diagram of ballot system provided by the embodiments of the present application, which includes dodging Electric network 11 and block chain network 12, block chain network include at least one block chain node 121, and lightning network includes server 111, voting user node 112, ballot tank node 113 and candidate node 114;At least one voting user node passes through the One ballot channel is connect with ballot tank node, and voter's node is connected by the second ballot channel and at least one candidate node It connects.
Server is for obtaining the voted command that user is inputted by voting user node;It is arrived by pre-generated sequence Phase revocable intelligent contract and the first ballot channel, according to voted command by corresponding ballot transmission to tank node of voting;Pass through Pre-generated Hash time lock intelligence contract and the second ballot channel, by the ballot transmission in tank node of voting to corresponding Candidate node;The ballot paper quantity for counting each candidate node, obtains voting results, and voting results are transmitted to block chain link Point, so that block chain node stores and broadcasts voting results.
It is to be appreciated that above-mentioned voting user node refers to that the terminal of voting user, the terminal can be specially mobile phone, plate Deng, be equipped in terminal corresponding application program (for example, small routine on mobile phone), with realize user ballot corresponding function. Each user corresponds to a voting user node, and user is connected into ballot system by terminals such as mobile phones.
Candidate node refers to candidate or the corresponding node of candidate item, each candidate or the corresponding candidate of candidate item Node, i.e. how many candidate options, then how many candidate node.For example, standing for election when there are 4, then there are 4 candidates Person's node.
Each voting user node is connect by the first ballot channel with ballot tank node, voting user node and ballot pond Between relationship be many-to-one relationship, i.e. corresponding ballot tank nodes of multiple voting user nodes.And vote tank node and time The relationship of the person's of choosing node is one-to-many relationship, i.e., one ballot tank node corresponds to multiple candidate nodes.In this way, the first ballot Channel and the second ballot channel are all connect with ballot tank node, can keep the consistency in ballot channel, pass through ballot pond section The many-one relationship of point and the second ballot channel, can support to throw ballot paper to multiple candidates or candidate item.
Server is the management backstage of ballot system, and operation has Batch Processing to control program, to realize to ballot system Management.Each node communication connection in server and lightning network.
Above-mentioned ballot system can be applied to a variety of ballot scenes, be not limited thereto.For example, in the scene of cell election Under, have 3 candidates, then set up 3 candidate nodes, in cell resident by the small routine on mobile phone enter ballot system into Row ballot, server are thrown ballot paper to ballot pond by the first ballot channel, then throw by second according to the voted command of resident Ballot paper is thrown to corresponding candidate node and counts the ballot paper quantity of each candidate node after poll closing, obtains in ticket channel To voting results.In another example the fund has 3 alternate-purposes, then sets up 3 in the case where determining the scene of purposes of certain fund A candidate node.Related personnel enters ballot system ballot by terminals such as mobile phones, and server is according to voted command by ballot paper It correspondingly throws to candidate node.
It include that sequence expires revocable intelligent contract (Recoverable Sequence Maturity in lightning network Contract, RSMC) and Hash time lock intelligence contract (Hashed Time lock Contract, HTLC).Lightning network High concurrent can satisfy short time concurrent higher demand of voting and improve the combination of lightning network and block chain The stability of ballot high concurrent, the confidence levels of voting results.
It, below will be from service after having introduced system architecture provided in this embodiment and the application scenarios that may relate to Introduce ballot operation flow in device side.
Embodiment two
Fig. 2 is referred to, is a kind of schematic process flow diagram of voting method provided by the embodiments of the present application, this method can wrap Include following steps:
Step S201, the voted command that user is inputted by voting user node is obtained.
Specifically, after voting user carries out ballot operation by voting user node, voting user node is according to user Interactive operation generate include certain information voted command, which is transmitted to background service by voting user node Device.
Wherein, voted command may include the ballot object information of user, ballot paper quantity information etc., i.e., background server can Can learn the user throws ballot paper to which candidate or candidate item, and the quantity of ballot according to the voted command.
It is appreciated that each with there is a certain number of ballot papers per family, which is that ballot system is pre- according to voting rule User is first distributed to, and the quantity of distributed ballot paper can be one, two or other quantity.
Step S202, the first ballot that intelligent contract can be revoked and pre-establish that expired by pre-generated sequence is logical Road, according to voted command by corresponding ballot transmission to tank node of voting, the first ballot channel is at least one voting user section Channel between point and ballot tank node.
Step S203, by pre-generated Hash time lock intelligence contract and the second ballot channel pre-established, By the ballot transmission in tank node of voting to corresponding candidate node, the second ballot channel is ballot tank node and at least one Channel between candidate node.
It is to be appreciated that above-mentioned RSMC intelligence contract and HTLC intelligence contract are the intelligent contract for including in lightning network, it should Intelligent contract is pre-generated.By RSMC, the intelligence contract can permit foundation throwing between voting user node and ballot pond Ticket channel, to facilitate the ballot paper in voting user node to be transferred to ballot pond.And ballot can permit by HTLC intelligence contract Ballot channel is established between user node and candidate node, which realizes indirectly, throws especially by first Ticket channel and the second ballot channel are realized.
Specifically, when user initiates a ballot selection by voting user node, corresponding ballot paper is thrown to ballot Tank node, then, ballot tank node again throw corresponding ballot paper to corresponding candidate option, to complete primary complete ballot Process.
By lightning network and RSMC intelligence contract, HTLC intelligence contract, voting process whole process can be made to occur In lightning network, it is not necessarily to cochain, is broadcasted without block chain, ensure that the high concurrent of voting process.
It is appreciated that the ballot paper quantity on voting user node can be regarded as the token of electronic-monetary system, and will choosing The process that ticket is voted to ballot tank node, candidate node can be regarded as the process of exchange of token.
Step S204, the ballot paper quantity for counting each candidate node, obtains voting results, voting results is transmitted to area Block chain node, so that block chain node stores and broadcasts voting results.Wherein, voting user node, ballot tank node and candidate Person's node is the node in lightning network.
After poll closing, the ballot data of each candidate node is the gained of corresponding candidate or candidate item Poll, therefore count the ballot paper quantity on each node and can be obtained when time voting results of ballot.After obtaining voting results, A network node of the ballot structure synchronization into block chain network, block chain node can be stored into the voting results, and It is broadcasted in block chain network.
As can be seen that using the decentralization of block chain, being not easy to distort by the way that voting results are uploaded to difference chain node Etc. characteristics, improve the confidence level of voting results and the safety of electronic voting.In addition, by lightning network and the organic knot of block chain It closes, voting process is realized using each node and intelligent contract of lightning network, ensure that the high concurrent of voting process, and mention Stability under high high concurrent.
Embodiment three
Fig. 3 is referred to, is another schematic process flow diagram of voting method provided by the embodiments of the present application, this method can be with The following steps are included:
Step S301, the ballot qualification examination information of user is obtained.
It is to be appreciated that above-mentioned ballot qualification examination information refers to the information for whether having ballot qualification for auditing user. The information may include personal information and other necessary informations.Ballot qualification examination information institute under different application scenarios The specifying information for including is different.For example, in the case where cell elects scene, the ballot qualification examination information includes certificate address information, a Whether people's information, house real estate information etc. judge the user corresponding by certificate address information and house real estate information In cell, when user is the resident in cell, then has ballot qualification, conversely, not having ballot qualification then.
Step S302, according to ballot qualification examination information, judge whether user has ballot qualification.When user has ballot When qualification, S303 is entered step.Conversely, then not distributing ballot permission when user does not have ballot qualification for the user.
Step S303, ballot permission is distributed for user.
Step S304, it obtains ballot and initiates instruction.
Specifically, ballot system administrator can be according to application scenarios, voting rule etc., when setting corresponding ballot Between, after the ballot relevant parameters such as range, then can initiate to vote in ballot system.
Step S305, instruction is initiated according to ballot, distributes ballot paper to each user according to default voting rule.
It is appreciated that ballot system can distribute a certain number of ballot papers to each user after ballot is initiated.And divide The ballot paper quantity matched is determined by default voting rule.For example, being then each when presetting each user and there was only a ballot paper User distributes a ballot paper, and when setting each user and having three ballot papers, then it is that each user distributes three ballot papers.
Step S306, according to polling option is preset, candidate node is established.
It is appreciated that above-mentioned default polling option refers to candidate or candidate item, there are several polling options then to establish several Candidate node, the corresponding candidate node of each polling option.
Step S307, the first ballot established ballot tank node, and establish voting user node between tank node of voting The second ballot channel between channel and ballot tank node and at least one candidate node.
Step S308, the voted command that user is inputted by voting user node is obtained.
Step S309, it is expired by sequence and intelligent contract and the first ballot channel can be revoked, it will be corresponding according to voted command Ballot transmission to tank node of voting.
Step S310, by Hash time lock intelligence contract and the second ballot channel, by the ballot paper in tank node of voting It is transmitted to corresponding candidate node.
Step S311, the ballot paper quantity for counting each candidate node, obtains voting results, voting results is transmitted to area Block chain node, so that block chain node stores and broadcasts voting results.
Above-mentioned steps S308~S311 is identical as step S201~S204 in above-described embodiment, and specific introduce refers to Literary corresponding contents, details are not described herein.
Step S312, voting results inquiry instruction is obtained.
Step S313, according to voting results inquiry instruction, corresponding target voting results are searched from block chain node, and Displaying target voting results.
After obtaining voting results, user can check voting results by modes such as mobile phone small routines.When user is defeated After entering corresponding query information, background server searches corresponding target ballot according to query information from block chain node As a result, and being presented to the user by user terminal interface.
Certainly, after poll closing, voting results actively can be subjected to publicity.It specifically can be by by voting results The mobile phone terminal of user is pushed to, so that each voting user can be learnt when time result of ballot.
After user learns voting results, if having doubt to the voting results, operation of tracing to the source can be carried out.One In a little embodiments, the flow diagram of process of tracing to the source shown in Figure 4 may be used also after above-mentioned displaying target voting results To include:
Step S401, request of tracing to the source is obtained.
Step S402, according to request of tracing to the source, key of tracing to the source corresponding with target voting results is generated.
Step S403, the key that will trace to the source is presented to the user that traces to the source, so that the user that traces to the source is by key of tracing to the source from block chain link Point obtains target voting results.
Specifically, user can input request of tracing to the source by the button of tracing to the source on display interface.Background server receives It traces to the source after request, the target voting results can be generated and traced to the source accordingly key, user can be traced to the source key by this, automatically Desired voting results are found, from block chain to verify the confidence level of voting results.
As can be seen that the present embodiment is based on lightning network and block chain network realizes voting process, voting results are improved Confidence level, ensure that the high concurrent of voting process, improve the stability under high concurrent.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present application constitutes any limit It is fixed.
Example IV
Fig. 5 is referred to, is a kind of structural schematic block diagram of balloting device provided by the embodiments of the present application, which can wrap It includes:
Voted command obtains module 51, the voted command inputted for obtaining user by voting user node;
First transmission module 52, for by pre-generated sequence expire revocable intelligent contract and pre-establish the One ballot channel, according to voted command by corresponding ballot transmission to tank node of voting, the first ballot channel is at least one throwing Channel between ticket user node and ballot tank node;
Second transmission module 53, for by it is pre-generated Hash time lock intelligence contract and pre-establish second Ballot channel, by the ballot transmission in tank node of voting to corresponding candidate node, the second ballot channel is ballot tank node With the channel between at least one candidate node;
Statistical module 54 obtains voting results, voting results is passed for counting the ballot paper quantity of each candidate node Block chain node is transported to, so that block chain node stores and broadcasts voting results;
Wherein, voting user node, ballot tank node and candidate node are the node in lightning network.
In a kind of feasible implementation, above-mentioned apparatus further include:
Instruction acquisition module is initiated in ballot, initiates instruction for obtaining ballot;
Ballot paper distribution module distributes ballot paper to each user according to default voting rule for initiating instruction according to ballot;
First establishes module, for establishing candidate node according to polling option is preset;
Second establishes module, for establishing ballot tank node, and establishes between voting user node and ballot tank node First ballot channel and the second ballot channel voted between tank node and at least one candidate node.
In a kind of feasible implementation, above-mentioned apparatus further include:
Msu message obtains module, for obtaining the ballot qualification examination information of user;
Judgment module, for judging whether user has ballot qualification according to ballot qualification examination information;
Authority distribution module, for distributing ballot permission for user when user has ballot qualification.
In a kind of feasible implementation, above-mentioned apparatus further include:
Inquiry instruction obtains module, for obtaining voting results inquiry instruction;
Enquiry module, for searching corresponding target ballot knot from block chain node according to voting results inquiry instruction Fruit, and displaying target voting results.
In a kind of feasible implementation, above-mentioned apparatus further include:
Request module, for obtaining request of tracing to the source;
Key production module, for generating key of tracing to the source corresponding with target voting results according to request of tracing to the source;
It traces to the source module, for that will trace to the source, key is presented to the user that traces to the source, so that the user that traces to the source is by key of tracing to the source from block Chain node obtains target voting results.
It is to be appreciated that the voting method in the balloting device of the present embodiment and above-mentioned each embodiment corresponds, specifically Introduction refers to corresponding contents above, and details are not described herein.
In the present embodiment, the device by by voting results be uploaded to difference chain node, using the decentralization of block chain, It the characteristics such as is not easy to distort, improves the confidence level of voting results and the safety of electronic voting.In addition, by lightning network and block Chain combination, voting process is realized using each node and intelligent contract of lightning network, ensure that the height of voting process simultaneously Hair property, and improve the stability under high concurrent.
Embodiment five
Fig. 6 is the schematic diagram for the server that one embodiment of the application provides.As shown in fig. 6, the server 6 of the embodiment wraps It includes: processor 60, memory 61 and being stored in the computer that can be run in the memory 61 and on the processor 60 Program 62.The processor 60 realizes the step in above-mentioned each voting method embodiment when executing the computer program 62, Such as step S201 to S204 shown in Fig. 2.Alternatively, the processor 60 realized when executing the computer program 62 it is above-mentioned each Each module or the function of unit in Installation practice, such as the function of module 51 to 54 shown in Fig. 5.
Illustratively, the computer program 62 can be divided into one or more modules or unit, it is one or The multiple modules of person or unit are stored in the memory 61, and are executed by the processor 60, to complete the application.It is described One or more modules or unit can be the series of computation machine program instruction section that can complete specific function, which uses In implementation procedure of the description computer program 62 in the server 6.For example, the computer program 62 can be divided It is cut into voted command and obtains module, the first transmission module, the second transmission module and statistical module, each module concrete function is such as Under:
Voted command obtains module, the voted command inputted for obtaining user by voting user node;First transmission Module, for the first ballot channel that intelligent contract can be revoked and pre-establish that expired by pre-generated sequence, according to throwing Corresponding ballot transmission to tank node of voting, the first ballot channel are at least one voting user node and ballot pond by ticket instruction Channel between node;Second transmission module, for passing through pre-generated Hash time lock intelligence contract and pre-establishing The second ballot channel, by the ballot transmission in tank node of voting to corresponding candidate node, the second ballot channel is ballot Channel between tank node and at least one candidate node;Statistical module, for counting the ballot paper number of each candidate node Amount, obtains voting results, voting results is transmitted to block chain node, so that block chain node stores and broadcasts voting results; Wherein, voting user node, ballot tank node and candidate node are the node in lightning network.
The server may include, but be not limited only to, processor 60, memory 61.It will be understood by those skilled in the art that Fig. 6 is only the example of server 6, does not constitute the restriction to server 6, may include than illustrating more or fewer portions Part perhaps combines certain components or different components, such as the server can also include input-output equipment, network Access device, bus etc..
Alleged processor 60 can be central processing unit (Central Processing Unit, CPU), can also be Other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field- Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor Deng.
The memory 61 can be the internal storage unit of the server 6, such as the hard disk or memory of server 6. The memory 61 is also possible to the External memory equipment of the server 6, such as the plug-in type being equipped on the server 6 is hard Disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card) etc..Further, the memory 61 can also both include the internal storage unit of the server 6 or wrap Include External memory equipment.The memory 61 is for other programs needed for storing the computer program and the server And data.The memory 61 can be also used for temporarily storing the data that has exported or will export.
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each function Can unit, module division progress for example, in practical application, can according to need and by above-mentioned function distribution by different Functional unit, module are completed, i.e., the internal structure of described device is divided into different functional unit or module, more than completing The all or part of function of description.Each functional unit in embodiment, module can integrate in one processing unit, can also To be that each unit physically exists alone, can also be integrated in one unit with two or more units, it is above-mentioned integrated Unit both can take the form of hardware realization, can also realize in the form of software functional units.In addition, each function list Member, the specific name of module are also only for convenience of distinguishing each other, the protection scope being not intended to limit this application.Above system The specific work process of middle unit, module, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, is not described in detail or remembers in some embodiment The part of load may refer to the associated description of other embodiments.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed Scope of the present application.
In embodiment provided herein, it should be understood that disclosed device, server and method, Ke Yitong Other modes are crossed to realize.For example, device described above, server example are only schematical, for example, the mould The division of block or unit, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple Unit or assembly can be combined or can be integrated into another system, or some features can be ignored or not executed.It is another Point, shown or discussed mutual coupling or direct-coupling or communication connection can be through some interfaces, device or The INDIRECT COUPLING or communication connection of unit can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, each functional unit in each embodiment of the application can integrate in one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated module or unit are realized in the form of SFU software functional unit and sell as independent product Or it in use, can store in a computer readable storage medium.Based on this understanding, the application realizes above-mentioned reality The all or part of the process in a method is applied, relevant hardware can also be instructed to complete by computer program, it is described Computer program can be stored in a computer readable storage medium, the computer program when being executed by processor, it can be achieved that The step of above-mentioned each embodiment of the method.Wherein, the computer program includes computer program code, the computer program Code can be source code form, object identification code form, executable file or certain intermediate forms etc..Computer-readable Jie Matter may include: can carry the computer program code any entity or device, recording medium, USB flash disk, mobile hard disk, Magnetic disk, CD, computer storage, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that described The content that computer-readable medium includes can carry out increasing appropriate according to the requirement made laws in jurisdiction with patent practice Subtract, such as does not include electric carrier signal and electricity according to legislation and patent practice, computer-readable medium in certain jurisdictions Believe signal.
Embodiment described above is only to illustrate the technical solution of the application, rather than its limitations;Although referring to aforementioned reality Example is applied the application is described in detail, those skilled in the art should understand that: it still can be to aforementioned each Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified Or replacement, the spirit and scope of each embodiment technical solution of the application that it does not separate the essence of the corresponding technical solution should all Comprising within the scope of protection of this application.

Claims (10)

1. a kind of voting method characterized by comprising
Obtain the voted command that user is inputted by voting user node;
Expired the first ballot channel that intelligent contract can be revoked and pre-establish by pre-generated sequence, according to the ballot Instruction by corresponding ballot transmission to tank node of voting, first ballot channel be at least one described voting user node and Channel between the ballot tank node;
By pre-generated Hash time lock intelligence contract and the second ballot channel pre-established, the ballot pond is saved The ballot transmission in point to corresponding candidate node, second ballot channel be the ballot tank node with it is described extremely Channel between a few candidate node;
The ballot paper quantity for counting each candidate node, obtains voting results, and the voting results are transmitted to block chain Node, so that the block chain node stores and broadcasts the voting results;
Wherein, the voting user node, the ballot tank node and the candidate node are the node in lightning network.
2. voting method according to claim 1, which is characterized in that defeated by voting user node in the acquisition user Before the voted command entered, further includes:
It obtains ballot and initiates instruction;
It initiates to instruct according to the ballot, distributes the ballot paper to each user according to default voting rule;
According to default polling option, the candidate node is established;
Described first for establishing the ballot tank node, and establishing between the voting user node and the ballot tank node is thrown Second ballot channel between ticket channel and the ballot tank node and at least one described candidate node.
3. voting method according to claim 2, which is characterized in that before initiation instruction is voted in the acquisition, also wrap It includes:
Obtain the ballot qualification examination information of the user;
According to the ballot qualification examination information, judge whether the user has ballot qualification;
When the user has the ballot qualification, ballot permission is distributed for the user.
4. voting method according to any one of claims 1 to 3, which is characterized in that in each candidate of statistics The ballot paper quantity of person's node, obtains voting results, and the voting results are transmitted to after block chain node, further includes:
Obtain voting results inquiry instruction;
According to the voting results inquiry instruction, corresponding target voting results are searched from the block chain node, and are shown The target voting results.
5. voting method according to claim 4, which is characterized in that after the display target voting results, Further include:
Acquisition is traced to the source request;
According to the request of tracing to the source, key of tracing to the source corresponding with the target voting results is generated;
The key of tracing to the source is presented to the user that traces to the source, so that the user that traces to the source is by the key of tracing to the source from the block chain Node obtains the target voting results.
6. a kind of balloting device characterized by comprising
Voted command obtains module, the voted command inputted for obtaining user by voting user node;
First transmission module, for the first ballot that intelligent contract can be revoked and pre-establish that expired by pre-generated sequence Channel, according to the voted command by corresponding ballot transmission to tank node of voting, first ballot channel is at least one Channel between the voting user node and the ballot tank node;
Second transmission module, for logical by pre-generated Hash time lock intelligence contract and the second ballot pre-established Road, by the ballot transmission in the ballot tank node to corresponding candidate node, second ballot channel is described The channel voted between tank node and at least one described described candidate node;
Statistical module obtains voting results, by the voting results for counting the ballot paper quantity of each candidate node It is transmitted to block chain node, so that the block chain node stores and broadcasts the voting results;
Wherein, the voting user node, the ballot tank node and the candidate node are the node in lightning network.
7. balloting device according to claim 6, which is characterized in that further include:
Instruction acquisition module is initiated in ballot, initiates instruction for obtaining ballot;
Ballot paper distribution module is distributed according to default voting rule to each user for initiating to instruct according to the ballot The ballot paper;
First establishes module, for establishing the candidate node according to polling option is preset;
Second establishes module, for establishing the ballot tank node, and establishes the voting user node and ballot pond section Point between it is described first ballot channel and it is described ballot tank node and at least one described candidate node between it is described Second ballot channel.
8. a kind of ballot system, which is characterized in that including lightning network and block chain network, the block chain network includes at least One block chain node, the lightning network include server, voting user node, ballot tank node and candidate node; At least one described voting user node is connect by the first ballot channel with the ballot tank node, and voter's node is logical The second ballot channel is crossed to connect at least one described candidate node;
The server is for obtaining the voted command that user is inputted by the voting user node;Pass through pre-generated sequence Column expire revocable intelligent contract and first ballot channel, according to the voted command by corresponding ballot transmission to described Ballot tank node;By pre-generated Hash time lock intelligence contract and second ballot channel, by the ballot pond The ballot transmission in node is to the corresponding candidate node;The ballot paper quantity of each candidate node is counted, It obtains voting results, the voting results is transmitted to the block chain node, so that the block chain node is stored and broadcasted The voting results.
9. a kind of server, which is characterized in that in the memory and can be described including memory, processor and storage The computer program run on processor, the processor are realized when executing the computer program as claim 1 to 5 is any The step of item voting method.
10. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage has computer journey Sequence is realized as described in any one of claim 1 to 5 when the computer program is executed by processor the step of voting method.
CN201910047308.4A 2019-01-18 2019-01-18 Voting method, device, system, server and computer readable storage medium Active CN109830029B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910047308.4A CN109830029B (en) 2019-01-18 2019-01-18 Voting method, device, system, server and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910047308.4A CN109830029B (en) 2019-01-18 2019-01-18 Voting method, device, system, server and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN109830029A true CN109830029A (en) 2019-05-31
CN109830029B CN109830029B (en) 2021-05-14

Family

ID=66861814

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910047308.4A Active CN109830029B (en) 2019-01-18 2019-01-18 Voting method, device, system, server and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109830029B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110766854A (en) * 2019-10-30 2020-02-07 口碑(上海)信息技术有限公司 Voting data processing method and device
CN111833510A (en) * 2019-12-25 2020-10-27 北京熠智科技有限公司 Voting processing method and device based on block chain, equipment and storage medium
CN114093079A (en) * 2020-07-30 2022-02-25 中国电信股份有限公司 Electronic voting method and device based on block chain

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160027229A1 (en) * 2014-07-25 2016-01-28 Blockchain Technologies Corporation System and method for securely receiving and counting votes in an election
US20170109955A1 (en) * 2015-10-20 2017-04-20 Follow My Vote, Inc. Blockchain electronic voting system and method
US20170352219A1 (en) * 2015-08-06 2017-12-07 Blockchain Technologies Corporation System and method for securely receiving and counting votes in an election
CN107833135A (en) * 2017-10-30 2018-03-23 中山大学 A kind of fair Protocol of Electronic Voting based on block chain
CN107846289A (en) * 2017-10-11 2018-03-27 众安信息技术服务有限公司 It is a kind of to support artificial method, electronic equipment and the system for participating in block chain decision-making
CN108922007A (en) * 2018-05-02 2018-11-30 深圳圣马歌科技有限公司 Electronic voting method, system and computer program product based on block chain

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160027229A1 (en) * 2014-07-25 2016-01-28 Blockchain Technologies Corporation System and method for securely receiving and counting votes in an election
US20170352219A1 (en) * 2015-08-06 2017-12-07 Blockchain Technologies Corporation System and method for securely receiving and counting votes in an election
US20170109955A1 (en) * 2015-10-20 2017-04-20 Follow My Vote, Inc. Blockchain electronic voting system and method
CN107846289A (en) * 2017-10-11 2018-03-27 众安信息技术服务有限公司 It is a kind of to support artificial method, electronic equipment and the system for participating in block chain decision-making
CN107833135A (en) * 2017-10-30 2018-03-23 中山大学 A kind of fair Protocol of Electronic Voting based on block chain
CN108922007A (en) * 2018-05-02 2018-11-30 深圳圣马歌科技有限公司 Electronic voting method, system and computer program product based on block chain

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110766854A (en) * 2019-10-30 2020-02-07 口碑(上海)信息技术有限公司 Voting data processing method and device
CN111833510A (en) * 2019-12-25 2020-10-27 北京熠智科技有限公司 Voting processing method and device based on block chain, equipment and storage medium
CN114093079A (en) * 2020-07-30 2022-02-25 中国电信股份有限公司 Electronic voting method and device based on block chain

Also Published As

Publication number Publication date
CN109830029B (en) 2021-05-14

Similar Documents

Publication Publication Date Title
Levin The invisible resource: use and regulation of the radio spectrum
CN109830029A (en) Voting method, device, system and server, computer readable storage medium
CN110674222B (en) Data sharing method, device, equipment and medium
CN106778109A (en) A kind of certification authority evaluation method and device based on intelligent contract
CN110928951A (en) Data sharing and arbitration method based on block chain
CN112540926A (en) Resource allocation fairness federal learning method based on block chain
CN107845043A (en) A kind of method of estate management, system, equipment and computer-readable recording medium
CN108615152B (en) Transaction device based on block chain
CN111324663A (en) Data processing method, device and equipment based on block chain and readable storage medium
CN110266872A (en) Management-control method, device and the cloud address book system of address book data
CN106168956A (en) data statistical analysis method and system for intelligent terminal
CN110557276A (en) Block chain computer room management system based on Fabric architecture
CN104851179A (en) Voting system based on WeChat public platform
CN108769757A (en) video statistics and transaction system and method
CN107909502A (en) A kind of owner's expression, the system, method and business model for exercising and realizing its proprietary interest
CN205451174U (en) Intelligence law enforcement management device suitable for food and drug safety trade
CN113114629B (en) Contract management method, device, equipment and storage medium based on block chain
CN104378329A (en) Safety verification method, device and system
CN112039893B (en) Private transaction processing method and device, electronic equipment and readable storage medium
CN109886703A (en) Electronic bill information processing method, device and electronic ticket business system
CN110958120B (en) Electronic voting method, device and storage medium based on block chain
CN109242274A (en) A kind of assessment method of vehicle, apparatus and system
CN200990642Y (en) Digital wired television one family several-machine receiving management system
CN112686390B (en) Combined modeling method, system and device with storage function
CN108924754A (en) Kindergarten's screening technique and system

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
TR01 Transfer of patent right

Effective date of registration: 20240604

Address after: Room 17A11, No. 27 Shuiyin Erheng Road, Yuexiu District, Guangzhou City, Guangdong Province, 510075

Patentee after: Guangzhou Zhongxian Technology Co.,Ltd.

Country or region after: China

Address before: 518000 Guangdong Shenzhen Baoan District Xin'an Street Xingdong community 67 District COFCO experience Museum (1) 203A

Patentee before: SHENZHEN ZHILIAN IOT TECHNOLOGY Co.,Ltd.

Country or region before: China