CN109481936B - Block chain accounting node selection method and device and computer readable storage medium - Google Patents

Block chain accounting node selection method and device and computer readable storage medium Download PDF

Info

Publication number
CN109481936B
CN109481936B CN201811259925.2A CN201811259925A CN109481936B CN 109481936 B CN109481936 B CN 109481936B CN 201811259925 A CN201811259925 A CN 201811259925A CN 109481936 B CN109481936 B CN 109481936B
Authority
CN
China
Prior art keywords
game
ranking
block
block chain
node
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.)
Active
Application number
CN201811259925.2A
Other languages
Chinese (zh)
Other versions
CN109481936A (en
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.)
MIGU Culture Technology Co Ltd
Original Assignee
MIGU Culture 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 MIGU Culture Technology Co Ltd filed Critical MIGU Culture Technology Co Ltd
Priority to CN201811259925.2A priority Critical patent/CN109481936B/en
Publication of CN109481936A publication Critical patent/CN109481936A/en
Application granted granted Critical
Publication of CN109481936B publication Critical patent/CN109481936B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/45Controlling the progress of the video game
    • A63F13/46Computing the game score
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/70Game security or game management aspects
    • A63F13/75Enforcing rules, e.g. detecting foul play or generating lists of cheating players
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/70Game security or game management aspects
    • A63F13/79Game security or game management aspects involving player-related data, e.g. identities, accounts, preferences or play histories
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/70Game security or game management aspects
    • A63F13/79Game security or game management aspects involving player-related data, e.g. identities, accounts, preferences or play histories
    • A63F13/792Game security or game management aspects involving player-related data, e.g. identities, accounts, preferences or play histories for payment purposes, e.g. monthly subscriptions
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/70Game security or game management aspects
    • A63F13/79Game security or game management aspects involving player-related data, e.g. identities, accounts, preferences or play histories
    • A63F13/798Game security or game management aspects involving player-related data, e.g. identities, accounts, preferences or play histories for assessing skills or for ranking players, e.g. for generating a hall of fame

Abstract

The invention discloses a block chain accounting node selection method, which comprises the following steps: the first block link point obtains the ranking of the current game score; the game result ranking is obtained after the game terminal corresponding to each block link point plays a game; broadcasting the game achievement ranking to at least one second blockchain node; receiving a check result returned by the second block link point; the verification result represents a result of verifying the received game score ranking by the second block link point; judging whether the game score ranking is effective or not based on each returned check result; when determined to be valid, an accounting node is determined from the plurality of blockchain nodes based on the game score ranking. The invention also discloses a block chain accounting node selection device and a computer readable storage medium.

Description

Block chain accounting node selection method and device and computer readable storage medium
Technical Field
The present invention relates to the field of block chain technologies, and in particular, to a method and an apparatus for selecting a block chain accounting node, and a computer-readable storage medium.
Background
At present, at least two consensus nodes are often deployed in a block chain network, and the block chain node for acquiring the accounting right is determined through a consensus algorithm, so that the accounting book is maintained by using the block chain link point for acquiring the accounting right. The consensus algorithm includes Proof of workload (PoW, Proof of Work), and the like.
However, for the PoW consensus algorithm, the higher the hardware configuration of the consensus node is, the maximum probability of calculating the random number is, that is, the greater the probability of being able to obtain the accounting right is, and in order to compete for the accounting right, the hardware configuration of each consensus node is configured to be higher and higher, so that when determining the block chain node that can obtain the accounting right, the problem of excessive hardware resource consumption is caused.
Disclosure of Invention
In view of the above, embodiments of the present invention are directed to a method, an apparatus, and a computer-readable storage medium for selecting a blockchain accounting node, which can determine the blockchain accounting node by consuming less hardware resources.
The technical scheme of the embodiment of the invention is realized as follows:
the embodiment of the invention provides a block chain accounting node selection method, which comprises the following steps:
the first block link point obtains the ranking of the current game score; the game result ranking is obtained after the game terminal corresponding to each block link point plays a game;
broadcasting the game achievement ranking to at least one second blockchain node;
receiving a check result returned by the second block link point; the verification result represents a result of verifying the received game score ranking by the second block link point;
judging whether the game score ranking is effective or not based on each returned check result; when determined to be valid, an accounting node is determined from the plurality of blockchain nodes based on the game score ranking.
In the foregoing solution, the determining whether the game result ranking is valid based on each returned verification result includes:
counting the number of verification results which represent passing of verification based on each returned verification result;
judging whether the number is greater than or equal to a preset threshold value;
determining that the game achievement ranking is valid when the number is determined to be greater than or equal to the preset threshold.
In the foregoing, when determining to be valid, determining a billing node from a plurality of blockchain nodes based on the game achievement ranking includes:
determining the block chain nodes of which the game score ranking meets a first preset condition from all the block chain nodes based on the game score ranking;
and taking the determined block link points as accounting nodes.
In the foregoing solution, when determining that the game score ranking is valid, determining a billing node from each blockchain node based on the game score ranking includes:
ranking the game achievements as input data of an intelligent contract; the rule script of the intelligent contract is the corresponding relation between the rank and the probability of a preset game score;
obtaining the identification of the block chain node based on the intelligent contract by utilizing the input data;
and taking the block link point corresponding to the obtained identification as an accounting node.
In the foregoing solution, the acquiring, by the first block link point, a current game result ranking of the user includes:
the first block chain node acquires the current game score ranking of the user from the game terminal; the game result ranking is sent to the game terminal by the game server.
In the foregoing solution, after determining the accounting node from each blockchain node, the method further includes:
the accounting node broadcasts the packed blocks to other block chain nodes;
receiving the verification results returned by the other block chain link points; the verification result represents the result of verifying the received block by the other block link points;
judging whether the verification result meets a second preset condition or not;
and when the second preset condition is met, adding the block into the block chain of the block.
In the foregoing solution, before the accounting node broadcasts the packed blocks to each blockchain node, the method further includes:
the accounting node acquires the unrecorded transaction;
judging whether the unrecorded transaction amount is larger than or equal to a preset threshold value or not;
and when the fact that the transaction is larger than or equal to the preset threshold value is determined, packaging the unrecorded transaction to obtain a block.
The embodiment of the invention provides a block chain accounting node selection device, which comprises:
the acquisition unit is used for acquiring the ranking of the current game score by the first block link point; the game result ranking is obtained after the game terminal corresponding to each block link point plays a game;
the broadcasting unit is used for broadcasting the game result ranking to at least one second block chain node;
the receiving unit is used for receiving the check result returned by the second block chain link point; the verification result represents a result of verifying the received game score ranking by the second block link point;
the determining unit is used for judging whether the game score ranking is effective or not based on each returned verification result; when determined to be valid, an accounting node is determined from the plurality of blockchain nodes based on the game score ranking.
An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the steps of any block chain accounting node selection method described above.
The embodiment of the invention provides a block chain accounting node selection device, which comprises: a memory, a processor, and a computer program stored on the memory and executable on the processor;
wherein the processor is configured to execute the steps of implementing any of the above block chain accounting node selection methods when running the computer program.
According to the block chain accounting node selection method, device and computer readable storage medium provided by the embodiment of the invention, a first block chain link point obtains a current game score ranking; the game result ranking is obtained after the game terminal corresponding to each block link point plays a game; broadcasting the game achievement ranking to at least one second blockchain node; receiving a check result returned by the second block link point; the verification result represents a result of verifying the received game score ranking by the second block link point; judging whether the game score ranking is effective or not based on each returned check result; when determined to be valid, an accounting node is determined from the plurality of blockchain nodes based on the game score ranking. In the embodiment of the invention, in the process of determining the accounting node, the game result ranking is only needed to be verified through each second block chain link point, when the game result ranking is effective, the accounting node is determined based on the effective game result ranking, obviously, the hardware configuration has no relation with the hardware configuration of each second block chain link point, so that the hardware resource can be saved, and the accounting node can be determined.
Drawings
FIG. 1 is a schematic diagram of a system architecture for implementing a block chain accounting node selection method according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of an implementation of a block chain accounting node selection method according to an embodiment of the present invention;
FIG. 3 is a first block chain accounting node selection apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a block chain accounting node selection device according to an embodiment of the present invention.
Detailed Description
In the related art, the block chain node for obtaining the accounting right may be determined by a consensus algorithm such as PoW, Proof of rights of arrival (PoS, Proof of stamp), and the like.
The problem of excessive consumption of hardware resources exists when the PoW consensus algorithm is used for executing consensus, specifically: the higher the hardware configuration of the consensus node is, the maximum probability of calculating the random number is, that is, the higher the probability of being able to obtain the accounting right is, and in order to compete for the accounting right, the hardware configuration of each consensus node is configured to be higher and higher. The fairness problem exists when using PoS consensus algorithm to execute consensus, which is specifically: the more the assets of the consensus nodes are distributed, the higher the probability of obtaining the accounting weight is, in other words, the less the assets of the consensus nodes are distributed, the lower the probability of obtaining the accounting weight is, and obviously, the fairness problem exists in determining the block link points for obtaining the accounting weight according to the quantity of the assets.
Based on this, in the embodiment of the invention, the first block link point obtains the ranking of the current game achievement; the game result ranking is obtained after the game terminal corresponding to each block link point plays a game; broadcasting the game achievement ranking to at least one second blockchain node; receiving a check result returned by the second block link point; the verification result represents a result of verifying the received game score ranking by the second block link point; judging whether the game score ranking is effective or not based on each returned check result; when determined to be valid, an accounting node is determined from the plurality of blockchain nodes based on the game score ranking.
Before further detailed description of the embodiments of the present invention, terms and expressions mentioned in the embodiments of the present invention are explained, and the terms and expressions mentioned in the embodiments of the present invention are applied to the following explanations.
1) Transactions (transactions), equivalent to the computer term "Transaction," does not refer solely to transactions in the business context, and embodiments of the present invention follow this convention in view of the convention in blockchain technology that colloquially uses the term "Transaction. In a blockchain network employing an account-based model, transactions include three different transaction types: deployment (deployment), invocation (Invoke) and Query (Query). The deployment transaction is used for installing a specified chain code to a node of the blockchain network, and the call and query type transaction is used for calling the chain code of the deployment number so as to realize the operation of relevant data of a target account in the ledger, wherein the operation of adding, deleting, checking and changing modifies the data in the form of Key-Value pairs in the account, or adds a new account in the ledger.
2) A Block (Block) recording a data structure of the ledger data updated by the exchange within a period of time, marked with a timestamp and a unique mark (e.g. a digital fingerprint) of a previous Block, and after the Block is subjected to consensus verification by nodes in the Block chain network, the Block is appended to the end of the Block chain to become a new Block.
3) A chain of blocks (Blockchain), a chain of data structures in which blocks are assembled in a sequentially contiguous manner, each block having a hash value of a previous block or a subset thereof referenced therein, to cryptographically secure the recorded transaction against tampering and forgery.
4) A blockchain network incorporates new blocks into a set of centerless nodes of the blockchain in a consensus manner.
5) The account book (Legger) is the sum of data recorded by taking an account as a dimension in a block chain network, and comprises the elements of the account book data, the state of the account book, the state certification of the account book, a block index and the like.
6) The ledger data, the actual block data storage, i.e. the record of a series of ordered and non-falsifiable transactions recorded in the block chain, may be expressed in the form of a file system, and the update of the data in the account/account is realized when an intelligent contract called in the transaction is executed.
7) The ledger state, also referred to as state data, i.e. the state of the ledger data, may be in the form of key-value pairs in the database terminal, where the real-time ledger state is used to represent the latest record of key-value pairs updated by the agreed-upon exchange and the historical ledger state is used to represent the historical record of key-value pairs.
8) Presence attestation is attestation of authenticity of presence of the account data implemented in cryptographic manner, such as attestation of the way the account data computes a merkel (Merkle) tree.
9) Consensus (Consensus), a process in a blockchain network, is used to agree on transaction results among multiple nodes involved, and the mechanisms for achieving Consensus include PoW, PoS, certificate of authority (DPoS), certificate of Elapsed Time (PoET), and so on.
10) Intelligent Contracts (Smart Contracts), also called chain codes (chaincodes), are deployed in the blockchain network, and trigger the execution of programs according to conditions, and are used for operating the ledger through query, addition and modification so as to realize query or update of the ledger.
Before the technical solution of the embodiment of the present invention is explained in detail, a system architecture applied to the block chain accounting node method of the embodiment of the present invention is briefly explained.
Fig. 1 is a schematic diagram of a system architecture applied to a block chain accounting node selection method according to an embodiment of the present invention, where a plurality of block chain nodes may exist in a block chain network applied to an embodiment of the present invention, and fig. 1 illustrates 4 block chain nodes as an example, as shown in fig. 1, the system includes a block chain accounting system formed from a block chain node 101 to a block chain link point 104, a game terminal and a game server corresponding to the block chain node 101, a game terminal (not shown in fig. 1) corresponding to the block chain node 102, a game terminal (not shown in fig. 1) corresponding to the block chain node 103, and a game terminal (not shown in fig. 1) corresponding to the block chain node 104. The blockchain node 101 may be another terminal different from the game terminal, or may be the game terminal, and the game server may provide services for each game terminal.
Here, the specific process of building the system architecture may include the following steps:
step 1, building a block chain accounting system.
Specifically, at least two block chain nodes are deployed in a function peer-to-peer manner between different service bodies participating in a service to construct a block chain network; wherein, the block link point may be a client.
And 2, building a terminal system formed by the block chain link points and the game terminal.
Specifically, one blockchain node may correspond to one game terminal; the blockchain node may be another terminal different from the game terminal; or the game terminal.
And step 3, building a game system.
Specifically, one game server is deployed for a plurality of game terminals.
The built game server can be used for building game scenes, and the type of the game can be a game which cannot improve the game score by means of stacking computing power, but a game which determines the win or loss ranking by means of subjective behaviors of people, such as Virtual Reality (VR) racing games, archery masters, shadowless lamps and the like; the established game terminal can be used for a user to access a VR game, and the consensus node on the block chain network is initiated through the corresponding block chain link to carry out consensus on the game score ranking, so that the accounting node is determined; the established block chain accounting system can account for the generated transaction through the determined accounting node.
The implementation of the embodiments of the present invention will be described in detail below with reference to the attached drawings, which are provided for illustration purposes only and are not intended to limit the invention.
As shown in fig. 2, a detailed description is given of a block chain accounting node selection method according to an embodiment of the present invention, where the method of the embodiment is applied to a terminal side, and includes the following steps:
step 201: the first block link point obtains a current game achievement ranking. And the game result ranking is obtained after the game terminal corresponding to each block link point plays the game.
The current game achievement ranking can be the game achievement ranking generated by the game played after triggering one-time consensus; or may refer to a game achievement ranking that occurs during the time interval between two consensus.
After the system architecture is built, in an embodiment, the acquiring, by the first tile link point, a current game achievement ranking of the user includes: the first block chain node acquires the current game score ranking of the user from the game terminal; the game result ranking is sent to the game terminal by the game server.
The process of the game server determining the game achievement ranking may include the following two cases:
in the first case, when the transaction number recorded by any one of the block link points in the block chain network reaches one block, the game is triggered to start, that is, after the consensus is triggered, the game terminal users corresponding to the block link points start the game, and after the game is finished, the game server obtains the current game score ranking.
In the second case, after the last consensus, the game terminal user corresponding to each block link point starts playing, and when the transaction number recorded by any one block link point reaches one block, namely the consensus is triggered again, the game server obtains the current game score ranking.
Taking the system architecture shown in fig. 1 as an example, a process of obtaining a ranking of a current game achievement is described in detail, where the first block link point may specifically be the block link point 101 in fig. 1, and the process may specifically include:
before the consensus is triggered, after any block chain link point in the block chain accounting system generates a transaction, the corresponding block chain link point can broadcast the generated transaction to other block chain nodes, and meanwhile, original transaction information of an account book which is not recorded in the broadcast is acquired; acquiring an address of a payer, such as a public key address, based on the acquired original transaction information; and calculating whether the balance of the payer is enough to pay the transaction, if so, verifying the signature of each transaction to determine the authenticity of the transaction; when the number of transactions passing the verification reaches one block, the transactions can be packed to obtain a new packed block.
When the transaction quantity recorded by any block chain node in the block chain network reaches one block, triggering one consensus.
After the consensus is triggered, the game terminal users corresponding to the link points of each block can start the game; or, after the last consensus is finished, the game terminal user game corresponding to each block link point is started.
After the game starts, the corresponding block link points can send notification messages to the game server; the notification message is used for indicating the game server to send a preset game and game starting time to each game terminal; after receiving the notification message, the game server sends a preset game and game starting time to each game terminal; when the game starting time displayed on the display interfaces of the game terminals reaches, the corresponding users can participate in the preset game. The preset game can be VR racing game, Bow and arrow master and the like, and after the game is finished, the ranking of the current game achievements is generated.
And after the common identification is triggered again, the game server acquires and stores the game score ranking of each game terminal user. Specifically, when the preset game is a VR racing game and a terminal position is set in a VR racing game scene, the server may determine the game score ranking of each game terminal user in the sequence of reaching the terminal position; or counting the game duration of each game terminal user, and determining the game score ranking of each game terminal user according to the game duration. Here, the game server may determine and store the game result ranking rather than storing the game result ranking on the game terminal, thereby avoiding the occurrence of a game result user tampering with the game result.
After determining the game result ranking, the game server may send the game result ranking to the game terminal of the corresponding blockchain node 101; the game terminal corresponding to the blockchain node 101 may send the game result ranking to the blockchain node 101.
Step 202: broadcasting the game achievement ranking to at least one second blockchain node.
In order for the at least one second block link point to verify the game achievement ranking, the first block link point may broadcast the game achievement ranking to the at least one second block chain node.
The game achievement ranking may be synchronously recorded after the at least one second tile link point receives the game achievement ranking. Here, after the at least one second block link point synchronously records the game result ranking, the game result ranking is verified, the verification result is broadcast over the whole network, and the game result ranking cannot be tampered by each second block link point, so that the accuracy and fairness of consensus verification can be ensured.
Step 203: receiving a check result returned by the second block link point; and the verification result represents a result of verifying the received game result ranking by the second block link point.
Here, the at least one second block link point respectively verifies the received game result ranking, and the received game result ranking may be automatically compared by the at least one second block link point according to the game result recorded by the at least one second block link point, so as to complete verification and confirmation of the game result ranking.
Here, by commonly recognizing the game result ranking through the at least one second block link point, only the game result ranking needs to be compared, so that high hardware resources do not need to be configured for the at least one second block link point, and therefore, the hardware resources can be saved.
Step 204: judging whether the game score ranking is effective or not based on each returned check result; when determined to be valid, an accounting node is determined from the plurality of blockchain nodes based on the game score ranking.
When the first tile link point determines whether the game result ranking is valid, in an embodiment, the determining whether the game result ranking is valid based on each returned verification result includes: counting the number of verification results which represent passing of verification based on each returned verification result; judging whether the number is greater than or equal to a preset threshold value; determining that the game achievement ranking is valid when the number is determined to be greater than or equal to the preset threshold.
For example, the first block link point counts the total number of returned verification results and the number of verification results representing passing of verification; calculating the product of the total amount and a preset proportion to obtain the preset threshold; judging whether the number is greater than or equal to the preset threshold value; determining that the game achievement ranking is valid when the number is determined to be greater than or equal to the preset threshold. Wherein, the preset proportion can be 50%.
Here, the first block link point broadcasts the game result ranking of each round to each second block link node, and when more than 50% of the second block link points confirm that the game result ranking is valid, consensus is achieved, thereby preventing game terminal users from tampering with the game result, and effectively preventing cheating in games.
After the game achievement ranking is judged to be valid, an accounting node can be determined from the blockchain nodes according to the game achievement ranking. The method specifically comprises the following two conditions:
in the first case, the block link points with the game achievements ranked meeting the first preset condition are used as the accounting nodes.
In the second case, the accounting node is determined by utilizing the corresponding relation between the game result ranking and the probability.
When determining a billing node based on the first preset condition, in an embodiment, the determining a billing node from each blockchain node based on the game score ranking includes: determining the block chain nodes of which the game score ranking meets a first preset condition from all the block chain nodes based on the game score ranking; and taking the determined block link points as accounting nodes.
The block link point meeting the first preset condition may be a block link point corresponding to a game terminal user with a first game result rank. That is, the accounting right can be obtained by the block link point corresponding to the game champion and used as the accounting node. Here, the block link points corresponding to the game champions can acquire the accounting right, so that the potential of each game terminal user participating in the game can be stimulated, and the enthusiasm of each game terminal user participating in the game can be improved.
When determining a billing node by using the corresponding relationship between the game result ranking and the probability, in an embodiment, the determining a billing node from each blockchain node based on the game result ranking includes: ranking the game achievements as input data of an intelligent contract; the rule script of the intelligent contract is the corresponding relation between the rank and the probability of a preset game score; obtaining the identification of the block chain node based on the intelligent contract by utilizing the input data; and taking the block link point corresponding to the obtained identification as an accounting node.
The intelligent contract may refer to a program which is deployed in a blockchain network and is triggered to execute according to the corresponding relation between the game achievement rank and the probability.
Before executing the intelligent contract, a corresponding relationship between the game result ranking and the probability may be established in advance, and specifically, the corresponding relationship may be: if the game achievement ranking is the first name, the set probability can be 10%, and the probability for representing that the corresponding block link point is taken as the output node is 10%; if the game score is ranked as the second name, the set probability can be 8%, and the probability for representing that the corresponding block link point is taken as the output node is 8%; if the game score is ranked as the first name, the set probability can be 6%, and the probability for representing that the corresponding block link point is taken as the output node is 6%; and so on, and will not be described herein.
An intelligent contract component may also be deployed on the first block link point prior to executing the intelligent contract determination output block link point. When a preset condition is triggered, namely the game score ranking is determined to be effective, executing the intelligent contract through the intelligent contract component to obtain an output block link point; and returning the outputted block link point to the first block link node by the intelligent contract component.
Here, the block link point corresponding to the game terminal user with the low game result ranking has the possibility of obtaining the accounting right, because the probability of obtaining the accounting right is determined through the game result ranking, and the block link node for obtaining the accounting right is determined based on the intelligent contract. Obviously, the enthusiasm of the player with poor game level can be improved, meanwhile, the problem that the player who overloads the top of the ranking list of the game achievements for a long time continuously obtains the accounting right is avoided, and more players can be attracted.
The accounting node determined based on the first preset condition and the intelligent contract can acquire the accounting right for accounting the transaction.
After determining the billing node, in an embodiment, the method further comprises: the accounting node broadcasts the packed blocks to other block chain nodes; the block is used for verifying the other block chain link points to obtain a verification result, and broadcasting the verification result; receiving the verification results returned by the other block chain link points; the verification result represents the result of verifying the received block by the other block link points; judging whether the verification result meets a second preset condition or not; and when the second preset condition is met, adding the block into the block chain of the block.
The verification result meeting the second preset condition may be that the number of verification results representing that verification passes is greater than or equal to a preset number threshold. The block may be a data structure for recording transaction data and game score ranking data updated by the exchange within a period of time; the block body of the block is transaction data, and the block head of the block is shown in table 1.
Table 1 is a block header diagram of the block, as shown in table 1, including: the version number, the Hash value of the last block (block), and the Hash, the timestamp, the game name and the game score ranking formed by packaging the transaction data within the time from the generation of the last block to the generation of the new block.
Figure BDA0001843668190000121
TABLE 1
As can be seen from table 1, the packed block may be marked with a timestamp and a unique mark of the previous block, such as the last block hash value. After the consensus of each second block chain node in the block chain network is verified, the packed new block is added to the end of the block chain by the first block chain node to become a new block.
When the packed block is verified, the other block chain nodes can verify whether the transaction data in the block is consistent with the transaction record stored by the node, and return a verification result to the accounting node; the accounting node can judge whether the verification result of 51% of the block chain nodes is verified; when determined, the accounting node appends the packed block to the end of the block chain as a new block.
Here, if the game terminal users corresponding to the other block link points have any cheating behavior, the accounting node may determine that the verification result of no 51% of the block link nodes is verified, so that the accounting node directly discards the packed blocks, and thus the packed blocks cannot be recorded in the general ledger, and the game cost paid by the corresponding game terminal users is wasted. Obviously, the cheating risk of game terminal users corresponding to the remaining block link points can be reduced.
And after the accounting node adds the packed block to the tail of the block chain to become a new block, a game terminal user corresponding to the accounting node can obtain the fixed game reward and the fixed game reward is recorded by the accounting node. Thereafter, the respective game terminal user waits for the start of the next round of game play.
In one embodiment, before the accounting node broadcasts the packed blocks to the other blockchain nodes, the method further comprises: the accounting node acquires the unrecorded transaction; judging whether the unrecorded transaction amount is larger than or equal to a preset transaction threshold value; and when the transaction is determined to be greater than or equal to the preset transaction threshold, packaging the unrecorded transaction to obtain a block.
Wherein the unrecorded transactions may include transactions generated by the accounting node, and transactions that are not recorded into the ledger that are broadcast by the accounting node from other block link points.
Here, the process of block packing may specifically include: when the accounting node acquires the unrecorded transaction, the address of the payer, namely the public key address, can be acquired; judging whether the balance of the payer is enough to pay the transaction according to the address of the payer; when the surplus of the payer is determined to be enough to pay the transaction, verifying the signature of the unrecorded transaction to determine the authenticity of the transaction; when the verification is determined to pass, counting the transaction number passing the verification; and when the counted transaction quantity is greater than or equal to the preset transaction threshold value, packaging the transactions corresponding to the transaction quantity to obtain a block.
By adopting the technical scheme of the embodiment of the invention, in the process of determining the accounting node, only the game result ranking needs to be checked through each second block link point, when the game result ranking is effective, the accounting node is determined based on the effective game result ranking, obviously, the accounting node has no relation with the hardware configuration height of each second block link point, so that the hardware resource can be saved, and the accounting node can be determined.
In addition, an efficient and interesting consensus algorithm is provided by combining a blockchain technology and a game scene, specifically, through a competition scene provided by a game such as a VR racing game, participants of the game vote the ranking of game results, namely consensus verification, and when more than 50% of game participants vote, a billing node for obtaining a billing right is determined according to the ranking of the game results; the game terminal users corresponding to the accounting nodes obtain rewards, and the problems of large computing power and unfairness existing in the conventional consensus algorithm can be solved.
Based on the block chain accounting node selection method provided in each embodiment of the present application, the present application further provides a block chain accounting node selection device, where the device may be disposed on a terminal, as shown in fig. 3, and the device includes:
an obtaining unit 31, configured to obtain a current game score ranking from the first block link point; the game result ranking is obtained after the game terminal corresponding to each block link point plays a game;
a broadcasting unit 32, configured to broadcast the game achievement ranking to at least one second blockchain node;
a receiving unit 33, configured to receive a check result returned by the second block link point; the verification result represents a result of verifying the received game score ranking by the second block link point;
a determining unit 34, configured to determine whether the game result ranking is valid based on each returned verification result; when determined to be valid, an accounting node is determined from the plurality of blockchain nodes based on the game score ranking.
In an embodiment, the obtaining unit 31 is specifically configured to: the first block chain node acquires the current game score ranking of the user from the game terminal; the game result ranking is sent to the game terminal by the game server.
In an embodiment, the determining unit 34 is specifically configured to: counting the number of verification results which represent passing of verification based on each returned verification result; judging whether the number is greater than or equal to a preset threshold value; determining that the game achievement ranking is valid when the number is determined to be greater than or equal to the preset threshold.
For example, the first block link point counts the total number of returned verification results and the number of verification results representing passing of verification; calculating the product of the total amount and a preset proportion to obtain the preset threshold; judging whether the number is greater than or equal to the preset threshold value; determining that the game achievement ranking is valid when the number is determined to be greater than or equal to the preset threshold. Wherein, the preset proportion can be 50%.
Here, the first block link point broadcasts the game result ranking of each round to each second block link node, and when more than 50% of the second block link points confirm that the game result ranking is valid, consensus is achieved, thereby preventing game terminal users from tampering with the game result, and effectively preventing cheating in games.
In an embodiment, the determining unit 34 is specifically configured to: determining the block chain nodes of which the game score ranking meets a first preset condition from all the block chain nodes based on the game score ranking; and taking the determined block link points as accounting nodes.
In an embodiment, the determining unit 34 is specifically configured to: ranking the game achievements as input data of an intelligent contract; the rule script of the intelligent contract is the corresponding relation between the rank and the probability of a preset game score; obtaining the identification of the block chain node based on the intelligent contract by utilizing the input data; and taking the block link point corresponding to the obtained identification as an accounting node.
The accounting node determined based on the first preset condition and the intelligent contract can acquire the accounting right for accounting the transaction.
In one embodiment, the apparatus further comprises:
the block verification unit is used for broadcasting the packed blocks to other block chain nodes by the accounting node; the block is used for verifying the other block chain link points to obtain a verification result, and broadcasting the verification result; receiving the verification results returned by the other block chain link points; the verification result represents the result of verifying the received block by the other block link points; judging whether the verification result meets a second preset condition or not; and when the second preset condition is met, adding the block into the block chain of the block.
The verification result meeting the second preset condition may be that the number of verification results representing that verification passes is greater than or equal to a preset number threshold. The block may be a data structure for recording transaction data and game score ranking data updated by the exchange within a period of time; the block body of the block is transaction data.
When the packed block is verified, the other block chain nodes can verify whether the transaction data in the block is consistent with the transaction record stored by the node, and return a verification result to the accounting node; the accounting node can judge whether the verification result of 51% of the block chain nodes is verified; when determined, the accounting node appends the packed block to the end of the block chain as a new block.
Here, if the game terminal users corresponding to the other block link points have any cheating behavior, the accounting node may determine that the verification result of no 51% of the block link nodes is verified, so that the accounting node directly discards the packed blocks, and thus the packed blocks cannot be recorded in the general ledger, and the game cost paid by the corresponding game terminal users is wasted. Obviously, the cheating risk of game terminal users corresponding to the remaining block link points can be reduced.
And after the accounting node adds the packed block to the tail of the block chain to become a new block, a game terminal user corresponding to the accounting node can obtain the fixed game reward and the fixed game reward is recorded by the accounting node. Thereafter, the respective game terminal user waits for the start of the next round of game play.
In one embodiment, the apparatus further comprises:
the packaging unit is used for the accounting node to obtain the unrecorded transaction; judging whether the unrecorded transaction amount is larger than or equal to a preset transaction threshold value; and when the transaction is determined to be greater than or equal to the preset transaction threshold, packaging the unrecorded transaction to obtain a block.
In practical applications, the obtaining unit 31 and the receiving unit 33 may be implemented by a communication interface located on the block chain accounting node selection device; the broadcasting Unit 32, the determining Unit 34, the block verifying Unit, and the packing Unit may be implemented by a Processor located on the block chain accounting node selecting device, such as a Central Processing Unit (CPU), a Micro Processing Unit (MPU), a Digital Signal Processor (DSP), or a Field Programmable Gate Array (FPGA) in combination with a communication interface.
Fig. 4 is a schematic structural diagram of a block chain accounting node selection apparatus according to the present invention, and the block chain accounting node selection apparatus 400 shown in fig. 4 is disposed on the terminal and includes: at least one processor 401, memory 402, user interface 403, at least one network interface 404. The various components in the block chain accounting node selection device 400 are coupled together by a bus system 405. It is understood that the bus system 405 is used to enable connection communication between these components. The bus system 405 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 405 in fig. 4.
The user interface 403 may include, among other things, a display, a keyboard, a mouse, a trackball, a click wheel, a key, a button, a touch pad, or a touch screen.
Memory 402 in an embodiment of the present invention is used to store various types of data to support the operation of block chain accounting node selection device 400. Examples of such data include: any computer programs for operating on blockchain accounting node selection device 400, such as operating system 4021 and application programs 4022; the operating system 4021 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, and is configured to implement various basic services and process hardware-based tasks. The application programs 4022 may include various application programs for implementing various application services. A program for implementing the method according to the embodiment of the present invention may be included in the application 4022.
The method disclosed in the above embodiments of the present invention may be applied to the processor 401, or implemented by the processor 401. The processor 401 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 401. The processor 401 described above may be a general purpose processor, a digital signal processor, or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. Processor 401 may implement or perform the methods, steps, and logic blocks disclosed in embodiments of the present invention. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed by the embodiment of the invention can be directly implemented by a hardware decoding processor, or can be implemented by combining hardware and software modules in the decoding processor. The software modules may be located in a storage medium located in the memory 402, and the processor 401 reads the information in the memory 402 and performs the steps of the aforementioned methods in conjunction with its hardware.
It will be appreciated that the memory 402 can be either volatile memory or nonvolatile memory, and can include both volatile and nonvolatile memory. The nonvolatile Memory may be a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a magnetic random access Memory (FRAM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical Disc, or a Compact Disc Read-Only Memory (CD-ROM); the magnetic surface storage may be disk storage or tape storage. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of illustration and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), Enhanced Synchronous Dynamic Random Access Memory (Enhanced DRAM), Synchronous Dynamic Random Access Memory (SLDRAM), Direct Memory (DRmb Access), and Random Access Memory (DRAM). The memory 402 described in connection with the embodiments of the invention is intended to comprise, without being limited to, these and any other suitable types of memory.
Based on the block chain accounting node selection method provided in the embodiments of the present application, the present application further provides a computer-readable storage medium, and as shown in fig. 4, the computer-readable storage medium may include: a memory 402 for storing a computer program executable by the processor 401 of the block chain accounting node selection device 400 for performing the steps of the aforementioned method. The computer readable storage medium may be Memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface Memory, optical disk, or CD-ROM.
It should be noted that: the technical schemes described in the embodiments of the present invention can be combined arbitrarily without conflict.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention.

Claims (10)

1. A method for block chain accounting node selection, the method comprising:
the first block link point obtains the ranking of the current game score; the game result ranking is obtained after the game terminal corresponding to each block link point plays a game;
broadcasting the game achievement ranking to at least one second blockchain node;
receiving a check result returned by the second block link point; the verification result represents a result of verifying the received game score ranking by the second block link point;
judging whether the game score ranking is effective or not based on each returned check result; when determined to be valid, determining a billing node from a plurality of blockchain nodes based on the game score ranking;
the game is a game which depends on the operation behavior of people to determine the ranking of game achievements.
2. The method of claim 1, wherein said determining whether the game achievement ranking is valid based on each returned verification result comprises:
counting the number of verification results which represent passing of verification based on each returned verification result;
judging whether the number is greater than or equal to a preset threshold value;
determining that the game achievement ranking is valid when the number is determined to be greater than or equal to the preset threshold.
3. The method of claim 1, wherein determining a billing node from a plurality of blockchain nodes based on the game achievements ranking when the determining is valid comprises:
determining the block chain nodes of which the game score ranking meets a first preset condition from all the block chain nodes based on the game score ranking;
and taking the determined block link points as accounting nodes.
4. The method of claim 1, wherein determining a billing node from the respective blockchain nodes based on the game achievements ranking when the determining is valid comprises:
ranking the game achievements as input data of an intelligent contract; the rule script of the intelligent contract is the corresponding relation between the rank and the probability of a preset game score;
obtaining the identification of the block chain node based on the intelligent contract by utilizing the input data;
and taking the block link point corresponding to the obtained identification as an accounting node.
5. The method of claim 1, wherein the first tile link point obtains a user's current game achievement ranking comprising:
the first block chain node acquires the current game score ranking of the user from the game terminal; the game result ranking is sent to the game terminal by the game server.
6. The method of claim 1, wherein after determining accounting nodes from each blockchain node, the method further comprises:
the accounting node broadcasts the packed blocks to other block chain nodes;
receiving the verification results returned by the other block chain link points; the verification result represents the result of verifying the received block by the other block link points;
judging whether the verification result meets a second preset condition or not;
and when the second preset condition is met, adding the block into the block chain of the block.
7. The method of claim 6, wherein before the accounting node broadcasts the packed blocks to the respective blockchain nodes, the method further comprises:
the accounting node acquires the unrecorded transaction;
judging whether the unrecorded transaction amount is larger than or equal to a preset threshold value or not;
and when the fact that the transaction is larger than or equal to the preset threshold value is determined, packaging the unrecorded transaction to obtain a block.
8. An apparatus for block chain accounting node selection, the apparatus comprising:
the acquisition unit is used for acquiring the ranking of the current game score by the first block link point; the game result ranking is obtained after the game terminal corresponding to each block link point plays a game;
the broadcasting unit is used for broadcasting the game result ranking to at least one second block chain node;
the receiving unit is used for receiving the check result returned by the second block chain link point; the verification result represents a result of verifying the received game score ranking by the second block link point;
the determining unit is used for judging whether the game score ranking is effective or not based on each returned verification result; when determined to be valid, determining a billing node from a plurality of blockchain nodes based on the game score ranking;
the game is a game which depends on the operation behavior of people to determine the ranking of game achievements.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
10. A block chain accounting node selection apparatus, comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor;
wherein the processor is adapted to perform the steps of the method of any one of claims 1 to 7 when running the computer program.
CN201811259925.2A 2018-10-26 2018-10-26 Block chain accounting node selection method and device and computer readable storage medium Active CN109481936B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811259925.2A CN109481936B (en) 2018-10-26 2018-10-26 Block chain accounting node selection method and device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811259925.2A CN109481936B (en) 2018-10-26 2018-10-26 Block chain accounting node selection method and device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN109481936A CN109481936A (en) 2019-03-19
CN109481936B true CN109481936B (en) 2022-04-29

Family

ID=65691733

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811259925.2A Active CN109481936B (en) 2018-10-26 2018-10-26 Block chain accounting node selection method and device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109481936B (en)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
SG11202002017YA (en) 2019-07-11 2020-04-29 Alibaba Group Holding Ltd Shared blockchain data storage
SG11202001975SA (en) 2019-07-11 2020-04-29 Alibaba Group Holding Ltd Shared blockchain data storage
CN111448781B (en) 2019-07-11 2022-08-26 创新先进技术有限公司 Computer-implemented method for communicating shared blockchain data
CN110555319B (en) * 2019-07-22 2022-12-27 平安科技(深圳)有限公司 Resource expected result auditing method and device based on block chain and computer equipment
CN110585714B (en) * 2019-09-26 2022-11-08 腾讯科技(深圳)有限公司 UGC element setting method, device and equipment based on block chain
CN110598481A (en) * 2019-09-29 2019-12-20 腾讯科技(深圳)有限公司 Data storage method, device, equipment and storage medium
CN110853214B (en) * 2019-11-06 2021-05-11 杭州复杂美科技有限公司 Block generation method, device and storage medium
CN111464539B (en) * 2020-03-31 2022-11-04 中国联合网络通信集团有限公司 Block chain accounting method and accounting node
CN111556149B (en) * 2020-04-27 2022-10-21 中国银行股份有限公司 Node selection method and device based on Raft consensus algorithm
CN112118246B (en) * 2020-09-11 2022-04-19 北京微密科技发展有限公司 Block chain trusted storage execution hardware environment based on converged memory
CN112200577B (en) * 2020-09-15 2021-06-04 深圳开拓者科技有限公司 Block chain payment processing method combined with cloud computing analysis and big data service center
CN113542251B (en) * 2021-07-09 2023-07-21 中国工商银行股份有限公司 Data reporting method and device
CN113489743B (en) * 2021-07-26 2022-12-23 广东辰宜信息科技有限公司 Consensus realization method and device applied to block chain system
CN114817399A (en) * 2021-09-06 2022-07-29 支付宝(杭州)信息技术有限公司 Block management method and device
CN114225381B (en) * 2022-01-07 2022-07-19 广州炫动信息科技有限公司 Battle data processing method and system based on block chain distributed consensus algorithm

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108259235A (en) * 2018-01-04 2018-07-06 杭州复杂美科技有限公司 A kind of block chain accounting nodes selection method
CN108512939A (en) * 2018-04-17 2018-09-07 深圳市元征科技股份有限公司 A kind of block chain common recognition method, apparatus and relevant device
CN108596621A (en) * 2018-04-28 2018-09-28 深圳市优学链科技有限公司 Block chain accounting nodes generation method, device, computer equipment and storage medium
CN108648082A (en) * 2018-05-09 2018-10-12 合肥达朴汇联科技有限公司 A kind of computer system reached for block chain common recognition

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108665274A (en) * 2018-05-14 2018-10-16 北京链享未来科技有限公司 A kind of accounting nodes intelligent selecting method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108259235A (en) * 2018-01-04 2018-07-06 杭州复杂美科技有限公司 A kind of block chain accounting nodes selection method
CN108512939A (en) * 2018-04-17 2018-09-07 深圳市元征科技股份有限公司 A kind of block chain common recognition method, apparatus and relevant device
CN108596621A (en) * 2018-04-28 2018-09-28 深圳市优学链科技有限公司 Block chain accounting nodes generation method, device, computer equipment and storage medium
CN108648082A (en) * 2018-05-09 2018-10-12 合肥达朴汇联科技有限公司 A kind of computer system reached for block chain common recognition

Also Published As

Publication number Publication date
CN109481936A (en) 2019-03-19

Similar Documents

Publication Publication Date Title
CN109481936B (en) Block chain accounting node selection method and device and computer readable storage medium
CN111405304B (en) Anchor interaction method and device, computer equipment and storage medium
CN110033244B (en) Intelligent contract execution method and device based on block chain and electronic equipment
CN110830735B (en) Video generation method and device, computer equipment and storage medium
CN109981281B (en) Method and device for determining candidate elements based on block chain proposal random consensus
US20180078862A1 (en) Automatic Video Game Highlight Reel
CN113395363B (en) Data processing method, device and equipment based on block chain and storage medium
CN108479061B (en) Application running data verification method and device, storage medium and server
CN110941418B (en) Random number generation method, device, equipment and readable storage medium
WO2020062972A1 (en) Blockchain-based data processing method and apparatus, and electronic device
CN110611701A (en) Parameter configuration and transaction processing method based on block chain
CN111210270B (en) Service processing method, device, service cluster, computer equipment and storage medium
CN104184748A (en) Game data interaction method, device and system
CN112915548A (en) Data processing method, device and equipment of multimedia playing platform and storage medium
CN110490590A (en) Activation record querying method, device, equipment and storage medium based on block chain
CN110585722A (en) Block chain-based game time information processing method and device and game control method and device
JP2020205104A (en) Entertainment providing system, entertainment providing method, and program
CN110795132A (en) Third-party application processing method, system and storage medium
CN113132810B (en) Processing method and device for live broadcast match, computer readable medium and electronic equipment
CN111202987A (en) Login control method and device for game application
CN112402983A (en) Game result verification method and system
JP6767057B2 (en) Entertainment provision system, entertainment provision method and program
CN109395392B (en) Forecast guess game deployment method and game method, equipment and storage medium
JP2021090868A (en) Game system, computer program used therefor, and server device
CN110941680A (en) Data processing method, device and storage medium

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
GR01 Patent grant
GR01 Patent grant