Random lottery method, system and device based on hash algorithm and storage medium
By adopting a method based on the hybrid algorithm in the lottery technology, obtaining and processing exclusive and public parameters, generating and sorting the hybrid value, solving the problem of random number of random numbers in existing technology, and improving the fairness and security of the lottery.
Patent Information
- Application Number
- CN202411415249.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-11
- Publication Date
- 2025-01-28
AI Technical Summary
In the existing lottery technology, computer-generated random numbers are not really random, which may result in the results being inferred in advance, destroying the fairness in the lottery process.
Adopt a random number method based on the miscellaneous method, to obtain exclusive parameters, first public parameters, and second public parameters to perform stitching and distribution calculations, generate the preset length of the hybrid value, and map it to the characteristic space for sorting. The ranking number of the participants.
The possibility of reducing the results is inferred in advance, and the fairness and security of the random shaking number are improved.
Smart Images

Figure CN119380457A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information processing technology, and in particular to a random lottery method, system, device and storage medium based on a hash algorithm. Background Art
[0002] As a way to fairly distribute resources, lottery is widely used in situations where resources are insufficient, such as compulsory education enrollment, that is, supply exceeds demand and fair distribution is needed under the same conditions, or in situations where resources are sufficient but there are differences in quality and ranking. Lottery avoids the unfairness that may be caused by human manipulation through random selection, helps reduce social contradictions and conflicts caused by uneven resource distribution, and maintains social stability and harmony.
[0003] Most current lottery technologies are based on a computer-generated random seed that generates random numbers through a random function. However, computer-generated random numbers are not truly random. When the calculation method and random seed are constant, the generated random number sequence is also fixed. Therefore, if the random seed is fixed or predictable, it is possible to infer future random results in advance, thereby undermining the fairness of the lottery process. Summary of the invention
[0004] The main purpose of the embodiments of the present application is to propose a random lottery method, system, device and storage medium based on a hash algorithm, aiming to reduce the possibility of the result being speculated in advance and improve the fairness and security of the random lottery.
[0005] To achieve the above purpose, one aspect of an embodiment of the present application proposes a random lottery method based on a hash algorithm, the method comprising:
[0006] Obtaining a dedicated parameter, a first public parameter, and a second public parameter, wherein the dedicated parameter is an identity identifier or static feature corresponding to a lottery participant, the first public parameter is on-site editable data, and the second public parameter is a lottery timestamp;
[0007] Concatenate the first public parameter and the second public parameter to obtain a third public parameter;
[0008] The third common parameter is concatenated with each of the exclusive parameters to obtain an input message corresponding to the lottery participant;
[0009] Using a hash algorithm to perform hash calculation on the input message to obtain a hash value of a preset length;
[0010] Mapping the hash value to a feature space to obtain a feature vector, and sorting the feature vectors corresponding to each hash value based on a preset rule to determine the ranking number of each lottery participant;
[0011] Based on the preset lottery quota, the random lottery result is obtained according to the ranking number.
[0012] In some embodiments, before the step of obtaining the exclusive parameter, the first public parameter and the second public parameter, the method further includes:
[0013] Determine the attendance number of the lottery participants according to the order of their arrival time;
[0014] A number of candidates are randomly selected from all the lottery participants according to the attendance number;
[0015] Obtaining the autonomous lottery result according to the winning information randomly extracted from the electronic signature of each candidate, wherein the electronic signature is preset with several parameter providing identifiers and a lottery operation identifier;
[0016] Several parameter providers and a lottery operator are determined based on the autonomous lottery results.
[0017] In some embodiments, obtaining the exclusive parameter, the first public parameter and the second public parameter comprises the following steps:
[0018] Determine the exclusive parameters according to the identity identifier corresponding to the lottery participant;
[0019] Determining a first public parameter according to the field editable data provided by the parameter provider;
[0020] The second common parameter is determined according to the lottery timestamp when the lottery operator presses the button to end the lottery.
[0021] In some embodiments, the step of concatenating the first public parameter and the second public parameter to obtain a third public parameter comprises the following steps:
[0022] A plurality of the first public parameters are sequentially spliced in the order in which they are entered, and the spliced first public parameters are spliced with the second public parameters to obtain a third public parameter.
[0023] In some embodiments, the step of performing hash calculation on the input message using a hash algorithm to obtain a hash value of a preset length comprises the following steps:
[0024] Preprocessing the input message to obtain a preprocessed message;
[0025] A hash algorithm is used to fill, group, expand and compress the pre-processed message to obtain a hash value of a preset length.
[0026] In some embodiments, the using of a hash algorithm to fill, group, expand, and compress the pre-processed message to obtain a hash value of a preset length comprises the following steps:
[0027] Determining whether a remainder obtained by dividing the length of the preprocessed message by a preset number of bits is zero;
[0028] When the remainder is not zero, padding is performed at the end of the preprocessed message to obtain a padding message;
[0029] Grouping the padding messages according to the preset number of bits to obtain a plurality of grouped messages;
[0030] Expanding each of the grouped messages to obtain a plurality of message words;
[0031] All the message words corresponding to each of the grouped messages are compressed and calculated using a compression function to obtain a hash value of a preset length.
[0032] In some embodiments, mapping the hash value to a feature space to obtain a feature vector, and sorting the feature vectors corresponding to each hash value based on a preset rule to determine the ranking number of each lottery participant includes the following steps:
[0033] Mapping the hash value to a mathematical space to obtain a decimal number;
[0034] The decimal numbers corresponding to the hash values are sorted in ascending order, and the ranking number of each lottery participant is determined in ascending order.
[0035] To achieve the above purpose, another aspect of the embodiment of the present application proposes a random lottery system based on a hash algorithm, the system comprising:
[0036] The first module is used to obtain a dedicated parameter, a first public parameter, and a second public parameter, wherein the dedicated parameter is an identity identifier or static feature corresponding to a lottery participant, the first public parameter is on-site editable data, and the second public parameter is a lottery timestamp;
[0037] A second module is used to concatenate the first public parameter and the second public parameter to obtain a third public parameter;
[0038] The third module is used to concatenate the third common parameter with each of the exclusive parameters to obtain an input message corresponding to the lottery participant;
[0039] The fourth module is used to perform hash calculation on the input message using a hash algorithm to obtain a hash value of a preset length;
[0040] A fifth module is used to map the hash value to a feature space to obtain a feature vector, and sort the feature vectors corresponding to each hash value based on a preset rule to determine the ranking number of each lottery participant;
[0041] The sixth module is used to obtain the random lottery result based on the preset lottery quota and the ranking number.
[0042] To achieve the above objective, another aspect of an embodiment of the present application provides an electronic device, the electronic device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the above method when executing the computer program.
[0043] To achieve the above objective, another aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program implements the above method when executed by a processor.
[0044] The embodiments of the present application include at least the following beneficial effects: The present application provides a random lottery method, system, device and storage medium based on a hash algorithm. The scheme obtains a dedicated parameter, a first public parameter and a second public parameter, wherein the dedicated parameter is an identity identifier or static feature corresponding to the lottery participant, the first public parameter is field editable data, and the second public parameter is a lottery timestamp; the first public parameter and the second public parameter are spliced to obtain a third public parameter; the third public parameter is spliced with each dedicated parameter to obtain an input message corresponding to the lottery participant, which can reduce the possibility of the result being speculated in advance. The hash value of a preset length is obtained by hashing the input message using a hash algorithm; the hash value is mapped to a feature space to obtain a feature vector, and each feature vector is sorted based on a preset rule to determine the ranking number of each lottery participant; based on the preset lottery quota, the random lottery result is obtained according to the ranking number, which can improve the fairness and security of the random lottery. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 is a flow chart of a random lottery method based on a hash algorithm provided in an embodiment of the present application;
[0046] Figure 2 This is a flow chart of generating ranking numbers provided in an embodiment of the present application;
[0047] Figure 3 is a flow chart of the SM3 algorithm provided in an embodiment of the present application;
[0048] Figure 4 This is an example flow chart of the random lottery method based on the hash algorithm provided in the embodiment of the present application applied to degree allocation;
[0049] Figure 5 Schematic diagram of the structure of a random lottery system based on a hash algorithm provided in an embodiment of the present application;
[0050] Figure 6 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. They are only examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the attached claims.
[0052] It is understood that the terms "first", "second", etc. used in this application can be used to describe various concepts in this article, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept. For example, without departing from the scope of the embodiment of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determination".
[0053] The terms "at least one", "multiple", "each", "any", etc. used in this application, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.
[0054] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0055] Before describing the embodiments of the present application in detail, the terms involved in the embodiments of the present application and some related technologies are described as follows.
[0056] (1) Lottery: The lottery system is used to ensure fairness, justice and transparency in resource allocation scenarios. It randomly assigns positions through computers. Everyone has an equal chance of being selected, thus avoiding the influence of human factors on the results.
[0057] (2) Random seed: A random seed is an initial value or starting point in a random number generation algorithm, which is used to determine the starting point of a random number sequence. In the process of random number generation, the same random seed will generate the same random number sequence. The selection of a random seed is crucial to the generation of random numbers.
[0058] (3) Random numbers: Random numbers are generated by random number generators. True random numbers refer to a set of values in which the probability of occurrence of each value is the same and there is no predictable relationship between these values. The result is unpredictable and invisible. The generation of true random numbers depends on physical processes, and usually requires special hardware to capture and transform physical processes, such as radioactive decay and noise. The random functions in computers are simulated according to certain algorithms. Random numbers look random in statistics, but the results are certain and visible. If you know the random seed and algorithm, you can predict all random numbers. Therefore, the random numbers generated by computer random functions are not random, but pseudo-random numbers.
[0059] (4) Hash algorithm: Also known as hash algorithm, it is widely used in many fields such as information security, data verification, and distributed systems. It is an algorithm that can convert keywords of any length into fixed length and map the output to a hash table. The output result is called a hash value. Since the output space is usually much smaller than the input space in theory, there is a possibility of hash collision, that is, different inputs produce the same output. Therefore, it is necessary to resolve hash collisions through dynamic expansion, open addressing, rehashing, and other methods.
[0060] (5) SM3: It is an encryption algorithm announced by the State Cryptography Administration at the end of 2010. It is a type of cryptographic hash function standard and is mainly used for digital signature and verification, message authentication code generation and verification, and can meet the security requirements of a variety of cryptographic applications.
[0061] With the growth of population and the acceleration of urbanization, many resources are facing the situation of insufficient supply or the situation of high and low quality of resources. Take the enrollment of compulsory education schools as an example. In the process of enrollment of compulsory education schools, when the number of applicants does not exceed its enrollment plan, the school will directly admit all the applicants without lottery. When the number of applicants exceeds the school's enrollment plan, the school will adopt a computer random admission method, that is, lottery to determine the admission list. In the case of limited resources, if a fair distribution method is not adopted, it is easy to cause social contradictions and conflicts. The lottery is a fair, just and transparent distribution method. Through computer random allocation, each student has an equal chance of being selected, thus avoiding the influence of human factors on the enrollment results. When implementing the lottery system, different places will formulate different rules and requirements according to specific circumstances, but the fundamental principle is to ensure the fairness, justice and transparency of the enrollment process and ensure that all children of school age can receive compulsory education.
[0062] However, the related technology has the following problems:
[0063] (1) The random numbers generated by some random lottery methods are too simple. They simply shuffle the order or use the random functions that come with programming calculations. Most of these random functions have fixed random seeds.
[0064] (2) Although the random numbers generated by the random lottery method using true random numbers are truly random, they cannot be reproduced and the generation process cannot be traced, which makes it impossible to verify whether the random generation process is true.
[0065] (3) Currently, many random lottery methods use blockchain technology, which not only makes the generation process complicated, but also fails to take into account that random numbers in many application scenarios do not need to be stored for a long time, resulting in too high a cost for storage on the chain.
[0066] In view of this, a random lottery method, system, device and storage medium based on a hash algorithm are provided in an embodiment of the present application. The scheme obtains an exclusive parameter, a first public parameter and a second public parameter, wherein the exclusive parameter is an identity identifier or static feature corresponding to the lottery participant, the first public parameter is on-site editable data, and the second public parameter is a lottery timestamp; the first public parameter and the second public parameter are spliced to obtain a third public parameter; the third public parameter is spliced with each exclusive parameter respectively to obtain an input message corresponding to the lottery participant; a hash algorithm is used to perform hash calculation on the input message to obtain a hash value of a preset length; the hash value is mapped to a feature space to obtain a feature vector, and each feature vector is sorted based on a preset rule to determine the ranking number of each lottery participant; based on the preset lottery quota, a random lottery result is obtained according to the ranking number, which can improve the fairness and security of the random lottery.
[0067] The random lottery method based on the hash algorithm provided in the embodiment of the present application relates to the field of information processing technology. The random lottery method based on the hash algorithm provided in the embodiment of the present application can be applied to a terminal, can also be applied to a server, and can also be software running in a terminal or a server. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and a car terminal, etc., but is not limited to this; the server side can be configured as an independent physical server, or it can be configured as a server cluster or distributed system composed of multiple physical servers, and can also be configured to provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms and other basic cloud computing services. The server can also be a node server in the blockchain network; the software can be an application that implements a random lottery method based on a hash algorithm, etc., but is not limited to the above forms.
[0068] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0069] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on user information, user behavior data, user historical data and other data related to user identity or characteristics, the user's permission or consent will be obtained first, and the collection, use and processing of these data will comply with relevant laws, regulations and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or jump to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.
[0070] Figure 1 is an optional flow chart of a random lottery method based on a hash algorithm provided in an embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S106.
[0071] Step S101: Obtain exclusive parameters, first public parameters and second public parameters, wherein the exclusive parameters are the identity identifiers or static features corresponding to the lottery participants, the first public parameters are on-site editable data, and the second public parameters are the lottery timestamp.
[0072] It should be noted that in this embodiment, the exclusive parameter is the identity identifier or static feature corresponding to the lottery participant, wherein the identity identifier can be in the form of an ID number, work number, student number, etc. The static feature is used to distinguish the differences between individuals, and can be individual genetic information such as biometric fingerprint information or biometric face information, as well as individual physiological structure attributes such as height and weight. The exclusive parameter must ensure that each person must be different, similar to the unique identifier or primary key in the database table. For example, in the process of degree allocation, the ID number is used as a unique identifier for each student and is used as an exclusive parameter to be input into the hash algorithm to generate a hash value exclusive to each student. The exclusive parameter ensures the uniqueness of the identity of each student, so that the generated hash value can uniquely correspond to each student, thereby ensuring the traceability of the lottery process.
[0073] The first public parameter is the on-site editable data. The on-site editable data refers to the data temporarily provided by the lottery participants at the lottery site through a specific method (such as drawing lots, random selection, etc.). These data are temporary and random, and are intended to increase the diversity and unpredictability of the input data, thereby improving the randomness of the lottery. The construction of on-site editable data is very flexible, and can be time information, space information, and any other information that can be thought of and its combination, such as permutations and combinations of strings of letters, numbers, and text. For example, in the process of assigning places, the ID numbers of three parents can be drawn from the lottery site as the first public parameter, or in the company party lottery, the party name such as "Zhiju Yunfan Ji Canghai Annual Meeting" can be used as the first public parameter.
[0074] The second common parameter is the lottery timestamp. By using the system time when the lottery end button is pressed, which is recorded by the lottery system, as the second common parameter, the repetition or predictability of the lottery results at different times can be greatly reduced. Optionally, the lottery timestamp can be specific to milliseconds, because even a very short time interval, a millisecond-level time difference can lead to completely different results.
[0075] In order to ensure that the method of public parameters cannot be manipulated manually, in some embodiments, before step S101, it may also include but not limited to steps S201 to S204.
[0076] Step S201: Determine the attendance number of the lottery participants according to the order of arrival time.
[0077] Exemplarily, the system assigns an attendance number to each of the N lottery participants in order of their arrival time, which is used to extract the ID number provided as the public parameter.
[0078] Step S202: Randomly select a number of candidates from all lottery participants according to their attendance numbers.
[0079] Specifically, after ensuring that each lottery participant has been assigned a unique attendance number according to the order of attendance, the drawing conditions are set to clarify the number of candidates to be drawn, and a random drawing algorithm is used to randomly draw a number of candidates from all lottery participants according to the attendance number. Exemplarily, a common uniform distribution random algorithm is used to randomly draw m non-repeating numbers (m is less than or equal to N) from N attendance numbers, and the lottery participant whose attendance number corresponds to the drawn number is determined as a candidate.
[0080] On the one hand, when the number of lottery participants is large, if the ID numbers of all lottery participants are directly used as public parameters, the processed data will be very large and complex, which will not only be inefficient but may also increase the risk of errors. By randomly selecting candidates first, the processing scope can be greatly narrowed; on the other hand, the selection of a number of candidates from all lottery participants is random, and the candidate generation and drawing process are open and transparent. This practice helps to improve the fairness and justice of the random lottery process.
[0081] Step S203: Obtain the autonomous lottery result according to the winning information randomly drawn by each candidate from the electronic signature, wherein the electronic signature is preset with several parameter providing identifiers and a lottery operation identifier.
[0082] Specifically, in the autonomous lottery phase, the system prepares an electronic signature in advance and displays the content of the electronic signature. The electronic signature is preset with several parameter providing identifiers and a lottery operation identifier, wherein the parameter providing identifier is used to determine the candidate who provides the first public parameter, and the lottery operation identifier is used to determine the candidate who controls the lottery. Exemplarily, assuming that 10 candidates are drawn in the aforementioned step S202, the system generates 10 electronic signatures according to the number of candidates and displays the electronic signature content including 3 parameter providing identifiers, 1 lottery operation identifier and 6 thank you for participating before drawing. Each candidate randomly draws a signature from the electronic signature, and each electronic signature can only be drawn by one person. After all candidates have drawn their electronic signatures, the autonomous lottery result is obtained according to the winning information of each candidate randomly from the electronic signature. Since the order of candidate drawing and the autonomous lottery are random, the randomness of public parameter acquisition can be improved, and the method of ensuring public parameters cannot be manipulated artificially.
[0083] Step S204: Determine a number of parameter providers and a lottery operator based on the autonomous lottery results.
[0084] Specifically, according to the results of the autonomous lottery, the candidate whose electronic signature content is a parameter provision identifier is determined as the parameter provider, and the candidate whose electronic signature content is a lottery operation identifier is determined as the lottery operator.
[0085] Further, in some embodiments, step S101 may include but is not limited to steps S301 to S303.
[0086] Step S301: Determine exclusive parameters according to the identity identifier corresponding to the lottery participant.
[0087] It is understandable that before the lottery begins, the system already has stored the personal identity information of the lottery participants and can use the identity identifier corresponding to the lottery participant as an exclusive parameter.
[0088] Step S302: Determine a first public parameter according to the field editable data provided by the parameter provider.
[0089] Specifically, after a number of parameter providers are determined in step S204, each parameter provider provides a piece of field-editable data as a first public parameter, so that the subsequent system can integrate the field-editable data according to preset algorithms and rules.
[0090] It should be noted that the on-site editable data is input in real time by the parameter provider at the lottery site. This process can be directly observed by all lottery participants or supervised through video broadcasts and other means. This high degree of transparency can enhance the trust of lottery participants in the lottery process. Compared with preset fixed parameters, on-site editable data is more difficult to manipulate or predict in advance, which helps to ensure the randomness and unpredictability of the lottery results, thereby maintaining fairness. At the same time, by allowing some lottery participants to directly participate in the generation of the first public parameter, the sense of participation can also be enhanced.
[0091] Step S303: Determine the second common parameter according to the lottery timestamp when the lottery operator presses the button to end the lottery.
[0092] Specifically, after a lottery operator is determined in step S204, the lottery operator presses the end button of the system or performs a corresponding operation to terminate the lottery process. At this time, the system will immediately record the time point of this operation, obtain the lottery timestamp of pressing the end button (the sum of milliseconds from January 1, 1970 to the current time), and use the lottery timestamp as the second public parameter. By determining the second public parameter based on the lottery timestamp when the lottery operator presses the end button, the randomness, fairness and security of the random lottery are improved.
[0093] It should be noted that the lottery timestamp, as the second public parameter, is traceable. When it is necessary to verify or reproduce the lottery results, the exact time point when the lottery ended can be restored by querying the lottery timestamp, thereby verifying the authenticity and validity of the lottery results. This traceability provides a strong guarantee for the fairness and transparency of the random lottery process.
[0094] Step S102: concatenate the first public parameter and the second public parameter to obtain a third public parameter.
[0095] Further, in some embodiments, step S102 may include but is not limited to step S401.
[0096] Step S401: splicing a plurality of first public parameters in sequence according to the order in which they are entered, and splicing the spliced first public parameters with the second public parameters to obtain a third public parameter.
[0097] Specifically, in this embodiment, the first public parameters come from different parameter providers. The system first sorts the first public parameters according to the order in which they are entered, and concatenates the sorted first public parameters in order. The latter string is connected to the end of the former string to form a longer string. Then, the concatenated string is concatenated with the lottery timestamp to finally obtain a third public parameter. It should be noted that in the concatenation process, each string that constitutes the first public parameter is completely included.
[0098] For example, assuming that employee A provides "2024", employee B provides "company annual meeting", and employee C provides "set sail to cross the vast ocean" as the first public parameter, if the data is entered in the order of employee A, employee B, and employee C, the first public parameter obtained after splicing is "2024 company annual meeting set sail to cross the vast ocean". If the data is entered in the order of employee C, employee B, and employee A, the first public parameter obtained after splicing is "Set sail to cross the vast ocean company annual meeting 2024". It can be seen that the first public parameter obtained after splicing is different depending on the order of entry. After obtaining the spliced first public parameter, the first public parameter is spliced with the second public parameter to obtain a third public parameter.
[0099] In this embodiment, the third common parameter obtained by combining multiple random factors makes the result of each lottery more difficult to predict, thereby ensuring the randomness of the lottery process.
[0100] Step S103: Concatenate the third common parameter with each exclusive parameter to obtain the input message corresponding to the lottery participant.
[0101] Specifically, the third common parameter is concatenated with the N exclusive parameters to obtain N input messages, each of which corresponds to a lottery participant.
[0102] Step S104: using a hash algorithm to perform hash calculation on the input message to obtain a hash value of a preset length.
[0103] In high-level programming languages such as Java and Python, random numbers are generally generated using the Linear Congruential Generator (LCG) algorithm to generate pseudo-random numbers (PRNG). The algorithm is called pseudo-random because if the same seed is used to generate a random number sequence, the result will be the same at any time and on any device. Therefore, once a hacker obtains the seed, he can predict all the random numbers generated, or profit from it by modifying the seed.
[0104] Considering that no matter what kind of random seed is used for any careful calculation and protection, there is a risk that it may be speculated. In this embodiment, the random number is not generated by a random seed, but by a hash algorithm. Figure 2 The process of calculating the random number can be simply abstracted into three steps. When the same message is input, the encrypted message and the random number are fixed, but if one character of the input changes, the output will change dramatically, and there is no pattern to deduce. Therefore, only the input message and hash calculation steps can be designed and modified.
[0105] The essence of a hash algorithm is to encrypt the input message. The encrypted message cannot be reversed and decrypted. The hash algorithm itself does not directly generate random numbers, but maps the input data to a hash value of fixed length through a specific hash function. The hash algorithm is one-way (i.e., it cannot be reversed), collision-resistant (i.e., it is difficult to find the same output for different outputs), fixed output (i.e., the output can be a fixed length of 256 bits, or in 64-bit hexadecimal form), and sensitive (i.e., if the input changes slightly, the output hash will only change significantly and without pattern). The four characteristics of the hash algorithm can ensure the security and randomness of the generated random numbers.
[0106] The following is an explanation using the SM3 algorithm, which performs hash calculations on m input messages to obtain m exclusive hash values.
[0107] Further, in some embodiments, step S104 may include but is not limited to steps S501 to S502.
[0108] Step S501: pre-process the input message to obtain a pre-processed message.
[0109] Exemplarily, the input message is preprocessed, and the character string in the input message is encoded into a binary form to obtain a preprocessed message.
[0110] Step S502: using a hash algorithm to fill, group, expand and compress the pre-processed message to obtain a hash value of a preset length.
[0111] Specifically, the operations of the hash algorithm include message filling, function permutation, compound Boolean operations, message expansion, compression calculation, etc.
[0112] Furthermore, refer to Figure 3 In some embodiments, step S502 may include but is not limited to steps S601 to S605.
[0113] Step S601, determining whether the remainder of the length of the pre-processed message divided by the preset number of bits is zero.
[0114] Optionally, the length of the preprocessed message is calculated to determine whether the remainder of the length of the preprocessed message divided by 512 is zero, where 512 is the preset number of bits. If the remainder of the length of the preprocessed message divided by the preset number of bits is zero, step S603 is executed; if the remainder of the length of the preprocessed message divided by the preset number of bits is not zero, the preprocessed message is expanded.
[0115] Step S602: When the remainder is not zero, padding is performed at the end of the pre-processed message to obtain a padding message.
[0116] It is understandable that the message expansion step of the SM3 algorithm uses 512-bit data packets as algorithm input, so the length of the pre-processed message needs to be padded to an integer multiple of 512. When the remainder is not zero, the original message is input for padding, a bit "1" is added to the end of the pre-processed message, and then a certain number of "0" bits are added, and finally a 64-bit message length is added to obtain a padded message.
[0117] Exemplarily, assuming that the length of the preprocessed message is L, when filling the message, first add a "1" to the end of the preprocessed message, then add k "0"s, where k is the smallest non-negative integer that satisfies L+k+1=448 (mod512), and finally add a 64-bit data to represent the length L of the original preprocessed message.
[0118] Step S603: group the padding messages according to a preset number of bits to obtain a plurality of grouped messages.
[0119] Specifically, the padding message is grouped into 512 bits (i.e., 64 bytes) each to obtain a plurality of grouped messages B(0), B(1), ..., B(n-1), where n represents the total number of groups, and the calculation formula is:
[0120]
[0121] Step S604, expand each group message to obtain a number of message words.
[0122] Specifically, each 512-bit packet message is expanded into 132 32-bit message words. Exemplarily, the 512-bit packet message is first divided into 16 message words, each message word is 32 bits, and the first 16 message words are used as the first 16 of the generated 132 message words, and then the remaining 116 message words are recursively generated using the 16 message words to obtain 132 message words.
[0123] Step S605: compress all message words corresponding to each packet message using a compression function to obtain a hash value of a preset length.
[0124] Exemplarily, eight 32-bit registers (A, B, C, D, E, F, G, H) are initialized. The registers are used to store intermediate results and to concatenate into a final output 256-bit result. Each register is assigned a fixed initial value (i.e., IV).
[0125] The compression function is used to iterate 32 or 64 times for each expanded group message. In each round, the expanded message word and a specific constant are used for mixed operations. During the iteration process, nonlinear transformations are continuously used to update the register value. The compressed result is added to the previous result as the input for the next compression until all group messages are processed. The final 256-bit (usually expressed as a 64-bit hexadecimal number) data is the hash value of SM3.
[0126] Step S105: Map the hash value to the feature space to obtain a feature vector, and sort the feature vectors corresponding to each hash value based on a preset rule to determine the ranking number of each lottery participant.
[0127] It can be understood that the feature space is an abstract concept used to describe a set of all possible feature vectors. In this embodiment, the hash value is usually generated as a binary string. Considering that hexadecimal can more compactly represent binary data in computer science, each hexadecimal number can represent four binary bits. Compared with binary, hexadecimal requires fewer characters when representing data of the same length. Therefore, the binary hash value can be converted into hexadecimal.
[0128] Exemplarily, when mapping, the feature space is composed of 16 different symbols, including 0 to 9 and A to F (where A represents 10, B represents 11, and so on, F represents 15). The binary numbers of the hash value are grouped from right to left in groups of four, and then each group of binary numbers is mapped to the feature space to obtain the corresponding hexadecimal symbol, thereby obtaining the feature vector of the hash value.
[0129] Then, the feature vectors of these hash values can be sorted based on preset rules. The relative position or priority of each lottery participant can be determined by comparison and sorting, so as to assign them a unique ranking number. The closer the relative position or the higher the priority, the smaller the ranking number. For example, m hash values are calculated in hexadecimal and sorted in descending order, and the ranking numbers from 1 to m are output in descending order.
[0130] It should be noted that in practical applications, feature extraction techniques in machine learning (such as principal component analysis, etc.) can also be used to extract features from the hash value, thereby obtaining a more distinguishing feature vector. Furthermore, after obtaining the feature vector, the feature vector can also be reduced in dimension, thereby reducing the dimension and complexity of the feature space while maintaining the main information of the hash value.
[0131] Further, in some embodiments, step S105 includes but is not limited to steps S701 to S702.
[0132] Step S701, mapping the hash value to a mathematical space to obtain a decimal number.
[0133] It is understandable that decimal numbers, as the most commonly used number system in daily life, are easier for people to intuitively understand their values than non-decimal numbers such as binary and hexadecimal. Therefore, converting hash values into decimal numbers can facilitate observation of size comparison results.
[0134] Specifically, the predefined mathematical space includes 10 symbols from 0 to 9. Each binary digit of the hash value is added according to its weight (i.e., the power of 2), so that the hash value is mapped to the mathematical space to obtain a decimal number. For example, the binary number "1101" can be converted to the decimal number "13" (i.e., 1*2 3 +1*2 2 +0*2 1 +1*2 0 =8+4+0+1=13).
[0135] Step S702, sorting in ascending order according to the decimal numbers corresponding to the hash values, and determining the ranking number of each lottery participant in order from small to large.
[0136] Optionally, the decimal numbers corresponding to the m hash values are sorted in ascending order, and the ranking numbers from 1 to m are output in ascending order, thereby determining the ranking number of each lottery participant.
[0137] Step S106: Based on the preset lottery quota, the random lottery result is obtained according to the ranking number.
[0138] In some embodiments, the system is preset with a total number of places for the lottery activity. Based on the preset lottery places, the random lottery results are determined according to the ranking numbers in sequence. When the ranking number is less than or equal to the preset lottery places, the lottery is deemed to be successful. When the ranking number is greater than the preset lottery places, the lottery is deemed to have failed. After the lottery is over, the random lottery results are announced in a timely manner.
[0139] The following is a detailed introduction and description of the solution of the embodiment of the present invention in conjunction with a specific application example.
[0140] Reference Figure 4 , Figure 4 An example flowchart of the application of the random lottery method based on a hash algorithm to degree allocation provided in an embodiment of the present application.
[0141] In the degree allocation, the following roles are involved in the whole process of lottery allocation:
[0142] (1) Host: Organize and instruct every step of the admissions process.
[0143] (2) System Operator: Controls the admission system, including drawing attendance numbers, inputting common parameters, displaying admission data, and assisting in operating the admission system.
[0144] (3) Parents attending the meeting: 10 parents will be randomly selected, 3 of whom will provide their ID numbers and 1 will serve as a button presser.
[0145] (4) Button presser parent: Press the end button of admission, and use the system time of pressing the button in milliseconds as public parameter 2.
[0146] (5) Notary Public: supervise the entire admission process and issue a notarial statement.
[0147] Before the lottery begins, the system has stored the personal information and application wishes of the students to be assigned, but no ranking number and admission result. First, each of the N parents who participated in the compulsory education allocation is assigned an attendance number in the order of arrival, which is used to draw the ID number provided in the public parameter.
[0148] Next, obtain the public parameter 1 used to generate random numbers. The characteristics of public parameter 1 are that it is the same for everyone, flexible and changeable, adding diversity and randomness. The specific method is as follows:
[0149] The system displays 10 electronic signatures, including 3 for providing ID number, 1 for button presser, and 6 for thank you for participating.
[0150] Use a normal uniform distribution random algorithm to randomly draw 10 random numbers between 1 and N from the system, corresponding to the 10 parent attendance numbers.
[0151] The 10 parents who were drawn to be the attending parents came on stage and each randomly selected one of the 10 lottery balls. The results were displayed in real time, and the 3 parents who were drawn to provide their ID numbers wrote down their ID numbers.
[0152] The system operator inputs the ID numbers provided by the three randomly selected parents into the system as public parameter 1.
[0153] The parents of the selected button operator stay to assist in the admission and obtain the public parameter 2 used to generate the random number. The specific method is as follows:
[0154] When the button-pressing parent presses the end button of the lottery system, the system time of pressing the end button is obtained. In order to ensure randomness, the system time is calculated in milliseconds, which fully ensures that the system time pressed at different times is different.
[0155] The button-pressing parent first simulates pressing the end button twice, and compares the ranking numbers and order generated twice. It can be seen that the random ranking numbers assigned to students twice are completely random and different, and there is no pattern to be deduced.
[0156] When the operator officially presses the end key, the system will use the number of milliseconds of the pressing time as public parameter 2.
[0157] Then, the system reads the m-digit ID number of the student to be assigned a degree as an exclusive parameter, concatenates public parameter 1 with public parameter 2, and then concatenates m exclusive parameters respectively as the message input for the hash calculation.
[0158] Generate a random ranking number based on the input message. The specific method is as follows:
[0159] Use the SM3 national secret hash algorithm to hash and settle m input messages to obtain m exclusive hash values.
[0160] Calculate the size of m hash values in hexadecimal, arrange them in ascending order, and output the ranking numbers from 1 to m.
[0161] After obtaining the ranking number, admission and display of admission results are carried out as follows:
[0162] Students are sorted in ascending order according to their ranking numbers and admitted based on three parallel choices. Those who are successfully admitted will be displayed as the final admission results.
[0163] For those who are not admitted, the supplementary admission method is to adjust the preferences according to the remaining places after the current round of student admission is completed, and admit them again according to the ranking numbers from small to large.
[0164] Wait for the admission to be completed, burn and save the admission data (including public parameters, etc.), and finally have it notarized by a notary public.
[0165] In the process of calculating the message for generating random numbers, the input message for generating random numbers uses public parameters to splice exclusive parameters. The construction of public parameters contains multiple randomness, including: random allocation of parent attendance numbers, random events of drawing parents to the stage from all parents, random order of parents drawing to the stage and randomness of self-drawing, random order of system operators entering ID cards, and random time of button-pressing parents pressing buttons. In summary, after five random processes, it can be ensured that the method of public parameters cannot be considered as manipulation. The generation of public parameters can essentially be completed in the developed system and ensure fairness, but allowing parents to participate can increase fairness to a greater extent and be more accepted by the public.
[0166] In this embodiment, the rules of the random lottery algorithm are simple and easy to understand, and the lottery is truly random after being encrypted by a hash algorithm, which is highly secure and traceable, and can withstand supervision and inspection when used by education departments.
[0167] For example, three parents who are drawn to provide ID numbers provide their own ID numbers respectively, and the button-pressing parents press the end button of the lottery system at time A and time B respectively. The ID cards provided by parents A, B and C are used as public parameter 1, and time A or time B is used as public parameter 2. After concatenating public parameter 1 and public parameter 2, they are formed into an input message with the student's ID number, and encrypted through a hash algorithm to obtain a hash value.
[0168] It is understandable that when the public parameter 1 is the same, the hash value obtained by using time A as the public parameter 2 will be greatly different from the hash value obtained by using time B as the public parameter 2.
[0169] In another embodiment, if public parameter 1 is obtained by concatenating parent A, parent B, and parent C in order, and public parameter 1 is obtained by concatenating parent C, parent B, and parent A in order, when the input time is the same but the order of inputting the parent ID numbers is different, the generated hash values are also very different.
[0170] After calculating the hash values of all students, the hash values are mapped to the feature space to obtain the feature vectors, and the feature vectors corresponding to each hash value are sorted in ascending order to determine the ranking number of each lottery participant. Based on the preset quota, all students whose ranking numbers are less than the preset quota are admitted to determine the random lottery allocation result of the degree allocation.
[0171] It is understandable that the random lottery method based on the hash algorithm provided in the embodiment of the present application can be applied to other aspects in addition to the degree allocation. For example, in the annual meeting lottery of a company, it can be assumed that the public parameter 1 is the company name, or the year, activity slogan, etc. can be used. The public parameter 2 can still use the system time milliseconds obtained by pressing the key, and the exclusive parameter can use the employee's work number. In this way, SM3 (public parameter 1 + public parameter 2 + exclusive parameter) is constructed to generate a hash value, and then the generated hexadecimal hash value exclusive to each person is converted into a decimal value. Finally, the decimal numbers belonging to all employees are sorted from small to large or from large to small to obtain the ranking number, and the top few can be taken as the lucky employees drawn.
[0172] See also Figure 5 The embodiment of the present application further provides a random lottery system based on a hash algorithm, which can implement the random lottery method based on a hash algorithm, and the system includes:
[0173] The first module is used to obtain exclusive parameters, first public parameters and second public parameters, wherein the exclusive parameters are the identity identifiers or static features corresponding to the lottery participants, the first public parameters are on-site editable data, and the second public parameters are the lottery timestamp.
[0174] The second module is used to concatenate the first public parameter and the second public parameter to obtain a third public parameter.
[0175] The third module is used to concatenate the third public parameter with each exclusive parameter to obtain the input message corresponding to the lottery participant.
[0176] The fourth module is used to perform hash calculation on the input message using a hash algorithm to obtain a hash value of a preset length.
[0177] The fifth module is used to map the hash value to the feature space to obtain the feature vector, and sort the feature vectors corresponding to each hash value based on the preset rules to determine the ranking number of each lottery participant.
[0178] The sixth module is used to obtain random lottery results based on the preset lottery quota and ranking number.
[0179] It can be understood that the contents of the above method embodiments are all applicable to the present system embodiments, the functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0180] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the random lottery method based on the hash algorithm when executing the computer program. The electronic device can be any smart terminal including a tablet computer, a car computer, etc.
[0181] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0182] See also Figure 6 , Figure 6 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0183] The processor 901 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0184] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 902, and the processor 901 calls and executes the random lottery method based on the hash algorithm in the embodiment of this application;
[0185] Input / output interface 903, used to implement information input and output;
[0186] Communication interface 904, used to realize communication interaction between the device and other devices, which can be realized by wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);
[0187] A bus 905 that transmits information between various components of the device (e.g., the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);
[0188] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .
[0189] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the random lottery method based on the hash algorithm is implemented.
[0190] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiments, the functions specifically implemented by the present storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0191] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0192] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0193] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0194] The system embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.
[0195] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0196] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0197] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A random lottery method based on a hash algorithm, characterized in that: The method comprises the following steps: Obtaining a dedicated parameter, a first public parameter, and a second public parameter, wherein the dedicated parameter is an identity identifier or static feature corresponding to a lottery participant, the first public parameter is on-site editable data, and the second public parameter is a lottery timestamp; Concatenate the first public parameter and the second public parameter to obtain a third public parameter; The third common parameter is concatenated with each of the exclusive parameters to obtain an input message corresponding to the lottery participant; Using a hash algorithm to perform hash calculation on the input message to obtain a hash value of a preset length; Mapping the hash value to a feature space to obtain a feature vector, and sorting the feature vectors corresponding to each hash value based on a preset rule to determine the ranking number of each lottery participant; Based on the preset lottery quota, the random lottery result is obtained according to the ranking number.
2. The method according to claim 1, characterized in that: Before the step of obtaining the exclusive parameter, the first public parameter and the second public parameter, the method further includes: Determine the attendance number of the lottery participants according to the order of their arrival time; A number of candidates are randomly selected from all the lottery participants according to the attendance number; Obtaining the autonomous lottery result according to the winning information randomly extracted from the electronic signature of each candidate, wherein the electronic signature is preset with several parameter providing identifiers and a lottery operation identifier; Several parameter providers and a lottery operator are determined based on the autonomous lottery results.
3. The method according to claim 2, characterized in that The obtaining of the exclusive parameter, the first public parameter and the second public parameter comprises the following steps: Determine the exclusive parameters according to the identity identifier corresponding to the lottery participant; Determining a first public parameter according to the field editable data provided by the parameter provider; The second common parameter is determined according to the lottery timestamp when the lottery operator presses the button to end the lottery.
4. The method according to claim 3, characterized in that The step of concatenating the first public parameter and the second public parameter to obtain a third public parameter comprises the following steps: A plurality of the first public parameters are sequentially spliced in the order in which they are entered, and the spliced first public parameters are spliced with the second public parameters to obtain a third public parameter.
5. The method according to claim 1, characterized in that The step of using a hash algorithm to perform hash calculation on the input message to obtain a hash value of a preset length includes the following steps: Preprocessing the input message to obtain a preprocessed message; A hash algorithm is used to fill, group, expand and compress the pre-processed message to obtain a hash value of a preset length.
6. The method according to claim 5, characterized in that The method of using a hash algorithm to fill, group, expand and compress the pre-processed message to obtain a hash value of a preset length includes the following steps: Determining whether a remainder obtained by dividing the length of the preprocessed message by a preset number of bits is zero; When the remainder is not zero, padding is performed at the end of the preprocessed message to obtain a padding message; Grouping the padding messages according to the preset number of bits to obtain a plurality of grouped messages; Expanding each of the grouped messages to obtain a plurality of message words; All the message words corresponding to each of the grouped messages are compressed and calculated using a compression function to obtain a hash value of a preset length.
7. The method according to claim 1, characterized in that Mapping the hash value to a feature space to obtain a feature vector, and sorting the feature vectors corresponding to each hash value based on a preset rule to determine the ranking number of each lottery participant includes the following steps: Mapping the hash value to a mathematical space to obtain a decimal number; The decimal numbers corresponding to the hash values are sorted in ascending order, and the ranking number of each lottery participant is determined in ascending order.
8. A random lottery system based on a hash algorithm, characterized in that: The system comprises: The first module is used to obtain a dedicated parameter, a first public parameter, and a second public parameter, wherein the dedicated parameter is an identity identifier or static feature corresponding to a lottery participant, the first public parameter is on-site editable data, and the second public parameter is a lottery timestamp; A second module is used to concatenate the first public parameter and the second public parameter to obtain a third public parameter; The third module is used to concatenate the third common parameter with each of the exclusive parameters to obtain an input message corresponding to the lottery participant; The fourth module is used to perform hash calculation on the input message using a hash algorithm to obtain a hash value of a preset length; A fifth module is used to map the hash value to a feature space to obtain a feature vector, and sort the feature vectors corresponding to each hash value based on a preset rule to determine the ranking number of each lottery participant; The sixth module is used to obtain the random lottery result based on the preset lottery quota and the ranking number.
9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Random number-selecting and lottery system
CN109615759A
Computer system random number generation-based compulsory education admission assignment method
CN112651864A
Anti-cheating lottery drawing method and device
CN114782109A
Method, device and system for registration and lottery, computer equipment and storage medium
CN115376239A
Verifiable random lottery method based on Merkel tree and sorting
CN117218759A