CN110648472A - Method, apparatus and storage medium for ensuring game fairness - Google Patents

Method, apparatus and storage medium for ensuring game fairness Download PDF

Info

Publication number
CN110648472A
CN110648472A CN201910731016.2A CN201910731016A CN110648472A CN 110648472 A CN110648472 A CN 110648472A CN 201910731016 A CN201910731016 A CN 201910731016A CN 110648472 A CN110648472 A CN 110648472A
Authority
CN
China
Prior art keywords
game
player
transaction
balance
contract
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.)
Pending
Application number
CN201910731016.2A
Other languages
Chinese (zh)
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.)
Hangzhou Fuzamei Technology Co Ltd
Original Assignee
Hangzhou Fuzamei Technology Co 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 Hangzhou Fuzamei Technology Co Ltd filed Critical Hangzhou Fuzamei Technology Co Ltd
Priority to CN201910731016.2A priority Critical patent/CN110648472A/en
Publication of CN110648472A publication Critical patent/CN110648472A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07FCOIN-FREED OR LIKE APPARATUS
    • G07F17/00Coin-freed apparatus for hiring articles; Coin-freed facilities or services
    • G07F17/32Coin-freed apparatus for hiring articles; Coin-freed facilities or services for games, toys, sports, or amusements
    • G07F17/3241Security aspects of a gaming system, e.g. detecting cheating, device integrity, surveillance

Abstract

The invention discloses a method, equipment and a storage medium for ensuring game fairness, and belongs to the technical field of block chains. Sending at least one first game participation transaction to the first game contract after opening; receiving a game result of the first game participation transaction fed back by a first game contract according to game rules; wherein, the first game participation transaction comprises the constitution of guess content and deposit; a first game contract for receiving at least one first game participation transaction of at least one player; sending at least one game result of the first game participation transaction fed back by the first game contract according to the game rule to at least one player; a wager for a first game participation transaction is deducted from at least one player address initial balance of the first game contract after the opening and frozen. Aiming at the technical problems that the players can use the asymmetric win-lose condition to carry out arbitrage and destroy the fairness and justice principle of the game, the invention ensures that the game can be carried out fairly.

Description

Method, apparatus and storage medium for ensuring game fairness
Technical Field
The present invention relates to the field of blockchain technology, and more particularly, to a method, apparatus, and storage medium for ensuring game fairness.
Background
Because the blockchain data is transparent and can not be tampered, some games based on the blockchain are popular, such as Chinese invention patent applications with patent publication numbers of CN108447014A, CN109389399A and CN109741513A, and the like, and can be specifically divided into games of mutual game of players and games of game of player and object A. For games in which players play with each other, all players' wagers form a pool of winnings, which is a pool of credits. For games involving object a, the prize pool is provided by object a, and each time a player participates, a player needs to freeze a certain deposit, wins a prize in terms of unfreezing the deposit and awarding the prize in terms of odds, and if losing, transfers the deposit to the prize pool. But for games of the type where the player bets on object a, the player has more flexibility than object a, and thus there are some opportunities for arbitrage.
TABLE 1 Table presentation of win-win arbitrage by players
Figure RE-GDA0002283853380000011
In the case of a guessing size game, each tile will generate a random number that determines the outcome of the game-big or small, which the player can guess. For example, the balance of the player's game account is 10, at this time, the player continuously participates in3 transactions with the same guess content, each deposit is 10, and since three transactions with the same guess content are packed into the same block, the random numbers are the same, so the results of the execution of the 3 transactions with the same guess content are the same-three transaction players win or lose, as shown in table 1.
1. Winning situation
The first transaction freezes 10 credits of the player, or virtual currency → player win → deposit thaw → player additionally wins 10, the player balance becomes 20 → performs the second transaction freeze 10 → player win → deposit thaw → player additionally wins 10, the player balance becomes 30.
It is easy to deduce that the player's balance has changed to 40 credits, or virtual currency, after the three transactions have been performed.
2. Condition of transfusion
The first transaction freezes 10 credits of the player, or virtual currency → player input → deposit transfer to the prize pool, the player balance becomes 0 → execution of the second transaction freezes 10, or virtual currency, insufficient balance failure → the third transaction also fails.
It can be seen that if the player loses only one stroke and the player wins more strokes, the player can use the asymmetric losing and winning condition to carry out arbitrage, thus breaking the principle of fair and fair game.
Disclosure of Invention
1. Technical problem to be solved by the invention
To overcome the above technical problems, the present invention provides a method, apparatus and storage medium for ensuring fairness of games so that games can be fairly played.
2. Technical scheme
In order to solve the problems, the technical scheme provided by the invention is as follows:
in a first aspect, the present invention provides a method for ensuring game fairness, applicable to a player terminal, comprising: sending at least one first game participation transaction to the first game contract after the opening; receiving a game result of the first game participation transaction fed back by a first game contract according to game rules; wherein, the first game participation transaction comprises the constitution of guess content and deposit; a first game contract for receiving at least one first game participation transaction of at least one player; sending at least one game result of the first game participation transaction fed back by the first game contract according to the game rule to at least one player; at least one wager of the first game participation transaction is deducted from at least one player address initial balance of the first game contract after the opening and frozen.
In a further improvement, the at least one wager on first game participation in the transaction is deducted from an initial balance of at least one player address in the first game contract after the opening and frozen, the further improvement comprising: the first game contract reads the initial balance of the player address of at least one player and caches the initial balance into the local player cache balance of the first game contract; at least one deposit for the first game to participate in the transaction is frozen from the local player cache balance.
In a further improvement, the at least one wager on first game participation in the transaction is deducted from an initial balance of at least one player address in the first game contract after the opening and frozen, the further improvement comprising: the deposit for each first game participation transaction is frozen from the player's address balance prior to sending at least one first game participation transaction to the opened first game contract.
Further improvement, comprising: receiving confirmation information of at least one first game participation transaction of the at least one player fed back by the first game contract; checking whether the confirmation information is correct or not; if not, ending; if yes, receiving a game result of the first game participation transaction of the at least one player fed back by the first game contract; wherein the first game contract is further configured to: sending confirmation information of at least one first game participation transaction of the at least one player; receiving a message for checking whether the confirmation information is correct or not; if not, ending; if yes, the game result of at least one first game participation transaction of the at least one player fed back by the first game contract according to the game rule is sent.
In a further refinement, the game rules are configured to deduct and freeze a wager for first game participation in the transaction from at least one initial player address balance for the first game contract after the opening; if the player cache balance is insufficient, the first game participation transaction of the corresponding at least one player fails to be executed; and if the player cache balance is sufficient, the corresponding first game participation transaction is successfully executed.
In a further refinement, the game outcome is used to distribute a game award.
Further improvement, comprising: and freezing at least one deposit of the first game participation transaction of at least one player from the local player cache balance, and if the local player cache balance is insufficient, executing failure of the corresponding first game participation transaction.
In a further refinement, the acknowledgement information comprises: the first game of at least one player participates in the competition content of the transaction, the deposit and the result of whether the deposit is frozen or not, the address balance of the player and the cache balance of the local player.
In a second aspect, the present invention provides a method for ensuring game fairness, which is applied to a blockchain node, and includes: the opened first game contract receives at least one first game participation transaction of at least one player; sending at least one game result of the first game participation transaction fed back by the first game contract according to the game rule to at least one player; wherein, the first game participation transaction comprises the constitution of guess content and deposit; the player receiving at least one first game participation transaction of at least one player to the opened first game contract; receiving at least one game result of the first game participation transaction fed back by the first game contract according to the game rule; at least one wager of the first game participation transaction is deducted from at least one player address initial balance of the first game contract after the opening and frozen.
In a further improvement, the at least one wager on first game participation in the transaction is deducted from an initial balance of at least one player address in the first game contract after the opening and frozen, the further improvement comprising: the first game contract reads the initial balance of the player address of at least one player and caches the initial balance into the local player cache balance of the first game contract; at least one deposit for the first game to participate in the transaction is frozen from the local player cache balance.
In a further improvement, the at least one wager on first game participation in the transaction is deducted from an initial balance of at least one player address in the first game contract after the opening and frozen, the further improvement comprising: the wagers for each first game play session are frozen from the player's address balance prior to the first game contract being opened receiving at least one first game play session for at least one player.
Further improvement, comprising: the first game contract sends feedback confirmation information of at least one first game participation transaction of the at least one player to the player; receiving a message that the player checks whether the confirmation information is correct or not; if not, ending; if yes, sending a game result of the first game participation transaction of the at least one player fed back by the first game contract to the player; wherein the player receives confirmation of at least one first game participation transaction of the at least one player; checking whether the confirmation information is correct or not; if not, ending; if yes, receiving at least one game result of the first game participation transaction of the at least one player fed back by the first game contract according to the game rule.
In a further refinement, the game rules are configured to deduct and freeze a wager for first game participation in the transaction from at least one initial player address balance for the first game contract after the opening; if the player cache balance is insufficient, the first game participation transaction of the corresponding at least one player fails to be executed; and if the player cache balance is sufficient, the corresponding first game participation transaction is successfully executed.
In a further refinement, the game outcome is used to distribute a game award.
Further improvement, comprising: and freezing at least one deposit of the first game participation transaction of at least one player from the local player cache balance, and if the local player cache balance is insufficient, executing failure of the corresponding first game participation transaction.
In a further refinement, the acknowledgement information comprises: the first game of at least one player participates in the competition content of the transaction, the deposit and the result of whether the deposit is frozen or not, the address balance of the player and the cache balance of the local player.
In a third aspect, the present invention provides an apparatus comprising: one or more processors; memory for storing one or more programs that, when executed by the one or more processors, cause the one or more processors to perform a method as described above.
In a fourth aspect, the invention provides a storage medium storing a computer program which, when executed by a processor, performs a method as claimed in any one of the preceding claims.
3. Advantageous effects
Compared with the prior art, the technical scheme provided by the invention has the following beneficial effects:
the invention ensures that the game balance of the player can be updated in time, and simultaneously avoids the situation that the player uses the winning money of the previous transaction as the deposit of the next transaction, thereby realizing the win-loss unequal arbitrage. The problem that the player uses the execution mechanism of the block chain to carry out arbitrage is solved, and the win-win balance is ensured, so that the game can be carried out fairly.
The invention provides a mechanism for preventing the arbitrage of the users, the participation times of the users in the same block do not need to be limited, the settlement can be carried out in time after each transaction is executed, the efficiency is ensured, and the arbitrage of the players is prevented.
Drawings
Fig. 1 is a flowchart of a method for ensuring game fairness according to embodiment 1 of the present invention.
Fig. 2 is a flowchart of a method for ensuring game fairness according to the first preferred embodiment of fig. 2.
Fig. 3 is a flowchart of a method for ensuring game fairness according to the second preferred embodiment of fig. 2.
Fig. 4 is a flowchart of a method for ensuring game fairness according to embodiment 2 of the present invention.
FIG. 5 is a schematic diagram of an apparatus according to the present invention.
Fig. 6 is a flowchart of a method for ensuring game fairness according to the first preferred embodiment of fig. 4.
Fig. 7 is a flowchart of a method for ensuring game fairness according to the second preferred embodiment of fig. 4.
Detailed Description
For a further understanding of the present invention, reference will now be made in detail to the embodiments illustrated in the drawings.
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings.
The terms first, second, and the like in the present invention are provided for convenience of describing the technical solution of the present invention, and have no specific limiting effect, but are all generic terms, and do not limit the technical solution of the present invention.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Example 1
A method for ensuring game fairness, which is applied to a player terminal, as shown in fig. 1, comprising:
s101, sending at least one first game participation transaction to a first game contract after opening;
s102, receiving a game result of the first game participation transaction fed back by a first game contract according to a game rule;
wherein the opened first game contract is used for receiving at least one first game participation transaction of at least one player; and sending the game result of the at least one first game participation transaction fed back by the first game contract according to the game rule to at least one player. At least one deposit for the first game participation transaction is deducted from at least one initial balance of the player address of the first game contract after the opening and is frozen, and the part of the content can be realized when the player establishes the first game participation transaction or after the first game contract receives the first game participation transaction; for the situation that the player is realized when the first game participation transaction is established, after the first game contract receives the first game participation transaction, rechecking verification is carried out according to the initial balance of the address of the player, the number and the deposit of the first game participation transaction, whether each first game participation transaction can be successfully executed or not is ensured, and the establishment legal compliance of the first game participation transaction is ensured, so that the fairness and justice of the game are realized by utilizing the decentralized characteristic of the block chain, and the cheating of the player is prevented. The first game participation transaction comprises but is not limited to the constitution of guess content and deposit; further, the creation time of the first game participation transaction, the transaction transceiving address (corresponding to the first game contract address and the player address), and the like are also included. The final execution result of the first game participation transaction is divided into two categories: win or lose. Therefore, for the first game contract after opening, the player may issue one or more first game participation transactions with the same guess content; or a first game with different guess contents is sent to participate in the transaction; these are all choices of specific application scenarios of the embodiment, and do not limit the technical solution of the embodiment.
It should be noted that the first game contract after opening may allow one or more players to participate, and each participating player may send one or more first game participation transactions in a game; however, this embodiment only illustrates the case where one player participates in the first game contract after the opening, and other players are similar.
Deducting and freezing a deposit for the first game to participate in the transaction from at least one initial balance of the player address of the first game contract after the game is opened, and preventing the player from using the won reward in the game as the deposit and repeatedly carrying out the action of arbitrage by the way of freezing the deposit; ensuring the fairness principle of the game. The initial balance of the player address refers to a balance of a transaction sending address where a first game contract receives a first game from the same player to participate in a transaction, wherein the transaction sending address is the player address, and the first game contract directly reads latest state information corresponding to the player address in the mulck state number of the block chain system through the player address, namely the initial balance of the player address is included.
The game rules include deposit freeze rules, prize allocation rules, default rules, rules for calculating game results, and the like. Thus, a wager for deducting and freezing a first game participation transaction from at least one player address initial balance of the first game contract after the opening;
if the initial balance of the address of the player is insufficient, the situation that the deposit on the address of the player is insufficient and the player cannot participate in the game is indicated, all the first game participation transactions of the corresponding player fail to be executed, and the situation that the first game participation transactions correspondingly fail to be established locally at the terminal of the player is indicated; the following may also occur: if the deposit is 5 and the initial balance of the player address is 10, the player creates 3 first game participation transactions, the first two first game participation transactions are successfully created and executed, but the 3 rd first game participation transaction is failed to be created and executed, and the initial balance of the player address is only enough for the first two first game participation transactions to be deducted and the deposit is frozen, so the third first game participation transaction is insufficient in balance and is unsuccessfully deducted, the creation is failed and the execution is failed. If the initial balance of the player address is sufficient, the corresponding first game participation transaction is successfully established. And the game result is used for distributing game rewards according to reward distribution rules.
In a further improvement wherein a wager of said at least one first game participation transaction is deducted from an initial balance of at least one player address of a first game contract after an opening and frozen, the improvement comprising:
the first game contract reads the initial balance of the player address of at least one player and caches the initial balance into the local player cache balance of the first game contract;
at least one deposit for the first game to participate in the transaction is frozen from the local player cache balance. And if the balance of the local player cache is insufficient, the corresponding first game participation transaction fails to be executed.
For example, the game rules of the first game contract are: the game deposit is 10, and the reward rule is that if the game is won, the game deposit is unfrozen and 10 is rewarded; if lost, deduct deposit 10.
If the initial balance of the address of the player a is 20, the player a creates 3 first game participation transactions, and after the first game contract after the opening receives the 3 first game participation transactions sent by the player a, in step S102, the initial balance of the address of the player a is cached in the cache balance of the player a of the local game contract by the first game contract after the opening, and at this time, the cache balance of the player a of the local game is 20.
According to the game rules of the first game contract, executing the first game participation transaction of the player A, deducting and freezing 10 from the cache balance of the player A in the local game, and simultaneously deducting and freezing 10 from the address balance of the player A; a deposit 10 that is a first game participation transaction for player A; at this time, the player a of the local office has a cache balance of 10 and an address balance of 10.
The execution result of the first game participation transaction is divided into the following two types:
a1-1) if the first game participation transaction is judged to be winning and the deposit is unfrozen, the address balance of the player A is 30; player A of the local office caches the balance as 10;
a1-2) if the first game participation transaction is judged as input and the deposit is deducted, the address balance of the player A is 10; player a of this office caches the balance as 10.
Executing a second game participation transaction of the player A, deducting and freezing 10 from the cache balance of the player A in the local office, and simultaneously deducting and freezing 10 from the address balance of the player A; a deposit 10 that is a first game participation transaction for player A; at this time, the process of the present invention,
the second game is divided into 2 cases after the first game participates in the transaction deposit and is frozen:
a2-1) if the result A1-1) is executed according to the first game participation transaction, the address balance of the player A is 20; the player A of the local office caches the balance as 0;
a2-2) if the result A1-2) is executed according to the first game participation transaction, the address balance of the player A is 0; the player A of the local office caches the balance as 0;
the execution result of the second game participation transaction is divided into the following four types:
a2-1-1) for A2-1), if the second game participation transaction is judged to be winning and the deposit is unfrozen, the address balance of the player A is 40; player a in this office buffers the balance as 0.
A2-1-2) for A2-1), if the second game participation transaction is judged as input and the deposit is deducted, the address balance of the player A is 20; player a in this office buffers the balance as 0.
A2-2-1) for A2-2), if the second game participation transaction is judged to be winning and the deposit is unfrozen, the address balance of the player A is 20; player a in this office buffers the balance as 0.
A2-2-2) for A2-2), if the second game participation transaction is judged as input and the deposit is deducted, the address balance of the player A is 0; player a in this office buffers the balance as 0.
And executing the third game participation transaction of the player A, deducting and freezing 10 from the cache balance of the player A in the local game, and knowing that the cache balance of the player A in the local game is 0 according to the execution conditions of the first game participation transaction and the second game participation transaction, the deduction and freezing of the deposit are failed, and the third game participation transaction is error. The three first game participation transactions are defined according to the game rules of the first game contract, and the prizes won in the same game are prevented from being repeatedly used as the deposit to obtain the profit; to ensure fairness of play. The execution conditions of the three first game participation transactions are sent to the player terminal by the first game contract, and the player terminal receives the game result of the first game participation transaction fed back by the first game contract according to the game rule.
As shown in Table 2, for example, the initial balance 30 of the game address issues 3 first games to participate in the transaction, and the deposit is deducted in advance.
TABLE 2 table display of win-loss symmetry in this example
Figure RE-GDA0002283853380000091
Figure RE-GDA0002283853380000101
In a second improvement wherein said at least one wager on first game participation in the transaction is deducted from an initial balance of at least one player address in the first game contract after the opening and frozen, the further improvement comprising:
before at least one first game participation transaction is sent to the first game contract after opening, namely before step S101, the deposit of each first game participation transaction is frozen from the initial balance of the player address. As shown in fig. 2: in the method for ensuring game fairness, the improvement comprising:
s201, freezing a deposit for each first game participating in the transaction from the initial balance of the player address;
s202, at least one first game participation transaction is sent to the first game contract after opening;
s203, receiving a game result of the first game participation transaction fed back by the first game contract according to the game rule.
For example, the game rules of the first game contract are: the game deposit is 10, and the reward rule is that if the game is won, the game deposit is unfrozen and 10 is rewarded; if lost, deduct deposit 10.
If player a has an initial balance of 20, player a would like to create 3 first game contracts after the first game participation transaction is initiated.
And the player A creates a first game participation transaction, deducts from the address balance of the player A and freezes 10, so that the address balance of the player A becomes 10, and the first game participation transaction is successfully created.
And the player A creates a second first game participation transaction, deducts from the address balance of the player A and freezes 10, so that the address balance of the player A becomes 0, and the second first game participation transaction is successfully created.
And (3) the player A creates a third game participation transaction, deducts and freezes 10 from the address balance of the player A, and if deduction fails because the address balance of the player A is 0, the third game participation transaction fails to be created.
The three first game participation transactions are established at the player terminal according to the game rules of the first game contract, and the prizes won in the same game are prevented from being repeatedly used as the deposit, so that the prizes are benefited; to ensure fairness of play.
A method for ensuring game fairness of the present embodiment further includes: receiving confirmation information of at least one first game participation transaction of the at least one player fed back by the first game contract;
checking whether the confirmation information is correct or not; if not, ending; if yes, receiving a game result of the first game participation transaction of the at least one player fed back by the first game contract;
wherein the first game contract is further configured to:
sending confirmation information of at least one first game participation transaction of the at least one player;
receiving a message for checking whether the confirmation information is correct or not; if not, ending; if yes, the game result of at least one first game participation transaction of the at least one player fed back by the first game contract according to the game rule is sent. The confirmation information comprises: the method comprises the steps that the first game of at least one player participates in the guessing content of the transaction, the deposit and the result of whether the deposit is frozen successfully or not, and the address balance of the player; when the deposit deduction method adopts the improved one, the method also comprises that the local player caches the balance.
As shown in fig. 3: in the method for ensuring game fairness, the improvement comprising:
s301, at least one first game participation transaction is sent to the first game contract after opening;
s302, receiving confirmation information of at least one first game participation transaction of the at least one player fed back by the first game contract;
s303, checking whether the confirmation information is correct or not; if not, ending; if so, the game outcome of the first game participation transaction of the at least one player is received as feedback from the first game contract.
Example 2
A method for ensuring game fairness, applicable to a blockchain node, as shown in fig. 4, comprising:
s401, receiving at least one first game participation transaction of at least one player by the first game contract after opening;
s402, sending at least one game result of the first game participation transaction fed back by the first game contract according to the game rule to at least one player; the game outcome is used to distribute a game award.
Wherein the first game participation transaction comprises: guessing the content, deposit and player address balance;
at least one wager of the first game participation transaction is deducted from at least one player address initial balance of the first game contract after the opening and frozen.
In which at least one wager of first game participation in a transaction is deducted from and frozen in at least one initial player address balance of a first game contract after an opening, a further improvement comprising:
the first game contract reads the initial balance of the player address of at least one player and caches the initial balance into the local player cache balance of the first game contract;
at least one deposit for the first game to participate in the transaction is frozen from the local player cache balance. And freezing at least one deposit of the first game participation transaction of at least one player from the local player cache balance, and if the local player cache balance is insufficient, reporting an error in the corresponding first game participation transaction. Then, a method for ensuring game fairness, as shown in fig. 6, is improved by:
s601, receiving at least one first game participation transaction of at least one player by the first game contract after opening;
s602, reading the initial balance of the player address of at least one player by the first game contract after opening and caching the initial balance into the cache balance of the player of the game of the first game contract;
s603, sending at least one game result of the first game participation transaction fed back by the first game contract according to the game rule to at least one player; the game outcome is used to distribute a game award.
In which at least one wager of first game participation in a transaction is deducted from and frozen in at least one initial player address balance of a first game contract after an opening, a further improvement comprising:
the deposit of each first game participation transaction is frozen from the player's address balance before the first game contract after the opening receives at least one first game participation transaction of at least one player.
The first game contract feeds back the corresponding at least one piece of confirmation information of the first game participation transaction to at least one player;
receiving a message that the player checks whether the confirmation information is correct or not; if not, ending; if yes, at least one game result of the first game participation transaction fed back by the first game contract according to the game rule is sent to at least one player;
wherein, the player receives at least one piece of confirmation information of the first game participation transaction;
checking whether the confirmation information is correct or not; if not, ending; if yes, receiving at least one game result of the first game participation transaction fed back by the first game contract according to the game rule.
The game rules are used for deducting and freezing a deposit of the first game participation transaction from at least one initial balance of the player address of the first game contract after the game is opened;
if the player cache balance is insufficient, the first game participation transaction of the corresponding at least one player fails to be executed;
and if the player cache balance is sufficient, the corresponding first game participation transaction is successfully executed.
The confirmation information comprises: the contents of the guesses, the deposit and the result of the successful or unsuccessful freeze-up of the at least one player's first game participation transaction, and the player's address balance, and further possibly the local player's cache balance.
Then, a method for ensuring game fairness, as shown in fig. 7, is improved by:
s701, receiving at least one first game participation transaction of at least one player by the first game contract after opening;
s702, the first game contract feeds back the corresponding confirmation information of at least one first game participation transaction to at least one player;
s703, receiving a message that the player verifies whether the confirmation information is correct; if not, ending; if yes, at least one game result of the first game participation transaction fed back by the first game contract according to the game rule is sent to at least one player;
wherein, the player receives at least one piece of confirmation information of the first game participation transaction;
checking whether the confirmation information is correct or not; if not, ending; if yes, receiving at least one game result of the first game participation transaction fed back by the first game contract according to the game rule.
Object a may be an operator of the first game contract, or a publisher of the first game contract, or the like. Assuming that the address of the first game contract is set as a prize pool address, the prize pool address may also be an account address of the object a in the block chain system, after the first game contract is opened, the object a provides a part of the deposit as a prize pool, the deposit provided by the player is frozen, and if the player loses, the frozen deposit enters the prize pool; if the player wins, the deposit is returned and a corresponding prize is awarded from the prize pool according to the odds.
The odds are 1/winning rate, i.e. the lower the winning rate, the higher the odds; specific odds calculation should be balanced, and is only exemplary and not limiting. Taking the guessing digital game on the public Chain, Chain33, the random number may be 0-99, total 100, the player may guess the random number less than a certain number, for example, the guessing random number less than 25, the probability of the guessing pair is 25%, the odds ratio is 1:4, the loser deposit is deducted, and the winner takes the 4-fold deposit prize including the deposit. For the game of guessing the size, the odds are 1: and 2, the loser deposit is deducted, and the winner takes the 2-time deposit including the deposit for rewarding.
Example 3
Taking the example of a game on the Chain of Chain33, transactions that call the same executor (first game contract) in the same tile will share the same cache for the first game contract.
When the first transaction of each game is carried out, the balance of the address of the player is inquired from the local database and cached in the corresponding player cache balance of the first game contract. In the same game, the subsequent transaction of the same player reads the cache balance of the corresponding player each time, corresponding amount of deposit is deducted from the cache balance before each transaction is participated, and if the cache balance is insufficient, an error is directly reported.
For example, the game balance of the user address is 10, three transactions are continuously participated, each deposit is 10, and the execution steps are as follows:
1. processing a first transaction, initializing an actuator, reading a player address balance 10 from a database and caching the player address balance 10 into a player cache balance corresponding to a first game contract;
2. the deposit is 10, which needs to be deducted from the player's cache balance as a deposit, so the player's cache balance becomes 0;
3. the game may win or lose, and the player address becomes 20 or 0, but the player cache balance remains 0, not updated, by updating the blockchain database according to the outcome.
4. The second transaction is executed, reading the cached balance 0, and the deposit is 10, because the deposit is not enough for the transaction execution to fail.
It can be seen that, for each game, the address balance of the player is read from the local database only once for deducting the deposit, and the newly won coins of the user cannot be used as the deposit to participate in the game, so that the situation that the player utilizes the loophole to carry out arbitrage is avoided, and the fairness of the game is ensured.
Example 4
An apparatus, the apparatus comprising: one or more processors; memory for storing one or more programs that, when executed by the one or more processors, cause the one or more processors to perform a method as described above.
A storage medium storing a computer program which, when executed by a processor, implements the method as described in embodiment 1 above.
Fig. 5 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
As shown in fig. 5, as another aspect, the present application also provides an apparatus 500 including one or more Central Processing Units (CPUs) 501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM503, various programs and data necessary for the operation of the apparatus 500 are also stored. The CPU501, ROM502, and RAM503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
In particular, according to embodiments disclosed herein, the method described in any of the above embodiments may be implemented as a computer software program. For example, embodiments disclosed herein include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for performing the method described in any of the embodiments above. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511.
As yet another aspect, the present application also provides a computer-readable storage medium, which may be the computer-readable storage medium included in the apparatus of the above-described embodiment; or it may be a separate computer readable storage medium not incorporated into the device. The computer readable storage medium stores one or more programs for use by one or more processors in performing the methods described herein.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present application may be implemented by software or hardware. The described units or modules may also be provided in a processor, for example, each of the described units may be a software program provided in a computer or a mobile intelligent device, or may be a separately configured hardware device. Wherein the designation of a unit or module does not in some way constitute a limitation of the unit or module itself.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the present application. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (18)

1. A method for ensuring game fairness, adapted for a player terminal, comprising:
sending at least one first game participation transaction to the first game contract after the opening;
receiving a game result of the first game participation transaction fed back by a first game contract according to game rules;
wherein, the first game participation transaction comprises the constitution of guess content and deposit;
a first game contract for receiving at least one first game participation transaction of at least one player;
sending at least one game result of the first game participation transaction fed back by the first game contract according to the game rule to at least one player;
the at least one wager of the first game participation transaction is deducted from the at least one player address initial balance of the first game contract after the opening and frozen.
2. In a method according to claim 1, wherein the at least one wager on first game play participation in the transaction is deducted from and frozen in at least one initial player address balance of the first game contract after the opening, the further improvement comprising:
the first game contract reads the initial balance of the player address of at least one player and caches the initial balance into the local player cache balance of the first game contract;
at least one deposit for the first game to participate in the transaction is frozen from the local player cache balance.
3. In a method according to claim 1, wherein the at least one wager on first game play participation in the transaction is deducted from and frozen in at least one initial player address balance of the first game contract after the opening, the further improvement comprising:
the deposit for each first game participation transaction is frozen from the player's address balance prior to sending at least one first game participation transaction to the opened first game contract.
4. The method of claim 1, comprising:
receiving confirmation information of at least one first game participation transaction of the at least one player fed back by the first game contract;
checking whether the confirmation information is correct or not; if not, ending; if yes, receiving a game result of the first game participation transaction of the at least one player fed back by the first game contract;
wherein the first game contract is further configured to:
sending confirmation information of at least one first game participation transaction of the at least one player;
receiving a message for checking whether the confirmation information is correct or not; if not, ending; if yes, the game result of at least one first game participation transaction of the at least one player fed back by the first game contract according to the game rule is sent.
5. The method of claim 1, wherein:
the game rules include a deposit for deducting and freezing a first game participation transaction from at least one player address initial balance of a first game contract after opening;
if the player cache balance is insufficient, the first game participation transaction of the corresponding at least one player fails to be executed;
and if the player cache balance is sufficient, the corresponding first game participation transaction is successfully executed.
6. The method of claim 1, wherein: the game outcome is used to distribute a game award.
7. The method of claim 2, comprising: and freezing at least one deposit of the first game participation transaction of at least one player from the local player cache balance, and if the local player cache balance is insufficient, executing failure of the corresponding first game participation transaction.
8. The method of claim 4, wherein:
the confirmation information comprises: the first game of at least one player participates in the competition content of the transaction, the deposit and the result of whether the deposit is frozen or not, the address balance of the player and the cache balance of the local player.
9. A method for ensuring game fairness, adapted for a blockchain node, comprising:
the opened first game contract receives at least one first game participation transaction of at least one player;
sending at least one game result of the first game participation transaction fed back by the first game contract according to the game rule to at least one player;
wherein, the first game participation transaction comprises the constitution of guess content and deposit;
the player receiving at least one first game participation transaction of at least one player to the opened first game contract; receiving at least one game result of the first game participation transaction fed back by the first game contract according to the game rule;
a wager for a first game participation transaction is deducted from at least one player address initial balance of the first game contract after the opening and frozen.
10. In a method in accordance with claim 9, wherein the at least one wager on first game play participation in the transaction is deducted from and frozen in at least one initial player address balance of the first game contract after the opening, a further improvement comprising:
the first game contract reads the initial balance of the player address of at least one player and caches the initial balance into the local player cache balance of the first game contract;
at least one deposit for the first game to participate in the transaction is frozen from the local player cache balance.
11. In a method in accordance with claim 9, wherein the at least one wager on first game play participation in the transaction is deducted from and frozen in at least one initial player address balance of the first game contract after the opening, a further improvement comprising:
the wagers for each first game play session are frozen from the player's address balance prior to the first game contract being opened receiving at least one first game play session for at least one player.
12. The method of claim 9, comprising:
the first game contract sends feedback confirmation information of at least one first game participation transaction of the at least one player to the player;
receiving a message that the player checks whether the confirmation information is correct or not; if not, ending; if yes, sending a game result of the first game participation transaction of the at least one player fed back by the first game contract to the player;
wherein the player receives confirmation of at least one first game participation transaction of the at least one player; checking whether the confirmation information is correct or not; if not, ending; if yes, receiving at least one game result of the first game participation transaction of the at least one player fed back by the first game contract according to the game rule.
13. The method of claim 9, wherein:
the game rules include a deposit for deducting and freezing a first game participation transaction from at least one player address initial balance of a first game contract after opening;
if the player cache balance is insufficient, the first game participation transaction of the corresponding at least one player fails to be executed;
and if the player cache balance is sufficient, the corresponding first game participation transaction is successfully executed.
14. The method of claim 9, wherein: the game outcome is used to distribute a game award.
15. The method of claim 10, comprising: and freezing at least one deposit of the first game participation transaction of at least one player from the local player cache balance, and if the local player cache balance is insufficient, executing failure of the corresponding first game participation transaction.
16. The method of claim 12, wherein:
the confirmation information comprises: the first game of at least one player participates in the competition content of the transaction, the deposit and the result of whether the deposit is frozen or not, the address balance of the player and the cache balance of the local player.
17. An apparatus, characterized in that the apparatus comprises:
one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method recited in any of claims 1-16.
18. A storage medium storing a computer program, characterized in that the program, when executed by a processor, implements the method according to any one of claims 1-16.
CN201910731016.2A 2019-08-08 2019-08-08 Method, apparatus and storage medium for ensuring game fairness Pending CN110648472A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910731016.2A CN110648472A (en) 2019-08-08 2019-08-08 Method, apparatus and storage medium for ensuring game fairness

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910731016.2A CN110648472A (en) 2019-08-08 2019-08-08 Method, apparatus and storage medium for ensuring game fairness

Publications (1)

Publication Number Publication Date
CN110648472A true CN110648472A (en) 2020-01-03

Family

ID=68989989

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910731016.2A Pending CN110648472A (en) 2019-08-08 2019-08-08 Method, apparatus and storage medium for ensuring game fairness

Country Status (1)

Country Link
CN (1) CN110648472A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060019740A1 (en) * 2003-04-10 2006-01-26 David Schugar Wagering game with player banking of positive expectation situations
US20180102028A1 (en) * 2016-10-09 2018-04-12 Lena Ngoc Evans Multilevel buyin poker game
CN109126139A (en) * 2018-08-31 2019-01-04 杭州复杂美科技有限公司 A kind of guessing game processing method, equipment and storage medium
CN109345238A (en) * 2018-08-31 2019-02-15 杭州复杂美科技有限公司 A kind of card game method and system, equipment and storage medium
CN109389399A (en) * 2018-10-18 2019-02-26 深圳前海乐寻坊区块链科技有限公司 Lottery industry method, apparatus, computer equipment and storage medium based on block chain
CN109395394A (en) * 2018-09-29 2019-03-01 杭州复杂美科技有限公司 Predict guessing game dispositions method and method for gaming, equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060019740A1 (en) * 2003-04-10 2006-01-26 David Schugar Wagering game with player banking of positive expectation situations
US20180102028A1 (en) * 2016-10-09 2018-04-12 Lena Ngoc Evans Multilevel buyin poker game
CN109126139A (en) * 2018-08-31 2019-01-04 杭州复杂美科技有限公司 A kind of guessing game processing method, equipment and storage medium
CN109345238A (en) * 2018-08-31 2019-02-15 杭州复杂美科技有限公司 A kind of card game method and system, equipment and storage medium
CN109395394A (en) * 2018-09-29 2019-03-01 杭州复杂美科技有限公司 Predict guessing game dispositions method and method for gaming, equipment and storage medium
CN109389399A (en) * 2018-10-18 2019-02-26 深圳前海乐寻坊区块链科技有限公司 Lottery industry method, apparatus, computer equipment and storage medium based on block chain

Similar Documents

Publication Publication Date Title
US10373438B2 (en) System and method of revealing the outcomes of real world wagers based on a geolocation of a user
JP2023100946A (en) Cooperative gameplay in peer-to-peer wagering platform
CN112466063A (en) Peer-to-peer betting platform
CN110648447B (en) Game random number generation method, application, device, equipment and storage medium
CA3012038A1 (en) Autonomously operating computerized gaming platforms and method of operating thereof
CN110648472A (en) Method, apparatus and storage medium for ensuring game fairness
US20240038028A1 (en) System and method of revealing the outcomes of real world wagers using reserve wagering

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20200103

WD01 Invention patent application deemed withdrawn after publication