A data processing method and related device for throwing eggs
By using the BERT decision model to process status information and historical status information in the egg-slide game, and generating card action data, the problem of inability to intelligently judge card face value and card checking situation in the existing technology is solved, and the degree of anthropomorphism and processing effect of the game is improved.
Patent Information
- Application Number
- CN202111485458.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-07
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2041-12-07
AI Technical Summary
The existing technology cannot intelligently judge the opponent's face value, teammate's face value, and card checking situation in the egg-slaying game, which affects the rationality and degree of personification of card play action data.
The trained BERT decision model processes the received status information and historical status information to generate card action data instead of using expert rules to make decisions.
It improves the effect and anthropomorphism of egg-sucking data processing, and enhances the intelligent decision-making ability in the game.
Smart Images

Figure CN114159763B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method for processing throwing eggs data, a throwing egg data processing device, a server, and a computer-readable storage medium. Background Art
[0002] With the continuous development of information technology, in the field of game technology, due to the problem of insufficient players participating in the game, it is necessary to automate the data in the game in order to realize the virtual game process and enhance the sense of participation of actual game participants.
[0003] In the related art, in order to improve the actual player participation in the game of throwing eggs, the robot is good at calculating its own card combination and card value based on the logic system of expert rules. However, it cannot make intelligent judgments on the card value of the opponent, the card value of teammates, when to pass the card, whether to win the first game, whether to help teammates win the first game, etc. This affects the rationality and anthropomorphism of the card-playing action data in the throwing egg data, and reduces the processing effect of the throwing egg data.
[0004] Therefore, how to improve the processing effect of the egg-throwing data is a key issue that technical personnel in this field are concerned about. Summary of the invention
[0005] The purpose of this application is to provide a method for processing throwing egg data, a throwing egg data processing device, a server and a computer-readable storage medium. The received state information and historical state information are processed by a trained BERT decision model to obtain card-playing action data, instead of using expert rules to make decisions, thereby improving the effect of processing the throwing egg data and improving the degree of anthropomorphism.
[0006] In order to solve the above technical problems, the present application provides a method for processing data of throwing eggs, comprising:
[0007] Receive status information from the game server;
[0008] Perform feature extraction processing according to the state information and historical state information to obtain state feature matrix data;
[0009] The state feature matrix data is processed using a BERT decision model to obtain card-playing action data; wherein the BERT decision model is a model trained based on a training set of Pai Gow game data;
[0010] Send the card-playing action data.
[0011] Optionally, feature extraction processing is performed according to the state information and historical state information to obtain state feature matrix data, including:
[0012] The state information and the historical state information are classified and processed according to the throwing egg game model to obtain the state characteristic matrix data.
[0013] Optionally, the state feature matrix data is processed using a BERT decision model to obtain card-playing action data, including:
[0014] Predict the winning probability of all card-playing actions according to the BERT decision model and the state feature matrix data, and obtain the probability corresponding to each card-playing action;
[0015] The card-playing action with the highest probability is used as the card-playing action data.
[0016] Optionally, the step of obtaining the BERT decision model by training according to the throwing game data training set includes:
[0017] Performing feature extraction processing on the acquired historical data of the game of throwing eggs to obtain the training set of the game of throwing eggs game data;
[0018] The neural network training is performed according to the throwing egg game data training set to obtain the BERT decision model.
[0019] Optionally, also include:
[0020] When the status information is received, the status information is saved and used as the historical status information.
[0021] The present application also provides a data processing device for throwing eggs, comprising:
[0022] An information receiving module, used to receive status information from the game server;
[0023] An information processing module, used for performing feature extraction processing according to the state information and historical state information to obtain state feature matrix data;
[0024] A model decision module, used to process the state feature matrix data using a BERT decision model to obtain card-playing action data; wherein the BERT decision model is a model trained according to a training set of Pai Gow game data;
[0025] The card-playing data sending module is used to send the card-playing action data.
[0026] Optionally, the information processing module is specifically used to classify the state information and the historical state information according to a throwing egg game model to obtain the state feature matrix data.
[0027] Optionally, also include:
[0028] The information saving module is used to save the status information when receiving the status information and use it as the historical status information.
[0029] The present application also provides a server, comprising:
[0030] Memory for storing computer programs;
[0031] A processor is used to implement the steps of the above-mentioned method for processing the data of the game of throwing eggs when executing the computer program.
[0032] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned method for processing data for throwing eggs are implemented.
[0033] The present application provides a method for processing throwing egg data, comprising: receiving state information from a throwing egg game server; performing feature extraction processing based on the state information and historical state information to obtain state feature matrix data; using a BERT decision model to process the state feature matrix data to obtain card-playing action data; wherein the BERT decision model is a model trained based on a training set of throwing egg game data; and sending the card-playing action data.
[0034] The received status information and historical status information are processed by the trained BERT decision model to obtain the card-playing action data, instead of using expert rules to make decisions. This improves the effect of processing the throwing egg data and increases the degree of anthropomorphism.
[0035] The present application also provides a data processing device, a server and a computer-readable storage medium for throwing eggs, which have the above beneficial effects and are not elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0037] Figure 1 A flowchart of a method for processing data of throwing eggs provided in an embodiment of the present application;
[0038] Figure 2 A schematic diagram of the structure of a data processing device for throwing eggs provided in an embodiment of the present application. DETAILED DESCRIPTION
[0039] The core of this application is to provide a method for processing throwing egg data, a throwing egg data processing device, a server and a computer-readable storage medium. The received status information and historical status information are processed by a trained BERT decision model to obtain card-playing action data, instead of using expert rules to make decisions. This improves the effect of processing throwing egg data and improves the degree of anthropomorphism.
[0040] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0041] In the related art, in order to improve the actual player participation in the game of throwing eggs, the robot is good at calculating its own card combination and card value based on the logic system of expert rules. However, it cannot make intelligent judgments on the card value of the opponent, the card value of teammates, when to pass the card, whether to win the first game, whether to help teammates win the first game, etc. This affects the rationality and anthropomorphism of the card-playing action data in the throwing egg data, and reduces the processing effect of the throwing egg data.
[0042] Therefore, the present application provides a method for processing throwing egg data, which processes the received status information and historical status information through a trained BERT decision model to obtain card-playing action data, instead of using expert rules to make decisions, thereby improving the effect of processing the throwing egg data and improving the degree of anthropomorphism.
[0043] The following is an example of an example to illustrate a method for processing data of a game of throwing eggs provided by the present application.
[0044] Please refer to Figure 1 , Figure 1 A flowchart of a method for processing data of throwing eggs provided in an embodiment of the present application.
[0045] In this embodiment, the method may include:
[0046] S101, receiving status information from the egg throwing game server;
[0047] It can be seen that this step is intended for the data processing server to receive status information from the throwing egg game server. Among them, the data processing server makes decisions and returns corresponding card-playing data based on the status information received from the throwing egg game server, so as to participate in the game in the throwing egg game server and realize the virtual player in the throwing egg game server.
[0048] The state information refers to the state information of the current game, including but not limited to the number of cards in the user's current hand, the number of plagiarism cards in the user's current hand, the number of cards played by each player in the first three rounds in the order of playing cards, the number of cards played by the previous, opposite, next and current player, the number of cards played by all four players, the number of remaining cards in the hands of the other three players excluding the current player, and the position of the level cards. That is, the environmental data of the current game.
[0049] The status information may be image data, byte data, or matrix data, which is not specifically limited here.
[0050] S102, performing feature extraction processing according to the state information and historical state information to obtain state feature matrix data;
[0051] Based on S101, this step aims to perform feature extraction processing based on the state information and the historical state information to obtain state feature matrix data. That is, feature extraction is performed from the acquired state information and the historical state information stored historically to obtain state feature matrix data.
[0052] The state characteristic matrix data is data that represents the state characteristics in a matrix form.
[0053] Furthermore, this step may include:
[0054] According to the throwing egg game model, the state information and historical state information are classified and processed to obtain the state feature matrix data.
[0055] It can be seen that this optional solution mainly explains how to obtain state feature matrix data. In this optional solution, the state information and historical state information are classified and processed according to the egg-throwing game model to obtain the state feature matrix data. Among them, the egg-throwing game model is the model of various game data that need to be paid attention to under the egg-throwing game rules.
[0056] S103, using a BERT decision model to process the state feature matrix data to obtain card-playing action data; wherein the BERT decision model is a model trained based on a training set of Pai Gow game data;
[0057] Based on S102, this step aims to use the BERT decision model to process the state feature matrix data to obtain card-playing action data; wherein the BERT decision model is a model trained based on the throwing game data training set.
[0058] That is to say, the BERT decision model is used to make decisions in order to determine the current card-playing action. Among them, BERT (Bidirectional Encoder Representations from Transformers) is a language representation model. Its main model structure is a stack of transformer encoders. It is actually a two-stage framework, namely pretraining and finetuning on specific tasks.
[0059] Furthermore, the BERT decision model includes: convolutional layer, multihead attention block and fully connected layer.
[0060] Furthermore, in this step, the step of training the BERT decision model based on the Pai Gow game data training set includes:
[0061] Step 1, performing feature extraction processing on the acquired historical data of the game of throwing eggs to obtain a training set of the game of throwing eggs game data;
[0062] Step 2: Perform neural network training based on the Pai Gow game data training set to obtain the BERT decision model.
[0063] It can be seen that this optional solution mainly explains how to train a decision model. In this optional solution, feature extraction is performed on the acquired historical data of the game of throwing eggs to obtain a training set of the game of throwing eggs; then, neural network training is performed based on the training set of the game of throwing eggs data to obtain a BERT decision model.
[0064] Furthermore, in this embodiment, the step may include:
[0065] Step 1, predicting the winning probability of all card-playing actions according to the BERT decision model and the state feature matrix data, and obtaining the probability corresponding to each card-playing action;
[0066] Step 2, taking the card-playing action with the highest probability as the card-playing action data.
[0067] S104, sending card playing action data.
[0068] Based on S103, this step aims to send the card-playing action data to the throwing egg game server to realize the card-playing action.
[0069] Furthermore, the card-playing action data may be sent via an Http (HyperText Transfer Protocol) interface.
[0070] In addition, this embodiment may also include:
[0071] When the status information is received, the status information is saved and used as historical status information.
[0072] In summary, this embodiment processes the received status information and historical status information through the trained BERT decision model to obtain the card-playing action data, instead of using expert rules to make decisions, thereby improving the effect of processing the throwing egg data and improving the degree of anthropomorphism.
[0073] The following is a specific example to further illustrate the data processing method for throwing eggs provided by the present application.
[0074] In this embodiment, the processing rules of the game data in the connected egg-throwing game server are as follows:
[0075] Two people play in a group, and the one who runs out of cards first is the winner. There are two decks of cards in the game of throwing eggs, with a total of 108 cards. Each player gets 27 cards. There are graded cards in each round, starting from 2 in the first round to A in the last round. In each round, the red graded card is a phoenix, which can replace any other type of card except the king in all card types. The types of cards in throwing eggs include: single card, pair, straight, continuous pair, three cards, three with two, steel plate, bomb, straight flush, and four kings. The size relationship of the card types in throwing eggs can be seen in the table below.
[0076] Table 1: Pai Dan card table
[0077]
[0078]
[0079] In the first round of the game, a random person is assigned to deal the cards first, and the cards are dealt in a counterclockwise order. In each subsequent round, the player who finished playing the cards first in the previous round will be dealt the cards first. In the first round, the system randomly assigns a player to play the cards first. Starting from the second round, in general, the last player to pay tribute will play the cards first, and if the tribute is resisted, the first player will play the cards first; in the case of double play, the player with the larger tribute card will play the cards first, and if the cards are the same, the player above the first player will play the cards first. Play cards in a counterclockwise order, and you can only play cards with a larger size than the previous player, or you can choose not to play. Except for bombs, straight flushes and four kings, only cards of the same size can be compared. When one player has finished playing the cards, the other players will not care about their cards, and the next round will be played by the opponent.
[0080] The first player to finish the game of throwing eggs becomes the first player, followed by the second player, the third player, and the fourth player. The game ends when both players on one side have played their cards. If two players on one side are the first player and the second player, it is called a double knock. If two players on one side are the first player and the third player, it is called a single knock. If two players on one side are the first player and the fourth player, it is called a flat knock. In this game, the players have to try to get their two players to double knock the other side's two players.
[0081] Furthermore, the game of throwing eggs can be simply abstracted as a Markov decision process. At each step, the player makes a decision on which hand to play or pass based on the current information of his own cards and the information of other players' played cards.
[0082] The action types of the Pai Gow game include 362 action types - according to the card type and card value.
[0083] Single cards: 2, 3, 4, 5, 6, 7, 8, 9, J, Q, K, A, Jack, King, a total of 14 actions.
[0084] Pairs: 2-2, 3-3, 4-4, 5-5, 6-6, 7-7, 8-8, 9-9, JJ, QQ, KK, AA, Jack-Jack, King-King, a total of 14 actions.
[0085] Three cards: 2-2-2, 3-3-3, 4-4-4, 5-5-5, 6-6-6, 7-7-7, 8-8-8, 9-9-9, JJJ, QQQ, KKK, AAA, a total of 12 actions.
[0086] Straight: A-2-3-4-5, 2-3-4-5-6, 3-4-5-6-7, 4-5-6-7-8, 5-6-7-8-9, 6-7-8-9-10, 7-8-9-10-J, 8-9-10-JQ, 9-10-JQK, 10-JQKA, a total of 10 moves.
[0087] Straight Flush: A-2-3-4-5, 2-3-4-5-6, 3-4-5-6-7, 4-5-6-7-8, 5-6-7-8-9, 6-7-8-9-10, 7-8-9-10-J, 8-9-10-JQ, 9-10-JQK, 10-JQKA, a total of 10 moves.
[0088] Consecutive pairs: AA-2-2-3-3, 2-2-3-3-4-4, 3-3-4-4-5-5, 4-4-5-5-6-6, 5-5-6-6-7-7, 6-6-7-7-8-8, 7-7-8-8-9-9, 8-8-9-9-10-10, 9-9-10-10-JJ, 10-10-JJQQ, JJQQKK, QQKKAA, a total of 12 moves.
[0089] Steel plate: 2-2-2-3-3-3, 3-3-3-4-4-4, 4-4-4-5-5-5, 5-5-5-6-6-6, 6-6-6-7-7-7, 7-7-7-8-8-8, 8-8-8-9-9-9, 9-9-9-10-10-10, 10-10-10-JJJ, JJJQQQ, QQQKKK, KKKAAA, a total of 12 moves.
[0090] Bombs: Bombs are divided into 4 bombs, 5 bombs, 6 bombs, 7 bombs, 8 bombs, 9 bombs and 10 bombs. Each bomb type is divided into 2, 3, 4, 5, 6, 7, 8, 9, 10, J, Q, K, A, 12 bombs in total. 70 actions in total.
[0091] Three with two: Three can be any of 2, 3, 4, 5, 6, 7, 8, 9, 10, J, Q, K, A, 12, and two can be any of 2, 3, 4, 5, 6, 7, 8, 9, J, Q, K, A, Jack, King. For example, 2-2-2-KK. A total of 182 actions.
[0092] Four Kings: Little King-Little King-Big King-Big King, 1 action.
[0093] PASS: 1 action.
[0094] Each decision of throwing eggs is to choose the action type that conforms to the rules of the game and has the highest chance of winning from the above 362 actions. This decision can be made end-to-end, that is, to directly choose from 362 actions according to the current situation. The entire decision process can also be split. When dealing cards: first decide the type of card: single card, pair, three cards, consecutive pairs, steel plate, straight, three with two, straight flush, bomb, king bomb, and then choose the action to be played from the card type. For example, choose to play three cards, and then choose the specific action from the 12 actions of three cards, such as 3-3-3. When following the card: decide whether to follow the card, then decide the card type to follow, and finally decide the specific action. For example, the previous player played 4-4-4-4, decide to play the card, judge the card type to be a straight flush, and the specific action is 1-2-3-4-5.
[0095] In the game of Pai Egg, players will decide which hand of cards to play based on the current hand information and game rules. When machine learning modeling is used, the current hand information should be expressed in the form of data that can be understood by the machine.
[0096] For the egg throwing game, the following features can be designed:
[0097] The feature is a 54x21 two-dimensional array. In the 54-element dimension, each position represents the number of different suits of playing cards. In the 21-element dimension, each element represents a different type of feature. The first feature is the number of cards in the user's current hand; the second feature is the number of Laizi cards in the user's current hand; the third to fourteenth features are the number of cards played by each player in the first three rounds in the order of playing cards; the fifteenth to eighteenth features are the number of cards played by the previous, opposite, next and current player respectively; the nineteenth feature is the number of cards played by all four players; the twentieth feature is the number of remaining cards in the hands of the other three players excluding the current player, which can be obtained by subtracting the total number of cards played by all players from the remaining cards of the current player; the twenty-first feature is the position of the level card.
[0098] Furthermore, the deep learning model of CNN (Convolutional Neural Networks) architecture achieves the capture of current game situation information and the deduction of the actions to be taken in the current situation by extracting local features of data and continuously abstracting features. CNN architecture is effective in games with natural correlation of local situations such as Go and chess (AlphaGo uses the CNN architecture of Resnet residual network). Poker game cards not only depend on the combination of local cards, but also have long-distance dependencies (such as 3-3-3 and A-1-2-3-4). The model of CNN architecture is naturally unable to fully extract the current situation information of poker games. Google proposed the BERT model in 2018. The BERT model is a rewrite of the encoder architecture of transformermer. Its core is the multihead attention block. This block connects the multiheadattention module and the feed forward module in series with the participation structure of resnet. Multihead attention is a fully connected attention mechanism that can effectively associate the features at each time step in the task. In the game of Pai Egg, the multihead attention block can effectively associate the current card, the played card, the remaining card and other information at different card value positions, capture the current situation information of the game from a global perspective, and thus more accurately deduce what actions to take at the moment.
[0099] The deep learning architecture of this embodiment integrates the convolution layer of 1x1 convolution kernel, multihead attention block and fully connected layer. In the model architecture, the input Game State is the 54x21 feature matrix constructed in 4.3; Conv1D is a 1x1 convolution layer, the input feature is a 54x21 matrix, and the output feature is a 54x64 feature; the red dotted box is 3 consecutive blocks, and the dimensions of the input and output features of each block are 54x64. Each block includes 3 modules: the MultiHeadAttention module is a multi-head attention module, the Layer Norm layer normalization module, and the Feed Forward feedforward fully connected network; the Faltten module converts the 54x64 two-dimensional matrix into a one-dimensional vector of 3456 elements; Batch Norm normalizes a batch of input data; the DropOut layer randomly masks some features to improve the generalization ability of the model; the Dense layer is a fully connected neural network layer, the input is a one-dimensional array of 3456, and the output is the number of action behaviors of the egg-throwing game 362; the OutPut layer is the output layer, which obtains the behavior action.
[0100] At the beginning of the game, the game server sends the initial cards of the current robot player to the algorithm server. The algorithm server uses the robot's ID number, the robot's room number and the seat number as the key, and the robot's current game state 54x21 matrix as the value, and saves it to the redis database.
[0101] During the game, when other players play cards, the game server will send the information of the player playing the cards and the cards played to the algorithm server. The data processing server will update the game status of the robot based on the player's information and save it in redis. When the robot plays a card, the game server will send the information of the current robot playing the card and the card playing request to the algorithm server. The algorithm server will extract the current game status of the robot player from redis based on the robot player information, then call the AI model to calculate which cards the robot player should play at present, and return it to the game server through the http interface.
[0102] It can be seen that this embodiment processes the received status information and historical status information through the trained BERT decision model to obtain the card-playing action data, instead of using expert rules to make decisions, which improves the effect of processing the throwing egg data and improves the degree of anthropomorphism.
[0103] The following is an introduction to the throwing egg data processing device provided in the embodiment of the present application. The throwing egg data processing device described below and the throwing egg data processing method described above can be referenced to each other.
[0104] Please refer to Figure 2 , Figure 2 A schematic diagram of the structure of a data processing device for throwing eggs provided in an embodiment of the present application.
[0105] In this embodiment, the device may include:
[0106] The information receiving module 100 is used to receive status information from the egg-throwing game server;
[0107] The information processing module 200 is used to perform feature extraction processing based on the state information and the historical state information to obtain state feature matrix data;
[0108] The model decision module 300 is used to process the state feature matrix data using the BERT decision model to obtain the card-playing action data; wherein the BERT decision model is a model trained according to the Pai Gow game data training set;
[0109] The card playing data sending module 400 is used to send card playing action data.
[0110] Optionally, the information processing module 200 is specifically used to classify the state information and historical state information according to the throwing egg game model to obtain state feature matrix data.
[0111] Optionally, it may also include:
[0112] The information saving module is used to save the status information as historical status information when the status information is received.
[0113] The present application also provides a server, including:
[0114] Memory for storing computer programs;
[0115] A processor is used to implement the steps of the above-mentioned method for processing the data of the game of throwing eggs when executing the computer program.
[0116] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the throwing egg data processing method as described above are implemented.
[0117] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.
[0118] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0119] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0120] The above is a detailed introduction to a method for processing a game of throwing eggs, a game of throwing eggs data processing device, a server and a computer-readable storage medium provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
Claims
1. A method for processing data of throwing eggs, characterized in that: include: Receive status information from the Pai Gow game server, wherein the status information includes: the number of cards in the user's current hand, the number of Lai Zi cards in the user's current hand, the number of cards played by each player in the first three rounds in the order of playing cards, the number of cards played by the previous player, the opponent player, the next player and the current player, and the number of cards played by all four players; Perform feature extraction processing according to the state information and historical state information to obtain state feature matrix data; The state feature matrix data is processed by a BERT decision model to obtain card-playing action data; wherein the BERT decision model is a model trained according to a training set of Pai Gow game data; wherein the BERT decision model includes: a convolutional layer, a multihead attention block, and a fully connected layer; the state feature matrix data is processed by a BERT decision model to obtain card-playing action data, including: predicting the winning probability of all card-playing actions according to the BERT decision model and the state feature matrix data to obtain the probability corresponding to each card-playing action; and taking the card-playing action with the highest probability as the card-playing action data; Send the card-playing action data.
2. The method for processing the data of throwing eggs according to claim 1, characterized in that: Perform feature extraction processing according to the state information and historical state information to obtain state feature matrix data, including: The state information and the historical state information are classified and processed according to the throwing egg game model to obtain the state characteristic matrix data.
3. The method for processing data of throwing eggs according to claim 1, characterized in that: The step of obtaining the BERT decision model by training according to the throwing game data training set includes: Performing feature extraction processing on the acquired historical data of the game of throwing eggs to obtain the training set of the game of throwing eggs game data; The neural network training is performed according to the throwing egg game data training set to obtain the BERT decision model.
4. The method for processing data of throwing eggs according to claim 1, characterized in that: Also includes: When the status information is received, the status information is saved and used as the historical status information.
5. A data processing device for playing mahjong, characterized in that: include: An information receiving module is used to receive status information from a Pai Gow game server, wherein the status information includes: the number of cards in the user's current hand, the number of Lai Zi cards in the user's current hand, the number of cards played by each player in the first three rounds in the order of playing cards, the number of cards played by the previous player, the opponent player, the next player and the current player, and the number of cards played by all four players; An information processing module, used for performing feature extraction processing according to the state information and historical state information to obtain state feature matrix data; A model decision module, used to process the state feature matrix data using a BERT decision model to obtain card-playing action data; wherein the BERT decision model is a model trained according to a training set of Pai Gow game data; wherein the BERT decision model includes: a convolutional layer, a multihead attention block and a fully connected layer; A model decision module is used to predict the winning probability of all card-playing actions according to the BERT decision model and the state feature matrix data, and obtain the probability corresponding to each card-playing action; and the card-playing action with the highest probability is used as the card-playing action data; The card-playing data sending module is used to send the card-playing action data.
6. The data processing device for throwing eggs according to claim 5, characterized in that: The information processing module is specifically used to classify the state information and the historical state information according to the throwing egg game model to obtain the state feature matrix data.
7. The data processing device for throwing eggs according to claim 5, characterized in that: Also includes: The information saving module is used to save the status information when receiving the status information and use it as the historical status information.
8. A server, characterized in that: include: Memory for storing computer programs; A processor, used to implement the steps of the throwing egg data processing method as described in any one of claims 1 to 4 when executing the computer program.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the steps of the throwing egg data processing method as described in any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Intelligent mobile Internet device (MID), television, game server, multi-screen system and multi-screen method
CN102921171A
Real playing card system software implementation method based on Internet
CN108939526A