WO2018040921A1 - 计算机系统中随机数的生成方法及装置 - Google Patents

计算机系统中随机数的生成方法及装置 Download PDF

Info

Publication number
WO2018040921A1
WO2018040921A1 PCT/CN2017/097779 CN2017097779W WO2018040921A1 WO 2018040921 A1 WO2018040921 A1 WO 2018040921A1 CN 2017097779 W CN2017097779 W CN 2017097779W WO 2018040921 A1 WO2018040921 A1 WO 2018040921A1
Authority
WO
WIPO (PCT)
Prior art keywords
random
determining
random numbers
random number
amount
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2017/097779
Other languages
English (en)
French (fr)
Inventor
张贺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to SG11201901736SA priority Critical patent/SG11201901736SA/en
Priority to KR1020197009107A priority patent/KR102102088B1/ko
Priority to MYPI2019001031A priority patent/MY192451A/en
Priority to JP2019511915A priority patent/JP6637219B2/ja
Publication of WO2018040921A1 publication Critical patent/WO2018040921A1/zh
Priority to US16/287,617 priority patent/US10649734B2/en
Priority to PH12019500451A priority patent/PH12019500451A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/58Random or pseudo-random number generators
    • G06F7/588Random number generators, i.e. based on natural stochastic processes
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/58Random or pseudo-random number generators
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/58Random or pseudo-random number generators
    • G06F7/582Pseudo-random number generators

Definitions

  • the present application relates to the field of computer technology, and in particular, to a method and an apparatus for generating a random number in a computer system.
  • the specified number of random numbers are often randomly generated by calling a random function.
  • the above random numbers are randomly generated, they cannot be effectively controlled (eg, , controlled within a certain range), which may result in a problem of uneven distribution of a specified number of random numbers generated.
  • the "red envelope amount” randomly generated by the payment server may be very large or very small (for example, 0.01), which may bring a poor experience to the user.
  • the present application describes a method and apparatus for generating a random number in a computer system, which can implement effective control of the generated random number.
  • a method for generating a random number in a computer system comprising:
  • each subset includes one or two random numbers, and when the subset includes two random numbers, the sum of the two random numbers is Two times the average, and the quotient of the two random numbers is a preset threshold;
  • a device for generating a random number in a computer system comprising:
  • a receiving unit configured to receive a first request, where the first request includes a sum of a random number to be generated and a number;
  • a determining unit configured to determine an average according to the sum received by the receiving unit and the number
  • a dividing unit configured to divide the random number of the number to be generated into multiple subsets, wherein each subset Combining one or two random numbers, when the subset includes two random numbers, the sum of the two random numbers is twice the average, and the quotient of the two random numbers is a preset threshold;
  • the determining unit is further configured to determine one or two random numbers in each of the plurality of subsets, thereby obtaining the number of random numbers.
  • the method and device for generating a random number in a computer system provided by the present application firstly divide a random number to be generated into a plurality of subsets when receiving the first request, and specify two when the subset includes two random numbers.
  • the sum of the random numbers is twice the average, and the quotient of the two random numbers is a preset threshold; then one or two random numbers included in each subset are sequentially determined, thereby obtaining a specified number of random numbers;
  • the purpose of controlling the generated random number is achieved.
  • FIG. 1 is a flowchart of a method for generating a random number in a computer system according to an embodiment of the present application
  • FIG. 2 is a flowchart of a method for determining a random number in a subset provided by the present application
  • FIG. 3 is a schematic diagram of an application scenario of a method for generating a random number in a computer system according to the present application
  • FIG. 4 is a flow chart of a method for generating a red envelope amount in the scenario shown in FIG. 3;
  • FIG. 5 is a flow chart of a method for generating another red envelope amount in the scenario shown in FIG. 3;
  • FIG. 6 is a schematic diagram of a device for generating a random number in a computer system according to an embodiment of the present application.
  • the method and device for generating a random number in a computer system are applicable to a scenario for generating a random number when the sum of the random numbers to be generated and the number of random numbers are fixed; in particular, the sum of the random numbers to be generated and When the number is fixed, a scene with a uniformly distributed random number is generated.
  • FIG. 1 is a flowchart of a method for generating a random number in a computing system according to an embodiment of the present application.
  • the executor of the method may be a device with processing capability: a server or a system or a device, such as a server of the payment system. As shown in FIG. 1 , the method may specifically include:
  • Step 110 Receive a first request.
  • the first request may be any request for instructing the server or the system or the device to generate a random number.
  • the first request may include a sum of random numbers to be generated, a number of random numbers to be generated, and the like.
  • step 120 the average is determined according to the sum and the number.
  • Step 130 Divide the number of random numbers to be generated into a plurality of subsets.
  • Each sub-set includes one or two random numbers.
  • the sum of the two random numbers is twice the average, and the quotient of the two random numbers is a preset threshold.
  • the number of sub-sets may be determined according to the number of random numbers to be generated.
  • the number of sub-sets may be calculated according to the following formula: INT (number/2) or INT (number/2)+1, wherein INT() is a rounding function, that is, it is used to obtain an integer part of a data.
  • INT number/2
  • INT number/2+1
  • INT() is a rounding function, that is, it is used to obtain an integer part of a data.
  • each of the subsets may include two random numbers; and in the case where the number of random numbers to be generated is an odd number, At least one subset contains only one random number.
  • the number of random numbers to be generated is 10
  • the sum of the two random numbers is twice the average, and the quotient of the two random numbers is a preset threshold.
  • S 1 and S 2 respectively represent two random numbers in the subset
  • AVG is the above average
  • GAP refers to the above preset threshold, which can be determined according to actual needs.
  • the two sub-sets may also be specified.
  • the sum of the number of machines is twice the average, and the quotient of the two random numbers is a preset threshold.
  • the two random numbers may also constitute the second formula as shown in the above formula 1. Yuan once equation.
  • each random number is The intermediate area is relatively average, that is, each random number is within the range divided by the average number, thereby ensuring that the generated random number distribution is relatively uniform.
  • Step 140 Determine one or two random numbers in each of the plurality of subsets, thereby obtaining the number of random numbers.
  • the number of random numbers to be generated is an even number
  • two random numbers in each sub-set can be determined according to formula 1; after determining two random numbers in each sub-set, the obtained The random number of the number; as in the foregoing example, after determining each of the five sub-sets, 10 random numbers can be obtained.
  • the one random number may be determined according to the average number.
  • the average number may be randomly attenuated as the above random number, or may pass The other method determines, for example, directly using the average number as the above random number, which is not limited in this application.
  • Step 210 Determine a cycle period according to the number of random numbers to be generated.
  • the cycle period can be determined according to Equation 2.
  • Interval is the cycle period and count is the number of random numbers to be generated.
  • Step 220 Determine an allocation factor according to a preset threshold.
  • the allocation factor can be determined according to Equation 3.
  • the primary is the allocation factor and the GAP is the preset threshold.
  • Step 230 determining a maximum phase difference multiple based on the average and the distribution factor.
  • the maximum phase difference multiple can be determined according to Equation 4.
  • top is the maximum difference multiple
  • AVG is the average
  • primer is the distribution factor
  • Math.min() is the most A small value function, for example, compares the size of two numbers (AVG*primer) with (2*AVG-1) and then takes the smallest number as the maximum difference multiple.
  • step 240 the step is determined according to the maximum phase difference multiple, the average number, and the cycle period.
  • the step can be determined according to Equation 5.
  • stepM (top-AVG)/Interval (Equation 5)
  • stepM is the step
  • top is the maximum difference multiple
  • AVG is the average
  • Interval is the cycle.
  • Step 250 determining an offset range of the random number according to the step.
  • the offset range of the random number can be determined according to Equation 6.
  • Ri is the offset range
  • stepM is the step
  • random.nextInt(25) is a random function that randomly selects any integer between 0-25.
  • Ri can be determined as [0, 1/30*stepM] , that is, the offset range is [0, 1/30*stepM].
  • Step 260 determining a first offset within the offset range.
  • the first offset herein may refer to any value randomly selected from within the offset range [0, 1/30*stepM].
  • Step 270 Determine a first random number of the two random numbers according to the maximum phase difference multiple, the step, the current step size, and the first offset.
  • the first of the two random numbers can be determined according to Equation 7.
  • S 1 is a first random number of two random numbers
  • the first random number may refer to a larger random number of two random numbers
  • top is a maximum phase difference multiple
  • stepGo is a current step size, when determining When the first random number in a subset is set, stepGo can be 0. Then, when determining the first random number in the second subset, stepGo can be 1, that is, incrementing by 1 each time, and so on
  • stepM is Step difference
  • ri is the first offset.
  • Step 280 Determine a second random number of the two random numbers according to the average number and the first random number.
  • the second of the two random numbers can be determined according to Equation 8.
  • S 2 is a second random number of two random numbers, and the second random number may refer to a smaller random number of two random numbers; AVG is an average; S 1 is a number of two random numbers A random number.
  • the random number can be determined by the following steps:
  • a random number in the second subset is determined according to the average of the random attenuation and the preset minimum random number.
  • the second subset here may refer to any subset that includes only one random number.
  • one of the second subsets may be determined according to Equation 9.
  • S 1 is a random number in the second subset;
  • MIN is a preset minimum random number, for example, may be 0.01;
  • AVG is an average;
  • FLUCTUATION may be a preset constant, which may be desired The value of the mean decay;
  • Math.max() is the maximum function, for example, it compares the size of MIN and (AVG-1-random.nextInt(FLUCTUATION)), and then takes the largest number as the first A random number in a set of two children.
  • step 140 it can be understood that one or two random numbers in each sub-set are determined in accordance with a determination method of one or two random numbers in one subset (for example, each step in FIG. 2). After that, the random number of the number can be obtained.
  • step 140 after performing step 140, the following steps may also be performed:
  • Step A Determine the remaining number based on the sum and the random number of the number.
  • the sum of the random numbers of the numbers obtained according to the conventional method or the steps in FIG. 2 is often not equal to the sum.
  • the sum of the red envelope amount of the red envelope number that is, the sum of the amount of the "red envelope” sent is not equal to the total amount of the red envelope, thereby causing the problem of capital loss.
  • the remaining number may be determined according to the sum and the random number of the number.
  • the remaining number may be determined by calculating the difference between the sum and the random number of the number. As in the foregoing example, in the case where the total amount of the red envelope is 100 yuan, assuming that the sum of the 10 red envelope amounts is 90 yuan, the remaining amount is 10 yuan.
  • the remaining number can also be determined at the time of performing the steps of FIG. 2, whereby the determination efficiency of the remaining number can be improved.
  • the remaining numbers may be initialized to a sum, and after each determination of one or two random numbers in a subset, the remaining number is updated to the difference between the remaining number and a random number, or The remaining number is updated to the difference between the remaining number and the sum of the two random numbers. It can be understood that after the random number determination in all the sub-sets is completed, the updated remaining number is the final remaining number.
  • Step B Split the remaining number.
  • the remaining number can be split into the number of sub-data.
  • the sub-data obtained after the splitting may be 10 one yuan.
  • the remaining number may be divided into other sub-data, and each sub-data may be different, which is not limited in this application.
  • Step C superimposing the remaining number after the split into the random number of the number to obtain the updated random number of the number.
  • the number of random numbers to be generated is 10, and the obtained 10 random numbers are: 1.2, 0.7, 1.1, 0.8, 1.3, 0.6, 1.5, 0.4, 1.0, and 0.9, respectively.
  • the remaining number can be: 0.5; the remaining number 0.5 is divided into 10 0.05; then the updated 10 random numbers can be: 1.25, 0.75, 1.15, 0.85, 1.35, 0.65, 1.55, 0.45, 1.05, and 0.95.
  • the loss of funds can be avoided by superimposing the remaining amount after the split into the red envelope amount of the red envelope number.
  • step 140 after performing step 140, or after performing step C, the following steps may also be performed:
  • Step X Reorder the random numbers of the number.
  • the number of random numbers may be reordered in an arbitrary order to prevent each random number from being stored in order of size; in addition, it is also ensured that the sum and the number of random numbers to be generated are the same. In the following, the order of the random numbers of the number divided by two or more consecutive times is inconsistent.
  • Step Y Store the random number of the reordered number into the list.
  • the number of random numbers of the reordered number may also be stored in other types of storage units, which is not limited in this application.
  • random number of the number in the above steps X and Y may also refer to the random number of the number of the remaining number after the split.
  • FIG. 3 includes a sender client and multiple receiver clients.
  • the sender client is configured to send a "red packet” to receive the notification
  • the receiver client is configured to perform the corresponding "red packet” collection operation according to the "red packet” notification sent by the sender client.
  • the sender client may include two types. : First, the Alipay client can send a "red envelope" to receive the notification in the group.
  • the group can be established by the following steps: Address Book -> Group Chat -> Select Group Type (eg, Entertainment Group) -> Select User Second, the sender user can transfer to the red envelope generation interface by triggering the "red envelope” text or the corresponding "red envelope” pattern in the "Alipay” application interface; in the red envelope generation interface, the sender user inputs the password, and Enter “Total Amount” and “Red Packets” in the selected group type, then click on "Red Packet” After that, you can complete the delivery of the "red envelope” collection notice. It can be understood that the "red envelope” receiving notification sent by the above two methods may include information such as “total amount” and "red envelope number".
  • the server may receive the first request, where the first request may include the total amount of the red envelope and the number of red packets to be sent, and then the server may receive the red envelope.
  • the red packet amount of the red packet number is divided into the total amount; when the server receives the "red packet" receiving request sent by the receiving client, that is, when the receiving user receives the red envelope, one of the red packet amount is allocated to the receiving client. end.
  • each red packet amount is usually randomly generated, and the amount of the red packet randomly generated by the server may be very large or may be very small (for example, 0.01), that is, There is a problem that the red envelope amount is uncontrollable.
  • the method for generating a random number in the computer system of the present application When the method for generating a random number in the computer system of the present application is applied to the scenario shown in FIG. 3, the problem that the amount of the red envelope is uncontrollable can be solved.
  • the method for generating a random number in the computer system of the present application when the method for generating a random number in the computer system of the present application is applied to the scenario shown in FIG. 3, the sum of the random numbers to be generated is equivalent to the total amount of the red packets, and the number of random numbers to be generated is equivalent to The number of the red packets to be sent, the random number is equivalent to the red packet amount, and the method for generating the random number may be a method for generating the red packet amount, wherein FIG. 4 provides a method for generating a red envelope amount. In FIG. 4, the method may specifically include the following step:
  • Step 410 The server receives the first request sent by the sender client.
  • the first request may include the total amount of red packets and the number of red packets to be sent.
  • Step 420 Determine an average distribution amount according to the total amount of the red envelope and the number of red packets.
  • Step 430 The red packet amount of the red packet number to be generated is divided into a plurality of red packet amount sub-sets.
  • each red envelope amount sub-set includes one or two red envelope amounts.
  • the red envelope amount subset includes two red envelope amounts
  • the sum of the two red envelope amounts is twice the average distribution amount, and the quotient of the two red envelope amounts is Preset threshold.
  • the number of red packet amount sub-sets may be determined according to the number of red packets to be sent.
  • the number of red packets amount subsets may be calculated according to the following formula: INT (red packet number/2) or INT (red packet number/2)+1.
  • INT() is a rounding function, that is, it is used to obtain an integer part of a data.
  • the number of red packets amount subsets can be determined according to the formula: INT (red packet number/2)
  • the number of red packets amount sub-sets can be determined according to the formula INT (red packet number/2)+1. Understand
  • each red packet amount sub-set may include two red packets; and in the case where the number of red packets is odd, at least one red packet amount subset includes only one red packet amount. .
  • the number of red packets to be sent is 10
  • the number of red packets is even
  • the sub-set of 5 red packet amounts obtained by dividing, when each red packet amount sub-set includes two red packet amounts, it may be specified that the sum of the two red packet amounts is twice the average distribution amount, and the two red packets amount
  • the quotient is a preset threshold.
  • the two red envelope amounts can constitute a binary one-time equation as shown in Formula 1.
  • the sum of the two red packet amounts may be specified as an average distribution.
  • the amount of the two red packets is twice the amount, and the quotient of the two red packets is a preset threshold.
  • the two red packets may also constitute a binary one-time equation as shown in Equation 1.
  • the purpose of controlling the difference between the two red packet amounts in the same red packet amount subset can be achieved.
  • the amount of each red envelope is relatively average in the middle area, that is, the amount of each red envelope is within the range divided by the average distribution amount, thereby ensuring that the amount of the red envelope allocated by each recipient client is relatively average, that is, it can be guaranteed.
  • the amount of "red envelope" allocated by the recipient user is relatively average, which can enhance the user's experience.
  • Step 440 Determine one or two red packet amounts in each of the red packet amount subsets of the plurality of red packet amount subsets, thereby obtaining the red packet amount of the red packet amount.
  • red envelope amount subset In the case that the number of red packets is even, according to formula 1, two red packets in each red envelope amount subset can be determined; after determining the two red packets in each red packet amount subset, the number of red packets can be obtained.
  • the red envelope amount as in the foregoing example, after determining the amount of each red envelope in the five red envelope amount subsets, 10 red envelope amounts can be obtained.
  • the one red envelope amount may be determined according to the average allocated amount. For example, the average allocated amount may be randomly attenuated as the above-mentioned one red envelope amount.
  • the red envelope amount sub-set includes two red envelope amounts
  • the above only gives a method for determining the two red envelope amounts.
  • two of the red envelope amount subsets One The red envelope amount can also be determined by the steps shown in FIG. 2; that is, only the average number in each step shown in FIG. 2 is replaced with the average assigned amount, and the random number is replaced with the red envelope amount.
  • the server determines the amount of one or two red packets in each subset of the red packet amount according to the method for determining the amount of one or two red packets in a red packet amount subset (for example, each step in FIG. 2).
  • the red envelope amount of the red envelope number for example, each step in FIG. 2.
  • step 440 After performing step 440, the following steps may also be performed:
  • Step a Determine the remaining amount based on the total amount of the red envelope and the amount of the red envelope.
  • the remaining amount may be determined according to the total amount of the red envelope and the red envelope amount of the red envelope number. For example, the remaining amount may be determined by calculating the difference between the sum of the total amount of the red envelope and the red envelope amount of the red envelope amount. As in the foregoing example, in the case where the total amount of the red envelope is 100 yuan, assuming that the sum of the 10 red envelope amounts is 90 yuan, the remaining amount is 10 yuan.
  • the remaining amount can also be determined at the time of performing the steps of FIG. 2, whereby the determination efficiency of the remaining amount can be improved.
  • the remaining amount may be initialized to the total amount of the red envelope, and after each determination of one or two red envelope amounts in a subset of the red envelope amount, the remaining amount is updated to the difference between the remaining amount and a red envelope amount. Value, or update the remaining amount to the difference between the remaining amount and the two red envelope amounts. It can be understood that after the red envelope amount in all the red envelope amount subsets is determined to be completed, the updated remaining amount is the final surplus. Amount.
  • Step b Split the remaining amount.
  • the remaining amount can be split into sub-data of the number of red packets.
  • the sub-data obtained after the splitting may be 10 one yuan.
  • the remaining amount may be split into other sub-data, and each sub-data may be different, which is not limited in this application.
  • Step c superimpose the remaining amount after the split into the red envelope amount of the red envelope quantity, and obtain the red envelope amount of the updated red envelope quantity.
  • the remaining amount can be: 0.5; the remaining amount of 0.5 is divided into 10 0.05; then the updated 10 red packets can be: 1.25, 0.75, 1.15, 0.85, 1.35, 0.65, 1.55, 0.45, 1.05 and 0.95.
  • Loss of funds can be avoided by superimposing the remaining amount after the split into the red envelope amount of the red envelope quantity.
  • step 440 or after performing step C, the following steps may also be performed:
  • Step x Reorder the red packet amount of the red packet number.
  • the red packet amount of the red packet number may be reordered in an arbitrary order to avoid storing the red packet amount in order of size; in addition, it is ensured that the total amount of the red packet and the number of red packets are the same, twice or more consecutively The order of the red envelope amount of the divided red packets is inconsistent.
  • Step y Store the red packet amount of the redected red packets into the list.
  • the amount of red packets of the number of red packets after reordering may be stored in other forms of storage units, which is not limited in this application.
  • red packet amount of the red packet number in the above steps x and y may also refer to the red packet amount of the updated red packet number.
  • Step 450 Receive a second request sent by the receiver client.
  • the second request may include an identification of the recipient user (eg, account information of the recipient user, etc.).
  • Step 460 According to the second request, allocate the target amount in the red packet amount of the red packet amount to the recipient client.
  • the target amount here may refer to any red envelope amount of the red envelope amount of the red envelope quantity, or may also refer to any red envelope amount of the red envelope amount of the updated red envelope quantity.
  • the server may read the target amount from the list; and then allocate the target amount to the recipient client.
  • the present application provides the following specific embodiments.
  • FIG. 5 is a flow chart of a method for generating another red envelope amount in the scenario shown in FIG. 3. As shown in FIG. 5, the method may specifically include:
  • Step 510 Receive a first request sent by a sender client.
  • the minimum allocated amount (eg, 0.01 yuan) may be preset before receiving the first request.
  • the first request may include a total amount of red packets and a number of red packets.
  • step 520 it is determined whether the number of red packets is 1 or not. If yes, step 530 is performed; if not, step 540 is performed.
  • step 530 the total amount of the red envelope is put into the list.
  • step 540 it is determined whether the total amount of the red envelope is the number of red packets * the preset minimum allocated amount, and if yes, step 550 is performed; if not, step 560 is performed.
  • Step 550 using an average allocation algorithm to divide the total amount of the red envelope into the minimum allocated amount of the number of red packets, and It is placed in the list.
  • Step 560 Calculate an average allocation amount, a maximum difference multiple, a step, and an offset range of the red envelope amount, and initialize the remaining amount to the total amount of the red envelope.
  • the calculation method of the average allocation amount may refer to step 120 or 420
  • the maximum difference multiple, the step difference, and the offset range of the red envelope amount may refer to step 210 to step 250, and details are not described herein.
  • step 570 it is determined whether the red packet amount of the red packet number has been determined. If not, step 580 is performed, and if yes, step 5160 is performed.
  • step 580 it is determined whether the currently determined red packet amount is the last red packet amount. If yes, step 590 is performed; if not, step 5120 is performed.
  • step 590 the average allocated amount is randomly attenuated.
  • Step 5100 Determine the last red envelope amount according to the average allocated amount after the random attenuation and the preset minimum allocated amount.
  • step 5110 the last red envelope amount is added to the list, and the remaining amount is updated to the difference between the remaining amount and the last red envelope amount.
  • Step 5120 randomly selecting any value from the offset range calculated in step 560 as the current offset.
  • Step 5130 Calculate a red envelope amount according to the maximum phase difference multiple, the step, the first offset, and the current step size calculated in step 560.
  • the calculation method of a red envelope amount may refer to step 370.
  • Step 5140 Calculate another red envelope amount according to the average allocated amount and a red envelope amount.
  • the calculation method of another red envelope amount may refer to step 380.
  • step 5150 the remaining amount is updated to the difference between the remaining amount and the sum of the two red envelope amounts, and one red envelope amount and another red envelope amount are added to the list.
  • step 5160 it is determined whether the remaining amount is greater than 0. If yes, step 5170 is performed; if not, step 5180 is performed.
  • step 5170 the remaining amount is split; the remaining amount after the split is superimposed into the red packet amount of the red packet quantity, and the red packet amount of the updated red packet quantity is obtained.
  • the method of splitting the remaining amount and the method of superimposing the remaining amount after splitting may refer to step B-step C or step b-step c.
  • step 5180 the red packet amount of the red packet number or the red packet amount of the updated red packet number is reordered.
  • Step 5190 Receive a second request sent by the receiver client.
  • step 5200 the target amount in the red packet amount of the red packet number or the red packet amount of the updated red packet number is allocated to the recipient client.
  • the red packet amount of the red packet number can be prevented from being stored in order of size.
  • the method for generating the random number in the computer system proposed by the present application is not limited to the scenario in which the red envelope is sent, and may be applied to other scenarios, such as the amount of the merchant activity, which is not limited in this application.
  • the embodiment of the present application further provides a device for generating a random number in a computer system, as shown in FIG. 6, the device includes:
  • the receiving unit 601 is configured to receive a first request, where the first request includes a sum and a number of random numbers to be generated.
  • the determining unit 602 is configured to determine an average number according to the sum and the number received by the receiving unit 601.
  • the dividing unit 603 is configured to divide the random number of the number to be generated into multiple subsets, where each subset includes one or two random numbers, and when the subset includes two random numbers, the sum of the two random numbers It is twice the average and the quotient of the two random numbers is the preset threshold.
  • the determining unit 602 is further configured to determine one or two random numbers in each of the plurality of subsets, thereby obtaining the random number of the number.
  • the determining unit 602 is further configured to determine a cycle period according to the number of times;
  • the step difference is determined according to the maximum phase difference multiple, the average number, and the cycle period;
  • the determining unit 602 is specifically configured to:
  • a second random number of the two random numbers is determined based on the average and the first random number.
  • the determining unit 602 is further configured to perform random attenuation on the average number
  • a random number in the second subset is determined according to the average of the random attenuation and the preset minimum random number.
  • the device further includes: a splitting unit 603 and a superimposing unit 604.
  • the determining unit 602 is further configured to determine a remaining number according to the sum and the random number of the number;
  • a splitting unit 603, configured to split the remaining number determined by the determining unit 602;
  • the superimposing unit 604 is configured to superimpose the remaining number after the splitting unit 603 is split into the random number of the number to obtain the updated random number of the number.
  • the device further includes:
  • a sorting unit 605, configured to reorder the random numbers of the number
  • the storage unit 606 is configured to store the random number of the number after the sorting unit 605 is reordered into the list.
  • the receiving unit 601 receives the first request, the first request includes a sum and a number of random numbers to be generated, and the determining unit 602 determines the average according to the sum and the number.
  • the numbering unit 603 divides the number of random numbers to be generated into a plurality of subsets; the determining unit 602 determines one or two random numbers in each of the plurality of subsets, thereby obtaining the number of random numbers. This achieves the purpose of controlling the generated random number.
  • the functions described herein can be implemented in hardware, software, firmware, or any combination thereof.
  • the functions may be stored in a computer readable medium or transmitted as one or more instructions or code on a computer readable medium.

Landscapes

  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Mathematics (AREA)
  • Information Transfer Between Computers (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Indexing, Searching, Synchronizing, And The Amount Of Synchronization Travel Of Record Carriers (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Complex Calculations (AREA)

Abstract

一种计算机系统中随机数的生成方法及装置,在一种计算机系统中随机数的生成方法中,在接收到第一请求时,首先将待生成的随机数划分为多个子集合,并在子集合包括两个随机数时,规定两个随机数之和为平均数的两倍,两个随机数之商为预设阈值;之后再依次确定各个子集合中包括的一个或两个随机数,从而得到指定个数的随机数;由此实现了对生成的随机数进行控制的目的。

Description

计算机系统中随机数的生成方法及装置
本申请要求2016年08月29日递交的申请号为201610751289.X、发明名称为“计算机系统中随机数的生成方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机技术领域,尤其涉及一种计算机系统中随机数的生成方法及装置。
背景技术
传统技术中,在生成指定个数的随机数时,往往通过调用随机函数来随机生成该指定个数的随机数,然而因为上述随机数是随机生成的,所以无法对其进行有效的控制(如,控制在某一范围内),由此会导致生成的指定个数的随机数分布不均匀的问题。比如,在实现“红包”的发送的场景中,支付服务端随机生成的“红包金额”可能会非常大,也可能会非常小(如,0.01),这会给用户带来较差的体验。
发明内容
本申请描述了一种计算机系统中随机数的生成方法及装置,可以实现对生成的随机数进行有效的控制。
第一方面,提供了一种计算机系统中随机数的生成方法,该方法包括:
接收第一请求,所述第一请求包括待生成的随机数的总和以及个数;
根据所述总和以及所述个数,确定平均数;
将待生成的所述个数的随机数划分为多个子集合,其中,每个子集合包括一个或两个随机数,当子集合包括两个随机数时,所述两个随机数之和为所述平均数的两倍,且所述两个随机数之商为预设阈值;
确定所述多个子集合中每个子集合中的一个或两个随机数,从而得到所述个数的随机数。
第二方面,提供了一种计算机系统中随机数的生成装置,该装置包括:
接收单元,用于接收第一请求,所述第一请求包括待生成的随机数的总和以及个数;
确定单元,用于根据所述接收单元接收的所述总和以及所述个数,确定平均数;
划分单元,用于将待生成的所述个数的随机数划分为多个子集合,其中,每个子集 合包括一个或两个随机数,当子集合包括两个随机数时,所述两个随机数之和为所述平均数的两倍,且所述两个随机数之商为预设阈值;
所述确定单元,还用于确定所述多个子集合中每个子集合中的一个或两个随机数,从而得到所述个数的随机数。
本申请提供的计算机系统中随机数的生成方法及装置,在接收到第一请求时,首先将待生成的随机数划分为多个子集合,并在子集合包括两个随机数时,规定两个随机数之和为平均数的两倍,两个随机数之商为预设阈值;之后再依次确定各个子集合中包括的一个或两个随机数,从而得到指定个数的随机数;由此实现了对生成的随机数进行控制的目的。
附图说明
为了更清楚地说明本发明实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。
图1为本申请一种实施例提供的计算机系统中随机数的生成方法流程图;
图2为本申请提供的子集合中随机数的确定方法流程图;
图3为本申请提供的计算机系统中随机数的生成方法的一种应用场景的示意图;
图4为图3所示的场景中一种红包金额的生成方法流程图;
图5为图3所示的场景中另一种红包金额的生成方法流程图;
图6为本申请一种实施例提供的计算机系统中随机数的生成装置示意图。
具体实施方式
下面结合附图,对本发明的实施例进行描述。
本申请提供的计算机系统中随机数的生成方法及装置适用于在待生成的随机数的总和以及个数固定的情况下,生成随机数的场景;尤其适用于在待生成的随机数的总和以及个数固定的情况下,生成分布均匀的随机数的场景。
图1为本申请一种实施例提供的计算系统中随机数的生成方法流程图。所述方法的执行主体可以为具有处理能力的设备:服务器或者系统或者装置,如,支付系统的服务端,如图1所示,所述方法具体可以包括:
步骤110,接收第一请求。
其中,该第一请求可以为任一用于指示上述服务器或者系统或者装置生成随机数的请求。该第一请求中可以包括待生成的随机数的总和以及待生成的随机数的个数等。
步骤120,根据总和以及个数,确定平均数。
此处,平均数可以为总和除以个数得到的商。以“红包”发送的场景为例来说,假设红包总金额为100元,红包数量为10个,则平均分配金额可以为100/10=10元,也即平均每个人可以分配10元。
步骤130,将待生成的个数的随机数划分为多个子集合。
其中,每个子集合包括一个或两个随机数,当子集合包括两个随机数时,两个随机数之和为平均数的两倍,且两个随机数之商为预设阈值。
此处,子集合的数量可以根据待生成的随机数的个数确定,如,子集合的数量可以根据如下公式计算:INT(个数/2)或者INT(个数/2)+1,其中,INT()是取整函数,即其用于获取一个数据的整数部分,具体地,当待生成的随机数的个数为偶数时,可以根据公式:INT(个数/2),确定子集合的数量;而当待生成的随机数的个数为奇数时,可以根据公式INT(个数/2)+1,确定子集合的数量。可以理解的是,在上述待生成的随机数的个数为偶数的情况下,各子集合中可以都包括两个随机数;而在待生成的随机数的个数为奇数的情况下,则至少有一个子集合只包括一个随机数。
举例来说,假设待生成的随机数的个数为10个,也即待生成的随机数的个数为偶数,因此可以确定子集合的数量为:INT(10/2)=5个。对划分得到的5个子集合,当每个子集合均包括两个随机数时,可以规定该两个随机数的和为平均数的两倍,且该两个随机数的商为预设阈值,在对两个随机数作出上述规定之后,该两个随机数就可以构成如下二元一次方程:
Figure PCTCN2017097779-appb-000001
其中,S1和S2分别表示子集合中的两个随机数,AVG为上述平均数,而GAP是指上述预设阈值,其可以根据实际需求确定。
在再一个例子中,假设待生成的随机数的个数为9个,也即待生成的随机数的个数为奇数时,可以确定子集合的数量为:INT(9/2)+1=5个。对划分得到的5个子集合,当1个子集合包括1个随机数,而其它子集合包括两个随机数时,也可以规定该两个随 机数的和为平均数的两倍,且该两个随机数的商为预设阈值,在对两个随机数作出上述规定之后,该两个随机数也可以构成如上公式1所示的二元一次方程。
需要说明的是,本申请中,通过将子集合中两个随机数的和与商进行相应的规定,可以实现对同一子集合中两个随机数的差距进行控制的目的,且各随机数在中间区域相对平均,也即各随机数是在以平均数为中心划分出的范围之内,由此可以保证生成的随机数分布比较均匀。
步骤140,确定多个子集合中每个子集合中的一个或两个随机数,从而得到所述个数的随机数。
在待生成的随机数的个数为偶数的情况下,根据公式1可以确定出每个子集合中的两个随机数;在确定出每个子集合中的两个随机数之后,就可以得到所述个数的随机数;如前述例子,在确定出5个子集合中的每个随机数之后,就可以得到10个随机数。需要说明的是,当某一子集合中包括1个随机数时,则该一个随机数可以根据平均数数确定,如,可以将平均数随机衰减后作为上述一个随机数,或者,也可以通过其它方式确定,如,直接将平均数作为上述一个随机数,本申请对此不作限定。
需要说明的是,对于子集合中包括两个随机数的情况,上述只是给出了子集合中两个随机数的一种确定方法,在本申请的其它实施方式中,子集合中的两个随机数也可以通过如图2所示的各步骤确定:
步骤210,根据待生成的随机数的个数,确定循环周期。
在一种实现方式中,可以根据公式2确定循环周期。
Interval=count/2           (公式2)
其中,Interval为循环周期,count为待生成的随机数的个数。
步骤220,根据预设阈值,确定分配因子。
在一种实现方式中,可以根据公式3确定分配因子。
primer=(2*GAP)/(1+GAP)           (公式3)
其中,primer为分配因子,GAP为预设阈值。
步骤230,根据平均数以及分配因子,确定最大相差倍数。
在一种实现方式中,可以根据公式4确定最大相差倍数。
top=Math.min((AVG*primer),(2*AVG-1))      (公式4)
其中,top为最大相差倍数,AVG为平均数,primer为分配因子,Math.min()为取最 小值函数,如,其会比较(AVG*primer)与(2*AVG-1)两个数的大小,然后取最小的数作为最大相差倍数。
步骤240,根据最大相差倍数、平均数以及循环周期,确定步差。
在一种实现方式中,可以根据公式5确定步差。
stepM=(top-AVG)/Interval        (公式5)
其中,stepM为步差,top为最大相差倍数,AVG为平均数,Interval为循环周期。
步骤250,根据步差,确定随机数的偏移范围。
在一种实现方式中,可以根据公式6确定随机数的偏移范围。
Ri=(int)(1d/(5+random.nextInt(25))*stepM)        (公式6)
其中,Ri为偏移范围,stepM为步差,random.nextInt(25)为随机选取0-25之间任一整数的随机函数,根据公式6可以确定Ri为[0,1/30*stepM],也即偏移范围为[0,1/30*stepM]。
步骤260,确定在偏移范围内的第一偏移量。
此处的第一偏移量可以是指从偏移范围[0,1/30*stepM]内随机选取的任一值。
步骤270,根据最大相差倍数、步差、当前步长以及第一偏移量,确定两个随机数中的第一随机数。
在一种实现方式中,可以根据公式7确定两个随机数中的第一随机数。
S1=top-(int)((stepGo++)*stepM)-ri       (公式7)
其中,S1为两个随机数中的第一随机数,该第一随机数可以是指两个随机数中较大的随机数;top为最大相差倍数;stepGo为当前步长,当确定第一个子集合中的第一随机数时,stepGo可以为0,之后,当确定第二个子集合中的第一随机数时,stepGo可以为1,即每次递增1,这样依次类推;stepM为步差;ri为第一偏移量。
步骤280,根据平均数以及第一随机数,确定两个随机数中的第二随机数。
在一种实现方式中,可以根据公式8确定两个随机数中的第二随机数。
S2=(int)(2*AVG)-S1              (公式8)
其中,S2为两个随机数中的第二随机数,该第二随机数可以是指两个随机数中较小的随机数;AVG为平均数;S1为两个随机数中的第一随机数。
上述是在其它实施方式中,子集合中两个随机数的确定方法,而当子集合只包括一个随机数时,则该一个随机数可以通过如下步骤确定:
对平均数进行随机衰减;
根据随机衰减后的平均数以及预设的最小随机数,确定第二子集合中的一个随机数。
此处的第二子集合可以是指任一只包括一个随机数的子集合。
在一种实现方式中,可以根据公式9确定第二子集合中的一个随机数。
S1=(int)Math.max(MIN,(AVG-1-random.nextInt(FLUCTUATION)))      (公式9)
其中,S1为第二子集合中的一个随机数;MIN为预设的最小随机数,如,可以为0.01;AVG为平均数;FLUCTUATION可以为预先设定的常量,该常量可以为想要对平均数衰减的值;Math.max()为取最大值函数,如,其会比较MIN与(AVG-1-random.nextInt(FLUCTUATION))两个数的大小,然后取最大的数作为第二子集合中的一个随机数。
回到步骤140中,可以理解的是,在依照一个子集合中一个或者两个随机数的确定方法(如,图2中的各步骤),确定出每个子集合中的一个或者两个随机数之后,就可以得到所述个数的随机数。
可选地,在执行步骤140之后,还可以执行如下步骤:
步骤A:根据总和以及所述个数的随机数,确定剩余数。
需要说明的是,根据传统的方法或者图2中的各步骤得到的所述个数的随机数之和往往并不等于总和。如在“红包”发送的场景中,红包数量的红包金额之和,也即发送的“红包”的金额之和往往并不等于红包总金额,由此就造成了资金亏损的问题。为解决该问题,本申请中,可以根据总和以及所述个数的随机数,确定剩余数,如,可以通过计算总和与所述个数的随机数之和的差值,来确定剩余数。如前述例子,在红包总金额为100元的情况下,假设10个红包金额之和为90元,则剩余金额为10元。
当然,在实际应用中,剩余数也可以在执行图2各步骤的时候确定,由此,可以提高剩余数的确定效率。在一个例子中,可以将剩余数初始化为总和,之后,在每次确定出一个子集合中的一个或者两个随机数之后,就将剩余数更新为剩余数与一个随机数的差值,或者将剩余数更新为剩余数与两个随机数之和的差值,可以理解的是,当所有的子集合中的随机数确定完成之后,更新后的剩余数即为最终的剩余数。
步骤B:对剩余数进行拆分。
在一种实现方式中,可以将剩余数拆分为所述个数的子数据。如前述例子,在剩余金额为10元,而红包数量为10个时,拆分后得到的子数据可以为10个1元。当然,在 实际应用中,也可以将剩余数拆分为其它个数的子数据,且各子数据可以不相同,本申请对此不作限定。
步骤C:将拆分后的剩余数叠加至所述个数的随机数中,得到更新后的所述个数的随机数。
举例来说,假设总和:10,待生成的随机数的个数为10个,得到的10个随机数分别为:1.2、0.7、1.1、0.8、1.3、0.6、1.5、0.4、1.0和0.9,则剩余数可以为:0.5;将剩余数0.5拆分为10个0.05;则更新后的10个随机数可以为:1.25、0.75、1.15、0.85、1.35、0.65、1.55、0.45、1.05和0.95。
在“红包”发送的场景下,通过将拆分后的剩余金额叠加至红包数量的红包金额中,可以避免资金损失。
可选地,在执行步骤140之后,或者在执行步骤C之后,还可以执行如下步骤:
步骤X:对所述个数的随机数进行重排序。
此处,可以是按照任意的顺序对所述个数的随机数进行重排序,以避免各随机数按大小顺序存储;此外,还可以保证在待生成的随机数的总和以及个数相同的情况下,连续两次以上划分的所述个数的随机数的顺序不一致。
步骤Y:将重排序后的所述个数的随机数存储到列表中。
当然,在实际用中,也可以将重排序后的所述个数的随机数数存储到其它形式的存储单元中,本申请对此不作限定。
需要说明的是,上述步骤X和步骤Y中的所述个数的随机数也可以是指叠加了拆分后的剩余数的所述个数的随机数。
需要说明的是,本申请提供的计算机系统中随机数的生成方法可以应用于如图3所示的“红包”的发送的场景,图3中,包括一个发送方客户端以及多个接收方客户端,发送方客户端用于发送“红包”领取通知,接收方客户端用于根据发送方客户端发送的“红包”领取通知,执行相应的“红包”领取操作。需要说明的是,发送方客户端发送“红包”领取通知的方式有多种,以发送方客户端为支付宝客户端为例来说,支付宝客户端发送“红包”领取通知的方式可以包括两种:第一种,支付宝客户端可以在群组中发送“红包”领取通知,该群组可以通过以下步骤建立:通讯录->群聊->选择群类型(如,娱乐群)->选择用户;第二种,发送方用户在“支付宝”应用界面中,通过触发“红包”文字或相应的“红包”图案,即可转入红包生成界面;在红包生成界面,发送方用户输入口令,并在选择的群类型中输入“总金额”以及“红包个数”,之后点击“发红包” 后,即可完成“红包”领取通知的发送。可以理解的是,通过上述两种方式发送的“红包”领取通知可以包括“总金额”和“红包个数”等信息。
图3中,在发送方客户端发送“红包”领取通知之后,服务端就可以接收到第一请求,该第一请求中可以包括红包总金额以及待发送的红包数量,之后服务端可以从红包总金额中划分出红包数量的红包金额;当服务端接收到接收方客户端发送的“红包”领取请求时,也即在接收方用户领取红包时,将其中的一个红包金额分配给接收方客户端。
然而,在服务端划分红包数量的红包金额的过程中,通常随机生成每个红包金额,由此服务端随机生成的红包金额可能会非常大,也可能会非常小(如,0.01),也即具有红包金额不可控的问题。
当本申请的计算机系统中随机数的生成方法应用于图3所示的场景中时,可以解决上述红包金额不可控的问题。具体地,当本申请的计算机系统中随机数的生成方法应用于图3所示的场景中时,待生成的随机数的总和相当于红包总金额,待生成的随机数的个数相当于待发送的红包数量,随机数相当于红包金额,而随机数的生成方法可以为红包金额的生成方法,其中,图4提供了一种红包金额的生成方法,图4中,该方法具体可以包括如下步骤:
步骤410,服务端接收发送方客户端发送的第一请求。
该第一请求可以包括红包总金额以及待发送的红包数量。
步骤420,根据红包总金额和红包数量,确定平均分配金额。
此处,平均分配金额可以为红包总金额除以红包数量得到的商。举例来说,假设红包总金额为100元,红包数量为10个,则平均分配金额可以为100/10=10元,也即平均每个人可以分配10元。
步骤430,将待生成的红包数量的红包金额划分为多个红包金额子集合。
其中,每个红包金额子集合包括一个或两个红包金额,当红包金额子集合包括两个红包金额时,两个红包金额之和为平均分配金额的两倍,且两个红包金额之商为预设阈值。
此处,红包金额子集合的数量可以根据待发送的红包数量确定,如,红包金额子集合的数量可以根据如下公式计算:INT(红包数量/2)或者INT(红包数量/2)+1,其中,INT()是取整函数,即其用于获取一个数据的整数部分,具体地,当红包数量为偶数时,可以根据公式:INT(红包数量/2),确定红包金额子集合的数量;而当红包数量为奇数时,可以根据公式INT(红包数量/2)+1,确定红包金额子集合的数量。可以理解 的是,在上述红包数量为偶数的情况下,各红包金额子集合中可以都包括两个红包金额;而在红包数量为奇数的情况下,则至少有一个红包金额子集合只包括一个红包金额。
假设待发送的红包数量为10个,也即红包数量为偶数,因此可以确定红包金额子集合的数量为:INT(10/2)=5个。对划分得到的5个红包金额子集合,当每个红包金额子集合均包括两个红包金额时,可以规定该两个红包金额的和为平均分配金额的两倍,且该两个红包金额的商为预设阈值,在对两个红包金额作出上述规定之后,该两个红包金额就可以构成如公式1所示的二元一次方程。
而假设待发送的红包数量为9个,也即红包数量为奇数时,可以确定红包金额子集合的数量为:INT(9/2)+1=5个。对划分得到的5个红包金额子集合,当1个红包金额子集合包括1个红包金额,而其它红包金额子集合包括两个红包金额时,也可以规定该两个红包金额的和为平均分配金额的两倍,且该两个红包金额的商为预设阈值,在对两个红包金额作出上述规定之后,该两个红包金额也可以构成如上公式1所示的二元一次方程。
需要说明的是,本申请中,通过将红包金额子集合中两个红包金额的和与商进行相应的规定,可以实现对同一红包金额子集合中两个红包金额的差值进行控制的目的,且各红包金额在中间区域相对平均,也即各红包金额是在以平均分配金额为中心划分出的范围之内,由此可以保证各接收方客户端分配的红包金额相对平均,也即可以保证接收方用户分配的“红包”金额相对平均,这可以提升用户的体验。
步骤440,确定多个红包金额子集合中每个红包金额子集合中的一个或两个红包金额,从而得到红包数量的红包金额。
在红包数量为偶数的情况下,根据公式1可以确定出每个红包金额子集合中的两个红包金额;在确定出每个红包金额子集合中的两个红包金额之后,就可以得到红包数量的红包金额;如前述例子,在确定出5个红包金额子集合中的每个红包金额之后,就可以得到10个红包金额。需要说明的是,当某一红包金额子集合中包括1个红包金额时,则该一个红包金额可以根据平均分配金额确定,如,可以将平均分配金额随机衰减后作为上述一个红包金额。此处,在红包数量为奇数的情况下,通过将平均分配金额随机衰减后赋予最后一个红包金额,可以避免最后一个红包金额固定的问题,由此可以避免不法分子利用这种规律进行不法行为的问题。
需要说明的是,对于红包金额子集合中包括两个红包金额的情况,上述只是给出了两个红包金额的一种确定方法,在本申请的其它实施方式中,红包金额子集合中的两个 红包金额也可以通过如图2所示的各步骤确定;即只需将图2所示的各步骤中的平均数替换为平均分配金额,将随机数替换为红包金额即可。
服务端在依照一个红包金额子集合中一个或者两个红包金额的确定方法(如,图2中的各步骤),确定出每个红包金额子集合中的一个或者两个红包金额之后,就可以得到红包数量的红包金额。
可选地,在执行步骤440之后,还可以执行如下步骤:
步骤a:根据红包总金额以及红包数量的红包金额,确定剩余金额。
红包数量的红包金额之和,也即发送的“红包”的金额之和往往并不等于红包总金额,由此就造成了资金亏损的问题。为解决该问题,本申请中,可以根据红包总金额以及红包数量的红包金额,确定剩余金额,如,可以通过计算红包总金额与红包数量的红包金额之和的差值,来确定剩余金额。如前述例子,在红包总金额为100元的情况下,假设10个红包金额之和为90元,则剩余金额为10元。
当然,在实际应用中,剩余金额也可以在执行图2各步骤的时候确定,由此,可以提高剩余金额的确定效率。在一个例子中,可以剩余金额初始化为红包总金额,之后,在每次确定出一个红包金额子集合中的一个或者两个红包金额之后,就将剩余金额更新为剩余金额与一个红包金额的差值,或者将剩余金额更新为剩余金额与两个红包金额之后的差值,可以理解的是,当所有的红包金额子集合中的红包金额确定完成之后,更新后的剩余金额即为最终的剩余金额。
步骤b:对剩余金额进行拆分。
在一种实现方式中,可以将剩余金额拆分为红包数量的子数据。如前述例子,在剩余金额为10元,而红包数量为10个时,拆分后得到的子数据可以为10个1元。当然,在实际应用中,也可以将剩余金额拆分为其它个数的子数据,且各子数据可以不相同,本申请对此不作限定。
步骤c:将拆分后的剩余金额叠加至红包数量的红包金额中,得到更新后的红包数量的红包金额。
举例来说,假设红包总金额为:10元,红包数量为10个,得到的10个红包金额分别为:1.2、0.7、1.1、0.8、1.3、0.6、1.5、0.4、1.0和0.9,则剩余金额可以为:0.5;将剩余金额0.5拆分为10个0.05;则更新后的10个红包金额可以为:1.25、0.75、1.15、0.85、1.35、0.65、1.55、0.45、1.05和0.95。
通过将拆分后的剩余金额叠加至红包数量的红包金额中,可以避免资金损失。
可选地,在执行步骤440之后,或者在执行步骤C之后,还可以执行如下步骤:
步骤x:对红包数量的红包金额进行重排序。
此处,可以是按照任意的顺序对红包数量的红包金额进行重排序,以避免各红包金额按大小顺序存储;此外,还可以保证在红包总金额和红包数量相同的情况下,连续两次以上划分的红包数量的红包金额的顺序不一致。
步骤y:将重排序后的红包数量的红包金额存储到列表中。
当然,在实际用中,也可以将重排序后的红包数量的红包金额存储到其它形式的存储单元中,本申请对此不作限定。
需要说明的是,上述步骤x和步骤y中的红包数量的红包金额也可以是指更新后的红包数量的红包金额。
步骤450,接收接收方客户端发送的第二请求。
该第二请求可以包括接收方用户的标识(例如,接收方用户的账号信息等)。
步骤460,根据第二请求,将红包数量的红包金额中目标金额分配至接收方客户端。
此处的目标金额可以是指红包数量的红包金额中的任一红包金额,或者也可以是指更新后的红包数量的红包金额中任一红包金额。
如,服务端在接收到第二请求之后,可以从列表中读取目标金额;之后将目标金额分配至接收方客户端。
为了更清楚的说明本申请提供的计算机系统中随机数的生成方法在图3所示的“红包”的发送的场景中的应用,本申请给出了如下具体的实施方式。
图5为图3所示的场景中另一种红包金额的生成方法流程图。如图5所示,所述方法具体可以包括:
步骤510,接收发送方客户端发送的第一请求。
可选地,在接收第一请求之前,可以预先设定最小分配金额(如,0.01元)。
该第一请求可以包括红包总金额以及红包数量(count)。
步骤520,判断红包数量(count)是否为1,若是,则执行步骤530;若否,则执行步骤540。
步骤530,将红包总金额放入列表。
步骤540,判断红包总金额是否为红包数量*预设的最小分配金额,若是,则执行步骤550;若否,则执行步骤560。
步骤550,采用平均分配算法将红包总金额划分为红包数量的最小分配金额,并将 其放入列表。
步骤560,计算平均分配金额、最大相差倍数、步差以及红包金额的偏移范围,并将剩余金额初始化为红包总金额。
此处,平均分配金额的计算方法可参照步骤120或者420,最大相差倍数、步差以及红包金额的偏移范围可以参照步骤210-步骤250,在此不复赘述。
步骤570,判断是否已确定出红包数量的红包金额,若否,则执行步骤580,若是,则执行步骤5160。
步骤580,判断当前确定的红包金额是否是最后一个红包金额,若是,则执行步骤590;若否,则执行步骤5120。
步骤590,对平均分配金额进行随机衰减。
步骤5100,根据随机衰减后的平均分配金额以及预设的最小分配金额,确定最后一个红包金额。
步骤5110,将最后一个红包金额加入列表中,并将剩余金额更新为剩余金额与最后一个红包金额的差值。
步骤5120,从步骤560中计算的偏移范围之内随机选取任一值作为当前的偏移量。
步骤5130,根据步骤560中计算的最大相差倍数、步差、第一偏移量以及当前步长,计算出一个红包金额。
此处,一个红包金额的计算方法可以参照步骤370。
步骤5140,根据平均分配金额以及一个红包金额,计算另一红包金额。
此处,另一红包金额的计算方法可以参照步骤380。
步骤5150,将剩余金额更新为剩余金额与上述两个红包金额之和的差值,并将一个红包金额与另一红包金额加入列表。
步骤5160,判断剩余金额是否大于0,若是,则执行步骤5170;若否,则执行步骤5180。
步骤5170,对剩余金额进行拆分;将拆分后的剩余金额叠加至红包数量的红包金额中,得到更新后的红包数量的红包金额。
此处,剩余金额的拆分方法以及叠加拆分后的剩余金额的方法可以参照步骤B-步骤C或者步骤b-步骤c。
步骤5180,将红包数量的红包金额或者更新后的红包数量的红包金额进行重排序。
步骤5190,接收接收方客户端发送的第二请求。
步骤5200,将红包数量的红包金额或者更新后的红包数量的红包金额中的目标金额分配至接收方客户端。
本申请的上述实施例具有如下技术效果:
1)通过对红包金额子集合中两个红包金额的和与商的限定,可以实现对划分的红包金额的控制。
2)通过对剩余金额进行拆分,并将拆分后的剩余金额叠加至红包数量的红包金额中,可以保障不会出现资损;此外,还可以保障分配更均匀。
3)通过对红包数量的红包金额进行重排序,可以避免红包数量的红包金额按大小顺序存储。
4)在红包数量为奇数的情况下,通过将平均分配金额随机衰减后赋予最后一个红包金额,可以避免最后一个红包金额固定的问题,由此可以避免不法分子利用这种规律进行不法行为的问题。
当然,本申请提出的计算机系统中随机数的生成方法并不局限于“红包”发送的场景,也可以应用于其它的场景,如商户活动金额分配,本申请对此不作限定。
与上述计算机系统中随机数的生成方法对应地,本申请实施例还提供的一种计算机系统中随机数的生成装置,如图6所示,该装置包括:
接收单元601,用于接收第一请求,该第一请求包括待生成的随机数的总和以及个数。
确定单元602,用于根据接收单元601接收的总和以及个数,确定平均数。
划分单元603,用于将待生成的个数的随机数划分为多个子集合,其中,每个子集合包括一个或两个随机数,当子集合包括两个随机数时,两个随机数之和为平均数的两倍,且两个随机数之商为预设阈值。
确定单元602,还用于确定多个子集合中每个子集合中的一个或两个随机数,从而得到所述个数的随机数。
可选地,确定单元602,还用于根据个数,确定循环周期;
根据预设阈值,确定分配因子;
根据平均数以及分配因子,确定最大相差倍数;
根据最大相差倍数、平均数以及循环周期,确定步差;
根据步差,确定随机数的偏移范围;
确定单元602具体用于:
确定在偏移范围内的第一偏移量;
根据最大相差倍数、步差、当前步长以及第一偏移量,确定两个随机数中的第一随机数;
根据平均数以及第一随机数,确定两个随机数中的第二随机数。
可选地,确定单元602,还用于对平均数进行随机衰减;
根据随机衰减后的平均数以及预设的最小随机数,确定第二子集合中的一个随机数。
可选地,所述装置还包括:拆分单元603和叠加单元604。
确定单元602,还用于根据总和以及所述个数的随机数,确定剩余数;
拆分单元603,用于对确定单元602确定的剩余数进行拆分;
叠加单元604,用于将拆分单元603拆分后的剩余数叠加至所述个数的随机数中,得到更新后的所述个数的随机数。
可选地,所述装置还包括:
排序单元605,用于对所述个数的随机数进行重排序;
存储单元606,用于将排序单元605重排序后的所述个数的随机数存储到列表中。
本申请实施例装置的各功能模块的功能,可以通过上述方法实施例的各步骤来实现,因此,本申请提供的装置的具体工作过程,在此不复赘述。
本申请实施例提供的计算机系统中随机数的生成装置,接收单元601接收第一请求,该第一请求包括待生成的随机数的总和以及个数;确定单元602根据总和以及个数,确定平均数;划分单元603将待生成的个数的随机数划分为多个子集合;确定单元602确定多个子集合中每个子集合中的一个或两个随机数,从而得到所述个数的随机数。由此实现了对生成的随机数进行控制的目的。
本领域技术人员应该可以意识到,在上述一个或多个示例中,本发明所描述的功能可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些功能存储在计算机可读介质中或者作为计算机可读介质上的一个或多个指令或代码进行传输。
以上所述的具体实施方式,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上所述仅为本发明的具体实施方式而已,并不用于限定本发明的保护范围,凡在本发明的技术方案的基础之上,所做的任何修改、等同替换、改进等,均应包括在本发明的保护范围之内。

Claims (10)

  1. 一种计算机系统中随机数的生成方法,其特征在于,该方法包括:
    接收第一请求,所述第一请求包括待生成的随机数的总和以及个数;
    根据所述总和以及所述个数,确定平均数;
    将待生成的所述个数的随机数划分为多个子集合,其中,每个子集合包括一个或两个随机数,当子集合包括两个随机数时,所述两个随机数之和为所述平均数的两倍,且所述两个随机数之商为预设阈值;
    确定所述多个子集合中每个子集合中的一个或两个随机数,从而得到所述个数的随机数。
  2. 根据权利要求1所述的方法,其特征在于,当所述多个子集合中的第一子集合包括两个随机数时,在确定所述第一子集合中的两个随机数之前,所述方法还包括:
    根据所述个数,确定循环周期;
    根据所述预设阈值,确定分配因子;
    根据所述平均数以及所述分配因子,确定最大相差倍数;
    根据所述最大相差倍数、所述平均数以及所述循环周期,确定步差;
    根据所述步差,确定随机数的偏移范围;
    所述确定所述第一子集合中的两个随机数,包括:
    确定在所述偏移范围内的第一偏移量;
    根据所述最大相差倍数、所述步差、当前步长以及所述第一偏移量,确定所述两个随机数中的第一随机数;
    根据所述平均数以及所述第一随机数,确定所述两个随机数中的第二随机数。
  3. 根据权利要求1所述的方法,其特征在于,当所述多个子集合中的第二子集合包括一个随机数时,所述确定所述第二子集合中的一个随机数,包括:
    对所述平均数进行随机衰减;
    根据随机衰减后的平均数以及预设的最小随机数,确定所述第二子集合中的一个随机数。
  4. 根据权利要求1-3任一项所述的方法,其特征在于,所述方法还包括:
    根据所述总和以及所述个数的随机数,确定剩余数;
    对所述剩余数进行拆分;
    将拆分后的剩余数叠加至所述个数的随机数中,得到更新后的所述个数的随机数。
  5. 根据权利要求1-4任一项所述的方法,其特征在于,在所述得到所述个数的随机数之后,所述方法还包括:
    对所述个数的随机数进行重排序;
    将重排序后的所述个数的随机数存储到列表中。
  6. 一种计算机系统中随机数的生成装置,其特征在于,该装置包括:
    接收单元,用于接收第一请求,所述第一请求包括待生成的随机数的总和以及个数;
    确定单元,用于根据所述接收单元接收的所述总和以及所述个数,确定平均数;
    划分单元,用于将待生成的所述个数的随机数划分为多个子集合,其中,每个子集合包括一个或两个随机数,当子集合包括两个随机数时,所述两个随机数之和为所述平均数的两倍,且所述两个随机数之商为预设阈值;
    所述确定单元,还用于确定所述多个子集合中每个子集合中的一个或两个随机数,从而得到所述个数的随机数。
  7. 根据权利要求6所述的装置,其特征在于,当所述子集合中包括两个随机数时,
    所述确定单元,还用于根据所述个数,确定循环周期;
    根据所述预设阈值,确定分配因子;
    根据所述平均数以及所述分配因子,确定最大相差倍数;
    根据所述最大相差倍数、所述平均数以及所述循环周期,确定步差;
    根据所述步差,确定随机数的偏移范围;
    所述确定单元具体用于:
    确定在所述偏移范围内的第一偏移量;
    根据所述最大相差倍数、所述步差、当前步长以及所述第一偏移量,确定所述两个随机数中的第一随机数;
    根据所述平均数以及所述第一随机数,确定所述两个随机数中的第二随机数。
  8. 根据权利要求6所述的装置,其特征在于,当所述子集合中包括一个随机数时,
    所述确定单元,还用于对所述平均数进行随机衰减;
    根据随机衰减后的平均数以及预设的最小随机数,确定所述子集合中的一个随机数。
  9. 根据权利要求7-8任一项所述的装置,其特征在于,所述装置还包括:
    所述确定单元,还用于根据所述总和以及所述个数的随机数,确定剩余数;
    拆分单元,用于对所述确定单元确定的所述剩余数进行拆分;
    叠加单元,用于将所述拆分单元拆分后的剩余数叠加至所述个数的随机数中,得到更新后的所述个数的随机数。
  10. 根据权利要求7-9任一项所述的装置,其特征在于,所述装置还包括:
    排序单元,用于对所述个数的随机数进行重排序;
    存储单元,用于将所述排序单元重排序后的所述个数的随机数存储到列表中。
PCT/CN2017/097779 2016-08-29 2017-08-17 计算机系统中随机数的生成方法及装置 Ceased WO2018040921A1 (zh)

Priority Applications (6)

Application Number Priority Date Filing Date Title
SG11201901736SA SG11201901736SA (en) 2016-08-29 2017-08-17 Random number generation method and device utilized in computer system
KR1020197009107A KR102102088B1 (ko) 2016-08-29 2017-08-17 컴퓨터 시스템에서 이용되는 난수 생성 방법 및 디바이스
MYPI2019001031A MY192451A (en) 2016-08-29 2017-08-17 Random number generation method and device utilized in computer system
JP2019511915A JP6637219B2 (ja) 2016-08-29 2017-08-17 コンピュータシステムにおいて利用される乱数生成方法及び装置
US16/287,617 US10649734B2 (en) 2016-08-29 2019-02-27 Random number generation method and device utilized in computer system
PH12019500451A PH12019500451A1 (en) 2016-08-29 2019-02-28 Random number generation method and device utilized in computer system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610751289.X 2016-08-29
CN201610751289.XA CN106919365A (zh) 2016-08-29 2016-08-29 计算机系统中随机数的生成方法及装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/287,617 Continuation US10649734B2 (en) 2016-08-29 2019-02-27 Random number generation method and device utilized in computer system

Publications (1)

Publication Number Publication Date
WO2018040921A1 true WO2018040921A1 (zh) 2018-03-08

Family

ID=59454597

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/097779 Ceased WO2018040921A1 (zh) 2016-08-29 2017-08-17 计算机系统中随机数的生成方法及装置

Country Status (9)

Country Link
US (1) US10649734B2 (zh)
JP (1) JP6637219B2 (zh)
KR (1) KR102102088B1 (zh)
CN (1) CN106919365A (zh)
MY (1) MY192451A (zh)
PH (1) PH12019500451A1 (zh)
SG (1) SG11201901736SA (zh)
TW (1) TWI695317B (zh)
WO (1) WO2018040921A1 (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106919365A (zh) 2016-08-29 2017-07-04 阿里巴巴集团控股有限公司 计算机系统中随机数的生成方法及装置
CN107743091A (zh) * 2017-11-20 2018-02-27 珠海市魅族科技有限公司 信息处理方法、装置、计算机装置及计算机可读存储介质
US10990355B1 (en) * 2020-06-19 2021-04-27 Panagiotis Andreadakis Aperiodic pseudo-random number generator based on a linear congruential generator
GB2602787A (en) * 2020-12-17 2022-07-20 Fusion Holdings Ltd Systems and methods for resilient distribution of random numbers
WO2025188242A1 (en) * 2024-03-04 2025-09-12 National University Of Singapore Ticket generation for approximating an unknown reference ticket

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060123073A1 (en) * 2001-04-13 2006-06-08 Science Applications International Corporation Random number generators
CN101127575A (zh) * 2007-09-12 2008-02-20 中兴通讯股份有限公司 一种均匀分布随机数发生器及均匀分布随机数产生方法
CN102520908A (zh) * 2011-12-20 2012-06-27 大唐微电子技术有限公司 一种伪随机数生成器及伪随机数生成方法
CN102799413A (zh) * 2011-05-25 2012-11-28 清华大学 一种随机数生成方法和装置
CN106919365A (zh) * 2016-08-29 2017-07-04 阿里巴巴集团控股有限公司 计算机系统中随机数的生成方法及装置

Family Cites Families (28)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4687988A (en) 1985-06-24 1987-08-18 International Business Machines Corporation Weighted random pattern testing apparatus and method
US4688223A (en) 1985-06-24 1987-08-18 International Business Machines Corporation Weighted random pattern testing apparatus and method
US4801870A (en) 1985-06-24 1989-01-31 International Business Machines Corporation Weighted random pattern testing apparatus and method
US7077746B2 (en) 2001-06-05 2006-07-18 Torango Lawrence J Progressive wagering system
US7384336B2 (en) 1997-01-15 2008-06-10 Torango Lawrence J Progressive system and methods
US6061819A (en) * 1997-12-29 2000-05-09 Hewlett-Packard Company Generation of reproducible random initial states in RTL simulators
WO2000016182A1 (en) 1998-09-14 2000-03-23 Silicon Gaming-Nevada, Inc. Random number generator seeding method and apparatus
JP2001117756A (ja) 1999-10-20 2001-04-27 Iwaki Electronics Corp ランダムパルス発生器ならびにそれを利用した乱数発生装置および確率発生装置
JP4521708B2 (ja) 2001-03-12 2010-08-11 ルネサスエレクトロニクス株式会社 乱数生成装置
JP4467216B2 (ja) 2001-09-07 2010-05-26 Necエレクトロニクス株式会社 乱数発生方法及び装置
US7328228B2 (en) 2003-09-02 2008-02-05 Sap Aktiengesellschaft Mapping pseudo-random numbers to predefined number ranges
JP4587687B2 (ja) 2004-03-26 2010-11-24 株式会社三共 遊技機
US7849121B2 (en) * 2006-04-20 2010-12-07 Hewlett-Packard Development Company, L.P. Optical-based, self-authenticating quantum random number generators
WO2007148244A1 (en) * 2006-06-20 2007-12-27 Nxp B.V. Random number generator system, method for generating random numbers
US8187076B2 (en) 2007-09-26 2012-05-29 Aruze Gaming America, Inc. Slot machine performing payout of a predetermined amount of credits when the number of games reaches a predetermined number
JP4308293B2 (ja) 2007-11-20 2009-08-05 際国 董 乱数生成装置及び方法
US8298070B2 (en) 2008-11-14 2012-10-30 Aruze Gaming America, Inc. Gaming machine that executes free game and the play method
JP5384221B2 (ja) 2009-06-24 2014-01-08 京楽産業.株式会社 遊技機
US8370411B2 (en) * 2010-03-12 2013-02-05 Plx Technology, Inc. Generating unique random numbers for multiple instantiations
JP2012100872A (ja) 2010-11-10 2012-05-31 Daito Giken:Kk 遊技台
JP4991955B1 (ja) 2011-07-25 2012-08-08 株式会社大都技研 遊技台
JP2013106805A (ja) 2011-11-21 2013-06-06 Daito Giken:Kk 遊技台
JP5256478B2 (ja) 2011-11-21 2013-08-07 株式会社大都技研 遊技台
US9641598B1 (en) * 2014-03-31 2017-05-02 Amazon Technologies, Inc. Contextually unique identifier generation service
US11200554B2 (en) 2014-12-24 2021-12-14 Isx Ip Ltd Securing a transaction
WO2016118340A1 (en) * 2015-01-20 2016-07-28 Alibaba Group Holding Limited Method and system for processing information
KR101920190B1 (ko) * 2016-11-22 2019-02-08 한국인터넷진흥원 임의의 ip 생성 방법 및 그 장치
US10146509B1 (en) * 2017-05-10 2018-12-04 Mbds, Inc. ASCII-seeded random number generator

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060123073A1 (en) * 2001-04-13 2006-06-08 Science Applications International Corporation Random number generators
CN101127575A (zh) * 2007-09-12 2008-02-20 中兴通讯股份有限公司 一种均匀分布随机数发生器及均匀分布随机数产生方法
CN102799413A (zh) * 2011-05-25 2012-11-28 清华大学 一种随机数生成方法和装置
CN102520908A (zh) * 2011-12-20 2012-06-27 大唐微电子技术有限公司 一种伪随机数生成器及伪随机数生成方法
CN106919365A (zh) * 2016-08-29 2017-07-04 阿里巴巴集团控股有限公司 计算机系统中随机数的生成方法及装置

Also Published As

Publication number Publication date
US20190196791A1 (en) 2019-06-27
TWI695317B (zh) 2020-06-01
SG11201901736SA (en) 2019-04-29
MY192451A (en) 2022-08-21
US10649734B2 (en) 2020-05-12
KR102102088B1 (ko) 2020-04-20
JP2019534499A (ja) 2019-11-28
PH12019500451A1 (en) 2020-01-20
KR20190043587A (ko) 2019-04-26
JP6637219B2 (ja) 2020-01-29
TW201807566A (zh) 2018-03-01
CN106919365A (zh) 2017-07-04

Similar Documents

Publication Publication Date Title
WO2018040921A1 (zh) 计算机系统中随机数的生成方法及装置
CN107566124B (zh) 基于哈希运算的共识建立方法、区块链系统及存储介质
AU2018422776B2 (en) Sybil-resistant identity generation
US12541615B2 (en) Multi-party data query methods and apparatuses for data privacy protection
US20250015971A1 (en) Data processing methods and apparatuses
CN110351841A (zh) 一种物理下行控制信道的检测方法、发送方法及设备
WO2022116176A1 (zh) 数字签名的生成方法、装置和服务器
CN107995003A (zh) 国际漫游通信的计费和结算方法、相关装置及分布式系统
JP2018515821A (ja) サービス実装
KR20250139331A (ko) 블록체인 키에 기반한 데이터 처리 방법, 장치, 기기 및 저장 매체
CN114021198A (zh) 一种保护数据隐私的确定共有数据的方法及装置
US20260019247A1 (en) Signature method and system
CN115604765A (zh) 计算卸载优化方法和装置、电子设备和存储介质
US12348608B2 (en) Secure and efficient distributed processing
CN107154915A (zh) 防御分布式拒绝服务DDoS攻击的方法、装置及系统
CN106302111A (zh) 一种信息处理方法、终端及服务器
CN113347208B (zh) 用于确定网络节点的方法和装置
US8856531B1 (en) Message bus key agreement scheme
US20220138304A1 (en) User authentication
CN109981284B (zh) 一种椭圆曲线数字签名的实现方法及装置
US12046109B2 (en) Method and apparatus for conducting fair lottery while reducing transaction cost by using blockchain network
CN105991588A (zh) 一种防御消息攻击的方法及装置
CN115904726A (zh) 安全多方计算方法及装置
CN112202562A (zh) Rsa密钥生成方法、计算机设备及介质
CN110162293B (zh) 一种用于均衡负载的随机编号生成方法、装置和终端

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17845223

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2019511915

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 20197009107

Country of ref document: KR

Kind code of ref document: A

122 Ep: pct application non-entry in european phase

Ref document number: 17845223

Country of ref document: EP

Kind code of ref document: A1