Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Cross-platform transformation method for pseudo random number generator in FTS random algorithm

A pseudo-random number and random algorithm technology, applied in the field of random selection, can solve problems such as difficulty in ensuring consistent principles and consistency in program operation results

Inactive Publication Date: 2021-04-09
橙载(上海)信息技术有限公司
View PDF7 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

In the selection of the pseudo-random number generator, the existing technology uses the security-based random seed that comes with the development language library to select random numbers within a certain interval. Different development languages ​​(java / c++ / go) have similar Pseudo-random number generator implementation, because it is difficult to ensure that the principle is consistent, the same security seed is difficult to ensure that the program running results are consistent across platforms

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
  • Cross-platform transformation method for pseudo random number generator in FTS random algorithm

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 2

[0024] Example 2: Take the weights corresponding to User0–User7 to form a Merkle tree, and the random seed is 100 as an example:

[0025] S1: Compile the weights corresponding to User0–User7 into a Merkle tree, in the form that the weight of non-leaf nodes is the sum of the weights of the left and right subtrees, and the weight of leaf nodes is the equity value of a certain User;

[0026] S2: Starting from the root node of the above merkle tree, use the random seed as the random source, use the pseudo-random number generator to generate a random number less than the weight of the current tree node, if the random number is less than the weight of the left subtree, select the left subtree Continue traversing, otherwise select the right subtree and continue traversing until a certain leaf node is selected;

[0027] S3: Use the random seed 100 as the initialization seed of the pseudo-random number generator, take the java code as an example, use the code Random rng=new Random(100)...

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 discloses a cross-platform transformation method for a pseudo random number generator in an FTS random algorithm. The cross-platform transformation method comprises the steps: recombining weights corresponding to User0-UserY into a Merkle tree; starting from the root node of the merkle tree, using a random seed as a random source, and using a pseudo random number generator to generate a random number which is less than the node weight of the current tree; taking the random seed X as an initialization seed, and selecting leaf nodes; performing transformation; performing verification; based on a safe random seed, a cross-platform pseudo-random number generator is constructed by adopting a hash algorithm and a large number modulo operation, so that the universality of algorithm transplantation is realized, the algorithm does not depend on any development language and a basic library of an operating system any more in the operation process, and the cross-platform pseudo-random number generator is constructed by using universal mathematical logic; according to the method, different development languages and operating systems can be universally realized, and the same seed is ensured to obtain a consistency result after cross-platform, so that the error probability can be reduced, and the universality of protocol realization can be ensured.

Description

technical field [0001] The invention relates to the field of random selection, in particular to a cross-platform transformation method for a pseudo-random number generator in an FTS random algorithm. Background technique [0002] The pseudo-random number is a sequence of random numbers from [0,1] uniform distribution calculated by a deterministic algorithm. Not really random, but has statistical characteristics similar to random numbers, such as uniformity, independence, etc. When calculating the pseudo-random number, if the initial value (seed) used remains unchanged, the sequence of the pseudo-random number will also remain unchanged. Pseudo-random numbers can be generated by computers in large quantities. In order to improve simulation efficiency in simulation research, pseudo-random numbers are generally used instead of real random numbers. The pseudo-random numbers that have a very long cycle period and can pass the random number test are generally used in the simulat...

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
Patent Type & Authority Applications(China)
IPC IPC(8): G06F7/58
CPCG06F7/582
Inventor 章庆
Owner 橙载(上海)信息技术有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products