A notarized lottery system and method based on national cryptographic algorithms with traceability

By using a notarized lottery method based on national cryptographic algorithms, high-entropy hash seeds are generated using user behavior characteristics and timestamps, and a chain-like process structure is constructed. This solves the shortcomings of existing lottery systems in terms of randomness, structure, and questioning capabilities, and realizes trusted resource allocation in government scenarios.

CN120708321BActive Publication Date: 2025-10-31GUANGZHOU EVERBRIGHT EDUCATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511194883.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-26
Publication Date
2025-10-31
Estimated Expiration
2045-08-26

AI Technical Summary

Technical Problem

The existing lottery system has systemic shortcomings in terms of the credibility of randomness generation, the structure of the execution process, the ability to reconstruct results in case of doubt, and the end-to-end integration with national cryptographic standards, making it difficult to meet the needs of high-trust scenarios such as government affairs.

Method used

The notarized lottery method based on national cryptographic algorithms is adopted. By collecting user behavior data to generate high-entropy hash random seeds, a chain-like process structure is constructed, and nested signatures of user behavior features and timestamps are introduced to realize a structured evidence storage and verifiable questioning mechanism throughout the process.

Benefits of technology

It ensures the transparency and credibility of the lottery process, can reconstruct the execution path when questioned, provides non-repudiation and anti-forgery capabilities, and is suitable for resource allocation in high-trust scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120708321B_ABST
    Figure CN120708321B_ABST
Patent Text Reader

Abstract

This invention proposes a traceable notarized lottery system and method based on national cryptographic algorithms. The method includes: collecting and preprocessing user behavior data to construct user behavior features; dividing a pre-constructed number pool into several perturbation blocks, generating a perturbation seed for each block based on the high-entropy hash random seed combined with the user behavior features; constructing a structured receipt body based on the chain-like process structure and the number allocation list, and constructing a verification instruction structure based on the structured receipt body; when a user raises a question, after receiving the user's question, reconstructing the lottery environment based on the verification instruction structure, and generating the final number sequence obtained by the user's local replay reconstruction. This invention solves the core problems of existing lottery systems, such as unauditable, unverifiable, and unreconstructable systems, and has obvious systemic innovation characteristics, making it suitable for core resource allocation scenarios with strong regulatory requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of national cryptographic algorithms, and in particular relates to a traceable notarized lottery system and method based on national cryptographic algorithms. Background Technology

[0002] Currently, in fields such as government affairs, notarization, real estate, and education, lottery systems have become core infrastructure for ensuring the fairness of resource allocation. However, existing technologies generally face the following key problems in practical applications: First, the source of random seeds in traditional systems mostly relies on system timestamps, user identifiers, or forged state variables, making it difficult to form an entropy structure that is perceptible to users and externally verifiable, thus posing a risk of prediction and manipulation. Second, most systems only sign or record the final result on the blockchain, lacking structured process modeling and verifiable mechanisms for the entire execution process. When users raise questions, the system cannot reconstruct each execution node, only providing static records as passive evidence, resulting in a significant trust gap. Furthermore, while existing solutions attempting to introduce blockchain or trusted computing platforms improve data immutability, their focus remains primarily on "post-event evidence preservation of results," with insufficient investment in "process visibility and replayability," making it difficult to support independent auditing of intermediate steps. Especially in government scenarios involving the allocation of state-owned resources, it is necessary to adapt to national cryptographic algorithms (the national cryptographic SM series). However, current mainstream systems either lack the ability to adapt to national cryptographic algorithms or have redundancy in integration, making it difficult to achieve full-process national cryptographic compliance under a unified structure.

[0003] Therefore, the existing lottery system still has systemic shortcomings in terms of "the credibility of randomness generation, the structured execution process, the ability to reconstruct results in case of doubt, and the end-to-end integration with national cryptographic standards", and urgently needs a technical system with closed-loop credibility to replace it. Summary of the Invention

[0004] The purpose of this invention is to propose a traceable notarized lottery system and method based on national cryptographic algorithms. It proposes a technical solution that features a fully structured process, generates high-entropy seeds based on user behavior characteristics, and has a chain-like process for evidence storage and a verifiable challenge mechanism, in order to solve the above-mentioned technical problems.

[0005] To achieve the above objectives, a first aspect of the present invention provides a notarized lottery method based on a traceable national cryptographic algorithm, the method comprising the following steps:

[0006] Collect and preprocess user behavior data, construct user behavior features, and generate a high-entropy hash random seed using the national cryptographic SM3 hash function;

[0007] The pre-built number pool is divided into several perturbation blocks. The perturbation seed for each block is generated based on the high-entropy hash random seed and user behavior characteristics. After each perturbation is completed, the state hash before perturbation, the state hash after perturbation, the block index and the current timestamp are concatenated and signed with SM2, and written into a chain structure to obtain a chain process structure. The number allocation list is generated through a number filtering process.

[0008] A structured receipt body is constructed based on the chain-like process structure and the number allocation list, and a verification instruction structure is constructed based on the combination.

[0009] When a user raises a question, the system receives the question and reconstructs the lottery environment based on the verification instruction structure. The disturbance process is reproduced segment by segment, and the final number sequence obtained by the user's local replay reconstruction is generated. The local reconstruction result is compared with the original result to obtain the behavioral disturbance explanatory difference index, which is used to assist users or regulators in judging whether there are unrecorded disturbances or anomalies on the platform.

[0010] Furthermore, the user behavior data includes trajectory coordinate sequences, click interval sequences, and voice segment features; wherein,

[0011] The preprocessing includes:

[0012] The trajectory coordinate sequence is first normalized; the click interval sequence is subjected to frequency analysis to extract rhythm consistency values; the speech segment features are compressed into a set of real values ​​according to the spectral energy distribution.

[0013] After processing, various types of data are concatenated into fixed-length user behavior features, with a fixed length.

[0014] Furthermore, the generation of a high-entropy hash random seed using the national cryptographic SM3 hash function specifically involves:

[0015] When a user starts using the device for the first time, the device environment identifier is automatically recorded. The device environment identifier is composed of browser information fingerprint and hardware environment characteristics.

[0016] Record the timestamp of this operation, obtained from the backend server's time.

[0017] By combining the user behavior characteristics, device environment identifiers, and timestamps, a high-entropy hash random seed is generated using the national cryptographic SM3 hash function.

[0018] Furthermore, the pre-constructed number pool is ,in The total number of participants set for the business side; among which,

[0019] The perturbation seed for each segment is generated based on the high-entropy hash random seed combined with user behavior characteristics, specifically as follows:

[0020] For the Segment Number Block The disturbance method is as follows:

[0021] ;

[0022] in, The disturbed block after the disturbance. It is the SM3 hash function, a national cryptographic standard. User behavior characteristics; Indicates the first Each disturbed block will be numbered in the pool. Divided according to fixed length; It is the perturbation seed of this block, formed by piecing together three parts: As a high-entropy hash random seed, These are segment numbers used to distinguish the disturbance stages. It is a perturbation regularization quantity extracted from user behavior characteristics; This is a perturbation function with a fixed structure, internally initialized with a pseudo-random number generator as the perturbation seed. The numbering order is swapped sequentially.

[0023] Furthermore, the perturbation regularization is a statistical representation of the sign gradient sequence of each feature value in the user behavior features.

[0024] Furthermore, the filtering process is used to remove numbers that are excluded due to eligibility, restrictions, or business logic.

[0025] Furthermore, the step of constructing a structured receipt body based on the chained process structure and the number allocation list, and constructing a verification instruction structure based on the structured receipt body, specifically includes:

[0026] The chain-like process structure is subjected to structural integrity verification. The behavior consistency signature item and time signature nesting item of each segment are verified one by one. The chain-like process structure that passes the integrity verification is encapsulated to construct a structured receipt body.

[0027] Construct a verification instruction structure based on the structured receipt. Specifically:

[0028] ;

[0029] in, The final lottery number result after verification. Indicates the function that reproduces the function; It has a chain-like process structure;

[0030] Specifically, after executing the verification instruction structure on the open verification platform, the user should obtain... If there is a discrepancy, the system will display the reason for the failure; among them, Assign a list to the numbers.

[0031] Furthermore, the behavior consistency signature item is used to bind the impact of the corresponding perturbation regularization on the overall process path without exposing user behavior characteristics; the time signature nesting item encapsulates the server-side timestamp structure of all perturbations in the chained process structure into a time vector, and then forms a time regularization vector by combining the internal sequentiality, discreteness and maximum interval of the time vector to obtain the perturbation constraint function. The perturbation constraint function is used to verify whether the entire chain is truly executed continuously within the agreed time window, and whether there are any jumps, interferences or forged nodes.

[0032] By combining the number allocation list, execution chain hash, user behavior structure signature, perturbation constraint function, system unified timestamp during encapsulation, and receipt digital signature, a verification instruction structure is generated.

[0033] Furthermore, the step of reconstructing the lottery environment based on the verification instruction structure, reproducing the disturbance process segment by segment, and generating the final number sequence obtained by local replay reconstruction by the user specifically includes:

[0034] Load a high-entropy hash random seed, initialize a pseudo-random number generator, and reconstruct a perturbation environment consistent with the original system; among which, the original number pool Reconstructed as The length is derived from the numbering allocation list. Then the system loads the chained process structure and prepares to perform node-level perturbation reconstruction.

[0035] For each item in the chained process structure, extract the perturbation segment number, the pre-perturbation pool, and the post-perturbation target hash, and then use the perturbation seed and execute the standard perturbation algorithm.

[0036] For each perturbed block, calculate its hash value and perform a consistency comparison with the hash recorded in each item of the chained process structure. Simultaneously, verify the validity of the SM2 signature field in each item of the chained process structure. This section passed verification; if The system records this segment as an abnormal disturbance segment. And then proceed to the difference collection process; For verification purposes;

[0037] After concatenating all perturbation segments, a final number sequence for local reconstruction is generated. The final number sequence of reconstruction is compared digit by digit with the number allocation list. If there are differences, the correlation items of the difference segments and behavioral impact items are output according to the segment index, and the behavioral perturbation explanatory difference index is calculated to measure whether the difference is caused by behavioral feature perturbation.

[0038] In a second aspect, the present invention provides a notarized lottery system based on national cryptographic algorithms that allows for traceability, the system comprising:

[0039] The data acquisition unit is used to collect and preprocess user behavior data, construct user behavior features, and generate a high-entropy hash random seed using the national cryptographic SM3 hash function.

[0040] The lottery generation unit is used to divide the pre-built number pool into several perturbation blocks. Based on the high-entropy hash random seed and user behavior characteristics, it generates a perturbation seed for each segment. After each segment is perturbed, it concatenates the state hash before perturbation, the state hash after perturbation, the segment index and the current timestamp of each segment, performs SM2 signature, and writes it into a chain structure to obtain a chain process structure. It then generates a number allocation list through a number filtering process.

[0041] The lottery verification unit is used to construct a structured receipt body based on the chained process structure and the number allocation list, and to combine it with the construction of a verification instruction structure;

[0042] The lottery reproduction unit is used to reconstruct the lottery environment based on the verification instruction structure after receiving user questions, reproduce the disturbance process segment by segment, generate the final number sequence obtained by the user's local replay reconstruction, compare the local reconstruction result with the original result, and obtain the behavioral disturbance explanatory difference index, which is used to assist users or regulators in judging whether there are unrecorded disturbances or anomalies on the platform.

[0043] The beneficial technical effects of the present invention are at least as follows:

[0044] This invention addresses the challenges of notarized lottery systems in high-trust scenarios such as government affairs. It proposes a fully structured technical solution that generates high-entropy seeds based on user behavior characteristics and features chained process evidence storage and a verifiable challenge mechanism. The invention first introduces actual user interaction behaviors such as swiping, clicking, and voice to construct multimodal feature vectors. These vectors are then combined with device identifiers and time information to construct a high-entropy random source input national cryptographic hash function, generating a unique and verifiable seed value.

[0045] During the lottery process, the system uses a segment-based perturbation algorithm to divide the entire number pool into multiple perturbation blocks. It introduces random differences by constructing perturbation regularization terms based on user behavior characteristics, and performs national cryptographic signatures on each segment of the operation structure, linking them together to form a chain of execution records, ensuring that each operation node is traceable and verifiable.

[0046] In the result encapsulation stage, the system introduces a nested signature structure, combining user behavior feature summaries with time series consistency indicators to construct a structured receipt body, possessing independent verifiability, non-repudiation, and anti-forgery capabilities. When a user raises a challenge, the system can reconstruct the complete process path based on the verification structure, compare the results segment by segment, and evaluate the execution differences caused by behavioral discrepancies, ensuring the reproducibility and logical consistency of the results. This invention forms an interlocking technical closed loop in terms of user participation, randomness control, compliance with national cryptographic standards, structured encapsulation and verification, and process reconstruction, solving the core problems of existing lottery systems such as unauditable, unverifiable, and unreconstructable systems. It possesses significant systemic innovation characteristics and is suitable for core resource allocation scenarios with strong regulatory requirements. Attached Figure Description

[0047] The present invention will be further described with reference to the accompanying drawings, but the embodiments in the drawings do not constitute any limitation on the present invention. For those skilled in the art, other drawings can be obtained based on the following drawings without creative effort.

[0048] Figure 1 This is a flowchart of a notarized lottery method based on national cryptographic algorithms that is traceable, as disclosed in an embodiment of the present invention.

[0049] Figure 2 This is a framework diagram of a traceable notarized lottery system based on national cryptographic algorithms disclosed in an embodiment of the present invention. Detailed Implementation

[0050] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0051] Example 1

[0052] like Figure 1 As shown in the figure, an embodiment of the present invention provides a traceable notarized lottery method based on national cryptographic algorithms, the method comprising:

[0053] S1. Collect and preprocess user behavior data, construct user behavior features, and generate a high-entropy hash random seed using the national cryptographic SM3 hash function.

[0054] Specifically, the goal of this step is to construct a reproducible, traceable, and user-behavior-linked high-entropy random seed, which will serve as the sole input to the subsequent lottery system. Unlike traditional methods that rely on system time or hardware status to construct randomness, this step guides the user to complete a defined and controlled interactive operation before the lottery process begins. This behavioral process is then converted into structured features, which, along with device identification and time information, are input into a national cryptographic hash function to generate an irreversible and verifiable seed value. This design ensures that the subsequent execution process is logically directly linked to the user's actions and supports the reconstruction of the seed generation process based on user behavior data in case of disputes.

[0055] Furthermore, after a user enters the lottery interface, the system guides them through a pre-set task using graphical verification, such as "sliding a graphic along a specified path," "clicking the highlighted area three times in sequence," or "reading a voice verification code." These operations can be collected through a front-end event listening module in a regular browser environment or the app interface, and the relevant event information is submitted to the back-end data processing module via a local interface. The collection process does not rely on any third-party plugins or high-privilege calls, and is completed entirely with the user's knowledge.

[0056] Furthermore, the specific data collected includes: user swipe behavior data (trajectory coordinate sequence): by listening to mouse or touch events (such as touchmove, mousemove), the system samples coordinate values ​​every 30ms. With timestamp This forms a trajectory sequence vector, for example The maximum number of groups is 200.

[0057] Click rhythm data (click interval sequence): Monitor consecutive click events completed by the user within the task guidance area, and record the time interval between each click and the previous click (e.g., ...). , ), which constitute the operation rhythm vector.

[0058] Speech segment features (enabled only in scenarios that support voice input): The user reads a phrase of no more than 10 characters through the browser's getUserMedia interface or the mobile device's microphone permission. The audio is extracted in real time using the WebAudioAPI, and frame average compression is performed. The result is mapped to a fixed-length spectral feature vector.

[0059] All the above raw data underwent structural unification through a preprocessing module. The trajectory sequence first calculated and normalized statistical indicators such as total sliding distance, rate of change of velocity, and number of angle changes; frequency analysis was performed on the click rhythm to extract rhythm consistency values; speech features were compressed into a set of real values ​​according to spectral energy distribution. After processing, all types of data were concatenated into a set of fixed-length behavioral feature vectors. The length is fixed (e.g., 256 dimensions) to facilitate subsequent hashing. The entire feature construction process is completed under the standard template of the server-side process, avoiding the impact of user-side differences on the entropy structure.

[0060] At the same time, the system background automatically records the user's device environment identifier when the user first starts operating the system. This identifier is composed of browser information fingerprints (such as User-Agent strings, window size, and language settings) and hardware environment characteristics (such as CPU type and operating system version). It is encoded and mapped to form a fixed-length device code, avoiding the use of sensitive identifiers such as MAC addresses or IMEIs, thus ensuring both device uniqueness and privacy.

[0061] The system also records a unified timestamp for this operation. The time is obtained from the backend server to avoid client-side errors. The timestamp is converted from hexadecimal to a standard string format and used as one of the input parameters in the hash calculation.

[0062] Finally, a unified entropy source structure is constructed and input into the national cryptographic SM3 hash function:

[0063] ;

[0064] in: This is the high-entropy random seed output in this step. It is a hash value with a fixed length, irreversible and unique determination, which is used as the seed input for the subsequent lottery process. It is a user behavior feature vector generated through a standard process, composed of spliced ​​trajectory, click rhythm, and voice features; It is a structured representation of the device identification code, derived from the user's equipment environmental parameters; It is a standardized timestamp string, representing the unified server time when the user started the operation.

[0065] The three input items of the above hash structure have different physical origins and different unit dimensions. Therefore, they have all been normalized, encoded uniformly and structurally standardized before being combined to ensure that the overall structure is stable and the results are consistent and reproducible after entering the hash function.

[0066] The innovation of this step lies in incorporating commonly seen but untrusted data (user behavior) into a high-entropy structure and using it to drive the lottery process. This systematically establishes a random number generation model that binds users, devices, and time, not only increasing unpredictability but also creating a verifiable input source for the questioning phase, thus enhancing the transparency and verifiability of the entire system. In current traditional lottery systems, users are typically in a position of "passively accepting results," while this method makes users part of the source of randomness, forming a controllable entry mechanism.

[0067] This step ultimately outputs the following two variables: High-entropy hash random seed, uniquely identifying this lottery draw; User behavior feature vector, used for subsequent execution process recording and verification.

[0068] These two outputs will serve as core inputs in subsequent execution chain steps. Directly drives process execution, It serves as the seed data for restoration when questioning results or rebuilding processes.

[0069] S2. Divide the pre-built number pool into several perturbation blocks. Generate a perturbation seed for each block based on the high-entropy hash random seed and user behavior characteristics. After each perturbation, concatenate the state hash before perturbation, the state hash after perturbation, the block index, and the current timestamp for each block, perform SM2 signature, and write it into a chain structure to obtain a chain process structure. Then, generate a number allocation list through a number filtering process.

[0070] Specifically, this step involves using a high-entropy seed generated by the user. and behavioral feature vector This is injected into a verifiable, auditable, structured, and distributed lottery execution process. This process is not a traditional black-box "shuffle and redistribute" approach, but rather constructs a national cryptographic signature chain consisting of execution nodes, data status, time information, and digital signatures. This enables the generation of notarized and traceable evidence during the execution of the process.

[0071] Furthermore, compared to existing technologies, traditional lottery systems only sign the final result, making it difficult to reconstruct the intermediate processes when users raise questions, and unable to audit the processing of specific nodes individually. The innovative design of "structured process chain + full-process signature" proposed in this step, however, makes the entire lottery process transparent and structured, allowing each intermediate step to be verified independently, thus meeting the technical objective of the "reclaimable" notarized lottery system described in the patent.

[0072] Furthermore, the input consists of the two variables output in step one: Based on user behavior characteristics Equipment identification and timestamp After the three constructions, an irreversible high-entropy seed is obtained through the national cryptographic SM3 hash function; : A standardized 256-dimensional behavioral feature vector composed of spliced ​​sliding trajectory features, click rhythm features, speech spectrum features, etc.

[0073] Furthermore, the first step in the execution process is to construct a number pool. The numbered pool is ,in The total number of participants is set for the business side. The number pool does not directly participate in the shuffling, but is perturbed in batches through the following "segmented perturbation shuffling algorithm" to improve traceability and the granularity of operation traces.

[0074] Furthermore, the traditional Fisher-Yates global shuffling is changed to "multi-segment block perturbation + replayable perturbation sequence", with each perturbation segment consisting of... The pseudo-random sequence generated as the master seed The decision is made, and each perturbation must generate a signature record and be written into the chain structure. middle.

[0075] For the Segment Number Block The disturbance method is as follows:

[0076] ;

[0077] in: Indicates the first Each disturbed block will be numbered in the pool. Divide into groups of fixed lengths (e.g., 100 per group); It is the perturbation seed of this block, formed by piecing together three parts: As a source of overall randomness, These are segment numbers used to distinguish the disturbance stages. It is a perturbation regularization quantity extracted from user behavior characteristics (see below); The perturbation function is a fixed structure, internally initialized using a pseudo-random number generator. The numbering order is swapped sequentially.

[0078] The above formula proposes a perturbation regularization quantity specific to this patent. This part is the key innovation of this step: introducing the statistical distribution attributes of user behavior to intervene in the specific shuffling methods of different disturbance segments, so that user behavior not only determines the seed itself, but also affects the entire lottery process in a structured way.

[0079] Specifically, Defined as the statistical representation of the signed gradient sequence of each feature value in user behavior features, for example:

[0080] After calculating the first-order difference of the sliding trajectory subvector, take the sign change number;

[0081] The density of the points with the largest frequency abrupt changes between frames is obtained for the speech spectrum features;

[0082] Calculate the standard deviation of rhythm fluctuation for click rhythm.

[0083] Furthermore, these perturbation terms possess the dual characteristics of user uniqueness and high-dimensional behavioral embedding, ensuring that even The same, different users will also because Different disturbance paths are formed due to differences, thereby preventing the process from being guessed or forged, and enhancing verifiability and tamper resistance.

[0084] After each perturbation segment ends, the system hashes the state before the perturbation segment. Post-perturbation state hash Segment Index and current timestamp After concatenation, perform SM2 signing and write the data into a chain structure:

[0085] ;

[0086] in, Disturbance segment number; : The SM3 hash value of the sub-pool numbered before the segment perturbation; : The hash of the result after perturbation; The server-side timestamp of the disturbance occurrence; : An unforgeable signature value generated using the SM2 private key.

[0087] Finally, the execution records of all segments are concatenated in sequence to form a complete chain structure. This chain structure will serve as the basis for subsequent receipt encapsulation and playback of user-submitted challenge paths.

[0088] The perturbed number pool will serve as an intermediate result. The final output number list is generated through a number filtering process. This filtering process is used to remove numbers that are excluded by business logic due to eligibility, restrictions, or other factors. For example, certain numbers may correspond to a blacklist or be automatically retained in the settings. This process does not disrupt the order again; it only performs filtering to ensure that the perturbation chain structure is verifiable and the results are consistent with business constraints.

[0089] Final output of this step: A complete chain signature structure for the lottery process, for subsequent encapsulation, verification and traceability; The final numbering list is provided for user display and for record-keeping.

[0090] S3. Construct a structured receipt body based on the chain-like process structure and the number allocation list, and combine it with the construction of a verification instruction structure.

[0091] Specifically, the design goal of this step is to construct a complete, self-verifiable, structured receipt system, providing an independently executable verification mechanism when users or regulatory agencies raise questions. This ensures that the entire lottery process not only yields credible results but also possesses process-level traceability and non-repudiation capabilities. This step serves as a bridge between the preceding and following steps in the overall patent structure, connecting the chain-like process structure generated in step two. With number allocation list It is encapsulated as a "proof structure" that can be directly accessed and manipulated by external users, and for the first time introduces "replay regularity detection" and "structure signature nesting" mechanisms, realizing process-level verifiable capabilities that have not yet been achieved in the current notarized lottery system.

[0092] Furthermore, the system first... Perform structural integrity verification, checking the continuity, signature validity, and execution logic consistency of each node segment. The purpose of this process is to ensure that verification will not fail due to missing process nodes, invalid signatures, or broken chains when users replay the execution.

[0093] Then we move on to the core encapsulation process of this step: constructing a verifiable structured response body. To enhance tamper resistance and user behavior binding features, the system proposes two innovative fields: "behavior consistency signature item" and "time signature nested item." These two fields have never been used in existing receipt structures and represent a significant technological breakthrough in this invention.

[0094] Behavioral consistency signatures are used to avoid exposing the original user feature vector. In this case, the impact of its perturbation characteristics on the overall process path is bound. To this end, the system generated a perturbation regularization term in step two. Here, the following embedded verification item is constructed by projecting features and then signing:

[0095] ;

[0096] in: It is a perturbation regularization quantity extracted from user behavior features, which is a perturbation structure feature extracted from user behavior vector through strategies such as difference, rhythm stability, and spectrum mutation; It is a length of The projection function (e.g., the projection function after principal component analysis) (Item), used to prevent feature leakage; It is a hash digest of the complete chain structure; Bind a signature item to the action to strongly bind the user action to the execution chain, preventing the execution chain from being replaced but retaining the original number result.

[0097] The second innovative structure is a nested time signature, the core idea of ​​which is to... All The structure is encapsulated as a time vector Then, its internal sequentiality, discreteness, and maximum interval are combined to form a time regularization vector. And introduce perturbation constraint functions This item is used to verify whether the entire chain executes continuously within the agreed time window, without any skipping, interference, or forged nodes.

[0098] ;

[0099] in: This is the normalized result of the timestamp sequence; The standard deviation of the time series; To prevent the denominator from being zero for the constant term (usually set to...), );like If the threshold is exceeded, the system will prevent the generation of receipts and record it as a "time anomaly structure chain".

[0100] Ultimately, the system constructs a complete receipt structure. :

[0101] ;

[0102] in: This is the final lottery result; To perform chain hashing; For user behavior structure signature items; Let be the perturbation constraint function, representing the structural integrity detection index of the time chain; A unified system timestamp during encapsulation; Digitally sign the final receipt.

[0103] Based on this, the system constructs a verification instruction structure. This is used to reproduce the entire process via a third-party verification module when users raise questions. Internally, it includes the execution module call path, seed input, initial state of the number pool, and chain structure, with the following specific format:

[0104] ;

[0105] Users should obtain the following after executing this instruction structure on the Open Validation Platform: If there is a discrepancy, the system will indicate the reason for the failure, including signature mismatch, abnormal time structure, or broken perturbation chain logic.

[0106] This step ultimately outputs two variables: : A structured receipt that encapsulates behavior, timing, and process chains; : Verify the instruction structure, allowing users to independently execute the verification process.

[0107] S4. When a user raises a question, after receiving the user's question, the lottery environment is reconstructed based on the verification instruction structure, the disturbance process is reproduced segment by segment, the final number sequence obtained by the user's local replay reconstruction is generated, the local reconstruction result is compared with the original result, and the behavioral disturbance explanatory difference index is obtained to assist the user or regulator in judging whether there are unrecorded disturbances or anomalies on the platform.

[0108] Specifically, this step serves as the final closing part of this patent solution, and its objective is to build upon the structured receipt constructed in step three. and verify instruction structure When users raise questions, the entire lottery process is reconstructed and the discrepancies are verified to achieve a transparent, credible, and reproducible question response mechanism.

[0109] The key design idea in this step is: based on Rebuild the complete process chain The process involves comparing results and verifying structural consistency to determine if any tampering, errors, or forgery have occurred. To achieve this, the following operational procedure is established:

[0110] Initialize the playback environment: System loading Initialize the pseudo-random number generator to reconstruct a disturbance environment consistent with the original system. Original number pool. Reconstructed as , length is This was deduced by working backwards. Then the system loaded. And prepare to perform node-level perturbation reconstruction.

[0111] Segment-by-segment perturbation reproduction: For Each item in Extract the disturbance segment number from it. Disturbing the forebay Target hash after perturbation The system uses behavioral perturbation items Construct perturbation seeds And execute the standard perturbation algorithm:

[0112] ;

[0113] ;

[0114] in: This refers to the perturbation master seed uniformly generated in steps one through three; The regularized structural features are extracted from user behavior data and are in the format of a fixed-length vector. They can be exported via the platform API or the WebAssembly module. Use the same perturbation mechanism as in step two, including local exchange range and perturbation block strategy.

[0115] Structural consistency verification: for each perturbation result The system calculates its hash value. and with Hash recorded in Perform a consistency check. Simultaneously verify... Is the SM2 signature field valid?

[0116] ;

[0117] like This section has been verified.

[0118] like The system records this segment as an abnormal disturbance segment. And then proceed to the difference collection process.

[0119] Final numbering sequence reconstruction and result comparison: After splicing all perturbation segments, the final numbering sequence of the local reconstruction is generated. The system combines it with In A point-by-point comparison is performed. If discrepancies are found, the correlation between the differing segment and the behavioral impact item is output according to the segment index. A difference impact index is introduced here. To measure whether the difference is caused by behavioral perturbations:

[0120] ;

[0121] in: The projection function of the behavioral feature vector only takes the first... Item (e.g.) The difference item represents the deviation between the local and platform results; this indicator is not used to deny the legitimacy of the platform, but to help determine whether the questioning has a reasonable basis.

[0122] Finally, this step outputs two result variables: The final number sequence obtained by the user's local replay reconstruction is used for comparison with the platform results; : Explanatory difference index of behavioral disturbances, which helps users or regulators determine whether there are unrecorded disturbances or anomalies on the platform.

[0123] Example 2

[0124] like Figure 2 As shown, this embodiment of the invention also provides a traceable notarized lottery system based on national cryptographic algorithms. The system includes:

[0125] Data acquisition unit 101 is used to collect and preprocess user behavior data, construct user behavior features, and generate a high-entropy hash random seed through the national cryptographic SM3 hash function;

[0126] The lottery generation unit 102 is used to divide the pre-built number pool into several perturbation blocks, generate a perturbation seed for each segment based on the high-entropy hash random seed and user behavior characteristics, and after each segment perturbation ends, concatenate the state hash before perturbation, the state hash after perturbation, the segment index and the current timestamp of each segment, perform SM2 signature, and write it into a chain structure to obtain a chain process structure, and generate a number allocation list through a number filtering process.

[0127] The lottery verification unit 103 is used to construct a structured receipt body based on the chain process structure and the number allocation list, and to combine it with the construction of a verification instruction structure.

[0128] The lottery reproduction unit 104 is used to reconstruct the lottery environment based on the verification instruction structure after receiving the user's question, reproduce the disturbance process segment by segment, generate the final number sequence obtained by the user's local replay reconstruction, compare the local reconstruction result with the original result, and obtain the behavioral disturbance explanatory difference index, which is used to assist users or regulators in judging whether there are unrecorded disturbances or anomalies on the platform.

[0129] The foregoing has described specific embodiments of this specification; other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims may be performed in a different order than those shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily have to follow the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0130] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.

[0131] For ease of description, the above devices are described in terms of function, divided into various units. Of course, in implementing this specification, the functions of each unit can be implemented in one or more software and / or hardware components.

[0132] Those skilled in the art will understand that the embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, the embodiments of this specification can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the embodiments of this specification can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0133] This specification is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this specification. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0134] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0135] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0136] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0137] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0138] Computer-readable media include both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0139] It should also be noted that 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 limitation, 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 said element.

[0140] This specification can be described in the general context of computer-executable instructions that are executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This specification can also be practiced in distributed computing environments, where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0141] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

[0142] Finally, it should be noted that the notarized lottery platform based on national cryptographic algorithms disclosed in this embodiment of the invention is merely a preferred embodiment of the invention and is only used to illustrate the technical solutions of the invention, not to limit it. Although the 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 of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the invention.

Claims

1. A notarized lottery method based on national cryptographic algorithms with traceability, characterized in that, The method includes the following steps: Collect and preprocess user behavior data, construct user behavior features, and generate a high-entropy hash random seed using the national cryptographic SM3 hash function; The pre-built number pool is divided into several perturbation blocks. The perturbation seed for each block is generated based on the high-entropy hash random seed and user behavior characteristics. After each perturbation is completed, the state hash before perturbation, the state hash after perturbation, the block index and the current timestamp are concatenated and signed with SM2, and written into a chain structure to obtain a chain process structure. The number allocation list is generated through a number filtering process. A structured receipt body is constructed based on the chain-like process structure and the number allocation list, and a verification instruction structure is constructed in conjunction with it. When a user raises a question, the system receives the question and reconstructs the lottery environment based on the verification instruction structure. The disturbance process is reproduced segment by segment, and the final number sequence obtained by the user's local replay reconstruction is generated. The local reconstruction result is compared with the original result to obtain the behavioral disturbance explanatory difference index, which is used to assist users or regulators in judging whether there are unrecorded disturbances or anomalies on the platform.

2. The notarized lottery method based on national cryptographic algorithms with traceability, as described in claim 1, is characterized in that... The user behavior data includes trajectory coordinate sequences, click interval sequences, and voice segment features; wherein... The preprocessing includes: The trajectory coordinate sequence is first normalized; the click interval sequence is subjected to frequency analysis to extract rhythm consistency values; the speech segment features are compressed into a set of real values ​​according to the spectral energy distribution. After processing, various types of data are concatenated into fixed-length user behavior features, with a fixed length.

3. The notarized lottery method based on national cryptographic algorithms with traceability, as described in claim 1, is characterized in that... The process of generating a high-entropy hash random seed using the national cryptographic SM3 hash function is as follows: When a user starts using the device for the first time, the device environment identifier is automatically recorded. The device environment identifier is composed of browser information fingerprint and hardware environment characteristics. Record the timestamp of this operation, obtained from the backend server's time. By combining the user behavior characteristics, device environment identifiers, and timestamps, a high-entropy hash random seed is generated using the national cryptographic SM3 hash function.

4. The notarized lottery method based on national cryptographic algorithms with traceability, as described in claim 1, is characterized in that... The pre-built number pool is ,in The total number of participants set for the business side; among which, The perturbation seed for each segment is generated based on the high-entropy hash random seed combined with user behavior characteristics, specifically as follows: For the Segment Number Block The disturbance method is as follows: ; in, The disturbed block after the disturbance. It is the SM3 hash function, a national cryptographic standard. User behavior characteristics; Indicates the first Each disturbed block will be numbered in the pool. Divided according to fixed length; It is the perturbation seed of this block, formed by piecing together three parts: As a high-entropy hash random seed, These are segment numbers used to distinguish the disturbance stages. It is a perturbation regularization quantity extracted from user behavior characteristics; This is a perturbation function with a fixed structure, internally initialized with a pseudo-random number generator as the perturbation seed. The numbering order is swapped sequentially.

5. The notarized lottery method based on national cryptographic algorithms with traceability, as described in claim 4, is characterized in that... The perturbation regularization is a statistical representation of the sign gradient sequence of each feature value in the user behavior features.

6. The notarized lottery method based on national cryptographic algorithms with traceability as described in claim 1, characterized in that, The filtering process is used to remove numbers that are excluded due to eligibility, restrictions, or business logic.

7. The notarized lottery method based on national cryptographic algorithms with traceability, as described in claim 4, is characterized in that... The step of constructing a structured receipt body based on the chain-like process structure and the number allocation list, and constructing a verification instruction structure based on the structured receipt body, specifically includes: The chain-like process structure is subjected to structural integrity verification. The behavior consistency signature item and time signature nesting item of each segment are verified one by one. The chain-like process structure that passes the integrity verification is encapsulated to construct a structured receipt body. Construct a verification instruction structure based on the structured receipt. Specifically: ; in, The final lottery number result after verification. Indicates the function that reproduces the function; It has a chain-like process structure; Specifically, after executing the verification instruction structure on the open verification platform, the user should obtain... If there is a discrepancy, the system will display the reason for the failure; among them, Assign a list to the numbers.

8. The notarized lottery method based on national cryptographic algorithms with traceability, as described in claim 7, is characterized in that... The behavior consistency signature is used to bind the impact of the corresponding perturbation regularization on the overall process path without exposing user behavior characteristics; the time signature nesting item encapsulates the server-side timestamp structure of all perturbations in the chained process structure into a time vector, and then forms a time regularization vector by combining the internal sequentiality, discreteness and maximum interval of the time vector to obtain the perturbation constraint function. The perturbation constraint function is used to verify whether the entire chain is truly and continuously executed within the agreed time window, and whether there are any jumps, interferences or forged nodes. By combining the number allocation list, execution chain hash, user behavior structure signature, perturbation constraint function, system unified timestamp during encapsulation, and receipt digital signature, a verification instruction structure is generated.

9. A notarized lottery method based on national cryptographic algorithms with traceability, as described in claim 4, is characterized in that... The process of reconstructing the lottery environment based on the verification instruction structure, reproducing the disturbance process segment by segment, and generating the final number sequence obtained by local replay reconstruction by the user specifically includes: Load a high-entropy hash random seed, initialize a pseudo-random number generator, and reconstruct a perturbation environment consistent with the original system; among which, the original number pool Reconstructed as The length is derived from the numbering allocation list. Then the system loads the chained process structure and prepares to perform node-level perturbation reconstruction. For each item in the chained process structure, extract the perturbation segment number, the pre-perturbation pool, and the post-perturbation target hash, and then use the perturbation seed and execute the standard perturbation algorithm. For each perturbed block, calculate its hash value and perform a consistency comparison with the hash recorded in each item of the chained process structure. Simultaneously, verify the validity of the SM2 signature field in each item of the chained process structure. This section passed verification; if The system records this segment as an abnormal disturbance segment. And then proceed to the difference collection process; For verification purposes; After all perturbation segments are spliced ​​together, a final number sequence for local reconstruction is generated. The final number sequence of reconstruction is compared with the number allocation list digit by digit. If there is a difference, the correlation items of the difference segment and the behavior impact item are output according to the segment index, and the behavioral perturbation explanatory difference index is calculated to measure whether the difference is caused by behavioral feature perturbation.

10. A traceable notarized lottery system based on national cryptographic algorithms, characterized in that, The system includes: The data acquisition unit is used to collect and preprocess user behavior data, construct user behavior features, and generate a high-entropy hash random seed using the national cryptographic SM3 hash function. The lottery generation unit is used to divide the pre-built number pool into several perturbation blocks. Based on the high-entropy hash random seed and user behavior characteristics, it generates a perturbation seed for each segment. After each segment is perturbed, it concatenates the state hash before perturbation, the state hash after perturbation, the segment index and the current timestamp of each segment, performs SM2 signature, and writes it into a chain structure to obtain a chain process structure. It then generates a number allocation list through a number filtering process. The lottery verification unit is used to construct a structured receipt body based on the chained process structure and the number allocation list, and to combine it with the construction of a verification instruction structure; The lottery reproduction unit is used to reconstruct the lottery environment based on the verification instruction structure after receiving user questions, reproduce the disturbance process segment by segment, generate the final number sequence obtained by the user's local replay reconstruction, compare the local reconstruction result with the original result, and obtain the behavioral disturbance explanatory difference index, which is used to assist users or regulators in judging whether there are unrecorded disturbances or anomalies on the platform.

Citation Information

Patent Citations

  • Random lottery and lottery result verification method and system based on interval grouping

    CN114090943A

  • APT attack detection method and system based on traceability graph behavior sequence prediction

    CN118118254A