Data processing method, device, electronic device and storage medium
By traversing the user numbers based on the random number generation algorithm in big data processing, different lucky numbers are obtained and notification information is sent, the problem of insufficient fairness and randomness in the coupon extraction process in the prior art is solved, and a more efficient and fair data extraction process is achieved.
Patent Information
- Application Number
- CN202110464902.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-28
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2041-04-28
AI Technical Summary
In the prior art, in big data processing, there are problems of insufficient inequity and randomness in the process of coupon extraction, especially in the case of paging query and data storage time sequence.
By performing a predetermined number of traversal operations on user numbers based on a random number generation algorithm, different lucky numbers are obtained, and notification information is sent based on the user contact information corresponding to these numbers.
The number of decimation times of each user data is achieved, ensuring the fairness of the decimation, improving randomness, and reducing memory and database consumption.
Smart Images

Figure CN113157743B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of big data technology, and in particular to a data processing method, device, electronic device and storage medium. Background Art
[0002] With the rapid development of information technology, the Internet has entered the era of big data. The data that Internet applications need to process is becoming larger and more complex, and how to quickly respond to big data processing has become the focus. And how to quickly and low-load randomly and fairly extract multiple records from massive data for operation has become the top priority.
[0003] At present, in order to reduce the crash caused by excessive data volume in database query, the traditional coupon distribution model will first perform paging query during the coupon drawing process; then calculate the number of drawings required for each page, and the calculation formula is: the number of data required to be drawn for each page = the number of lucky users still to be drawn * the number of pages / the total number of applications to be issued. If there is a remainder, add 1 (adding 1 is to avoid insufficient total number of drawings after all drawings are completed); extract the data from the paging query according to the calculated number of drawings.
[0004] However, this model is not completely fair, because the application records are stored in ascending chronological order, and in order to prevent the number of distributions remaining at the end, the priority application records will actually be drawn in excess of the equal proportion (the remainder plus 1), which is unfair to users who apply later, and each piece of data has only one chance to be drawn after a paginated query, and the randomness is poor. Summary of the invention
[0005] In view of this, the present invention provides a data processing method, device, electronic device and storage medium to solve at least one of the above-mentioned problems.
[0006] According to a first aspect of the present invention, there is provided a data processing method, the method comprising:
[0007] Acquire multiple user data, the user data includes: a user number, the user number is associated with the user contact information;
[0008] Perform a predetermined number of traversal operations on multiple user numbers based on a random number generation algorithm to obtain a predetermined number of lucky numbers;
[0009] In response to the predetermined number of lucky numbers being different, notification information is sent based on user contact information corresponding to each lucky number.
[0010] According to a second aspect of the present invention, there is provided a data processing device, the device comprising:
[0011] A data acquisition unit, used to acquire a plurality of user data, the user data including: a user number, the user number is associated with the user contact information;
[0012] A lucky number generating unit, used for performing a predetermined number of traversal operations on a plurality of user numbers based on a random number generating algorithm to obtain a predetermined number of lucky numbers;
[0013] The notification sending unit is used to send notification information based on the user contact information corresponding to each lucky number in response to the predetermined number of lucky numbers being different.
[0014] According to a third aspect of the present invention, there is provided an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the program.
[0015] According to a fourth aspect of the present invention, there is provided a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the above method when executed by a processor.
[0016] It can be seen from the above technical solution that by performing a predetermined number of traversal operations on the obtained multiple user numbers, a predetermined number of different lucky numbers are obtained, and then notification information is sent based on the user contact information corresponding to each lucky number. Compared with the existing lucky user extraction scheme based on paging, this technical solution extracts the same number of times for each user data, which ensures the fairness of the extraction and has better randomness. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 is a flow chart of a data processing method according to an embodiment of the present invention;
[0019] Figure 2 is a schematic diagram of a lucky number extraction scenario according to an embodiment of the present invention;
[0020] Figure 3 is a structural block diagram of a data processing device according to an embodiment of the present invention;
[0021] Figure 4 is a structural block diagram of a lucky number generating unit 2 according to an embodiment of the present invention;
[0022] Figure 5It is a schematic block diagram of the system structure of the electronic device 600 according to an embodiment of the present invention. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0024] Since the current coupon extraction mode is based on paging extraction, it is not completely fair to the applicants, and each piece of user data has only one extraction opportunity after paging query, and the randomness is poor. Based on this, the embodiment of the present invention provides a data processing solution, which extracts the same number of times for each piece of user data, ensuring the fairness of the extraction and good randomness. The embodiment of the present invention is described in detail below with reference to the accompanying drawings.
[0025] Figure 1 is a flow chart of a data processing method according to an embodiment of the present invention. Figure 1 As shown, the method includes:
[0026] Step 101, obtaining a plurality of user data, the user data including: a user number, the user number is associated with the user contact information.
[0027] Step 102: Perform a predetermined number of traversal operations on multiple user numbers based on a random number generation (eg, RNG) algorithm to obtain a predetermined number of lucky numbers.
[0028] Step 103: In response to the predetermined number of lucky numbers being different, sending notification information based on user contact information corresponding to each lucky number.
[0029] In one embodiment, when there are identical numbers among the predetermined number of lucky numbers, the traversal operation on the multiple user numbers may be continued based on the random number generation algorithm according to the number of identical numbers to obtain the predetermined number of different lucky numbers.
[0030] Specifically, the traversal operation may be continued on the multiple user numbers based on the random number generation algorithm, one less than the number of identical numbers, to obtain the lucky number again.
[0031] A predetermined number of different lucky numbers are obtained by performing a predetermined number of traversal operations on the obtained multiple user numbers, and then notification information is sent based on the user contact information corresponding to each lucky number. Compared with the existing lucky user extraction scheme based on paging, the embodiment of the present invention extracts each user data the same number of times, which ensures the fairness of the extraction and has better randomness.
[0032] In a specific implementation process, the traversal operation of step 102 includes: presetting a secure random program based on a random number generation algorithm; and then calling the secure random program to perform a predetermined number of traversal operations on the multiple user numbers.
[0033] In actual operation, user contact information can be stored in a database in advance.
[0034] Before executing step 101, an index relationship based on user number and user contact information can be set first; in step 103, the database can be queried based on each lucky number according to the index relationship to obtain the user contact information corresponding to each lucky number. Only querying the user contact information of each lucky number can avoid querying useless data and reduce memory consumption.
[0035] In order to better understand the present invention, the following describes the embodiments of the present invention in detail by taking the issuance of coupons as an example.
[0036] In the embodiment of the present invention, Figure 2 As shown, the coupon distribution scenario can be simplified and abstracted into extracting lucky numbers from a number pool, which is a set of natural numbers in the interval [0, total number of applications). The extraction step logic is: initialize the extracted number pool list, which stores the extracted non-repeating lucky numbers. When the number of extracted numbers (initialized to 0) is less than the number to be extracted, the single-step extraction logic is looped.
[0037] The single-step extraction logic is: create an instance of the SecureRandom class, then call the nextInt method of this instance, extract a random number, and then determine whether the number has been drawn, that is, whether it is already in the drawn number pool (that is, whether it is the same lucky number). If it has been drawn, draw it again, otherwise save it to the drawn number pool.
[0038] The specific code is as follows:
[0039]
[0040]
[0041] Among them, needSendCount means: the number of samples that need to be drawn.
[0042] applyCount means: total number of applications,
[0043] luckNums means: lucky user data offset set.
[0044] When all lucky numbers are drawn, the correspondence problem between the lucky numbers and the database data begins, that is, finding the user information corresponding to the lucky number.
[0045] In one embodiment, each number in the number pool uniquely corresponds to a record in the corresponding table of the database, so all the data can be regarded as a set of numbers that increase from 0, and each number represents a subscript of the database data, called an offset. For example: if a number 1 is extracted from [0,2), it means that the second data with an offset of 1 is extracted, which is equivalent to a subscript in the array. In specific implementation, the corresponding data can be queried using the limit keyword in the following SQL statement.
[0046] SQL statement: select*from table where clause limit offset,1;
[0047] The meaning of this SQL statement is to query the data with offset offset in the where condition from the table.
[0048] After querying the data, you need to operate on the data itself. Since it is the issuance of coupons, the application record needs to be modified in the future. Using the index or primary key of the data itself during the operation improves the query efficiency of the database and reduces the consumption of the database.
[0049] The embodiment of the present invention mainly aims at randomly and fairly extracting a certain number of application data from a large amount of coupon application data to issue coupons and notify issuance under the premise of low memory and database consumption. In this embodiment, the extraction process is abstracted into a general conceptual model, that is, extracting a certain amount of data from massive data. It gets rid of the shortcomings of traditional solutions such as non-complete fairness, non-complete randomness, complexity, and high resource consumption. At the same time, this conceptual model of the embodiment of the present invention can be used in a variety of business models, such as venue draws, red envelope draws, and all other equal probability model businesses, providing a simple and efficient solution for these businesses.
[0050] Specifically, the main advantages of the embodiments of the present invention are as follows:
[0051] 1. The traditional coupon distribution model is not completely fair, because the application records are stored in ascending chronological order, and in order to prevent the remaining number of coupons at the end of the distribution, the priority application records will actually be drawn in proportion (the remainder plus 1), which is unfair to users who apply later, and each piece of data has only one chance to be drawn after paging query; while the embodiment of the present invention is a one-time extraction, and each piece of data has the same number of extraction opportunities, which ensures the fairness of the extraction.
[0052] 2. Since the lucky users need to be followed up, i.e., to send a winning notification, the traditional solution needs to read the paging quantity records into the memory for operation, which consumes a lot of memory and slows down the running speed. However, the embodiment of the present invention first queries all the quantities and offset values to be issued, avoids querying useless data, and greatly reduces memory consumption. At the same time, since only the offset in the database is operated, the execution efficiency of the database is greatly improved, ensuring low resource consumption in the extraction process.
[0053] 3. The Random class used in the traditional coupon distribution model obtains a pseudo-random sequence by specifying a seed (the default timestamp is the seed), which can be obtained by repeated deduction; however, the SecureRandom class used in the embodiment of the present invention cannot specify a seed. It uses the RNG algorithm to generate a completely safe and random random number through the seed generated by the entropy generated by the random event of the hardware, ensuring the complete randomness of the extraction.
[0054] 4. The implementation of the embodiment of the present invention is simpler and clearer, the amount of code is greatly reduced, and the readability and maintainability of the code are higher.
[0055] Based on similar inventive concepts, an embodiment of the present invention further provides a data processing device. Preferably, the device can be used to implement the process of the above method embodiment.
[0056] Figure 3 is a structural block diagram of the data processing device, such as Figure 3 As shown, the device includes: a data acquisition unit 1, a lucky number generation unit 2 and a notification sending unit 3, wherein:
[0057] The data acquisition unit 1 is used to acquire a plurality of user data, wherein the user data includes: a user number, and the user number is associated with the user contact information.
[0058] The lucky number generating unit 2 is used to perform a predetermined number of traversal operations on multiple user numbers based on a random number generating algorithm to obtain a predetermined number of lucky numbers.
[0059] The notification sending unit 3 is used for sending notification information based on the user contact information corresponding to each lucky number in response to the predetermined number of lucky numbers being different.
[0060] The lucky number generating unit 2 performs a predetermined number of traversal operations on the multiple user numbers obtained by the data obtaining unit 1 to obtain a predetermined number of different lucky numbers. Then, the notification sending unit 3 sends notification information based on the user contact information corresponding to each lucky number. Compared with the existing lucky user extraction scheme based on paging, the embodiment of the present invention extracts each user data the same number of times, thereby ensuring the fairness of the extraction and having better randomness.
[0061] In one embodiment, when there are identical numbers among the predetermined number of lucky numbers, the lucky number generating unit 2 further performs a traversal operation on the plurality of user numbers based on the random number generating algorithm according to the number of identical numbers, so as to obtain the predetermined number of different lucky numbers. Specifically, the lucky number generating unit 2 performs a traversal operation on the plurality of user numbers based on the random number generating algorithm, one less than the number of identical numbers, so as to obtain the lucky number again.
[0062] Specifically, Figure 4 As shown, the lucky number generating unit 2 comprises: a program setting module 21 and a program calling module 22, wherein:
[0063] A program setting module 21 is used to pre-set a secure random program based on a random number generation algorithm;
[0064] The program calling module 22 is used to call the secure random program to perform a predetermined number of traversal operations on the multiple user numbers.
[0065] In one embodiment, the above device further comprises:
[0066] A storage unit, used to pre-store the user contact information in a database;
[0067] An index setting unit, used to set an index relationship based on a user ID and a user contact method;
[0068] The query unit is used to query the database based on each lucky number according to the index relationship to obtain the user contact information corresponding to each lucky number.
[0069] The specific execution process of the above-mentioned units and modules can be found in the description of the above-mentioned method embodiment, which will not be repeated here.
[0070] In actual operation, the above-mentioned units and modules may be provided in combination or individually, and the present invention is not limited thereto.
[0071] This embodiment also provides an electronic device, which may be a desktop computer, a tablet computer, a mobile terminal, etc., but this embodiment is not limited thereto. In this embodiment, the electronic device may be implemented with reference to the above method embodiment and the data processing device embodiment, the contents of which are incorporated herein, and the repeated parts are not repeated.
[0072] Figure 5 FIG. 6 is a schematic block diagram of a system structure of an electronic device 600 according to an embodiment of the present invention. Figure 5 As shown, the electronic device 600 may include a central processor 100 and a memory 140; the memory 140 is coupled to the central processor 100. It should be noted that this figure is exemplary; other types of structures may also be used to supplement or replace this structure to implement telecommunication functions or other functions.
[0073] In one embodiment, the data processing function may be integrated into the central processing unit 100. The central processing unit 100 may be configured to perform the following control:
[0074] Step 101, obtaining a plurality of user data, the user data including: a user number, the user number is associated with the user contact information.
[0075] Step 102: Perform a predetermined number of traversal operations on multiple user numbers based on a random number generation algorithm to obtain a predetermined number of lucky numbers.
[0076] Step 103: In response to the predetermined number of lucky numbers being different, sending notification information based on user contact information corresponding to each lucky number.
[0077] From the above description, it can be seen that the electronic device provided in the embodiment of the present application obtains a predetermined number of different lucky numbers by performing a predetermined number of traversal operations on the obtained multiple user numbers, and then sends notification information based on the user contact information corresponding to each lucky number. Compared with the existing lucky user extraction scheme based on paging, the embodiment of the present invention extracts the same number of times for each user data, which ensures the fairness of the extraction and has better randomness.
[0078] In another embodiment, the data processing device may be configured separately from the central processing unit 100. For example, the data processing device may be configured as a chip connected to the central processing unit 100, and the data processing function is implemented under the control of the central processing unit.
[0079] like Figure 5 As shown, the electronic device 600 may further include: a communication module 110, an input unit 120, an audio processor 130, a display 160, and a power supply 170. It is worth noting that the electronic device 600 does not necessarily have to include Figure 5In addition, the electronic device 600 may also include Figure 5 For components not shown, reference may be made to the prior art.
[0080] like Figure 5 As shown, the central processor 100 is sometimes also referred to as a controller or an operation control, and may include a microprocessor or other processor devices and / or logic devices. The central processor 100 receives inputs and controls the operations of various components of the electronic device 600.
[0081] The memory 140 may be, for example, one or more of a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory or other suitable devices. The above-mentioned information related to the failure may be stored, and a program for executing the relevant information may also be stored. The CPU 100 may execute the program stored in the memory 140 to implement information storage or processing.
[0082] The input unit 120 provides input to the CPU 100. The input unit 120 is, for example, a key or a touch input device. The power supply 170 is used to provide power to the electronic device 600. The display 160 is used to display display objects such as images and text. The display may be, for example, an LCD display, but is not limited thereto.
[0083] The memory 140 may be a solid-state memory, such as a read-only memory (ROM), a random access memory (RAM), a SIM card, etc. It may also be a memory that saves information even when the power is off, can be selectively erased, and is provided with more data, examples of which are sometimes referred to as EPROMs, etc. The memory 140 may also be some other type of device. The memory 140 includes a buffer memory 141 (sometimes referred to as a buffer). The memory 140 may include an application / function storage unit 142, which is used to store application programs and function programs or processes for executing the operation of the electronic device 600 through the central processor 100.
[0084] The memory 140 may also include a data storage unit 143 for storing data, such as contacts, digital data, pictures, sounds, and / or any other data used by the electronic device. The driver storage unit 144 of the memory 140 may include various drivers for communication functions of the electronic device and / or for executing other functions of the electronic device (such as messaging applications, address book applications, etc.).
[0085] The communication module 110 is a transmitter / receiver 110 that transmits and receives signals via an antenna 111. The communication module (transmitter / receiver) 110 is coupled to the central processor 100 to provide input signals and receive output signals, which may be the same as the case of a conventional mobile communication terminal.
[0086] Based on different communication technologies, multiple communication modules 110 may be provided in the same electronic device, such as a cellular network module, a Bluetooth module and / or a wireless LAN module. The communication module (transmitter / receiver) 110 is also coupled to a speaker 131 and a microphone 132 via an audio processor 130 to provide an audio output via the speaker 131 and receive an audio input from the microphone 132, thereby realizing a common telecommunication function. The audio processor 130 may include any suitable buffer, decoder, amplifier, etc. In addition, the audio processor 130 is also coupled to the central processor 100, so that the sound can be recorded on the local machine through the microphone 132, and the sound stored on the local machine can be played through the speaker 131.
[0087] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned data processing method are implemented.
[0088] In summary, the embodiment of the present invention mainly aims at randomly and fairly extracting a certain number of application data from a large amount of coupon application data to issue and notify coupons under the premise of low memory and database consumption. The embodiment of the present invention abstracts the extraction process into a general conceptual model, that is, extracting a certain number of data from massive data, which overcomes the shortcomings of traditional solutions such as non-complete fairness, non-complete randomness, complexity, and high resource consumption. This model can be used in a variety of business models, such as venue lotteries, red envelope lotteries, and all other equal probability model businesses, providing a simple and efficient solution for these businesses.
[0089] The preferred embodiments of the present invention are described above with reference to the accompanying drawings. Many features and advantages of these embodiments are clear from this detailed description, and therefore the claims are intended to cover all such features and advantages of these embodiments that fall within their true spirit and scope. In addition, since many modifications and changes are easily conceivable to those skilled in the art, it is not intended to limit the embodiments of the present invention to the precise structure and operation illustrated and described, but all suitable modifications and equivalents falling within its scope may be covered.
[0090] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may 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.
[0091] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0092] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0093] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0094] The present invention uses specific embodiments to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A data processing method, characterized in that: The method comprises: Acquire multiple user data, the user data includes: a user number, the user number is associated with the user contact information; Perform a predetermined number of traversal operations on multiple user numbers based on a random number generation algorithm to obtain a predetermined number of lucky numbers; In response to the predetermined number of lucky numbers being different, sending notification information based on user contact information corresponding to each lucky number; In response to the predetermined number of lucky numbers being different, sending notification information based on user contact information corresponding to each lucky number includes: Initialize a drawn number pool list, wherein the drawn number pool list stores the non-repeated lucky numbers; In response to the number of numbers drawn being less than the number to be drawn, looping the single-step drawing logic until the lucky number drawing is completed; Searching for corresponding user information according to the lucky number, and sending notification information based on the user contact information corresponding to each lucky number; The method further comprises: In response to identical numbers existing in the predetermined number of lucky numbers, performing a traversal operation on the plurality of user numbers based on the random number generation algorithm according to the number of identical numbers to obtain the predetermined number of different lucky numbers; The traversal operation of multiple user IDs based on the number of identical IDs based on the random number generation algorithm includes: Based on the random number generation algorithm, a traversal operation is performed on the multiple user numbers, one less than the number of identical numbers, to obtain a lucky number again; Before sending notification information based on the user contact information corresponding to each lucky number, the method further includes: Set up an index relationship based on user ID and user contact information; According to the index relationship, query the database based on each lucky number to obtain the user contact information corresponding to each lucky number; The index relationship is determined by treating all data as a set of numbers that increase incrementally from 0 and based on the offset of each number.
2. The method according to claim 1, characterized in that Performing a predetermined number of traversal operations on multiple user numbers based on a random number generation algorithm includes: Pre-set secure random class programs based on random number generation algorithms; The secure random program is called to perform a predetermined number of traversal operations on the multiple user numbers.
3. A data processing device, characterized in that: The device comprises: A data acquisition unit, used to acquire a plurality of user data, the user data including: a user number, the user number is associated with the user contact information; A lucky number generating unit, used for performing a predetermined number of traversal operations on a plurality of user numbers based on a random number generating algorithm to obtain a predetermined number of lucky numbers; A notification sending unit, configured to send notification information based on user contact information corresponding to each lucky number in response to the predetermined number of lucky numbers being different; The notification sending unit is specifically used for: Initialize a drawn number pool list, wherein the drawn number pool list stores the non-repeated lucky numbers; In response to the number of numbers drawn being less than the number to be drawn, looping the single-step drawing logic until the lucky number drawing is completed; Searching for corresponding user information according to the lucky number, and sending notification information based on the user contact information corresponding to each lucky number; The lucky number generating unit is also used for: In response to identical numbers existing in the predetermined number of lucky numbers, performing a traversal operation on the plurality of user numbers based on the random number generation algorithm according to the number of identical numbers to obtain the predetermined number of different lucky numbers; The lucky number generating unit is specifically used for: Based on the random number generation algorithm, a traversal operation is performed on the multiple user numbers, one less than the number of identical numbers, to obtain a lucky number again; The device also includes: A storage unit, used to pre-store the user contact information in a database; An index setting unit, used to set an index relationship based on a user ID and a user contact method; A query unit, configured to query a database based on each lucky number according to the index relationship to obtain user contact information corresponding to each lucky number; The index relationship is determined by treating all data as a set of numbers that increase incrementally from 0 and based on the offset of each number.
4. The device according to claim 3, characterized in that The lucky number generating unit comprises: A program setting module is used to pre-set a secure random program based on a random number generation algorithm; The program calling module is used to call the secure random program to perform a predetermined number of traversal operations on the multiple user numbers.
5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the method according to any one of claims 1 to 2 are implemented.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 2 are implemented.
Citation Information
Patent Citations
Winning data processing method and device
CN107563798A
Lottery drawing method based on block chain
CN110910559A