Voting method, device, equipment and medium based on user characteristics and behavior restrictions
By introducing multiple voting access conditions in voting software, it is necessary to ensure that users can vote only when they meet all conditions, solve the problems of low efficiency of malicious voting and abuse of voting behavior in existing technologies, and realize voting. Fairness and system stability.
Patent Information
- Application Number
- CN202411652590.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-11-19
AI Technical Summary
Existing voting software has the problem of low efficiency in controlling malicious voting and abuse of voting.
通过获取目标用户的登录信息,包括用户名、密码、验证码、登录来源信息、登录时间和登录IP地址,并根据多个投票准入条件进行判断,包括用户登录状态、登录来源、投票时间、 Verification code verification and IP address location to ensure that users can vote only when they meet all conditions.
Effectively prevent malicious voting and abusive voting behavior to ensure the fairness of voting and the stable operation of the system.
Smart Images

Figure CN119172170B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of Internet voting, and provides a voting method, device, equipment and medium based on user characteristics and behavior restrictions. Background Art
[0002] With the widespread spread of Internet voting, more and more people tend to vote through websites, mini-programs, etc. Although Internet voting is convenient, it is also prone to various screen swiping and cheating behaviors, which brings challenges to the fairness of voting and the stable operation of the voting service system.
[0003] At present, most voting software determines the identity of users by their IP addresses. However, computer hackers and senior software developers may still achieve the purpose of software voting by forging IP addresses and other means. Therefore, existing voting software has the problem of low efficiency in controlling malicious voting and voting abuse. Summary of the invention
[0004] The present application provides a voting method, apparatus, device and medium based on user characteristics and behavior restrictions, which are used to solve the problem of low efficiency in controlling malicious voting and abuse of voting behavior in existing voting software.
[0005] In a first aspect, a voting method based on user characteristics and behavior restrictions is provided, comprising:
[0006] Obtain the target user's login information; the login information includes the user name, password and verification code entered by the target user on the login page, as well as the verification code generated by the login page, login source information, login time, and login IP address;
[0007] Determine whether the username and password entered by the target user on the login page are the same as the username and password pre-stored locally;
[0008] If the user name entered by the target user on the login page is the same as the locally stored user name, and the password entered by the target user on the login page is the same as the password associated with the locally stored user name, then determine whether the login source information is WeChat;
[0009] If the login source information is WeChat, determine whether the login time is during the voting period;
[0010] If the login time is during the voting period, determining whether the verification code entered by the target user on the login page is the same as the verification code generated by the login page;
[0011] If the verification code entered by the target user on the login page is the same as the verification code generated by the login page, then determining whether the login IP address is in the voting area;
[0012] If the login IP address is in the voting area, a voting page is displayed for the target user to vote.
[0013] Optionally, after determining whether the user name and password entered by the target user on the login page are the same as the user name and password pre-stored locally, the method further includes:
[0014] If the username entered by the target user on the login page is different from the locally stored username, or the password entered by the target user on the login page is different from the password associated with the locally stored username, or the login source is not WeChat, or the verification code entered by the target user on the login page is different from the verification code generated by the login page, or the login IP address is not in the voting area, a first prompt page is generated; wherein, the first prompt page is used to prompt the target user that he cannot vote.
[0015] Optionally, if the user name entered by the target user on the login page is different from the locally stored user name, or the password entered by the target user on the login page is different from the password associated with the locally stored user name, or the login source is not WeChat, or the verification code entered by the target user on the login page is different from the verification code generated by the login page, or the login IP address is not in the voting area, then generating a first prompt page includes:
[0016] If the user name entered by the target user on the login page is different from the locally stored user name, or the password entered by the target user on the login page is different from the password associated with the locally stored user name, a first prompt page including a first prompt message is generated; wherein, the first prompt message is used to prompt the target user that the login has failed and that the user cannot vote.
[0017] Alternatively, if the login source is not WeChat, a first prompt page including second prompt information is generated; wherein the second prompt information is used to prompt that the login source is not WeChat and voting is not possible;
[0018] Alternatively, if the login time is not within the voting period, a first prompt page including third prompt information is generated; wherein the third prompt information is used to prompt that the voting activity has not started yet or the voting activity has ended, and voting is not possible;
[0019] Alternatively, if the verification code entered by the target user on the login page is different from the verification code generated by the login page, a first prompt page including fourth prompt information is generated; wherein the fourth prompt information is used to prompt the target user that the verification code has not been passed and the user cannot vote;
[0020] Alternatively, if the login IP address is not in the voting area, a first prompt page including fifth prompt information is generated; wherein the fifth prompt information is used to prompt that the IP address is not in the voting area and cannot vote.
[0021] Optionally, after displaying the voting page if the login IP address is in the voting area, the method further includes:
[0022] In response to a voting operation performed by the target user on the target object in the voting page, determining whether the voting operation of the target user satisfies multiple voting restriction conditions at the same time;
[0023] If it is determined that the voting operation of the target user satisfies the multiple voting restriction conditions at the same time, the target user votes successfully;
[0024] If it is determined that the voting operation of the target user does not satisfy any voting restriction condition, a second prompt page is generated; the second prompt page is an interface that reminds the target user that the voting has failed.
[0025] Optionally, the multiple voting restriction conditions include that the total number of objects voted by the target user during the voting period does not exceed the maximum number of objects that can be voted for, the number of objects voted by the target user today does not exceed the number of objects that can be voted for every day, the total number of votes cast by the target user during the voting period does not exceed the maximum number of votes that can be voted for, the number of votes cast by the target user today does not exceed the number of votes that can be voted for every day, the total number of votes cast by the target user for the target object during the voting period does not exceed the maximum number of votes that can be cast for the same object, the number of votes cast by the target user for the target object today does not exceed the number of votes that can be cast for the same object every day, the total number of votes for the target category to which the target object belongs during the voting period does not exceed the maximum number of votes that can be cast for the same category, the number of votes for the target category today does not exceed the number of votes that can be cast for the same category every day, and the total number of objects voted for the target category during the voting period does not exceed the maximum number of objects that can be voted for the same category.
[0026] Optionally, if it is determined that the voting operation of the target user satisfies the multiple voting restriction conditions at the same time, then after the target user votes successfully, the method further includes:
[0027] Update the local records of the total number of objects voted by the target user during the voting period, the number of objects voted by the target user today, the total number of votes cast by the target user during the voting period, the number of votes cast by the target user today, the total number of votes cast by the target user for the target object during the voting period, the number of votes cast by the target user for the target object today, the total number of votes for the target category to which the target object belongs during the voting period, the number of votes for the target category today, and the total number of objects voted for the target category during the voting period.
[0028] Optionally, if it is determined that the voting operation of the target user satisfies the multiple voting restriction conditions at the same time, then after the target user votes successfully, the method further includes:
[0029] The target user's username, IP address and voting time are recorded.
[0030] In a second aspect, a voting device based on user characteristics and behavior restrictions is provided, comprising:
[0031] An acquisition module is used to acquire the login information of the target user; the login information includes the user name, password and verification code entered by the target user on the login page, as well as the verification code generated by the login page, login source information, login time, and login IP address;
[0032] A judgment module is used to judge whether the user name and password entered by the target user on the login page are the same as the user name and password pre-stored locally; if the user name entered by the target user on the login page is the same as the user name pre-stored locally, and the password entered by the target user on the login page is the same as the password associated with the pre-stored user name locally, then judge whether the login source information is WeChat; if the login source information is WeChat, then judge whether the login time is during the voting period; if the login time is during the voting period, then judge whether the verification code entered by the target user on the login page is the same as the verification code generated by the login page; if the verification code entered by the target user on the login page is the same as the verification code generated by the login page, then judge whether the login IP address is in the voting area;
[0033] The display module is used to display a voting page if the login IP address is in the voting area, so that the target user can vote.
[0034] In a third aspect, the present application provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the voting method based on user characteristics and behavior restrictions described in the first aspect.
[0035] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, and a processor executes the computer program to implement the voting method based on user characteristics and behavior restrictions described in the first aspect.
[0036] Compared with the prior art, the present invention has the following beneficial effects:
[0037] The present application provides a voting method based on user characteristics and behavior restrictions, the method comprising: obtaining login information of a target user; the login information comprises a user name, password and verification code entered by the target user on a login page, a verification code generated by the login page, login source information, login time, and login IP address; determining whether the user name and password entered by the target user on the login page are the same as the user name and password pre-stored locally; if the user name entered by the target user on the login page is the same as the user name pre-stored locally, and the password entered by the target user on the login page is the same as the password associated with the user name pre-stored locally, determining whether the login source information is WeChat; if the login source information is WeChat, determining whether the login time is during the voting period; if the login time is during the voting period, determining whether the verification code entered by the target user on the login page is the same as the verification code generated by the login page; if the verification code entered by the target user on the login page is the same as the verification code generated by the login page, determining whether the login IP address is in the voting area; if the login IP address is in the voting area, displaying the voting page for the target user to vote.
[0038] This method determines the identity of the target user based on multiple voting access conditions, such as whether the user is logged in, whether the login source is WeChat, whether the voting activity is enabled, whether the verification code is passed, and whether the IP address is within the voting area. The voting page is only displayed to users who meet all the voting access conditions at the same time, which can effectively prevent malicious voting and abuse of voting and ensure the fairness of voting. The method makes judgments in the order of whether the user is logged in, whether the login source is WeChat, whether the voting activity is enabled, whether the verification code is passed, and whether the IP address is within the voting area. The login status and login source are judged first, and the most common failure conditions are placed at the front. Finally, the IP address is judged to be within the voting area. The more complicated judgment process is placed at the end. Once a failure occurs, no subsequent judgment is required. Users who are not logged in or do not meet the conditions can be quickly excluded, reducing unnecessary subsequent processing procedures. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0040] Figure 1 A schematic diagram of the computer device structure of the hardware operating environment involved in the embodiment of the present application;
[0041] Figure 2 A flowchart of a voting method based on user characteristics and behavior restrictions provided in an embodiment of the present application;
[0042] Figure 3 A schematic diagram of a setting interface provided in an embodiment of the present application;
[0043] Figure 4 Another flowchart of a voting method based on user characteristics and behavior restrictions provided in an embodiment of the present application;
[0044] Figure 5 A schematic diagram of the structure of a voting device based on user characteristics and behavior restrictions provided in an embodiment of the present application.
[0045] Markings in the figure: 101 - processor, 102 - communication bus, 103 - network interface, 104 - user interface, 105 - memory. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical scheme and advantages of the present application clearer, the technical scheme in the embodiment of the present application will be clearly and completely described below in conjunction with the drawings in the embodiment of the present application. Obviously, the described embodiment is only a part of the embodiment of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application. In the absence of conflict, the embodiments in the present application and the features in the embodiments can be combined with each other arbitrarily. In addition, although the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in an order different from that here.
[0047] In order to solve the problem that existing voting software has low efficiency in controlling malicious voting and abuse of voting behavior, the embodiment of the present application provides a voting method based on user characteristics and behavior restrictions, please refer to Figure 1 , which is a schematic diagram of the computer device structure of the hardware operating environment involved in the embodiment of the present application.
[0048] like Figure 1As shown, the computer device may include: a processor 101, such as a central processing unit (CPU), a communication bus 102, a user interface 104, a network interface 103, and a memory 105. Among them, the communication bus 102 is used to realize the connection and communication between these components. The user interface 104 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the user interface 104 may include a standard wired interface and a wireless interface. The network interface 103 may include a standard wired interface and a wireless interface (such as a wireless fidelity (WIreless-FIdelity, WI-FI) interface). The memory 105 may be a high-speed random access memory (Random Access Memory, RAM) memory, or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory. The memory 105 may optionally also be a storage device independent of the aforementioned processor 101.
[0049] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the computer device, and may include more or less components than shown in the figure, or combine some components, or arrange the components differently.
[0050] like Figure 1 As shown, the memory 105 as a storage medium may include an operating system, a network communication module, a user interface module, and a voting device based on user characteristics and behavior restrictions.
[0051] exist Figure 1 In the computer device shown, the network interface 103 is mainly used for data communication with the network server; the user interface 104 is mainly used for data interaction with the user; the processor 101 and the memory 105 in the computer device of the present invention can be set in the computer device, and the computer device calls the voting device based on user characteristics and behavior restrictions stored in the memory 105 through the processor 101, and executes the voting method based on user characteristics and behavior restrictions provided in the embodiment of the present application.
[0052] based on Figure 1 The computer equipment shown below Figure 2 A voting method based on user characteristics and behavior restrictions is introduced as shown.
[0053] S201. Obtain login information of a target user.
[0054] During the specific implementation process, the target user enters the username, password and verification code on the login page and clicks the "Login" button. The background can then obtain the target user's login information, which includes the username, password and verification code entered by the target user on the login page, the verification code generated by the login page, login source information, login time, and login IP address.
[0055] S202: Determine whether the user name and password entered by the target user on the login page are the same as the user name and password pre-stored locally.
[0056] In the specific implementation process, the administrator can pre-set multiple voting access conditions, including successful user login, login source information is WeChat, voting activity is open, verification code verification is passed, and IP address is within the voting area. The target user enters the user name, password and verification code on the login page and clicks the "Login" button. The background can obtain the login information of the target user. According to the login information, it is judged in the preset order whether the target user meets the multiple voting access conditions. First, judge whether the user has successfully logged in based on whether the username and password entered by the target user on the login page are the same as the locally stored username and password.
[0057] S203. If the user name entered by the target user on the login page is the same as the locally stored user name, and the password entered by the target user on the login page is the same as the password associated with the locally stored user name, determine whether the login source information is WeChat.
[0058] During the specific implementation process, a user table (user table) is pre-stored in the local database. The user table includes the usernames and passwords of multiple users. The username and password entered by the target user on the login page are compared with the corresponding values in the user table. If the username or password does not match, it is determined that the target user's login has failed. If both the username and password match, it is determined that the target user has logged in successfully, and it is further determined whether the login source information is WeChat.
[0059] S204. If the login source information is WeChat, determine whether the login time is during the voting period.
[0060] In the specific implementation process, the value in the login source table (login_source) is identified. If the login user is from WeChat, "wechat" is recorded in the user table. After the user enters the login page and clicks the "Login" button, the value of the voter login source (voter_login_source) field in the voter limit table (voter_limit table) is read. If the administrator sets "Whether from WeChat" to on, the value of the voter_login_source field is "wechat". This value is compared with the value of the login source (login_source) field in the user table. If they are different, it is determined that the login source of the target user is not WeChat. If they are the same, it is determined that the login source of the target user is WeChat, and it is further determined whether the login time is during the voting period.
[0061] S205: If the login time is during the voting period, determine whether the verification code entered by the target user on the login page is the same as the verification code generated by the login page.
[0062] During the specific implementation process, if the login time is before the voting period, it is determined that the voting activity has not been started; if the login time is after the voting period, it is determined that the voting activity has ended; if the login time is during the voting period, it is determined that the voting activity has been started, and it is further determined whether the verification code entered by the target user on the login page is the same as the verification code generated by the login page.
[0063] S206. If the verification code entered by the target user on the login page is the same as the verification code generated by the login page, it is determined whether the login IP address is in the voting area.
[0064] During the specific implementation process, it is determined whether the verification code entered by the target user on the login page is the same as the verification code generated by the login page. If they are different, it is determined that the target user has not passed the verification code verification. If they are the same, it is determined that the target user has passed the verification code verification, and it is further determined whether the login IP address is in the voting area.
[0065] S207. If the login IP address is in the voting area, a voting page is displayed for the target user to vote.
[0066] In the specific implementation process, after ensuring that the target user's IP address is not a private address, the ip2region.db database is used to find the geographical location of the IP address, and the corresponding city ID is determined to check whether the city ID is in the allowed voting area. If not, it is determined that the login IP address is not in the voting area. If so, it is determined that the login IP address is in the voting area, indicating that the target user meets multiple voting access conditions at the same time, and the voting page is displayed for the target user to vote.
[0067] Among them, the voting page displays a list of options, listing the objects available for voting. The objects available for voting can be projects, contestants, works, services, ideas, etc. Projects include new product proposals, project plans, event planning, etc., contestants include athletes, contestants, artists, etc., works include movies, music works, works of art, etc., services include community services, public welfare activity proposals, etc., ideas include innovation suggestions, improvement measures, etc.
[0068] In a possible embodiment, the login time of the target user is recorded in the user table, the verification code generated by the login page is recorded in the user table, and the IP address of the target user is recorded in the user table. The user table finally obtained is shown in Table 1.
[0069] Table 1
[0070]
[0071] As can be seen from Table 1, the user table includes user ID (user_id), username (username), password (key), verification code (auth_code), IP address (ip_addr), login source (login_source), and login time (login_time).
[0072] In a possible embodiment, after determining whether the user name and password entered by the target user on the login page are the same as the user name and password pre-stored locally, the method further includes:
[0073] If the username entered by the target user on the login page is different from the locally stored username, or the password entered by the target user on the login page is different from the password associated with the locally stored username, or the login source is not WeChat, or the verification code entered by the target user on the login page is different from the verification code generated by the login page, or the login IP address is not in the voting area, a first prompt page is generated; wherein, the first prompt page is used to prompt the target user that he cannot vote.
[0074] During the specific implementation process, if it is determined that the target user has failed to log in, or it is determined that the login source of the target user is not WeChat, or the login time is not during the voting period, or it is determined that the voting activity has not been opened / has ended, or it is determined that the login IP address is not in the voting area, it means that the target user cannot meet multiple voting access conditions at the same time, and the first prompt page is generated to prompt the target user that he cannot vote.
[0075] In the embodiment of the present application, as long as the target user does not meet any of the voting access conditions, he or she will not be able to vote, which strictly limits the identities of users who can vote and can effectively prevent malicious voting and abuse of voting.
[0076] The first prompt page may include prompt information, and the prompt information is the reason why the target user cannot vote. Since there are many reasons why the target user cannot vote, there are also many corresponding prompt information.
[0077] In a possible embodiment, if the user name entered by the target user on the login page is different from the locally stored user name, or the password entered by the target user on the login page is different from the password associated with the locally stored user name, a first prompt page including a first prompt message is generated; wherein the first prompt message is used to prompt the target user that the login has failed and that the user cannot vote.
[0078] Alternatively, if the login source is not WeChat, a first prompt page including second prompt information is generated; wherein the second prompt information is used to prompt that the login source is not WeChat and voting is not possible;
[0079] Alternatively, if the login time is not during the voting period, a first prompt page including third prompt information is generated; wherein the third prompt information is used to prompt that the voting activity has not started yet or the voting activity has ended, and voting is not possible;
[0080] Alternatively, if the verification code entered by the target user on the login page is different from the verification code generated by the login page, a first prompt page including fourth prompt information is generated; wherein the fourth prompt information is used to prompt the target user that the verification code has not been passed and the user cannot vote;
[0081] Alternatively, if the login IP address is not in the voting area, a first prompt page including fifth prompt information is generated; wherein the fifth prompt information is used to prompt that the IP address is not in the voting area and cannot vote.
[0082] In the specific implementation process, if it is determined that the user login fails, the first prompt information is displayed, such as "Please log in before voting." If it is determined that the login source information is not WeChat, the second prompt information is displayed, such as "Current voting is only open to WeChat users." If the login time is before the voting period, the third prompt information is displayed, such as "Voting has not started yet, and voting is not possible." If the login time is after the voting period, the third prompt information is displayed, such as "Voting has ended temporarily, and voting is not possible." If it is determined that the target user has not passed the verification code verification, the fourth prompt information is displayed, such as "Your verification code is incorrect and you cannot vote." If it is determined that the IP address is not in the voting area, the fifth prompt information is displayed, such as "The current voting address area is restricted and voting is not possible."
[0083] In the embodiment of the present application, as long as the target user does not meet a certain voting access condition, the corresponding prompt information will be displayed, and the user can immediately understand why they cannot vote. After understanding the specific reasons, they will pay more attention to their own behavior, such as re-entering the user name and password, re-entering the verification code, etc., to meet the voting access conditions.
[0084] In a possible embodiment, after displaying the voting page if the login IP address is in the voting area, the method further includes:
[0085] In response to the target user's voting operation on the target object in the voting page, it is determined whether the target user's voting operation satisfies multiple voting restriction conditions at the same time; if it is determined that the target user's voting operation satisfies multiple voting restriction conditions at the same time, the target user votes successfully; if it is determined that the target user's voting operation does not satisfy any voting restriction condition, a second prompt page is generated.
[0086] In the specific implementation process, the target user selects the target object on the voting page and clicks the "Vote" button to determine whether the target user's voting operation satisfies multiple voting restrictions at the same time. If they do, the voting is successful. If one of the voting restrictions is not satisfied, a second prompt page is generated. The second prompt page is an interface that prompts the target user that the voting failed. The second prompt page can display the reason why the target user failed to vote.
[0087] In the embodiment of the present application, it is ensured that only votes that meet multiple voting restrictions are recorded, which improves the accuracy and reliability of the voting data and makes the results more representative. These restrictions can ensure that each participant has an equal opportunity to participate in the vote, thereby improving the fairness and representativeness of the voting results. When a user does not meet a certain condition, the prompt page can provide a specific reason for failure, effectively avoiding user misoperation due to unfamiliarity with the rules, and helping users better understand the voting rules.
[0088] In a possible embodiment, multiple voting restriction conditions include that the total number of objects voted by the target user during the voting period does not exceed the maximum number of objects that can be voted for, the number of objects voted by the target user today does not exceed the number of objects that can be voted for every day, the total number of votes cast by the target user during the voting period does not exceed the maximum number of votes that can be voted for, the number of votes cast by the target user today does not exceed the number of votes that can be voted for every day, the total number of votes cast by the target user for the target object during the voting period does not exceed the maximum number of votes that can be cast for the same object, the number of votes cast by the target user for the target object today does not exceed the number of votes that can be cast for the same object every day, the total number of votes for the target category to which the target object belongs during the voting period does not exceed the maximum number of votes that can be cast for the same category, the number of votes for the target category today does not exceed the number of votes that can be cast for the same category every day, and the total number of objects voted for the target category during the voting period does not exceed the maximum number of objects that can be voted for the same category.
[0089] In the specific implementation process, the administrator can pre-set the values of multiple voting restriction conditions in the background setting interface. By setting the maximum number of objects that can be voted, the total number of voting objects that users can choose during the entire voting period is limited. By setting the number of objects that can be voted per day, the number of voting objects that users can choose every day is specified. By setting the maximum number of votes that can be voted, the total number of votes that users can submit during the entire voting period is limited. By setting the number of votes that can be voted per day, the number of votes that users can submit every day is limited. By setting the maximum number of votes that can be cast for the same object, the number of votes that users can vote for the same voting object during the entire voting period is limited. By setting the number of votes that can be cast for the same object per day, the number of votes that users can vote for the same voting object per day is specified. By setting the maximum number of votes that can be cast for the same category, the total number of votes that users can submit in each category is limited. By setting the number of votes that can be cast for the same category per day, the total number of votes that users can submit in each category is limited. By setting the maximum number of objects that can be voted for the same category, the total number of votes that users can submit in each category is limited.
[0090] Please refer to Figure 3 , which is a schematic diagram of the setting interface provided in the embodiment of the present application. It can be seen that the maximum number of objects that can be voted is set to 6, the number of objects that can be voted per day is set to 3, the maximum number of votes that can be cast is set to 1000, the number of votes that can be cast per day is set to 10, the maximum number of votes that can be cast for the same object is set to 100, the number of votes that can be cast for the same object per day is set to 3, the maximum number of votes that can be cast in the same category is set to 500, the number of votes that can be cast in the same category per day is set to 10, and the maximum number of objects that can be voted in the same category is set to 6.
[0091] For example, in an athlete voting activity, each voting user can vote for up to 6 events during the voting period, and can vote for up to 3 events per day. Each voting user can cast up to 1,000 votes during the voting period, and can cast up to 10 votes per day. Each event can get up to 100 votes during the voting period, and can get up to 3 votes per day. Divide all events into multiple categories, such as diving, marathon, and high jump, each category can get up to 500 votes during the voting period, and can get up to 10 votes per day. Each category can only have up to 6 events voted during the voting period.
[0092] In the embodiments of the present application, by limiting the number of votes and voting objects, users can effectively prevent abuse of the voting system and ensure that each user's voting rights are treated fairly. Limiting the number of votes for the same object and the same category can encourage users to pay attention to more different candidates and increase the diversity of votes. By controlling voting behavior, invalid or repeated votes can be reduced, thereby improving the data quality and credibility of voting results. Administrators can monitor and manage voting activities by setting these multiple voting restrictions.
[0093] In a possible embodiment, if it is determined that the voting operation of the target user satisfies multiple voting restriction conditions at the same time, then after the target user has successfully voted, the method further includes:
[0094] Update the local records of the total number of objects voted by the target user during the voting period, the number of objects voted by the target user today, the total number of votes cast by the target user during the voting period, the number of votes cast by the target user today, the total number of votes cast by the target user for the target object during the voting period, the number of votes cast by the target user for the target object today, the total number of votes received by the target category to which the target object belongs during the voting period, the number of votes received by the target category today, and the total number of objects voted for the target category during the voting period.
[0095] In the embodiment of the present application, the number of votes and the voting status of users are recorded, which increases the transparency of the voting process, allows all participants to clearly understand the voting results, helps to maintain the fairness of the voting process, and avoids data manipulation or fraud. By updating the number of user votes and the number of votes in real time, it can ensure that the information in the system is up to date, facilitate users and managers to obtain accurate voting information, and prevent users from exceeding voting limits, thereby ensuring the compliance of voting.
[0096] In a possible embodiment, if it is determined that the voting operation of the target user satisfies multiple voting restriction conditions, then after determining that the target user has successfully voted, the method further includes:
[0097] Record the target user's username, IP address, and voting time.
[0098] In the embodiment of the present application, by recording IP addresses and user information, it is possible to effectively detect and prevent the same user from voting multiple times, and maintain the validity and fairness of the vote. By recording the voting time, the user can be provided with voting status feedback, further enhancing the user's sense of trust. Storing voting records can provide a basis for future audits and inquiries, ensuring the transparency and fairness of the voting process.
[0099] Please refer to Figure 4 , is another flowchart of a voting method based on user characteristics and behavior restrictions provided in an embodiment of the present application. That is:
[0100] The administrator logs in to the backend, creates a voting activity, sets registration conditions, and generates the voting activity homepage. The contestant registers and logs in, enters the contestant registration page, fills in the registration information, reads the registration conditions from the voting activity homepage, and determines whether the contestant meets the registration conditions. If not, the registration fails. If so, the registration information is submitted. The administrator logs in to the registration list page and reviews the contestants' registration information. If the review fails, the corresponding contestant is notified to make changes. If the review passes, multiple voting access conditions and multiple voting restrictions are set. The voting user logs in to the voting login page to determine whether multiple voting access conditions are met. If not, the first prompt page is displayed. If yes, the voting page is displayed. According to the voting user's voting operation, it is determined whether multiple voting restrictions are met. If not, the voting fails and the second prompt page is displayed. If yes, the voting is successful.
[0101] The voting method based on user characteristics and behavior restrictions provided in the embodiment of the present application can be written in the computer programming language PHP and integrated into the voting project management module. The processing flow of the method is described below.
[0102] S1.1. Create time records.
[0103] After the administrator creates a voting activity, he can set multiple voting access conditions and the values of multiple voting restriction conditions, which will be recorded in the player voting limit (player_vote_limit) table and user voting limit (user_vote_limit) table in the MySQL database respectively.
[0104] S1.2. Read the registered user status.
[0105] When a contestant submits his / her registration information, the front-end uses HTTP GET to retrieve multiple voting access conditions for the event for which the contestant has registered (including successful user login, login source information being WeChat, voting event being enabled, verification code verification being passed, and IP address being within the voting area), as well as the values of multiple voting restriction conditions (including the maximum number of objects that can be voted for, the number of objects that can be voted for per day, the maximum number of votes that can be cast, the number of votes that can be cast per day, the maximum number of votes that can be cast for the same object, the number of votes that can be cast for the same object per day, the maximum number of votes that can be cast in the same category, the number of votes that can be cast in the same category per day, and the maximum number of objects that can be voted for in the same category).
[0106] S1.3. Matching data.
[0107] Retrieve each data and store it in a variable, match and compare each data, if all of them match, the output result is true and recorded as 1, if not all of them match, then record as 0.
[0108] S1.4. Output results and update data.
[0109] If the matching result output is 0, the vote fails. If the matching result output is 1, the function is called to cast 1 vote for the target object. If the vote is successful, the number of votes cast by the user today, the number of votes cast by the current object, and the total number of votes cast by the current category are updated, and the voting period, user name, and IP address of the user are recorded.
[0110] In summary, the embodiment of the present application provides a voting method based on user characteristics and behavior restrictions. Adding user session records can further restrict the identity of voting users and play a stronger restrictive role on IP login voting restrictions. The matching of multiple voting access conditions and multiple voting restriction conditions further enhances the anti-vote fraud mechanism.
[0111] In addition, the method described in this application has been tested many times. Under the verification of five voting access conditions (user login is successful, login source information is WeChat, voting activity has been started, verification code verification is passed, and IP address is within the voting area), no vote-rigging phenomenon occurred. Based on five 16-core 32G servers and 100M optical fiber conditions, load balancing technology is used, and the number of queries per second (QPS) can reach 100,000, which can improve the system's processing capabilities to cope with high-concurrency scenarios.
[0112] Based on the same invention concept, please refer to Figure 5 The present application also provides a voting device based on user characteristics and behavior restrictions, the device comprising:
[0113] The acquisition module is used to obtain the target user's login information; the login information includes the user name, password and verification code entered by the target user on the login page, the verification code generated by the login page, login source information, login time, and login IP address;
[0114] A judgment module is used to judge whether the user name and password entered by the target user on the login page are the same as the user name and password pre-stored locally; if the user name entered by the target user on the login page is the same as the user name pre-stored locally, and the password entered by the target user on the login page is the same as the password associated with the user name pre-stored locally, then judge whether the login source information is WeChat; if the login source information is WeChat, then judge whether the login time is during the voting period; if the login time is during the voting period, then judge whether the verification code entered by the target user on the login page is the same as the verification code generated by the login page; if the verification code entered by the target user on the login page is the same as the verification code generated by the login page, then judge whether the login IP address is in the voting area;
[0115] The display module is used to display the voting page if the login IP address is in the voting area, so that the target user can vote.
[0116] It should be noted that each module in the voting device based on user characteristics and behavior restrictions in this embodiment corresponds one-to-one to each step in the voting method based on user characteristics and behavior restrictions in the aforementioned embodiment. Therefore, the specific implementation of this embodiment can refer to the implementation of the aforementioned voting method based on user characteristics and behavior restrictions, which will not be repeated here.
[0117] Based on the same inventive concept, the present application also provides a computer device, which includes a processor, a memory, and a computer program stored in the memory. When the computer program is executed by the processor, the aforementioned voting method based on user characteristics and behavior restrictions is implemented.
[0118] Based on the same inventive concept, the present application also provides a computer storage medium on which a computer program is stored. When the computer program is executed by a processor, the aforementioned voting method based on user characteristics and behavior restrictions is implemented.
[0119] In some embodiments, the computer readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or various devices including one or any combination of the above memories. The computer may be various computing devices including intelligent terminals and servers.
[0120] In some embodiments, executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0121] As an example, executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file storing other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).
[0122] By way of example, executable instructions may be deployed to be executed on one computing device, or on multiple computing devices located at one site, or on multiple computing devices distributed across multiple sites and interconnected by a communication network.
[0123] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0124] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0125] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory / random access memory, a magnetic disk, or an optical disk), and includes a number of instructions for a multimedia terminal device (which can be a mobile phone, a computer, a television receiver, or a network device, etc.) to execute the methods of each embodiment of the present application.
[0126] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the specification and accompanying drawings of the present application, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A voting method based on user characteristics and behavior restrictions, characterized in that: include: Get the target user's login information; The login information includes the user name, password and verification code entered by the target user on the login page, as well as the verification code generated by the login page, login source information, login time, and login IP address; Determine whether the username and password entered by the target user on the login page are the same as the username and password pre-stored locally; If the user name entered by the target user on the login page is the same as the locally stored user name, and the password entered by the target user on the login page is the same as the password associated with the locally stored user name, then determine whether the login source information is WeChat; If the login source information is WeChat, determine whether the login time is during the voting period; If the login time is during the voting period, determining whether the verification code entered by the target user on the login page is the same as the verification code generated by the login page; If the verification code entered by the target user on the login page is the same as the verification code generated by the login page, then determining whether the login IP address is in the voting area; If the login IP address is in the voting area, a voting page is displayed for the target user to vote; If the user name entered by the target user on the login page is the same as the user name pre-stored locally, and the password entered by the target user on the login page is the same as the password associated with the user name pre-stored locally, the step of determining whether the login source information is WeChat includes: comparing the user name and password entered by the target user on the login page with the corresponding values in the locally pre-stored user table, if the user name or password does not match, determining that the target user login fails, if the user name and password both match, determining that the target user login succeeds, and determining whether the login source information is WeChat; the user table includes the user names and passwords of multiple users; If the login source information is WeChat, the step of determining whether the login time is during the voting period includes: identifying the value in the login source table, if the login user is from WeChat, WeChat is recorded in the login source field of the user table, when the target user enters the login page and clicks the login button, the value of the voter login source field in the voter restriction table is compared with the value of the login source field in the user table, if they are different, it is determined that the login source of the target user is not WeChat, if they are the same, it is determined that the login source of the target user is WeChat, and it is determined whether the login time is during the voting period; the value of the voter login source field in the voter restriction table is pre-set to WeChat by the administrator; The step of determining whether the login IP address is in the voting area comprises: after ensuring that the login IP address is not a private address, using the ip2region.db database to search for a city identifier corresponding to the geographical location of the login IP address, and checking whether the city identifier is in the voting area; If the login IP address is in the voting area, after displaying the voting page, the method further includes: in response to the target user's voting operation on the target object in the voting page, determining whether the target user's voting operation satisfies multiple voting restriction conditions at the same time; if it is determined that the target user's voting operation satisfies the multiple voting restriction conditions at the same time, the target user votes successfully; if it is determined that the target user's voting operation does not satisfy any of the voting restriction conditions, generating a second prompt page; the second prompt page is an interface for reminding the target user that the voting has failed; The multiple voting restriction conditions include that the total number of objects voted by the target user during the voting period does not exceed the maximum number of objects that can be voted for, the number of objects voted by the target user today does not exceed the number of objects that can be voted for every day, the total number of votes cast by the target user during the voting period does not exceed the maximum number of votes that can be voted for, the number of votes cast by the target user today does not exceed the number of votes that can be voted for every day, the total number of votes cast by the target user for the target object during the voting period does not exceed the maximum number of votes that can be cast for the same object, the number of votes cast by the target user for the target object today does not exceed the number of votes that can be cast for the same object every day, the total number of votes received by the target category to which the target object belongs during the voting period does not exceed the maximum number of votes that can be cast for the same category, the number of votes received by the target category today does not exceed the number of votes that can be cast for the same category every day, and the total number of objects voted for the target category during the voting period does not exceed the maximum number of objects that can be voted for the same category.
2. The voting method based on user characteristics and behavior restrictions as claimed in claim 1, characterized in that: After determining whether the user name and password entered by the target user on the login page are the same as the user name and password pre-stored locally, the method further includes: If the username entered by the target user on the login page is different from the locally stored username, or the password entered by the target user on the login page is different from the password associated with the locally stored username, or the login source is not WeChat, or the verification code entered by the target user on the login page is different from the verification code generated by the login page, or the login IP address is not in the voting area, a first prompt page is generated; wherein, the first prompt page is used to prompt the target user that he cannot vote.
3. The voting method based on user characteristics and behavior restrictions as claimed in claim 2, characterized in that: If the user name entered by the target user on the login page is different from the locally stored user name, or the password entered by the target user on the login page is different from the password associated with the locally stored user name, or the login source is not WeChat, or the verification code entered by the target user on the login page is different from the verification code generated by the login page, or the login IP address is not in the voting area, then a first prompt page is generated, including: If the user name entered by the target user on the login page is different from the locally stored user name, or the password entered by the target user on the login page is different from the password associated with the locally stored user name, a first prompt page including first prompt information is generated; wherein the first prompt information is used to prompt the target user that the login has failed and the target user cannot vote; Alternatively, if the login source is not WeChat, a first prompt page including second prompt information is generated; wherein the second prompt information is used to prompt that the login source is not WeChat and voting is not possible; Alternatively, if the login time is not within the voting period, a first prompt page including third prompt information is generated; wherein the third prompt information is used to prompt that the voting activity has not started yet or the voting activity has ended, and voting is not possible; Alternatively, if the verification code entered by the target user on the login page is different from the verification code generated by the login page, a first prompt page including fourth prompt information is generated; wherein the fourth prompt information is used to prompt the target user that the verification code has not been passed and the user cannot vote; Alternatively, if the login IP address is not in the voting area, a first prompt page including fifth prompt information is generated; wherein the fifth prompt information is used to prompt that the IP address is not in the voting area and cannot vote.
4. The voting method based on user characteristics and behavior restrictions as claimed in claim 1, characterized in that: If it is determined that the voting operation of the target user satisfies the multiple voting restriction conditions at the same time, then after the target user has successfully voted, the method further includes: Update the local records of the total number of objects voted by the target user during the voting period, the number of objects voted by the target user today, the total number of votes cast by the target user during the voting period, the number of votes cast by the target user today, the total number of votes cast by the target user for the target object during the voting period, the number of votes cast by the target user for the target object today, the total number of votes for the target category to which the target object belongs during the voting period, the number of votes for the target category today, and the total number of objects voted for the target category during the voting period.
5. The voting method based on user characteristics and behavior restrictions as claimed in claim 1, characterized in that: If it is determined that the voting operation of the target user satisfies the multiple voting restriction conditions at the same time, then after the target user has successfully voted, the method further includes: The target user's username, IP address and voting time are recorded.
6. A voting device based on user characteristics and behavior restrictions, characterized in that: include: The acquisition module is used to obtain the login information of the target user; The login information includes the user name, password and verification code entered by the target user on the login page, as well as the verification code generated by the login page, login source information, login time, and login IP address; A judgment module, used to judge whether the user name and password entered by the target user on the login page are the same as the user name and password pre-stored locally; If the user name entered by the target user on the login page is the same as the locally stored user name, and the password entered by the target user on the login page is the same as the password associated with the locally stored user name, then determine whether the login source information is WeChat; if the login source information is WeChat, then determine whether the login time is during the voting period; if the login time is during the voting period, then determine whether the verification code entered by the target user on the login page is the same as the verification code generated by the login page; If the verification code entered by the target user on the login page is the same as the verification code generated by the login page, then determining whether the login IP address is in the voting area; A display module, used to display a voting page if the login IP address is in the voting area, so that the target user can vote; If the user name entered by the target user on the login page is the same as the user name pre-stored locally, and the password entered by the target user on the login page is the same as the password associated with the user name pre-stored locally, the step of determining whether the login source information is WeChat includes: comparing the user name and password entered by the target user on the login page with the corresponding values in the locally pre-stored user table, if the user name or password does not match, determining that the target user login fails, if the user name and password both match, determining that the target user login succeeds, and determining whether the login source information is WeChat; the user table includes the user names and passwords of multiple users; If the login source information is WeChat, the step of determining whether the login time is during the voting period includes: identifying the value in the login source table, if the login user is from WeChat, WeChat is recorded in the login source field of the user table, when the target user enters the login page and clicks the login button, the value of the voter login source field in the voter restriction table is compared with the value of the login source field in the user table, if they are different, it is determined that the login source of the target user is not WeChat, if they are the same, it is determined that the login source of the target user is WeChat, and it is determined whether the login time is during the voting period; the value of the voter login source field in the voter restriction table is pre-set to WeChat by the administrator; The step of determining whether the login IP address is in the voting area comprises: after ensuring that the login IP address is not a private address, using the ip2region.db database to search for a city identifier corresponding to the geographical location of the login IP address, and checking whether the city identifier is in the voting area; If the login IP address is in the voting area, after displaying the voting page, the method further includes: in response to the target user's voting operation on the target object in the voting page, determining whether the target user's voting operation satisfies multiple voting restriction conditions at the same time; if it is determined that the target user's voting operation satisfies the multiple voting restriction conditions at the same time, the target user votes successfully; if it is determined that the target user's voting operation does not satisfy any of the voting restriction conditions, generating a second prompt page; the second prompt page is an interface for reminding the target user that the voting has failed; The multiple voting restriction conditions include that the total number of objects voted by the target user during the voting period does not exceed the maximum number of objects that can be voted for, the number of objects voted by the target user today does not exceed the number of objects that can be voted for every day, the total number of votes cast by the target user during the voting period does not exceed the maximum number of votes that can be voted for, the number of votes cast by the target user today does not exceed the number of votes that can be voted for every day, the total number of votes cast by the target user for the target object during the voting period does not exceed the maximum number of votes that can be cast for the same object, the number of votes cast by the target user for the target object today does not exceed the number of votes that can be cast for the same object every day, the total number of votes received by the target category to which the target object belongs during the voting period does not exceed the maximum number of votes that can be cast for the same category, the number of votes received by the target category today does not exceed the number of votes that can be cast for the same category every day, and the total number of objects voted for the target category during the voting period does not exceed the maximum number of objects that can be voted for the same category.
7. A computer device, characterized in that: The computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the voting method based on user characteristics and behavior restrictions as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the processor executes the computer program to implement the voting method based on user characteristics and behavior restrictions as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Mobile phone voting method and voting system for method
CN103065385A
WeChat-based highly interactive voting system
CN107770052A
Unnamed electronic voting system and working method thereof
CN115035648A