Game interaction method, device and equipment based on large language model and storage medium
By using a game interaction method based on a large language model, players can generate dynamic storylines within the framework of plot structure information, enabling free dialogue and interaction. This solves the problem of limited interactive behavior in existing story-driven games, and enhances the game's playability and player experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NETEASE (HANGZHOU) NETWORK CO LTD
- Filing Date
- 2026-01-04
- Publication Date
- 2026-04-24
AI Technical Summary
In existing story-driven games, player interaction is limited to specific points, making true free dialogue impossible and resulting in low replayability.
The game interaction method based on a large language model is adopted. It generates initial plot details by acquiring plot structure information and generates target plot information in real time in response to player input. Players are allowed to have free dialogue and interaction under the plot direction indicated by the plot structure information.
It lowers the barrier to script creation, enhances the flexibility and playability of player interaction in the game, achieves true free dialogue, and improves the game experience.
Smart Images

Figure CN121911086A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and more specifically, to a game interaction method, apparatus, device, and storage medium based on a large language model. Background Technology
[0002] In story-driven games, players, as virtual characters, can choose different options at key points in the game's plot, thereby entering different story branches and achieving different story endings.
[0003] Currently, user interaction in narrative-driven games is generally limited to specific points in time. Players can only choose from existing options and follow a pre-written story path and ending.
[0004] However, in existing story-driven games, player interaction is limited to specific points, making true free dialogue impossible and resulting in low replayability. Summary of the Invention
[0005] The purpose of this application is to address the shortcomings of the prior art by providing a game interaction method, device, equipment, and storage medium based on a large language model, so as to solve the problem that in the prior art, the player's interactive behavior in story-based games is limited to specific nodes, making it impossible to achieve true free dialogue and resulting in low replayability.
[0006] To achieve the above objectives, the technical solution adopted in this application is as follows: Firstly, this application provides a game interaction method based on a large language model, the method comprising: When the current plot node in the target script is triggered, the plot structure information of the current plot node is obtained. The plot structure information includes at least: the ending information of the characters and the plot at the current plot node. The plot structure information is generated in advance based on the creation information of the first user. Generate initial plot details for the current plot node based on the plot structure information; In response to interactive information input by the second user, target plot information is generated based on the interactive information, the initial plot details, and the plot structure information. Based on the target plot information and the plot structure information, execute the target action, which includes: entering the next plot node or ending the target script.
[0007] Secondly, this application provides a game interaction device based on a large language model, the device comprising: The information acquisition module is used to respond to the current plot node in the target script being triggered, and to acquire the plot structure information of the current plot node. The plot structure information includes at least: the ending information of the characters and the plot at the current plot node. The plot structure information is generated in advance based on the creation information of the first user. The initial generation module is used to generate initial plot detail information for the current plot node based on the plot structure information; A real-time generation module is used to respond to interactive information input by a second user and generate target plot information based on the interactive information, the initial plot details, and the plot structure information. The execution module is used to execute target actions based on the target plot information and the plot structure information. The target actions include: entering the next plot node or ending the target script.
[0008] Thirdly, embodiments of this application also provide an electronic device, including: a processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of a game interaction method based on a large language model as described in any one of the first aspects.
[0009] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of a game interaction method based on a large language model as described in any one of the first aspects.
[0010] The beneficial effects of this application are: players in the game can act as script creators, creating scripts simply by inputting plot outline information, thereby lowering the barrier to script creation and increasing the flexibility and convenience of script creation for players. After players enter the game, the plot engine can combine plot structure information and player-input interactive information to generate target plot information in real time. This allows for free dialogue between the player and the plot, ensuring that the plot development conforms to the plot structure information, thus enhancing the flexibility of player interaction in the game, achieving true free dialogue, improving game playability, and ultimately enhancing the player's gaming experience.
[0011] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0012] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0013] Figure 1 A flowchart illustrating a game interaction method based on a large language model provided in an embodiment of this application is shown; Figure 2 This illustration shows an interface diagram of initial plot details provided in an embodiment of this application; Figure 3 This illustration shows an interface diagram of yet another initial plot detail provided in an embodiment of this application; Figure 4 This document illustrates a flowchart of a method for generating target plot information according to an embodiment of this application. Figure 5 This document illustrates a flowchart of a condition determination process provided in an embodiment of this application. Figure 6 This document illustrates a flowchart of a plot objective achievement determination method provided in an embodiment of this application. Figure 7 A flowchart illustrating a script creation method provided in an embodiment of this application is shown; Figure 8 This illustration shows a schematic diagram of an interface for creating a script object according to an embodiment of this application; Figure 9 A schematic diagram of an interface for creating a virtual character is shown in an embodiment of this application; Figure 10 A schematic diagram of an interface for creating virtual props according to an embodiment of this application is shown; Figure 11 A schematic diagram of an interface for creating a story outline is shown in an embodiment of this application; Figure 12 This document illustrates a flowchart of a method for saving plot structure information according to an embodiment of this application. Figure 13 This illustration shows a structural diagram of a game interaction device based on a large language model, according to an embodiment of this application. Figure 14 A schematic diagram of the structure of an electronic device provided in an embodiment of this application is shown. Detailed Implementation
[0014] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0015] It should be noted that the term "comprising" will be used in the embodiments of this application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.
[0016] In one embodiment of this disclosure, the game interaction method based on a large language model can run on a local terminal device or a server. When the game interaction method based on a large language model runs on a server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device.
[0017] In an optional implementation, various cloud applications, such as cloud gaming, can run under the cloud interaction system. Taking cloud gaming as an example, cloud gaming refers to a gaming method based on cloud computing. In the cloud gaming operating mode, the game program's execution and the game screen presentation are separated. The storage and execution of the game interaction method based on the large language model are completed on the cloud gaming server. The client device is used for data reception, transmission, and game screen presentation. For example, the client device can be a display device with data transmission capabilities located close to the user, such as a mobile terminal, television, computer, or PDA; however, the information processing is performed by the cloud gaming server in the cloud. When playing the game, the player operates the client device to send operation commands to the cloud gaming server. The cloud gaming server runs the game according to the operation commands, encodes and compresses the game screen and other data, returns it to the client device via the network, and finally, the client device decodes and outputs the game screen.
[0018] In an optional implementation, taking a game as an example, the local terminal device stores the game program and is used to display the game screen. The local terminal device is used to interact with the player through a graphical user interface (GUI), i.e., conventionally by downloading, installing, and running the game program via an electronic device. The local terminal device can provide the GUI to the player in various ways, such as rendering it on the terminal's display screen or providing it to the player via holographic projection. For example, the local terminal device can include a display screen for displaying the GUI, which includes game screens, and a processor for running the game, generating the GUI, and controlling the display of the GUI on the display screen.
[0019] In one possible implementation, this invention provides a game interaction method based on a large language model, which provides a graphical user interface through a terminal device. The terminal device can be either the aforementioned local terminal device or a client device in the aforementioned cloud interaction system.
[0020] Currently, user interaction in narrative-driven games is generally limited to specific points. The scriptwriters pre-set all the plot points in all chapters, and pre-set the dialogues that players can trigger in the plot and the interactive behaviors that the options at the plot points can trigger. When a plot point is triggered, players can only choose from the existing options and execute the pre-written story direction and ending.
[0021] While existing narrative games do include genres that allow players to freely create scripts, they only support linear scripts. This means that players need to write all the dialogue, interactions, and details of every branch of the plot, making the creation process quite challenging.
[0022] Therefore, in existing story-driven games, player interactions are confined to the detailed framework defined by the script, limiting user choices and impacting the player experience. Furthermore, script creation in story-driven games requires players to write detailed branching scenarios, presenting a high barrier to entry for scriptwriting.
[0023] Based on this, this application proposes a game interaction method based on a large language model. In the scriptwriting stage, players only need to define the general plot structure without needing to write detailed branching scenarios, thus lowering the barrier to script creation. During the game stage, by combining the large language model with plot structure information and player input, dynamic plots can be freely generated and the plot can be advanced within the narrative framework of the plot structure. This increases the flexibility of player choices within the game, thereby enhancing the player's gaming experience.
[0024] First, let's explain story-driven games. Story-driven games generally include multiple virtual characters and multiple chapters. In each chapter, the virtual characters will have dialogues with other virtual characters in the game. Players can choose to become one of the virtual characters and experience the story in the script from the perspective of the virtual character by choosing dialogues or other interactive behaviors until the story ending is triggered, which ends the game script.
[0025] Next, combine Figure 1 This paper describes the overall process of the game interaction method based on a large language model in this application, such as... Figure 1 As shown, the method includes: S101. When the current plot node in the target script is triggered, obtain the plot structure information of the current plot node.
[0026] The plot structure information includes at least the following: character and plot ending information at the current plot node. The plot structure information is generated in advance based on the first user's creation information.
[0027] The first user can be the script creator. Any player in the game can act as the first user, entering the script creation interface through preset options and inputting character settings, script outlines, and other creative information to generate plot structure information. The script creation interface includes multiple sub-interfaces, such as character creation, plot creation, item creation, and branch ending creation interfaces. After inputting the corresponding content in each interface, the terminal can save the user's input as structured plot structure information. This saved information includes, but is not limited to: script identifier, script name, script chapters, chapter names, chapter objectives, and chapter plot details.
[0028] Optionally, the plot structure information refers to the plot framework data that players pre-input during the script creation stage and that is invoked during game execution. Players can pre-input creation information during the script creation stage, and the device generates plot structure information based on the user's input. Creation information refers to the original content and settings entered by the player during script creation, serving as the basic material for generating the plot structure information required for subsequent game execution. This includes character information, items and clues, plot outline, chapter objectives and endings, and basic script information.
[0029] The plot structure information includes: character information, chapter objectives, ending information, items and clues, and contextual background. Character information describes the characters involved in the current plot, including their names, personality traits, background settings, and relationships with other characters. Chapter objectives indicate the goals to be achieved in the current plot. Ending information indicates the consequences of achieving or failing to achieve the objectives. Items and clues refer to important items in the script and their functions. Contextual background indicates the world setting, time, location, and events that have occurred in the current plot. Characters are identified through the aforementioned character information. Chapter objectives and ending information indicate the plot and its conclusion, including the plot outline, chapter objectives, and chapter endings for each chapter.
[0030] The character settings can include the character's name, personality, and profession, such as "a cautious and suspicious eunuch." The plot outline can indicate the general plot direction of each chapter, such as "obtaining the secret letter at the palace banquet." The chapter goal can be the objective to be achieved in this chapter, such as "obtain the secret letter to enter the next chapter." The chapter ending can be the plot ending that can be achieved in this chapter, such as "if the secret letter is not obtained, the first branch ending will be entered - imprisonment."
[0031] Optionally, each chapter may include at least one plot node, which can be a point in the game that triggers branching storylines or advances the main plot, thus achieving the chapter's objective. Players can trigger multiple plot nodes within a chapter through interaction, ultimately completing the chapter's objective.
[0032] Optionally, players can trigger the current plot node after selecting and entering the scenario and performing preset actions. For example, if a player enters the scenario and engages in five rounds of dialogue, or if a player enters the scenario and acquires item A, the current plot node can be triggered, at which point the player can obtain the plot structure information of the current plot node.
[0033] The plot structure information for the current plot node includes: the plot direction of the current plot node, the item clues for the current plot node, the character information for the current plot node, and the ending information for the current plot node.
[0034] S102. Generate initial plot details for the current plot node based on the plot structure information.
[0035] Optionally, the game may include a story engine. The input information of the story engine includes user-inputted interactive information and story structure information. After the player selects and enters the script, the story engine can obtain the story structure information and generate initial story details based on the story structure information.
[0036] The initial plot details can include detailed descriptions of scene scenes, character states, and potential clues, allowing players to quickly immerse themselves in the game scenario.
[0037] It should be noted that the plot structure information can be the script framework data input by the creator, while the initial plot details are plot details created by the plot engine based on the plot structure information. The plot engine can automatically supplement non-framework content such as scene details, character micro-actions, and environmental atmosphere based on the plot structure information, making the plot a perceptible context.
[0038] S103. Respond to the interactive information input by the second user, and generate target plot information based on the interactive information, initial plot details, and plot structure information.
[0039] The second user can be the player who selects a scenario and starts the game. The first and second users can be the same user or different users. That is, after creating a scenario, the creator can choose to enter the scenario and start the game, or they can publish the scenario so that other players can enter the scenario and start the game.
[0040] Optionally, the story engine can generate dialogue with the user, generate and display game screens, or provide multiple options during gameplay. The second user-input interactive information can be text entered by the user, voice entered by the user, options selected by the user on the game interface, or item clues selected by the user on the game screen.
[0041] When a second user enters the script and experiences the current plot node, the plot engine can build an interactive scene based on the plot structure information of the current plot node. After the second user inputs interactive information in the game interface, the plot engine can generate target plot information based on the interactive information input by the second user, using the initial plot details as context and the plot structure information as constraints for plot development.
[0042] Optionally, the target plot information can be the subsequent plot content of the current plot node generated by the plot engine by combining interactive information, plot structure information and initial plot details.
[0043] It should be noted that players can interact with the story engine in multiple rounds during the game. In each round of interaction, the story engine can generate the target story information for the current round in real time based on the interaction information, initial story details, story structure information, and target story information from previous rounds.
[0044] Optionally, interactive information can be feedback input by the player during the game to advance the plot, including options selected by the player from multiple interactive options, text content freely entered by the player in a text box, text content entered by the player through voice input, etc.
[0045] S104. Execute the target action based on the target plot information and plot structure information.
[0046] The target actions include: entering the next plot node or ending the target scenario.
[0047] When players engage in multiple dialogues with the story engine at the current story node, or when selecting a target item at the current story node, the story engine can combine real-time target story information and story structure information to determine whether to trigger the next story node or the story ending.
[0048] Optionally, the plot structure information includes the objective and ending of each chapter. By comparing the objective plot information with the chapter objectives and endings in the plot structure information, it can be determined whether the player's interaction results have achieved the chapter objective. If the chapter objective is achieved, the player proceeds to the next chapter; otherwise, the objective scenario ends.
[0049] In one possible implementation, determining whether a player's interaction results in achieving the chapter objective can be done by comparing whether the clues the player has currently obtained match the clues required in the chapter objective, or by checking if the target plot information contains keywords from the chapter objective, or by checking if the plot direction of the target plot information matches the plot direction in the plot structure information. In these cases, it can be determined that the player has achieved the chapter objective.
[0050] In this embodiment, players in the game can act as script creators, creating scripts simply by inputting a plot outline. This lowers the barrier to script creation and enhances the flexibility and convenience of script creation for players. After players enter the game, the plot engine can generate target plot information in real time by combining plot structure information and player-input interactive information. This allows for free dialogue between the player and the plot, ensuring the plot development aligns with the plot structure information. This enhances the flexibility of player interaction within the game, enabling truly free dialogue, improving gameplay, and ultimately enhancing the player's gaming experience.
[0051] Optionally, the process of obtaining the plot structure information of the current plot node when the above-mentioned response target script is triggered includes: The system responds to the current dialogue meeting preset conditions, determines the trigger of the current plot node, and obtains the plot structure information of the current plot node.
[0052] The preset conditions include at least one of the following: the current dialogue round reaches a preset number threshold, the current dialogue includes preset keywords, and the similarity between the initial plot details and the preset plot information is greater than a preset threshold.
[0053] Optionally, the plot structure information can pre-define the correspondence between plot nodes and virtual characters. This means pre-determining which virtual characters the player can interact with to trigger a plot node, and pre-defining a preset threshold for the number of interactions with each virtual character. If the number of interactions between the player and a preset virtual character in the script reaches the preset threshold, the corresponding plot node for that virtual character can be triggered. For example, if the preset threshold for virtual character A is 3, then the current plot node will be triggered after the player has 5 rounds of interaction with virtual character A in the script. At this point, the plot engine can obtain the plot structure information for the current plot node.
[0054] Preset keywords can be keywords that trigger the current plot node. The preset keywords match the key plot information preset by the first user in the plot structure information. When these keywords appear in the dialogue between the player and the preset virtual character, the current plot node can be triggered.
[0055] For example, assuming the keyword that triggers the plot node "Obtain Evidence from Merchant A" is "edict", then when the keyword "edict" appears in the player's dialogue with the merchant, the plot node "Obtain Evidence from Merchant A" can be triggered.
[0056] Optionally, the story engine can calculate the similarity between the currently generated initial story details and the preset story information in real time. If the similarity exceeds a preset threshold, the current story node is triggered. During real-time interaction between the player and the story engine, the engine can generate new initial story details based on the player's interaction content in the current round and the story details from previous rounds, and compare the similarity between the initial story details and the preset story information. The preset story information can be the story information that triggers story nodes within the story structure information.
[0057] In this embodiment of the application, by constructing preset conditions for the current dialogue, the connection between player dialogue and plot advancement can be established, thereby advancing the plot through player dialogue, avoiding the disorderly triggering of plot nodes, and ensuring that plot content can be generated according to the preset plot framework after the plot node is triggered.
[0058] The process of generating initial plot details for the current plot node based on plot structure information includes: The plot structure information is input into the large language model, which then generates the initial plot details for the current plot node based on the plot structure information.
[0059] The large language model can be deployed within the narrative engine, or the narrative engine can call the large language model through a preset interface. When it is necessary to generate initial narrative details, the narrative engine can call the large language model, input the narrative structure information into a preset prompt word template, generate input statements, and then input the input statements into the large language model, which will then generate the initial narrative details for the current narrative node.
[0060] In the first implementation, the story engine can generate multiple interactive options for players to choose from at story nodes. Initial story details include: multiple interactive options.
[0061] In one possible implementation, the story engine can first generate initial story details of the game scene. During multiple rounds of dialogue in the game scene, the story engine can generate multiple interactive options to achieve dialogue interaction with the player.
[0062] Figure 2 This is a schematic diagram of a game interface containing initial plot details, as provided in an embodiment of this application. (Refer to...) Figure 2 The game interface includes multiple virtual characters from the storyline. During player interaction, the story engine can generate a selection interface shown in a pop-up area. The selection interface includes multiple options, and players can choose one of them to engage in dialogue with the story engine.
[0063] The process of generating target plot information in real time based on the interactive information input by the second user, initial plot details, and plot structure information includes: In response to the second user selecting a target option from multiple interactive options, target plot information is generated based on the target option, initial plot details, and plot structure information.
[0064] The target option can be any option included in the area selected by the second user. (See reference...) Figure 2 The selection interface includes three selection areas shown in the dashed boxes. Each selection area corresponds to an option. When a player clicks to select the first area from top to bottom, it can be assumed that the player has selected the option contained in the first area as the target option.
[0065] The story engine can generate target story information that matches the player's choices and the direction of the story, based on the player's selected target options, initial story details, and story structure information.
[0066] For example, suppose the player chooses Figure 2 The second option, "Gather information from other guests," generates target plot information based on the player's chosen options, initial plot details, and plot structure. The target plot information consists of plot details about the player's interactions with other guests.
[0067] Optionally, each interactive option includes: a test result, which is used to characterize the success rate of executing the interactive option.
[0068] In one possible implementation, the test result not only represents the success rate of executing the interactive option, but may also include the bonus value applied to the virtual character controlled by the player after executing the interactive option, such as the player choosing... Figure 2 The third option, "Intentionally approach them to create a small disturbance," includes the success rate of creating disturbance after the player selects it, as well as the intelligence bonus that the player will receive after selecting this option. In other words, selecting this option will increase the player's intelligence value by the corresponding amount.
[0069] The test results for interaction options can be generated simultaneously with the generation of interaction options. That is, when the plot engine generates interaction options, it also performs random number determination on the interaction options to determine the test results of the interaction options.
[0070] Optionally, the plot engine can call a large language model, taking interactive options, initial plot details, and plot structure information as input parameters, and the large language model can determine the test results of each interactive option.
[0071] In this embodiment, each interactive option is generated through a large language model, and the verification results of each interactive option are generated. This not only improves the flexibility of players' dialogue with the plot engine in the game, but also ensures that the generated interactive options are related to the previous plot development and that the plot development conforms to the plot development framework of the plot structure information.
[0072] The process of generating target plot information based on target options, initial plot details, and plot structure information includes: The results of the interactive options, initial plot details, and plot structure information are input into the large language model, which then generates the target plot information.
[0073] Optionally, the results of the interactive options, initial plot details, and plot structure information can be filled into a preset prompt word template for plot information generation, and the target plot information can be generated by the large language model.
[0074] Among them, the initial plot details and the test results of interactive options can be used as contextual information for prediction by the large language model. The large language model can read the character settings, story background and relationships between characters at the current plot node from the plot structure information, thereby generating target plot information that conforms to the virtual character settings and does not deviate from the previous plot direction.
[0075] In this embodiment of the application, by generating interactive options and generating target plot information based on the test results of each interactive option, initial plot details, and plot structure information, it is possible to ensure that players can have free dialogue in the game without deviating from the plot outline and the direction of the plot.
[0076] In the second implementation, players can freely input interactive content. The process of responding to the second user's input and generating target plot information in real time based on the interactive information, initial plot details, and plot structure information includes: In response to the second user's input interaction, the target plot information is generated based on the interaction content, initial plot details, and plot structure information.
[0077] Interactive content can be text entered by the player in the text input area, or item clues selected by the player on the game interface.
[0078] In the first implementation, if the player enters text content in the text input area, the story engine can generate a response text or a story screen after the text content is executed, based on the text content entered by the player, initial story details, and story structure information.
[0079] For example, Figure 3 This is a schematic diagram of a game interface containing initial plot details, as provided in an embodiment of this application. The interface includes multiple options and a text input area. Players can choose not to select any of the provided options and instead freely input their responses to the current question in the text input area. For example, if the player inputs "Retaliate against Madam Wang by slapping her," the plot engine can generate target plot information based on the player's input text, initial plot details, and plot structure information. For instance, if the plot engine determines that the player's input text is executable, the target plot information could be plot details after executing the player's input text, such as "Madam Wang grabbed your wrist and looked at you contemptuously."
[0080] In the second implementation, if the current plot requires the player to select an item clue in the interface, such as the current question being "find the edict in the room", the player can select an item clue in the game scene. The plot engine can generate target plot information based on the item clue selected by the player, the initial plot details, and the plot structure information. For example, if the plot engine determines that the item clue selected by the player is not "edict" but "secret letter", then the target plot information can be the plot details after the player opens the "secret letter", such as "the secret letter is written with a special potion and a solution needs to be found".
[0081] The following is a further explanation of how the target plot information is generated based on the interactive content, initial plot details, and plot structure information, such as... Figure 4 As shown, the above steps include: S401. Input the interactive content into the large language model, and let the large language model determine the test result of the interactive content.
[0082] In the first possible implementation, when the player enters interactive content in the text input area but does not click confirm, the story engine can recognize the interactive content, call the large language model to perform random number determination on the interactive content, obtain the test result of the interactive content, and display the success rate of the interactive content in the text input area.
[0083] For example, if a player inputs "slap Lady Wang back," the story engine can input the player's input interaction content, initial story details, and story structure information into the large language model. The large language model determines the success rate of the player's input interaction content and displays the success rate in the text input area, allowing the player to adjust the interaction content based on the success rate value.
[0084] In the second possible implementation, players can input interactive content in the text input area and click confirm. The plot engine can input the interactive content, initial plot details, and plot structure information into the large language model, determine the success rate of the interactive content input by the player, and use the success rate of the interactive content as the test result of the interactive content.
[0085] S402. Input the results of the interactive content verification, the initial plot details and the plot structure information into the large language model, and the large language model generates the target plot information.
[0086] Optionally, the plot engine can call a large language model to fill the plot generation prompt word template with the test results of interactive content, initial plot details and plot structure information, and the large language model generates the target plot information.
[0087] In this embodiment, players can freely define the interactive content they input. The plot engine generates target plot information based on the player's input, initial plot details, and plot structure information. This allows players to engage in free dialogue within the script without deviating from the plot's direction, thereby enhancing the player's gaming experience.
[0088] The following section explains the process of executing target actions based on target plot information and plot structure information, such as... Figure 5 As shown, step S104 above includes: S501. Based on the target plot information and plot structure information, determine whether the current progress meets the conditions for achieving the target.
[0089] S502. If the conditions for achieving the objective are met, proceed to the next story node of the current story node.
[0090] Among them, the conditions for achieving the goal can be the conditions for completing the current story node. For example, if the player completes the chapter goal corresponding to the current story node, or if the player's game progress exceeds the preset progress threshold, the player can be considered to have met the conditions for achieving the goal.
[0091] For example, the plot structure information includes the chapter objective of the current plot node. If the virtual character controlled by the player has achieved the chapter objective in the target plot information, or if the player has completed 90% of the plot in the plot structure information, then the objective achievement condition can be considered to be met.
[0092] For example, if the player's completion condition in the plot structure information is "find the edict", then it can be determined whether the virtual character controlled by the player has obtained the item "edict" based on the target plot information. If it has been obtained, then it can be determined that the current progress meets the target completion condition.
[0093] If the conditions for achieving the objective are met, the plot structure information of the next adjacent plot node can be read from the plot structure information of the script, and the initial plot details of the next plot node can be generated based on the plot structure information of the next adjacent plot node and the initial plot structure information of the previous few rounds.
[0094] S503. If the conditions for achieving the objective are not met, an action will be performed according to preset rules. The preset rules include: regenerating the objective plot information or ending the objective script.
[0095] If the conditions for achieving the objective are not met, i.e., the conditions for completing the current story node are not met, the objective story information for the current story node can be regenerated so that the player can interact again until the conditions for achieving the objective are met, at which point the player can proceed to the next story node.
[0096] In another possible implementation, the number of times a player interacts or the time spent interacting online at the current story node can be monitored. If a player interacts multiple times or stays online for a long time at the current story node but still does not enter the next story node, the ending of the current story node can be taken as the ending achieved by the player in this game and the target scenario can be ended.
[0097] Optionally, the process of performing actions according to preset rules includes: If the number of interactions at the current plot node is less than the preset number, the target plot information will be regenerated based on the interaction information, initial plot details, and plot structure information.
[0098] To avoid players interacting too many times at a single plot point, a maximum number of interactions can be preset. After a player triggers a plot point, the number of interactions between the player and the plot engine is counted in real time. If the number is less than the preset number, the target plot information is regenerated based on the interaction information, initial plot details, and plot structure. After each interaction, the plot engine can reassess whether the current target plot information meets the conditions for achieving the goal. If not, the target plot information is regenerated; if it is, the game proceeds to the next plot point.
[0099] If the number of interactions at the current plot node is greater than or equal to the preset number, then the branch ending of the current plot node in the plot structure information will be taken as the script ending, and the target script will end.
[0100] In one possible implementation, if the player interacts too much, the story engine can also generate prompts for the player based on the story structure information, thereby guiding the player to follow the main storyline.
[0101] The following is a further explanation of how the current progress is determined to meet the conditions for achieving the objective based on the target plot information and plot structure information, such as... Figure 6 As shown, the above S501 step includes: S601. Input the target plot information and the plot goal of the current plot node in the plot structure information into the large language model, and let the large language model determine whether the target plot information has achieved the plot goal.
[0102] S602. If so, then determine that the current progress meets the target achievement conditions.
[0103] Optionally, the target plot information and the plot goal of the current plot node in the plot structure information can be filled into the judgment statement template to generate a plot judgment statement. The plot judgment statement can then be input into the large language model, which will then determine whether the target plot information has achieved the plot goal.
[0104] The plot objective can be a chapter objective in the plot structure information, or a preset percentage of the current plot progress reaching the current plot node. For example, if the current plot progress reaches 90% of the current plot node, or if the chapter objective in the plot structure is achieved, then the target plot information can be determined to achieve the plot objective.
[0105] The following is a further explanation of the first user-created script. Before implementing the aforementioned embodiments of the game interaction method based on the large language model, the script can be created through the following embodiments to generate the target script. It is worth noting that the process of generating the target script described below can also be implemented as a standalone embodiment, without relying on other embodiments, such as... Figure 7As shown, the process of generating the target script includes: S701. Respond to the first user's input of the target script's brief information and create a script object.
[0106] Reference Figure 8 The target script's information includes: script title, script cover, script synopsis, and script attributes.
[0107] In one possible implementation, the game's graphical user interface can provide a creation option. Players can click on the creation option to enter the script creation interface, where they can input a brief description of the script to create a script object. They can then further edit the script object to refine the characters and plot structure information of the script.
[0108] S702: Respond to the first user entering role information on the role creation interface to create a virtual role.
[0109] Reference Figure 9 First, users can edit character information such as name, character design, character attributes, and profession. Character attributes indicate whether a character is a protagonist or a supporting character in the script, and can be edited. Figure 9 In the character area, after clicking the save option, you can create a virtual character.
[0110] S703: Respond to the first user entering item information in the item creation interface to create a virtual item.
[0111] The item information includes the item name, item description, and how to obtain it. (Refer to...) Figure 10 Players can enter text in the corresponding text area to edit the item information. After completing the editing, players can click the save option to create the virtual item.
[0112] S704: Respond to the first user's input of plot outline information in the chapter writing interface, and create script outlines for each plot node.
[0113] The plot outline information includes chapter titles and chapter plot outline descriptions. (Refer to...) Figure 11 Players can edit plot outline information about items and characters in the chapter plot outline and click the save option to create the script outline for each chapter.
[0114] S705. Based on the virtual characters, virtual props, and the script outlines of each chapter, generate the plot structure information of the plot nodes corresponding to each chapter.
[0115] After creating all virtual characters, virtual props, and the script outlines for each chapter, players can click the save button. At this point, the terminal can save the virtual characters, virtual props, and the script outlines for each chapter in a structured form, thus obtaining the plot structure information.
[0116] The following is a further explanation of the plot structure information generated based on virtual characters, virtual props, and the script outlines for each chapter, which corresponds to the plot nodes of each chapter. Figure 12 As shown, it includes: S1201. Assign a chapter identifier to the current chapter of the target script.
[0117] S1202. Establish and store the mapping relationship between chapter identifiers and the plot structure information of the plot nodes corresponding to each chapter.
[0118] The chapter identifiers can be incremented sequentially according to the order of the chapters. After assigning chapter identifiers to each chapter, a mapping relationship between chapter identifiers and plot structure information can be established and saved in a structured form.
[0119] For example, the storage format of plot structure information can be as shown in Table 1 below. The chapter flow includes information on virtual items and virtual characters, as well as plot outline information that indicates the direction of the plot.
[0120] Table 1 Example of Plot Structure Information
[0121] In this embodiment, players can input the outline information of the script in the script creation interface to create a script, which lowers the threshold for players to create scripts and enhances the players' gaming experience.
[0122] Optionally, when a player first selects a scenario and enters the story, the method of this application also includes: The system selects a target script, obtains the corresponding plot structure information, and sends the plot structure information to the large language model. The large language model then generates the initial plot details information for the current plot node based on the plot structure information.
[0123] The target script can be the script that the player chooses to start the game. When the player selects a script for the first time, the plot engine can obtain the plot structure information corresponding to the target script and fill the plot structure information into the preset statement template to obtain the input statement. The large language model then generates the initial plot details information of the current plot node based on the input statement.
[0124] The initial plot details can include the plot background, character descriptions, and plot details of the first plot node in the script.
[0125] Based on the same inventive concept, this application also provides a game interaction device based on a large language model, which corresponds to the game interaction method based on a large language model. Since the principle of the device in this application is similar to the game interaction method based on a large language model described above in this application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.
[0126] Figure 13 This illustration shows a structural diagram of a game interaction device based on a large language model provided in an embodiment of this application.
[0127] The information acquisition module 1301 is used to respond to the current plot node in the target script being triggered and to acquire the plot structure information of the current plot node. The plot structure information includes at least: the characters and the ending information of the plot at the current plot node. The plot structure information is generated in advance based on the creation information of the first user. The initial generation module 1302 is used to generate initial plot details information for the current plot node based on the plot structure information; The real-time generation module 1303 is used to respond to the interactive information input by the second user and generate target plot information based on the interactive information, initial plot details, and plot structure information. The execution module 1304 is used to execute target actions based on the target plot information and plot structure information. The target actions include: entering the next plot node or ending the target script.
[0128] In one optional implementation, the information acquisition module 1301 is specifically used for: The system responds to the current dialogue meeting preset conditions, determines the trigger of the current plot node, and obtains the plot structure information of the current plot node.
[0129] In one optional implementation, the preset conditions include at least one of the following: the current dialogue round reaches a preset number threshold, the current dialogue includes preset keywords, and the similarity between the initial plot details and the preset plot information is greater than a preset threshold.
[0130] In one optional implementation, the initial generation module 1302 is specifically used for: The plot structure information is input into the large language model, which then generates the initial plot details for the current plot node based on the plot structure information.
[0131] In one alternative implementation, the initial plot details include: multiple interactive options; The real-time generation module 1303 is specifically used for: In response to the second user selecting a target option from multiple interactive options, target plot information is generated based on the target option, initial plot details, and plot structure information.
[0132] In one optional implementation, each interactive option includes: a test result, which is used to characterize the success rate of executing the interactive option; The real-time generation module 1303 is specifically used for: The results of the interactive options, initial plot details, and plot structure information are input into the large language model, which then generates the target plot information.
[0133] In one optional implementation, the real-time generation module 1303 is specifically used for: In response to the second user's input interaction, the target plot information is generated based on the interaction content, initial plot details, and plot structure information.
[0134] In one optional implementation, the real-time generation module 1303 is specifically used for: The interactive content is input into the large language model, and the large language model determines the detection result of the interactive content. The results of the interactive content verification, initial plot details, and plot structure information are input into the large language model, which then generates the target plot information.
[0135] In one alternative implementation, the execution module 1304 is specifically used for: Based on the target plot information and plot structure information, determine whether the current progress meets the conditions for achieving the target; If the conditions for achieving the objective are met, proceed to the next story node from the current story node; If the conditions for achieving the goal are not met and the number of interactions at the current plot node is less than the preset number, then the target plot information will be regenerated in real time based on the interaction information, initial plot details, and plot structure information. If the conditions for achieving the objective are not met and the number of interactions at the current plot node is greater than or equal to the preset number, then the branch ending of the current plot node in the plot structure information will be taken as the script ending, and the target script will end.
[0136] In one alternative implementation, the execution module 1304 is specifically used for: Input the target plot information and the plot goal of the current plot node in the plot structure information into the big language model, and the big language model determines whether the target plot information has achieved the plot goal; If so, then the current progress meets the conditions for achieving the target.
[0137] In one alternative implementation, the device further includes a creation module, specifically used for: In response to the first user's input of a brief description of the target script, create a script object; The system responds to the first user entering character information on the character creation interface to create a virtual character. The system responds to the first user entering item information on the item creation interface and creates a virtual item. Responding to the first user's input of plot outline information in the chapter writing interface, script outlines for each plot node are created; Based on the virtual characters, virtual props, and the script outlines for each chapter, generate the plot structure information for the corresponding plot nodes of each chapter.
[0138] In one alternative implementation, the creation module is specifically used for: Assign a chapter identifier to the current chapter of the target script; Establish and store the mapping relationship between chapter identifiers and the plot structure information of the plot nodes corresponding to each chapter.
[0139] In one optional implementation, the initial generation module 1302 is specifically used for: The system selects a target script, obtains the corresponding plot structure information, and sends the plot structure information to the large language model. The large language model then generates the initial plot details information for the current plot node based on the plot structure information.
[0140] In this embodiment, players in the game can act as script creators, creating scripts simply by inputting a plot outline. This lowers the barrier to script creation and enhances the flexibility and convenience of script creation for players. After players enter the game, the plot engine can generate target plot information in real time by combining plot structure information and player-input interactive information. This allows for free dialogue between the player and the plot, ensuring the plot development aligns with the plot structure information. This enhances the flexibility of player interaction within the game, enabling truly free dialogue, improving gameplay, and ultimately enhancing the player's gaming experience.
[0141] Figure 14 This illustration shows a schematic diagram of an electronic device provided in an embodiment of this application, including: a processor 1401, a storage medium 1402, and a bus 1403. The storage medium 1402 stores machine-readable instructions executable by the processor 1401. When the electronic device runs a game interaction method based on a large language model as described in the embodiment, the processor 1401 communicates with the storage medium 1402 via the bus 1403. The processor 1401 executes the machine-readable instructions. The preamble of the method item of the processor 1401 performs the following steps: When the current plot node in the target script is triggered, obtain the plot structure information of the current plot node. The plot structure information includes at least: the characters and the ending information of the plot at the current plot node. The plot structure information is generated in advance based on the creation information of the first user. Generate initial plot details for the current plot node based on the plot structure information; In response to the interactive information input by the second user, the target plot information is generated in real time based on the interactive information, initial plot details, and plot structure information. Based on the target plot information and plot structure information, perform the target action, which includes: entering the next plot node or ending the target scenario.
[0142] In one optional implementation, when the processor 1401 is triggered to obtain the plot structure information of the current plot node in the target script, it is specifically used for: The system responds to the current dialogue meeting preset conditions, determines the trigger of the current plot node, and obtains the plot structure information of the current plot node.
[0143] In one optional implementation, the preset conditions include at least one of the following: the current dialogue round reaches a preset number threshold, the current dialogue includes preset keywords, and the similarity between the initial plot details and the preset plot information is greater than a preset threshold.
[0144] In one optional implementation, when the processor 1401 generates initial plot detail information for the current plot node based on the plot structure information, it is specifically used for: The plot structure information is input into the large language model, which then generates the initial plot details for the current plot node based on the plot structure information.
[0145] In one alternative implementation, the initial plot details include: multiple interactive options; When the processor 1401 executes the interactive information input by the second user and generates target plot information based on the interactive information, initial plot details, and plot structure information, it is specifically used for: In response to the second user selecting a target option from multiple interactive options, target plot information is generated based on the target option, initial plot details, and plot structure information.
[0146] In one optional implementation, each interactive option includes: a test result, which is used to characterize the success rate of executing the interactive option; When the processor 1401 generates target plot information based on target options, initial plot details, and plot structure information, it is specifically used for: The results of the interactive options, initial plot details, and plot structure information are input into the large language model, which then generates the target plot information.
[0147] In one optional implementation, when the processor 1401 executes interactive information in response to the second user input and generates target plot information based on the interactive information, initial plot details, and plot structure information, it is specifically used for: In response to the second user's input interaction, the target plot information is generated based on the interaction content, initial plot details, and plot structure information.
[0148] In one optional implementation, when the processor 1401 generates target plot information based on interactive content, initial plot details, and plot structure information, it is specifically used for: The interactive content is input into the large language model, and the large language model determines the detection result of the interactive content. The results of the interactive content verification, initial plot details, and plot structure information are input into the large language model, which then generates the target plot information.
[0149] In one optional implementation, when the processor 1401 executes the target action based on the target plot information and plot structure information, it is specifically used for: Based on the target plot information and plot structure information, determine whether the current progress meets the conditions for achieving the target; If the conditions for achieving the objective are met, proceed to the next story node from the current story node; If the conditions for achieving the goal are not met and the number of interactions at the current plot node is less than the preset number, then the target plot information will be regenerated in real time based on the interaction information, initial plot details, and plot structure information. If the conditions for achieving the objective are not met and the number of interactions at the current plot node is greater than or equal to the preset number, then the branch ending of the current plot node in the plot structure information will be taken as the script ending, and the target script will end.
[0150] In one optional implementation, when the processor 1401 determines whether the current progress meets the target achievement conditions based on the target plot information and plot structure information, it is specifically used for: Input the target plot information and the plot goal of the current plot node in the plot structure information into the big language model, and the big language model determines whether the target plot information has achieved the plot goal; If so, then the current progress meets the conditions for achieving the target.
[0151] In an alternative implementation, the processor 1401 is further configured to perform: In response to the first user's input of a brief description of the target script, create a script object; The system responds to the first user entering character information on the character creation interface to create a virtual character. The system responds to the first user entering item information on the item creation interface and creates a virtual item. Responding to the first user's input of plot outline information in the chapter writing interface, script outlines for each plot node are created; Based on the virtual characters, virtual props, and the script outlines for each chapter, generate the plot structure information for the corresponding plot nodes of each chapter.
[0152] In one optional implementation, when the processor 1401 generates plot structure information for each chapter's corresponding plot nodes based on the virtual characters, virtual props, and the script outlines for each chapter, it is specifically used for: Assign a chapter identifier to the current chapter of the target script; Establish and store the mapping relationship between chapter identifiers and the plot structure information of the plot nodes corresponding to each chapter.
[0153] In an alternative implementation, the processor 1401 is further configured to perform: The system selects a target script, obtains the corresponding plot structure information, and sends the plot structure information to the large language model. The large language model then generates the initial plot details information for the current plot node based on the plot structure information.
[0154] In this embodiment, players in the game can act as script creators, creating scripts simply by inputting a plot outline. This lowers the barrier to script creation and enhances the flexibility and convenience of script creation for players. After players enter the game, the plot engine can generate target plot information in real time by combining plot structure information and player-input interactive information. This allows for free dialogue between the player and the plot, ensuring the plot development aligns with the plot structure information. This enhances the flexibility of player interaction within the game, enabling truly free dialogue, improving gameplay, and ultimately enhancing the player's gaming experience.
[0155] This application embodiment also provides a computer-readable storage medium storing a computer program, which is executed by a processor, wherein the processor performs the following steps: When the current plot node in the target script is triggered, obtain the plot structure information of the current plot node. The plot structure information includes at least: the characters and the ending information of the plot at the current plot node. The plot structure information is generated in advance based on the creation information of the first user. Generate initial plot details for the current plot node based on the plot structure information; In response to the interactive information input by the second user, the target plot information is generated in real time based on the interactive information, initial plot details, and plot structure information. Based on the target plot information and plot structure information, perform the target action, which includes: entering the next plot node or ending the target scenario.
[0156] In one optional implementation, when the processor is triggered to obtain the plot structure information of the current plot node in the target script, it is specifically used for: The system responds to the current dialogue meeting preset conditions, determines the trigger of the current plot node, and obtains the plot structure information of the current plot node.
[0157] In one optional implementation, the preset conditions include at least one of the following: the current dialogue round reaches a preset number threshold, the current dialogue includes preset keywords, and the similarity between the initial plot details and the preset plot information is greater than a preset threshold.
[0158] In one optional implementation, when the processor generates initial plot details for the current plot node based on the plot structure information, it specifically performs the following: The plot structure information is input into the large language model, which then generates the initial plot details for the current plot node based on the plot structure information.
[0159] In one alternative implementation, the initial plot details include: multiple interactive options; When the processor executes the interactive information input by the second user and generates target plot information in real time based on the interactive information, initial plot details, and plot structure information, it is specifically used for: In response to the second user selecting a target option from multiple interactive options, target plot information is generated based on the target option, initial plot details, and plot structure information.
[0160] In one optional implementation, each interactive option includes: a test result, which is used to characterize the success rate of executing the interactive option; When the processor generates target plot information based on target options, initial plot details, and plot structure information, it is specifically used for: The results of the interactive options, initial plot details, and plot structure information are input into the large language model, which then generates the target plot information.
[0161] In one optional implementation, when the processor executes interactive information in response to the second user input and generates target plot information in real time based on the interactive information, initial plot details, and plot structure information, it is specifically used for: In response to the second user's input interaction, the target plot information is generated based on the interaction content, initial plot details, and plot structure information.
[0162] In one optional implementation, when the processor generates target plot information based on interactive content, initial plot details, and plot structure information, it is specifically used for: The interactive content is input into the large language model, and the large language model determines the detection result of the interactive content. The results of the interactive content verification, initial plot details, and plot structure information are input into the large language model, which then generates the target plot information.
[0163] In one optional implementation, when the processor performs the target action based on the target plot information and plot structure information, it is specifically used for: Based on the target plot information and plot structure information, determine whether the current progress meets the conditions for achieving the target; If the conditions for achieving the objective are met, proceed to the next story node from the current story node; If the conditions for achieving the goal are not met and the number of interactions at the current plot node is less than the preset number, then the target plot information will be regenerated in real time based on the interaction information, initial plot details, and plot structure information. If the conditions for achieving the objective are not met and the number of interactions at the current plot node is greater than or equal to the preset number, then the branch ending of the current plot node in the plot structure information will be taken as the script ending, and the target script will end.
[0164] In one optional implementation, when the processor determines whether the current progress meets the target achievement conditions based on the target plot information and plot structure information, it is specifically used for: Input the target plot information and the plot goal of the current plot node in the plot structure information into the big language model, and the big language model determines whether the target plot information has achieved the plot goal; If so, then the current progress meets the conditions for achieving the target.
[0165] In an alternative implementation, the processor is further configured to perform: In response to the first user's input of a brief description of the target script, create a script object; The system responds to the first user entering character information on the character creation interface to create a virtual character. The system responds to the first user entering item information on the item creation interface and creates a virtual item. Responding to the first user's input of plot outline information in the chapter writing interface, script outlines for each plot node are created; Based on the virtual characters, virtual props, and the script outlines for each chapter, generate the plot structure information for the corresponding plot nodes of each chapter.
[0166] In one optional implementation, when the processor generates plot structure information for each chapter's corresponding plot nodes based on virtual characters, virtual props, and the script outlines for each chapter, it is specifically used for: Assign a chapter identifier to the current chapter of the target script; Establish and store the mapping relationship between chapter identifiers and the plot structure information of the plot nodes corresponding to each chapter.
[0167] In an alternative implementation, the processor is further configured to perform: The system selects a target script, obtains the corresponding plot structure information, and sends the plot structure information to the large language model. The large language model then generates the initial plot details information for the current plot node based on the plot structure information.
[0168] In this embodiment, players in the game can act as script creators, creating scripts simply by inputting a plot outline. This lowers the barrier to script creation and enhances the flexibility and convenience of script creation for players. After players enter the game, the plot engine can generate target plot information in real time by combining plot structure information and player-input interactive information. This allows for free dialogue between the player and the plot, ensuring the plot development aligns with the plot structure information. This enhances the flexibility of player interaction within the game, enabling truly free dialogue, improving gameplay, and ultimately enhancing the player's gaming experience.
[0169] In this embodiment, the computer program, when run by the processor, can also execute other machine-readable instructions to perform other methods as described in the embodiments. For details on the specific execution steps and principles, please refer to the description of the embodiments, which will not be repeated here.
[0170] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0171] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0172] In addition, the functional units in the embodiments provided in this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0173] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0174] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0175] Finally, it should be noted that the above-described embodiments are merely specific implementations of this application, used to illustrate the technical solutions of this application, and not to limit them. The protection scope of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this application; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application. All should be covered within the protection scope of this application. Therefore, the protection scope of this application should be determined by the protection scope of the claims.
Claims
1. A game interaction method based on a large language model, characterized in that, include: When the current plot node in the target script is triggered, the plot structure information of the current plot node is obtained. The plot structure information includes at least: the ending information of the characters and the plot at the current plot node. The plot structure information is generated in advance based on the creation information of the first user. Generate initial plot details for the current plot node based on the plot structure information; In response to interactive information input by the second user, target plot information is generated based on the interactive information, the initial plot details, and the plot structure information. Based on the target plot information and the plot structure information, execute the target action, which includes: entering the next plot node or ending the target script.
2. The method according to claim 1, characterized in that, The response involves triggering the current plot node in the target script and obtaining the plot structure information of the current plot node, including: If the current dialogue meets the preset conditions, the current plot node is determined to be triggered, and the plot structure information of the current plot node is obtained.
3. The method according to claim 2, characterized in that, The preset conditions include at least one of the following: the current dialogue round reaches a preset number threshold, the current dialogue includes preset keywords, and the similarity between the initial plot details and the preset plot information is greater than a preset threshold.
4. The method according to claim 1, characterized in that, The step of generating initial plot details for the current plot node based on the plot structure information includes: The plot structure information is input into a large language model, which then generates initial plot details for the current plot node based on the plot structure information.
5. The method according to claim 1, characterized in that, The initial plot details include: multiple interactive options; The response to the interactive information input by the second user, based on the interactive information, the initial plot details, and the plot structure information, generates target plot information, including: In response to the second user selecting a target option from the plurality of interactive options, the target plot information is generated based on the target option, the initial plot details, and the plot structure information.
6. The method according to claim 5, characterized in that, Each of the interactive options includes: a test result, which is used to characterize the success rate of executing the interactive option; The step of generating the target plot information based on the target option, the initial plot details, and the plot structure information includes: The results of the interactive options, the initial plot details, and the plot structure information are input into the large language model, which then generates the target plot information.
7. The method according to claim 1, characterized in that, The response to the interactive information input by the second user, based on the interactive information, the initial plot details, and the plot structure information, generates target plot information, including: In response to the second user's input interaction, the target plot information is generated based on the interaction content, the initial plot details, and the plot structure information.
8. The method according to claim 7, characterized in that, The step of generating the target plot information based on the interactive content, the initial plot details, and the plot structure information includes: The interactive content is input into a large language model, and the large language model determines the detection result of the interactive content. The results of the interactive content verification, the initial plot details, and the plot structure information are input into the large language model, which then generates the target plot information.
9. The method according to claim 1, characterized in that, The step of executing the target action based on the target plot information and the plot structure information includes: Based on the target plot information and the plot structure information, determine whether the current progress meets the target achievement conditions; If the conditions for achieving the target are met, proceed to the next story node of the current story node; If the target achievement conditions are not met, an action will be performed according to preset rules, including: regenerating the target plot information or ending the target script.
10. The method according to claim 9, characterized in that, The action performed according to the preset rules includes: If the number of interactions at the current plot node is less than the preset number, the target plot information is regenerated based on the interaction information, the initial plot details, and the plot structure information. If the number of interactions at the current plot node is greater than or equal to the preset number, then the branch ending of the current plot node in the plot structure information will be taken as the script ending, and the target script will end.
11. The method according to claim 9, characterized in that, The step of determining whether the current progress meets the target achievement conditions based on the target plot information and the plot structure information includes: The target plot information and the plot goal of the current plot node in the plot structure information are input into the large language model, and the large language model determines whether the target plot information achieves the plot goal; If so, then the current progress meets the conditions for achieving the target.
12. The method according to claim 1, characterized in that, The method further includes: In response to the first user's input of the brief information of the target script, a script object is created; In response to the first user entering role information on the role creation interface, a virtual role is created. In response to the first user entering item information on the item creation interface, a virtual item is created. In response to the first user inputting plot outline information in the chapter writing interface, create script outlines for each plot node; Based on the virtual characters, virtual props, and script outlines for each chapter, generate plot structure information for the plot nodes corresponding to each chapter.
13. The method according to claim 12, characterized in that, The step of generating plot structure information for each chapter's corresponding plot nodes based on the virtual character, the virtual props, and the script outlines for each chapter includes: Assign a chapter identifier to the current chapter of the target script; Establish and store the mapping relationship between the chapter identifier and the plot structure information of the plot nodes corresponding to each chapter.
14. The method according to claim 1, characterized in that, The method further includes: In response to the selection of a target script, the system obtains the plot structure information corresponding to the target script and sends the plot structure information to the large language model, which then generates the initial plot details information of the current plot node based on the plot structure information.
15. A game interaction device based on a large language model, characterized in that, include: The information acquisition module is used to respond to the current plot node in the target script being triggered, and to acquire the plot structure information of the current plot node. The plot structure information includes at least: the ending information of the characters and the plot at the current plot node. The plot structure information is generated in advance based on the creation information of the first user. The initial generation module is used to generate initial plot detail information for the current plot node based on the plot structure information; A real-time generation module is used to respond to interactive information input by a second user and generate target plot information based on the interactive information, the initial plot details, and the plot structure information. The execution module is used to execute target actions based on the target plot information and the plot structure information. The target actions include: entering the next plot node or ending the target script.
16. An electronic device, characterized in that, include: The device includes a processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of a game interaction method based on a large language model as described in any one of claims 1 to 14.
17. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of a game interaction method based on a large language model as described in any one of claims 1 to 14.