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

Method, application and device for generating random numbers in game, equipment and storage medium

A random number and game technology, applied in the blockchain field, can solve problems such as block hash random number instability, random number fragility, blockchain games cannot be played, etc., to achieve flexible and controllable lottery time, random number The effect of high entropy source and stable game result

Active Publication Date: 2020-01-03
HANGZHOU FUZAMEI TECH CO LTD
View PDF14 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] Random numbers are crucial to the blockchain, especially some blockchain games completely rely on the randomness and fairness of random numbers. If random numbers can be predicted or tampered with, then blockchain-based games will not be possible
[0003] Chinese patents CN109583892A and CN109450629A have proposed some random number generation methods, but most of the existing random number generation methods rely on block hashes. Considering the need for unpredictability, they need to rely on future block hashes
This brings about an inherent disadvantage: from the perspective of waiting time, the random number should rely on the block hash as close as possible, such as the next block; from the perspective of non-tampering, the random number should rely on the block as far away as possible, For example, after 6 blocks of Bitcoin, the data is almost impossible to be tampered with, and Chain33 is 12 blocks
[0004] Moreover, the random number that depends on the block hash is unstable, because even one more irrelevant transaction in the block will cause the change of the entire block hash, so relying on the block hash will cause the random number to become very Fragile

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, application and device for generating random numbers in game, equipment and storage medium
  • Method, application and device for generating random numbers in game, equipment and storage medium
  • Method, application and device for generating random numbers in game, equipment and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0037] A random number generation method for games, suitable for blockchain nodes, such as figure 1 Shown, including:

[0038] S101. Receive a first transaction sent by a first party; wherein the first transaction includes a first random number hash value generated locally by the first party at the current block height, and the first party is in the Nth block The first random number generated locally at the previous block height, N is a positive integer, and the value of N can be the block rollback height to further strengthen the stable source of random numbers;

[0039] In different blockchain systems, the value of the block rollback height N is different, because the block rollback height in each blockchain system is different. For the public chain Chain33, there are 6 blocks. For Ethereum it is 12. By limiting the locally generated first random number to be published after the rollback interval, it is ensured that the first random number will not be published after the block i...

Embodiment 2

[0069] This embodiment proposes a game random number application, which is suitable for blockchain nodes. According to the game random number generation method described in Embodiment 1, such as image 3 Shown, including:

[0070] After the second random number passes the designated remainder operation, it is compared with the predicted content of the second trading game that meets the set lottery conditions received before the current block, and the current zone is determined according to the game rules of the first game contract. The winning or losing of the second undrawn transaction that meets the set lottery conditions received before the block.

[0071] Take the guessing game as an example. Because the random number of the guessing game only needs to be large or small, the decimal value of the second random number can be taken as a standard, with 1 representing large and 0 representing small.

[0072] Use this standard to compare with the second party's game prediction content ...

Embodiment 3

[0075] This embodiment provides a game random number generation device, which is suitable for blockchain nodes. According to the game random number generation method described in Embodiment 1, such as Figure 4 Shown, including:

[0076] The game opens the interface for receiving the first transaction sent by the first party; the first transaction includes the first random number hash value generated locally by the first party at the current block height, and the first party is in the Nth The first random number generated locally under the block height before the block;

[0077] It is also used to detect whether there is an undrawn second transaction that meets the set lottery conditions received before the current block;

[0078] If it is, it is further used to generate a hash value as the second random number by using the first random number and the second transaction that satisfies the set lottery conditions received before the current block to generate a hash value as the second ...

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 method, application and device for generating random numbers in a game, equipment and a storage medium, and belongs to the technical field of blockchains. The method comprises the following steps of receiving a first transaction issued by a first party; detecting whether there is a second transaction that is received before the current block, satisfies a set lottery running condition and has not been run; if so, generating a hash value with a specified hash operation as a second random number by a first random number locally generated by the first party under the height of the block before the Nth block and the second transaction that is received before the current block and has not been run, receiving a second transaction issued by a second party, and marking thelottery running state of the second transaction to be not run, wherein the second transaction comprises game bets of the second party and game prediction content. For the technical problem of weak and unstable random numbers, the invention makes the random numbers more stable and untamable.

Description

Technical field [0001] The present invention relates to the technical field of blockchains, in particular to a method, application and device, equipment and storage medium for generating random numbers for games. Background technique [0002] Random numbers are very important to the blockchain, especially some blockchain games completely rely on the randomness and fairness of random numbers. If the random number can be predicted or tampered with, then blockchain-based games will not be able to play . [0003] Chinese patents CN109583892A and CN109450629A have proposed some random number generation methods, but most of the existing random number generation methods rely on block hashes. Considering that they need to be unpredictable, they need to rely on future block hashes. This brings an inherent drawback: from the perspective of waiting time, the random number should rely on the hash of the block as close as possible, such as the next block; from the perspective of non-tamperabil...

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): G07C15/00G07F17/32H04L9/32G06F7/58
CPCG07C15/006G07F17/329H04L9/3236G06F7/588H04L9/50
Inventor 袁兴强王志文吴思进
Owner HANGZHOU FUZAMEI TECH CO LTD