Generation method and device of commentary content, equipment, medium and product
By analyzing the causal relationships of virtual game events to generate game story text and filtering text fragments, the problem of monotonous game report content and low generation efficiency in existing technologies has been solved, achieving improvements in diversity and accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2024-10-23
- Publication Date
- 2026-04-24
AI Technical Summary
The game video battle reports generated by existing technologies are relatively simple in content and rely on manually configured editing strategies, resulting in low generation efficiency.
By analyzing the causal relationships between multiple game events in a virtual game, game story text is generated. Text fragments associated with specified types of game events are then selected to generate event commentary. Pre-trained story generation and commentary generation models are used to automatically generate commentary for specified types of game events.
It improves the diversity and accuracy of generated event commentary, reduces reliance on manual strategy configuration, and increases the efficiency of game report generation.
Smart Images

Figure CN121924319A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, device, medium and product for generating explanatory content. Background Technology
[0002] In the game, after a match ends, the system generates a video report based on the player's performance. This video report is tailored to the performance of the hero character controlled by the player, providing the player with a richer gaming experience.
[0003] In related technologies, video battle reports of game matches are typically generated by editing using preset strategies. Specifically, features are extracted from game data, and editing strategies matching these features are obtained. The game match video is then edited and spliced using these strategies to generate the video battle report. For example, when a player is detected as the Most Valuable Player (MVP) in a game match, the segments of the player's gameplay that are associated with the MVP determination are edited and spliced together to obtain the video battle report.
[0004] However, the content style of the video battle reports obtained by the above method is determined by the preset editing strategy, resulting in relatively simple content in the generated video battle reports. Summary of the Invention
[0005] This application provides a method, apparatus, device, medium, and product for generating narration content. The technical solution is as follows:
[0006] On the one hand, a method for generating narration content is provided, the method comprising:
[0007] Acquire multiple game events from a virtual game, wherein the game events are events generated in the virtual game, and the multiple game events include a first game event, wherein the first game event is a game event of a specified type;
[0008] Based on the causal relationship between the multiple game events, game story text corresponding to the virtual game is generated, and the game story text includes text fragments expressing the causal relationship;
[0009] The text fragments associated with the first game event are obtained from the game story text, and the event explanation content of the first game event is generated based on the text fragments associated with the first game event. The event explanation content is used to explain the first game event in combination with the causal relationship between game events in the virtual game.
[0010] On the other hand, an apparatus for generating explanatory content is provided, the apparatus comprising:
[0011] The acquisition module is used to acquire multiple game events of a virtual game, wherein the game events are events generated in the virtual game, and the multiple game events include a first game event, wherein the first game event is a game event of a specified type.
[0012] The first generation module is used to generate game story text corresponding to the virtual game based on the causal relationship between the events of the multiple game events. The game story text includes text fragments expressing the causal relationship.
[0013] The second generation module is used to obtain text fragments related to the first game event from the game story text, and to generate event explanation content for the first game event based on the text fragments related to the first game event. The event explanation content is used to explain the first game event in combination with the causal relationship between game events in the virtual game.
[0014] In some optional embodiments, the first generation module includes:
[0015] The first acquisition unit is used to acquire a first prompt word, which is guidance information used to indicate the generation of the game story text;
[0016] The first generation unit is used to analyze the causal relationship between the events of the multiple game events based on the first prompt word, and obtain the game plot text including at least two text fragments.
[0017] In some optional embodiments, the first prompt word includes at least one of contextual prompt information, output example information, and output format prompt information;
[0018] The contextual hints are used to guide the task of analyzing the contextual relationships between game events in the virtual game.
[0019] The output example information is used to guide the way the game story text is expressed. The output example information includes example game events and example text fragments corresponding to the example game events.
[0020] The output format prompt information is used to guide the text format of the game's storyline text.
[0021] In some optional embodiments, when the first prompt word includes the contextual prompt information, the first generation unit is further configured to analyze the influence of a second game event occurring before the first game event on the first game event based on the contextual prompt information, and obtain a first causal result; and generate the game plot text composed of the at least two text fragments based on the first causal result;
[0022] The first generation unit is further configured to analyze the impact of the first game event on the third game event that occurs after the first game event based on the contextual prompt information, and obtain a second causal result; and generate the game plot text composed of the at least two text fragments based on the second causal result;
[0023] The first generation unit is further configured to analyze the impact of the first game event on the game result of the virtual game based on the contextual prompt information, and obtain a third causal result; and generate the game plot text composed of the at least two text fragments based on the third causal result;
[0024] The first generation unit is further configured to analyze the mutual influence between the fourth game event and the fifth game event based on the contextual prompt information to obtain a fourth causal result; and generate the game plot text composed of the at least two text fragments based on the fourth causal result, wherein the fourth game event and the fifth game event are two game events among the plurality of game events that satisfy the event time limit condition, and the event time limit condition is used to indicate the time interval limit of the mutual influence between game events.
[0025] In some optional embodiments, the first generation unit is further configured to input the first prompt word and the game event data corresponding to the plurality of game events into the plot generation model, and through the plot generation model, based on the guidance of the first prompt word, analyze the causal relationship between the events occurring among the plurality of game events to obtain the game plot text including the at least two text fragments, and the plot generation model is configured to generate text describing the game process of the virtual game based on the causal relationship between the game events.
[0026] In some optional embodiments, the first generation module further includes:
[0027] An aggregation unit is configured to aggregate the multiple game events based on the order of their occurrence to obtain at least two game segments, wherein each game segment includes at least one game event.
[0028] The first generation unit is further configured to generate text fragments corresponding to the at least two game segments based on the causal relationship between the events of the plurality of game events, thereby obtaining the game plot text.
[0029] In some optional embodiments, the aggregation unit is further configured to determine at least two central game events from the plurality of game events, wherein the central game event is the aggregation center when game events are aggregated;
[0030] The aggregation unit is further configured to perform an event aggregation process for the i-th central game event, and to obtain a supplementary game event corresponding to the i-th central game event from the plurality of game events. The supplementary game event is a game event among the plurality of game events that satisfies the event order relationship with the i-th central game event, where i is a positive integer.
[0031] The aggregation unit is further configured to combine the i-th central game event and the supplementary game event to obtain the i-th game segment.
[0032] In some optional embodiments, the event sequence relationship includes at least one of the following:
[0033] The supplementary game events are the n game events adjacent to the i-th central game event, where n is a positive integer;
[0034] The time difference between the first event time corresponding to the i-th central game event and the second event time corresponding to the supplementary game event is lower than a preset time difference threshold.
[0035] The first event priority of the i-th central game event in the plurality of game events is higher than the second event priority of the supplementary game event in the event stream.
[0036] In some optional embodiments, the first acquisition unit is further configured to acquire a knowledge graph corresponding to the target application, the knowledge graph being used to indicate the relationships between entities in the target application, and the target application being used to provide the virtual game;
[0037] The first acquisition unit is further configured to acquire game entities involved in the plurality of game events;
[0038] The first generation unit is further configured to obtain a graph structure feature representation based on the node where the local entity is located in the knowledge graph and the edges connecting the nodes corresponding to the local entity;
[0039] The first generation unit is further configured to incorporate the graph structure feature representation into the analysis process of the causal relationship between the multiple game events, and generate the game story text corresponding to the virtual game.
[0040] In some optional embodiments, the second generation module includes:
[0041] The second acquisition unit is used to acquire a second prompt word, which is guidance information used to indicate the event explanation content when generating the first game event;
[0042] The second generation unit is used to analyze the correlation between the text fragments in the game story text and the first game event based on the second prompt word, so as to obtain the text fragments associated with the first game event, and to generate the event explanation content of the first game event based on the text fragments associated with the first game event.
[0043] In some optional embodiments, the second generation unit is further configured to input the second prompt word, the game story text, and the game event data corresponding to the plurality of game events into the commentary generation model. The commentary generation model generates the event commentary content of the first game event based on the guidance of the second prompt word and the correlation between the text fragments in the game story text and the first game event. The commentary generation model is configured to generate content to comment on the first game event based on the correlation between the game story text and the first game event.
[0044] In some optional embodiments, the second acquisition unit is further configured to acquire the text commentary duration of the preset commentary texts corresponding to the plurality of game events;
[0045] The second generation module further includes:
[0046] The filtering unit is used to filter out other game events whose text commentary duration is covered by the j-th game event while retaining the first game event, until the text commentary duration of the remaining game events does not overlap, and obtain multiple game events after filtering.
[0047] The second generation unit is further configured to input the second prompt word, the game story text, and the game event data corresponding to the filtered multiple game events into the commentary generation model.
[0048] In some optional embodiments, the second prompt includes summary guidance information and event explanation guidance information;
[0049] The second generation unit is further configured to generate a summary description text corresponding to the virtual game based on the summary guidance information through the explanation generation model. The summary description text is used to summarize the game process of the virtual game with the first game event as the center.
[0050] The second generation unit is further configured to generate event commentary text for the first game event based on the guidance of the fragment commentary guidance information through the commentary generation model;
[0051] The second generation unit is further configured to compose the event explanation content from the summary description text and the event explanation text.
[0052] In some optional embodiments, the event description text includes at least one of the following:
[0053] The first game event refers to the game phase within the virtual game;
[0054] The stage title of the game phase;
[0055] The event title of the first game event;
[0056] The commentary statement corresponding to the first game event.
[0057] In some optional embodiments, the acquisition module includes:
[0058] The third acquisition unit is used to acquire the game board data of the virtual game, wherein the game board data is the data recorded during the virtual game.
[0059] The third generation unit is used to generate an event stream of the virtual game based on the game board data, the event stream including the plurality of game events arranged in the order of event occurrence;
[0060] A determining unit is used to perform event type detection on the game event and determine the first game event in the event stream.
[0061] In some optional embodiments, the acquisition module is further configured to acquire the game video of the virtual game, the game video including video clips that match the first game event;
[0062] The device further includes:
[0063] The third generation module is used to add the event commentary content according to the position of the video clip in the game video to obtain the game summary video.
[0064] On the other hand, a computer device is provided, the computer device including a processor and a memory, the memory storing at least one instruction, at least one program, code set or instruction set, the at least one instruction, the at least one program, the code set or instruction set being loaded and executed by the processor to implement the method for generating narration content as described in any of the embodiments of this application above.
[0065] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction, at least one program, code set, or instruction set is stored therein, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the method for generating narration content as described in any of the embodiments of this application above.
[0066] On the other hand, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the method for generating narration content as described in any of the above embodiments.
[0067] The technical solution provided in this application includes at least the following beneficial effects:
[0068] When generating event commentary for a specified type of match event in a virtual game, the game's narrative text is generated by analyzing the causal relationships between multiple match events occurring within the virtual game. Then, text fragments related to the specified type of match event are selected from this narrative text. Based on these selected text fragments, the event commentary for the specified type of match event is generated. In other words, by analyzing the causal relationships of match events within the virtual game, the coherence of the generated narrative text is ensured. This allows the event commentary generated on the narrative text to express the story and rationality of the specified type of match event within the overall virtual game context, improving the diversity and accuracy of the generated event commentary. Attached Figure Description
[0069] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0070] Figure 1 This is a schematic diagram of an implementation environment provided by an exemplary embodiment of this application;
[0071] Figure 2 This is a flowchart of a method for generating explanatory content provided in an exemplary embodiment of this application;
[0072] Figure 3 This is a flowchart of a method for generating explanatory content provided in an exemplary embodiment of this application;
[0073] Figure 4 This is a comparative diagram of the GPT decoder and the Transformer decoder in a GPT model provided by an exemplary embodiment of this application;
[0074] Figure 5 This is a schematic diagram of a knowledge graph of a game application provided in an exemplary embodiment of this application;
[0075] Figure 6 This is a flowchart of a method for generating explanatory content provided in an exemplary embodiment of this application;
[0076] Figure 7 This is a data flow diagram illustrating the process of generating explanatory content provided in an exemplary embodiment of this application;
[0077] Figure 8 This is a schematic diagram illustrating the video battle report generation process provided in an exemplary embodiment of this application;
[0078] Figure 9 This is a structural block diagram of an explanatory content generation apparatus provided in an exemplary embodiment of this application;
[0079] Figure 10 This is a structural block diagram of an explanatory content generation apparatus provided in an exemplary embodiment of this application;
[0080] Figure 11 This is a schematic diagram of the structure of a server provided in an exemplary embodiment of this application. Detailed Implementation
[0081] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0082] In this application, the terms "first" and "second" are used to distinguish between identical or similar items that have essentially the same function. It should be understood that there is no logical or temporal dependency between "first" and "second", nor is there any limitation on the quantity or execution order.
[0083] First, a brief introduction to the terms used in the embodiments of this application will be given.
[0084] Large Language Models (LLMs): Large language models are ultra-large-scale language models with hundreds of billions or even trillions of parameters, typically requiring massive amounts of data and computational resources. They generally possess stronger generalization capabilities and, leveraging their "few-shot learning" or "zero-shot learning" abilities, can achieve high performance in many natural language processing tasks, such as text classification, language translation, and question-answering systems. Furthermore, large language models can be used to generate high-quality natural language text, such as articles, dialogues, and poems. Large language models (LLMs) can be referred to as generative language models.
[0085] A prompt is an input strategy that guides a model to generate a specific type of output. In Natural Language Processing (NLP), a prompt is typically a short text that motivates the model to respond in the desired way. For example, if you want the model to write a poem, you can provide the beginning of a poem as a prompt, and the model will continue writing from that beginning. A prompt can be seen as the starting point for a dialogue with the model, helping it understand the context and objectives of the task, thus generating more accurate and relevant answers. In practical applications, a well-designed prompt can significantly improve model performance, especially in specific domains or tasks. Therefore, a prompt serves as a bridge for communication with a large language model, helping the model better understand and execute user instructions.
[0086] Multiplayer Online Battle Arena (MOBA) games: MOBA games typically consist of two teams that achieve game objectives by defeating the opponent's towers and heroes. MOBA games emphasize teamwork and strategic planning. Players need to choose different hero characters, upgrade skills and equipment to enhance their strength, and cooperate closely with teammates to implement tactics and defeat opponents to achieve victory.
[0087] Game reports: Game reports are detailed descriptions and analyses of a series of events that occur during a game. Reports can include information such as the process of events, participant actions, number of eliminations, tactics, and strategies. A game report is a high-level summary of a series of events. Optionally, game reports include text / image reports, video reports, and audio reports. Video reports are videos composed of selected highlights from virtual matches, including special effects, music, and commentary.
[0088] Battle report generation is a complex task, requiring the extraction of key information from massive amounts of game data, analysis of the game process, and the generation of highly readable and meaningful battle reports. For video battle report generation, related technologies typically use preset strategies to edit and generate virtual match video reports. Specifically, features are extracted from game screen data, and editing strategies matching these features are obtained. These editing and splicing strategies are then used to edit and splice the virtual match video to obtain the video report. For example, when a player is detected as the MVP in a virtual match, the segments of the player's gameplay related to the MVP determination are edited and spliced to obtain the video report. However, the content style of the video report obtained by the above approach is determined by the preset editing strategy, which is usually a manually configured template. For example, based on the virtual characters in the MVP segment video and the kill / kill relationships between virtual characters, corresponding commentary text such as "Virtual character A used XX skill to kill virtual character B" is generated to narrate the MVP segment video, resulting in the video report. It is evident that the video battle reports generated by the above methods are relatively simple in content, and the extensive manual intervention required for manually configured editing strategies results in low efficiency in video battle report generation.
[0089] The method for generating commentary content provided in this application, when generating event commentary content for a specified type of game event in a virtual game, generates game story text corresponding to the virtual game by analyzing the causal relationships between multiple game events occurring in the virtual game. Then, it filters text fragments associated with the specified type of game event from the game story text, and generates event commentary content for the specified type of game event based on the filtered text fragments. That is, when generating event commentary content for a specified type of game event, by analyzing the causal relationships when game events occur within the virtual game, the coherence of the generated game story text is ensured. This allows the event commentary content generated on the game story text to express the narrative and rationality of the specified type of game event within the overall virtual game, improving the diversity and accuracy of the generated event commentary content.
[0090] In this embodiment, event commentary content for specified types of game events is automatically generated by calling pre-trained story generation and commentary generation models, which is then used for game report generation. This eliminates the need for manually configured strategy templates to generate game reports, thus improving the efficiency of game report generation.
[0091] Secondly, the implementation environment involved in the embodiments of this application will be described. The method for generating narration content provided in the embodiments of this application can be implemented by the terminal alone, by the server, or by the terminal and the server through data interaction. The embodiments of this application do not limit this. Optionally, the method for generating narration content by interaction between the terminal and the server will be described as an example.
[0092] This is illustrative; please refer to it. Figure 1 This implementation environment involves a terminal 110 and a server 120, which are connected via a communication network 130. The communication network 130 can be a wired network or a wireless network; this embodiment does not limit its implementation.
[0093] In some embodiments, the terminal 110 is equipped with a target application that generates virtual game reports. Optionally, the target application can be an instant messaging application, video application, news application, comprehensive search engine application, social application, game application, shopping application, map navigation application, etc., and this application embodiment is not limited thereto. Optionally, when the target application is a game application, it can be any one of a virtual reality application, a 3D map application, a third-person shooter (TPS) game, a first-person shooter (FPS) game, a MOBA game, or a multiplayer shooting survival game.
[0094] Optionally, the device type of terminal 110 includes at least one of the following: a game console, a desktop computer, a smartphone, a tablet computer, an e-book reader, a Moving Picture Experts Group Audio Layer III (MP3) player, a Moving Picture Experts Group Audio Layer IV (MP4) player, and a laptop computer. The following embodiments use a desktop computer as an example.
[0095] Server 120 includes at least one of a single server, multiple servers, a cloud computing platform, and a virtualization center. Server 120 provides backend services for applications supporting a 3D virtual environment. Optionally, server 120 performs the primary computational work, and terminal 110 performs secondary computational work; or, server 120 performs secondary computational work, and terminal 110 performs primary computational work; or, server 120 and terminal 110 collaborate on computation using a distributed computing architecture. Optionally, server 120 can also be implemented as a node in a blockchain system.
[0096] It is worth noting that server 120 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.
[0097] Those skilled in the art will understand that the number of the aforementioned devices can be more or less. For example, there may be only one device, or there may be dozens or hundreds of devices, or even more. This application does not limit the number or type of devices.
[0098] In some embodiments, a game application runs on terminal 110. After a user completes a virtual match through the game application, a match report for the virtual match is generated through a target application. Optionally, the game application and the target application can be the same application or different applications; this is not limited here. Illustratively, terminal 110 sends an MVP match report retrieval request for the virtual match to server 120. Upon receiving the request, server 120 retrieves the match board data corresponding to the virtual match. The match board data is the data recorded during the virtual match. Multiple match events are retrieved from the match board data, including the MVP event during the match. Server 120 inputs the match event data corresponding to the multiple match events and the first prompt word into a deployed large language model, and generates the match story text for the virtual match through the large language model. After generating the game story text, server 120 inputs the second prompt word, the game story text, and game event data corresponding to multiple game events into the deployed large language model. The large language model generates the event result content of the MVP event, and adds the event commentary content to the game video corresponding to the MVP event, resulting in a game report of the current virtual game displayed in video format. Server 120 sends the generated game report data to terminal 110. Optionally, terminal 110 renders the game report on the screen using the report data.
[0099] In some embodiments, the method provided in this application can be applied to cloud gaming scenarios, thereby completing the calculation of data logic for the game process and the game report generation process through a cloud server, while the terminal 110 is responsible for displaying the game interface.
[0100] Based on the above introduction to terminology and implementation environment, the method for generating the explanatory content provided in this application will be explained, taking the method executed by the server as an example. Figure 2 As shown, the method includes the following steps 210 to 230.
[0101] Step 210: Obtain multiple game events from the virtual game.
[0102] In this embodiment of the application, a game event is an event generated in a virtual game. A game event refers to an event that occurs at a certain time and in a certain scenario during a virtual game.
[0103] In some embodiments, game events correspond to game event data extracted from the game board data of virtual games. Game event data includes event time, scene location, event participants, event result, etc.
[0104] The game board data refers to the data recorded during the virtual game. This data includes global data, behavioral data, and performance data. Global data indicates data shared throughout the entire virtual game, such as information about the virtual characters participating, team information, and map information. Behavioral data indicates data generated by the actions of virtual characters during the game, such as coordinates during movement, skill usage, and virtual item usage. Performance data indicates quantified performance data of virtual characters during the game, such as kills / deaths / assist ratio (KDA), damage per minute (DPM), and gold per minute (GPM).
[0105] Optionally, the data type of the game event data includes at least one of the following: text, video, audio, and image.
[0106] In some embodiments, the aforementioned multiple game events are a series of events that occur around a single object. For example, in a virtual game, the multiple game events are game events related to virtual character A; or, the aforementioned multiple game events may also be a series of events sent around multiple objects. For example, in a virtual game, the multiple game events are game events related to multiple virtual characters in the red team.
[0107] In this embodiment of the application, a first game event is included among the multiple game events, wherein the first game event is a game event of a specified type.
[0108] Optionally, the specified types include at least one of the following: key event type and account selection type. The key event type is the type of key event in a virtual match that meets preset filtering and identification conditions, such as team battle type, single kill type, BOSS kill type, MVP type, etc. The account selection type is the type of event in a virtual match that is selected by the user. For example, if a user records an account recording segment during a virtual match, the match events appearing in that account recording segment are events of the account selection type. Another example is if, after a virtual match ends, a user selects an account replay segment while watching the replay video, the match events appearing in that account replay segment are events of the account selection type.
[0109] In some embodiments, an event stream of a virtual game is extracted from the game board data to obtain multiple game events. Illustratively, game board data of a virtual game is obtained, and an event stream of the virtual game is generated based on the game board data. The event stream includes multiple game events arranged in chronological order of occurrence. Event type detection is performed on the game events to determine the first game event in the event stream.
[0110] In some embodiments, after obtaining the game board data, the game board data is filtered and deduplicated to obtain data used to generate game event data. An event stream is then generated from the filtered and deduplicated game board data based on the event feature information of different events. In one example, global data in the game board data is filtered out, and behavioral data and performance data are transformed into individual game events. For example, data containing kill features in the behavioral and performance data are detected and abstracted into game events {kill time, kill target, kill location, and changes in the main character's performance data after the kill}. The resulting game event data includes kill time information, kill target information, kill location information, and performance data change information.
[0111] Step 220: Based on the causal relationship between multiple game events, generate the game story text corresponding to the virtual game.
[0112] In the embodiments of this application, the game story text includes text fragments that express causal relationships, that is, the game story text is a text fragment containing semantics describing the causal relationship between game events.
[0113] In some embodiments, the game story text includes multiple text fragments, that is, the game story text is text obtained by combining multiple text fragments. Optionally, the multiple text fragments correspond one-to-one with multiple game events, that is, each text fragment is descriptive text used to describe different game events; or, a single text fragment corresponds to multiple game events, that is, a single text fragment includes descriptive text corresponding to multiple game events.
[0114] In some embodiments, the above text fragment is descriptive text describing a game segment in a virtual game, wherein the game segment is a segment composed of at least one game event in a virtual game.
[0115] In some embodiments, multiple game events are aggregated to obtain at least two game segments corresponding to a virtual game. Illustratively, multiple game events are aggregated based on their order of occurrence to obtain at least two game segments, each including at least one game event. Based on the causal relationships between the events, text segments corresponding to each of the at least two game segments are generated to obtain the game's narrative text. That is, before analyzing the causal relationships between game events, multiple game events are divided into at least two game segments, and text segments describing each game segment are generated. The game's narrative text for the virtual game is obtained from these at least two text segments, where the text segments describe the storyline within the game's corresponding time period.
[0116] Alternatively, when aggregating multiple game events, the aggregation method can be implemented as at least one of the following:
[0117] The first method is to aggregate events based on their order of occurrence.
[0118] This is illustrative of how multiple game events are sequentially divided into at least two game segments based on a specified event aggregation duration and the duration of each game event. In one example, multiple game events and their corresponding event durations include {Event A, 10s}, {Event B, 8s}, {Event C, 14s}, {Event D, 10s}, and {Event E, 5s}. The event aggregation duration is 30s. Therefore, Event A and Event B are aggregated into one game segment, and Events C, D, and E are aggregated into another game segment.
[0119] In some embodiments, when aggregating events based on event aggregation duration and event occurrence order, if the time difference between the end time of the previous game event and the start time of the subsequent game event in the virtual game is greater than a preset time difference threshold, the previous game event and the subsequent game event are automatically divided into different game segments.
[0120] The second approach is to aggregate events based on the order of events as a judgment condition.
[0121] Indicatively, at least two central game events are identified from multiple game events, where the central game event is the aggregation center during game event aggregation; for the event aggregation process of the i-th central game event, supplementary game events corresponding to the i-th central game event are obtained from multiple game events, where the supplementary game events are game events among multiple game events that satisfy the event order relationship with the i-th central game event, and i is a positive integer; the i-th central game event and the supplementary game events are combined to obtain the i-th game segment.
[0122] Optionally, the conditions used to determine the order of events include at least one of the following:
[0123] 1. Supplementary game events are the n game events adjacent to the i-th central game event, where n is a positive integer. In one example, the five game events before and after the central game event are determined as supplementary game events for that central game event.
[0124] 2. The time difference between the first event time corresponding to the i-th central game event and the second event time corresponding to the supplementary game event is lower than a preset time difference threshold. In one example, game events occurring within 5 seconds before and 5 seconds after the central game event are defined as supplementary game events of that central game event.
[0125] 3. The first event priority of the i-th central game event among multiple game events is higher than the second event priority of the supplementary game event in the event flow. Illustratively, event priority is identified for each of the multiple game events to obtain the event priority corresponding to each game event. Game events with a lower event priority than the central game event are identified as supplementary game events to the central game event. Optionally, the criteria for determining game priority include event type, the importance of the event result in the virtual game, the event duration, and the difference in character performance data after the game event occurs.
[0126] Optionally, the central game event is implemented as the first game event among multiple game events, that is, the first game event is determined as the central game event; or, the central game event is implemented as a game event randomly selected from multiple game events.
[0127] The third method is aggregation based on event characteristics.
[0128] In a schematic manner, game event data corresponding to multiple game events are obtained, features are extracted from the game event data to obtain event feature representations, and multiple event feature representations are clustered by a preset clustering algorithm to obtain multiple clusters. For each cluster, the game events in the cluster are combined into a game segment.
[0129] Optionally, the above-mentioned preset clustering algorithm can be implemented as K-Means clustering algorithm, hierarchical clustering algorithm, density-based spatial clustering of applications with noise (DBSCAN) algorithm, affinity propagation algorithm, etc.
[0130] In other words, by pre-aggregating game fragments, the correlation between game events is improved, avoiding the problem that the accuracy of causal relationship analysis is reduced due to the game events being too discrete, thus improving the accuracy of causal relationship analysis and consequently improving the accuracy of the generated game story text.
[0131] In some embodiments, the causal relationships between multiple game events are analyzed using a first prompt word for a virtual game to obtain game story text. Illustratively, the first prompt word is obtained, whereby the first prompt word is guidance information used to instruct the generation of game story text containing text fragments corresponding to the causal relationships. Based on the first prompt word, the causal relationships between multiple game events are analyzed to obtain game story text including at least two text fragments.
[0132] In some embodiments, when multiple game events are pre-divided into at least two game segments, the first prompt word includes the segmentation results of at least two game segments to guide the segment scale of the segment described in the generated game story text.
[0133] In the field of artificial intelligence, illustrative prompts refer to text or code snippets used to guide models in generating output. By providing prompts, models can learn how to generate relevant outputs, such as text summaries, translations, and dialogues. A prompt can be a simple question or statement, or a complete paragraph or code snippet. Using prompts can help models train faster and generate high-quality output, thereby improving the effectiveness of artificial intelligence applications.
[0134] Optionally, when the first prompt word provides guidance for analyzing the causal relationships between multiple game events, it requires that the analyzed causal relationships include at least one of the following:
[0135] 1. Causal relationships between adjacent game events.
[0136] As an illustration, multiple game events are arranged chronologically. When generating game story text, the causal relationships between adjacent game events need to be considered. For example, if multiple game events include "Event A, Event B, Event C, Event D…", then when analyzing the causal relationships between these events, it is necessary to analyze the causal relationships between "Event A" and "Event B", "Event B" and "Event C", "Event C" and "Event D" sequentially…
[0137] 2. The causal relationship between the second game event that occurred before the first game event in multiple game events and the first game event.
[0138] This is illustrative. Multiple match events include a first match event of a specified type. These events are arranged chronologically. When generating match story text, the causal impact of a second match event occurring before the first match event on the first match event must be considered. For example, if the first match event is a team battle, and a second match event precedes it (e.g., defeating a map boss), then the generated match story text must consider the causal impact of the buffs gained from defeating the map boss on the team battle event.
[0139] 3. The causal relationship between the first game event and the third game event that occurs after the first game event in multiple game events.
[0140] This is illustrative. Multiple match events include a first match event of a specified type. These events are arranged chronologically. When generating match story text, the causal impact of the outcome of the first match event on the subsequent third match event must be considered. For example, if the first match event is a team fight, and a third match event (a tower push) follows, then the causal impact of the team fight outcome on the tower push event must be considered when generating the match story text.
[0141] 4. The causal relationship between multiple game events and the results of virtual games.
[0142] As an illustration, when generating match story text, it is necessary to consider the causal impact of each match event on the outcome of the virtual match.
[0143] 5. The causal relationship between the first game event and the outcome of the virtual game.
[0144] As an illustration, among multiple match events, including the first match event of a specified event type, when generating match story text, the causal impact of the first match event on the match result of the virtual match needs to be considered.
[0145] Step 230: Obtain the text fragments associated with the first match event from the match story text, and generate the event description content of the first match event based on the text fragments associated with the first match event.
[0146] In this embodiment of the application, the event description is used to explain the first game event in combination with the causal relationship between game events in the virtual game.
[0147] In some embodiments, a text fragment associated with the first match event is obtained from the match story text using a second cue word for the first match event, and event commentary content for the first match event is generated based on the obtained text fragment. Illustratively, the second cue word is obtained, whereby the second cue word is guidance information used to instruct the generation of event commentary content for the first match event; the association between text fragments in the match story text and the first match event is analyzed based on the second cue word to obtain text fragments associated with the first match event, and event commentary content for the first match event is generated based on the text fragments associated with the first match event.
[0148] In some embodiments, the second prompt word includes at least one of the following guiding messages:
[0149] 1. Brief introduction information for virtual matches;
[0150] Among them, the summary guidance information is used to guide the generation of a summary description text that focuses on the first game event and summarizes the game process of the virtual game.
[0151] 2. Event explanation and guidance information for the first match;
[0152] Among them, the event commentary guidance information is used to guide the generation of event commentary text that explains the event occurrence process of the first game event.
[0153] 3. Grouping guidance information based on event groups during the game phase;
[0154] The grouping guidance information guides the output of the event commentary text for the first game event, ensuring that the output is grouped according to the event grouping results. For example, when multiple first game events exist, the grouping guidance information instructs that these events be divided based on the game stages of the virtual match, resulting in at least two event groups. For instance, the grouping guidance information might indicate that the virtual game stages include early, mid, late, and very late stages, and instruct that multiple first game events be assigned to different event groups corresponding to different game stages. The event commentary content for each first game event is then output in groups according to each game stage.
[0155] 4. The text style and guiding information of the event explanation content;
[0156] Among them, the text style guidance information is used to guide the output of event explanation text that uses the first style as the writing style.
[0157] 5. Guiding information regarding the content limits of event explanations;
[0158] Among them, the limiting guidance information is used to control the length of the text when outputting event explanation text.
[0159] Optionally, the content of the event explanation may be in at least one of text or audio format.
[0160] In this embodiment, the generated event commentary is used to generate a game report for a virtual match. Optionally, when the game report is implemented as a text and image report, the game screen image corresponding to the first game event in the virtual match is obtained, and a text and image report is generated based on the game screen image and the event commentary. Optionally, when the game report is implemented as a video report, the game video of the virtual match is obtained, wherein the game video includes a video segment matching the first game event, and event commentary is added according to the position of the video segment in the game video to obtain a game summary video. Optionally, the game video can be a complete game video of the virtual match, or a partial game video edited from a complete game video.
[0161] In summary, when generating event commentary for a specified type of match event in a virtual game, the causal relationships between multiple match events occurring within the virtual game are used to generate the corresponding match story text. Then, text fragments related to the specified type of match event are selected from the match story text, and event commentary for the specified type of match event is generated based on these selected text fragments. In other words, by analyzing the causal relationships of match events within the virtual game, the coherence of the generated match story text is ensured. This allows the event commentary generated on the match story text to express the narrative and rationality of the specified type of match event within the overall virtual game context, thus improving the diversity and accuracy of the generated event commentary.
[0162] In some optional embodiments, when generating the game story text for a virtual match, a first prompt word is used to guide the analysis of the causal relationships between multiple game events. Please refer to [reference needed]. Figure 3 The diagram illustrates a flowchart of a method for generating explanatory content provided in an exemplary embodiment of this application, the method comprising steps 221 to 222.
[0163] Step 221: Obtain the first prompt word.
[0164] In this embodiment, the causal relationship between multiple game events is analyzed by using a first prompt word for the virtual game, thereby obtaining the game story text. The first prompt word is guidance information used to instruct the generation of game story text containing text fragments corresponding to the causal relationship.
[0165] In the field of artificial intelligence, illustrative prompts refer to text or code snippets used to guide models in generating output. By providing prompts, models can learn how to generate relevant outputs, such as text summaries, translations, and dialogues. A prompt can be a simple question or statement, or a complete paragraph or code snippet. Using prompts can help models train faster and generate high-quality output, thereby improving the effectiveness of artificial intelligence applications.
[0166] In this embodiment of the application, the first prompt word is the Prompt input to the model when calling the pre-trained plot generation model.
[0167] In some embodiments, the first prompt word is a prompt message generated by an automated information building function. That is, in the process of implementing the function to generate game story text for virtual games, the first prompt word is generated by calling the automated information building function.
[0168] In one example, the automated information construction function is a template generation function based on the COSTAR framework, which consists of six parts: Context, Objective, Style, Tone, Audience, and Response. For the task of generating game scenario text in this embodiment, Context, Objective, and Response need to be emphasized. Therefore, optionally, the first prompt word includes at least one of contextual prompt information, output example information, and output format prompt information.
[0169] Among them, the contextual prompts are used to guide the analysis of the contextual relationships between game events in the virtual game; the output example information is used to guide the way the game story text is expressed, and the output example information includes example game events and example text fragments corresponding to the example game events; the output format prompts are used to guide the text format of the game story text.
[0170] Optionally, the analysis task indicated by the contextual hints includes at least one of the following:
[0171] 1. Analyze the impact of the second game event, which occurred before the first game event, on the first game event to obtain the first causal result.
[0172] 2. Analyze the impact of the first game event on the third game event that occurs after the first game event to obtain the second causal result.
[0173] 3. Analyze the impact of the first game event on the outcome of the virtual game to obtain the third causal result.
[0174] 4. Analyze the mutual influence between the fourth and fifth game events to obtain the fourth causal result. The fourth and fifth game events are two game events that satisfy the event time constraint conditions among multiple game events. The event time constraint conditions are used to indicate the time interval limit for the mutual influence between game events.
[0175] 5. Analyze the mutual influence between any two game events in multiple game events to obtain the fifth causal result.
[0176] 6. The influence of each game event on the outcome of the virtual game in multiple game events yields the sixth causal result.
[0177] In one example, multiple game events are aggregated into at least two game segments. The set of segments corresponding to these at least two game segments is then used as input to the narrative generation model. The first prompt word for the narrative generation model is as follows:
[0178] "Based on the game clips provided below, select all clips related to MVP and determine whether they are MVP-critical team fight clips based on the field 'Whether they are MVP-critical team fight clips';
[0179] {all_clips} / / Call the collection of clips
[0180] For each MVP segment, write a storyline for that segment based on the preceding and following segments (format: Storyline: []), including the following:
[0181] 1. Please clearly mention the specific team fight or event preceding this MVP segment, and how they affected it. Please indicate the causal relationship;
[0182] 2. How does the result of this MVP segment affect subsequent segments? Please specify the segments and events.
[0183] 3. How does this MVP segment affect the overall game flow and outcome? Please specify the exact segment and event.
[0184] 4. Please deduce the causal relationship between the events, ensuring that the relationship between the two events is time-limited;
[0185] Please output only the MVP segment, and include the "Story" section;
[0186] Please ensure all output is written in Chinese. Please maintain the integrity of the output.
[0187] Plot example:
[0188] (Original excerpt 1)
[0189] Plot: [Plot Example 1]
[0190] (Original excerpt 2)
[0191] Plot: [Plot Example 2]
[0192] Output format:
[0193] Segment number: 【】
[0194] Plot: [ ]
[0195] The example above includes guidance on extracting contextual information, guiding on generating objectives, and guiding on output format. By emphasizing Context, Objective, and Response through the first prompt word, the model output meets the task requirements for generating the game's story text.
[0196] Step 222: Input the first prompt word and the game event data corresponding to multiple game events into the plot generation model. Based on the guidance of the first prompt word, the plot generation model analyzes the causal relationship between multiple game events to obtain game plot text including at least two text fragments.
[0197] In the embodiments of this application, the game story text includes text fragments that express causal relationships, that is, the game story text is a text fragment containing semantics describing the causal relationship between game events.
[0198] In some embodiments, the game story text includes multiple text fragments, that is, the game story text is text obtained by combining multiple text fragments. Optionally, the multiple text fragments correspond one-to-one with multiple game events, that is, each text fragment is descriptive text used to describe different game events; or, a single text fragment corresponds to multiple game events, that is, a single text fragment includes descriptive text corresponding to multiple game events.
[0199] In some embodiments, the game story fragment includes text content describing all input game events; or, the game story fragment includes text content describing a portion of the input game events. That is, during the generation of game story text, the story generation model filters multiple game events based on their event types, retaining only a portion of the game events to generate the game story text. In one example, the story generation model uses all input game events when analyzing the causal relationships between game events. When generating game story text, it filters out game events with non-kill types from among the multiple game events, generating game story text corresponding to game events with kill types.
[0200] In this embodiment of the application, the game plot text is generated through a plot generation model. Optionally, the plot generation model is implemented as a generative pre-trained model. Optionally, the plot generation model includes any one of the following: Generative Pre-Trained Transformer-3 (GPT-3) model, ChatGPT-4 model, ChatGPT model, Pathways Language Model (PaLM), etc. This embodiment of the application does not limit this.
[0201] The GPT series models employ a Transformer architecture, comprising an encoder and a decoder. The encoder consists of multiple Transformer layers used to encode the input text; the decoder consists of multiple Transformer layers used to decode and generate the encoded text. The encoder and decoder structures of GPT-1 and GPT-2 are relatively simple, each consisting of 12 Transformer encoders and decoders, with each encoder and decoder including a multi-head self-attention mechanism and a feedforward neural network layer.
[0202] GPT-3 has a more complex structure, employing more layers and parameters. It contains 96 Transformer encoders and decoders, each incorporating multi-head self-attention, multi-head cross-attention, and feedforward neural network layers. Generally, the GPT series models share similar structures, all using the Transformer architecture and including multi-head self-attention and feedforward neural network layers in each layer. However, with the increase in model size, GPT-3 has undergone further structural optimizations, resulting in greater capabilities in generating natural language text. Figure 4 The diagram illustrates a comparison between the GPT decoder 410 and the Transformer decoder 420 in a 12-layer GPT model. The Transformer decoder 420 includes a masked multi-head attention layer 421, a connection and layer normalization unit 422, a multi-head attention mechanism layer 423, and a feedforward neural network layer 424. The GPT decoder 410 includes a masked multi-head attention layer 411, a connection and layer normalization unit 412, and a feedforward neural network layer 414. In other words, the GPT decoder 410 removes the multi-head attention mechanism layer 423 and its corresponding connection and layer normalization unit 422 from the Transformer decoder 420.
[0203] In some embodiments, the first prompt word includes a data template position for the game event data to be filled. Schematic, the data template position in the first prompt word is filled with game event data corresponding to multiple game events to obtain a first input text. The first input text is then input into the plot generation model. Based on the guidance of the first prompt word, the plot generation model analyzes the causal relationship between multiple game events to obtain a game plot text including at least two text fragments.
[0204] In some embodiments, multiple game events are preprocessed into at least two game segments. The first prompt word includes the data template position of the game segment data corresponding to the game segment to be filled. Schematic, based on the game event data of the game events corresponding to the game segments, the game segment data corresponding to the game segments is integrated to obtain the game segment data corresponding to the game segments. The data template position in the first prompt word is filled with the game segment data corresponding to at least two game segments to obtain the first input text. The first input text is input to the plot generation model. The plot generation model analyzes the causal relationship between the events of multiple game events according to the guidance of the first prompt word to obtain a game plot text including at least two text segments, wherein the text segments in the game plot text correspond one-to-one with the game segments.
[0205] Schematic, in the case where the first cue word includes contextual cue information, the scenario generation model analyzes the causal relationships between multiple game events based on the first cue word to obtain a model analysis process of game scenario text consisting of at least two text fragments, including at least one of the following:
[0206] 1. Based on contextual clues, analyze the impact of a second game event occurring before the first game event on the first game event, obtain a first causal result, and generate game narrative text consisting of at least two text fragments based on the first causal result. That is, by guiding the analysis of the impact of the second game event on the first game event through a guided model, the output game narrative text can include the cause of the occurrence of the specified type of game event, improving the accuracy and coherence of the game narrative text description.
[0207] 2. Analyze the impact of the first game event on the third game event that occurs after the first game event based on contextual clues, obtain a second causal result, and generate game narrative text consisting of at least two text fragments based on the second causal result. That is, by guiding the analysis of the impact of the first game event on the third game event through a guided model, the output game narrative text can include the event occurrence results of the specified type of game event, improving the accuracy and coherence of the game narrative text description.
[0208] 3. Analyze the impact of the first game event on the outcome of the virtual game based on contextual clues to obtain a third causal result, and generate game narrative text consisting of at least two text fragments based on the third causal result. That is, by guiding the model to analyze the impact of a specified type of game event on the overall outcome of the virtual game, the semantics of the output game narrative text can cover the result of the first game event in the overall game, improving the accuracy of the game narrative text description.
[0209] 4. Based on contextual clues, analyze the mutual influence between the fourth and fifth game events to obtain a fourth causal result. Then, generate game story text consisting of at least two text fragments based on this fourth causal result. The fourth and fifth game events are two game events that satisfy a time constraint condition among multiple game events. This time constraint condition indicates the time interval limit for the mutual influence between game events. In one example, the time constraint condition indicates that the fourth and fifth game events are game events whose occurrence time difference is less than a preset duration. That is, by guiding the model to analyze the causal influence between adjacent game events, the coherence and rationality of the generated game story text are ensured.
[0210] In one example, after inputting the first cue word and at least two aggregated game fragments into the narrative generation model, the output of the narrative generation model is as follows:
[0211] Segment ID: [aa]
[0212] Plot: [Text 1]
[0213] Segment ID:
bb
[0214] Plot: [Text 2]
[0215] Segment ID: [cc]
[0216] Plot: [Text 3]
[0217] ...
[0218] Segment ID:
dd
[0219] Plot: [Text n]”.
[0220] In this context, each text fragment (text 1, text 2, ..., text n) in the aforementioned game story text corresponds to a game fragment, and multiple text fragments are combined to form a complete story description in the virtual game.
[0221] In the field of modern natural language processing, generative pre-trained models (such as GPT) often exhibit a so-called "illusion" when generating text, meaning that the generated content contains inaccurate or fictitious information. This is particularly evident in applications involving domain-specific knowledge; for example, when describing details such as skills or items in a game, the model may produce inconsistencies in skill effects or item descriptions. To address this issue, embodiments of this application introduce a cleaned and validated knowledge base.
[0222] This knowledge base contains detailed information about relevant entities within the target application, which is used to provide virtual matches. For example, if the target application is a MOBA game, the knowledge base would contain detailed information about virtual characters, including but not limited to skill descriptions, item attributes, character types, feature analysis, and comprehensive summaries.
[0223] In this embodiment, by retrieving relevant information from the knowledge base in real time each time the model generates content, the illusion phenomenon in the generated content can be effectively reduced or even avoided, thereby improving the accuracy and reliability of the generated text. Illustratively, multiple game entities involved in game events are obtained. Based on the game entities, entity information associated with the game entities is retrieved from the knowledge base. The first prompt word, the game event data corresponding to multiple game events, and the entity information corresponding to multiple game entities are input into the plot generation model. Guided by the first prompt word, the plot generation model analyzes the causal relationship between multiple game events to obtain game plot text including at least two text fragments.
[0224] In some embodiments, to enable the model to better understand the causal relationships between game entities involved in virtual games, this application introduces Graph Retrieval-Augmented Generation (GraphRAG) technology. GraphRAG is a structured, hierarchical retrieval-augmented generation method that extracts a knowledge graph from the original text, constructs a community hierarchy, generates summaries for these communities, and leverages these structures when performing retrieval-augmented generation tasks. Compared to methods that use ordinary text fragments for simple semantic search, GraphRAG provides significant improvements.
[0225] In a schematic manner, a knowledge graph corresponding to the target application is pre-generated using entity information provided by a knowledge base. The knowledge graph is used to indicate the relationships between entities in the target application. During the generation of the game's storyline text, the knowledge graph corresponding to the target application is obtained, and the game entities involved in multiple game events are acquired. Based on the nodes where the game entities are located in the knowledge graph and the edges connecting the nodes corresponding to the game entities, a graph structure feature representation is obtained. The graph structure feature representation is then integrated into the analysis process of the causal relationships between multiple game events to generate the game storyline text corresponding to the virtual game.
[0226] In one example, such as Figure 5 As shown, it illustrates a schematic diagram of a knowledge graph 500 of a game application provided in an exemplary embodiment of this application. The entities in the target game 510 provided by the game application include character entity 520, equipment entity 530, and map entity 540.
[0227] Among them, the character entity 520 is classified according to character type, including archer entity 521, warrior entity 522, assassin entity 523, etc. Each character type includes specific characters, for example, character A entity 524 is of the archer type, and character B entity 525 is of the warrior and assassin types. Character B entity 525 and character A entity 524 are related.
[0228] Equipment entity 530 includes attack equipment entity 531, jungle equipment entity 532, movement equipment entity 533, etc., according to equipment function type. Under each equipment function type, there are specific equipment items. For example, equipment A entity 534 is of the attack type and equipment B entity 535 is of the jungle type. Among them, equipment A entity 534 and character B entity 525 are related.
[0229] Map entity 540 includes top lane entity 541, mid lane entity 542, bottom lane entity 543, jungle entity 544, etc., according to map location type.
[0230] Specifically, the implementation process of GraphRAG includes the following steps:
[0231] Step 1, Entity Extraction:
[0232] First, entity extraction is performed. Taking the battle report generation task in a MOBA game as an example, the entities are heroes, equipment, and the map. Under the hero category, there are various role types (assassin, warrior, marksman, support, mage, tank), and each role type has corresponding heroes. Under the equipment category, there are various attributes, and each attribute has corresponding equipment. Under the map category, there are lanes, and under each lane are various defensive towers. These are all nodes in the map, and each node has a corresponding description, such as the gameplay of a role type, hero skills, equipment stats, etc. By extracting these entities, a fixed knowledge base can be constructed for later use.
[0233] Step 2, Relationship Identification:
[0234] In the relationship identification phase, it is necessary to analyze and determine various relationships between entities, including but not limited to:
[0235] Counterplay: For example, some heroes may be particularly good at countering other heroes in the game;
[0236] Combination Relationships: Certain hero combinations can be particularly powerful;
[0237] Equipment compatibility: Different heroes may be better suited to using specific equipment to maximize their combat effectiveness;
[0238] Map position adaptability: Some heroes may perform better in specific locations on the map.
[0239] These relationships can be identified through data mining techniques, expert input, or pattern recognition from game logs. Relationship identification not only enhances the information density of the graph but also helps the model more accurately simulate real-world game scenarios during reasoning.
[0240] Step 3, Knowledge Graph Construction:
[0241] Once entities and relationships are defined, the next step is to build a knowledge graph. The process of building a knowledge graph includes:
[0242] 1. Node creation: Create a node in the graph for each entity;
[0243] 2. Edge creation: Based on the relationship identification results, create edges between related nodes;
[0244] 3. Attribute assignment: Each node and edge can store various types of information, such as hero skill descriptions and equipment attribute values.
[0245] Building a knowledge graph requires not only technical implementation but also continuous maintenance and updates to reflect changes within the game, such as the addition of new heroes or adjustments to the abilities of older heroes in version updates.
[0246] Step 4, Knowledge Graph Application:
[0247] In the GraphRAG system, the application of knowledge graphs is a key step, mainly including:
[0248] Query processing: When generating event descriptions for game events, the generative pre-trained model queries the knowledge graph based on the key roles in the virtual game to find the neighboring nodes with the highest similarity to the segment.
[0249] Information integration: The system integrates query results (node and edge information) into the generation process to provide richer and more accurate output.
[0250] Step 5, Dynamic Update:
[0251] In practical applications, knowledge graphs are dynamically updated based on new game data to maintain their accuracy and relevance.
[0252] In summary, when generating event commentary for a specified type of match event in a virtual game, the causal relationships between multiple match events occurring within the virtual game are used to generate the corresponding match story text. Then, text fragments related to the specified type of match event are selected from the match story text, and event commentary for the specified type of match event is generated based on these selected text fragments. In other words, by analyzing the causal relationships of match events within the virtual game, the coherence of the generated match story text is ensured. This allows the event commentary generated on the match story text to express the narrative and rationality of the specified type of match event within the overall virtual game context, thus improving the diversity and accuracy of the generated event commentary.
[0253] In this embodiment, the generated first prompt word guides the plot generation model to generate virtual game plot text based on the causal relationship between game events. The first prompt word helps the plot generation model capture the causal relationship between game events, thereby improving the correlation between text fragments in the generated game plot text and improving the accuracy of the game plot text in describing the game process of the virtual game.
[0254] In some optional embodiments, when generating the event description for the first game event, a second prompt is used to guide the generation of event descriptions that implicitly reveal the causal relationships between events, based on the game's storyline text. Please refer to... Figure 6 The diagram illustrates a flowchart of a method for generating explanatory content provided in an exemplary embodiment of this application, the method including steps 231 to 232.
[0255] Step 231: Obtain the second prompt word.
[0256] In this embodiment, a text fragment associated with the first match event is obtained from the match story text using a second prompt word for the virtual match, and event commentary content for the first match event is generated based on the text fragment associated with the first match event. The second prompt word serves as guidance information for generating the event commentary content for the first match event.
[0257] In the field of artificial intelligence, illustrative prompts refer to text or code snippets used to guide models in generating output. By providing prompts, models can learn how to generate relevant outputs, such as text summaries, translations, and dialogues. A prompt can be a simple question or statement, or a complete paragraph or code snippet. Using prompts can help models train faster and generate high-quality output, thereby improving the effectiveness of artificial intelligence applications.
[0258] In this embodiment of the application, the second prompt word is the prompt of the input model when calling the pre-trained explanation generation model.
[0259] In some embodiments, the second prompt word is a prompt message generated by an automated information building function, that is, during the implementation of the function for generating event commentary content for the first game event, the second prompt word is generated by calling the automated information building function.
[0260] In some embodiments, the second prompt includes summary guidance information and event explanation guidance information. The summary guidance information guides the commentary generation model to generate summary description text, which summarizes the virtual game process centered on the first game event. The event explanation guidance information guides the commentary generation model to generate event explanation text for the first game event, which describes the first game event by incorporating the causal relationships between game events.
[0261] In one example, the automated information construction function is a template generation function based on the COSTAR framework. For the task of generating event commentary content in this embodiment, it is necessary to emphasize Context, Objective, and Response. For example, taking the match story text as input to the commentary generation model, the second prompt word corresponding to the commentary generation model is as follows:
[0262] ###Context###
[0263] Hero Information: [{rag}];
[0264] #Battle Clip: [{battle}];
[0265] #Non-battle segment: [{nonbattle}];
[0266] Each segment contains multiple in-game events.
[0267] ###Target###
[0268] Based on the context of each segment, write a vivid story synopsis capturing key moments and strategic maneuvers in the match, highlighting the crucial contribution of {mvp} from {mvp_team}. / / {mvp} is the MVP role identifier in this virtual match, and {mvp_team} is the team identifier of the MVP in this virtual match.
[0269] Then, select some highlights from the above clips based on the following user preferences:
[0270] ***
[0271] {preference} / / Preference information.
[0272] ***
[0273] At the same time, each segment is ranked according to the tension, importance, and relevance to the story outline. If multiple segments meet the criteria and are aligned with the story outline, the segment with the highest ranking is selected.
[0274] Notes on selecting segments:
[0275] 1. Each selected segment must contain all original events, and the phrase length generated by each highlighted segment should match the original phrase length;
[0276] 2. The selected segments must meet user preferences, including segmentation requirements, plot requirements, and quantity requirements;
[0277] 3. Please do not select the same segment repeatedly;
[0278] 4. When the standard specifies a non-combat event, only the non-combat segment should be referenced;
[0279] 5. When the standard specifies a combat event, only combat segments should be referenced;
[0280] 6. If no clip meets the specific criteria, choose an interesting multi-event clip;
[0281] 7. Please do not confuse event numbers with segment numbers;
[0282] 8. Ensure there are at least three segments, but try to meet the standards as much as possible;
[0283] 9. You also need to come up with a slogan title and description for each event in each selected segment, ensuring that these are concise, creative and diverse.
[0284] ###Target###
[0285] Write a coherent and complete explanatory text for each event, and rewrite it according to the script.
[0286] Highlight the integration of preceding and following segments: Clearly incorporate summaries of the context into the narrative to enhance the story's coherence;
[0287] Add connecting words. Combine the preceding and following segments with the given script;
[0288] There needs to be a narrative between multiple highlight scenes. A fabricated story outline is needed to connect all the plots and give the audience a sense of the whole. Therefore, the dialogue generated between multiple highlight scenes should be related. At the beginning of each highlight scene, dialogue content should be generated that echoes the previous highlight scene, and at the end of each highlight scene, foreshadowing the next highlight scene.
[0289] #Notice
[0290] Accurately identify the two sides' factions: {side}. / / {side} represents the faction partitioning data for the input teams;
[0291] Preserve the original event set: Each fragment must contain all original events to ensure integrity;
[0292] The output format of each highlight segment must be consistent with the original highlight story segment, and the length of the speech generated by each highlight segment must be at least the minimum word limit;
[0293] If the provided slogan candidate summary is not empty, rewrite it based on the content of the event dialogue in the segment and with reference to the provided copywriting style. Avoid repetition of the copywriting between segments, but retain the statistics in the original copywriting, such as the number of buffs obtained, the number of dragons obtained, and the number of towers destroyed. If no copywriting is provided, summarize it with reference to the style of the given copywriting in other segments, and summarize it into a copywriting of no more than 10 words. Do not generate the summary copywriting from a first-person perspective.
[0294] Slogan titles should be based on key events and dialogue from highlight scenes, and should consist of 4-6 words. For example, if it's about high-damage skills, you can refer to "Output Machine" or "Explosive Damage"; if it's about multi-kills, you can refer to triple kills - "Triple Kill" or quadra kills - "Quadruple Kill"; if it's about dragons, you can refer to "Dragon Tamer," "Key Dragon Taker," or "Dragon Conqueror"; if it's about pushing towers, you can refer to "Push the Tower While It's in the Right Moment." Following the style of the above titles, summarize your own slogan titles, while avoiding repetition between different segments. Avoid using the same words to increase the diversity of your slogan titles and prevent repetition.
[0295] ###Output###
[0296] All output must be in Chinese. Each selected segment must contain all original events.
[0297] The segment number should be the original segment number.
[0298] The format for outputting the selected segment:
[0299] Story synopsis: []
[0300] [Pre-production / Mid-production / Post-production]: Type: [battle / non-battle] Original clip number: [] Slogan title: []
[0301] Slogan: 【】\nEvent ID: 【】\tEvent Name: 【】\tCommentary: 【】\nEvent ID:
[0302] 【】\tEvent Name: 【】\tCommentary: 【】。
[0303] Step 232: Input the second prompt word, the game story text, and the game event data corresponding to multiple game events into the commentary generation model. Based on the guidance of the second prompt word and the correlation between the text fragments in the game story text and the first game event, the commentary generation model generates the event commentary content for the first game event.
[0304] In this embodiment of the application, the event commentary content of the first game event is generated by a commentary generation model. Optionally, the commentary generation model is implemented as a generative pre-trained model. Optionally, the commentary generation model includes any one of the following: Generative Pre-Trained Transformer-3 (GPT-3) model, ChatGPT-4 model, ChatGPT model, Pathways Language Model (PaLM), etc. This embodiment of the application does not limit this.
[0305] In some embodiments, multiple game events are pre-screened based on preset commentary texts for each game event. Illustratively, the text commentary durations of preset commentary texts corresponding to multiple game events are obtained. While retaining the first game event, for the j-th game event, other game events whose text commentary durations overlap are filtered out until the remaining game events have no overlapping text commentary durations, resulting in a filtered set of multiple game events. The second prompt word, the game story text, and the game event data corresponding to the filtered multiple game events are input into the commentary generation model. The commentary generation model, guided by the second prompt word and considering the correlation between text fragments in the game story text and the first game event, generates the event commentary content for the first game event. That is, pre-screening game events by using preset commentary text durations avoids the final generated event commentary content being too long or repetitive, thus avoiding the problem of mismatch between the commentary content and video length when applied to video report generation.
[0306] In some embodiments, when the second prompt includes summary guidance information and event explanation guidance information, the explanation generation model generates corresponding summary description text and event explanation text for the first game event based on the summary guidance information and event explanation guidance information, respectively. Illustratively, the explanation generation model generates summary description text corresponding to the virtual game based on the summary guidance information, wherein the summary description text is used to summarize the game process of the virtual game centered on the first game event; the explanation generation model generates event explanation text for the first game event based on the segment explanation guidance information; the event explanation content consists of the summary description text and the event explanation text.
[0307] Optionally, the event commentary text includes at least one of the following: the game phase in the virtual game to which the first game event belongs; the phase title of the game phase; the event title of the first game event; and the commentary statement corresponding to the first game event.
[0308] In one example, the output of the generative model is shown below:
[0309] Story Summary: [Text 1]
[0310] [Preliminary Stage]: Type: [battle] Original Segment Number: [0] Slogan Title: [Title 1]; Slogan Copy: [Copy 1];
[0311] Event ID:
aaa
[0312] Event Name: [Event 1]; Description: [Text 2];
[0313] Event ID:
bbb
[0314] Event Name: [Event 2]; Explanation: [Text 3];
[0315] ...
[0316] [Post-production] Stage: Type: [battle] Original segment number: [1] Slogan title: [Title 2]; Slogan text: [Text 2];
[0317] Event ID: [ccc]
[0318] Event Name: [Event 3]; Explanation: [Text 4];
[0319] Event ID:
ddd
[0320] Event Name: [Event 4]; Explanation: [Text 5];
[0321] ...
[0322] [Late Stage]: Type: [Battle] Original Segment Number: [2] Slogan Title: [Title 3]; Slogan Copy: [Copy 3];
[0323] Event ID:
eee
[0324] Event Name: [Event 5]; Explanation: [Text 6];
[0325] Event ID: [fff]
[0326] Event Name: [Event 6]; Explanation: [Text 7];
[0327] ………….
[0328] The text serving as the story synopsis introduces the complete virtual match process in concise language, while the explanatory text for each MVP event explains the process, which is then used to generate the corresponding match reports for the virtual matches downstream.
[0329] In summary, when generating event commentary for a specified type of match event in a virtual game, the causal relationships between multiple match events occurring within the virtual game are used to generate the corresponding match story text. Then, text fragments related to the specified type of match event are selected from the match story text, and event commentary for the specified type of match event is generated based on these selected text fragments. In other words, by analyzing the causal relationships of match events within the virtual game, the coherence of the generated match story text is ensured. This allows the event commentary generated on the match story text to express the narrative and rationality of the specified type of match event within the overall virtual game context, thus improving the diversity and accuracy of the generated event commentary.
[0330] In this embodiment, a second prompt word is generated to guide the commentary generation model to generate event commentary content for the first game event. The second prompt word assists the commentary generation model in generating event commentary content that satisfies the causal relationship between events indicated by the game story text. This improves the accuracy of the generated event commentary content in describing the first game event in the virtual game, while ensuring that the event commentary content of different first game events is logically reasonable and semantically coherent.
[0331] In some embodiments, taking a pre-trained LLM as both the story generation model and the narration generation model as an example, the data flow of the narration content generation process provided in this application embodiment is illustrated. For example... Figure 7 As shown, it illustrates a data flow diagram of the explanatory content generation process provided in an exemplary embodiment of this application, the data flow including:
[0332] S1. Extract the event stream from the game board data 701 of the virtual game to obtain the event stream 702 corresponding to the virtual game. The event stream 702 includes multiple game events, including MVP events whose event type is marked as MVP.
[0333] S2, aggregate multiple game events in event stream 702 to obtain at least two game fragments 703.
[0334] S3, identify kill segments for at least two match segments 703, and label match segment 703 as team fight segment 704 and non-team fight segment 705 based on the identification results.
[0335] S4. Input the game event data corresponding to the game event in the game segment 703 and the game board data 701 into the first LLM 710 to obtain the game story text 706.
[0336] S5, input the team battle segment 704 and non-team battle segment 705 with annotation information and the game story text 706 into the second LLM720 to obtain the event explanation content 707 corresponding to the MVP event.
[0337] S6, input the event commentary content 707 into the battle report generation module 730 to generate a video battle report 708.
[0338] It is worth noting that the first LLM710 and the second LLM720 mentioned above can be implemented as the same LLM, that is, the same LLM can be used in the generation process of the game plot text 706 and the event commentary content 707, with different inputs to the two generation processes; or, they can be implemented as LLMs trained based on different training data, which is not limited here.
[0339] In some embodiments, the parameters of a pre-trained generative model are fine-tuned to obtain a scene model applicable to the scenarios described in this application. In one example, during supervised fine-tuning (SFT) of the generative pre-trained model using data generated by GPT, we can discuss the specific steps and technical details in detail. This process involves data preparation, model training, and final evaluation and application. The following is a detailed description of this process:
[0340] 1. Data Generation and Preparation
[0341] First, GPT4 is used to generate training data. This step includes the following aspects:
[0342] Data Generation: Use a large model to generate text based on a predefined template. This text should cover all pre-defined tasks and scenarios, including different MVP heroes / types / matches, to ensure the generated dataset has high diversity and coverage.
[0343] Data cleaning and filtering: The generated data needs to undergo cleaning and quality control to ensure its accuracy and applicability. This includes removing irrelevant or erroneous output and optimizing the data format.
[0344] 2. Model Training
[0345] Next, use this pre-generated data to perform SFT on the generative pre-trained model:
[0346] Training set preparation: The cleaned data is divided into a training set and a validation set. The training set is used for model training, and the validation set is used to adjust hyperparameters and prevent overfitting.
[0347] Model configuration: Set appropriate training parameters, such as learning rate, batch size, and training period. These parameters need to be adjusted multiple times based on the model's performance.
[0348] Fine-tuning: Fine-tuning a generative pre-trained model using the training set.
[0349] Detection and tuning: Detect the model's performance during training, such as loss and accuracy on the validation set. Adjust the training strategy and parameters based on these metrics.
[0350] 3. Model Evaluation and Deployment
[0351] Performance evaluation: Evaluate the performance of the fine-tuned model on independent test sets to ensure the effectiveness and stability of the model in real-world applications.
[0352] Continuous optimization: Based on the model's performance in real-world applications, continuously optimize the model parameters and training data.
[0353] In this way, even smaller generative pre-trained models can be effectively trained using high-quality data obtained from larger models, achieving similar results to larger models while significantly reducing operating costs and resource consumption. This approach not only improves model accessibility and usability but also ensures efficient model performance even with limited resources.
[0354] To further optimize the generation of video battle reports, we introduced two methods for fine-tuning the model: Direct Preference Optimization (DPO) and Proximal Policy Optimization (PPO). These methods are primarily used in the GPT selection and script generation stages to improve the quality and relevance of the generated content. First, Direct Preference Optimization is a model-based optimization technique that adapts to environmental changes by dynamically adjusting the decision-making policy. In our process, DPO is used to adjust the parameters of the generation model in real time to adapt to constantly changing game events and user preferences. Second, Proximal Policy Optimization (PPO) is a widely used method in reinforcement learning that improves the policy by optimizing a specific objective function. PPO is used to solve policy optimization problems in reinforcement learning. The goal of PPO is to maximize policy performance while ensuring the stability of policy updates. PPO introduces an objective function L called "pruning". clip This is achieved using (θ), a function that limits the magnitude of policy updates, thus avoiding performance crashes that could result from excessive policy changes.
[0355] PPO's pruning objective function L clip(θ) is defined as shown in Formula 1.
[0356] Formula 1:
[0357] Where, r t (θ) is the strategy ratio, defined as shown in Formula 2, A t It is an estimate of the advantage function, used to evaluate the effectiveness of taking action a. t Advantages over average action. The parameter ∈ is a small positive number, typically set between 0.1 and 0.3, used to control the magnitude of the clipping.
[0358] Formula 2:
[0359] Where, π θ This indicates that, with policy parameter θ, state s t Take action t The probability, and The old strategy parameter θ old The probability of it happening.
[0360] By combining DPO and PPO, we can improve the model's adaptability and flexibility to complex game environments while ensuring the quality of generated content. This approach not only improves the accuracy and appeal of generated dialogue but also ensures the efficiency and stability of the entire generation process.
[0361] In one example, taking a MOBA game application as the target application, the process of generating a video report for a MOBA game match after it ends is illustrated. Figure 8 As shown, the process includes the following steps:
[0362] Step 801: During the game, record the game board data.
[0363] To illustrate, in a MOBA game application, the server records real-time game board data generated during a match. This game board data includes global data, behavioral data, and performance data. Global data refers to data shared throughout the entire game, such as information about the virtual characters participating in the game, team information, and map information. Behavioral data refers to data generated by the actions of virtual characters during the game, such as coordinates when virtual characters move, skill release data, and virtual item usage data. Performance data refers to quantified data on the performance of virtual characters during the game, such as KDA, DPM, and GPM.
[0364] Step 802: Receive the video battle report generation request sent by the terminal.
[0365] After a game ends, the terminal displays the game results screen. If the account currently logged into the terminal is the MVP account that controlled the MVP character in the game, the terminal provides a video battle report generation control in the game results screen. In response to the terminal receiving the trigger operation of the battle report generation control, it sends a video battle report generation request to the server.
[0366] After receiving a video battle report generation request, the server responds by calling the battle report generation function module in the server to automatically generate the video battle report.
[0367] Step 803: Obtain the game board data for the game match.
[0368] The video battle report generation request sent by the terminal carries the game match identifier, and the server reads the corresponding game board data from the database based on the game match identifier.
[0369] Step 804: Extract the event stream from the game data.
[0370] The battle report generation module describes the event flow of the game data it reads. The event flow includes events such as the MVP's actions, skill usage, and team battles. The module uses efficient data processing and feature extraction techniques to capture key events in the game and transform them into processable data. Specifically, taking team fights with kills as key events as an example, the key event data for each event includes character information and team fight information. Character information includes character name, character identifier, lane assignment, and whether the character is the winning MVP, etc.; team fight information includes character performance data, damage output / damage taken percentage, number of dragons / buffs / towers taken, etc.
[0371] Step 805: Aggregate the game events in the event stream to obtain game fragments.
[0372] The battle report generation module aggregates match events in the event stream and converts each event into team fight segments related to the MVP, so as to better understand the overall progress of the game and the development of the battle.
[0373] First, the game events in the event stream are filtered and deduplicated. Then, for each game event, five game events related to the MVP are expanded before and after it. If a key MVP event is encountered during the expansion, five new game events are retrieved. If two game events are separated by more than five seconds, the two game events are divided into different game segments.
[0374] After aggregation, game segments without kills are filtered out, retaining only those with kills. This aggregation process identifies key team fights, crucial turning points, and exciting moments in a game. This aggregation process can be achieved through strategic aggregation and post-processing filtering to ensure the capture of the most logical, dramatic, and entertaining segments.
[0375] Step 806: Generate the first prompt word, and input the first prompt word and the corresponding game segment data into the LLM to obtain the game's story text.
[0376] The battle report generation module calls the COSTAR framework to generate the first prompt word, which is shown below:
[0377] "Based on the game clips provided below, select all clips related to MVP and determine whether they are MVP-related key team fight clips based on the field 'whether they are MVP key team fight clips'."
[0378] {all_clips} / / Collection of clips
[0379] For each MVP segment, write a storyline for that segment based on the preceding and following segments (format: Storyline: []), including the following:
[0380] 1. Please clearly mention the specific team fight or event preceding this MVP segment, and how they affected it. Please indicate the causal relationship;
[0381] 2. How does the result of this MVP segment affect subsequent segments? Please specify the segments and events.
[0382] 3. How does this MVP segment affect the overall game flow and outcome? Please specify the exact segment and event.
[0383] 4. Please deduce the causal relationship between the events. Please ensure that the relationship between the two events is time-limited.
[0384] Please output only the MVP segment, and include the "Story" section.
[0385] Please ensure all output is written in Chinese. Please maintain the integrity of the output.
[0386] Example of a plot:
[0387] (Original excerpt)
[0388] Plot: [Prior to this clip, we saw the Blue team successfully eliminate two of the Red team's carries in the mid lane (Clip 1), providing the MVP hero with an excellent opportunity to invade the jungle. Therefore, the MVP hero used this numerical advantage to successfully steal the Red team's blue buff and secure a spectacular kill. This action not only gave the Blue team a significant economic advantage but also greatly boosted team morale. In the following clip, we see the Blue team using this momentum to push down the Red team's turret, further solidifying their lead. The success of this MVP clip significantly propelled the overall game's progress, ultimately helping the Blue team win the match.]
[0389] (Original excerpt)
[0390] Plot: [Prior to this clip, we saw the Blue team successfully kill the Red team's mage in the mid lane (Clip 10), providing the MVP hero with an excellent opportunity to push the tower in the bottom lane. Therefore, the MVP hero used this numerical advantage to successfully kill the Red team's marksman and push the tower. This action not only gave the Blue team a huge economic advantage but also greatly boosted team morale. In the following clip, we see the Blue team capitalize on this momentum to steal the enemy's blue buff, further solidifying their lead. The success of this MVP clip significantly propelled the overall game's progress, ultimately helping the Blue team win the match.]
[0391] Output format:
[0392] Segment number: 【】
[0393] Plot: [ ]
[0394] The battle report generation module inputs the generated first prompt and game segment data into the LLM. The LLM then outputs the storyline of the MVP segment from all game segments. This storyline combines other segments that occurred before it and segments that will occur after it. This step extracts the storyline of the segment and the causal relationships and similarities between the preceding and following segments. This connection can then be used to construct a better narrative in the commentary.
[0395] For example, the output of LLM in this generation process is shown below:
[0396] Segment ID:
[13]
[0397] Plot: [In previous team fights, the MVP character had participated in numerous engagements but hadn't achieved significant results, often struggling to stay afloat. However, in this crucial team fight segment, the MVP character finally turned the tide, successfully eliminating character A and securing a lifeline for the team.]
[0398] Segment ID:
[20]
[0399] Plot: [In the previous battles, the MVP character, while showing some promise, wasn't able to completely control the situation. However, in this segment, the MVP character plays a crucial role in the top lane team fight, not only controlling the enemy hero but also successfully eliminating character B, solidifying the red team's lead.]
[0400] Segment ID:
[22]
[0401] Plot: [In the previous MVP-driven crucial team fight segment, the MVP character played a vital role in the top lane team fight, eliminating character B. In this segment, the MVP character once again demonstrated their skill in the top lane, successfully eliminating character C and solidifying the red team's lead.]
[0402] Segment ID:
[23]
[0403] Plot: [Following up from the previous crucial team fight segment, the MVP character continues to exert pressure in the top lane. In this segment, the MVP character successfully eliminates character D, further extending the red team's lead.]
[0404] Segment ID:
[24]
[0405] Plot: [In the previous team fight, the MVP character had already eliminated multiple enemy heroes, demonstrating their formidable combat prowess. In this clip, the MVP character once again proves their strength in the top lane battle, successfully eliminating character D and giving the red team an even greater lead.]
[0406] Segment ID:
[25]
[0407] Plot: [In the previous team fight, the MVP character had already demonstrated their strength, repeatedly eliminating enemy heroes. In this clip, the MVP character once again plays a crucial role in the battle in the bottom lane river, successfully eliminating character B and further solidifying the red team's lead.]
[0408] Segment ID:
[28]
[0409] Plot: [In previous team fights, the MVP character has repeatedly proven their strength, consistently gaining advantages for the red team. In this clip, the MVP character once again demonstrates their bravery in the mid-lane battle, consecutively eliminating characters E and A, giving the red team a significant lead.]
[0410] Segment ID:
[30]
[0411] Plot: [In previous team fights, the MVP character has repeatedly demonstrated their formidable combat prowess, gaining significant advantages for the red team. In this clip, the MVP character once again proves their worth in a mid-lane battle, successfully eliminating character D and subsequently taking down character B, achieving a double kill and further solidifying the red team's lead.]
[0412] Segment ID:
[31]
[0413] Plot: [In the previous MVP-driven crucial team fight segment, the MVP character secured a double kill in the mid-lane battle, giving the red team a significant advantage. In this segment, the MVP character continues to dominate in the battle at the blue team's high ground, successfully eliminating character A and further advancing the red team's offensive.]
[0414] Segment ID:
[32]
[0415] Plot: [In the previous MVP-driven crucial team fight segment, the MVP character successfully eliminated character A in the battle on the blue team's high ground, giving the red team a significant advantage. In this segment, the MVP character once again demonstrated their bravery in the mid-lane battle, consecutively eliminating characters E and B, securing an almost irreversible lead for the red team.]
[0416] Step 807: Generate the second prompt word, and input the second prompt word, the game story text, and the game event data of the MVP game event into LLM to obtain the event commentary of the MVP event.
[0417] The battle report generation module calls the COSTAR framework to generate a second prompt word, which is shown below:
[0418] ###Context###
[0419] Hero Information: [{rag}];
[0420] #Battle Clip: [{battle}];
[0421] #Non-battle segment: [{nonbattle}];
[0422] Each segment contains multiple in-game events.
[0423] ###Target###
[0424] Based on the context of each segment, write a vivid story synopsis capturing key moments and strategic maneuvers in the game, highlighting {mvp}'s crucial contributions from {mvp_team}.
[0425] Then, select some highlights from the above clips based on the following user preferences:
[0426] ***
[0427] {preference}
[0428] ***
[0429] At the same time, each segment is ranked based on the tension, importance, and relevance to the story synopsis of the match events. If multiple segments meet the criteria and are aligned with the story synopsis, the highest-ranked segment is selected.
[0430] Notes on selecting segments:
[0431] 1. Each selected segment must contain all original events, and the phrase length generated by each highlighted segment should match the original phrase length;
[0432] 2. The selected segments must conform to the account's preferences, including requirements for segmentation, plot, and quantity;
[0433] 3. Please do not select the same segment repeatedly;
[0434] 4. When the standard specifies a non-combat event, only the non-combat segment should be referenced;
[0435] 5. When the standard specifies a combat event, only combat segments should be referenced;
[0436] 6. If no clip meets the specific criteria, choose an interesting multi-event clip;
[0437] 7. Do not confuse event numbers with segment numbers;
[0438] 8. Ensure there are at least three segments, but try to meet the standards as much as possible;
[0439] 9. Develop a slogan title and description for each event in each selected segment, ensuring they are concise, creative, and diverse.
[0440] ###Target###
[0441] Write a coherent and complete explanatory text for each event, and rewrite it according to the existing script.
[0442] Highlight the integration of preceding and following segments: Clearly incorporate contextual summaries into the narrative to enhance the story's coherence.
[0443] Add connecting words. Combine the preceding and following segments with the given script.
[0444] There needs to be a narrative between multiple highlight scenes. A fabricated story outline is needed to connect all the plots and give the audience a sense of the whole. Therefore, the dialogue generated between multiple highlight scenes should be related. At the beginning of each highlight scene, dialogue content should be generated that echoes the previous highlight scene, and at the end of each highlight scene, foreshadowing the next highlight scene.
[0445] #Notice
[0446] Accurately identify the two sides: {side};
[0447] Preserve the original event set: Each fragment must contain all original events to ensure integrity;
[0448] The output format of each highlight segment must be consistent with the original highlight story segment, and the length of the speech generated by each highlight segment must be at least the minimum word limit;
[0449] If the provided slogan candidate summary is not empty, rewrite it based on the content of the event dialogue in the segment and with reference to the provided copywriting style. Avoid repetition of the copywriting between segments, but retain the statistical data in the original copywriting, such as the number of buffs obtained, the number of dragons obtained, and the number of towers destroyed. If no copywriting is provided, summarize it with reference to the style of the given copywriting in other segments, and summarize it into a copywriting of no more than 10 words; do not generate the summary copywriting from a first-person perspective.
[0450] Slogan titles should be based on key events and dialogue from highlight scenes, and should consist of 4-6 characters. For example, if it's about high-damage skills, you could use phrases like "Output Machine" or "Explosive Damage"; if it's about multi-kills, you could use phrases like "Triple Kill - Triple Victory" or "Quadruple Kill - Quadruple Victory"; if it's about dragons, you could use phrases like "Dragon Tamer," "Key Dragon Taker," or "Dragon Conqueror"; if it's about pushing towers, you could use phrases like "Take Advantage of the Opportunity to Push Towers." Following the style of the above titles, summarize your own slogan titles, while avoiding repetition between different segments. Avoid using the same words to increase the diversity of your slogan titles and prevent repetition.
[0451] ###Output###
[0452] All output must be in Chinese, and each selected segment must contain all the original events.
[0453] The segment number should be the original segment number.
[0454] The format for outputting the selected segment:
[0455] Story synopsis: []
[0456] [Pre- / Mid- / Post-Production]: Type: [battle / nonbattle] Original Segment Number: [] Slogan Title: [] Slogan Text: [] Event Number: [] Event Name: [] Narration: [] Event Number:
[0457] 【】\tEvent Name: 【】\tCommentary: 【】。
[0458] To ensure that the generated dialogue is both concise and coherent, the game events are preprocessed. Specifically, starting with a pre-configured original dialogue for a game event, the time required to complete the dialogue is estimated, and other events are eliminated within this time frame to avoid dialogue that is too long or repetitive, which could affect the description of subsequent events.
[0459] Next, the second cue word, the MVP segment, and the match story text obtained from the first LLM call are input into the LLM. Based on the specific content of each segment and the storyline provided by the user, the most suitable segment is selected to generate the corresponding commentary. During this process, team battle and non-team battle segments are clearly distinguished to ensure that the selected segments strictly conform to the user's storyline. This not only ensures the fit between the commentary and the game context but also effectively attracts the audience's attention while ensuring the coherence, diversity, and controllability of the commentary.
[0460] For example, the output of LLM in this generation process is shown below:
[0461] Synopsis: [After initial setbacks, the MVP of the red team gradually became a key figure on the battlefield thanks to his superb strategic planning and excellent team fight control. In numerous team fights, he not only successfully eliminated key enemy heroes but also won valuable counter-attack opportunities for his team, ultimately helping the red team turn the tide from a disadvantageous position and achieving a phenomenal carry performance.]
[0462] • [Early Stage]: Type: [Battle] Original Segment Number: [0] Slogan Title: [Game Reversal]; Slogan Text: [The MVP Character's Exquisite Strike]
[0463] Event ID:
[112] Event Name: [MVP Character Unleashes Ultimate Skill] Narration: [Following the unfavorable situation after being ambushed, the MVP character uses their ultimate skill as an opportunity to turn the tide!]
[0464] Event ID:
[118] Event Name: [MVP Character's First Skill Takes Down Character A] Commentary: [The chess piece has landed, character A has fallen, the MVP character's first skill was extremely precise!]
[0465] Event ID:
[125] Event Name: [MVP character takes down character B, this double kill] Commentary: [Continuous kills, the MVP character's strategy is like playing chess, this double kill is crucial!]
[0466] Event ID:
[134] Event Name: [Three players knocked into the air by the third skill] Commentary: [The third skill swept through the battlefield like a thousand troops, sending three players soaring through the air. The MVP character controlled the battle!]
[0467] Event ID:
[136] Event Name: [Another kill secured, a triple kill, awesome!]
[0468] Commentary: [Another victory! The MVP secures a triple kill, the red team's counterattack has begun!]
[0469] • [Post-production]: Type: [battle] Original clip number: [1] Slogan title: [Key Control]; Slogan text: [MVP role, the key player in team battles]
[0470] Event ID:
[435] Event Name: [The jungle is suitable for the red team to initiate team fights; area-of-effect skills can block paths]
[0471] Commentary: [The battle in the jungle reignites, and the MVP character's area-of-effect skills become the red team's winning weapon!]
[0472] Event ID:
[438] Event Name: [MVP Character's Third Skill Controls Character D] Commentary: [At a crucial moment, the MVP character's third skill controlled character D, securing a valuable initiative for the team!]
[0473] Event ID:
[467] Event Name: [Character B's third skill hit four people] Commentary: [Although Character B delivered a stunning attack, the MVP character's crowd control remained rock solid.]
[0474] Event ID:
[475] Event Name: [Character B's second skill severely damaged the MVP character] Commentary: [Although the MVP character was severely damaged, his sacrifice secured the victory in the team fight. This is the choice of a hero!]
[0475] • [Late Game]: Type: [Battle] Original Segment Number: [2] Slogan Title: [Ultimate Weapon]; Slogan Text: [MVP Character, the Winner of the Late Game]
[0476] Event ID:
[722] Event Name: [MVP Character Combined with Character C] Commentary: [MVP character combined with Character C, invincible, spell vamp, this is the ultimate weapon in the late game!]
[0477] Event ID:
[739] Event Name: [MVP Character Unleashes Ultimate Skill] Commentary: [Unleashing their ultimate skill once again, the MVP character's void chessboard once more becomes the focus of the battlefield!]
[0478] Event ID:
[756] Event Name: [MVP Character's Third Skill Controls Character D] Commentary: [MVP Character's third skill controls Character D again; this control may be the key to victory!]
[0479] • [Late Game]: Type: [nonbattle] Original clip number: [0] Slogan title: [BOSS Showdown]; Slogan text: [MVP role, the BOSS at the crucial moment]
[0480] Event ID:
[821] Event Name: [MVP Character Steals the BOSS] Commentary: [The BOSS is now in the bag, the MVP character's BOSS-stealing maneuver adds icing on the cake for the red team!]
[0481] Step 808: Edit the complete game video to obtain a game video composed of MVP video clips. Add corresponding event commentary to the game video according to the chronological order of the MVP events to obtain a video battle report.
[0482] The battle report generation module acquires the complete game video, edits the complete game video according to the time period of the MVP event in the complete game video, and obtains the game video that only includes the MVP video segment. It also adds subtitles and / or commentary voice to the game video according to the event commentary of the generated MVP event, and adds appropriate background music to obtain the video battle report.
[0483] Step 809: Send the video battle report data to the terminal.
[0484] After receiving the battle report data, the terminal renders the video battle report onto the screen.
[0485] It should be noted that this application may display prompt interfaces, pop-ups, or output voice prompts before and during the collection of user data. These prompt interfaces, pop-ups, or voice prompts are used to inform the user that their data is being collected. This ensures that the application only begins the steps for collecting user data after receiving confirmation from the user regarding the prompt interface or pop-up; otherwise (i.e., without user confirmation), the steps for collecting user data end, meaning no user data is collected. In other words, all user data collected in this application is collected with the user's consent and authorization, and the collection, use, and processing of related user data must comply with the relevant laws, regulations, and standards of the relevant countries and regions.
[0486] Please refer to Figure 9 This illustration shows a structural block diagram of an explanatory content generation apparatus provided in an exemplary embodiment of this application. The apparatus includes the following modules:
[0487] The acquisition module 910 is used to acquire multiple game events of a virtual game, wherein the game events are events generated in the virtual game, and the multiple game events include a first game event, wherein the first game event is a game event of a specified type.
[0488] The first generation module 920 is used to generate game plot text corresponding to the virtual game based on the causal relationship between the events of the multiple game events. The game plot text includes text fragments expressing the causal relationship.
[0489] The second generation module 930 is used to obtain text fragments associated with the first game event from the game story text, and to generate event explanation content for the first game event based on the text fragments associated with the first game event. The event explanation content is used to explain the first game event in combination with the causal relationship between game events in the virtual game.
[0490] In some alternative embodiments, such as Figure 10 As shown, the first generation module 920 includes:
[0491] The first acquisition unit 921 is used to acquire a first prompt word, which is guidance information used to indicate the generation of the game story text;
[0492] The first generation unit 922 is used to analyze the causal relationship between the events of the multiple game events based on the first prompt word, and obtain the game plot text including at least two text fragments.
[0493] In some optional embodiments, the first prompt word includes at least one of contextual prompt information, output example information, and output format prompt information;
[0494] The contextual hints are used to guide the task of analyzing the contextual relationships between game events in the virtual game.
[0495] The output example information is used to guide the way the game story text is expressed. The output example information includes example game events and example text fragments corresponding to the example game events.
[0496] The output format prompt information is used to guide the text format of the game's storyline text.
[0497] In some optional embodiments, when the first prompt word includes the contextual prompt information, the first generation unit 922 is further configured to analyze the influence of a second game event occurring before the first game event on the first game event based on the contextual prompt information, and obtain a first causal result; and generate the game plot text composed of the at least two text fragments based on the first causal result;
[0498] The first generation unit 922 is further configured to analyze the impact of the first game event on the third game event that occurs after the first game event based on the contextual prompt information, and obtain a second causal result; and generate the game plot text composed of the at least two text fragments based on the second causal result;
[0499] The first generation unit 922 is further configured to analyze the impact of the first game event on the game result of the virtual game based on the contextual prompt information, and obtain a third causal result; and generate the game plot text composed of the at least two text fragments based on the third causal result;
[0500] The first generation unit 922 is further configured to analyze the mutual influence between the fourth game event and the fifth game event based on the contextual prompt information to obtain a fourth causal result; and generate the game plot text composed of the at least two text fragments based on the fourth causal result, wherein the fourth game event and the fifth game event are two game events among the plurality of game events that satisfy the event time limit condition, and the event time limit condition is used to indicate the time interval limit for the mutual influence between game events.
[0501] In some optional embodiments, the first generation unit 922 is further configured to input the first prompt word and the game event data corresponding to the plurality of game events into the plot generation model, and through the plot generation model, based on the guidance of the first prompt word, analyze the causal relationship between the events occurring in the plurality of game events to obtain the game plot text including the at least two text fragments, and the plot generation model is configured to generate text describing the game process of the virtual game based on the causal relationship between the game events.
[0502] In some optional embodiments, the first generation module 920 further includes:
[0503] Aggregation unit 923 is used to aggregate the multiple game events based on the event occurrence order among the multiple game events to obtain at least two game segments, wherein the game segment includes at least one game event;
[0504] The first generation unit 922 is further configured to generate text fragments corresponding to the at least two game segments based on the causal relationship between the events of the plurality of game events, thereby obtaining the game plot text.
[0505] In some optional embodiments, the aggregation unit 923 is further configured to determine at least two central game events from the plurality of game events, wherein the central game event is the aggregation center when game events are aggregated;
[0506] The aggregation unit 923 is further configured to perform an event aggregation process for the i-th central game event, and to obtain a supplementary game event corresponding to the i-th central game event from the plurality of game events. The supplementary game event is a game event among the plurality of game events that satisfies the event order relationship with the i-th central game event, where i is a positive integer.
[0507] The aggregation unit 923 is further configured to combine the i-th central game event and the supplementary game event to obtain the i-th game segment.
[0508] In some optional embodiments, the event sequence relationship includes at least one of the following:
[0509] The supplementary game events are the n game events adjacent to the i-th central game event, where n is a positive integer;
[0510] The time difference between the first event time corresponding to the i-th central game event and the second event time corresponding to the supplementary game event is lower than a preset time difference threshold.
[0511] The first event priority of the i-th central game event in the plurality of game events is higher than the second event priority of the supplementary game event in the event stream.
[0512] In some optional embodiments, the first acquisition unit 921 is further configured to acquire a knowledge graph corresponding to the target application, the knowledge graph being used to indicate the relationship between entities in the target application, and the target application being used to provide the virtual game;
[0513] The first acquisition unit 921 is further configured to acquire game entities involved in the plurality of game events;
[0514] The first generation unit 922 is further configured to obtain a graph structure feature representation based on the node where the local entity is located in the knowledge graph and the edges connecting the nodes corresponding to the local entity;
[0515] The first generation unit 922 is further configured to incorporate the graph structure feature representation into the analysis process of the causal relationship between the multiple game events, and generate the game plot text corresponding to the virtual game.
[0516] In some optional embodiments, the second generation module 930 includes:
[0517] The second acquisition unit 931 is used to acquire a second prompt word, which is guidance information used to indicate the event explanation content when generating the first game event;
[0518] The second generation unit 932 is used to analyze the correlation between the text fragments in the game story text and the first game event based on the second prompt word, so as to obtain the text fragments associated with the first game event, and to generate the event explanation content of the first game event based on the text fragments associated with the first game event.
[0519] In some optional embodiments, the second generation unit 932 is further configured to input the second prompt word, the game story text, and the game event data corresponding to the plurality of game events into the commentary generation model. The commentary generation model generates the event commentary content of the first game event based on the guidance of the second prompt word and the correlation between the text fragments in the game story text and the first game event. The commentary generation model is configured to generate content to comment on the first game event based on the correlation between the game story text and the first game event.
[0520] In some optional embodiments, the second acquisition unit 931 is further configured to acquire the text commentary duration of the preset commentary texts corresponding to the plurality of game events;
[0521] The second generation module 930 further includes:
[0522] The filtering unit 933 is used to, while retaining the first game event, filter out other game events whose text commentary duration is covered by the j-th game event, until the text commentary durations of the remaining game events do not overlap, and obtain multiple filtered game events.
[0523] The second generation unit 932 is further configured to input the second prompt word, the game plot text, and the game event data corresponding to the filtered multiple game events into the commentary generation model.
[0524] In some optional embodiments, the second prompt includes summary guidance information and event explanation guidance information;
[0525] The second generation unit 932 is further configured to generate a summary description text corresponding to the virtual game based on the summary guidance information through the explanation generation model. The summary description text is used to summarize the game process of the virtual game with the first game event as the center.
[0526] The second generation unit 932 is further configured to generate event commentary text for the first game event based on the guidance of the fragment commentary guidance information through the commentary generation model;
[0527] The second generation unit 932 is further configured to compose the event explanation content from the summary description text and the event explanation text.
[0528] In some optional embodiments, the event description text includes at least one of the following:
[0529] The first game event refers to the game phase within the virtual game;
[0530] The stage title of the game phase;
[0531] The event title of the first game event;
[0532] The commentary statement corresponding to the first game event.
[0533] In some optional embodiments, the acquisition module 910 includes:
[0534] The third acquisition unit 911 is used to acquire the game board data of the virtual game, wherein the game board data is the data recorded during the virtual game.
[0535] The third generation unit 912 is used to generate an event stream of the virtual game based on the game board data, the event stream including the plurality of game events arranged in the order of event occurrence;
[0536] The determining unit 913 is used to perform event type detection on the game event and determine the first game event in the event stream.
[0537] In some optional embodiments, the acquisition module 910 is further configured to acquire the game video of the virtual game, the game video including video clips that match the first game event;
[0538] The device further includes:
[0539] The third generation module 940 is used to add the event commentary content according to the position of the video clip in the game video to obtain a game summary video.
[0540] It should be noted that the narration generation apparatus provided in the above embodiments is only an example of the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the narration generation apparatus and the narration generation method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.
[0541] Figure 11 This illustration shows a schematic diagram of the structure of a server provided in an exemplary embodiment of this application. Specifically, it includes the following structure.
[0542] Server 1100 includes a Central Processing Unit (CPU) 1101, a system memory 1104 including Random Access Memory (RAM) 1102 and Read Only Memory (ROM) 1103, and a system bus 1105 connecting the system memory 1104 and the CPU 1101. Server 1100 also includes a mass storage device 1106 for storing the operating system 1113, application programs 1114, and other program modules 1115.
[0543] Mass storage device 1106 is connected to central processing unit 1101 via a mass storage controller (not shown) connected to system bus 1105. Mass storage device 1106 and its associated computer-readable media provide non-volatile storage for server 1100. That is, mass storage device 1106 may include computer-readable media (not shown) such as hard disk or compact disc read-only memory (CD-ROM) drives.
[0544] Without loss of generality, computer-readable media can include computer storage media and communication media. Computer storage media includes volatile and non-volatile, removable and non-removable media implemented using any method or technology for storing information such as computer-readable instructions, data structures, program modules, or other data. Computer storage media include RAM, ROM, erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other solid-state memory technologies, CD-ROM, digital versatile disc (DVD) or other optical storage, magnetic tape cassettes, magnetic tape, disk storage, or other magnetic storage devices. Of course, those skilled in the art will recognize that computer storage media are not limited to the above-mentioned types. The system memory 1104 and mass storage device 1106 described above can be collectively referred to as memory.
[0545] According to various embodiments of this application, server 1100 can also be connected to a remote computer on a network, such as the Internet. That is, server 1100 can be connected to network 1112 via network interface unit 1111 connected to system bus 1105, or it can also use network interface unit 1111 to connect to other types of networks or remote computer systems (not shown).
[0546] The aforementioned memory also includes one or more programs, which are stored in the memory and configured to be executed by the CPU.
[0547] Embodiments of this application also provide a computer device including a processor and a memory. The memory stores at least one instruction, at least one program, code set, or instruction set. The processor loads and executes the at least one instruction, at least one program, code set, or instruction set to implement the method for generating explanatory content provided in the above-described method embodiments. Optionally, the computer device may be a terminal or a server.
[0548] Embodiments of this application also provide a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, at least one program, code set, or instruction set is loaded and executed by a processor to implement the method for generating explanatory content provided in the above-described method embodiments.
[0549] Embodiments of this application also provide a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform any of the narration generation methods described in the above embodiments.
[0550] Optionally, the computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), solid-state drives (SSDs), or optical discs, etc. The random access memory may include resistive random access memory (ReRAM) and dynamic random access memory (DRAM). The sequence numbers of the embodiments in this application are merely descriptive and do not represent the superiority or inferiority of the embodiments.
[0551] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0552] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for generating narration content, characterized in that, The method includes: Acquire multiple game events from a virtual game, wherein the game events are events generated in the virtual game, and the multiple game events include a first game event, wherein the first game event is a game event of a specified type; Based on the causal relationship between the multiple game events, game story text corresponding to the virtual game is generated, and the game story text includes text fragments expressing the causal relationship; The text fragments associated with the first game event are obtained from the game story text, and the event explanation content of the first game event is generated based on the text fragments associated with the first game event. The event explanation content is used to explain the first game event in combination with the causal relationship between game events in the virtual game.
2. The method according to claim 1, characterized in that, The process of generating the game story text corresponding to the virtual game based on the causal relationship between the multiple game events includes: Obtain the first prompt word, which is guidance information used to indicate the generation of the game story text; Based on the analysis of the first prompt word, the causal relationship between the occurrence of the multiple game events is analyzed to obtain the game plot text including at least two text fragments.
3. The method according to claim 2, characterized in that, The first prompt word includes at least one of contextual prompt information, output example information, and output format prompt information; The contextual hints are used to guide the task of analyzing the contextual relationships between game events in the virtual game. The output example information is used to guide the way the game story text is expressed. The output example information includes example game events and example text fragments corresponding to the example game events. The output format prompt information is used to guide the text format of the game's storyline text.
4. The method according to claim 3, characterized in that, When the first prompt word includes the contextual prompt information, the analysis of the causal relationship between the events occurring in the plurality of game events based on the first prompt word yields the game story text comprising at least two text fragments, including at least one of the following: Based on the contextual clues, the influence of a second game event occurring before the first game event on the first game event is analyzed to obtain a first causal result; based on the first causal result, the game story text consisting of the at least two text fragments is generated. Based on the contextual clues, the influence of the first game event on the third game event that occurs after the first game event is analyzed to obtain a second causal result; based on the second causal result, the game story text consisting of the at least two text fragments is generated; Based on the contextual clues, the impact of the first game event on the outcome of the virtual game is analyzed to obtain a third causal result; based on the third causal result, the game story text consisting of the at least two text fragments is generated; Based on the contextual information, the interaction between the fourth and fifth game events is analyzed to obtain the fourth causal result. Based on the fourth causal result, generate the game story text consisting of at least two text fragments; The fourth game event and the fifth game event are two game events among the plurality of game events that satisfy the event time limit condition, which is used to indicate the time interval limit for mutual influence between game events.
5. The method according to any one of claims 2 to 4, characterized in that, The analysis of the causal relationships between the multiple game events based on the first cue word yields the game story text, which includes at least two text fragments: The first prompt word and the game event data corresponding to the multiple game events are input into the plot generation model. The plot generation model analyzes the causal relationship between the multiple game events based on the guidance of the first prompt word, and obtains the game plot text including the at least two text fragments. The plot generation model is used to generate text describing the game process of the virtual game based on the causal relationship between the game events.
6. The method according to any one of claims 1 to 4, characterized in that, The process of generating the game story text corresponding to the virtual game based on the causal relationship between the multiple game events includes: Based on the order of occurrence of the multiple game events, the multiple game events are aggregated to obtain at least two game segments, each game segment including at least one game event; Based on the causal relationship between the multiple game events, text fragments corresponding to the at least two game segments are generated to obtain the game story text.
7. The method according to claim 6, characterized in that, The aggregation of the multiple game events based on their order of occurrence yields at least two game segments, including: At least two central game events are identified from the plurality of game events, and the central game events are the aggregation centers when game events are aggregated. For the event aggregation process of the i-th central game event, a supplementary game event corresponding to the i-th central game event is obtained from the plurality of game events. The supplementary game event is a game event among the plurality of game events that satisfies the event order relationship with the i-th central game event, where i is a positive integer. The i-th central game event and the supplementary game event are combined to obtain the i-th game segment.
8. The method according to claim 7, characterized in that, The event sequence relationship includes at least one of the following: The supplementary game events are the n game events adjacent to the i-th central game event, where n is a positive integer; The time difference between the first event time corresponding to the i-th central game event and the second event time corresponding to the supplementary game event is lower than a preset time difference threshold. The first event priority of the i-th central game event in the plurality of game events is higher than the second event priority of the supplementary game event in the event stream.
9. The method according to any one of claims 1 to 4, characterized in that, The process of generating the game story text corresponding to the virtual game based on the causal relationship between the multiple game events includes: Obtain the knowledge graph corresponding to the target application, the knowledge graph being used to indicate the relationships between entities in the target application, and the target application being used to provide the virtual game; Obtain the game entities involved in the multiple game events; Based on the node where the playing entity is located in the knowledge graph, and the edges connecting the nodes corresponding to the playing entity, a graph structure feature representation is obtained; The graph structure feature representation is incorporated into the analysis process of the causal relationship between the multiple game events to generate the game story text corresponding to the virtual game.
10. The method according to any one of claims 1 to 4, characterized in that, The step of obtaining text fragments associated with the first match event from the match story text, and generating event descriptions for the first match event based on the text fragments associated with the first match event, includes: Obtain a second prompt word, which is guidance information used to indicate the content of the event commentary when generating the first game event; Based on the second prompt word, analyze the correlation between the text fragments in the game story text and the first game event, to obtain the text fragments associated with the first game event, and generate the event description content of the first game event based on the text fragments associated with the first game event.
11. The method according to claim 10, characterized in that, The step of analyzing the correlation between text fragments in the game storyline text and the first game event based on the second prompt word, to obtain text fragments associated with the first game event, and generating event description content for the first game event based on the text fragments associated with the first game event, includes: The second prompt word, the game story text, and the game event data corresponding to the multiple game events are input into the commentary generation model. Guided by the second prompt word and combined with the correlation between the text fragments in the game story text and the first game event, the commentary generation model generates the event commentary content for the first game event. The commentary generation model is used to generate content to comment on the first game event based on the correlation between the game story text and the first game event.
12. The method according to claim 11, characterized in that, The step of inputting the second prompt word, the game story text, and the game event data corresponding to the multiple game events into the commentary generation model includes: Obtain the text commentary duration of the preset commentary text corresponding to the multiple game events; While retaining the first game event, for the j-th game event, other game events whose text commentary duration is covered by the j-th game event are filtered out until the text commentary durations of the remaining game events do not overlap, resulting in multiple filtered game events. The second prompt word, the game story text, and the game event data corresponding to the filtered multiple game events are input into the commentary generation model.
13. The method according to claim 11, characterized in that, The second prompt includes summary guidance information and event explanation guidance information; The step of generating the event description content for the first game event through the description generation model, based on the guidance of the second prompt word and combined with the correlation between the text fragments in the game story text and the first game event, includes: The explanation generation model generates a summary description text corresponding to the virtual game based on the summary guidance information. The summary description text is used to summarize the game process of the virtual game with the first game event as the center. The commentary generation model generates the event commentary text for the first game event based on the guidance of the segment commentary guidance information; The event description content consists of the summary description text and the event explanation text.
14. The method according to claim 13, characterized in that, The event description text includes at least one of the following: The first game event refers to the game phase within the virtual game; The stage title of the game phase; The event title of the first game event; The commentary statement corresponding to the first game event.
15. The method according to any one of claims 1 to 4, characterized in that, The acquisition of multiple game events from virtual matches includes: Obtain the game board data of the virtual game, wherein the game board data is the data recorded during the virtual game; The virtual game event stream is generated based on the game board data, and the event stream includes the plurality of game events arranged in the order of their occurrence. The method further includes: The game event is subjected to event type detection to determine the first game event in the event stream.
16. The method according to any one of claims 1 to 4, characterized in that, The method further includes: Obtain the video of the virtual game, the video of the game including video clips that match the first game event; The event commentary is added to the position of the video clip within the match video to obtain a match summary video.
17. A device for generating narration content, characterized in that, The device includes: The acquisition module is used to acquire multiple game events of a virtual game, wherein the game events are events generated in the virtual game, and the multiple game events include a first game event, wherein the first game event is a game event of a specified type. The first generation module is used to generate game story text corresponding to the virtual game based on the causal relationship between the events of the multiple game events. The game story text includes text fragments expressing the causal relationship. The second generation module is used to obtain text fragments related to the first game event from the game story text, and to generate event explanation content for the first game event based on the text fragments related to the first game event. The event explanation content is used to explain the first game event in combination with the causal relationship between game events in the virtual game.
18. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing at least one program, which is loaded and executed by the processor to implement the method for generating narration content as described in any one of claims 1 to 16.
19. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one piece of program code, which is loaded and executed by a processor to implement the method for generating narration content as described in any one of claims 1 to 16.
20. A computer program product, characterized in that, It includes a computer program or instructions that, when executed by a processor, implement the method for generating narration content as described in any one of claims 1 to 16.