CN109985389B - Cheating-preventing method and system for card games based on intelligent block chain contracts - Google Patents
Cheating-preventing method and system for card games based on intelligent block chain contracts Download PDFInfo
- Publication number
- CN109985389B CN109985389B CN201910270074.XA CN201910270074A CN109985389B CN 109985389 B CN109985389 B CN 109985389B CN 201910270074 A CN201910270074 A CN 201910270074A CN 109985389 B CN109985389 B CN 109985389B
- Authority
- CN
- China
- Prior art keywords
- card
- block chain
- hash value
- cheating
- suit
- 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
Links
Images
Classifications
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/70—Game security or game management aspects
- A63F13/75—Enforcing rules, e.g. detecting foul play or generating lists of cheating players
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
- H04L63/0442—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/12—Applying verification of the received information
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/141—Setup of application sessions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
- H04L69/161—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
- H04L69/162—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
- H04L9/3236—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
- H04L9/3239—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Business, Economics & Management (AREA)
- General Business, Economics & Management (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- Pinball Game Machines (AREA)
Abstract
The invention provides a cheating-preventing method and a cheating-preventing system for card games based on a block chain intelligent contract. The invention considers the defects of the prior combination of the block chain and the game, changes the application scene, and effectively finds out cheating behaviors by utilizing a unique mechanism of trust removal and decentralization of the block chain. Meanwhile, the chess and card type small game data are not complex, too much burden is not caused during operation, the cost is low, the effect is obvious, and the current situation that the current card type game cheats seriously can be effectively improved.
Description
Technical Field
The invention relates to an anti-cheating method and an anti-cheating system thereof, in particular to a card game anti-cheating method and an anti-cheating system thereof based on a block chain, and belongs to the technical field of the block chain.
Background
At present, a method for preventing players from tampering the suits of card game platforms is based on centralized nodes, namely, data of the players are stored in a backup mode through renting a third-party network server, and therefore fairness of games is guaranteed.
Only the current method for preventing cheating of players mainly has the following problems:
1. the risk of damage in the data transmission process is high, the problems of flaws, breakpoints, incompleteness and the like are easily caused in the transmission process, the method enables data to be processed by multiple persons, the data transfer times are increased, the risk of data tampering is increased, and the integrity can be damaged.
2. The method has great dependence on the third-party network server, and once the third-party network server is subjected to malicious intrusion or accidental downtime, the third-party network server and electronic data on a plurality of servers controlled by the third-party network server face great potential safety hazards such as integrity, privacy and repairability.
3. Because the centralized method cannot ensure that the third-party network server is completely safe and fair, the user often doubts the integrity of the third-party network server, worrys about leakage or malicious damage of the uploaded data, and is not beneficial to establishing a long-term trust relationship between the system and the user, so that the trust crisis between the user and the platform can be caused, and the time required for establishing a reliable trust mechanism between the user and the platform is long.
4. The method needs to rent a third-party network server, has higher cost and increases economic burden.
Aiming at the problems in the prior art, a cheating-preventing system for the card games based on the block chains is required to be provided, wherein the cheating-preventing system is transparent, cannot be tampered, is convenient to trace, and has low economic burden.
Disclosure of Invention
The technical problem to be solved by the invention is to overcome the defects of the prior art and provide a cheating-preventing method and a cheating-preventing system for a card game based on a block chain, which are transparent in disclosure, incapable of being tampered, convenient to trace and low in economic burden.
The invention provides a cheating-preventing method for card games based on block chain intelligent contracts, which comprises the following steps:
step one, acquiring the suit and the numerical information of cards extracted by a player when a game starts, and storing the suit and the numerical information of the cards into a block chain when the player sends one card;
step two, encoding the suit and the number of each issued card by an encoding method, and performing shift compression on the generated code;
thirdly, sorting the codes compressed in the second step according to the colors and the numerical sizes, generating a hash value A from the sorted codes through an encryption algorithm, and storing the hash value A into a block chain;
step four, in the game process, the player stores the suit and the number of the card to a block chain every time the player plays the card;
fifthly, coding the suit and the number of each card played by the player by a coding method, and performing displacement compression on the generated codes;
sorting the codes compressed in the step five according to the colors and the numerical sizes, generating a hash value B by the sorted codes through an encryption algorithm, and storing the hash value B into a block chain;
and step seven, comparing the hash value A and the hash value B of the winner in the block chain, if the two hash values are the same, judging that no cheating action occurs, and if the two hash values are different, judging that the cheating action exists.
As a further technical solution of the present invention, the encoding method is a combination of a huffman encoding method and a merkle-tree method.
Further, the encryption algorithm is a combination of the MD5 algorithm and the SHA256 algorithm.
Further, the first step of obtaining the suit and the numerical information of the cards extracted by the player at the beginning of the game realizes data transmission between the client and the back-end system by means of TCP-based Socket communication.
Further, the TCP-based Socket communication specifically includes:
s1, the server defines a Serversocket object instance and monitors a connection request from the client;
s2, defining a Socket object instance at the client, and initiating connection to a specified server;
s3, performing read-write operation on the Socket according to a certain protocol to complete data calculation and interaction;
s4, closing the input flow, the output flow and the sockets of the two parties.
The invention also discloses a cheating prevention system for card games based on the block chain, which comprises the following steps:
the card dealing information acquisition module is used for acquiring the suit and the numerical information of the cards drawn by the player at the beginning of the game, and storing the suit and the numerical information of the cards into a block chain when the player deals one card;
the card dealing code compression module is used for coding the suit and the number of each card which is dealt by a coding method and performing shift compression on the generated codes;
the card dealing sequencing storage module is used for sequencing the codes compressed in the card dealing code compression module according to the suit and the number, generating a hash value A from the sequenced codes through an encryption algorithm and storing the hash value A into a block chain;
the card-playing information acquisition module is used for storing the suit and the number of each card played by the player to the block chain in the game process;
the card playing code compression module is used for coding the suit and the number of each card played by a player by a coding method and performing shift compression on the generated codes;
the card-playing sequencing storage module is used for sequencing the codes compressed in the card-playing code compression module according to the colors and the numbers, and generating a hash value of the sequenced codes through an encryption algorithm and storing the hash value into a block chain;
and the comparison module is used for comparing the hash value A and the hash value B of the winner in the block chain, judging that no cheating action occurs if the hash values A and B are the same, and judging that the cheating action exists if the hash values A and B are not the same.
Compared with the prior art, the invention adopting the technical scheme has the following technical effects: the invention considers the defects of the prior combination of the block chain and the game, changes the application scene, and effectively finds out cheating behaviors by utilizing a unique mechanism of trust removal and decentralization of the block chain. Meanwhile, the chess and card type small game data are not complex, and too much burden cannot be caused during operation, so that the phenomenon of congestion is caused. The present invention therefore largely envisages designing an anti-cheating system based on the unique properties of the tile chain, storing the suit and numbers of the cards in the card game as electronic data in the tile chain to ensure the verifiability, non-tamperability and non-forgeability of the data. Once the electronic data such as the patterns and the like are stored in the system, the verifier can compare the call with the information to be verified so as to prove the authenticity and consistency of the data to be verified and prevent cheating behaviors such as card changing of the player in the midway. And then, an intelligent contract technology and an Ethenhouse platform are utilized, and a game is accessed through an API (application program interface), so that the cheating behaviors of tampering and counterfeiting electronic data, such as changing the color and the color of a user, changing cards privately and the like, are prevented.
In addition, the invention can help the network police to tear off the carefully disguised coat of the gambling game, thereby standardizing the network behavior and purifying the network environment.
Drawings
FIG. 1 is a schematic flow chart of an embodiment of the method of the present invention.
Detailed Description
The technical scheme of the invention is further explained in detail by combining the drawings as follows:
as shown in fig. 1, the present embodiment provides a cheating-prevention method for a card game based on a block chain intelligent contract, which includes the following steps:
step one, acquiring the suit and the numerical information of cards extracted by a player when a game starts, and storing the suit and the numerical information of the cards into a block chain when the player sends one card;
specifically, information of each player and the drawn cards at the beginning of the game is accessed into the plug-in through the API. In consideration of the fact that the suit information of the cards needs to be transmitted between the client and the back-end system, in the embodiment, data transmission and control between the cards are realized by Socket. There are two types of Socket that can be used currently, streaming and datagram. Among them, the former is based on TCP transmission, and the latter is based on UDP transmission. Through comparison, the streaming Socket can provide stable bidirectional data stream communication service in sequence, and is suitable for the transmission condition of the system needing to transmit brand information and data between networks, so that the Socket based on the TCP is selected to realize communication.
The Socket communication based on the TCP is mainly divided into the following four basic steps:
1) the server defines a ServerSocket object instance and monitors a connection request from the client;
2) defining a Socket object instance at a client, and initiating connection to a specified server;
3) performing read/write operation on the Socket according to a certain protocol to complete the calculation and interaction of data;
4) closing the input stream, the output stream and both sockets.
A thread is independently started for each game to carry out communication, and transmitted data are divided into user information and card type and color information.
And step two, encoding the suit and the number of each issued card by an encoding method, and performing shift compression on the generated code.
Because the card information data volume is large, in order to reduce the system processing time and the storage space, the data needs to be compressed. Here, the method of combining the Huffman coding and merkle-tree (Mork tree) is used (HuffMT in FIG. 1)
In encoding, starting from two symbols with the minimum probability, one branch can be selected as 0, and the other branch can be selected as 1. Here, we select the upper branch as 0 and the lower branch as 1. And merging the probabilities of the two encoded branches and queuing again. The method is repeatedly used for multiple times until the merging probability is normalized.
If n weights are set, the constructed Huffman tree has n leaf nodes. The n weights are set as w1, w2, a.
(1) Consider w1, w 2.., wn as a forest of n trees (each tree has only one node);
(2) selecting and combining two trees with the smallest weight of root nodes in a forest as a left subtree and a right subtree of a new tree, wherein the weight of the root nodes of the new tree is the sum of the weights of the root nodes of the left subtree and the right subtree;
(3) deleting two selected trees from the forest, and adding the new trees into the forest;
(4) repeating the steps (2) and (3) until only one tree is left in the forest, wherein the tree is the obtained Huffman tree.
The Merkle-tree uses one-way hashing. The top of the hash tree is a top hash (top hash), also known as root hash or master hash. It is to climb up the tree by connecting two sub-hashes in parallel until the root hash is found. The one-way hash can avoid collisions and since it is a deterministic algorithm, there will be neither and probably not two identical text hashes.
The method is used for generating a code string by firstly generating cards touched by a player, and then generating the code string by the method for each card outlet in the process. And after the game is finished, sequencing according to the pattern and the color of the cards to generate an ordered coding string.
The specific process of data compression is as follows: and counting the occurrence frequency of each character, constructing a Haffman tree through the frequency to obtain the code of each character, and compressing data.
Thirdly, sorting the codes compressed in the second step according to the colors and the numerical sizes, generating a hash value A from the sorted codes through an encryption algorithm, and storing the hash value A into a block chain;
the encryption algorithm in this embodiment is a combination of the MD5 algorithm and the SHA256 algorithm. And generating the hash by adopting an MD5 and SHA256 algorithm. Because a single encryption algorithm may generate collisions, two approaches are chosen to jointly encrypt. The MD5 algorithm processes incoming information in 512-bit packets, each of which is divided into 16 32-bit sub-packets, and after a series of processing, the output of the algorithm is composed of four 32-bit packets, which are concatenated to produce a 128-bit hash value.
The SHA-2 Algorithm, named from the abbreviation of Secure Hash Algorithm 2(Secure Hash Algorithm 2), is a cryptographic Hash function Algorithm standard, belongs to one of the SHA algorithms, and is a successor to SHA-1.
Java supports the MD5 and SHA256 algorithms. The hash can be generated by the converter through the direct coding string, so that the data encryption is completed.
Step four, in the game process, the player stores the suit and the number of the card to a block chain every time the player plays the card;
fifthly, coding the suit and the number of each card played by the player by a coding method, and performing displacement compression on the generated codes;
sorting the codes compressed in the step five according to the colors and the numerical sizes, generating a hash value B by the sorted codes through an encryption algorithm, and storing the hash value B into a block chain;
the blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism and an encryption algorithm.
Broadly, the blockchain technique is a completely new distributed infrastructure and computing approach that utilizes blockchain data structures to verify and store data, utilizes distributed node consensus algorithms to generate and update data, utilizes cryptography to secure data transmission and access, and utilizes intelligent contracts composed of automated script code to program and manipulate data.
In general, a blockchain is a general ledger that includes all historical transactions, and each block includes several transaction records. If the blockchain is said to be the ledger, then the block is each page of the ledger. The details of the transaction are recorded in a public ledger that is accessible to anyone in a network. A chunk is a collection of transaction data that is time stamped and uniquely marked with a previous chunk. The valid tiles are appended to the master tile chain after they have gained network-wide consensus approval. The block chain is a data structure with blocks containing transaction information linked sequentially from back to front.
The term intelligent contract (smartcontact) dates back to at least 1995 to the prolific, cross-domain legal community (NickSzabo). His definition is "an intelligent contract is a set of digitally defined commitments (promises) that include protocols on which contract participants can enforce these commitments. ", a
The intelligent contract based on the block chain technology not only can exert the advantages of the intelligent contract in the aspect of cost efficiency, but also can avoid the interference of malicious behaviors on the normal execution of the contract. The smart contract is written into the block chain in a digital form, and the characteristics of the block chain technology ensure that the whole processes of storage, reading and execution are transparent, traceable and not easy to modify. Meanwhile, a set of state machine system is constructed by the block chain self-contained consensus algorithm, so that the intelligent contract can be efficiently operated
The intelligent contracts based on the block chains comprise a transaction processing and saving mechanism and a complete state machine, and are used for receiving and processing various intelligent contracts; and both the saving and state processing of the transaction are done on the blockchain. The transaction mainly comprises data needing to be sent; and events are descriptive information of such data. After the transaction and event information is transmitted into the intelligent contract, the resource state in the contract resource set is updated, and the intelligent contract is triggered to judge the state machine. And if the trigger conditions of a certain action or certain actions in the automatic state machine are met, selecting contract actions to be automatically executed by the state machine according to preset information.
The intelligent contract system automatically sends out preset data resources and events comprising the trigger conditions from the intelligent contract according to the trigger conditions contained in the event description information when the trigger conditions are met; the core of the whole intelligent contract system is that the intelligent contract is processed by the intelligent contract module in a transaction and event mode, and is also a group of transactions and events; the intelligent contract is a system formed by a transaction processing module and a state machine, and does not generate an intelligent contract or modify the intelligent contract; it exists simply to allow a complex set of digitized commitments with trigger conditions to be correctly executed at the discretion of the participant.
The block chain system has the characteristics of being transparent, incapable of being tampered and convenient to trace, the possibility of data tampering is avoided, and a user can conveniently and directly check and verify electronic data through a programmable and easy-to-operate intelligent contract.
And seventhly, comparing the hash value A and the hash value B of the winner in the block chain, if the hash value A and the hash value B are the same, judging that no cheating action occurs, and if the hash values A and B are not the same, judging that the cheating action exists.
The invention also discloses a cheating prevention system for card games based on the block chain, which comprises the following steps:
the card dealing information acquisition module is used for acquiring the suit and the numerical information of the cards extracted by the player when the game starts, and storing the suit and the numerical information of the cards into a block chain when the player deals one card;
the card dealing coding and compressing module is used for coding the suit and the number of each card which is dealt by a coding method and carrying out displacement compression on the generated codes;
the card dealing and sorting storage module sorts the codes compressed in the card dealing code compression module according to the suit and the number, generates a hash value A by the sorted codes through an encryption algorithm and stores the hash value A into a block chain;
in the playing information acquisition module and the game process, the player stores the suit and the number of the card to a block chain every time the player plays the card;
the card playing code compression module is used for coding the suit and the number of each card played by a player by a coding method and performing shift compression on the generated codes;
the card-playing sequencing storage module sequences the codes compressed in the card-playing code compression module according to the colors and the numbers, and generates a hash value by an encryption algorithm and stores the hash value into a block chain;
and the comparison module is used for comparing the hash value A and the hash value B of the winner in the block chain, judging that no cheating action occurs if the hash values A and B are the same, and judging that the cheating action exists if the hash values A and B are not the same.
The system writes an intelligent contract by using the ontology language and realizes interaction with the block chain through the intelligent contract. In the system, each step of operation of any player is recorded in a block chain, the operation is public and transparent, and finally, data is downloaded through an intelligent contract and automatically compared to judge whether cheating occurs or not, so that non-third-party judgment is realized, and decentralization and fair public are realized.
As an implementation method of the system, the system can be made into a plug-in, the plug-in is called when each game starts, and whether cheating action exists in the game is displayed on an interface when the game is finished.
The invention considers the defects of the prior combination of the block chain and the game, changes the application scene, and effectively finds out cheating behaviors by utilizing a unique mechanism of trust removal and decentralization of the block chain. Meanwhile, the chess and card type small game data are not complex, and too much burden cannot be caused during operation, so that the phenomenon of congestion is caused. The present invention therefore largely envisages designing an anti-cheating system based on the unique properties of the tile chain, storing the suit and numbers of the cards in the card game as electronic data in the tile chain to ensure the verifiability, non-tamperability and non-forgeability of the data. Once the electronic data such as the patterns and the like are stored in the system, the verifier can compare the call with the information to be verified so as to prove the authenticity and consistency of the data to be verified and prevent cheating behaviors such as card changing of the player in the midway. And then, an intelligent contract technology and an Ethenhouse platform are utilized, and a game is accessed through an API (application program interface), so that the cheating behaviors of tampering and counterfeiting electronic data, such as changing the color and the color of a user, changing cards privately and the like, are prevented.
In addition, the invention can help the network police to tear off the carefully disguised coat of the gambling game, thereby standardizing the network behavior and purifying the network environment.
The above description is only an embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can understand that the modifications or substitutions within the technical scope of the present invention are included in the scope of the present invention, and therefore, the scope of the present invention should be subject to the protection scope of the claims.
Claims (5)
1. A card game anti-cheating method based on a block chain intelligent contract is characterized by comprising the following steps:
step one, acquiring the suit and the numerical information of cards extracted by a player when a game starts, and storing the suit and the numerical information of the cards into a block chain when the player sends one card;
secondly, coding the suit and the number of each issued card by a coding method, and performing shift compression on the generated codes, wherein the coding method is the combination of a Huffman coding method and a merkle-tree method;
thirdly, sorting the codes compressed in the second step according to the colors and the numbers, generating a hash value A by the sorted codes through an encryption algorithm, and storing the hash value A into a block chain;
step four, in the game process, the player stores the suit and the number of the card to a block chain every time the player plays the card;
step five, coding the suit and the number of each card played by the player by a coding method, and performing displacement compression on the generated codes;
sorting the codes compressed in the step five according to the colors and the numerical sizes, and generating a hash value B of the sorted codes through an encryption algorithm and storing the hash value B into a block chain;
and seventhly, comparing the hash value A and the hash value B of the winner in the block chain, if the hash value A and the hash value B are the same, judging that no cheating action occurs, and if the hash value A and the hash value B are not the same, judging that the cheating action exists.
2. A cheating-prevention method for card games based on blockchain intelligent contracts, according to claim 1, wherein: the encryption algorithm comprises a combination of the MD5 algorithm and the SHA256 algorithm.
3. A cheating-prevention method for card games based on blockchain intelligent contracts, according to claim 1, wherein: in the first step, the suit and the numerical information of the cards extracted by the player at the beginning of the game are acquired, and data transmission between the client and the back-end system is realized by means of TCP-based Socket communication.
4. A cheating-prevention method for a card game based on a blockchain intelligent contract according to claim 3, wherein the TCP-based Socket communication specifically comprises:
s1, the server defines a Serversocket object instance and monitors a connection request from the client;
s2, defining a Socket object instance at the client, and initiating connection to a specified server;
s3, performing read-write operation on the Socket according to a certain protocol to complete data calculation and interaction;
s4, closing the input flow, the output flow and the sockets of the two parties.
5. A card game anti-cheating system based on a block chain intelligent contract is characterized by comprising:
the card dealing information acquisition module is used for acquiring the suit and the numerical information of the cards extracted by the player when the game starts, and storing the suit and the numerical information of the cards into the block chain when the player deals one card;
the card dealing coding compression module is used for coding the suit and the number of each card which is dealt by a coding method and performing shift compression on the generated codes, wherein the coding method is the combination of a Huffman coding method and a merkle-tree method;
the card dealing sequencing storage module is used for sequencing the codes compressed in the card dealing code compression module according to the suit and the number, generating a hash value A from the sequenced codes through an encryption algorithm and storing the hash value A into a block chain;
the card-playing information acquisition module is used for storing the suit and the number of each card played by the player to the block chain in the game process;
the card playing code compression module is used for coding the suit and the number of each card played by a player by a coding method and performing shift compression on the generated codes;
the card-playing sequencing storage module is used for sequencing the codes compressed in the card-playing code compression module according to the colors and the numbers, and generating a hash value by the sequenced codes through an encryption algorithm and storing the hash value into a block chain;
and the comparison module is used for comparing the hash value A and the hash value B of the winner in the block chain, judging that no cheating action occurs if the hash values A and B are the same, and judging that the cheating action exists if the hash values A and B are not the same.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910270074.XA CN109985389B (en) | 2019-04-04 | 2019-04-04 | Cheating-preventing method and system for card games based on intelligent block chain contracts |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910270074.XA CN109985389B (en) | 2019-04-04 | 2019-04-04 | Cheating-preventing method and system for card games based on intelligent block chain contracts |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109985389A CN109985389A (en) | 2019-07-09 |
CN109985389B true CN109985389B (en) | 2022-08-23 |
Family
ID=67132361
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910270074.XA Active CN109985389B (en) | 2019-04-04 | 2019-04-04 | Cheating-preventing method and system for card games based on intelligent block chain contracts |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109985389B (en) |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110519375B (en) * | 2019-08-27 | 2021-08-31 | 腾讯科技(深圳)有限公司 | Information synchronization method and related device |
CN110613937A (en) * | 2019-09-10 | 2019-12-27 | 广州方阵科技有限公司 | Online game fair competition method based on Hash algorithm and block chain storage |
CN110598853B (en) * | 2019-09-11 | 2022-03-15 | 腾讯科技(深圳)有限公司 | Model training method, information processing method and related device |
CN110585732A (en) * | 2019-09-12 | 2019-12-20 | 腾讯科技(深圳)有限公司 | Card handling information determining method and device, server and storage medium |
CN110599172B (en) * | 2019-09-19 | 2024-06-07 | 腾讯科技(深圳)有限公司 | Asset information processing method and device based on blockchain, equipment and storage medium |
CN110598448B (en) * | 2019-09-19 | 2024-03-12 | 腾讯科技(深圳)有限公司 | Method, device, equipment and storage medium for processing operation data based on block chain |
CN111507475A (en) * | 2020-04-14 | 2020-08-07 | 杭州浮云网络科技有限公司 | Game behavior decision method, device and related equipment |
CN112118087A (en) * | 2020-09-18 | 2020-12-22 | 上海计算机软件技术开发中心 | Cross-chain contract compression encryption system and method |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104331269A (en) * | 2014-10-28 | 2015-02-04 | 中国科学院自动化研究所 | Executable code compression method of embedded type system and code uncompressing system |
CN104768621A (en) * | 2012-11-08 | 2015-07-08 | 天使游戏纸牌股份有限公司 | Table game system |
CN107335214A (en) * | 2017-06-14 | 2017-11-10 | 张永良 | A kind of cheat detection method of Xinchang Random Factor Mahjong |
CN108434745A (en) * | 2018-03-27 | 2018-08-24 | 北京知道创宇信息技术有限公司 | Game data processing method and system |
CN109510831A (en) * | 2018-11-22 | 2019-03-22 | 杭州复杂美科技有限公司 | Real-time game method, equipment and storage medium |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170161991A1 (en) * | 2015-12-02 | 2017-06-08 | Aryo Ayati | System and method for public verification of a gambling website or gaming event |
CN109289199B (en) * | 2018-08-10 | 2020-07-10 | 杭州复杂美科技有限公司 | Multiplayer game method, device and storage medium |
CN109126139A (en) * | 2018-08-31 | 2019-01-04 | 杭州复杂美科技有限公司 | A kind of guessing game processing method, equipment and storage medium |
-
2019
- 2019-04-04 CN CN201910270074.XA patent/CN109985389B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104768621A (en) * | 2012-11-08 | 2015-07-08 | 天使游戏纸牌股份有限公司 | Table game system |
CN104331269A (en) * | 2014-10-28 | 2015-02-04 | 中国科学院自动化研究所 | Executable code compression method of embedded type system and code uncompressing system |
CN107335214A (en) * | 2017-06-14 | 2017-11-10 | 张永良 | A kind of cheat detection method of Xinchang Random Factor Mahjong |
CN108434745A (en) * | 2018-03-27 | 2018-08-24 | 北京知道创宇信息技术有限公司 | Game data processing method and system |
CN109510831A (en) * | 2018-11-22 | 2019-03-22 | 杭州复杂美科技有限公司 | Real-time game method, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN109985389A (en) | 2019-07-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109985389B (en) | Cheating-preventing method and system for card games based on intelligent block chain contracts | |
US20220391358A1 (en) | Methods and apparatus for a distributed database within a network | |
AU2019229437B2 (en) | Methods and apparatus for a distributed database within a network | |
US11734260B2 (en) | Methods and apparatus for a distributed database within a network | |
US9646029B1 (en) | Methods and apparatus for a distributed database within a network | |
AU2017382161B2 (en) | Methods and apparatus for a distributed database that enables deletion of events | |
US10318505B2 (en) | Methods and apparatus for a distributed database within a network | |
CN109544334A (en) | A kind of network scalability block chain implementation method | |
WO2017040313A1 (en) | Methods and apparatus for a distributed database within a network | |
CN107679149A (en) | A kind of data processing method and server | |
CN113157700B (en) | Quick lottery/sequencing method based on block chain technology | |
CN113521748A (en) | Cheating detection method and device |
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 |