Electronic voting counting method and apparatus

CN123016568APending Publication Date: 2026-10-30INSPUR SOFTWARE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611017897.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-09
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

现有方案大多依赖预设阈值、黑名单、访问频次限制或验证码校验等静态规则,难以有效识别分布式代理投票、低频刷票、自动化脚本投票、模拟人工操作投票等新型异常行为

Benefits of technology

本发明通过提取投票请求在时间维度、空间维度、终端环境维度以及交互行为维度的多维特征,并结合异常检测模型进行综合分析,从而能够识别传统基于频率限制或简单规则难以发现的异常投票行为。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123016568A_ABST
    Figure CN123016568A_ABST
Patent Text Reader

Abstract

The application relates to the field of electronic voting, and particularly provides an electronic voting counting method and device. After receiving a voting request, user behavior features, terminal environment features, network context features and time sequence features related to the voting request are extracted; the features are analyzed based on a preset behavior recognition model or a rule engine, and an abnormal risk result corresponding to the voting behavior is obtained; then, according to the risk result, the voting request is subjected to a duplicate checking, anonymous identification generation, ticket processing, voting weight calculation or classified voting processing; a voting request summary, a behavior recognition result summary, a voting process summary and a voting result summary are written into a trusted storage structure to form a traceable and checkable voting evidence chain; and finally, an electronic voting counting result and corresponding audit checking information are output. Compared with the prior art, the application can dynamically identify abnormal behaviors in the voting process, and can also perform trusted storage of the voting process and result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electronic voting, and specifically provides an electronic vote counting method and apparatus. Background Technology

[0002] In recent years, with the development of internet technology, mobile terminal technology, and online identity authentication technology, electronic voting systems have been gradually applied to scenarios such as corporate governance, public affairs voting, academic selection, event review, and online interaction. Compared with traditional paper voting methods, electronic voting has advantages such as convenient participation, high vote counting efficiency, fast statistical speed, and wide coverage, and therefore it is being used more and more widely in actual business.

[0003] Existing electronic voting systems typically control voting behavior through methods such as account login, SMS verification codes, image verification codes, device identification, and access frequency restrictions, and rely on centralized databases to store, aggregate, and count voting data. While these technical solutions can meet basic voting needs in general business scenarios, they still exhibit significant technical shortcomings in complex network environments, high-concurrency access scenarios, and scenarios with the risk of malicious vote-rigging.

[0004] On the one hand, existing electronic voting systems have limited ability to identify abnormal voting behavior. Most existing solutions rely on static rules such as preset thresholds, blacklists, access frequency limits, or CAPTCHA verification, which are insufficient to effectively identify new abnormal behaviors such as distributed proxy voting, low-frequency vote-buying, automated script voting, and simulated manual voting. Especially when attackers use dynamic IPs, proxy node switching, automated browsers, or multi-terminal collaborative operations, traditional detection methods based on single rules are prone to insufficient identification accuracy, high false positive rates, or significant bypass risks.

[0005] On the other hand, existing electronic voting systems still have shortcomings in terms of vote counting credibility and result traceability. Most systems use centralized databases to record voting requests, voting results, and vote counting logs. If database management access control is lax, the logging mechanism is inadequate, or there is a lack of effective verification links, historical voting records, vote counting processes, or statistical results may lack sufficient anti-tampering capabilities, thereby affecting the credibility of the voting results. In the event of a dispute, existing systems often struggle to provide a complete, continuous, and verifiable chain of evidence to support result review and auditing.

[0006] Furthermore, in existing electronic voting systems, there is often a strong correlation between identity authentication information and voting behavior data. Some solutions, in order to achieve one person, one vote or duplicate voting verification, directly store the mapping relationship between user identity information, terminal information, and voting records, which can easily lead to problems such as identity information leakage, voting behavior correlation analysis, and insufficient privacy protection. Especially in application scenarios with high requirements for anonymity, compliance, and data minimization, existing technologies struggle to simultaneously ensure both vote authenticity verification and user privacy protection.

[0007] Therefore, existing technologies still lack an electronic vote counting method that can dynamically identify abnormal behavior in the voting process, reliably record the vote counting process and results, and take into account the needs of identity information protection and audit traceability. Summary of the Invention

[0008] This invention addresses the shortcomings of the prior art by providing a highly practical electronic voting counting method.

[0009] A further technical objective of this invention is to provide a reasonably designed, safe, and applicable electronic voting counting device.

[0010] The technical solution adopted by this invention to solve its technical problem is: An electronic vote counting method, upon receiving a vote request, first extracts user behavior features, terminal environment features, network context features, and time series features related to the vote request; The user identification information in the voting request is anonymized to generate an anonymous user identifier. Based on the anonymous user identifier, terminal device feature fingerprint, and time window information, duplicate submission detection and replay detection are performed on the voting request. For voting requests that pass the detection, the user behavior characteristics, terminal environment characteristics, network context characteristics, and time series characteristics are analyzed based on a preset behavior recognition model or rule engine to obtain the abnormal risk result corresponding to the voting behavior. According to the abnormal risk result, the voting request is marked with a status, the vote counting weight is calculated, the vote counting is classified, or the abnormal review is performed. The voting request summary, behavior recognition result summary, vote counting process summary, and vote counting result summary are written into a trusted evidence storage structure to form a traceable and verifiable vote counting evidence chain. The final output includes the electronic vote count results and the corresponding audit verification information.

[0011] Furthermore, the specific methods are as follows: S1. Obtaining multi-dimensional context voting requests; S2. Anonymous identifier generation and privacy desensitization based on one-way hashing; S3. High-concurrency anti-replay and deduplication based on Bloom filters; S4. Anomaly detection based on behavioral feature extraction; S5. Dynamic smoothing weighting processing based on nonlinear mapping; S6. Distributed aggregated ticket counting based on hash sharding; S7. Chain-based trusted evidence storage based on cryptographic digests; S8, Data integrity verification and verifiable result output.

[0012] Furthermore, in step S1, the system parses the network requests sent by the voting terminals at the access gateway layer, extracts business fields and context fields, and standardizes the extracted data to form the original voting request data structure. ; The include: User identification information; Terminal device characteristic fingerprint information; Network environment information; Request time information; : Identification information of the voting object.

[0013] Furthermore, in step S2, the first... The original user identifier corresponding to each voting request is: The activity identifier corresponding to the current voting activity is: The system key parameters are The salt version parameter is The voting activity-level salt value is generated in the following way. : ; in, This refers to a key-based message authentication code algorithm. This indicates a field concatenation operation; Used to identify the current voting activity. Used to identify the salt value version or preset verification period; the voting activity-level salt value Maintain consistency within the same voting activity or the same preset verification period; Based on the original user identifier and dynamic salinity Generate anonymous user identifier : ; in, Represents a one-way hash function. Indicates an anonymous user identifier; The anonymous user identifier The identity verification data is stored in the data table, while the voting content and vote counting data are stored in separate data tables, separate databases, or logically isolated storage areas.

[0014] Furthermore, in step S3, the first... The anonymous user identifier corresponding to each voting request is: The terminal device's characteristic fingerprint is The time window is marked as Then the unique verification identifier for this request Represented as: ; in, This represents the function that generates a unique identifier; A Bloom filter is pre-built in the memory layer for the unique verification identifier. Perform low-latency repetitive detection; Define the length of the bit array of the Bloom filter as: The number of hash functions is Then, a unique verification identifier is required for any request. Calculate separately Number of hash mapping locations: ; in, This indicates multiple preset hash functions; When the When a voting request enters the deduplication verification stage, it is determined that... If all the bits corresponding to each hash mapping position have been set, and if all the corresponding bits are in the preset hit state, then the current request is determined to be a suspected duplicate request or a suspected replay request within the time window, and the request is transferred to the precise verification, secondary verification or abnormal review process; after the precise verification confirms that the request is a duplicate submission or replay request, it is intercepted, discarded, marked or abnormally handled. If at least one bit value in the k hash mapping positions is not set, the corresponding position will be set, and the request will be allowed to proceed to the subsequent behavior recognition processing stage.

[0015] Furthermore, in step S4, the first... The behavioral feature vector extracted from each voting request is Then we have: ; in, This represents the corresponding behavioral feature quantities in each dimension. Indicates the number of feature dimensions; The behavioral feature vector Input a pre-trained anomaly detection model to output the corresponding anomaly score. ; The anomaly detection model is a multi-layer feedforward neural network, let the first... The weight matrix of the layer is The bias vector is The activation function is Then the first The hidden state of a layer can be represented as: ; ; ; in, This represents the hidden state at level 0. Indicates the first Hidden state; Indicates the number of model layers; and These represent the output layer weight parameters and bias parameters, respectively; σ(·) represents the compression function; Indicates the first Abnormal score values ​​for each vote request The higher the value, the greater the likelihood that the request will exhibit an abnormal behavior pattern. The lower the value, the closer the request is to normal voting behavior.

[0016] Furthermore, in step S5, based on the abnormal probability score value output in step S4, the final "voting weight" of the current voting request is calculated and mapped. When the score value is in the normal range, the weight approaches 1; when the score value shows suspicious or anthropomorphic script characteristics, the weight smoothly slides exponentially to an extremely low value approaching 0 according to the decay function. The anomaly score output by the anomaly detection model is mapped to executable vote-counting weights, and a smooth, fault-tolerant mechanism is adopted by introducing the Logistic decay formula: ; in, Indicates the first The weighting of each voting request in the vote count; This represents the anomaly score output in step S4; This represents the center threshold, used to determine the inflection point of weight decay; This represents the penalty slope, used to control how quickly the weight decreases as the abnormal score increases.

[0017] Furthermore, in step S6, concurrent aggregation is performed using distributed cache nodes or a distributed in-memory database cluster, and the voting object identifier is defined as... The routing function is The target shard node corresponding to the voting request. It can be represented as: ; in, Indicates the fragmented routing function; For the first route to the target node Each voting request is processed according to its corresponding vote counting parameters. Atomic accumulation is performed on the cumulative votes of the target voting object. If the voting object Current cumulative votes The update result can be expressed as: ; The above method asynchronously writes the aggregation results from distributed nodes to persistent storage media. In step S7, a chain-like evidence storage structure is established, and the first... The data summary of the processed records is The chained summary of the previous record is The current recorded time parameter is Then the chained digest corresponding to the current record It can be represented as: ; in, This represents the function that generates the summary.

[0018] Furthermore, in step S8, multiple underlying digests in the evidence storage chain are summarized in a tree structure to construct a tree-based verification structure and generate the corresponding root verification value. Let the underlying digest node be... The root check value is then generated through recursive combination hashing. : ; in, This represents the function for generating the root of the tree checksum. While outputting the final vote count results, the root check value or chain digest identifier is also output. The third-party auditing agency recalculates the corresponding digest data according to the publicly available verification rules and compares it with the root check value to verify the consistency and completeness of the vote count results.

[0019] An electronic voting counting device includes: at least one memory and at least one processor; The at least one memory is used to store a machine-readable program; The at least one processor is configured to invoke the machine-readable program to execute an electronic vote counting method.

[0020] Compared with the prior art, the electronic voting counting method and apparatus of the present invention have the following outstanding advantages: This invention extracts multidimensional features of voting requests in terms of time, space, terminal environment, and interactive behavior, and combines them with an anomaly detection model for comprehensive analysis, thereby enabling the identification of abnormal voting behaviors that are difficult to detect using traditional frequency limits or simple rules.

[0021] By mapping abnormal score values ​​to continuously changing vote counting parameters and performing dynamic processing on vote requests based on these parameters, the problem of "normal requests being incorrectly rejected" caused by direct interception based on fixed thresholds in traditional systems is avoided. This enables the system to smoothly handle boundary-type abnormal requests, thereby improving the fault tolerance and stability of vote counting.

[0022] By introducing a vote counting parameter mechanism, voting requests can be processed differently based on the level of risk, thereby enabling flexible configuration of vote counting strategies according to different application scenarios and improving the system's adaptability in complex business environments.

[0023] The distributed aggregation voting architecture based on hash sharding distributes voting requests to multiple voting nodes for parallel processing, avoiding the bottleneck of centralized database writes, thereby significantly reducing single-point pressure and improving the system's throughput, response speed and scalability in scenarios with massive concurrent voting. Attached Figure Description

[0024] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0025] Figure 1 This is a flowchart illustrating an electronic vote counting method; Figure 2 This is a schematic diagram of an interpretable lightweight regression network model in an electronic voting counting method. Figure 3 This is a chain-based evidence storage and verification structure diagram in an electronic voting counting method; Figure 4 This is a sequence diagram of high-concurrency deduplication and distributed vote counting in an electronic voting counting method. Detailed Implementation

[0026] To enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to specific embodiments. Obviously, the described embodiments are merely some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0027] The following is a preferred embodiment: like Figure 1-4 As shown, an electronic vote counting method in this embodiment, upon receiving a vote request, first extracts user behavior features, terminal environment features, network context features, and time series features related to the vote request; anonymizes the user identification information in the vote request to generate an anonymous user identifier; based on the anonymous user identifier, terminal device feature fingerprint, and time window information, performs duplicate submission detection and replay detection on the vote request; for vote requests that pass the detection, analyzes the user behavior features, terminal environment features, network context features, and time series features based on a preset behavior recognition model or rule engine to obtain the abnormal risk result corresponding to the vote behavior; according to the abnormal risk result, performs ticket status marking, vote counting weight calculation, classification vote counting processing, or abnormal review processing on the vote request; and writes the vote request summary, behavior recognition result summary, vote counting process summary, and vote counting result summary into a trusted evidence storage structure to form a traceable and verifiable vote counting evidence chain; finally, it outputs the electronic vote counting result and the corresponding audit verification information.

[0028] The specific implementation steps are as follows: S1. Obtaining multi-dimensional context voting requests; The system receives voting request data sent by the voting terminal and simultaneously collects multi-dimensional context information related to the request. This multi-dimensional context information includes at least: user identification information, terminal device characteristic information, network environment information, request time information, and voting object identification information.

[0029] The terminal device feature information includes at least one of the following: operating system version, browser type, screen resolution, Canvas features, WebGL features, and User-Agent information; the network environment information includes at least one of the following: source network address, proxy forwarding identifier, and other network path feature information.

[0030] In one implementation, the system parses the network requests sent by the voting terminals at the access gateway layer, extracts business fields and context fields, and standardizes the extracted data to form the original voting request data structure. The aforementioned include: User identification information; Terminal device characteristic fingerprint information; Network environment information; Request time information; : Identification information of the voting object.

[0031] By constructing the original voting request data structure, basic input data is provided for subsequent identity desensitization, duplicate verification, behavior recognition, and vote counting.

[0032] S2. Anonymous identifier generation and privacy desensitization based on one-way hashing; To reduce the direct correlation between user identity information and voting content, the system desensitizes the original user identifiers, generating anonymous identifiers for vote verification and counting. Specifically, the system extracts the original user identifiers and performs a one-way hash operation with preset salt information to generate irreversible anonymous user identifiers. These anonymous user identifiers are used for subsequent duplicate vote verification, behavioral correlation analysis, and vote counting, rather than directly using the original identity information in the vote data storage and statistical process.

[0033] In one implementation, the salt value is a voting activity-level salt value, which can be generated based on system key information, voting activity identifier, salt value version parameter, or preset verification period parameter, and remains consistent within the same voting activity or the same preset verification period. The original user identifier is combined with the voting activity-level salt value and then processed using a preset one-way hash algorithm to obtain the anonymous user identifier.

[0034] Among them, the one-way hash algorithm can be the SHA series hash algorithm, Bcrypt algorithm, Scrypt algorithm, Argon2 algorithm or other one-way transformation algorithms suitable for identity de-identification processing.

[0035] Definition of the first The original user identifier corresponding to each voting request is: The activity identifier corresponding to the current voting activity is: The system key parameters are The salt version parameter is The voting activity-level salt value is generated in the following way. : ; in, This refers to a key-based message authentication code algorithm. This indicates a field concatenation operation; Used to identify the current voting activity. Used to identify the salt value version or preset verification period; the voting activity-level salt value Maintain consistency within the same voting activity or the same preset verification period; Based on the original user identifier and dynamic salinity Generate anonymous user identifier : ; in, Represents a one-way hash function. Indicates an anonymous user identifier; Anonymous user identifier The identity verification data is stored in the data table, while the voting content and vote counting data are stored in separate data tables, separate databases, or logically isolated storage areas.

[0036] During the persistent storage phase, the system stores anonymous user identifiers separately from voting content, voting results, or vote counting records to reduce the risk of directly reconstructing the correspondence between a user's real identity and voting behavior through a single data table or storage unit. In one implementation, anonymous user identifiers are stored in an identity verification data table, while voting content and vote counting data are stored in independent data tables, independent databases, or logically isolated storage areas, thereby achieving separate management of identity verification data and voting business data.

[0037] By employing the above methods, the system can meet business requirements such as duplicate voting verification and one-person-one-vote constraint verification, while reducing the exposure of identity information in the vote counting process and helping to improve the voting system's ability to protect privacy and ensure data security.

[0038] S3. High-concurrency anti-replay and deduplication based on Bloom filters; To improve the efficiency of electronic voting systems in identifying duplicate and replay requests in high-concurrency scenarios, after generating anonymous identifiers, the system further constructs a unique verification identifier for each request based on the anonymous user identifier, terminal device characteristics, and time window information, and uses a Bloom filter to quickly detect duplicate requests.

[0039] Specifically, the system extracts the anonymous user identifier, terminal device feature fingerprint, and request time information corresponding to the current voting request, and generates a unique verification identifier for this voting request by combining it with a preset sliding time window. The unique verification identifier is used to characterize the uniqueness of the request within the current time window, thus providing a basis for identifying repeated requests submitted within a short period of time.

[0040] Definition of the first The anonymous user identifier corresponding to each voting request is: The terminal device's characteristic fingerprint is The time window is marked as Then the unique verification identifier for this request It can be represented as: ; in, This indicates a function that generates a unique identifier.

[0041] In one implementation, to accommodate high-concurrency request scenarios, the system pre-builds a Bloom filter in the memory layer to uniquely verify the identifier. Perform low-latency repetition detection. Define the bit array length of the Bloom filter as... The number of hash functions is For any request identifier Calculate separately Number of hash mapping locations: ; in, This indicates multiple preset hash functions.

[0042] When the When a voting request enters the deduplication verification stage, the system determines... Have all the bit values ​​corresponding to each hash mapping position been set?

[0043] If all corresponding bit values ​​are in the preset hit state, the current request is determined to be a suspected duplicate request or a suspected replay request within the time window, and the request is transferred to the precise verification, secondary verification, or anomaly review process. After precise verification confirms that the request is a duplicate submission or replay request, it is intercepted, discarded, marked, or anomaly handled. If at least one bit value in the k hash mapping positions is not set, the corresponding position is set, and the request is allowed to enter the subsequent behavior identification processing stage.

[0044] The system can also combine the validity verification of request timestamps to filter requests that exceed the preset time limit, so as to reduce the impact of network packet capture replay, delayed replay or forged request repeated submission on the vote counting process.

[0045] Through the above methods, the system can quickly identify duplicate voting requests and replay requests in high-concurrency scenarios with low storage and computational overhead, thereby improving the real-time processing capability and request verification efficiency of the electronic voting system.

[0046] By constructing a unique verification identifier based on anonymous user identifiers, terminal device characteristics, and time windows, and using a Bloom filter for duplicate detection, this application can quickly identify duplicate submission requests and suspected replay requests within a short period of time in high-concurrency scenarios, reducing the probability of duplicate data entering the subsequent vote counting process, thereby improving the system's concurrent processing capability and voting request verification efficiency.

[0047] S4. Anomaly detection based on behavioral feature extraction; For voting requests that pass the duplicate verification and replay verification, the system further extracts their behavioral feature information and analyzes the voting behavior based on the anomaly detection model to identify abnormal voting, automated script voting, proxy voting, or other voting behaviors with abnormal patterns.

[0048] Behavioral feature information can include at least one of the following: time-dimensional features, spatial-dimensional features, terminal environment features, and interaction-dimensional features. Time-dimensional features include request time intervals, request frequency per unit time, and frequency fluctuations; spatial-dimensional features include network address changes, geographical location jumps, and proxy node switching; terminal environment features include device fingerprint stability, browser feature changes, and differences in terminal operating environments; and interaction-dimensional features include page dwell time, page operation trajectory, click behavior features, and automation tool features.

[0049] Definition of the first The behavioral feature vector extracted from each voting request is Then we have: ; in, This represents the corresponding behavioral feature quantities in each dimension. Indicates the number of feature dimensions.

[0050] In one implementation, the system will use the behavioral feature vector Input a pre-trained anomaly detection model to output the corresponding anomaly score. The anomaly detection model can be a rule-based anomaly detection model, an isolation forest-based anomaly detection model, a neural network-based anomaly detection model, a temporal neural network-based anomaly detection model, or any combination of the above models.

[0051] In a preferred embodiment, the anomaly detection model is a multilayer feedforward neural network. Let the first... The weight matrix of the layer is The bias vector is The activation function is Then the first The hidden state of a layer can be represented as: ; ; ; in, This represents the hidden state at level 0. Indicates the first Hidden state; Indicates the number of model layers; and These represent the output layer weight parameters and bias parameters, respectively; σ(·) represents the compression function, which is preferably the Sigmoid function in this embodiment; Indicates the first Abnormal score values ​​for each vote request The higher the value, the greater the likelihood that the request will exhibit an abnormal behavior pattern. The lower the value, the closer the request is to normal voting behavior.

[0052] Abnormal score The score is used to characterize the degree of abnormality of the current voting request. The higher the score, the greater the likelihood that the request exhibits an abnormal behavior pattern; the lower the score, the closer the request is to a normal voting behavior pattern.

[0053] Through the above methods, the system can perform refined analysis of voting requests based on multi-dimensional behavioral characteristics, thereby improving the ability to identify abnormal voting behavior and providing quantitative basis for subsequent dynamic vote counting.

[0054] By extracting feature information of voting requests across multiple dimensions such as time, space, terminal environment, and interactive behavior, and using an anomaly detection model to output anomaly scores, this application can improve the ability to identify automated script voting, proxy voting, and other abnormal voting behaviors, thereby providing a more accurate basis for risk assessment in subsequent vote counting.

[0055] S5. Dynamic smoothing weighting processing based on nonlinear mapping; Abandoning the traditional one-size-fits-all interception threshold, the system introduces a dynamic decay function mechanism. Based on the anomaly probability score output in step S4, the final "voting weight" of the current voting request is calculated and mapped. When the score is within the normal range, the weight approaches 1; when the score exhibits suspicious or manipulative script characteristics, the weight smoothly and exponentially drops to an extremely low value (approaching 0) according to the decay function. This mechanism can continuously reduce the weight of voting requests based on anomaly scores, reducing the impact of anomaly requests on the voting results while decreasing the probability of boundary-point normal requests being directly rejected.

[0056] The anomaly score output by the anomaly detection model is mapped to executable vote-counting weights, and a smooth, fault-tolerant mechanism is adopted by introducing the Logistic decay formula: ; in, Indicates the first The weighting of each voting request in the vote count; This represents the anomaly score output in step S4; This represents the center threshold, used to determine the inflection point of weight decay; This represents the penalty slope, used to control how quickly the weight decreases as the abnormal score increases.

[0057] In one implementation, take = 0.65, = 15. When When = 0.40, Approximately 0.977; when When =0.80, It is approximately 0.095. This mapping method can reduce the impact of abnormal request vote counting while decreasing the probability of normal requests being directly rejected.

[0058] As can be seen from the above formulas and tables, when the anomaly score is low, the voting weight is close to 1, allowing normal voting requests to participate in the vote counting with essentially the full vote value. When the anomaly score increases, the voting weight decreases as the anomaly score increases, thereby reducing the impact of suspicious requests on the final vote counting result. This mapping method can improve the system's flexibility in handling boundary-type requests while reducing the impact of abnormal voting behavior.

[0059] The following is a basic table for determining behavior: Normal request 0.1 0.999 Passed; votes will be counted according to full weight. Low-risk request 0.4 0.977 There are minor anomalies; votes are counted using a near-complete weighting. Medium risk request 0.6 0.679 If the behavioral characteristics overlap with the script, a soft demotion will be implemented. Critical Request 0.65 0.5 When the threshold center is reached, the vote counting weight is halved. High-risk request 0.75 0.182 They exhibited highly abnormal behavior characteristics, and their vote weights were exponentially stripped away. Automated requests 0.9 0.023 It exhibits obvious characteristics of automated behavior. S6. Distributed aggregated ticket counting based on hash sharding; For scenarios with massive concurrent voting, the system adopts a distributed aggregation and vote counting architecture. The voting object identifier is used as the routing key for hash sharding, and the vote counting parameters calculated in step five are distributed to the corresponding distributed nodes to perform aggregation and accumulation operations. Subsequently, the aggregation results are persisted through an asynchronous write mechanism to reduce the performance pressure caused by centralized writes in high-concurrency scenarios.

[0060] In one implementation, the system uses distributed cache nodes or a distributed in-memory database cluster for concurrent aggregation. The voting object is defined as... The routing function is The target shard node corresponding to the voting request. It can be represented as: ; in, This represents the sharding routing function.

[0061] For the first route to the target node Each voting request is processed by the system according to its corresponding vote counting parameters. Atomic increment is performed on the cumulative votes of the target voting object. If the voting object Current cumulative votes The update result can be expressed as: ; The system uses message queues, log queues, or batch refresh mechanisms to asynchronously write the aggregation results from distributed nodes to persistent storage media, thereby improving the system's throughput and write stability in high-concurrency scenarios.

[0062] By employing the above methods, the system can reduce the concurrent write pressure on a single database, improve the aggregation processing efficiency and system scalability in scenarios with massive voting volumes.

[0063] S7. Chain-based trusted evidence storage based on cryptographic digests; To improve the traceability and tamper resistance of the vote counting process and results, the system performs a digest calculation on each processed voting record and constructs a chain-like evidence storage structure by combining the digests of previous records. This chain structure ensures that any change in any historical record will cause a change in the subsequent digest verification results, thereby improving the tamper detection capability.

[0064] In one implementation, the first is defined The data summary of the processed records is The chained summary of the previous record is The current recorded time parameter is Then the chained digest corresponding to the current record It can be represented as: ; in, This represents the digest generation function, preferably a one-way hash function.

[0065] Specifically, data summary It can be generated by combining the anonymous identifier digest of the current request, the behavior recognition result digest, the vote counting result digest, the voter identifier digest, or other field digests related to the voting process.

[0066] In this way, the system can build a chain-like digest structure with relationships in the persistent record layer to support subsequent continuity verification and consistency verification of historical vote counting data.

[0067] S8. Data integrity verification and verifiable result output; After the voting activity ends or the phased statistics are completed, the system outputs the aggregated vote count results and corresponding verification information for business parties, regulators, or auditors to verify the results.

[0068] In one implementation, the system performs tree-based aggregation of multiple underlying digests in the evidence storage chain, constructs a tree-based verification structure, and generates the corresponding root verification value. Let the underlying digest node be... The root check value can then be generated by recursively combining hashes. : ; in, This represents the function for generating the root of the tree checksum.

[0069] In addition to outputting the final vote count, the system also outputs a root checksum, a chain digest identifier, or other verifiable verification information. Third-party auditing agencies can recalculate the corresponding digest data according to publicly available verification rules and compare it with the root checksum to verify the consistency and completeness of the vote count.

[0070] In this way, the system can provide verifiable evidence for the vote counting results without directly disclosing the original sensitive data, thereby improving the operability of result auditing and external verification.

[0071] Based on the above method, an electronic voting counting device in this embodiment includes: at least one memory and at least one processor; The at least one memory is used to store a machine-readable program; The at least one processor is configured to invoke the machine-readable program to execute an electronic vote counting method.

[0072] The processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor can be a microprocessor or any conventional processor.

[0073] Memory is used to store computer programs and / or modules. The processor implements various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory, and by accessing data stored in the memory. Memory can mainly include a program storage area and a data storage area. The program storage area can store the operating system, at least one application program required for a function, etc.; the data storage area can store data created based on the use of the terminal, etc. In addition, memory can also include high-speed random access memory, and can also include non-volatile memory, such as hard disks, RAM, plug-in hard disks, smart memory cards (SMC), secure digital cards (SD cards), flash memory cards, at least one disk storage device, flash memory device, or other volatile solid-state storage devices.

[0074] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for counting electronic votes, characterized in that, Upon receiving a voting request, user behavior features, terminal environment features, network context features, and time series features related to the voting request are extracted first. The user identification information in the voting request is anonymized to generate an anonymous user identifier; based on the anonymous user identifier, terminal device feature fingerprint, and time window information, duplicate submission detection and replay detection are performed on the voting request; for voting requests that pass the detection, the user behavior characteristics, terminal environment characteristics, network context characteristics, and time series characteristics are analyzed based on a preset behavior recognition model or rule engine to obtain the abnormal risk results corresponding to the voting behavior; Based on the abnormal risk results, the voting request is processed by marking the status of the ballot, calculating the vote weight, classifying the votes, or performing an abnormal review. The voting request summary, behavior recognition result summary, vote counting process summary, and vote counting result summary are written into a trusted evidence storage structure to form a traceable and verifiable vote counting evidence chain. The final output includes the electronic vote count results and the corresponding audit verification information.

2. The electronic vote counting method according to claim 1, characterized in that, The specific method is as follows: S1. Obtaining multi-dimensional context voting requests; S2. Anonymous identifier generation and privacy desensitization based on one-way hashing; S3. High-concurrency anti-replay and deduplication based on Bloom filters; S4. Anomaly detection based on behavioral feature extraction; S5. Dynamic smoothing weighting processing based on nonlinear mapping; S6. Distributed aggregated ticket counting based on hash sharding; S7. Chain-based trusted evidence storage based on cryptographic digests; S8, Data integrity verification and verifiable result output.

3. The electronic vote counting method according to claim 2, characterized in that, In step S1, the system parses the network requests sent by the voting terminals at the access gateway layer, extracts the business fields and context fields, and standardizes the extracted data to form the original voting request data structure. ; The include: User identification information; Terminal device characteristic fingerprint information; Network environment information; Request time information; : Identification information of the voting object.

4. The electronic vote counting method according to claim 3, characterized in that, In step S2, the first is defined The original user identifier corresponding to each voting request is: The activity identifier corresponding to the current voting activity is: The system key parameters are The salt version parameter is The voting activity-level salt value is generated in the following way. : ; in, This refers to a key-based message authentication code algorithm. This indicates a field concatenation operation; Used to identify the current voting activity. Used to identify the salt value version or preset verification period; the voting activity-level salt value Maintain consistency within the same voting activity or the same preset verification period; Based on the original user identifier and dynamic salinity Generate anonymous user identifier : ; in, This represents a one-way hash function. Indicates an anonymous user identifier; The anonymous user identifier The identity verification data is stored in the data table, while the voting content and vote counting data are stored in separate data tables, separate databases, or logically isolated storage areas.

5. The electronic vote counting method according to claim 4, characterized in that, In step S3, the first is defined The anonymous user identifier corresponding to each voting request is: The terminal device's characteristic fingerprint is The time window is marked as Then the unique verification identifier for this request Represented as: ; in, This represents the function that generates a unique identifier; A Bloom filter is pre-built in the memory layer for the unique verification identifier. Perform low-latency repetitive detection; Define the length of the bit array of the Bloom filter as: The number of hash functions is Then, for any request, a unique verification identifier is required. Calculate separately Number of hash mapping locations: ; in, This indicates multiple preset hash functions; When the When a voting request enters the deduplication verification stage, it is determined that... If all the bits corresponding to each hash mapping position have been set, and if all the corresponding bits are in the preset hit state, then the current request is determined to be a suspected duplicate request or a suspected replay request within the time window, and the request is transferred to the precise verification, secondary verification or abnormal review process; after the precise verification confirms that the request is a duplicate submission or replay request, it is intercepted, discarded, marked or abnormally handled. If at least one bit value in the k hash mapping positions is not set, the corresponding position will be set, and the request will be allowed to proceed to the subsequent behavior recognition processing stage.

6. The electronic vote counting method according to claim 5, characterized in that, In step S4, the first is defined The behavioral feature vector extracted from each voting request is Then we have: ; in, This represents the corresponding behavioral feature quantities in each dimension. Indicates the number of feature dimensions; The behavioral feature vector Input a pre-trained anomaly detection model to output the corresponding anomaly score. ; The anomaly detection model is a multi-layer feedforward neural network, let the first... The weight matrix of the layer is The bias vector is The activation function is Then the first The hidden state of a layer can be represented as: ; ; ; in, This represents the hidden state at level 0. Indicates the first Hidden state; Indicates the number of model layers; and These represent the output layer weight parameters and bias parameters, respectively; σ(·) represents the compression function; Indicates the first Abnormal score values ​​for each vote request The higher the value, the greater the likelihood that the request will exhibit an abnormal behavior pattern. The lower the value, the closer the request is to normal voting behavior.

7. The electronic vote counting method according to claim 6, characterized in that, In step S5, based on the abnormal probability score value output in step S4, the final "voting weight" of the current voting request is calculated and mapped. When the score value is in the normal range, the weight approaches 1; when the score value shows suspicious or anthropomorphic script characteristics, the weight smoothly slides exponentially to an extremely low value approaching 0 according to the decay function. The anomaly score output by the anomaly detection model is mapped to executable vote-counting weights, and a smooth, fault-tolerant mechanism is adopted by introducing the Logistic decay formula: ; in, Indicates the first The weighting of each voting request in the vote count; This represents the anomaly score value output in step S4; This represents the center threshold, used to determine the inflection point of weight decay; This represents the penalty slope, used to control how quickly the weight decreases as the abnormal score increases.

8. The electronic vote counting method according to claim 7, characterized in that, In step S6, concurrent aggregation is performed using distributed cache nodes or a distributed in-memory database cluster, and the voting object identifier is defined as... The routing function is The target shard node corresponding to the voting request. It can be represented as: ; in, Indicates the fragmented routing function; For the first route to the target node Each voting request is processed according to its corresponding vote counting parameters. Atomic accumulation is performed on the cumulative votes of the target voting object. If the voting object Current cumulative votes The update result can be expressed as: ; The above method asynchronously writes the aggregation results from distributed nodes to persistent storage media. In step S7, a chain-like evidence storage structure is established, and the first... The data summary of the processed records is The chained summary of the previous record is The current recorded time parameter is Then the chain digest corresponding to the current record It can be represented as: ; in, This represents the function that generates the summary.

9. The electronic vote counting method according to claim 8, characterized in that, In step S8, multiple underlying digests in the evidence storage chain are summarized in a tree structure to construct a tree verification structure and generate the corresponding root verification value. Let the underlying digest node be... The root check value is then generated through recursive combination hashing. : ; in, This represents the function for generating the root of the tree checksum. While outputting the final vote count results, the root check value or chain digest identifier is also output. The third-party auditing agency recalculates the corresponding digest data according to the publicly available verification rules and compares it with the root check value to verify the consistency and completeness of the vote count results.

10. An electronic voting counting device, characterized in that, include: At least one memory and at least one processor; The at least one memory is used to store a machine-readable program; The at least one processor is configured to invoke the machine-readable program to perform the method according to any one of claims 1 to 9.