Method and apparatus for generating random numbers in computer system

A computer system and random number technology, applied in the computer field, can solve problems such as effective control, poor user experience, uneven distribution of random numbers, etc.

Pending Publication Date: 2017-07-04
ALIBABA GRP HLDG LTD
View PDF0 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] In the traditional technology, when generating a specified number of random numbers, the random number of the specified number is often generated randomly by calling a random function. However, because the above random numbers are randomly generated, it cannot be effectively controlled (such as , controlled within a c...

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and apparatus for generating random numbers in computer system
  • Method and apparatus for generating random numbers in computer system
  • Method and apparatus for generating random numbers in computer system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0022] Embodiments of the present invention will be described below in conjunction with the accompanying drawings.

[0023] The method and device for generating random numbers in the computer system provided by this application are applicable to the scenario of generating random numbers when the sum and number of random numbers to be generated are fixed; especially suitable for the sum of random numbers to be generated and When the number is fixed, generate a scene of uniformly distributed random numbers.

[0024] figure 1 It is a flowchart of a method for generating random numbers in a computing system provided by an embodiment of the present application. The subject of execution of the method may be a device with processing capabilities: a server or a system or device, such as a server of a payment system, such as figure 1 As shown, the method may specifically include:

[0025] Step 110, receiving a first request.

[0026] Wherein, the first request may be any request fo...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention relates to the technical field of computers, in particular to a method and an apparatus for generating random numbers in a computer system. The method for generating the random numbers in the computer system comprises the steps of firstly dividing to-be-generated random numbers into a plurality of subsets when a first request is received, and when each subset comprises two random numbers, defining a sum of the two random numbers to be double an average number, and defining a quotient of the two random numbers to be a preset threshold; and then determining one or two random numbers comprised in each subset in sequence, thereby obtaining a specified number of random numbers. Therefore, the purpose of controlling the generated random numbers is achieved.

Description

technical field [0001] The present application relates to the field of computer technology, in particular to a method and device for generating random numbers in a computer system. Background technique [0002] In the traditional technology, when generating a specified number of random numbers, the random number of the specified number is often generated randomly by calling a random function. However, because the above random numbers are randomly generated, it cannot be effectively controlled (such as , controlled within a certain range), which will lead to the problem of uneven distribution of the specified number of random numbers generated. For example, in the scenario of realizing the sending of "red envelopes", the "red envelope amount" randomly generated by the payment server may be very large or very small (for example, 0.01), which will bring poor user experience. Contents of the invention [0003] This application describes a method and device for generating rand...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F7/58
CPCG06F7/58G06F7/588G06F7/582
Inventor 张贺
Owner ALIBABA GRP HLDG LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products