Unlock instant, AI-driven research and patent intelligence for your innovation.

A random number generation method, device and application, equipment and storage medium

A random number and random selection technology, applied in the blockchain field, can solve problems such as security threats, failure to maintain node information consistency, blockchain network business impact, etc., to achieve the effect of ensuring randomness and consistency

Active Publication Date: 2022-02-11
HANGZHOU FUZAMEI TECH CO LTD
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] When the blockchain network requires random numbers, all nodes will synchronously request a third-party random source to generate random numbers to ensure the consistency of node information. The disadvantage is that the security and stability of the third-party random source cannot be guaranteed. When the third-party random source is attacked and controlled, the business of the entire blockchain network may be affected
In order to overcome the above defects, the existing random number generation method is: directly obtain the random number according to the current block hash value or public key pair. Security of execution is compromised
[0003] The publication number is CN107301546A, and the publication date is October 27, 2017. The Chinese invention patent application involves random number generation and application methods and devices. It publishes a transaction request that generates random numbers according to the received needs. The time stamp of the time of acceptance is used as Initial random number, when this random number acquisition method is executed on different blockchain nodes, each node will obtain different random number results, which cannot maintain the consistency of node information

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
  • A random number generation method, device and application, equipment and storage medium
  • A random number generation method, device and application, equipment and storage medium
  • A random number generation method, device and application, equipment and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0035] This embodiment relates to a random number generation method, such as figure 1 shown, including:

[0036] S101. Concatenate the transactions in the consecutive N blocks before the current block to form content C;

[0037] S102, the content C is divided into fragments of M bytes, the total number of fragments S=len(C) / M;

[0038] S103, whether len(C)>S*M is true, if so, then S=S+1; if not, then the S value remains unchanged;

[0039] S105. Obtain the fragmented content from the content C according to the fragmented index Indexi, and calculate a random number by performing a hash operation on the fragmented content.

[0040] Among them, N≥1, M and N are both integers, the value range of M: len(C)≥M≥32, M is a power of 2

[0041] A further improvement is that there are many methods for randomly determining a fragment index from the S fragments, which can be determined according to needs. The present embodiment enumerates three methods including:

[0042] Method 1: Frag...

Embodiment 3

[0081] An apparatus comprising: one or more processors; memory for storing one or more programs which, when executed by the one or more processors, cause the One or more processors execute the method as described above.

[0082] A storage medium storing a computer program, when the program is executed by a processor, implements the method described in Embodiment 1 above.

[0083] Figure 5 It is a schematic structural diagram of a device provided by an embodiment of the present invention.

[0084] Such as Figure 5As shown, as another aspect, the present application also provides a device 500, including one or more central processing units (CPU) 501, which can be 508 programs loaded into random access memory (RAM) 503 to execute various appropriate actions and processes. In the RAM 503, various programs and data necessary for the operation of the device 500 are also stored. The CPU 501 , ROM 502 , and RAM 503 are connected to each other via a bus 504 . An input / output (I...

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 random number generation method, device, application, equipment and storage medium, and belongs to the technical field of blockchain. Concatenate the transactions in the consecutive N blocks before the current block to form the content C. The content C is divided into fragments of M bytes. The total number of fragments is S=len(C) / M; if len (C)>S*M; then S=S+1; randomly determine a shard index Indexi from S shards, and obtain the shard content according to the shard index Indexi, and perform a hash operation on the shard content, Random numbers are obtained through calculation; where, N≥1, M and N are both integers. The random numbers obtained by existing methods are easy to break, which threatens the security of contract execution relying on blockchain random numbers. The present invention determines the generation of block chain random numbers through a series of rules such as cascading and slicing of multiple consecutive block transaction contents, which can ensure its randomness and not be broken at the same time.

Description

technical field [0001] The present invention relates to the technical field of block chains, in particular to a random number generation method, device and application, equipment and storage medium. Background technique [0002] When the blockchain network requires random numbers, all nodes will synchronously request a third-party random source to generate random numbers to ensure the consistency of node information. The disadvantage is that the security and stability of the third-party random source cannot be guaranteed. When the third-party random source is attacked and controlled, the business of the entire blockchain network may be affected. In order to overcome the above defects, the existing random number generation method is: directly obtain the random number according to the current block hash value or public key pair. The security of the execution is compromised. [0003] The publication number is CN107301546A, and the publication date is October 27, 2017. The Chi...

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 Patents(China)
IPC IPC(8): H04L9/08H04L9/06
CPCH04L9/0869H04L9/0643H04L67/104
Inventor 何正军王志文吴思进
Owner HANGZHOU FUZAMEI TECH CO LTD