Summary of the invention
In order to solve the problem that has the behavior of brush ticket in prior art in network voting, the embodiment of the present invention provides a kind of network voting method and apparatus.Described technical scheme is as follows:
On the one hand, the embodiment of the present invention provides a kind of network voting method, and described method comprises:
From background server, obtain anti-brush ticket strategy, at least one in the ballot frequency threshold value of the IP address that described anti-brush ticket strategy comprises an IP address or a network segment within cycle time and user name ballot frequency threshold value within cycle time;
Receive the vote information that client sends, described vote information comprises: ballot activity mark, voter's IP address or user name, polling option and ballot poll;
Judge that described voter's IP address or user name are whether in blacklist, described blacklist comprises invalid vote people's IP address or user name, and described invalid vote people's IP address or user name reach the voter's of ballot frequency threshold value IP address or user name for being recorded in interior ballot cycle time number of times;
If described voter IP address or user name in blacklist, determine that the described vote information receiving is invalid;
If described voter IP address or user name not in blacklist, are searched described voter's IP address or the historical poll of user name in behavior database, described behavior database is used for storing historical poll;
According to the historical poll of described voter's IP address or user name and the described vote information receiving, determine described voter's IP address or the ballot number of times of user name within cycle time;
If described voter's IP address or the user name ballot number of times within cycle time reaches the ballot frequency threshold value in described anti-brush ticket strategy, determine that the described vote information receiving is invalid;
If described voter's IP address or the user name ballot number of times within cycle time does not reach the ballot frequency threshold value in described anti-brush ticket strategy, determine that the described vote information receiving is effective, and carry out count of votes according to the polling option in described vote information and ballot poll.
In a kind of implementation of the embodiment of the present invention, describedly from background server, obtain anti-brush ticket strategy, comprising:
Receive the signal that timing thread sends;
In the time that the signal designation of described timing thread reaches predetermined time interval, from background server, obtain anti-brush ticket strategy.
In the another kind of implementation of the embodiment of the present invention, described method also comprises:
If described voter's IP address or the user name ballot number of times within cycle time reaches the ballot frequency threshold value in described anti-brush ticket strategy, using described voter's IP address or user name add in described blacklist as invalid vote people's IP address or user name.
In the another kind of implementation of the embodiment of the present invention, described method also comprises:
Periodically empty described blacklist; Or,
When the Penalty time of the voter in blacklist reached after the scheduled time, the IP address or the user name that Penalty time are reached to the described voter of the scheduled time remove from described blacklist, IP address or the user name time in described blacklist of described Penalty time for recording described voter.
In the another kind of implementation of the embodiment of the present invention, described method also comprises:
In the time that definite described vote information is effective, the IP address of voter in described vote information or user name and time of receiving vote information are write in the historical poll in described behavior database.
On the other hand, the embodiment of the present invention also provides a kind of network voting device, and described device comprises:
Acquisition module, for obtaining anti-brush ticket strategy from background server, at least one in the ballot frequency threshold value of the IP address that described anti-brush ticket strategy comprises an IP address or a network segment within cycle time and user name ballot frequency threshold value within cycle time;
Receiver module, the vote information sending for receiving client, described vote information comprises: ballot activity mark, voter's IP address or user name, polling option and ballot poll;
Pre-judge module, for judging that whether the IP address of voter described in the vote information that described receiver module receives or user name are in blacklist, described blacklist comprises invalid vote people's IP address or user name, and described invalid vote people's IP address or user name reach the voter's of ballot frequency threshold value IP address or user name for being recorded in interior ballot cycle time number of times;
In the time that described voter IP address or user name are in blacklist, determine that the described vote information receiving is invalid;
Anti-brush ticket module in described voter IP address or user name during not in blacklist, is searched described voter's IP address or the historical poll of user name in behavior database, and described behavior database is used for storing historical poll; According to the historical poll of described voter's IP address or user name and the described vote information receiving, determine described voter's IP address or the ballot number of times of user name within cycle time;
In the time that described voter's IP address or the ballot number of times of user name within cycle time reach the ballot frequency threshold value in the described anti-brush ticket strategy that described acquisition module gets, determine that the described vote information receiving is invalid;
Count of votes module, for in described voter's IP address or when the ballot number of times of user name within cycle time do not reach the ballot frequency threshold value of described anti-brush ticket strategy, determine that the described vote information that receives is effective, and polling option and ballot poll in the described vote information receiving according to described receiver module carried out count of votes.
In a kind of implementation of the embodiment of the present invention, described acquisition module comprises:
Receiving element, the signal sending for receiving timing thread;
Acquiring unit in the time that the signal designation of described timing thread reaches predetermined time interval, obtains anti-brush ticket strategy from background server.
In the another kind of implementation of the embodiment of the present invention, described pre-judge module comprises:
Setting unit, for in the time that described voter's IP address or the ballot number of times of user name within cycle time reach the ballot frequency threshold value of described anti-brush ticket strategy, using described voter's IP address or user name add described blacklist as invalid vote people's IP address or user name.
In the another kind of implementation of the embodiment of the present invention, described setting unit, also for periodically emptying described blacklist; Or,
When the Penalty time of the voter in blacklist reached after the scheduled time, the IP address or the user name that Penalty time are reached to the described voter of the scheduled time remove from described blacklist, IP address or the user name time in described blacklist of described Penalty time for recording described voter.
In the another kind of implementation of the embodiment of the present invention, described anti-brush ticket module comprises:
Record cell, in the time that definite described vote information is effective, writes the IP address of voter in described vote information or user name and time of receiving vote information in the historical poll in described behavior database.
The beneficial effect that the technical scheme that the embodiment of the present invention provides is brought is:
By receiving after the vote information of client transmission, judge that the IP address of voter in vote information or user name are whether in blacklist, if voter's IP address or user name are in blacklist, determine that the vote information receiving is invalid, blacklist comprises invalid vote people's IP address or user name, invalid vote people's IP address or user name reach the voter's of ballot frequency threshold value IP address or user name for being recorded in interior ballot cycle time number of times, so just avoided user's brush ticket behavior; If voter's IP address or user name be not in blacklist, search voter's IP address or the historical poll of user name, according to the historical poll of voter's IP address or user name and the vote information receiving, determine voter's IP address or the ballot number of times of user name within cycle time; If voter's IP address or the user name ballot number of times within cycle time does not reach the ballot frequency threshold value in anti-brush ticket strategy, determine that the vote information receiving is effective, and carry out count of votes according to the polling option in vote information and ballot poll, make user cannot brush ticket, by above-mentioned two aspects, user is brushed to ticket and be on the defensive, avoided brushing in network voting the harm that ticket behavior brings.
Embodiment
For making the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
For the ease of the description of embodiment, below first simply introduce the application scenarios of embodiment in the present invention.Referring to Fig. 1, this scene comprises client 1, and client 1 can be the equipment such as PC, mobile terminal.User in client 1, is provided with and can carries out the application of network voting, so that can carry out network voting.Client 1 is connected by network with server 2.Server 2 receives the vote information that user sends by client 1, and carries out the functions such as ticket checking statistics.
It should be noted that, above-described device category and connected mode are only for giving an example, and the present invention is not restricted this.
Embodiment mono-
The embodiment of the present invention provides a kind of network voting method, is applicable to the server of network voting, and referring to Fig. 2, the method comprises:
Step 101: obtain anti-brush ticket strategy from background server, at least one in the ballot frequency threshold value of the IP address that anti-brush ticket strategy comprises an IP address or a network segment within cycle time and user name ballot frequency threshold value within cycle time.
Step 102: receive the vote information that client sends, vote information comprises: ballot activity mark, voter's IP address or user name, polling option and ballot poll;
Particularly, ballot activity mark is used to refer to the ballot that this vote information participates in, because may a voter can vote to many ballot activities simultaneously.In the time that user adopts real name ballot, vote information can be used as identify label with voter's user name.And in the time that user adopts anonymous identity ballot, now voter's user is by name empty, vote information can be used as identify label with voter's IP address.Here voter's IP address is generally IP (the Internet Protocol that voter sends the client of vote information, Internet protocol) address, it can certainly be MAC (Media Access Control, media the are got involved key-course) address of client.Polling option is the option that ballot person throws, and can be both that an option also can multiple options.Ballot poll is corresponding with polling option, and in the time can throwing multiple option, the poll of each option is corresponding with it.Certainly, can only throw in the ballot of fixing poll (as a ticket) each option, this ballot poll can be omitted.
Step 103: judge that voter's IP address or user name are whether in blacklist, blacklist comprises invalid vote people's IP address or user name, and invalid vote people's IP address or user name reach the voter's of ballot frequency threshold value IP address or user name for being recorded in interior ballot cycle time number of times; If voter IP address or user name in blacklist, determine that the vote information receiving is invalid; If voter IP address or user name, not in blacklist, perform step 104.
Invalid vote people's IP address or vote information corresponding to user name are invalid, i.e. the current qualification of not voting, and poll is not counted in the result of this ballot.
In blacklist, also can as anti-brush ticket strategy, be on the defensive with the IP address of the network segment.
This blacklist is stored in the server of network voting.The generation strategy of this blacklist can be further explained below, and this blacklist also can be arranged by administrator hand certainly, with practical requirement.
Step 104: search voter's IP address or the historical poll of user name in behavior database, behavior database is used for storing historical poll.
This history poll is stored in the server of network voting.The generation strategy of this history poll can be further explained below.
Step 105: according to the historical poll of voter's IP address or user name and the vote information receiving, determine whether voter's IP address or the ballot number of times of user name within cycle time reach the ballot frequency threshold value in anti-brush ticket strategy; If voter's IP address or the user name ballot number of times within cycle time reaches the ballot frequency threshold value in anti-brush ticket strategy, determine that the vote information receiving is invalid; If voter's IP address or the user name ballot number of times within cycle time does not reach the ballot frequency threshold value in anti-brush ticket strategy, perform step 106.
Particularly, determine IP address or the ballot number of times of user name in historical poll of voter within cycle time, the ballot number of times in this history poll is added after one and ballot frequency threshold value in cycle time relatively.Here the ballot number of times in historical poll being added to one is because this ballot is not counted in historical poll.
Determining behind the IP address or the ballot number of times of user name in historical poll of voter in cycle time, from anti-brush ticket strategy, to find out with respect to ground ballot frequency threshold value, the correspondence here refers to corresponding with voter's IP address or user name.For example, when in the vote information receiving, carry be voter's IP address time, first search anti-brush ticket strategy corresponding to this IP address, if anti-brush ticket strategy corresponding to this IP address not, remove to mate the corresponding network segment with this IP address, determine the anti-brush ticket strategy of its correspondence.
Step 106: determine that the vote information receiving is effective, and carry out count of votes according to the polling option in vote information and ballot poll.
The embodiment of the present invention is by receiving after the vote information of client transmission, judge that the IP address of voter in vote information or user name are whether in blacklist, if voter's IP address or user name are in blacklist, determine that the vote information receiving is invalid, blacklist comprises invalid vote people's IP address or user name, invalid vote people's IP address or user name reach the voter's of ballot frequency threshold value IP address or user name for being recorded in interior ballot cycle time number of times, so just avoided user's brush ticket behavior; If voter's IP address or user name be not in blacklist, search voter's IP address or the historical poll of user name, according to the historical poll of voter's IP address or user name and the vote information receiving, determine voter's IP address or the ballot number of times of user name within cycle time; If voter's IP address or the user name ballot number of times within cycle time does not reach the ballot frequency threshold value in anti-brush ticket strategy, determine that the vote information receiving is effective, and carry out count of votes according to the polling option in vote information and ballot poll, make user cannot brush ticket, by above-mentioned two aspects, user is brushed to ticket and be on the defensive, avoided brushing in network voting the harm that ticket behavior brings.
Embodiment bis-
The embodiment of the present invention provides a kind of network voting method, is applicable to the server of network voting, and referring to Fig. 3, the method comprises:
Step 201: obtain anti-brush ticket strategy from background server, at least one in the ballot frequency threshold value of the IP address that anti-brush ticket strategy comprises an IP address or a network segment within cycle time and user name ballot frequency threshold value within cycle time.
Particularly, step 201 can comprise:
Receive the signal that timing thread sends;
In the time that the signal designation of timing thread reaches predetermined time interval, from background server, obtain anti-brush ticket strategy.
The predetermined time interval here can arrange according to actual needs, for example 10 seconds.Can ensure in the situation that not needing shutdown, anti-brush ticket strategy to be upgraded by periodically obtaining anti-brush ticket strategy, to ensure that behavior is better defendd for brush ticket.
The content of anti-brush ticket strategy can also be more shifty combination in the present embodiment, not with the aforementioned system that is limited.
Step 202: receive the vote information that client sends, vote information comprises: ballot activity mark, voter's IP address or user name, polling option and ballot poll;
Particularly, ballot activity mark is used to refer to the ballot that this vote information participates in, because may a voter can vote to many ballot activities simultaneously.In the time that user adopts real name ballot, vote information can be used as identify label with voter's user name.And in the time that user adopts anonymous identity ballot, now voter's user is by name empty, vote information can be used as identify label with voter's IP address.Here voter's IP address is generally the IP address of voter's client of sending vote information, can certainly be the MAC Address of client.Polling option is the option that ballot person throws, and can be both that an option also can multiple options.Ballot poll is corresponding with polling option, and in the time can throwing multiple option, the poll of each option is corresponding with it.Certainly, can only throw in the ballot of fixing poll (as a ticket) each option, this ballot poll can be omitted.
Step 203: judge that voter's IP address or user name are whether in blacklist, blacklist comprises invalid vote people's IP address or user name, and invalid vote people's IP address or user name reach the voter's of ballot frequency threshold value IP address or user name for being recorded in interior ballot cycle time number of times; If voter IP address or user name in blacklist, determine that the vote information receiving is invalid; If voter IP address or user name, not in blacklist, perform step 204.
Invalid vote people's IP address or vote information corresponding to user name are invalid, i.e. the current qualification of not voting, and poll is not counted in the result of this ballot.
In blacklist, also can as anti-brush ticket strategy, be on the defensive with the IP address of the network segment.
This blacklist is stored in the server of network voting.The generation strategy of this blacklist can be further explained below, and this blacklist also can be arranged by administrator hand certainly, with practical requirement.
Further, the method can also comprise:
Periodically empty blacklist; Or,
When the Penalty time of the voter in blacklist reached after the scheduled time, the IP address or the user name that Penalty time are reached to the voter of the scheduled time remove from blacklist, IP address or the user name time in blacklist of Penalty time for recording voter.
For example, 0 of every day empty blacklist, or the time that voter enters blacklist be 2 hours, after two hours, can automatically from blacklist, be removed.
Step 204: search voter's IP address or the historical poll of user name in behavior database, behavior database is used for storing historical poll.
This history poll is stored in the server of network voting.The generation strategy of this history poll can be further explained below.
Step 205: according to the historical poll of voter's IP address or user name and the vote information receiving, determine whether voter's IP address or the ballot number of times of user name within cycle time reach the ballot frequency threshold value in anti-brush ticket strategy; If voter's IP address or the user name ballot number of times within cycle time reaches the ballot frequency threshold value in anti-brush ticket strategy, perform step 206; If voter's IP address or the user name ballot number of times within cycle time does not reach the ballot frequency threshold value in anti-brush ticket strategy, perform step 207.
Particularly, determine IP address or the ballot number of times of user name in historical poll of voter within cycle time, the ballot number of times in this history poll is added after one and ballot frequency threshold value in cycle time relatively.Here the ballot number of times in historical poll being added to one is because this ballot is not counted in historical poll.
Determining behind the IP address or the ballot number of times of user name in historical poll of voter in cycle time, from anti-brush ticket strategy, to find out with respect to ground ballot frequency threshold value, the correspondence here refers to corresponding with voter's IP address or user name.For example, when in the vote information receiving, carry be voter's IP address time, first search anti-brush ticket strategy corresponding to this IP address, if anti-brush ticket strategy corresponding to this IP address not, remove to mate the corresponding network segment with this IP address, determine the anti-brush ticket strategy of its correspondence.
Step 206: determine that the vote information that receives is invalid, and using voter's IP address or user name add in blacklist as invalid vote people's IP address or user name.
Particularly, in both cases, the vote information that can acknowledge receipt of is invalid, and a kind of is that this voter's IP address or user name are in blacklist.Another kind be this voter's IP address or user name not in blacklist, but its ballot number of times within cycle time of this voter's this time vote out reaches ballot frequency threshold value, in the second situation, also can be confirmed as vote information invalid.
Step 207: determine that the vote information receiving is effective, and carry out count of votes according to the polling option in vote information and ballot poll.
Particularly, determine ballot play according to ballot activity mark in vote information, according to polling option and ballot poll, the poll of this ballot play is added up.Certainly except can adding up polling option poll, can also add up voter's polling option.
Step 208: the IP address of voter in vote information or user name and time of receiving vote information are write in the historical poll in behavior database.
The embodiment of the present invention is by receiving after the vote information of client transmission, judge that the IP address of voter in vote information or user name are whether in blacklist, if voter's IP address or user name are in blacklist, determine that the vote information receiving is invalid, blacklist comprises invalid vote people's IP address or user name, invalid vote people's IP address or user name reach the voter's of ballot frequency threshold value IP address or user name for being recorded in interior ballot cycle time number of times, so just avoided user's brush ticket behavior; If voter's IP address or user name be not in blacklist, search voter's IP address or the historical poll of user name, according to the historical poll of voter's IP address or user name and the vote information receiving, determine voter's IP address or the ballot number of times of user name within cycle time; If voter's IP address or the user name ballot number of times within cycle time does not reach the ballot frequency threshold value in anti-brush ticket strategy, determine that the vote information receiving is effective, and carry out count of votes according to the polling option in vote information and ballot poll, make user cannot brush ticket, by above-mentioned two aspects, user is brushed to ticket and be on the defensive, avoided brushing in network voting the harm that ticket behavior brings.
Embodiment tri-
The embodiment of the present invention provides a kind of network voting device, and referring to Fig. 4, this server comprises:
Acquisition module 301, for obtaining anti-brush ticket strategy from background server, at least one in the ballot frequency threshold value of the IP address that anti-brush ticket strategy comprises an IP address or a network segment within cycle time and user name ballot frequency threshold value within cycle time.
Receiver module 302, the vote information sending for receiving client, vote information comprises: ballot activity mark, voter's IP address or user name, polling option and ballot poll.
Particularly, ballot activity mark is used to refer to the ballot that this vote information participates in, because may a voter can vote to many ballot activities simultaneously.In the time that user adopts real name ballot, vote information can be used as identify label with voter's user name.And in the time that user adopts anonymous identity ballot, now voter's user is by name empty, vote information can be used as identify label with voter's IP address.Here voter's IP address is generally the IP address of voter's client of sending vote information, can certainly be the MAC Address of client.Polling option is the option that ballot person throws, and can be both that an option also can multiple options.Ballot poll is corresponding with polling option, and in the time can throwing multiple option, the poll of each option is corresponding with it.Certainly, can only throw in the ballot of fixing poll (as a ticket) each option, this ballot poll can be omitted.
Pre-judge module 303, for judging that the vote information voter's that receiver module 302 receives IP address or user name are whether in blacklist, blacklist comprises invalid vote people's IP address or user name, and invalid vote people's IP address or user name reach the voter's of ballot frequency threshold value IP address or user name for being recorded in interior ballot cycle time number of times;
In the time that voter IP address or user name are in blacklist, determine that the vote information receiving is invalid.
Invalid vote people's IP address or vote information corresponding to user name are invalid, i.e. the current qualification of not voting, and poll is not counted in the result of this ballot.
In blacklist, also can as anti-brush ticket strategy, be on the defensive with the IP address of the network segment.
Anti-brush ticket module 304 in voter IP address or user name during not in blacklist, is searched voter's IP address or the historical poll of user name in behavior database, and behavior database is used for storing historical poll; According to the historical poll of voter's IP address or user name and the vote information receiving, determine voter's IP address or the ballot number of times of user name within cycle time;
In the time that voter's IP address or the ballot number of times of user name within cycle time reach the ballot frequency threshold value in the anti-brush ticket strategy that acquisition module 301 gets, determine that the vote information receiving is invalid.
Particularly, determine IP address or the ballot number of times of user name in historical poll of voter within cycle time, the ballot number of times in this history poll is added after one and ballot frequency threshold value in cycle time relatively.Here the ballot number of times in historical poll being added to one is because this ballot is not counted in historical poll.
Determining behind the IP address or the ballot number of times of user name in historical poll of voter in cycle time, from anti-brush ticket strategy, to find out with respect to ground ballot frequency threshold value, the correspondence here refers to corresponding with voter's IP address or user name.For example, when in the vote information receiving, carry be voter's IP address time, first search anti-brush ticket strategy corresponding to this IP address, if anti-brush ticket strategy corresponding to this IP address not, remove to mate the corresponding network segment with this IP address, determine the anti-brush ticket strategy of its correspondence.
Count of votes module 305, for in voter's IP address or when the ballot number of times of user name within cycle time do not reach the ballot frequency threshold value of anti-brush ticket strategy, determine that the vote information that receives is effective, and polling option and ballot poll in the vote information receiving according to receiver module 302 carried out count of votes.
The embodiment of the present invention is by receiving after the vote information of client transmission, judge that the IP address of voter in vote information or user name are whether in blacklist, if voter's IP address or user name are in blacklist, determine that the vote information receiving is invalid, blacklist comprises invalid vote people's IP address or user name, invalid vote people's IP address or user name reach the voter's of ballot frequency threshold value IP address or user name for being recorded in interior ballot cycle time number of times, so just avoided user's brush ticket behavior; If voter's IP address or user name be not in blacklist, search voter's IP address or the historical poll of user name, according to the historical poll of voter's IP address or user name and the vote information receiving, determine voter's IP address or the ballot number of times of user name within cycle time; If voter's IP address or the user name ballot number of times within cycle time does not reach the ballot frequency threshold value in anti-brush ticket strategy, determine that the vote information receiving is effective, and carry out count of votes according to the polling option in vote information and ballot poll, make user cannot brush ticket, by above-mentioned two aspects, user is brushed to ticket and be on the defensive, avoided brushing in network voting the harm that ticket behavior brings.
Embodiment tetra-
The embodiment of the present invention provides a kind of network voting device, and referring to Fig. 5, this server comprises:
Acquisition module 401, for obtaining anti-brush ticket strategy from background server, at least one in the ballot frequency threshold value of the IP address that anti-brush ticket strategy comprises an IP address or a network segment within cycle time and user name ballot frequency threshold value within cycle time.
Receiver module 402, the vote information sending for receiving client, vote information comprises: ballot activity mark, voter's IP address or user name, polling option and ballot poll.
Particularly, ballot activity mark is used to refer to the ballot that this vote information participates in, because may a voter can vote to many ballot activities simultaneously.In the time that user adopts real name ballot, vote information can be used as identify label with voter's user name.And in the time that user adopts anonymous identity ballot, now voter's user is by name empty, vote information can be used as identify label with voter's IP address.Here voter's IP address is generally the IP address of voter's client of sending vote information, can certainly be the MAC Address of client.Polling option is the option that ballot person throws, and can be both that an option also can multiple options.Ballot poll is corresponding with polling option, and in the time can throwing multiple option, the poll of each option is corresponding with it.Certainly, can only throw in the ballot of fixing poll (as a ticket) each option, this ballot poll can be omitted.
Pre-judge module 403, for judging that the vote information voter's that receiver module 402 receives IP address or user name are whether in blacklist, blacklist comprises invalid vote people's IP address or user name, and invalid vote people's IP address or user name reach the voter's of ballot frequency threshold value IP address or user name for being recorded in interior ballot cycle time number of times;
In the time that voter IP address or user name are in blacklist, determine that the vote information receiving is invalid.
Invalid vote people's IP address or vote information corresponding to user name are invalid, i.e. the current qualification of not voting, and poll is not counted in the result of this ballot.
In blacklist, also can as anti-brush ticket strategy, be on the defensive with the IP address of the network segment.
Anti-brush ticket module 404 in voter IP address or user name during not in blacklist, is searched voter's IP address or the historical poll of user name in behavior database, and behavior database is used for storing historical poll; According to the historical poll of voter's IP address or user name and the vote information receiving, determine voter's IP address or the ballot number of times of user name within cycle time;
In the time that voter's IP address or the ballot number of times of user name within cycle time reach the ballot frequency threshold value in the anti-brush ticket strategy that acquisition module 401 gets, determine that the vote information receiving is invalid.
Particularly, determine IP address or the ballot number of times of user name in historical poll of voter within cycle time, the ballot number of times in this history poll is added after one and ballot frequency threshold value in cycle time relatively.Here the ballot number of times in historical poll being added to one is because this ballot is not counted in historical poll.
Determining behind the IP address or the ballot number of times of user name in historical poll of voter in cycle time, from anti-brush ticket strategy, to find out with respect to ground ballot frequency threshold value, the correspondence here refers to corresponding with voter's IP address or user name.For example, when in the vote information receiving, carry be voter's IP address time, first search anti-brush ticket strategy corresponding to this IP address, if anti-brush ticket strategy corresponding to this IP address not, remove to mate the corresponding network segment with this IP address, determine the anti-brush ticket strategy of its correspondence.
Count of votes module 405, for in voter's IP address or when the ballot number of times of user name within cycle time do not reach the ballot frequency threshold value of anti-brush ticket strategy, determine that the vote information that receives is effective, and polling option and ballot poll in the vote information receiving according to receiver module 402 carried out count of votes.
Particularly, determine ballot play according to ballot activity mark in vote information, according to polling option and ballot poll, the poll of this ballot play is added up.Certainly except can adding up polling option poll, can also add up voter's polling option.
Particularly, acquisition module 401 comprises:
Receiving element 4011, the signal sending for timing thread;
Acquiring unit 4012 in the time that the signal designation of timing thread reaches predetermined time interval, obtains anti-brush ticket strategy from background server.
The predetermined time interval here can arrange according to actual needs, for example 10 seconds.Can ensure in the situation that not needing shutdown, anti-brush ticket strategy to be upgraded by periodically obtaining anti-brush ticket strategy, to ensure that behavior is better defendd for brush ticket.
Particularly, pre-judge module 403 comprises:
Setting unit 4031, for in the time that voter's IP address or the ballot number of times of user name within cycle time reach the ballot frequency threshold value of anti-brush ticket strategy, using voter's IP address or user name add blacklist as invalid vote people's IP address or user name.
Further, setting unit 4031, also for periodically emptying blacklist; Or,
When the Penalty time of the voter in blacklist reached after the scheduled time, the IP address or the user name that Penalty time are reached to the voter of the scheduled time remove from blacklist, IP address or the user name time in blacklist of Penalty time for recording voter.
For example, 0 of every day empty blacklist, or the time that voter enters blacklist be 2 hours, after two hours, can automatically from blacklist, be removed.
Particularly, anti-brush ticket module 404 comprises:
Record cell 4041, in the time that definite vote information is effective, writes the IP address of voter in vote information or user name and time of receiving vote information in the historical poll in behavior database.
The embodiment of the present invention is by receiving after the vote information of client transmission, judge that the IP address of voter in vote information or user name are whether in blacklist, if voter's IP address or user name are in blacklist, determine that the vote information receiving is invalid, blacklist comprises invalid vote people's IP address or user name, invalid vote people's IP address or user name reach the voter's of ballot frequency threshold value IP address or user name for being recorded in interior ballot cycle time number of times, so just avoided user's brush ticket behavior; If voter's IP address or user name be not in blacklist, search voter's IP address or the historical poll of user name, according to the historical poll of voter's IP address or user name and the vote information receiving, determine voter's IP address or the ballot number of times of user name within cycle time; If voter's IP address or the user name ballot number of times within cycle time does not reach the ballot frequency threshold value in anti-brush ticket strategy, determine that the vote information receiving is effective, and carry out count of votes according to the polling option in vote information and ballot poll, make user cannot brush ticket, by above-mentioned two aspects, user is brushed to ticket and be on the defensive, avoided brushing in network voting the harm that ticket behavior brings.
It should be noted that: the network voting device that above-described embodiment provides is in the time carrying out network voting, only be illustrated with the division of above-mentioned each functional module, in practical application, can above-mentioned functions be distributed and completed by different functional modules as required, be divided into different functional modules by the internal structure of equipment, to complete all or part of function described above.In addition, network voting device and network voting embodiment of the method that above-described embodiment provides belong to same design, and its specific implementation process refers to embodiment of the method, repeats no more here.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
One of ordinary skill in the art will appreciate that all or part of step that realizes above-described embodiment can complete by hardware, also can carry out the hardware that instruction is relevant by program completes, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium of mentioning can be read-only memory, disk or CD etc.
The foregoing is only preferred embodiment of the present invention, in order to limit the present invention, within the spirit and principles in the present invention not all, any amendment of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.