Model training method, game plot information generation method, device and equipment
By processing the plot introduction information of multimedia files, the game background setting information is generated and the game plot generation model is trained, the problem of automatically generating plot options games is solved, the labor cost and writing time is reduced, and the interactiveness and logical coherence of the game is improved.
Patent Information
- Application Number
- CN202510833914.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-20
- Publication Date
- 2025-08-19
AI Technical Summary
It is difficult for the existing technology to automatically generate game plots and options for plot options, resulting in high labor costs and long writing.
By obtaining the plot introduction information of the multimedia file, processing and generating game background setting information and data prompt information, training the game plot generation model, and generating game plot and options.
It reduces labor cost investment, reduces background setting writing time, and realizes the interactive diversity, logical coherence and player immersion of plot options games.
Smart Images

Figure CN120502098A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a model training method, a method, a device and an apparatus for generating game plot information. Background Art
[0002] Some baseline apps (Applications) feature a non-player character (NPC) plaza in the discovery section. After entering the plaza and chatting with the NPC, users can also enter a text game section, increasing conversation turns and boosting user engagement.
[0003] The goal of a story-based option game is to achieve a certain set value (such as intimacy, wealth, fame, etc.) to achieve victory. The game process is as follows: 1) A story and three options are generated based on the initial scene. 2) After the user selects an option or enters their own input, a corresponding story is generated based on the option and the score. This process repeats until the user reaches the victory or failure conditions.
[0004] How to automatically generate game plots and options for plot-option games is a problem that needs to be solved urgently. Summary of the Invention
[0005] The purpose of the embodiments of this application is to provide a model training method, a method, apparatus, and device for generating game plot information, which generates game plots and options using a trained game plot generation model to implement plot option games. The specific technical solution is as follows:
[0006] In a first aspect of the present application, a model training method is first provided, comprising:
[0007] Get the plot summary information of the specified multimedia file;
[0008] Processing the generated game background setting prompt information corresponding to the plot introduction information and the plot introduction information to obtain game background setting information;
[0009] Processing the generated game data prompt information corresponding to the game background setting information and the game background setting information to obtain model training data;
[0010] The model training data is used to train the game plot generation model to be trained to obtain a game plot generation model, which is used to generate game plots and options.
[0011] In a second aspect of the present application, a method for generating game plot information is provided, comprising:
[0012] Obtaining game background setting information selected by the user, and using the game background setting information as model input information;
[0013] Inputting the model input information into a game plot generation model, wherein the game plot generation model is trained using the above-mentioned game plot generation model training method;
[0014] Calling the game plot generation model to process the game background setting information to obtain game plot information and game option information corresponding to the game plot information;
[0015] determining a game score of the user according to target game option information selected by the user from the game option information;
[0016] using the game plot information, the target game option information, and the game score as model input information;
[0017] The step of inputting the model input information into the game plot generation model, and the step of using the game plot information, the target game option information and the game score as model input information are iteratively executed until the game score reaches a set condition.
[0018] In a third aspect of the present application, a model training device is provided, comprising:
[0019] A plot summary information acquisition module is used to obtain plot summary information of a specified multimedia file;
[0020] A game background setting acquisition module, configured to process the generated game background setting prompt information corresponding to the plot introduction information and the plot introduction information to obtain the game background setting information;
[0021] A model training data set acquisition module is used to process the generated game data prompt information corresponding to the game background setting information and the game background setting information to obtain model training data;
[0022] The game plot generation model training module is used to use the model training data to train the game plot generation model to be trained to obtain a game plot generation model, and the game plot generation model is used to generate game plots and options.
[0023] In a fourth aspect of the present application, a device for generating game plot information is provided, comprising:
[0024] An information acquisition module, configured to acquire game background setting information selected by a user and use the game background setting information as model input information;
[0025] An information input module, configured to input the model input information into a game plot generation model, wherein the game plot generation model is trained using the above-mentioned game plot generation model training method;
[0026] A plot acquisition module, configured to call the game plot generation model to process the game background setting information to obtain game plot information and game option information corresponding to the game plot information;
[0027] a score determination module, configured to determine a game score of the user based on target game option information selected by the user from the game option information;
[0028] An input acquisition module, configured to use the game plot information, the target game option information, and the game score as model input information;
[0029] The iterative execution module is used to iteratively execute the information input module, the plot acquisition module, the score determination module and the input acquisition module until the game score reaches a set condition.
[0030] In another aspect of the present application, an electronic device is provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;
[0031] Memory for storing computer programs;
[0032] The processor is used to implement any of the above-mentioned model training methods or game plot information generation methods when executing the program stored in the memory.
[0033] In another aspect of the implementation of the present application, a computer-readable storage medium is provided, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer executes any of the above-mentioned model training methods or game plot information generation methods.
[0034] In another aspect of the implementation of the present application, a computer program product comprising instructions is also provided, on which a computer program is stored. When the computer program is run on a computer, the computer executes any of the above-mentioned model training methods or game plot information generation methods.
[0035] This embodiment of the present application generates game background setting information by combining game background setting prompts and plot summary information, eliminating the need for manual editing of game background setting information. This reduces labor costs and the time required for setting editing. Furthermore, the trained game plot generation model can automatically generate game plots and options for plot-based options games, meeting the requirements for interactive diversity, logical coherence, and player immersion in plot-based options games. 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 following briefly introduces the drawings required for use in the embodiments or the description of the prior art.
[0037] Figure 1 A flowchart of the steps of a model training method provided in an embodiment of the present application;
[0038] Figure 2 A flowchart of a method for obtaining game background setting information provided in an embodiment of the present application;
[0039] Figure 3 A flowchart of a method for generating game background setting information provided in an embodiment of the present application;
[0040] Figure 4 A flowchart of the steps of a method for obtaining model training data provided in an embodiment of the present application;
[0041] Figure 5 A flowchart of the steps of a game plot generation model training method provided in an embodiment of the present application;
[0042] Figure 6 A flowchart of a method for deploying a game plot generation model provided in an embodiment of the present application;
[0043] Figure 7 A flowchart of a method for obtaining plot summary information provided in an embodiment of the present application;
[0044] Figure 8 A flowchart of a method for generating game plot information provided in an embodiment of the present application;
[0045] Figure 9 A schematic diagram of a process flow for a plot option game provided in an embodiment of the present application;
[0046] Figure 10 A schematic diagram of the structure of a model training device provided in an embodiment of the present application;
[0047] Figure 11 A schematic diagram of the structure of a device for generating game plot information provided in an embodiment of the present application;
[0048] Figure 12 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0049] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0050] Figure 1 A flowchart of the steps of a model training method provided in an embodiment of the present application is shown as follows: Figure 1 As shown, the model training method may include: step 101, step 102, step 103 and step 104.
[0051] Step 101: Obtain plot summary information of a specified multimedia file.
[0052] In this embodiment, the designated multimedia file may be a multimedia file such as a TV series, a movie, a short video, or a novel.
[0053] A plot synopsis is a brief but comprehensive description of the main plot and content of a multimedia file, such as a television series or movie. It aims to convey the core story elements, including the main characters, setting, key events, conflict, and resolution, to viewers or readers, allowing them to quickly understand the plot and decide whether to watch the show.
[0054] When training the game plot generation model, the plot summary information of the specified multimedia file can be obtained. Specifically, the multimedia files can be first obtained from the media file database, and the multimedia files with higher popularity can be screened out as the specified multimedia files according to the popularity attributes of the multimedia files, and the plot summary information of the specified multimedia files can be obtained. Among them, the plot summary information can be stored in the database in advance in association with the specified multimedia files. It can also be obtained from an external data source based on the specified multimedia file (such as using a web crawler to obtain a public plot summary from the platform corresponding to the specified multimedia file, etc.). This embodiment does not limit the method for obtaining the plot summary information. This implementation process can be combined with the following embodiments. Figure 7 The present embodiment will be described in detail and will not be described in detail here.
[0055] After the plot summary information of the specified multimedia file is obtained, step 102 is executed.
[0056] Step 102: Process the game background setting prompt information corresponding to the generated plot summary information and the plot summary information to obtain game background setting information.
[0057] Game setting prompts refer to prompts used to guide the large language model in generating game setting information. In this example, game setting prompts refer to prompts or instructions used to generate game setting information. They may include key information or requirements, such as the time, location, world view, and main characters of the story. This information will serve as the basis for generating the game setting information.
[0058] Game background information refers to the basic settings created for the game, such as the historical background, main characters and their relationships. This information is an important part of game design, and together they build a complete game scene.
[0059] After obtaining the plot summary information of the specified multimedia file, the game background setting prompt information and the plot summary information corresponding to the generated plot summary information can be processed to obtain the game background setting information. Specifically, the game background setting prompt information can be generated by first analyzing the plot keywords obtained from the plot summary information, and then the game background setting information can be generated by using the background setting generation model. This implementation process will be combined with the following embodiments. Figure 2 The present embodiment will be described in detail and will not be described in detail here.
[0060] After the game background setting prompt information and the plot summary information corresponding to the generated plot summary information are processed to obtain the game background setting information, step 103 is executed.
[0061] Step 103: Process the generated game data prompt information corresponding to the game background setting information and the game background setting information to obtain model training data.
[0062] Game data prompt information refers to prompt information used to guide the model to generate a specific type of game data, and this specific type of game data is the model training data.
[0063] After obtaining the game background setting information, the game data prompt information corresponding to the game background setting information can be obtained, and the game data prompt information and the game background setting information can be processed to obtain model training data. Specifically, the game data prompt information and the game background setting information can be processed by the data generation model to obtain model training data. This implementation process will be combined with the following embodiments. Figure 4 A detailed description is given, and this embodiment is not limited to this.
[0064] After the game data prompt information and the game background setting information corresponding to the generated game background setting information are processed to obtain model training data, step 104 is executed.
[0065] Step 104: Using the model training data, the game plot generation model to be trained is trained to obtain a game plot generation model, which is used to generate game plots and options.
[0066] After the game data prompt information and the game background setting information corresponding to the generated game background setting information are processed to obtain model training data, the model training data can be used to train the game plot generation model to be trained to obtain a game plot generation model for generating game plots and options. The training process of the game plot generation model will be combined with the following embodiments. Figure 5 The present embodiment will be described in detail and will not be described in detail here.
[0067] This embodiment of the present application generates game background setting information by combining game background setting prompts and plot summary information, eliminating the need for manual editing of game background setting information. This reduces labor costs and the time required for setting editing. Furthermore, the trained game plot generation model can automatically generate game plots and options for plot-based options games, meeting the requirements for interactive diversity, logical coherence, and player immersion in plot-based options games.
[0068] Next, combine Figure 2 The process of obtaining game background setting information is described in detail.
[0069] Reference Figure 2 , shows a flowchart of the steps of a method for obtaining game background setting information provided by an embodiment of the present application. Figure 2 As shown, the method for obtaining game background setting information may include: step 201, step 202 and step 203.
[0070] Step 201: parse the plot summary information to obtain a parsing result.
[0071] In this embodiment, after obtaining the plot synopsis information of a specified multimedia file, the plot synopsis information can be parsed to obtain parsing results. Specifically, irrelevant characters in the plot synopsis information, such as special symbols, can be removed, and the plot synopsis text can be split into independent words for subsequent analysis. Then, the split words can be converted to a unified format, such as lowercase processing, to eliminate the impact of text differences on the analysis. Furthermore, the converted words can be identified to obtain parsing results. The parsing results may include: main characters (main characters or characters mentioned in the plot synopsis, etc.), story background (the time, place and background environment of the story), plot development (the main turning points and development context of the story), etc., as well as emotional tendency (the emotional color expressed in the plot synopsis, such as positive, negative or neutral, etc.), theme (the core theme or central idea of the story), etc.
[0072] Named Entity Recognition (NER) technology can be used to identify information such as people, roles, and locations from the converted words. Regular expressions or models can be used to extract time information from the converted words. Context can be identified from the converted words using keyword matching or text classification models.
[0073] Plot development information can be obtained by first identifying the subject, object, and temporal relationships of the action from the converted words through semantic role labeling to extract key events. A temporal relationship model is then used to analyze the sequence of key events and construct the plot context. Finally, extractive summarization (extracting key sentences) or generative summarization (generating summary sentences) is used to locate plot turning points (such as "the protagonist's sudden betrayal" or "the truth is revealed").
[0074] The sentiment tendency information can be calculated by counting the frequencies of positive words and negative words in the converted words based on the sentiment dictionary.
[0075] The topic can be extracted from the converted words using a topic model (such as LDA (Latent Dirichlet Allocation)) (such as "technology", "ancient costume", etc.).
[0076] It can be understood that the above-mentioned method of obtaining the analysis results is only an example listed to better understand the technical solution of the embodiment of the present application, and is not the only limitation to this embodiment.
[0077] After parsing the plot summary information to obtain the parsing result, step 202 is executed.
[0078] Step 202: Generate the game background setting prompt information based on the plot keywords extracted from the analysis results.
[0079] After parsing the plot summary information to obtain parsing results, plot keywords can be extracted from the parsing results, and game background setting prompt information can be generated based on the plot keywords.
[0080] In a specific implementation, a prompt generation template may be pre-set, and after extracting plot keywords, the plot keywords are filled into the template to generate game background setting prompt information.
[0081] Of course, a pre-trained background setting prompt information generation model can also be processed to obtain game background setting prompt information. That is, the plot keywords extracted from the parsing results are processed by the background setting prompt information generation model to generate game background setting prompt information. Specifically, the plot keywords can first be cleaned and standardized to remove redundant information and ensure the accuracy and representativeness of the keywords. Then, the pre-processed plot keywords can be passed as input to a specially designed background setting prompt information generation model. This model can be a system based on deep learning or natural language generation (NLG) technology. It can capture the essence of the story from the keywords and generate corresponding game background setting prompt information. Based on the input plot keywords, the model generates a series of prompt information related to the game background setting.
[0082] After obtaining the game background setting prompt information, step 203 is executed.
[0083] Step 203: Process the game background setting prompt information and the plot summary information based on the background setting generation model to obtain the game background setting information.
[0084] After obtaining the game background setting prompt information, the game background setting prompt information and the plot summary information can be processed based on the background setting generation model to obtain the game background setting information. Figure 3 The present embodiment will be described in detail and will not be described in detail here.
[0085] The embodiment of the present application automatically generates game background setting prompt information and game background setting information. This process does not require human participation, can reduce labor cost investment, and reduce the time spent on compiling game background setting information.
[0086] Next, combine Figure 3 The implementation process of generating game background setting information is described in detail.
[0087] Reference Figure 3 , shows a flowchart of the steps of a method for generating game background setting information provided by an embodiment of the present application. Figure 3 As shown, the method for generating game background setting information may include: step 301 and step 302.
[0088] Step 301: The game background setting prompt information and the plot introduction information are spliced together to obtain spliced plot information.
[0089] In this embodiment, after obtaining the game background setting prompt information, the game background setting prompt information and the plot introduction information may be spliced together to obtain spliced plot information.
[0090] After the game background setting prompt information and the plot summary information are spliced together to obtain spliced plot information, step 302 is executed.
[0091] Step 302: calling the background setting generation model to extract features from the spliced plot information to obtain background setting requirement features and plot features, and integrating the plot features based on the background setting requirement features to generate the game background setting information.
[0092] After the game background setting prompt information and the plot summary information are spliced together to obtain the spliced plot information, the background setting generation model can be called to extract features from the spliced plot information to obtain background setting requirement features and plot features, and the plot features can be integrated based on the background setting requirement features to generate the game background setting information.
[0093] In this embodiment, the background setting generation model can be a GPT (Generative Pre-trained Transformer) model. GPT is a model based on the Transformer architecture. Transformer is a deep neural network model based on the self-attention mechanism and can effectively process sequence data.
[0094] The model's processing process can be as follows: the spliced plot information obtained by splicing the background setting prompt information and the plot summary information is used as input. The GPT model encodes and decodes the input information through its internal neural network structure to extract key features from the plot. Among the extracted features, features directly related to the game background setting (background setting requirement features) and features related to the development of the story (plot features) are identified and distinguished. Using the background setting requirement features as a guide, the plot features are further integrated to generate the game background setting information.
[0095] The game background setting information may include: game name, option value, initial value, victory condition, failure condition, virtual game character (ie NPC), player character and initial background.
[0096] An example of game background setting information is as follows:
[0097] Game name: "XXX Character A Falls in Love with Me".
[0098] "Option value":{
[0099] "-10": "Character A's favorability towards Character B drops significantly."
[0100] "5": "Character A's favorability towards Character B increases slightly."
[0101] "10":"Character A's favorability towards Character B increases significantly"
[0102] }.
[0103] Initial value: 30.
[0104] "Value name": "Favorability".
[0105] "Victory Condition": "Favorability reaches 100".
[0106] "Failure condition": "Favorability is lower than 0".
[0107] "NPC character": "Character A, lively and cheerful, kind and upright, and loves to stand up for the weak."
[0108] "Player Character": "Character B, the Supervisory Commissioner of Qing Kingdom, appears cynical but is actually thoughtful and values favors."
[0109] "Initial Background": "While wandering around the temple, Character B encounters Character A hiding under the altar eating a chicken leg. Character B is attracted by her innocence and cuteness, so he approaches her and strikes up a conversation with her."
[0110] It can be understood that the above examples are merely examples listed for a better understanding of the technical solutions of the embodiments of the present application, and are not intended to be the sole limitation on the embodiments.
[0111] The embodiment of the present application generates game background setting information through a neural network model, eliminating the need for manual writing of the game background setting information, thereby reducing labor costs and the time spent on writing the game background setting information.
[0112] Next, combine Figure 4 The implementation process of obtaining the model training dataset is described in detail.
[0113] Reference Figure 4 , shows a flowchart of the steps of a method for obtaining a model training data set provided by an embodiment of the present application. Figure 4 As shown, the method for obtaining a model training data set may include: step 401 and step 402.
[0114] Step 401: Input the game data prompt information and the game background setting information into a data-based generation model.
[0115] In this embodiment, after obtaining the game data prompt information and the game background setting information, the game data prompt information and the game background setting information can be input into a data generation model. In this example, the data generation model can be a Transformer-based data generation model. Specifically, the game data prompt information and the game background setting information can be concatenated and the concatenated information can be input into the Transformer-based data generation model.
[0116] After the game data prompt information and the game background setting information are input into the data generation model, step 402 is executed.
[0117] Step 402: Obtain the model training data output by the data generation model after processing the game data prompt information and the game background setting information.
[0118] After the game data prompt information and the game background setting information are input into the data generation model, the data generation model may process the game data prompt information and the game background setting information to obtain model training data.
[0119] In this example, the Transformer-based data generation model can be a GPT model. The model inference process may include:
[0120] First, GPT receives input game data prompts and game background settings and pre-processes them. This includes removing noise such as HTML tags, special characters, incomplete sentences, and eliminating text that contains biased, discriminatory, or inappropriate content. It then performs word segmentation on the cleaned text, converting words or phrases into a format the model can understand, known as tokens (i.e., converting the game data prompts and game background settings into a sequence of tokens), and assigning each token a unique identifier.
[0121] 2. Feature encoding: embedding semantic and position information.
[0122] 1. Word vector generation: The token sequence is mapped into a dense vector through the Eembedding layer of GPT to capture the semantic relationship between tokens.
[0123] 2. Position encoding: Use sine and cosine functions to add position information to each token to distinguish the order of prompt information and background settings (such as background setting first, prompt information later, etc.) to avoid semantic confusion.
[0124] 3. Contextual understanding: semantic association driven by attention mechanism.
[0125] 1. Multi-head attention mechanism: GPT uses a multi-head attention mechanism (such as 12 heads) to calculate the association weight of each token with other tokens to capture long-distance dependencies.
[0126] 2. Cross-information source fusion: The model automatically associates prompt information with the background setting. For example, if the background setting is "a medieval magical world where elves and humans are hostile," when analyzing the prompt "the protagonist encounters an elf," the model will prioritize inferring plots of "conflict" or "distrust."
[0127] 3. Dynamic semantic understanding: The representation of each token is dynamically adjusted based on the context. For example, the vector representation of "staff" in "merchant selling staff" is different from that in "mage wielding staff" to adapt to different semantic scenarios.
[0128] 4. Content generation: logical output based on rules and probabilities.
[0129] Model training data may include: generation reason information, plot option information, and historical plot information.
[0130] The model can output the above information in the following ways:
[0131] 1. Generate reason information: Based on background rules and prompt events, generate causal chains through autoregression to obtain generation reason information.
[0132] 2. Plot option information: With prompt information as the core, combine background constraints to generate diverse options.
[0133] 3. Historical plot information: If the input contains historical plot information, the model uses the attention mechanism to retrieve related events and generate a coherent plot.
[0134] Then, we can combine the information about the reasons for the game, the plot options, and the historical plot to construct a training dataset related to the game. Dataset optimization: By collecting feedback, adjusting hyperparameters, and increasing training data, we can continuously improve the quality and accuracy of the generated training dataset.
[0135] Next, we describe the process of generating model training data with a specific example:
[0136] enter:
[0137] {"Generation Reason":"When a player enters the game for the first time, a coherent plot and options need to be generated based on the set story background."
[0138] "This round's plot": "In the ancient temple, Character B's attention was attracted by a sudden figure. A woman dressed simply but with a bit of playfulness, Character A, was squatting under the altar and secretly eating a fragrant chicken drumstick. Her eyes sparkled with mischief, and the corners of her mouth were stained with oil, but it did not detract from her freshness and refinement. Character B coughed lightly, breaking this little secret moment. Character A was startled and the chicken drumstick almost slipped. She looked up and saw Character B, a flash of panic in her eyes, but it was quickly replaced by her wit and courage. Character B smiled slightly and decided..."
[0139] "options":[
[0140] ["gently rebuke her and remind her that this is inappropriate", -10],
[0141] ["Tease her and hand her a handkerchief to wipe her mouth",5],
[0142] ["Appreciate her boldness and invite her to share the chicken drumstick",10]
[0143] ].
[0144] "Historical Plot": "Character B is wandering around the temple and comes across Character A hiding under the altar eating a chicken leg. This is the first time the two meet."}
[0145] It can be understood that the above examples are merely examples listed for a better understanding of the technical solutions of the embodiments of the present application, and are not intended to be the sole limitation on the embodiments.
[0146] In the embodiments of this application, GPT's input processing flow is a process from data reception, preprocessing, feature capture, context understanding to content generation and training dataset construction. This process fully utilizes the advantages of the Transformer architecture and self-attention mechanism, enabling GPT to efficiently process and understand natural language text and generate high-quality training datasets.
[0147] Next, combine Figure 5 The training process of the game plot generation model is described in detail.
[0148] Reference Figure 5 , shows a flowchart of the steps of a game plot generation model training method provided by an embodiment of the present application. Figure 5 As shown, the game plot generation model training method may include: step 501, step 502, step 503, step 504, step 505 and step 506.
[0149] Step 501: Input the model training data into the game plot generation model to be trained.
[0150] In this embodiment, after obtaining the model training data, the model training data can be input into the game plot generation model to be trained. In this example, the game plot generation model to be trained can be, but is not limited to, a sequence-to-sequence (Seq2Seq) model, a generative adversarial network, a Transformer model, etc.
[0151] After the model training data is input into the game scenario generation model to be trained, step 502 is executed.
[0152] Step 502: Call the game plot generation model to be trained to process the model training data, and output predicted game plot information and game option information corresponding to the predicted game plot information.
[0153] After the model training data is input into the game plot generation model to be trained, the game plot generation model to be trained can be called to process the model training data and output the predicted game plot information and the game option information corresponding to the predicted game plot information. The model output can be as follows:
[0154] Model output:
[0155] {
[0156] "This round's plot": "Character B's words were gentle, but they carried a note of reproach that could not be ignored. A flicker of disappointment flashed across Character A's eyes, and she lowered her head, no longer as lively and playful as before, as if the warm spring sun had been blown away by a sudden cold wind. Character B looked at her slightly dejected figure and felt a little guilty. Then, the two of them walked out of the temple together and came to the bustling market of Qing Kingdom. The market was bustling with people, and the stalls were full of all kinds of goods, and it was very lively. Character B tried to lighten the atmosphere with a light topic, while Character A tried her best to make her smile look natural. In front of a stall selling exquisite jewelry, Character B noticed that Character A's eyes unconsciously lingered on a string of silver hairpins. He gently asked her if she liked it. Character A was stunned for a moment, then shook her head slightly, and pointed to a stall selling sugar figurines, suggesting that they go there to take a look."
[0157] "options":[
[0158] ["Apologize softly, indicating no blame", -10],
[0159] ["Buy that silver hairpin as an apology and try to repair the relationship",5],
[0160] ["Follow her suggestion and go to the sugar figurine stall to get to know each other better",10]
[0161] ].
[0162] It can be understood that the above examples are merely examples listed for a better understanding of the technical solutions of the embodiments of the present application, and are not intended to be the sole limitation on the embodiments.
[0163] After calling the game plot generation model to be trained to process the model training data and outputting the predicted game plot information and the game option information corresponding to the predicted game plot information, step 503 is executed.
[0164] Step 503: Determine the game score of the user based on the target game option information simulated from the game option information.
[0165] After calling the game plot generation model to be trained to process the model training data and outputting the predicted game plot information and the game option information corresponding to the predicted game plot information, the target game option information of the simulated user selection can be obtained from the game option information, wherein the target game option information can be an option randomly selected from multiple game option information, and each option is pre-assigned a corresponding score. Then, the user's game score can be determined based on the simulated selected target game option information (i.e., an option is randomly selected and the game score is obtained based on the score pre-assigned to the option). For example, continuing with the example of step 503 above, there are three options in total, and the corresponding scores are: -10, 5, and 10, respectively. The corresponding scores can be determined by simulating the selected target game options.
[0166] After the game score of the user is determined based on the target game option information simulating the user's selection from the game option information, step 504 is executed.
[0167] Step 504: Use the predicted game plot information, the game score and the plot summary information as model training data; the plot summary information is generated by summarizing the game plot information input to the game plot generation model to be trained before outputting the predicted game plot information.
[0168] The plot summary information can be generated by summarizing the game plot information input into the game plot generation model to be trained before outputting the predicted game plot information. Specifically, after inputting the initial plot information into the game plot generation model to be trained, one model predicted plot and option can be output each time, and the selection can be simulated. When the model outputs the Nth (N is a positive integer) predicted plot, the N-1 plots input previously can be summarized to obtain the plot summary information. If the current round of training has not yet ended (i.e., the final game score has not reached the set conditions), the first N predicted plots output by the model can be summarized, i.e., the N-1 plots and the Nth predicted plot are summarized, and the obtained plot summary information will continue to serve as the input of the model.
[0169] After determining the user's game score based on the target game option information simulating the user's selection from the game option information, the predicted game plot information, the game score, and the plot summary information may be used as model training data.
[0170] Step 505: Iteratively execute the step of inputting the model training data into the game plot generation model to be trained, to the step of using the predicted game plot information, the game score and the plot summary information as model training data, until the game score reaches the set conditions, and the current round of training is completed.
[0171] By iteratively executing the above steps 501 to 504 until the game score reaches the set conditions (such as the game score reaches 100 points, or the game score is 0 points, etc.), the current round of training is completed, that is, a round of model training is completed.
[0172] Step 506: Iteratively execute the step of inputting the model training data into the game plot generation model to be trained, until the step of completing the current round of training, until the training round reaches the set round, and obtain the game plot generation model.
[0173] Steps 501 to 505 complete one round of model training. In the next round of training, new model training data will be used and steps 501 to 505 will be repeated until the game score reaches the set conditions, completing a new round of model training. This process continues until the model training rounds reach the set number, and the game plot generation model is obtained. For example, if the number of rounds is set to 1000, then the model training process will be completed after 1000 game scores reach the set conditions, and the game plot generation model is obtained.
[0174] This embodiment of the application introduces an iterative plot summary input method, where the model outputs a summary of all current plots in each round. This way, the model only needs to input the plot summary and the previous round's plot in each round to output a non-repetitive and coherent plot for the next round. This avoids the problem of the model forgetting previous plots when the game rounds are long, resulting in similar plots. This improves the model's ability to continue the game plot and avoids problems with plot logic and person confusion.
[0175] In an embodiment of the present application, when training a game plot generation model, the model can also be trained using LoRA (Low-Rank Adaptation) fine-tuning. The core idea of LoRA is to approximate the update of parameters in the original model by introducing a low-rank matrix. Specifically, when faced with a large pre-trained model, instead of directly updating all the parameters of the model, some low-rank matrices (usually smaller matrices) are inserted, which are multiplied by the original parameter matrix of the model to achieve fine-tuning of the model output. In this way, LoRA can capture the key information required for specific tasks (such as game plot generation) while avoiding the high computational and storage costs of complete fine-tuning. In addition, because LoRA has fewer parameters, the training speed is also faster and easier to implement with limited resources.
[0176] Next, combine Figure 6 The implementation process of model deployment is described in detail.
[0177] Reference Figure 6 , shows a flowchart of the steps of a game plot generation model deployment method provided by an embodiment of the present application. Figure 6 As shown, the game plot generation model deployment method may include: step 601, step 602 and step 603.
[0178] Step 601: quantize the game plot generation model using a model quantization tool. The quantization process includes model loading, weight and activation value quantization.
[0179] In this embodiment, after the game plot generation model is trained, the game plot generation model can be quantized by a quantization tool. The quantization process includes: model loading, weight and activation value quantization. Specifically, you can first download and install the GPTQ quantization tool, which is usually an open source Python library for quantizing pre-trained deep learning models. Then, you can load the game plot generation model into the GPTQ quantization tool and set the quantization parameters according to the requirements of the GPTQ quantization tool, such as the number of quantization bits (usually 4 bits or less), quantization strategy, etc. During the quantization process, the GPTQ quantization tool will quantize the weights and activation values of the model to reduce the storage space and computational complexity of the model.
[0180] After the game plot generation model is quantified using a model quantization tool, step 602 is executed.
[0181] Step 602: The quantized model is tested based on the test data set. After the test passes, a quantized game plot generation model is obtained.
[0182] After the game plot generation model is quantized using a model quantization tool, the quantized model can be tested based on a test dataset. After passing the test, a quantized game plot generation model is obtained. Specifically, the quantized model can be verified using a test dataset to ensure that its performance (such as accuracy and generation speed) meets the requirements. If the performance degrades too much, it is necessary to adjust the quantization parameters or retrain the model to obtain a quantized game plot generation model.
[0183] After obtaining the quantitative game plot generation model, step 603 is executed.
[0184] Step 603: Load the quantitative game plot generation model into the large language model framework to complete model deployment.
[0185] After obtaining the quantized game plot generation model, the quantized game plot generation model can be loaded into a large language model framework (such as the vLLM framework (an open source large model inference acceleration framework), etc.) to complete the model deployment. Specifically, you can first download and install the vLLM framework to ensure that it is compatible with the GPTQ quantized model, and configure the relevant parameters and paths, such as model path, input and output formats, according to the documentation of the vLLM framework. Then, the GPTQ quantized game plot generation model can be loaded into the vLLM framework to ensure that the vLLM framework can correctly parse and load the quantized model file. Then, according to the documentation of the vLLM framework, the loaded model can be optimized, such as adjusting the inference parameters, using GPU acceleration, etc.
[0186] In the embodiment of the present application, since the number of tokens output is generally above 300, the inference speed of INT8 or NF4 using online quantization is slow (12 tokens / s), and the user waiting time is long (>25s). Therefore, the gptq offline quantization + vLLM framework solution can be used to accelerate forward reasoning. At the same time, it can be deployed in a streaming manner to shorten the time users wait for responses.
[0187] Next, combine Figure 7 The process of obtaining the plot summary information of a specified multimedia file is described in detail.
[0188] Reference Figure 7 , shows a flowchart of the steps of a method for obtaining plot summary information provided by an embodiment of the present application. Figure 7 As shown, the method for obtaining plot summary information may include: step 701, step 702, step 703 and step 704.
[0189] Step 701: Acquire multimedia files from a media database.
[0190] In this embodiment, the media database refers to a database for storing multimedia files.
[0191] When acquiring a specified multimedia file, the multimedia file may be first acquired from a media database.
[0192] After the multimedia file is acquired from the media database, step 702 is executed.
[0193] Step 702: Obtain the file popularity attribute of the multimedia file. The file popularity attribute refers to a quantitative indicator for measuring the popularity of the multimedia file.
[0194] The file heat attribute refers to a quantitative indicator that measures the popularity of multimedia files. After obtaining the multimedia file from the media database, the file heat attribute of the multimedia file can be obtained. Among them, the file heat attribute can be calculated from multi-dimensional heat indicators. For example, for video files, the file heat attribute of the multimedia file can be calculated from indicators of dimensions such as user interaction indicators (play volume, completion rate, interaction volume (such as likes, favorites, etc.)), dissemination and recommendation indicators (such as platform recommendation level (such as homepage recommendation, category page recommendation, etc.), external dissemination volume (i.e., the number of video forwardings on third-party platforms), etc.).
[0195] After the file heat attribute of the multimedia file is obtained, step 703 is executed.
[0196] Step 703: Filter out the designated multimedia files whose file heat attribute is greater than a heat attribute threshold from the multimedia files.
[0197] The heat attribute threshold refers to a predefined threshold for screening the file heat attribute of a specified multimedia file. The specific value of the heat attribute threshold can be determined according to actual conditions, and this embodiment does not impose any limitation on this.
[0198] After obtaining the file heat attribute of the multimedia file, the file heat attribute can be compared with the heat attribute threshold, and then the specified multimedia files whose file heat attribute is greater than the heat attribute threshold are screened out from the multimedia files.
[0199] After the designated multimedia file is screened out from the multimedia files, step 704 is executed.
[0200] Step 704: Obtain plot summary information of the specified multimedia file.
[0201] After selecting a specified multimedia file from the multimedia files, plot synopsis information for the specified multimedia file can be obtained. Specifically, the plot synopsis information can be pre-stored in a database in association with the specified multimedia file. Alternatively, the plot synopsis information can be obtained from an external data source based on the specified multimedia file (e.g., using a web crawler to obtain a publicly available plot synopsis from the platform corresponding to the specified multimedia file). This embodiment does not limit the method for obtaining the plot synopsis information.
[0202] The embodiment of the present application obtains plot summaries of popular multimedia files to generate model training data. By learning this data, the model can generate plots that better meet the player's expectations, further enhancing the player's immersion and game stickiness.
[0203] This embodiment of the present application generates game background setting information by combining game background setting prompts and plot summary information, eliminating the need for manual editing of game background setting information. This reduces labor costs and the time required for setting editing. Furthermore, the trained game plot generation model can automatically generate game plots and options for plot-based options games, meeting the requirements for interactive diversity, logical coherence, and player immersion in plot-based options games.
[0204] Reference Figure 8 , shows a flowchart of the steps of a method for generating game plot information provided by an embodiment of the present application. Figure 8 As shown, the game plot information generation method may include: step 801, step 802, step 803, step 804, step 805 and step 806.
[0205] Step 801: Obtain game background setting information selected by the user, and use the game background setting information as model input information.
[0206] In this embodiment, when the user chooses to play a plot option game, the game background setting information selected by the user can be obtained. In actual application, when the user uses an application, the application can provide a visual interface through which the game background setting information selected by the user can be obtained.
[0207] After obtaining the game background setting information selected by the user, the game background setting information selected by the user may be used as model input information.
[0208] Step 802: Input the model input information into a game plot generation model, and the game plot generation model is trained using the above-mentioned game plot generation model training method.
[0209] After obtaining the model input information, the model input information can be input into a game plot generation model. The game plot generation model can be trained using the above-mentioned game plot generation model training method.
[0210] Step 803: Call the game plot generation model to process the game background setting information to obtain game plot information and game option information corresponding to the game plot information.
[0211] After the model input information is input into the game plot generation model, the game plot generation model can be called to process the game background setting information to obtain the game plot information and the game option information corresponding to the game plot information.
[0212] Step 804: Determine the game score of the user according to the target game option information selected by the user from the game option information.
[0213] After obtaining the game plot information and the corresponding game option information output by the game plot generation model, the game plot information and the corresponding game option information can be displayed to the user so that the user can select an option from the game option information.
[0214] After obtaining the target game option information selected by the user from the game option information, the user's game score can be determined based on the target game option information selected by the user. It is understood that different game options are pre-assigned corresponding scores. After obtaining the target game option information selected by the user, the user's game score can be determined based on the pre-assigned score of the target game option information.
[0215] Step 805: Use the game plot information, the target game option information, and the game score as model input information.
[0216] Step 806: Iteratively execute the step of inputting the model input information into the game plot generation model, to the step of using the game plot information, the target game option information and the game score as model input information, until the game score reaches the set condition.
[0217] After determining the user's game score, the game plot information, target game option information, and game score can be used as model input to generate the next round of game plot and options. That is, starting from the second round, each plot output by the game plot generation model is a continuation of the previous output, generating a complete game continuation plot.
[0218] That is, the above steps 802 to 805 are iteratively executed until the game score reaches the set condition (such as the game score reaches 100 points, or the game score is 0 points, etc.), and the plot option game ends.
[0219] The embodiment of the present application continuously generates plot content that increasingly meets the needs by converting user choices into part of the model input, and at the same time guides users to explore the preset narrative framework through a scoring mechanism, thereby improving user stickiness.
[0220] Next, combine Figure 9 A detailed description of the game processing flow for plot options. Figure 9 As shown, the numerical option model is the game plot generation model in this embodiment. When a player plays a plot option game, they can obtain the player's selected background setting information and input it into the numerical option model. The numerical option model can output the current round's plot and corresponding plot options. The user can then select from the plot options and obtain a game score based on the selected options. Starting from the second round, each plot output by the numerical option model is a continuation of the previous round's output. That is, the current round's plot, the user's selected options, and the score can be used as input for the next round (i.e., the second round's input). The numerical option model processes the second round's input and outputs the second round's plot and plot options for the second round. The user can then select from the plot options for the second round and obtain a game score based on the selected options. Subsequently, the historical plot (i.e., a summary of the first and second rounds), the user's selected plot options for the second round, and the game score can be used as model input for the next round to obtain the next round's output. This process continues until the game score reaches a set value (e.g., 100 points or 0 points), at which point the plot option game ends.
[0221] In this process, after entering the AI NPC character square, users can engage in plot-based options games. Alternatively, during the conversation between the user and the character, the user may be invited to engage in plot-based options games. This makes character dialogues more playable, increases the number of conversation rounds, and enhances user engagement. The introduction of a plot summary mechanism enhances the model's ability to continue storytelling, providing guidance for subsequent attempts at large-scale model-based storyline generation.
[0222] Reference Figure 10 , shows a structural diagram of a model training device provided in an embodiment of the present application, such as Figure 10 As shown, the model training device 1000 may include the following modules:
[0223] A plot summary information acquisition module 1010 is used to acquire plot summary information of a specified multimedia file;
[0224] A game background setting acquisition module 1020 is configured to process the generated game background setting prompt information corresponding to the plot summary information and the plot summary information to obtain the game background setting information;
[0225] A model training data set acquisition module 1030 is configured to process the generated game data prompt information corresponding to the game background setting information and the game background setting information to obtain model training data;
[0226] The game plot generation model training module 1040 is used to use the model training data to train the game plot generation model to be trained to obtain a game plot generation model, and the game plot generation model is used to generate game plots and options.
[0227] Optionally, the game background setting acquisition module includes:
[0228] A parsing result obtaining unit, configured to parse the plot summary information and obtain a parsing result;
[0229] a prompt information generating unit, configured to generate the game background setting prompt information based on the plot keywords extracted from the analysis result;
[0230] The game background setting acquisition unit is used to process the game background setting prompt information and the plot summary information based on the background setting generation model to obtain the game background setting information.
[0231] Optionally, the game background setting acquisition unit includes:
[0232] A splicing plot information acquisition subunit is used to splice the game background setting prompt information and the plot introduction information to obtain spliced plot information;
[0233] A background setting generation subunit is configured to call the background setting generation model to perform feature extraction on the spliced plot information to obtain background setting requirement features and plot features, and integrate the plot features based on the background setting requirement features to generate the game background setting information;
[0234] The game background setting information includes: game name, option value, initial value, victory condition, failure condition, virtual game character, player character and initial background.
[0235] Optionally, the model training data set acquisition module includes:
[0236] An information input unit, configured to input the game data prompt information and the game background setting information into a data generation model;
[0237] a model training data acquisition unit, configured to acquire the model training data output by the data generation model after processing the game data prompt information and the game background setting information;
[0238] The model training data includes: generation reason information, plot option information and historical plot information.
[0239] Optionally, the game plot generation model training module includes:
[0240] A model data input unit, used to input the model training data into the game plot generation model to be trained;
[0241] A prediction information output unit, configured to call the game plot generation model to be trained to process the model training data, and output predicted game plot information and game option information corresponding to the predicted game plot information;
[0242] a game score obtaining unit, configured to determine a game score of a user based on target game option information simulated from the game option information;
[0243] a model data acquisition unit, configured to use the predicted game plot information, the game score, and the plot summary information as model training data; wherein the plot summary information is generated by summarizing the game plot information input to the game plot generation model to be trained before outputting the predicted game plot information;
[0244] an iterative execution unit, configured to iteratively execute the model data input unit, the prediction information output unit, the game score acquisition unit, and the model data acquisition unit until the game score reaches a set condition, thereby completing the current round of training;
[0245] The game plot generation model acquisition unit is used to iteratively execute the model data input unit, the prediction information output unit, the game score acquisition unit, the model data acquisition unit and the iterative execution unit until the training round reaches the set round to obtain the game plot generation model.
[0246] Optionally, the device further comprises:
[0247] A model quantization module is used to quantize the game plot generation model using a model quantization tool. The quantization process includes: model loading, weight and activation value quantization;
[0248] The quantitative model acquisition module is used to test the quantized model based on the test data set. After the test passes, the quantitative game plot generation model is obtained;
[0249] The model loading module is used to load the quantitative game plot generation model into the large language model framework to complete the model deployment.
[0250] Optionally, the plot summary information acquisition module includes:
[0251] A media file acquisition unit, configured to acquire multimedia files from a media database;
[0252] a popularity attribute acquisition unit, configured to acquire a file popularity attribute of the multimedia file, wherein the file popularity attribute refers to a quantitative index for measuring the popularity of the multimedia file;
[0253] a designated file screening unit, configured to screen out the designated multimedia files whose file heat attribute is greater than a heat attribute threshold from the multimedia files;
[0254] The plot summary obtaining unit is used to obtain plot summary information of the specified multimedia file.
[0255] This embodiment of the present application generates game background setting information by combining game background setting prompts and plot summary information, eliminating the need for manual editing of game background setting information. This reduces labor costs and the time required for setting editing. Furthermore, the trained game plot generation model can automatically generate game plots and options for plot-based options games, meeting the requirements for interactive diversity, logical coherence, and player immersion in plot-based options games.
[0256] Reference Figure 11 , shows a schematic diagram of the structure of a game plot information generating device provided by an embodiment of the present application. Figure 11 As shown, the game plot information generating device 1100 may include the following modules:
[0257] An information acquisition module 1110 is configured to acquire game background setting information selected by a user and use the game background setting information as model input information;
[0258] An information input module 1120 is configured to input the model input information into a game plot generation model, wherein the game plot generation model is trained using any of the above-mentioned training methods for a game plot generation model;
[0259] The plot acquisition module 1130 is used to call the game plot generation model to process the game background setting information to obtain game plot information and game option information corresponding to the game plot information;
[0260] A score determination module 1140 is configured to determine the game score of the user based on the target game option information selected by the user from the game option information;
[0261] An input acquisition module 1150 is configured to use the game plot information, the target game option information, and the game score as model input information;
[0262] The iterative execution module 1160 is configured to iteratively execute the information input module, the plot acquisition module, the score determination module, and the input acquisition module until the game score reaches a set condition.
[0263] The embodiment of the present application continuously generates plot content that increasingly meets the needs by converting user choices into part of the model input, and at the same time guides users to explore the preset narrative framework through a scoring mechanism, thereby improving user stickiness.
[0264] The present application also provides an electronic device, such as Figure 12 As shown, it includes a processor 1201, a communication interface 1202, a memory 1203 and a communication bus 1204, wherein the processor 1201, the communication interface 1202, and the memory 1203 communicate with each other through the communication bus 1204.
[0265] Memory 1203, used for storing computer programs;
[0266] The processor 1201 is configured to execute the program stored in the memory 1203, and implement the following steps:
[0267] Get the plot summary information of the specified multimedia file;
[0268] Processing the generated game background setting prompt information corresponding to the plot introduction information and the plot introduction information to obtain game background setting information;
[0269] Processing the generated game data prompt information corresponding to the game background setting information and the game background setting information to obtain model training data;
[0270] The model training data is used to train the game plot generation model to be trained to obtain a game plot generation model, which is used to generate game plots and options.
[0271] The processor 1201 is further configured to implement the following steps when executing the program stored in the memory 1203:
[0272] Obtaining game background setting information selected by the user, and using the game background setting information as model input information;
[0273] Inputting the model input information into a game plot generation model, wherein the game plot generation model is trained using the above-mentioned game plot generation model training method;
[0274] Calling the game plot generation model to process the game background setting information to obtain game plot information and game option information corresponding to the game plot information;
[0275] determining a game score of the user according to target game option information selected by the user from the game option information;
[0276] using the game plot information, the target game option information, and the game score as model input information;
[0277] The step of inputting the model input information into the game plot generation model, and the step of using the game plot information, the target game option information and the game score as model input information are iteratively executed until the game score reaches a set condition.
[0278] The communication bus mentioned in the terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is used in the figure, but this does not mean that there is only one bus or only one type of bus.
[0279] The communication interface is used for communication between the above terminal and other devices.
[0280] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage. Alternatively, the memory may be at least one storage device located away from the processor.
[0281] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.
[0282] In another embodiment provided in the present application, a computer-readable storage medium is also provided, which stores instructions. When the computer-readable storage medium is run on a computer, it enables the computer to execute the model training method described in any of the above embodiments, or the above-mentioned game plot information generation method.
[0283] In another embodiment provided in the present application, a computer program product comprising instructions is also provided, on which a computer program is stored. When the computer program is run on a computer, the computer executes any of the above-mentioned model training methods or the above-mentioned game plot information generation methods.
[0284] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).
[0285] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0286] Each embodiment in this specification is described in a related manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiment is generally similar to the method embodiment, so the description is relatively simple. For related parts, refer to the description of the method embodiment.
[0287] The above description is only a preferred embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the scope of protection of the present application.
Claims
1. A model training method, characterized in that: include: Get the plot summary information of the specified multimedia file; Processing the generated game background setting prompt information corresponding to the plot introduction information and the plot introduction information to obtain game background setting information; Processing the generated game data prompt information corresponding to the game background setting information and the game background setting information to obtain model training data; The model training data is used to train the game plot generation model to be trained to obtain a game plot generation model, which is used to generate game plots and options.
2. The method according to claim 1, characterized in that The step of processing the game background setting prompt information corresponding to the generated plot summary information and the plot summary information to obtain the game background setting information includes: Parsing the plot summary information to obtain a parsing result; Generating the game background setting prompt information according to the plot keywords extracted from the analysis result; The game background setting prompt information and the plot summary information are processed based on a background setting generation model to obtain the game background setting information.
3. The method according to claim 2, characterized in that The background setting generation model is based on processing the game background setting prompt information and the plot summary information to obtain the game background setting information, including: Splicing the game background setting prompt information and the plot summary information to obtain spliced plot information; Calling the background setting generation model to perform feature extraction on the spliced plot information to obtain background setting requirement features and plot features, and integrating the plot features based on the background setting requirement features to generate the game background setting information; The game background setting information includes: game name, option value, initial value, victory condition, failure condition, virtual game character, player character and initial background.
4. The method according to claim 1, wherein The step of processing the game data prompt information corresponding to the generated game background setting information and the game background setting information to obtain model training data includes: Inputting the game data prompt information and the game background setting information into a data generation model; Acquiring the model training data output by the data generation model after processing the game data prompt information and the game background setting information; The model training data includes: generation reason information, plot option information and historical plot information.
5. The method according to claim 1, wherein The method of using the model training data to train the game plot generation model to be trained to obtain the game plot generation model includes: Inputting the model training data into the game plot generation model to be trained; Calling the game plot generation model to be trained to process the model training data, and outputting predicted game plot information and game option information corresponding to the predicted game plot information; determining a game score of the user based on target game option information simulated from the game option information; The predicted game plot information, the game score, and the plot summary information are used as model training data; the plot summary information is generated by summarizing the game plot information input to the game plot generation model to be trained before outputting the predicted game plot information; Iteratively executing the step of inputting the model training data into the game plot generation model to be trained, to the step of using the predicted game plot information, the game score, and the plot summary information as model training data, until the game score reaches a set condition, thereby completing the current round of training; The step of inputting the model training data into the game plot generation model to be trained is iterated to complete the current round of training, until the training round reaches the set round, thereby obtaining the game plot generation model.
6. The method according to claim 1, characterized in that After the model training data is used to train the game plot generation model to be trained to obtain the game plot generation model, the method further includes: Quantizing the game plot generation model using a model quantization tool, including: model loading, weight and activation value quantization; The quantized game plot generation model is tested based on the test data set. After the test passes, the quantized game plot generation model is obtained; The quantitative game plot generation model is loaded into the large language model framework to complete the model deployment.
7. The method according to claim 1, characterized in that The step of obtaining plot summary information of a specified multimedia file includes: Get multimedia files from the media database; Obtaining a file popularity attribute of the multimedia file, where the file popularity attribute refers to a quantitative indicator for measuring the popularity of the multimedia file; Filtering the designated multimedia files whose file heat attribute is greater than a heat attribute threshold from the multimedia files; Get the plot summary information of the specified multimedia file.
8. A method for generating game plot information, characterized in that: include: Obtaining game background setting information selected by the user, and using the game background setting information as model input information; Inputting the model input information into a game plot generation model, wherein the game plot generation model is trained by the game plot generation model training method according to any one of claims 1 to 7; Calling the game plot generation model to process the game background setting information to obtain game plot information and game option information corresponding to the game plot information; determining a game score of the user according to target game option information selected by the user from the game option information; using the game plot information, the target game option information, and the game score as model input information; The step of inputting the model input information into the game plot generation model, and the step of using the game plot information, the target game option information and the game score as model input information are iteratively executed until the game score reaches a set condition.
9. A model training device, characterized in that: include: A plot summary information acquisition module is used to obtain plot summary information of a specified multimedia file; A game background setting acquisition module, configured to process the generated game background setting prompt information corresponding to the plot introduction information and the plot introduction information to obtain the game background setting information; A model training data set acquisition module is used to process the generated game data prompt information corresponding to the game background setting information and the game background setting information to obtain model training data; The game plot generation model training module is used to use the model training data to train the game plot generation model to be trained to obtain a game plot generation model, and the game plot generation model is used to generate game plots and options.
10. A device for generating game plot information, characterized in that: include: An information acquisition module, configured to acquire game background setting information selected by a user and use the game background setting information as model input information; An information input module, configured to input the model input information into a game plot generation model, wherein the game plot generation model is trained by the game plot generation model training method according to any one of claims 1 to 7; A plot acquisition module, configured to call the game plot generation model to process the game background setting information to obtain game plot information and game option information corresponding to the game plot information; a score determination module, configured to determine a game score of the user based on target game option information selected by the user from the game option information; An input acquisition module, configured to use the game plot information, the target game option information, and the game score as model input information; The iterative execution module is used to iteratively execute the information input module, the plot acquisition module, the score determination module and the input acquisition module until the game score reaches a set condition.
11. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory for storing computer programs; A processor, configured to implement the method steps described in any one of claims 1 to 8 when executing a program stored in a memory.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
13. A computer program product comprising instructions, on which a computer program is stored, characterized in that When the computer program is run on a computer, the computer is caused to execute the method according to any one of claims 1 to 8.
Citation Information
Cited By
Picture book generation method and device, electronic equipment and storage medium
CN121962351A