Character game implementation method and system, electronic equipment and storage medium
By receiving client operation information and using small language models to judge text games, the problems of low accuracy and high cost in the existing technology are solved, and efficient text game operation and user experience are achieved.
Patent Information
- Application Number
- CN202410936684.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-12-20
AI Technical Summary
In the prior art, the word game implementation application based on GPT+prompt is not accurate due to the limitations of understanding ability and input context length, and the call cost is high and the time is long, making it difficult to realize efficient word game and multi-round dialogue. .
By receiving client operation information, converting it into game control instructions, and using a small language model to judge the game reply content, generating game results and prompt information, improving the accuracy and operation efficiency of text games.
It improves the accuracy of judging text game results, reduces resource consumption and cost, and improves the overall operation quality and user experience of the game.
Smart Images

Figure CN119158261A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method, system, electronic device and storage medium for implementing a word game. Background Art
[0002] After entering the NPC character square and character chat, users can also enter the text game section (including turtle soup, persuasion games, etc.) to increase the number of dialogue rounds and increase user stickiness through games.
[0003] Before the big language model, the language model's understanding ability and the limitations of the input context length made text games and multi-round conversations difficult to achieve. These functions required the use of the capabilities of the big model.
[0004] However, there are some GPTs applications on the market that directly implement the Turtle Soup game based on GPT+prompt. However, since they are completely based on prompt and GPT's understanding ability, the accuracy is not very high, and there is a problem of high cost and long time consumption in calling GPT.
[0005] Therefore, there is an urgent need to develop a word game implementation method, system, electronic device and storage medium to solve one or more of the above-mentioned problems. Summary of the invention
[0006] In view of this, in order to solve the above technical problems or part of the technical problems, the embodiments of the present invention provide a word game implementation method, system, electronic device and storage medium.
[0007] In a first aspect, the present application provides a method for implementing a word game, the method comprising:
[0008] Receive operation information from the client and convert the operation information into corresponding game control instructions;
[0009] In the case where the game control instruction is a game reply instruction, extracting the game reply content contained in the game control instruction;
[0010] Inputting the game answer content into a game judgment model, and outputting a game result corresponding to the game answer content;
[0011] Corresponding game prompt information is generated according to the game result, and the game prompt information is fed back to the client to realize the operation of the text game.
[0012] In a possible implementation, converting the operation information into corresponding game control instructions includes:
[0013] The operation information is input into the control intention model, and the game control instructions of the client are output, where the game control instructions are game response instructions and / or process control instructions.
[0014] In a possible implementation, the method further includes:
[0015] In the case where the game control instruction is a process control instruction, the game process is executed according to the process control instruction.
[0016] In a possible implementation manner, before inputting the game response content into the game judgment model, the method further includes:
[0017] Acquire game data of a plurality of word games, and construct game answer content corresponding to different game results of each word data as a game answer set of the word game;
[0018] Inputting the game data of each word game and the corresponding game answer set into the first language model, and obtaining the output result of each game answer set and the output reason corresponding to the output result in turn;
[0019] The output results of each game answer set and the output reasons corresponding to the output results are used as a training data set, the training data set is used to train the second language model, and the trained second language model is used as a game judgment model.
[0020] In a possible implementation, the obtaining of game data of a plurality of word games includes:
[0021] Obtaining the puzzles and answers of several word games, and obtaining key information corresponding to the word games according to the answers of each word game;
[0022] The puzzle, answer and key information corresponding to the word game are used as the game data of the word game.
[0023] In one possible implementation, before inputting the game data of each word game and the corresponding game answer set into the first language model, the method further includes:
[0024] Preprocessing the game answer content in the game answer set;
[0025] The preprocessing includes error correction processing and grammar conversion processing.
[0026] In a possible implementation, before outputting the game result corresponding to the game answer content, the method further includes:
[0027] Determining whether the game determination model stores game data of a text game played by a client;
[0028] If not stored, the puzzle, answer and key information of the word game played by the client are input into the game judgment model.
[0029] In a second aspect, the present application provides a text game implementation system, the system comprising:
[0030] A receiving module, used to receive operation information from the client and convert the operation information into corresponding game control instructions;
[0031] An extraction module, used for extracting the game reply content contained in the game control instruction when the game control instruction is a game reply instruction;
[0032] An output module, used for inputting the game answer content into a game judgment model, and outputting a game result corresponding to the game answer content;
[0033] The feedback module is used to generate corresponding game prompt information according to the game result, and feed back the game prompt information to the client to realize the operation of the text game.
[0034] In a third aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the word game implementation method described in any one of the embodiments of the first aspect when executing the computer program.
[0035] In a fourth aspect, the present application further provides a computer storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the word game implementation method described in any one of the embodiments of the first aspect are implemented.
[0036] The above technical solution provided by the embodiment of the present application has the following advantages over the prior art: the method provided by the embodiment of the present application applies the language model to the text game, which effectively improves the accuracy of the judgment of the text game results during the game operation, and can output the game results more accurately, thereby improving the overall operation quality of the game; in addition, since the operation of the game mainly depends on the application of the language model, the resource consumption and cost expenditure during the operation of the text game are greatly reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0038] In order to more clearly illustrate the embodiments of the present invention 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, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0039] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0040] Figure 1 A flowchart of a method for implementing a word game provided in an embodiment of the present application;
[0041] Figure 2 A flowchart of another method for implementing a word game provided in an embodiment of the present application;
[0042] Figure 3 A flowchart of a method for implementing a word game provided in an embodiment of the present application;
[0043] Figure 4 A schematic diagram of the structure of another text game implementation system provided in an embodiment of the present application;
[0044] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0045] 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 making creative work are within the scope of protection of this application.
[0046] The disclosure below provides many different embodiments or examples to implement different structures of the present invention. In order to simplify the disclosure of the present invention, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present invention. In addition, the present invention can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.
[0047] In order to solve the problem that text games and multi-round dialogues are difficult to implement due to the limitations of the understanding ability of the online platform used for text games in the prior art and the length of the context, there are some GPTs applications on the market that directly implement text games based on GPT+prompt. However, since they are completely based on prompt and GPT's understanding ability, the accuracy is not very high, and the cost of calling GPT is high and the time-consuming technical problem, this application applies the language model to the text game, and during the game running, it effectively improves the accuracy of the judgment of the text game results, and can output the game results more accurately, thereby improving the overall operation quality of the game; in addition, since the operation of the game mainly depends on the application of the language model, the resource consumption and cost expenditure during the operation of the text game are greatly reduced.
[0048] Figure 1 A flowchart of a method for implementing a word game provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the method specifically includes:
[0049] S101, receiving operation information from a client, and converting the operation information into corresponding game control instructions;
[0050] In this embodiment, the user participates in the game operation of the text game on the client device, implements various game operations through the client software, and the client uploads specific operation information to the computer or cloud platform. After receiving the operation information from the client, the operation information is further converted into game control instructions for the text game.
[0051] Specifically, the user inputs instructions, selects game options, and responds to the game on the client device. The client software captures the corresponding operations and converts them into specific operation information, which is then uploaded to the computer system or a remote cloud service platform. After receiving the operation information from the client, the receiving end (i.e., the computer system or cloud platform) processes and analyzes the information, decomposes and encodes the operation information, and converts it into control instructions for the text game, so as to drive the game to respond accordingly to the user's intentions, thereby achieving interaction between the user and the game.
[0052] It should be noted that the text game design of this application has the ability to handle multiple client operations at the same time, where each client is dedicated to serving a certain type of user group. The design allows users of different categories to experience different content when operating the client, that is, the operating permissions and game content that can be operated by different clients can be different. When the system receives operation information from different user groups, it will intelligently convert these operation information into operation instructions of the corresponding category according to the category to which the user belongs.
[0053] For example, in the game there may be a setting that only Class A users are authorized to advance the game's story progress, which is equivalent to assuming that only Class A users can trigger specific events or plots in the game. When Class A users issue operations to advance the game's progress, the system will identify the specific operations and convert them into corresponding game control instructions to achieve the user's desired game progress. For other categories of users, even if they issue operations to advance the game's progress, the system will not convert them into game control instructions, thereby ensuring the diversity and fairness of the gaming experience, which not only increases the interactivity and diversity of the game, but also meets the needs and permissions of different users.
[0054] S102, when the game control instruction is a game reply instruction, extracting game reply content contained in the game control instruction;
[0055] In this embodiment, the game control instructions involved are mainly game response instructions or game process control instructions. Specifically, when the game control instructions are game response instructions, it is necessary to use extraction rules or extraction algorithms to extract relevant game response content from the game control instructions to ensure that the required game responses can be accurately obtained to perform corresponding game operations and interactions, thereby ensuring the smooth progress of the game.
[0056] S103, inputting the game answer content into a game judgment model, and outputting a game result corresponding to the game answer content;
[0057] In this embodiment, the game judgment model used is a small language model. Although a large language model can have a more excellent text understanding ability and its performance is not limited by the length of the input context, the development and operation cost of a large language model is relatively high and time-consuming. Therefore, this application selects a specially trained small language model. This type of model can effectively control costs while ensuring the smooth progress of the game process that a large language model can achieve. It is more suitable for a wide range of and long-term application scenarios, achieving the effect of ensuring model performance while also taking into account economic benefits and practicality.
[0058] Specifically, the reply content extracted from the game reply instructions is input into the game judgment model. The game judgment model will systematically analyze the text game data and the game reply content provided by the user according to its algorithm and rules, and then output the corresponding game results based on the input information, to assist the user in obtaining a smooth and accurate user experience in the game.
[0059] S104, generating corresponding game prompt information according to the game result, and feeding back the game prompt information to the client to realize the operation of the text game.
[0060] In this embodiment, corresponding game instruction information is generated based on the game results output by the language model to accurately reflect the current state of the game and possible next actions, and then the game prompt information is sent to the client to guide the user to understand the action or decision he should take next, thereby achieving smooth operation and a coherent experience of the entire text game. The user can interact with the text game and play the game step by step according to the instructions, which not only ensures the smooth progress of the game process, but also improves the user's sense of participation and the fun of the game, so that the text game can be presented to the user in a more vivid and interactive way.
[0061] For example, if the language module analyzes that the game result corresponding to the operation information input by the user on the client is wrong, then corresponding game prompt information for continuing the game is generated to instruct other players to continue replying. For another example, if the language module analyzes that the game result corresponding to the operation information input by the user on the client is correct, then corresponding game prompt information for winning the game is generated to indicate the victory of the game and the end of the game.
[0062] In addition, some follow-up suggestions or guidance will be provided based on the game progress of all participating users, such as whether they are willing to challenge higher difficulty levels again, or whether they want to know other players' gaming experience, etc., in order to increase player stickiness and the fun of the game.
[0063] It should be noted that the generation of game prompt information in this embodiment is based on comprehensive consideration of multiple factors, including but not limited to the results of the game, the user's role type, the selected game type, and other game and user related information. The specific game prompt information is not simply generated based on the game results, but through comprehensive analysis of these diverse information and data to form more accurate and personalized prompts, to ensure that the game prompt information can better meet the characteristics and needs of the text game, thereby improving the user experience.
[0064] The text game implementation method proposed in this embodiment, after receiving the operation information of the client, processes the information in a timely manner. When the game control instruction is identified as a game reply instruction, the game reply content contained in the instruction is extracted, and then the game reply content is input into the game judgment model for processing. After the model is accurately matched and calculated, the game result matching the game reply content is output. After the game result is generated, this embodiment will also generate corresponding game prompt information according to the game result, which can not only help players better understand the game, but also provide useful game guidance. Finally, the game prompt information will be fed back to the client to realize the smooth operation of the text game. Through the above processing method, this embodiment effectively improves the accuracy of the text game result judgment. Compared with the traditional text game judgment method, it can output the game result more accurately, thereby improving the overall operation quality of the game, while improving the user experience, meeting the players' expectations for the game results, and making the game more challenging and interesting.
[0065] In an optional scheme of an embodiment of the present invention, converting the operation information into corresponding game control instructions includes: inputting the operation information into a control intention model, outputting game control instructions of the client, and the game control instructions are game response instructions and / or process control instructions.
[0066] In this embodiment, a general intention control module for the field of text games is designed and implemented. The main function of the control intention module is to conduct in-depth intention analysis of the operation information issued by the user during the game;
[0067] Specifically, this module will review and analyze the user's operation information to determine whether it contains process control instructions or game response instructions, or both. The general intent control module can process the user's operation information more accurately and efficiently, providing users with a smoother and more natural gaming experience.
[0068] In an optional solution of the embodiment of the present invention, the method further includes:
[0069] In the case where the game control instruction is a process control instruction, the game process is executed according to the process control instruction.
[0070] In this embodiment, if the control intention module recognizes the user's operation as a process control instruction, such as continuing the game, ending the game, changing the puzzle, and other instructions related to the game process, the overall process of the game will be manipulated and controlled according to the specific content of the process control instruction.
[0071] Specifically, when the operation issued by the user is identified as a process control instruction, the system will adjust the way the game is played according to the nature and purpose of the instruction. For example, if the user issues an instruction to continue the game, the control intention module will notify the game engine to continue the current game session; on the contrary, if the user chooses to end the game, the game will enter the end state, and the corresponding game records and statistics will be saved or processed. Similarly, when the user needs to change the puzzle, the system will perform the corresponding puzzle replacement according to the process control instruction to ensure the continuity and interactivity of the game experience, so that the user can smoothly control the game process.
[0072] Figure 2 A flowchart of another method for implementing a word game provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the method specifically includes:
[0073] S201, obtaining game data of a plurality of word games, and constructing game answer content corresponding to different game results for each word data as a game answer set for the word game;
[0074] In this embodiment, game data of a variety of different types and styles of word games are obtained, and the game data include but are not limited to various types of puzzles, answers and key information related thereto; after obtaining the game data, a variety of game response contents corresponding to different game results are generated to construct a game response set.
[0075] Specifically, taking the Turtle Soup word game as an example, various turtle soup riddles and answers are collected and sorted, and a key information field is written for each question to facilitate the model to determine the game victory. When the user's input contains the content in the key information, the user is judged to have won the game. The GPT+prompt method is used to generate 10 user inputs with answers (correct, wrong, it doesn't matter, game victory), and manual screening and modification are performed at the same time to obtain game answer content with different game results as the game answer set of the word game.
[0076] S202, inputting the game data of each word game and the corresponding game answer set into the first language model, and obtaining the output result of each game answer set and the output reason corresponding to the output result in turn;
[0077] First, we need to clarify the rules and goals of the word game, and then input the game data into the first language model. The specific game data may include puzzles, answers and other game information of different types of games such as word puzzles, idiom chain games, and intellectual quizzes. Then, input the data of each game into the language model to obtain the output results of each game answer and give the output reasons corresponding to each output result.
[0078] Specifically, the game output results require detailed explanation and analysis of the output process logic. The output reasons may include the semantic meaning, grammatical structure, contextual association, etc. of the answer. For example, for a word puzzle game, the output reasons may include the explanation of the answer, the analysis of the correlation between the puzzle and the answer, etc.; for another example, for an idiom chain game, the output reasons may include the meaning of the idiom, its usage, and its correlation with the previous idiom, etc.
[0079] For example, taking the Turtle Soup word game as an example, Prompt+(puzzle, answer, key information, user input) is input into GPT (the large language model in this embodiment, that is, the first language model), and the output in json format includes reason (output reason) and reply (output result).
[0080] In this way, the output results of each game answer set and the corresponding output reasons can be obtained, which helps the small language model better understand the decision-making process of the large language model and how to generate appropriate output results based on the given game answer data.
[0081] S203, using the output results of each game answer set and the output reasons corresponding to the output results as a training data set, using the training data set to train the second language model, and using the trained second language model as a game judgment model.
[0082] In this embodiment, taking the Turtle Soup text game as an example, the reason (output reason) and reply (output result) output by the first language model are used as the training data set T, and the open source large model (baichuan2-13B-chat) is trained using the data set T and the LoRA (fine-tuning large language model) fine-tuning method to obtain the Turtle Soup game judgment model.
[0083] It should be noted that, in the embodiment, the second language model is a small-scale model compared to the first language model. Due to its small scale, the second language model takes less time and has high feedback efficiency and low cost when playing word games. Compared with the first language model, the second language model is more suitable for the operation of ordinary word games.
[0084] Taking the Turtle Soup game proposed in this embodiment as an example, the implementation of the Turtle Soup game is essentially a classification task. Tell the model the current puzzle, answer, key information and user input, and the model determines which response should be given (correct, wrong, no relationship, game victory). Classification models based on BERT (trained language representation model), such as roBERTa, are not competent for tasks with longer input contexts and strong text comprehension capabilities. At this time, it is necessary to rely on the capabilities of large language models. By using the first language model to obtain a training data set and using the training data set to train the second language model, the second language model can have the same text comprehension capabilities as the first language model, reducing the operating costs of the model during the text game.
[0085] The text game implementation method proposed in this embodiment uses a large language model to obtain a training data set, and then uses the training data set to train and process the second language model to obtain a text comprehension ability that is the same as the first language model. The method is applied to the daily text game operation process to solve the technical problem that the large language model is high in cost and time-consuming. On the basis of ensuring the smoothness and accuracy of the game operation, it improves the response speed of the user's interaction with the game, reduces the user's waiting time, and makes the game experience more coherent, thereby improving the user's game quality.
[0086] In an optional solution of the embodiment of the present invention, the step of obtaining game data of a plurality of word games includes:
[0087] Obtaining the puzzles and answers of several word games, and obtaining key information corresponding to the word games according to the answers of each word game;
[0088] The puzzle, answer and key information corresponding to the word game are used as the game data of the word game.
[0089] In this embodiment, since the information contained in the answer is relatively complete when the user is running the word game and is used to display it to the user, it is usually difficult for the user's guess to include all the information in the answer, but in fact the user only needs to guess the key information to be considered to have won the game; there are situations where the reply content is not completely consistent with the answer, but the semantics are consistent with the answer. Therefore, in order to realize the operation of the word game, before the game is run, the key information corresponding to each word game answer is extracted according to the puzzle and answer set by the word game, so as to facilitate the language model to judge the victory of the game, and then the key information puzzle and answer are combined to form a complete set of data as the game data of the word game. The use of key information improves the user experience, makes the game process smoother, and enhances the adaptability of the game to better meet the needs of users.
[0090] For example, the riddle of a word game is that a man takes the train to the hospital to see a doctor. After seeing the doctor, he is completely cured. On the way back, the train passes through a tunnel and the man jumps off the train and commits suicide. Why? The answer is that the man is blind. After being cured, when passing through the dim tunnel, he thought his eye disease had relapsed and couldn't bear it, so he committed suicide. According to the answer, the key information of the word game is that the man thought his eye disease had relapsed. When the game judgment model judges the user's reply content, if the reply content contains words related to "relapse of eye disease", it can be determined that the reply is correct and the game result of "correct" is output. The method of adding key information improves the controllability of game victory judgment. When the user input contains the key information, the game victory is achieved.
[0091] In an alternative embodiment of the present invention, before inputting the game data of each word game and the corresponding game reply set into the first language model, the method further includes:
[0092] Preprocess the game reply content in the game reply set;
[0093] The preprocessing includes error correction processing and grammar conversion processing.
[0094] In this embodiment, before inputting the game reply set into the language model, it is necessary to preprocess the game reply to extract the key information about the word game in the reply content;
[0095] Specifically, the preprocessing may include cleaning the text, removing useless punctuation marks and stop words. At the same time, it may also be necessary to perform word segmentation operations to break long sentences into smaller and more easily processed units. In addition, it may also involve entity recognition specific to game Q&A to accurately capture the game elements, character names or other key information involved in the question. By extracting and processing the key information, the understanding cost of the large model is reduced, and the language model can more accurately understand the Q&A content, thereby improving the relevance and accuracy of the answer.
[0096] For example, delete the interrogative words and modify the user's interrogative sentence into a declarative sentence, such as "吗" (ma), "对吗" (dui ma), etc. Remove some questioning ways that trouble the model, such as modifying "是不是" (shi bu shi) to "是" (shi), and meaningless auxiliary words, such as "难道" (nan dao), "也许" (ye xu).
[0097] In an alternative embodiment of the present invention, before outputting the game result corresponding to the game reply content, the method further includes:
[0098] Judge whether the game judgment model stores the game data of the word game performed by the client;
[0099] If not stored, input the riddle, answer and key information of the word game performed by the client into the game judgment model.
[0100] In this embodiment, in order to ensure the normal operation of the word game, when the user selects the word game through the client, it is necessary to ensure that the game judgment model can run the word game, that is, the word game records the riddle, answer and key information of the word game for judging the answer content; therefore, a check is required before the game is run to determine whether the game judgment model stores the game data of the word game played by the client; if not, the riddle, answer and key information of the word game played by the client are promptly input into the game judgment model to ensure the normal operation of the word game and provide users with accurate and timely answer judgment functions.
[0101] Figure 3 A flowchart of a method for implementing a word game provided in an embodiment of the present application, such as Figure 3 As shown, the text game implementation method uses the trained game judgment model to participate in the text game; after obtaining the user input, the control intention model is used to judge the category of the user input. When the user input is a process control instruction, the game process is run according to the user input and the output to the user is promoted. If the control intention module outputs other reply content, the reply content is input into the preprocessing module to preprocess the reply content to ensure that subsequent processing and analysis can be more accurate. The preprocessed reply content and the puzzle, the answer and the key information corresponding to the answer are input into the game judgment model, and the game judgment model outputs the game result according to the user reply content.
[0102] Figure 4 A structural diagram of another text game implementation system provided in an embodiment of the present application, such as Figure 4 As shown, the system specifically includes:
[0103] Receiving module 401, used to receive operation information from the client and convert the operation information into corresponding game control instructions;
[0104] An extraction module 402 is used to extract the game reply content contained in the game control instruction when the game control instruction is a game reply instruction;
[0105] An output module 403, used to input the game answer content into a game judgment model, and output a game result corresponding to the game answer content;
[0106] The feedback module 404 is used to generate corresponding game prompt information according to the game result, and feed back the game prompt information to the client to realize the operation of the text game.
[0107] In a possible implementation, the receiving module 401 is further configured to input the operation information into a control intention model, and output a game control instruction of the client, wherein the game control instruction is a game response instruction and / or a process control instruction.
[0108] In a possible implementation manner, the receiving module 401 is further configured to execute the game process according to the process control instruction when the game control instruction is a process control instruction.
[0109] In one possible implementation, the output module 403 is further used to obtain game data of several text games, and construct game response content corresponding to different game results of each text data as a game response set of the text game; the game data of each text game and the corresponding game response set are input into the first language model, and the output result of each game response set and the output reason corresponding to the output result are obtained in turn; the output result of each game response set and the output reason corresponding to the output result are used as a training data set, and the second language model is trained using the training data set, and the trained second language model is used as a game judgment model.
[0110] In a possible implementation, the output module 403 is also used to obtain the puzzles and answers of several word games, and obtain key information corresponding to the word games according to the answers of each word game; and use the puzzles, answers and key information corresponding to the word games as game data of the word games.
[0111] In a possible implementation, the output module 403 is further used to pre-process the game answer content in the game answer set; the pre-processing includes error correction processing and grammar conversion processing.
[0112] In a possible implementation, the feedback module 404 is also used to determine whether the game judgment model stores game data of the text game played by the client; if not, the puzzle, answer and key information of the text game played by the client are input into the game judgment model.
[0113] The text game implementation system provided in this embodiment can be as follows Figure 4 The text game implementation device shown in , can execute as follows Figure 1-3 All the steps to achieve Chinese word games, and then achieve Figure 1-3 The technical effects achieved by the text game shown are shown in the figure. Figure 1-3 For the sake of brevity, the relevant description is not repeated here.
[0114] The system embodiment described above is merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0115] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, an embodiment of the present application provides an electronic device, including a processor 501, a communication interface 502, a memory 503 and a communication bus 504, wherein the processor 501, the communication interface 502, and the memory 503 communicate with each other through the communication bus 504; the memory 503 is used to store computer programs; the processor 501 is used to execute the program stored in the memory 503, and implement the steps of the word game implementation method provided by any of the above method embodiments:
[0116] Receive operation information from the client and convert the operation information into corresponding game control instructions; when the game control instruction is a game reply instruction, extract the game reply content contained in the game control instruction; input the game reply content into a game judgment model, and output a game result corresponding to the game reply content; generate corresponding game prompt information according to the game result, and feed back the game prompt information to the client to realize the operation of the text game.
[0117] In a possible implementation, the operation information is input into a control intention model, and a game control instruction of the client is output, where the game control instruction is a game response instruction and / or a process control instruction.
[0118] In a possible implementation manner, when the game control instruction is a process control instruction, the game process is executed according to the process control instruction.
[0119] In one possible implementation, game data of several text games are obtained, and game answer contents corresponding to different game results of each text data are constructed as game answer sets of the text games; the game data of each text game and the corresponding game answer set are input into a first language model, and output results of each game answer set and output reasons corresponding to the output results are obtained in turn; the output results of each game answer set and the output reasons corresponding to the output results are used as a training data set, and a second language model is trained using the training data set, and the trained second language model is used as a game judgment model.
[0120] In a possible implementation, the puzzles and answers of several word games are obtained, and key information corresponding to the word games is obtained according to the answers of each word game; the puzzles, answers and key information corresponding to the word games are used as game data of the word games.
[0121] In a possible implementation, the game answer content in the game answer set is preprocessed; the preprocessing includes error correction processing and grammar conversion processing.
[0122] In one possible implementation, it is determined whether the game judgment model stores game data of the word game played by the client; if not, the puzzle, answer and key information of the word game played by the client are input into the game judgment model.
[0123] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0124] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.
[0125] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A method for implementing a word game, characterized in that: include: Receive operation information from the client and convert the operation information into corresponding game control instructions; In the case where the game control instruction is a game reply instruction, extracting the game reply content contained in the game control instruction; Inputting the game answer content into a game judgment model, and outputting a game result corresponding to the game answer content; Corresponding game prompt information is generated according to the game result, and the game prompt information is fed back to the client to realize the operation of the text game.
2. The method according to claim 1, characterized in that The converting the operation information into corresponding game control instructions includes: The operation information is input into the control intention model, and a game control instruction of the client is output, where the game control instruction is a game response instruction and / or a process control instruction.
3. The method according to claim 2, characterized in that The method further comprises: In the case where the game control instruction is a process control instruction, the game process is executed according to the process control instruction.
4. The method according to claim 1, wherein Before inputting the game response content into the game judgment model, the method further includes: Obtaining game data of a plurality of word games, and constructing game answer content corresponding to different game results for each piece of word data as a game answer set for the word game; Inputting the game data of each word game and the corresponding game answer set into the first language model, and sequentially obtaining the output result of each game answer set and the output reason corresponding to the output result; The output results of each game answer set and the output reasons corresponding to the output results are used as a training data set, the training data set is used to train the second language model, and the trained second language model is used as a game judgment model.
5. The method according to claim 4, characterized in that The step of obtaining game data of a plurality of word games includes: Obtaining the puzzles and answers of several word games, and obtaining key information corresponding to the word games according to the answers of each word game; The puzzle, answer and key information corresponding to the word game are used as the game data of the word game.
6. The method according to claim 4, characterized in that Before inputting the game data of each word game and the corresponding game answer set into the first language model, the method further includes: pre-processing the game answer content in the game answer set; The preprocessing includes error correction processing and grammar conversion processing.
7. The method according to claim 1, characterized in that Before outputting the game result corresponding to the game answer content, the method further includes: Determining whether the game determination model stores game data of a text game played by the client; If not stored, the puzzle, answer and key information of the word game played by the client are input into the game judgment model.
8. A text game implementation system, characterized in that: include: A receiving module, configured to receive operation information from a client and convert the operation information into corresponding game control instructions; an extraction module, configured to extract game response content contained in the game control instruction when the game control instruction is a game response instruction; An output module, configured to input the game response content into a game judgment model and output a game result corresponding to the game response content; The feedback module is used to generate corresponding game prompt information according to the game results and feed back the game prompt information to the client to realize the operation of the text game.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the word game implementation method according to any one of claims 1 to 7 are implemented.
10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the word game implementation method according to any one of claims 1 to 7 are implemented.
