Ballot counting method and apparatus, electronic device, and readable storage medium
By using the sum of the vote identifier and the encrypted number in the vote statistics, combined with a random algorithm to generate the encrypted number, the problem of data collectors understanding user feedback data is solved, thus achieving privacy protection and security of the voting results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-28
- Publication Date
- 2026-03-03
AI Technical Summary
Data collectors may use anonymization to obtain users' specific feedback data, which violates the original intention of privacy protection.
By obtaining the sum of the voting identifier and encrypted number of each voting object, the data is sent to the voting statistics device. A random algorithm is used to generate an encrypted number to hide the real voting identifier. The sum of the encrypted numbers of all voting objects is calculated to prevent the voting statistics device from knowing the real voting identifier.
This technology protects user privacy when calculating voting results, prevents voting statistics devices from knowing users' actual voting content, and improves the security of voting identifiers.
Smart Images

Figure CN116524642B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, specifically to a voting statistics method, voting statistics device, electronic device, and readable storage medium. Background Technology
[0002] When users need to provide feedback on their service experience while using the services provided by the service provider, they usually need to send the feedback data to a centralized data collection party, which then compiles the user's feedback data.
[0003] Currently, in order to collect authentic feedback data and protect user privacy, data collectors generally declare that the collection of feedback data is anonymous.
[0004] However, anonymization is claimed by the data collector, and its authenticity depends entirely on them. The data collector can locate users based on IP addresses and / or ID information. Therefore, the data collector can still understand the specific content of the user's feedback data. Summary of the Invention
[0005] The purpose of this application is to provide a voting statistics method, apparatus, electronic device, and readable storage medium that can solve the problem that data collectors can learn about the voting content of users on an option representing the usage of a service.
[0006] In a first aspect, embodiments of this application provide a voting statistics method applicable to any voting device, the method comprising:
[0007] Obtain the voting identifier of the voting object;
[0008] Send first information to the voting statistics device, wherein the first information includes the voting object identifier and the sum of the voting identifier and the encrypted number;
[0009] When the voting device is the first voting device, the system receives second information sent by any voting device, wherein the second information is the encrypted number information of the voting object corresponding to any voting device;
[0010] Based on the second information, the encrypted sum of all voting objects is calculated and sent to the voting statistics device.
[0011] Secondly, embodiments of this application provide a voting statistics method, applied to a voting statistics device, including:
[0012] The system receives first information sent by the voting device, wherein the first information includes the identifier of the voting object and the sum of the voting identifier and the encrypted number;
[0013] Receive the encrypted sum of all votes sent by the first voting device;
[0014] The voting statistics are determined based on the sum of the voting identifier and the encrypted number in the first information, and the sum of the encrypted numbers of all voting objects.
[0015] Thirdly, embodiments of this application provide a voting statistics device, applicable to any voting device, comprising:
[0016] The acquisition module is used to obtain the voting identifier of the voting object;
[0017] A first sending module is used to send first information to a voting statistics device, wherein the first information includes a voting object identifier and the sum of the voting identifier and an encrypted number;
[0018] The receiving module is configured to receive second information sent by any voting device when the voting device is the first voting device, wherein the second information is encrypted number information of the voting object corresponding to any voting device;
[0019] The second sending module is used to calculate the encrypted sum of all voting objects based on the second information and send it to the voting statistics device.
[0020] Fourthly, embodiments of this application provide a voting statistics device, applied to voting statistics equipment, comprising:
[0021] The first receiving module is configured to receive first information sent by the voting device, wherein the first information includes the identifier of the voting object and the sum of the voting identifier and the encrypted number;
[0022] The second receiving module is used to receive the encrypted sum of all voting objects sent by the first voting device;
[0023] The determining module is used to determine the voting statistics result based on the sum of the voting identifier and the encrypted number in the first information, and the sum of the encrypted numbers of all voting objects.
[0024] Fifthly, embodiments of this application provide an electronic device including a processor and a memory, the memory storing programs or instructions executable on the processor, the programs or instructions, when executed by the processor, implementing the steps of the method described in the first or second aspect.
[0025] In a sixth aspect, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first or second aspect.
[0026] In a seventh aspect, embodiments of this application provide a chip, the chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the methods described in the first or second aspect.
[0027] Eighthly, embodiments of this application provide a computer program product stored in a storage medium, which is executed by at least one processor to implement the method as described in the first or second aspect.
[0028] In this embodiment, a voting statistics method applicable to any voting device is provided. The method includes: obtaining the voting identifier of a voting object; sending first information to the voting statistics device, wherein the first information includes the voting object identifier and the sum of the voting identifier and an encrypted number; if the voting device is a first voting device, receiving second information sent by any voting device, wherein the second information is the encrypted number information of the voting object corresponding to any voting device; calculating the sum of the encrypted numbers of all voting objects based on the second information, and sending it to the voting statistics device. This method allows the voting statistics device to obtain the voting statistics result of how many voting objects out of t voting objects support (or are satisfied with) the voting item. However, in this method, since the voting objects send the sum of the voting identifier and the encrypted number (which hides the true voting identifier) to the voting statistics device, the voting statistics device cannot know the true voting identifier of each voting object. Therefore, the voting statistics device cannot know the content of the voting objects' feedback data on the voting item. Attached Figure Description
[0029] Figure 1 A flowchart illustrating a voting statistics method according to an embodiment of this application;
[0030] Figure 2 A flowchart illustrating another voting statistics method according to an embodiment of this application;
[0031] Figure 3 A schematic diagram illustrating the structure of a voting statistics device according to an embodiment of this application;
[0032] Figure 4 A schematic diagram illustrating the structure of another voting statistics device according to an embodiment of this application;
[0033] Figure 5 A schematic diagram of the hardware structure of an electronic device according to an embodiment of this application. Figure 1 ;
[0034] Figure 6 A schematic diagram of the hardware structure of an electronic device according to an embodiment of this application. Figure 2 . Detailed Implementation
[0035] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0036] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0037] The voting statistics method, apparatus, electronic device, and readable storage medium provided in this application are described below with reference to the accompanying drawings and specific embodiments and application scenarios.
[0038] The voting statistics method provided in this application can be applied to the following scenarios:
[0039] n voting objects p i (i = 1, 2, ..., n), where v ∈ v0, 1 is the candidate voting identifier for each voting item. Here, 1 indicates selection (or satisfaction, etc.) of the voting item, and 0 indicates non-selection (or dissatisfaction, etc.) of the voting item. When t out of n voters vote on a voting item, the voting is considered valid, and voting stops. The voting identifiers selected by the voters from the candidate voting identifiers are used as feedback data for the voting item. Additionally, the number of voters among the t voters who support (or are satisfied with) the voting item is counted. It is understood that t is a positive integer greater than 1 and less than or equal to n.
[0040] In one example, when the voting item is the usage of the service provided by the service provider, the candidate voting indicators for the voting item are "satisfied with the service provided by the service provider" or "unsatisfied with the service provided by the service provider". Based on the above voting behavior, the number of users who are satisfied with the service provided by the service provider can be counted.
[0041] This application provides a voting statistics method, which can be applied to any voting device, such as... Figure 1 As shown, it includes the following S1100-S1400:
[0042] S1100, Obtain the voting identifier of the voting object.
[0043] In this set of embodiments, the voting object P is... i The voting symbol is denoted as v i v i It can be 0 or 1.
[0044] Voting equipment is a device for voters to cast their votes. Voters select their preferred option on the voting equipment. The voting equipment then retrieves the voter's vote number based on their selection.
[0045] For example, a voting item includes two options for voting: 0 and 1, where 1 indicates that the voting item is selected (or satisfied), and 0 indicates that the voting item is not selected (or satisfied).
[0046] In one example, a voting option could be an evaluation of a service, such as whether one is satisfied with service A. The voting options include: satisfied and dissatisfied.
[0047] It is understood that the voting statistics method provided in the embodiments of this application can be used for any voting item containing two candidate voting identifiers.
[0048] S1200: Send the first message to the voting statistics device.
[0049] The first piece of information includes the voting object identifier and the sum of the voting identifier and the encrypted number.
[0050] In this embodiment of the application, the voting statistics device is a device that counts voting identifiers to obtain the voting statistics results for the voting items.
[0051] In one example, the voting device is a terminal device, and the voting statistics device is a server.
[0052] The voter identifier is used to describe the identity information of the voter. For example, the voter identifier can be a unique identifier that can locate the voter, such as their ID card number, account ID, or mobile phone number.
[0053] Based on the above S1200, the voting object identifier is sent to the voting statistics device, which can then determine which of the voting objects participated in voting on the voting item.
[0054] In this embodiment of the application, the voting object P is... i The encrypted number is denoted as s iThe encrypted number is noise added to the vote identifier to hide the true vote identifier. Based on this, an encrypted number is added to the vote identifier to obtain the sum of the vote identifier and the encrypted number. This sum is then sent to the vote counting device, thus hiding the true vote identifier from the device. In this way, the vote counting device cannot know the true vote identifier of each voter, and therefore cannot know the content of the voter's feedback data on the vote item.
[0055] In one embodiment of this application, the encryption number can be implemented through the following steps S1210 and S1211:
[0056] S1210. Obtain a random number according to the random algorithm.
[0057] In the embodiments of this application, the specific form of the random algorithm is not limited.
[0058] S1211. Use a random number as the encrypted number for the voting object.
[0059] In this embodiment of the application, due to the randomness of the random number, when the random number obtained according to the random algorithm is used as the encrypted number, the voting statistics device cannot predict the specific content of the encrypted number of each voting device, which greatly improves the security of the voting identifier.
[0060] S1300: If the voting device is the first voting device, receive the second information sent by any voting device.
[0061] The second piece of information is the encrypted number information of the voting object corresponding to any voting device.
[0062] In this embodiment of the application, the first voting device is the device that sends the encrypted sum to the voting statistics device.
[0063] In one embodiment of this application, the designation of the first voting device can be achieved by manual instruction or by electing one of multiple voting devices. Based on this, the voting statistics method provided in this application embodiment further includes the following before S1300:
[0064] S1310. Upon receiving the instruction information from the first voting device, the voting device is identified as the first voting device.
[0065] In this embodiment of the application, the first voting device indication information is used to notify the voting device to act as the first voting device.
[0066] In another embodiment of this application, a voting device randomly selected from any voting device can be used as the first voting device.
[0067] The method for determining the first voting device described above does not require the participation of the voting statistics device. This avoids collusion between the voting statistics device and the first voting device, and prevents the first voting device from tampering with the encrypted sum.
[0068] As can be seen from S1300 above, for any voting device, the voting statistics method provided in this application embodiment further includes a step of sending second information to the first voting device before S1300. This step can be implemented in at least the following two ways. Specifically:
[0069] In the first method, the second information is the encrypted number of the voting object corresponding to any voting device. The voting device uses the encrypted number of the corresponding voting object as the second information and then sends the second information to the first voting device.
[0070] The second method can be implemented according to the following S1310 to S1314:
[0071] S1310. Construct a random polynomial of order t-1 based on the encrypted number of the voting object.
[0072] Wherein, the constant term of the t-1 order random polynomial is the encrypted number of the voting object, and t is the number of valid voting objects.
[0073] In this embodiment of the application, for any voting object P i P i The voting device selects a t-1 order random polynomial (random refers to the random generation of the coefficients of the polynomial). The polynomial satisfies f i (0)=s i .
[0074] It should be noted that for a polynomial of order t-1, if the t points on the curve corresponding to the polynomial are known, the polynomial can be solved. S1314 needs to utilize this property.
[0075] S1311. The j-th function value in the t-1 order random polynomial is sent as encrypted data to the j-th voting device.
[0076] Where j is the serial number of the voting device.
[0077] It should be noted that, in this embodiment of the application, there are no restrictions on how any voting device determines its own sequence number and the sequence number of other voting devices. Furthermore, the sequence number of the voting device is the same as the sequence number of the corresponding voting object.
[0078] In the embodiments of this application, P i The corresponding voting device will assign the function value corresponding to the j-th point on the curve of the (t-1)th order random polynomial. (referred to as s)i The j-th fragment is sent to the j-th voting object P. j The voting device, j∈[1,t] (j takes the values of 1, positive integers from 1 to t and t respectively).
[0079] S1312. Receive encrypted digital information sent by any voting device.
[0080] In this embodiment of the application, based on the above S1311, P i The data possessed by each voting device is: the function value s of the i-th point on the polynomial curve corresponding to each voting device. ji .
[0081] S1313. Based on the received encrypted data information, determine the encrypted data information of the corresponding voting object of the voting device.
[0082] In this embodiment of the application, the specific implementation of S1313 is as follows:
[0083] Find the function value s at the i-th point on the polynomial curve corresponding to each voting device. ji and c i , the c i This serves as the encrypted number information for the corresponding voting object of the voting device. Specifically, the implementation of S1313 above is as follows:
[0084]
[0085] S1314. Send the encrypted data as the second information to the first voting device.
[0086] In the second method described above, only the voting party knows their encrypted number, which prevents malicious voting parties from colluding with the voting statistics device to send the encrypted numbers of other voting parties to the voting statistics device.
[0087] S1400: Based on the second information, calculate the sum of encrypted numbers for all voting objects and send it to the voting statistics device.
[0088] In this embodiment of the application, the sum of the encrypted numbers of all voting objects is taken as the encrypted number sum.
[0089] For the first method in S1300 above, the sum of the second information can be calculated to obtain the encrypted sum of all voting objects.
[0090] For the second method in S1300 above, the specific implementation of S1400 is as follows:
[0091] Using the Lagrange difference formula and based on the ci sent by each voting device received in S1314 above, the t-1 order polynomial is obtained:
[0092] And, the constant term of the above-mentioned (t-1)th order polynomial That is, the sum of the encrypted numbers of all voting objects.
[0093] In this embodiment of the application, the encrypted number is denoted as...
[0094] In this embodiment, the encrypted sum is obtained by a first voting device, without the participation of a voting statistics device. This prevents the voting statistics device from maliciously tampering with the encrypted sum.
[0095] Based on S1100 above, the voting statistics device obtains the vote identifier and encrypted sum for each voting object, and based on S1300 above, the voting statistics device obtains the sum of the encrypted sums of all voting objects, i.e., the encrypted sum. Thus, the voting statistics device first sums the vote identifier and encrypted sum of each voting object, i.e., it first obtains...
[0096] Furthermore, the voting counting device subtracts the encrypted number from |v|. Then the sum of the voting symbols can be obtained. That is, the voting statistics device can obtain the voting statistics result of how many of the t voting objects support (or are satisfied with) the voting item.
[0097] In this embodiment, a voting statistics method applicable to any voting device is provided. The method includes: obtaining the voting identifier of a voting object; sending first information to a voting statistics device, wherein the first information includes the voting object identifier and the sum of the voting identifier and an encrypted number; if the voting device is a first voting device, receiving second information sent by any voting device, wherein the second information is the encrypted number information of the voting object corresponding to any voting device; calculating the sum of the encrypted numbers of all voting objects based on the second information, and sending it to the voting statistics device. This method allows the voting statistics device to obtain the voting statistics result of how many voting objects out of t voting objects support (or are satisfied with) the voting item. However, in this method, since the voting objects send the voting identifier and the sum of the encrypted number (which hides the true voting identifier) to the voting statistics device, the voting statistics device cannot know the true voting identifier of each voting object. Therefore, the voting statistics device cannot know the content of the feedback data of the voting objects on the voting item.
[0098] In one embodiment of this application, the voting statistics method provided in this application further includes the following S1500:
[0099] S1500: Upon receiving a stop voting instruction, stop the step of obtaining the voting identifier of the voting object.
[0100] In this embodiment of the application, the stop voting instruction is used to indicate that the voting object does not need to vote.
[0101] In this embodiment, a voting action is valid when t voting objects vote on a voting item. At this time, there is no need for voting objects who have not yet voted to vote. Therefore, a stop-voting instruction can be sent to the voting devices that have not yet voted. Upon receiving the stop-voting instruction, the voting devices that have not yet voted will not execute the steps S1100-S1400 described above. This achieves the counting of the minimum number of voting identifiers, thereby avoiding unnecessary computational resource overhead for the voting devices.
[0102] This application also provides another voting statistics method, applied to voting statistics equipment, such as... Figure 2 As shown, the method includes the following steps S2100 to S2300:
[0103] S2100: Receive the first information sent by the voting device.
[0104] The first piece of information includes the identifier of the voting object and the sum of the voting identifier and the encrypted number.
[0105] In this embodiment, based on S2100 described above, the voting statistics device can determine which of the voting subjects participated in voting on the voting item. However, the voting statistics device cannot obtain the actual voting identifier for each voting subject. That is, the voting statistics device cannot know the content of the feedback data from the voting subjects regarding the voting item.
[0106] S2200: Receive the encrypted numbers of all voting objects sent by the first voting device.
[0107] S2300. Determine the voting statistics result based on the sum of the voting identifier and the encrypted number in the first information, and the sum of the encrypted numbers of all voting objects.
[0108] In this embodiment, the voting statistics device first sums the voting identifiers and encrypted numbers of all voting objects based on the obtained voting identifier and encrypted number sum of each voting object.
[0109]
[0110] Furthermore, the voting counting device subtracts the encrypted number from |v|. Then the sum of the voting symbols can be obtained. That is, the voting statistics device can obtain the voting statistics result of how many of the t voting objects support (or are satisfied with) the voting item.
[0111] Furthermore, in one embodiment of this application, the voting statistics method provided by this application embodiment further includes: outputting voting statistics results.
[0112] This application provides a voting statistics method applied to a voting statistics device. The method includes: receiving first information sent by the voting device, wherein the first information includes the identifier of the voting object and the sum of the voting identifier and an encrypted number; receiving the sum of encrypted numbers of all voting objects sent by the first voting device; and determining the voting statistics result based on the sum of the voting identifier and the encrypted number in the first information and the sum of the encrypted numbers of all voting objects. Through this method, the voting statistics device can obtain the voting statistics result of how many voting objects out of t voting objects support (or are satisfied with) the voting item. However, in this method, since the voting objects send the sum of the voting identifier and the encrypted number (which hides the true voting identifier) to the voting statistics device, the voting statistics device cannot know the true voting identifier of each voting object. Therefore, the voting statistics device cannot know the content of the feedback data from the voting objects regarding the voting item.
[0113] In one embodiment of this application, the voting statistics method provided in this application further includes the following S2400:
[0114] S2400: Upon receiving t first messages, a stop voting instruction is sent to the voting devices that have not sent first messages, based on the identifier of the voting object.
[0115] In this embodiment, if t first messages are received, the voting action is considered valid. At this time, the voting statistics device sends a stop-voting instruction to the voting devices that have not yet voted. This instructs the voting devices that have not yet voted to vote, thus avoiding unnecessary computational resource overhead for them.
[0116] The voting statistics method provided in this application can be executed by a voting statistics device. This application uses the example of a voting statistics device executing the voting statistics method to illustrate the voting statistics device provided in this application.
[0117] This application provides a voting statistics device 300, applicable to any voting device, such as... Figure 3 As shown, it includes:
[0118] Module 310 is used to obtain the voting identifier of the voting object;
[0119] The first sending module 320 is used to send first information to the voting statistics device, wherein the first information includes a voting object identifier and the sum of the voting identifier and the encrypted number;
[0120] The receiving module 330 is configured to receive second information sent by any voting device when the voting device is the first voting device, wherein the second information is the encrypted number information of the voting object corresponding to any voting device;
[0121] The second sending module 340 is used to calculate the encrypted sum of all voting objects based on the second information and send it to the voting statistics device.
[0122] In this embodiment, a voting statistics device is provided, applicable to any voting device, comprising: an acquisition module for acquiring the voting identifier of a voting object; a first sending module for sending first information to the voting statistics device, wherein the first information includes the voting object identifier and the sum of the voting identifier and an encrypted number; a receiving module for receiving second information sent by any voting device when the voting device is the first voting device, wherein the second information is the encrypted number information of the voting object corresponding to any voting device; and a second sending module for calculating the sum of the encrypted numbers of all voting objects based on the second information and sending it to the voting statistics device. This device allows the voting statistics device to obtain the voting statistics result of how many voting objects out of t voting objects support (or are satisfied with) the voting item. Simultaneously, since the voting objects send the sum of the voting identifier and the encrypted number (which hides the true voting identifier) to the voting statistics device, the voting statistics device cannot know the true voting identifier of each voting object. Therefore, the voting statistics device cannot know the content of the feedback data of the voting objects on the voting item.
[0123] In one embodiment of this application, the voting statistics device 300 provided in this application further includes: a third sending module and a fourth sending module, wherein:
[0124] The third sending module is used to construct a t-1 order random polynomial based on the encrypted number of the voting object, wherein the constant term of the t-1 order random polynomial is the encrypted number of the voting object, and t is the number of valid voting objects;
[0125] The j-th function value in the (t-1)th order random polynomial is used as encrypted sub-information and sent to the j-th voting device, where j is the sequence number of the voting device;
[0126] The receiving module 330 is also configured to receive encrypted digital information sent by any of the voting devices;
[0127] The fourth sending module is used to determine the encrypted number information of the corresponding voting object of the voting device based on the received encrypted number information;
[0128] The encrypted data information is sent to the first voting device as the second information.
[0129] In one embodiment of this application, the vote counting device 300 provided in this application further includes:
[0130] The determining module is used to determine the voting device as the first voting device upon receiving the first voting device indication information.
[0131] In one embodiment of this application, the vote counting device 300 provided in this application further includes:
[0132] The stop module is used to stop the step of obtaining the voting identifier of the voting object upon receiving a stop voting instruction.
[0133] This application embodiment also provides another voting statistics device 400, applied to voting statistics equipment, such as... Figure 4 As shown, it includes:
[0134] The first receiving module 410 is used to receive first information sent by the voting device, wherein the first information includes the identifier of the voting object and the sum of the voting identifier and the encrypted number;
[0135] The second receiving module 420 is used to receive the encrypted sum of all voting objects sent by the first voting device;
[0136] The determining module 430 is used to determine the voting statistics result based on the sum of the voting identifier and the encrypted number in the first information and the sum of the encrypted numbers of all voting objects.
[0137] In this embodiment, another voting statistics device is provided, applied to a voting statistics device, comprising: a first receiving module for receiving first information sent by the voting device, wherein the first information includes the identifier of the voting object and the sum of the voting identifier and an encrypted number; a second receiving module for receiving the sum of the encrypted numbers of all voting objects sent by the first voting device; and a determining module for determining the voting statistics result based on the sum of the voting identifier and the encrypted number in the first information and the sum of the encrypted numbers of all voting objects. Through this device, the voting statistics device can obtain the voting statistics result of how many voting objects out of t voting objects support (or are satisfied with) the voting item. Simultaneously, since the voting objects send the sum of the voting identifier and the encrypted number (which hides the true voting identifier) to the voting statistics device, the voting statistics device cannot know the true voting identifier of each voting object. Therefore, the voting statistics device cannot know the content of the feedback data of the voting objects on the voting item.
[0138] In one embodiment of this application, the vote counting device 400 provided in this application embodiment further includes:
[0139] The sending module is used to send a stop voting instruction to the voting devices that have not sent the first information, based on the identifier of the voting object, when it receives t first messages.
[0140] The voting statistics device in this application embodiment is either voting statistics device 300 or voting statistics device 400, which can be an electronic device or a component of an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the specific type of device.
[0141] The voting counting device in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit it.
[0142] When the voting statistics device provided in this application embodiment is a voting statistics device 300, it can achieve... Figure 1 When the voting statistics device provided in this application embodiment is a voting statistics device 400, it can achieve... Figure 2 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.
[0143] Optionally, such as Figure 5 As shown in the illustration, this application also provides an electronic device 500, including a processor 501 and a memory 502. The memory 502 stores a program or instructions that can run on the processor 501. When the program or instructions are executed by the processor 501, they implement the above-described... Figure 1 The voting statistics method shown in the embodiment or as shown in the example Figure 2 The steps of the voting statistics method embodiment shown are the same and can achieve the same technical effect. To avoid repetition, they will not be described again here.
[0144] Figure 6 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of this application.
[0145] The electronic device 600 includes, but is not limited to, components such as: radio frequency unit 601, network module 602, audio output unit 603, input unit 604, sensor 605, display unit 606, user input unit 607, interface unit 608, memory 609, and processor 610.
[0146] Those skilled in the art will understand that the electronic device 600 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 610 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 6 The electronic device structure shown does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.
[0147] The processor 610 is used to obtain the voting identifier of the voting object;
[0148] Send first information to the voting statistics device, wherein the first information includes the voting object identifier and the sum of the voting identifier and the encrypted number;
[0149] When the voting device is the first voting device, the system receives second information sent by any voting device, wherein the second information is the encrypted number information of the voting object corresponding to any voting device;
[0150] Based on the second information, the encrypted sum of all voting objects is calculated and sent to the voting statistics device.
[0151] In this embodiment, the processor in the electronic device is used to obtain the voting identifier of the voting object; send first information to the voting statistics device, wherein the first information includes the voting object identifier and the sum of the voting identifier and the encrypted number; when the voting device is a first voting device, receive second information sent by any voting device, wherein the second information is the encrypted number information of the voting object corresponding to the voting device; calculate the sum of the encrypted numbers of all voting objects according to the second information, and send it to the voting statistics device. Through this electronic device, the voting statistics device can obtain the voting statistics result of how many voting objects out of t voting objects support (or are satisfied with) the voting item. At the same time, since the voting objects send the sum of the voting identifier and the encrypted number (which hides the real voting identifier) to the voting statistics device, the voting statistics device cannot know the real voting identifier of each voting object. Therefore, the voting statistics device cannot know the content of the feedback data of the voting objects on the voting item.
[0152] Optionally, the processor 610 is further configured to construct a t-1 order random polynomial based on the encrypted number of the voting object, wherein the constant term of the t-1 order random polynomial is the encrypted number of the voting object, and t is the number of valid voting objects;
[0153] The j-th function value in the (t-1)th order random polynomial is used as encrypted sub-information and sent to the j-th voting device, where j is the sequence number of the voting device;
[0154] Receive encrypted digital information sent by any of the voting devices;
[0155] Based on the received encrypted data information, the encrypted data information of the corresponding voting object of the voting device is determined;
[0156] The encrypted data information is sent to the first voting device as the second information.
[0157] Optionally, the processor 610 is further configured to identify the voting device as the first voting device upon receiving the first voting device indication information.
[0158] Optionally, the processor 610 is also configured to stop the step of obtaining the voting identifier of the voting object upon receiving a stop voting instruction.
[0159] Alternatively, processor 610 is configured to receive first information sent by voting device, wherein the first information includes an identifier of the voting object and the sum of the voting identifier and an encrypted number;
[0160] Receive the encrypted sum of all votes sent by the first voting device;
[0161] The voting statistics are determined based on the sum of the voting identifier and the encrypted number in the first information, and the sum of the encrypted numbers of all voting objects.
[0162] In this embodiment of the application, the processor in the electronic device is used to receive first information sent by the voting device, wherein the first information includes the identifier of the voting object and the sum of the voting identifier and the encrypted number;
[0163] The system receives the encrypted sum of all voting objects sent by the first voting device; based on the sum of the voting identifier and the encrypted sum in the first information, and the sum of the encrypted sums of all voting objects, it determines the voting statistics result. Through this electronic device, the voting statistics device can obtain the voting statistics result of how many voting objects out of t voting objects support (or are satisfied with) the voting item. At the same time, because the voting objects send the sum of the voting identifier and the encrypted sum (which hides the true voting identifier) to the voting statistics device, the voting statistics device cannot know the true voting identifier of each voting object. Therefore, the voting statistics device cannot know the content of the voting objects' feedback data on the voting item.
[0164] Optionally, the processor 610 is further configured to, upon receiving t first messages, send a stop voting instruction to the voting device that did not send the first messages, based on the identifier of the voting object.
[0165] It should be understood that, in this embodiment, the input unit 604 may include a graphics processing unit (GPU) 6041 and a microphone 6042. The GPU 6041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 606 may include a display panel 6061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 607 includes at least one of a touch panel 6071 and other input devices 6072. The touch panel 6071 is also called a touch screen. The touch panel 6071 may include two parts: a touch detection device and a touch controller. Other input devices 6072 may include, but are not limited to, a physical keyboard, function keys (such as volume control buttons, power buttons, etc.), a trackball, a mouse, and a joystick, which will not be described in detail here.
[0166] The memory 609 can be used to store software programs and various data. The memory 609 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 609 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 609 in this embodiment includes, but is not limited to, these and any other suitable types of memory.
[0167] Processor 610 may include one or more processing units; optionally, processor 610 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 610.
[0168] This application embodiment also provides a readable storage medium storing a program or instructions that, when executed by a processor, implement the above-described... Figure 1 The voting statistics method shown in the embodiment or as shown in the example Figure 2 The various processes of the voting statistics method embodiment shown can achieve the same technical effect, and will not be described again here to avoid repetition.
[0169] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0170] This application embodiment also provides a chip, the chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to achieve the above-described... Figure 1 The voting statistics method shown in the embodiment or as shown in the example Figure 2 The various processes of the voting statistics method embodiment shown can achieve the same technical effect, and will not be described again here to avoid repetition.
[0171] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0172] This application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the above-described... Figure 1 The voting statistics method shown in the embodiment or as shown in the example Figure 2 The various processes of the voting statistics method embodiment shown can achieve the same technical effect, and will not be described again here to avoid repetition.
[0173] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0174] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0175] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A method of vote counting, characterized by, The method is applied to any voting device, and comprises the following steps: obtaining a voting identifier of a voting object; sending first information to a voting statistics device, wherein the first information comprises the voting identifier and a sum of the voting identifier and an encrypted number; in a case where the voting device is a first voting device, receiving second information sent by any voting device, wherein the second information is encrypted number information of a corresponding voting object of the any voting device; calculating a sum of encrypted numbers of all voting objects according to the second information, and sending the sum to the voting statistics device; wherein, before the receiving step, the method further comprises the following steps: constructing a t-1 order random polynomial according to the encrypted number of the voting object, wherein a constant term of the t-1 order random polynomial is the encrypted number of the voting object, and t is a number of valid voting objects; sending a jth function value in the t-1 order random polynomial as encrypted number sub-information to a jth voting device, wherein j is a serial number of the voting device; receiving encrypted number sub-information sent by any voting device; determining encrypted number information of a corresponding voting object of the voting device according to the received encrypted number sub-information; sending the encrypted number information as second information to the first voting device.
2. The method of claim 1, wherein, before the receiving step, the method further comprises the following step: in a case where first voting device indication information is received, determining the voting device as the first voting device.
3. The method of claim 1, wherein, the method further comprises the following step: in a case where a stop voting instruction is received, stopping the obtaining step.
4. A method of vote counting, characterized by, the method is applied to a voting statistics device, and comprises the following steps: receiving first information sent by a voting device, wherein the first information comprises an identifier of a voting object and a sum of a voting identifier and an encrypted number; receiving a sum of encrypted numbers of all voting objects sent by a first voting device, wherein the sum of encrypted numbers is calculated by the first voting device according to second information sent by any voting device, and the second information is encrypted number information of a corresponding voting object of the any voting device; determining a voting statistics result according to the sum of the voting identifier and the encrypted number in the first information and the sum of encrypted numbers of all voting objects; wherein, the voting device constructs a t-1 order random polynomial according to the encrypted number of the voting object, wherein a constant term of the t-1 order random polynomial is the encrypted number of the voting object, and t is a number of valid voting objects; the voting device sends a jth function value in the t-1 order random polynomial as encrypted number sub-information to a jth voting device, wherein j is a serial number of the voting device; the voting device receives encrypted number sub-information sent by any voting device; the voting device determines encrypted number information of a corresponding voting object of the voting device according to the received encrypted number sub-information; and the voting device sends the encrypted number information as second information to the first voting device.
5. The method of claim 4, wherein, the method further comprises the following step: in a case where t first information is received, sending a stop voting instruction to a voting device which does not send the first information according to the identifier of the voting object.
6. A vote counting apparatus characterized by comprising: the method is applied to any voting device, and comprises the following steps: An obtaining module is configured to obtain a voting identifier of a voting object; A first sending module is configured to send first information to a voting statistics device, wherein the first information comprises a voting object identifier and a sum of the voting identifier and an encrypted number; A receiving module is configured to, in a case where the voting device is a first voting device, receive second information sent by any voting device, wherein the second information is encrypted number information of a voting object corresponding to the any voting device; A second sending module is configured to calculate a sum of encrypted numbers of all voting objects according to the second information and send the sum to the voting statistics device; The voting statistics device further comprises a third sending module and a fourth sending module, wherein: The third sending module is configured to construct a t-1 order random polynomial according to the encrypted number of the voting object, a constant term of the t-1 order random polynomial being the encrypted number of the voting object, t being a number of valid voting objects; a jth function value in the t-1 order random polynomial is taken as encrypted number sub-information and sent to a jth voting device, j being a serial number of the voting device; The receiving module is further configured to receive encrypted number sub-information sent by any of the voting devices; The fourth sending module is configured to determine encrypted number information of a voting object corresponding to the voting device according to the received encrypted number sub-information; The encrypted number information is taken as second information and sent to the first voting device.
7. A vote counting apparatus characterized by comprising: The application is applied to a voting statistics device and comprises: A first receiving module is configured to receive first information sent by a voting device, wherein the first information comprises an identifier of a voting object and a sum of a voting identifier and an encrypted number; A second receiving module is configured to receive a sum of encrypted numbers of all voting objects sent by a first voting device, the sum of encrypted numbers being calculated by the first voting device according to second information sent by any of the voting devices, the second information being encrypted number information of a voting object corresponding to the any voting device; A determining module is configured to determine a voting statistics result according to the sum of the voting identifier and the encrypted number in the first information and the sum of encrypted numbers of all voting objects; The voting device constructs a t-1 order random polynomial according to the encrypted number of the voting object, a constant term of the t-1 order random polynomial being the encrypted number of the voting object, t being a number of valid voting objects; a jth function value in the t-1 order random polynomial is taken as encrypted number sub-information and sent to a jth voting device, j being a serial number of the voting device; encrypted number sub-information sent by any of the voting devices is received; encrypted number information of a voting object corresponding to the voting device is determined according to the received encrypted number sub-information; and the encrypted number information is taken as second information and sent to the first voting device.
8. An electronic device, comprising: The application comprises a processor and a memory, the memory stores programs or instructions that can run on the processor, and the programs or instructions are executed by the processor to implement steps of the voting statistics method according to any one of claims 1-5.
9. A readable storage medium, characterized by, The readable storage medium stores programs or instructions, which are executed by the processor to implement the steps of the voting statistics method according to any one of claims 1-5.
Citation Information
Patent Citations
Voting method, device and equipment based on Blockchain, and medium
CN108768607A
Voting method based on blockchain technology
CN111970121A