Game commentary information processing method and device, electronic equipment and storage medium
By using the graphical user interface and language model on the terminal device in the game, combining the game knowledge graph to generate real-time commentary information, the problem of insufficient detailed and realistic game game rendering in the existing technology is solved, and the player's immersion is improved Experience.
Patent Information
- Application Number
- CN202411267983.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2025-01-07
AI Technical Summary
Existing game technology is difficult to effectively render the battle scenes of game games through simple text or special effects, and lacks dynamic adjustments, affecting the player's immersive experience.
By providing a graphical user interface on the terminal device, obtain game battle data and use preset game knowledge graphs and language models to generate real-time commentary information, dynamically render combat scenes, and improve the realism and immersion of the game.
It realizes a detailed description of the game game, enhances the player's immersion and experience in the game, and improves the authenticity and interactivity of the game.
Smart Images

Figure CN119258527A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of game technology, and in particular to a method, device, electronic device and storage medium for processing game commentary information. Background Art
[0002] In order to meet people's pursuit of spiritual life, entertainment games that can be operated on terminals have emerged, such as role-playing games, tactical competitive games, shooting competitive games or massively multiplayer online role-playing games developed based on client or server architecture. In the game, players can manipulate the virtual characters on the screen to play the game, and can perform related operations such as walking, running, jumping, picking up props and fighting in the game scene based on the first or third perspective of the characters operated by the players, so that players can experience the visual impact brought by the game in an immersive way, greatly enhancing the initiative and realism of the game.
[0003] At present, when players enter a game match in a target game and fight in the game, simple text or special effects are used to convey the current battle effect to the players, or the battle content of the current game match is described according to a preset fixed template, so as to roughly show the players the game situation of the virtual character they control in the game match. However, the method of using simple text or special effects in the prior art is too abstract and general, and it is difficult to render the battle scene of the current game match; and the method of describing the battle content of the current game match according to a preset fixed template, because the feedback content is pre-set, cannot be dynamically adjusted according to the actual real-time game battle situation, lacks realism, and affects the player's immersive experience in the target game. Summary of the invention
[0004] The embodiments of the present application provide a method, device, electronic device and storage medium for processing game commentary information. By generating commentary information for the current game match based on real-time game battle data corresponding to the current game match in the target game, the current battle effect can be clearly and detailedly conveyed to the player, and the battle scene of the current game match can be fully rendered; moreover, the commentary information can also be dynamically generated according to the actual real-time game battle situation, thereby improving the realism of the game commentary, enhancing the player's immersive experience in the target game, and effectively improving the player's gaming experience.
[0005] In a first aspect, an embodiment of the present application provides a method for processing game commentary information, providing a graphical user interface through a terminal device, the method comprising:
[0006] In response to a game match start instruction, displaying a game scene corresponding to the game match in the graphical user interface, the game scene at least including a first camp character and a second camp character participating in the game, wherein the first camp character is controlled by the terminal device;
[0007] During the battle between the first camp character and the second camp character, obtaining game battle data corresponding to the first camp character and / or the second camp character;
[0008] Determine a target game element matched by the game match in a preset game knowledge graph, wherein the game knowledge graph includes a plurality of game elements associated with the game match, a preset association relationship exists between the game elements, the game element corresponds to at least one game element category, and the association relationship indicates a mutual influence relationship between the game elements during the game match;
[0009] Inputting the game battle data, the target game element, and the target association relationship of the target game element in the game knowledge graph into a first language model to obtain at least one game description information of the game game, wherein the first language model is trained by a plurality of first preset sample pairs, each of which is composed of a preset game battle data and corresponding preset game description information;
[0010] The at least one game description information is input into a second language model to generate commentary information for describing in real time the battle situation between the first camp character and the second camp character, wherein the second language model is trained by multiple second preset sample pairs, and each second preset sample pair consists of a preset game battle data and corresponding preset commentary information.
[0011] In a second aspect, an embodiment of the present application provides a device for processing game commentary information, which provides a graphical user interface through a terminal device, including:
[0012] A display unit, configured to display a game scene corresponding to the game in the graphical user interface in response to a game match start instruction, wherein the game scene includes at least a first camp character and a second camp character participating in the game, wherein the first camp character is controlled by the terminal device;
[0013] An acquisition unit, configured to acquire game battle data corresponding to the first camp character and / or the second camp character during a battle between the first camp character and the second camp character;
[0014] A determination unit, configured to determine a target game element matched by the game match in a preset game knowledge graph, wherein the game knowledge graph includes a plurality of game elements associated with the game match, a preset association relationship exists between the game elements, the game element corresponds to at least one game element category, and the association relationship indicates a mutual influence relationship between the game elements during the game match;
[0015] a processing unit, configured to input the game battle data, the target game element, and the target association relationship of the target game element in the game knowledge graph into a first language model to obtain at least one game description information of the game game, wherein the first language model is obtained by training a plurality of first preset sample pairs, each of which is composed of a preset game battle data and corresponding preset game description information;
[0016] A generating unit is used to input the at least one game description information into a second language model to generate commentary information for describing the battle situation between the first camp character and the second camp character in real time, wherein the second language model is obtained by training a plurality of second preset sample pairs, and each second preset sample pair consists of a preset game battle data and corresponding preset commentary information.
[0017] In a third aspect, an embodiment of the present application further provides an electronic device, comprising a memory storing a plurality of instructions; a processor loads instructions from the memory to execute the steps of any method for processing game commentary information provided in the embodiment of the present application.
[0018] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores a plurality of instructions, and the instructions are suitable for a processor to load to execute the steps of any method for processing game commentary information provided in the embodiment of the present application.
[0019] In a fifth aspect, an embodiment of the present application further provides a computer program product, including a computer program or instructions, which, when executed by a processor, implements the steps in any method for processing game commentary information provided in an embodiment of the present application.
[0020] By adopting the solution of the embodiment of the present application, by generating commentary information for the current game game based on the real-time game battle data corresponding to the current game game in the target game, the current battle effect can be clearly and detailedly conveyed to the player, and the battle scene of the current game game can be fully rendered; moreover, the commentary information can also be dynamically generated according to the actual real-time game battle situation, thereby improving the realism of the game commentary, enhancing the player's immersive experience in the target game, and effectively improving the player's gaming experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 It is a scene schematic diagram of a system for processing game commentary information provided in an embodiment of the present application;
[0023] Figure 2 It is a flowchart of an embodiment of a method for processing game commentary information provided in an embodiment of the present application;
[0024] Figure 3 This is a schematic diagram of a scenario of a method for processing game commentary information provided in an embodiment of the present application;
[0025] Figure 4 is a schematic diagram of the structure of a device for processing game commentary information provided in an embodiment of the present application;
[0026] Figure 5 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0027] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application. At the same time, in the description of the embodiments of the present application, the terms "first", "second", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more features. In the description of the embodiments of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.
[0028] The embodiments of the present application provide a method, device, electronic device, and computer-readable storage medium for processing game commentary information. Specifically, the present embodiment will be described from the perspective of a device for processing game commentary information, which can be integrated in an electronic device, that is, the method for processing game commentary information in the embodiments of the present application can be executed by an electronic device, and optionally, the electronic device can include: a terminal device. The terminal device can be a mobile phone, a tablet computer, a smart Bluetooth device, a laptop computer, a game console, or a personal computer (PC) and the like.
[0029] The method for processing game commentary information provided in the embodiment of the present application can be applied to a system for processing game commentary information. The system for processing game commentary information can include a player terminal device and a server, and the terminal can be a device including both receiving and transmitting hardware, that is, a device having receiving and transmitting hardware capable of performing two-way communication on a two-way communication link. The player terminal device and the server can perform two-way communication via a network.
[0030] Optionally, the server may be an independent server, or a server network or server cluster composed of servers, including but not limited to a computer, a network host, a single network server, a plurality of network server sets or a cloud server composed of multiple servers. The cloud server is composed of a large number of computers or network servers based on cloud computing.
[0031] In one embodiment of the present disclosure, the method for processing game commentary information can be run on a local terminal device or a server. When the method for processing game commentary information is run on a server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device.
[0032] For example, when the method for processing the game commentary information runs on a terminal, the terminal device stores a game application and is used to present a virtual scene in the game screen. The terminal device is used to interact with the user through a graphical user interface, for example, by downloading and installing a game application through the terminal device and running it. The terminal device may provide the graphical user interface to the user in a variety of ways, for example, it may be rendered and displayed on a display screen of the terminal device, or the graphical user interface may be presented through holographic projection. For example, the terminal device may include a touch display screen and a processor, the touch display screen is used to present a graphical user interface and receive operation instructions generated by a user acting on the graphical user interface, the graphical user interface includes a game screen, and the processor is used to run the game, generate a graphical user interface, respond to operation instructions, and control the display of the graphical user interface on the touch display screen.
[0033] For example, when the method for processing the game commentary information runs on a server, it can be a cloud game. Cloud gaming refers to a gaming method based on cloud computing. In the operation mode of cloud gaming, the operating entity of the game application and the subject of the game screen presentation are separated, and the storage and operation of the method for processing the game commentary information are completed on the cloud gaming server. The game screen presentation is completed on the client side of the cloud gaming. The cloud gaming client is mainly used for receiving and sending game data and presenting the game screen. For example, the cloud gaming client can be a display device with a data transmission function close to the user side, such as a mobile terminal, a TV, a computer, a PDA, a personal digital assistant, etc., but the terminal device for processing game data is a cloud gaming server in the cloud. When playing the game, the user operates the cloud gaming client to send an operation instruction to the cloud gaming server. The cloud gaming server runs the game according to the operation instruction, encodes and compresses the game screen and other data, and returns it to the cloud gaming client through the network. Finally, the cloud gaming client decodes and outputs the game screen.
[0034] See also Figure 1 , Figure 1 A scenario diagram of a system for processing game explanation information provided by an embodiment of the present application. The system may include at least one terminal, at least one server, at least one database, and a network. The terminal held by the user can be connected to the server of different games through the network. The terminal is any device with computing hardware that can support and execute software products corresponding to the game. In addition, when the system includes multiple terminals, multiple servers, and multiple networks, different terminals can be connected to each other through different networks and different servers. The network can be a wireless network or a wired network, such as a wireless network such as a wireless local area network (WLAN), a local area network (LAN), a cellular network, a 2G network, a 3G network, a 4G network, a 5G network, etc. In addition, different terminals can also use their own Bluetooth network or hotspot network to connect to other terminals or to servers, etc. For example, multiple users can be online through different terminals and connected and synchronized with each other through appropriate networks to support multi-player games. In addition, the system may include multiple databases, multiple databases are coupled to different servers, and information related to the game environment can be continuously stored in the database when different users are online for multi-player games.
[0035] The embodiment of the present application provides a method for processing game explanation information, which can be executed by a terminal or a server. The embodiment of the present application takes the method for processing game explanation information executed by a terminal as an example for explanation. Among them, the terminal may include a touch display screen and a processor (of course, the terminal may also use peripherals such as a mouse and a keyboard as input devices, and only the touch display screen is used as an example for explanation here), and the touch display screen is used to present a graphical user interface and receive operation instructions generated by the user acting on the graphical user interface. When the user operates the graphical user interface through the touch display screen, the graphical user interface can control the local content of the terminal by responding to the received operation instructions, and can also control the content of the opposite server by responding to the received operation instructions. For example, the operation instructions generated by the user acting on the graphical user interface include instructions for starting a game application, and the processor is configured to start the game application after receiving the instructions for starting the game application provided by the user. In addition, the processor is configured to render and draw a graphical user interface associated with the game on the touch display screen. The touch display screen is a multi-touch sensitive screen that can sense touch or sliding operations performed simultaneously by multiple points on the screen. The user uses a finger to perform a touch operation on the graphical user interface, and when the graphical user interface detects the touch operation, different virtual objects in the graphical user interface of the game are controlled to perform actions corresponding to the touch operation.
[0036] It should be noted that Figure 1 The scenario diagram of the game commentary information processing system shown is merely an example. The game commentary information processing system and scenario described in the embodiment of the present application are intended to more clearly illustrate the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided in the embodiment of the present application. A person of ordinary skill in the art can appreciate that with the emergence of new business scenarios, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems.
[0037] The embodiment of the present application provides a method for processing game commentary information, which can be executed by a terminal or a server. The embodiment of the present application takes the method for processing game commentary information executed by a terminal as an example for explanation, and a graphical user interface can be provided by a terminal device, and the graphical user interface includes at least part of a virtual scene, and a controlled virtual object located in the virtual scene and controlled by the terminal device. The graphical user interface, virtual scene, and virtual object are explained below.
[0038] The game scene (or virtual scene) is a virtual scene displayed (or provided) when the application is running on a terminal or server. Optionally, the virtual scene is a simulation environment of the real world, or a semi-simulation and semi-fictitious virtual environment, or a purely fictitious virtual environment. The virtual scene is any one of a two-dimensional virtual scene and a three-dimensional virtual scene, and the virtual environment can be the sky, land, ocean, etc., wherein the land includes environmental elements such as deserts and cities. Among them, the virtual scene is a scene with complete game logic of virtual objects such as user control. For example, for sandbox 3D shooting games, the virtual scene is a 3D game world for players to control virtual objects to fight. Example virtual scenes may include: at least one element of mountains, plains, rivers, lakes, oceans, deserts, skies, plants, buildings, and vehicles; for example, for 2D card games, the virtual scene is a scene for displaying released cards or displaying virtual objects corresponding to cards. Example virtual scenes may include: an arena, a decisive battlefield, or other "field" elements or other elements that can display the status of card battles; for 2D or 3D multiplayer online tactical competitive games, the virtual scene is a 2D or 3D terrain scene for virtual objects to fight. Example virtual scenes may include: canyon-style mountains, lines, rivers, classrooms, tables and chairs, podiums and other elements.
[0039] The graphical user interface is obtained by executing a software application on a processor of a mobile terminal or other terminal and rendering it on a display, and can be a display screen interface of a terminal device. The graphical user interface can present the entire game scene, or only a part of the game scene. The game scene includes multiple static virtual objects, specifically including ground, mountains, rocks, vegetation, buildings, etc. When the game scene is relatively large, only the local content of the game scene is displayed on the graphical user interface of the terminal device during the game. Optionally, the game scene contains game characters, which can be game characters controlled by players, or NPCs (abbreviation of Non-Player Character, which is a type of character in the game, meaning non-player characters), which is not limited in this exemplary embodiment. The graphical user interface can include a UI interface and a game screen for players to interact. In an optional embodiment, the UI interface can include game controls (such as skill controls, mobile controls, function controls, etc.), indicator signs (such as direction indicator signs, role indicator signs, etc.), information display areas (such as the number of kills, game time, etc.), or game setting controls (such as system settings, stores, gold coins, etc.). In an optional implementation, the game screen is a display screen corresponding to a virtual scene displayed by a terminal device, and the game screen may include virtual objects such as game characters, NPC characters, AI characters, etc. that execute game logic in the virtual scene.
[0040] A game object (or virtual object, game character) refers to a dynamic object that can be controlled in a virtual scene. Optionally, the dynamic object can be a virtual character, a virtual animal, a cartoon character, etc. The virtual object is a character controlled by a player through an input device, or an artificial intelligence (AI) set in a virtual environment battle through training, or a non-player character (NPC) set in a virtual scene battle. Optionally, the virtual object is a virtual character competing in a virtual scene. Optionally, the number of virtual objects in the virtual scene battle is preset, or is dynamically determined according to the number of clients joining the battle, and the embodiment of the present application does not limit this. In a possible implementation, the user can control the virtual object to move in the virtual scene, for example, control the virtual object to run, jump, crawl, etc., and can also control the virtual object to use the skills, virtual props, etc. provided by the application to fight with other virtual objects. (Game) props refer to props that can be used by virtual objects in a virtual environment, including but not limited to firearms, cold weapons, grenades, shields, springboards, puppets, etc., which can be used by virtual objects to speed up their own attributes, assist in combat, or launch damage to other virtual objects. Virtual props can also be supply props such as bullets, and can also be equipped on designated virtual weapons for accessories such as extended magazines, aiming scopes, flash suppressors, and stocks. The virtual camera is a necessary component for the game scene screen, which is used to present the game scene screen. A game scene corresponds to at least one virtual camera. According to actual needs, there can be two or more virtual cameras, which serve as the game rendering window to capture and present the game world's screen content to the player. By setting the parameters of the virtual camera, the player's perspective of viewing the game world can be adjusted, such as the first-person perspective and the third-person perspective.
[0041] The following is a detailed description in conjunction with the accompanying drawings. In this embodiment, the execution subject is a terminal device as an example. It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments. Although the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order different from that shown in the accompanying drawings.
[0042] See also Figure 2 , Figure 2 This is a flowchart of a method for processing game commentary information provided by an embodiment of the present application. The specific process of the method for processing game commentary information may be as follows: Steps 101 to 105:
[0043] Step 101, in response to a game match start instruction, displaying a game scene corresponding to the game match in the graphical user interface, wherein the game scene includes at least a first camp character and a second camp character participating in the battle, wherein the first camp character is controlled by the terminal device.
[0044] The game match may be a game match in the target game, or any one of multiple game rounds in a game battle in the target game. The game scene corresponding to the game match may include a first camp character and a second camp character participating in the battle. The first camp character and the second camp character may be virtual characters from different camps. The first camp character is controlled by the terminal device, and the second camp character may be a virtual character controlled by other players through other terminal devices, or may be a non-player character controlled by the game system. The game scene may also include multiple camp characters from multiple game camps, and the number of specific game camps and virtual characters is not limited.
[0045] Optionally, the first camp character and the second camp character may also be virtual characters of the same camp.
[0046] Step 102: During the battle between the first camp character and the second camp character, obtain game battle data corresponding to the first camp character and / or the second camp character.
[0047] Specifically, when it is detected that the first camp character and the second camp character release game skills or perform game operations (such as attacking or healing, etc.), the game battle data corresponding to the first camp character and / or the second camp character can be obtained in real time. Alternatively, when it is detected that a game round of a certain game camp is in progress, the game battle data of at least one camp character in the current game round is obtained.
[0048] The game battle data may be tagged game data, and one tagged game data includes multiple battle information. For example, the composition of the tagged game data may be <attack, physical damage, value=326, target=character B>, or <scene interaction, opening mechanism, inflicter=character C>.
[0049] In one embodiment, the step “before obtaining the game battle data corresponding to the first camp character and / or the second camp character” further includes:
[0050] Obtaining current combat information of the first camp character and / or the second camp character in the game;
[0051] Based on multiple preset tag types, filtering out target combat information matching the preset tag type from the combat information;
[0052] Game tag data is generated based on the target battle information and used as game battle data corresponding to the first camp character and / or the second camp character.
[0053] For example, the embodiment of the present application can label the acquired combat information to realize the label representation of combat-related data, so that it can be understood and learned by the large language model, and provide structured input for subsequent battle situation analysis and explanation generation. Specifically, the main label types (i.e., preset label types) set in this application include but are not limited to: 1) combat behavior labels: attack, defense, movement, dodge, use of props, etc.; 2) skill effect labels: damage type (physical / magic), damage value, status effect (stun / poisoning / knock-off, etc.), duration, etc.; 3) environmental status labels: terrain (plain / water / height difference, etc.), weather (sunny / rainy / fog, etc.), lighting (day / night, etc.), scene interaction (destructible objects / organs, etc.); 4) character attribute labels: level, camp, occupation, equipment, skill group, attribute value, etc. Based on the above, the game tag data can be expressed in the following forms: <Attack, physical damage, value = 326, target = character B>, <Status addition, stun, duration = 3s, target = character A> or <Scene interaction, opening mechanism, actor = character C>.
[0054] Step 103: determine the target game element matched by the game match in a preset game knowledge graph, wherein the game knowledge graph includes multiple game elements associated with the game match, there is a preset association relationship between the game elements, the game element corresponds to at least one game element category, and the association relationship indicates the mutual influence relationship between the game elements during the game match.
[0055] Among them, the association relationship indicates the mutual influence relationship between the game elements in the game battle process. For example, the first game element is the game equipment, and the second game element is the attribute. The association relationship between the first game element and the second game element can be "the game equipment can enhance the attribute value of the attribute"; or, the first game element is the first game skill, and the second game element is the first game character. The association relationship between the first game element and the second game element can be "the first game skill can cause XX damage to the first game character".
[0056] In one embodiment, the step of “determining the target game element for the game match in a preset game knowledge graph” includes:
[0057] In a preset game knowledge graph, target game elements that match each target combat information in the game tag data are determined, and target association relationships of each target game element in the game knowledge graph are determined.
[0058] Specifically, the target game elements for the game match can be determined in a preset game knowledge graph based on the game battle data, and the association relationship between the target game elements can be obtained.
[0059] In the embodiment of the present application, a combat knowledge graph that fully covers a specific game field can be constructed as a game knowledge graph according to the specific settings of the game. The specific construction process is as follows:
[0060] 1) Define core concepts. Specifically, the key elements of the game combat field can be abstracted into concepts (i.e., game element categories), such as virtual characters (i.e., game characters), equipment, skills, attributes, status, mechanisms, etc.
[0061] 2) Define entities (i.e. game elements), and define specific objects under each core concept as entities. For example, the entity under the concept of virtual characters can be "XXX hero" or "XXX monster", and the entity under the concept of game skills can be "YYY skill" or "ZZZ ultimate move", etc.
[0062] 3) Define relationships (also known as association relationships): Design association relationships between concepts / entities. For example, the relationship between "game equipment" and "attribute" can be "game equipment can improve the attribute value of the attribute", and the relationship between game skills can be "can be released in conjunction", etc.
[0063] Specifically, concepts (i.e., game element categories) may include virtual characters, game skills, game equipment, and attributes, etc. Among them, the entities (i.e., game elements) under each concept may be as follows: Character = {Hero A, Hero B, Monster C}; Skill = {Skill A1, Skill A2, Skill B1, Skill C1}; The association relationship between each game element may be: Skill A1 BuffTo_Damage bonus to Hero A, or Skill B1 Restricted By_Posture restriction to Hero B.
[0064] Next, the constructed game knowledge graph can be mapped into a low-dimensional vector through knowledge representation learning algorithms such as TransE, and the low-dimensional vector representation can be spliced with the labeled battle data to generate an extended input that incorporates structured game knowledge. Then, the extended input is sent to the Transformer encoder to guide the large language model to understand and reason about the semantic representation of the game situation in combination with the game knowledge graph, thereby improving the professionalism and coherence of the commentary content.
[0065] Step 104: input the game battle data, the target game element, and the target association relationship of the target game element in the game knowledge graph into a first language model to obtain at least one game description information of the game game, wherein the first language model is trained by multiple first preset sample pairs, and each first preset sample pair consists of a preset game battle data and corresponding preset game description information.
[0066] Among them, the game description information includes the battle situation and / or battle prediction results of the current game game, wherein the battle situation is used to describe the game battle event corresponding to the game game, and the battle prediction result is used to predict the game direction of the game game after the game battle event occurs.
[0067] Optionally, the first language model and the second speech model are different large language models, or the first language model and the second speech model are the same large language model.
[0068] For example, the battle situation can be a key information point. Specifically, by setting thresholds such as Buff / Debuff duration and damage ratio, events that have a huge impact on the direction of the battle can be screened out as key information points, such as low health, fatal control skill hits, attribute stacking triggering special effects, etc., and mark them as the focus of the commentary.
[0069] For another example, the battle prediction result can be the predicted battle direction and / or the predicted player intention. The predicted battle direction can be predicted by counting the health, total attributes, skill CD and other status parameters of the virtual characters of each party in the current game situation, combined with their professional characteristics, restraint relationship and other knowledge graph information, to predict the direction of the battle in the next N rounds. If it is predicted that the outcome is about to be reversed, or the conflict enters a white-hot stage, the commentary tone is adjusted to create a tense atmosphere. The prediction method can be a classification model based on random forests, with the input being the battle state vector and the output being the probability of winning or losing. The split node of the tree is the threshold combination of each influencing factor.
[0070] For another example, the player's intention can be predicted by inputting the player's operation sequence into the graph network in the form of a sliding window, and by collecting the character's attack method, current situation, etc., to predict the combo plan in the next N seconds. If it is determined that the player's intention deviates from the character's optimal plan, the player's decision is given positive guidance through commentary. The prediction method can be specifically to discretize the skill sequence into codes and input them into the LSTM network to learn the transfer probability. Combined with the optimal combination in the knowledge graph, the player's intention is softly corrected.
[0071] Specifically, the battle situation and / or battle prediction results of the current game can be determined based on the emergence ability of the large language model. The large language model associates the specific battle data with the "entities, concepts, etc." in the game knowledge graph, and then determines the key information based on its own reasoning ability. For example, suppose the labeled data shows that character A uses a skill with a damage share of 30% on the BOSS and adds a debuff that lasts for 3 rounds. Then in the game knowledge graph, the skill entity is associated with concepts such as "subsequent combos" and "professional restraint". Based on this, the large language model infers that this may be a key battle node, and subsequent players may choose to use professional restraint combos to quickly kill the BOSS. Therefore, the large language model determines the debuff hit of the skill as key information, predicts that the battle situation will develop in a direction that is unfavorable to the BOSS, and infers that the player may reasonably use professional restraint to win.
[0072] Specifically, the game battle data obtained by labeling battle data contains rich semantic information, such as what game skills the game character used, how much damage was caused, what buff was triggered, etc. By inputting the information of these labeled battle data into the game knowledge graph, deeper semantics can be inferred, such as this game skill is the ultimate move of the virtual character, or this buff triggers the passive effect of the virtual character, etc. Then, combined with the knowledge of the game knowledge graph such as the role attributes, skill mechanism, and professional restraint of the virtual character, the large language model can predict the direction of the current game game. At the same time, the deviation between the player's operation sequence and the optimal strategy can also be captured, which can be used to infer the player's intentions, all of which provide material for the generation of personalized commentary information.
[0073] In a specific embodiment, the step of “after inputting the game battle data, the target game element, and the target association relationship of the target game element in the game knowledge graph into the first language model to obtain at least one game description information of the game game” also includes:
[0074] Obtaining the battle status of the game;
[0075] The first language model is used to analyze the current scene description information and / or emotion description information of the game game based on the battle situation, the target game elements, and the target association relationship of the target game elements in the game knowledge graph, wherein the scene description information is used to describe the current game scene of the game game, and the emotion description information is used to describe the current game atmosphere of the game game.
[0076] Among them, the scene description information can be scene words, and the emotion description information can be sentiment words. The scene description information and / or emotion description information are essentially still inferred by the large language model. When the large language model infers sentiment words and scene words based on key nodes, it will make full use of the association information between game concepts and elements in the knowledge graph to ensure that the inference results are consistent with the game settings and player cognition. For example, after determining that "character A uses a special move to severely damage the BOSS" is a key node, the large language model first extracts attribute information associated with concepts such as "special moves" and "BOSS" from the knowledge graph, such as the element type of the special move, the faction to which the BOSS belongs, etc. The large language model then comprehensively analyzes the matching degree of these attributes with the current key nodes of the battle, and infers the appropriate sentiment words and scene words. For example, if the knowledge graph shows that character A's ultimate move belongs to light magic, and the BOSS belongs to the shadow camp, the model will infer the contrasting descriptions of "holy light" and "darkness" and generate the scene words "holy light blooms in the darkness"; at the same time, based on the theme of light defeating darkness, it will infer the emotional words of "hope" and "courage" to create an inspiring atmosphere.
[0077] Specifically, we can match the key information points obtained from the real-time game analysis with emotional words and scene words that fit the game context from the game knowledge graph, and integrate them into the narration generation process of the Transformer decoder to create an atmosphere and enhance emotions. By parameterizing the intensity of words and sentence structure in the generated text, we can further enhance the dramatic tension of the narration. The specific implementation method is as follows:
[0078] 1) Set the emotional state rate. For example, map the emotional words extracted from the knowledge graph to positive and negative emotional intensity values [-2, 2] as additional input to guide the generation of explanations. Positive values correspond to emotions such as excitement and passion, negative values correspond to emotions such as tension and tragedy, and 0 corresponds to neutral and restrained emotions. The size of the value controls the intensity of emotional rendering.
[0079] 2) Dynamically adjust the details and omissions appropriately. Count the average refresh frequency of the battle rhythm. When the frequency is higher, the battle details can be appropriately omitted to highlight the emotional portrayal; when the frequency is lower, the focus is on objective analysis to balance details and rhythm.
[0080] 3) Match the appropriate perspective. When operating manually, the first-person pronoun "you" refers to the player to render a subjective experience; when operating automatically, the battle situation is viewed from an objective (e.g. third-person) perspective, focusing on objective analysis.
[0081] Alternatively, the range of the emotion intensity value can be set to [0, 2]. Taking 0.7 as an example, 0.7 is a medium to high value, which means that the battle situation is relatively stalemate and the atmosphere is relatively tense. Therefore, 0.7 corresponds to a relatively tense emotion. The larger the value, the stronger the rendering intensity. It should be noted that the range of the emotion intensity value can be personalized according to user needs. This is only an example, and more possible embodiments are not described here.
[0082] In the embodiment of the present application, sentiment words and scene words are introduced as entities and associations when constructing the game knowledge graph. For example, in the game skill entity, sentiment attributes such as "intense" and "gorgeous" are added; in the game scene entity, descriptive attributes such as "hot" and "precipitous" are added. In this way, the information retrieved from the game knowledge graph naturally contains sentiment words and scene words, which can render a specific atmosphere for the explanation information. Furthermore, in the training corpus for training the large language model, examples of explanation information containing sentiment words rich in emotions and scene words describing scenes can be added, so that the large language model can further enhance its expression ability in this regard.
[0083] Specifically, the large language model encodes sentiment words and scene words in the game knowledge graph, combines them with key nodes obtained from the battle analysis of the current game, and naturally incorporates corresponding emotion rendering and scene description into the generation process, dynamically adjusting the style and tone of the commentary.
[0084] In one embodiment, the first language model and the second language model can both be trained large language models, and a Transformer network with an attention mechanism can be used as a generative model for the commentary text. Furthermore, the model training for the large language model is divided into two stages: unsupervised pre-training and supervised fine-tuning. The specific training steps are as follows:
[0085] In the unsupervised pre-training stage, the model is pre-trained using a large amount of general corpus to enable it to have basic language understanding and generation capabilities. Common pre-training tasks such as Masked Language Modeling and Next Sentence Prediction are used. In the supervised fine-tuning stage, based on the pre-trained model, the game domain corpus is used for fine-tuning to enable the model to learn the game narrative style and domain knowledge. The corpus includes high-quality battle description texts written by humans and high-quality battle reports in player forums.
[0086] Among them, massive general corpus refers to large-scale text data from various fields and genres, such as news, encyclopedias, novels, reviews, etc. These corpora can help the model learn general language knowledge.
[0087] Specifically, at each stage of the training of the large language model, a second preset sample (specifically composed of labeled battle data and the corresponding manually written commentary text) should be added to train the large language model so that the large language model can initially establish the mapping ability from game data to commentary text. The goal of this part is to match the training data of the large language model with the final input and output content, and improve the feasibility of the training of the large language model.
[0088] Optionally, at each stage of the training of the large language model, a paired corpus such as the first preset sample (specifically consisting of labeled battle data and manually analyzed game description information) should be added as auxiliary information to train the large language model, so that the large language model can learn the logic of analysis and expression.
[0089] Furthermore, we can design appropriate generation objectives and loss functions to guide the large language model to master the characteristics that combat commentary should have:
[0090] 1) Use perceptual loss to evaluate the information content of the generated text. Count the coverage of key information points such as proper nouns, numerical values, and effect descriptions in the text, and improve the information saturation of the text by penalizing the missing key information.
[0091] 2) Combined with the game knowledge graph, evaluate the use of combat terms in the generated text. Based on the internal correlation of terms (such as skill matching, professional restraint, etc.), evaluate the rationality of the use of terms in the generated text, punish conflicts with the knowledge graph, and improve the professionalism of the use of game terms.
[0092] 3) Flesch Reading Ease scoring formula is used to evaluate readability. This formula gives a score of 0-100 based on factors such as the average length of sentences and the average number of syllables in words. The higher the score, the better the readability. The model is optimized to ensure that the generated text reaches the ideal score range in terms of readability.
[0093] 4) Introduce sentiment tendency assessment based on sentiment dictionary. Predefine sentiment dictionary representing different sentiment tendencies (such as excitement, tension, joy, depression, etc.), generate statistics on the distribution of various sentiment words in the text, and guide the model to dynamically adjust the sentiment rendering according to the situation. You can also set the sentiment probability threshold of the large language model to constrain the proportion of sentiment words to avoid excessive rendering.
[0094] In addition, during the training process, the comprehensive loss value is calculated based on the performance of the generated samples in the above indicators, and the model parameters are updated through back-propagation iteration. Ultimately, the large language model can generate concise and detailed commentary text in real time based on the labeled combat data.
[0095] In an embodiment of the present application, the game knowledge graph can be embedded in the large language model, or the game knowledge graph and the large language model can be independent of each other. For example, during the model training of the large language model, the game knowledge graph can be embedded in the encoder part of the large language model in the form of a vector, so that the large language model can integrate the knowledge of the game knowledge graph for reasoning. If a mature model such as ChatGPT is used, the game knowledge graph can be used as an independent structure for information analysis.
[0096] Step 105: Input the at least one game description information into a second language model to generate commentary information for describing the battle situation between the first camp character and the second camp character in real time, wherein the second language model is trained by multiple second preset sample pairs, and each second preset sample pair consists of a preset game battle data and corresponding preset commentary information.
[0097] In one embodiment, the method further comprises:
[0098] Through the second language model, based on the at least one game description information, the scene description information and / or the emotion description information, commentary information for real-time description of the battle situation between the first camp character and the second camp character is generated.
[0099] Further, the step of "generating, by means of a second language model, commentary information for describing in real time the battle situation between the first camp character and the second camp character based on the at least one game description information, the scene description information and / or the emotion description information" may include:
[0100] Generate task prompt information based on the at least one game description information, the scene description information and / or the emotion description information, and a preset text template;
[0101] The task prompt information is input into the second language model, so as to generate the explanation information based on the task prompt information through the second language model.
[0102] For example, the understanding of the battle situation in a game can yield the following information: the key node is that character A's special move hits the boss, the battle trend is favorable to the player, and the player's intention is to dodge first and then wait for an opportunity to counterattack. Then the prompt (i.e., the task prompt information) will be constructed accordingly as "the player uses a high-powered special move (key information), renders an optimistic tone (battle trend), and the player can win by seizing the opportunity to attack after dodging (player intention)". The second language model can then generate the game commentary text as "You seize the opportunity, and a special move hits the boss's vital point! It is already shaky, keep up the good work, and victory is just around the corner!".
[0103] In an embodiment of the present application, game producers can pre-set a preset text template for the prompt (i.e., task prompt information), such as "the key information is..., the direction of the battle is..." The large language model analyzes the combat data based on the missing content to form a complete prompt, and then generates an explanatory text based on the prompt.
[0104] For example, based on the key information output by the real-time battle situation understanding module, battle situation prediction, player intention, etc., targeted prompts (i.e. task prompts) can be dynamically constructed through encapsulated text. Prompts combine background information based on knowledge graphs and emotional rendering strategies based on battle situation analysis. Examples are as follows:
[0105] Background: Hero A is fighting BOSS B.
[0106] Situation: Boss B has 30% HP remaining and is in a frenzy, with damage increased by 50%. Hero A has 10% HP remaining and his attack speed increased by 20%.
[0107] Player's intention: Prioritize avoiding BOSS B's ultimate move X and look for opportunities to output.
[0108] Emotional rendering: tension 0.7, first-person perspective.
[0109] Generate goals: Render the stalemate at the last moment of the battle and highlight the danger of the situation. Give positive feedback to the player's positioning and output, and provide appropriate tactical guidance.
[0110] Then, the constructed prompt is input into the trained large language model to control the generation process and output a complete, richly worded, and emotionally rich game commentary text. Specifically, the generation process uses multi-sample search algorithms such as Beam Search to select the sample with the lowest comprehensive loss from multiple candidate results to improve the fluency and appropriateness of the output text.
[0111] In another embodiment, the step of “inputting the at least one game description information into a second language model to generate commentary information for describing the battle situation between the first camp character and the second camp character in real time” may include:
[0112] Generate task prompt information based on the at least one game description information and a preset text template;
[0113] The task prompt information is input into a second language model, so as to generate, through the second language model and based on the task prompt information, commentary information for describing in real time the battle situation between the first camp character and the second camp character.
[0114] Further, the target commentary information includes a game commentary text and / or a game commentary voice, wherein the game commentary voice is generated based on the game commentary text; the step of "after inputting the at least one game description information into a second language model to generate commentary information for real-time description of the battle situation between the first camp character and the second camp character" also includes:
[0115] The game commentary text is displayed and / or the game commentary voice is played through a graphical user interface.
[0116] For example, see Figure 3 , a graphical user interface can be provided through the terminal device, the graphical user interface including at least part of the virtual scene, and a first virtual character controlled by the terminal device in the at least part of the virtual scene, and a second virtual character controlled by other terminal devices, the character name of the first virtual character is character A, and the character name of the second virtual character is character B. At this time, through the second language model, based on the at least one game description information, a game commentary text for the current game game is generated, "The war is about to begin, character A takes the lead, and the weapon will penetrate the defense of character B!", and the game commentary text can be displayed through the graphical user interface.
[0117] Specifically, in the embodiment of the present application, the game commentary text can be displayed in the graphical user interface, specifically in the form of a floating text box, and the player can drag and adjust the position, long sentences are automatically divided into lines, and the speech speed matches the reading. Alternatively, the game commentary voice can be played in the graphical user interface, and the text-to-speech module of the game can be called to convert the game commentary text into the game commentary voice, such as into a narration audio track, and the player can adjust the speech speed and volume of the game commentary voice by himself.
[0118] Optionally, multiple adjustable parameters such as commentary triggering frequency and rendering intensity can be opened to allow players to customize the commentary effect. For example, players can set the commentary triggering frequency, that is, the frequency of generating commentary text. Specific options include "every round", "every stage", and "only important moments". "Every round" means that each operation round in the battle triggers the generation of commentary once; "each stage" means that it is divided according to the stage of the battle, such as the opening, middle, and end, and each stage is triggered once; "only important moments" means that it is only triggered when key nodes are detected, such as residual blood, the release of special moves, etc.
[0119] Optionally, the step of “generating game tag data based on the target battle information and using the game tag data as game battle data corresponding to the first camp character and / or the second camp character” further includes:
[0120] Input the game tag data into a preset language robot to trigger the language robot to generate commentary information for real-time describing the battle situation between the first camp character and the second camp character based on the preset information generation logic and the game tag data.
[0121] For example, the labeled battle data can be directly input into a mature general large language model such as ChatGPT (i.e., the language robot) to end-to-end output the commentary text, which can save the steps of customizing and training a large language model for the game field and directly use the existing powerful language model for text generation.
[0122] According to the content introduced above, the following will give examples to further illustrate the processing method of the game commentary information of the present application. The specific embodiments of the processing method of the game commentary information are as follows:
[0123] (1) In the embodiment of the present application, a Prompt template can be predefined, and the specific structure of the Prompt template is as follows:
[0124] <Background>{Character information}, {Scene information}< / Background>
[0125] <Round {round number}>
[0126] <Attack>{Attacker}, {Skill name}, {Damage value}, {Target}< / Attack>
[0127] <Effect>{Target}, {Effect}, {Duration}< / Effect>
[0128] < / Round {round number}> ...
[0130] The above template stipulates the basic structure and semantic slots of the Prompt. Among them, the part enclosed in curly braces {} is the content that needs to be dynamically extracted from the game in the game match.
[0131] (2) Then, the game system will fill the captured game battle data into the template predefined in the above step to form a preliminary Prompt. For example, the specific style of a preliminary Prompt is as follows:
[0132] <Background>Hero A (Warrior) is fighting against BOSS B (Mage), and the battle takes place in the volcanic map.
[0133] < / Background>
[0134] <First Round>
[0135] <Attack>Hero A, activate the skill "Smash", 1000 points of physical damage, BOSS B< / Attack>
[0136] <Effect>BOSS B, knockback, stun, 2 turns< / Effect>
[0137] < / First turn>
[0138] <Second turn>
[0139] <Attack>Hero A, activate skill "Continuous Slash", 500 physical damage, BOSS B< / Attack>
[0140] <Effect>Hero A, increase attack speed by 20%, 3 turns< / Effect>
[0141] < / Second turn>
[0142] (3) Next, directly send the preliminary Prompt obtained from the above steps to the large language model. The large language model will analyze the information corresponding to the game battle data in this Prompt at one time, and based on the knowledge in its game knowledge graph and the language understanding ability of the large language model, generate a complete reply. This reply includes inferences about the player's intention, emotional rendering, and generation goal, as well as the final commentary text. For example, the output of the large language model may be as follows:
[0143] <Player intention>The player hopes to seize the favorable opportunity when Hero A causes a large amount of damage and BOSS B is unable to act, end the battle as soon as possible, and win the victory.< / Player intention>
[0144] <Emotional rendering>The battle rhythm is very fast. Hero A continuously lands heavy blows, and the atmosphere is tense and intense. The player operates decisively and is eager to prove their strength.< / Emotional rendering>
[0145] <Generation goal>Focus on describing the intensity of the battle, rendering a tense atmosphere, while affirming the player's operation and courage, inspiring the fighting spirit, and烘托 the joy of the upcoming victory.< / Generation goal>
[0146] Game commentary text: "A thrilling moment! Hero A swung his battle axe like a tiger descending from the mountain, and with a 'slam' he chopped B's head straight! 1000 points of damage, this blow is likely to split the magician in half! Sure enough, with a 'boom', BOSS B flew out like a kite with a broken string! Its body was still spinning in the air, but it had already fallen into dizziness and might not be able to get up in a short time!", "Hero A seized the once-in-a-lifetime opportunity and eagerly launched a 'combo'. The silver-shining blade slashed fiercely at BOSS B! Another 500 damage! Oh my god, the magician's health has reached the bottom! But hero A is getting braver and braver, and his attack speed has increased by 20%, it's like God's help!" and "The heat waves in the crater are rolling, but the intensity of this battle is even greater! The player seems to have transformed into hero A, injecting all his blood and fighting spirit into this desperate fight! Come on, warriors, you have already grasped the lapel of victory, now is the time to prove your strength! The braver you are, the more you can show your glory! The song of victory is about to be played, and your legend is about to be engraved!"
[0147] In summary, an embodiment of the present application provides a method for processing game commentary information, by responding to a game match start instruction, displaying a game scene corresponding to the game match in the graphical user interface, wherein the game scene includes at least a first camp character and a second camp character participating in the battle, wherein the first camp character is controlled by the terminal device; then, during the battle between the first camp character and the second camp character, obtaining game battle data corresponding to the first camp character and / or the second camp character; then, determining a target game element matched by the game match in a preset game knowledge graph, wherein the game knowledge graph includes multiple game elements associated with the game match, there is a preset association relationship between the game elements, the game element corresponds to at least one game element category, and the association relationship indicates a game element. The game elements in the game battle process have a mutual influence relationship; then, the game battle data, the target game elements and the target association relationship of the target game elements in the game knowledge graph are input into a first language model to obtain at least one game description information of the game game, wherein the first language model is trained by a plurality of first preset sample pairs, and each first preset sample pair consists of a preset game battle data and a corresponding preset game description information; finally, the at least one game description information is input into a second language model to generate commentary information for real-time description of the battle situation between the first camp character and the second camp character, wherein the second language model is trained by a plurality of second preset sample pairs, and each second preset sample pair consists of a preset game battle data and a corresponding preset commentary information. By adopting the solution of the embodiment of the present application, by generating commentary information for the current game game based on the real-time game battle data corresponding to the current game game in the target game, the current battle effect can be clearly and detailedly conveyed to the player, and the battle scene of the current game game can be fully rendered; moreover, the commentary information can also be dynamically generated according to the actual real-time game battle situation, thereby improving the realism of the game commentary, enhancing the player's immersive experience in the target game, and effectively improving the player's gaming experience.
[0148] This embodiment also provides a device for processing game commentary information, which can be integrated into a terminal device. Figure 4 As shown, the device for processing game commentary information may include:
[0149] A display unit 201 is configured to display a game scene corresponding to the game in the graphical user interface in response to a game match start instruction, wherein the game scene includes at least a first camp character and a second camp character participating in the game, wherein the first camp character is controlled by the terminal device;
[0150] An acquisition unit 202 is used to acquire game battle data corresponding to the first camp character and / or the second camp character during the battle between the first camp character and the second camp character;
[0151] A determination unit 203 is used to determine a target game element matched by the game match in a preset game knowledge graph, wherein the game knowledge graph includes a plurality of game elements associated with the game match, a preset association relationship exists between the game elements, the game element corresponds to at least one game element category, and the association relationship indicates a mutual influence relationship between the game elements during the game match;
[0152] The processing unit 204 is used to input the game battle data, the target game element, and the target association relationship of the target game element in the game knowledge graph into a first language model to obtain at least one game description information of the game game, wherein the first language model is trained by a plurality of first preset sample pairs, each of which is composed of a preset game battle data and corresponding preset game description information;
[0153] The generation unit 205 is used to input the at least one game description information into a second language model to generate commentary information for real-time description of the battle situation between the first camp character and the second camp character, wherein the second language model is trained by multiple second preset sample pairs, and each second preset sample pair consists of a preset game battle data and corresponding preset commentary information.
[0154] In some embodiments, the device for processing game commentary information includes a processing subunit, which is used to:
[0155] Obtaining current combat information of the first camp character and / or the second camp character in the game;
[0156] Based on multiple preset tag types, filtering out target combat information matching the preset tag type from the combat information;
[0157] Game tag data is generated based on the target battle information and used as game battle data corresponding to the first camp character and / or the second camp character.
[0158] In some embodiments, the device for processing game commentary information includes a processing subunit, which is used to:
[0159] In a preset game knowledge graph, target game elements that match each target combat information in the game tag data are determined, and target association relationships of each target game element in the game knowledge graph are determined.
[0160] In some embodiments, the device for processing game commentary information includes a processing subunit, which is used to:
[0161] Obtaining the battle status of the game;
[0162] The first language model is used to analyze the current scene description information and / or emotion description information of the game game based on the battle situation, the target game elements, and the target association relationship of the target game elements in the game knowledge graph, wherein the scene description information is used to describe the current game scene of the game game, and the emotion description information is used to describe the current game atmosphere of the game game.
[0163] In some embodiments, the device for processing game commentary information includes a processing subunit, which is used to:
[0164] Through the second language model, based on the at least one game description information, the scene description information and / or the emotion description information, commentary information for real-time description of the battle situation between the first camp character and the second camp character is generated.
[0165] In some embodiments, the device for processing game commentary information includes a processing subunit, which is used to:
[0166] Generate task prompt information based on the at least one game description information, the scene description information and / or the emotion description information, and a preset text template;
[0167] The task prompt information is input into the second language model, so as to generate the explanation information based on the task prompt information through the second language model.
[0168] In some embodiments, the device for processing game commentary information includes a processing subunit, which is used to:
[0169] Generate task prompt information based on the at least one game description information and a preset text template;
[0170] The task prompt information is input into a second language model, so as to generate, through the second language model and based on the task prompt information, commentary information for describing in real time the battle situation between the first camp character and the second camp character.
[0171] In some embodiments, the device for processing game commentary information includes a processing subunit, which is used to:
[0172] The game commentary text is displayed and / or the game commentary voice is played through a graphical user interface.
[0173] In some embodiments, the device for processing game commentary information includes a processing subunit, which is used to:
[0174] The game tag data is input into a preset language robot to trigger the language robot to generate commentary information for real-time description of the battle situation between the first camp character and the second camp character based on the game tag data according to the preset information generation logic.
[0175] The embodiment of the present application discloses a device for processing game commentary information, which responds to a game match start instruction through a display unit 201 to display a game scene corresponding to the game match in the graphical user interface, wherein the game scene at least includes a first camp character and a second camp character participating in the battle, wherein the first camp character is controlled by the terminal device; an acquisition unit 202 acquires game battle data corresponding to the first camp character and / or the second camp character during the battle between the first camp character and the second camp character; a determination unit 203 determines a target game element matched by the game match in a preset game knowledge graph, wherein the game knowledge graph includes multiple game elements associated with the game match, there is a preset association relationship between the game elements, the game element corresponds to at least one game element category, and the association relationship indicates The mutual influence relationship between the game elements in the game battle process; the processing unit 204 inputs the game battle data, the target game element and the target association relationship of the target game element in the game knowledge graph into the first language model to obtain at least one game description information of the game game, wherein the first language model is obtained by training a plurality of first preset sample pairs, and each first preset sample pair consists of a preset game battle data and a corresponding preset game description information; the generating unit 205 inputs the at least one game description information into the second language model to generate commentary information for real-time description of the battle situation between the first camp character and the second camp character, wherein the second language model is obtained by training a plurality of second preset sample pairs, and each second preset sample pair consists of a preset game battle data and a corresponding preset commentary information. The embodiment of the present application generates commentary information for the current game match based on the real-time game battle data corresponding to the current game match in the target game, so as to clearly and detailedly convey the current battle effect to the player and fully render the battle scene of the current game match; moreover, the commentary information can be dynamically generated according to the actual real-time game battle situation, thereby improving the realism of the game commentary, enhancing the player's immersive experience in the target game, and effectively improving the player's gaming experience.
[0176] Accordingly, an embodiment of the present application further provides an electronic device, which may be a terminal, and the terminal may be a smart phone, a tablet computer, a laptop computer, a touch screen, a game console, a personal computer (PC, Personal Computer), a personal digital assistant (Personal Digital Assistant, PDA) and other terminal devices. Alternatively, the electronic device may be a server.
[0177] like Figure 5 As shown, Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 300 includes a processor 301 having one or more processing cores, a memory 302 having one or more computer-readable storage media, and a computer program stored in the memory 302 and executable on the processor. The processor 301 is electrically connected to the memory 302. Those skilled in the art will appreciate that the electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown, or combine certain components, or arrange components differently.
[0178] The processor 301 is the control center of the electronic device 300. It uses various interfaces and lines to connect various parts of the entire electronic device 300, and executes various functions and processes data of the electronic device 300 by running or loading software programs and / or units stored in the memory 302, and calling data stored in the memory 302, so as to monitor the electronic device 300 as a whole. The processor 301 can be a central processing unit CPU, a graphics processing unit GPU, a network processor (Network Processor, NP), etc., and can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application.
[0179] In the embodiment of the present application, the processor 301 in the electronic device 300 will load instructions corresponding to the processes of one or more application programs into the memory 302 according to the following steps, and the processor 301 will run the application programs stored in the memory 302 to implement various functions, such as:
[0180] In response to a game match start instruction, displaying a game scene corresponding to the game match in the graphical user interface, the game scene at least including a first camp character and a second camp character participating in the game, wherein the first camp character is controlled by the terminal device;
[0181] During the battle between the first camp character and the second camp character, obtaining game battle data corresponding to the first camp character and / or the second camp character;
[0182] Determine a target game element matched by the game match in a preset game knowledge graph, wherein the game knowledge graph includes a plurality of game elements associated with the game match, a preset association relationship exists between the game elements, the game element corresponds to at least one game element category, and the association relationship indicates a mutual influence relationship between the game elements during the game match;
[0183] Inputting the game battle data, the target game element, and the target association relationship of the target game element in the game knowledge graph into a first language model to obtain at least one game description information of the game game, wherein the first language model is trained by a plurality of first preset sample pairs, each of which is composed of a preset game battle data and corresponding preset game description information;
[0184] The at least one game description information is input into a second language model to generate commentary information for describing in real time the battle situation between the first camp character and the second camp character, wherein the second language model is trained by multiple second preset sample pairs, and each second preset sample pair consists of a preset game battle data and corresponding preset commentary information.
[0185] The electronic device provided in the embodiment of the present application can display a game scene corresponding to the game in the graphical user interface in response to a game start instruction, wherein the game scene at least includes a first camp character and a second camp character participating in the battle, wherein the first camp character is controlled by the terminal device; then, during the battle between the first camp character and the second camp character, obtain game battle data corresponding to the first camp character and / or the second camp character; then, determine the target game element matched by the game in the preset game knowledge graph, wherein the game knowledge graph includes multiple game elements associated with the game, there is a preset association relationship between the game elements, the game element corresponds to at least one game element category, and the association relationship indicates the relationship between the game elements. The mutual influence relationship existing in the game battle process; then, the game battle data, the target game element and the target association relationship of the target game element in the game knowledge graph are input into the first language model to obtain at least one game description information of the game game, wherein the first language model is obtained by training a plurality of first preset sample pairs, and each first preset sample pair consists of a preset game battle data and a corresponding preset game description information; finally, the at least one game description information is input into the second language model to generate commentary information for real-time description of the battle situation between the first camp character and the second camp character, wherein the second language model is obtained by training a plurality of second preset sample pairs, and each second preset sample pair consists of a preset game battle data and a corresponding preset commentary information. Therefore, by adopting the solution of the embodiment of the present application, by generating commentary information for the current game game according to the real-time game battle data corresponding to the current game game in the target game, the current battle effect can be clearly and detailedly conveyed to the player, and the battle scene of the current game game can be fully rendered; moreover, the commentary information can also be dynamically generated according to the actual real-time game battle situation, thereby improving the realism of the game commentary, enhancing the player's immersive experience in the target game, and effectively improving the player's gaming experience.
[0186] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0187] Optional, such as Figure 5 As shown, the electronic device 300 further includes: a touch screen 303, a radio frequency circuit 304, an audio circuit 305, an input unit 306, and a power supply 307. The processor 301 is electrically connected to the touch screen 303, the radio frequency circuit 304, the audio circuit 305, the input unit 306, and the power supply 307, respectively. Those skilled in the art can understand that Figure 5The electronic device structure shown in the figure does not constitute a limitation of the electronic device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0188] The touch display screen 303 can be used to display a graphical user interface and receive operation instructions generated by the user acting on the graphical user interface. The touch display screen 303 may include a display panel and a touch panel. Among them, the display panel can be used to display information input by the user or information provided to the user and various graphical user interfaces of the electronic device, and these graphical user interfaces can be composed of graphics, text, icons, videos and any combination thereof. Optionally, the display panel can be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), an organic light-emitting diode (OLED, Organic Light-Emitting Diode) and the like. The touch panel can be used to collect the user's touch operation on or near it (such as the user uses any suitable object or attachment such as a finger, a stylus, etc. on the touch panel or near the touch panel), and generate corresponding operation instructions, and the operation instructions execute corresponding programs. Optionally, the touch panel may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch direction, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 301, and can receive the command sent by the processor 301 and execute it. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it is transmitted to the processor 301 to determine the type of touch event, and then the processor 301 provides a corresponding visual output on the display panel according to the type of touch event. In an embodiment of the present application, the touch panel and the display panel can be integrated into the touch display screen 303 to realize the input and output functions. However, in some embodiments, the touch panel and the touch panel can be used as two independent components to realize the input and output functions. That is, the touch display screen 303 can also be used as a part of the input unit 306 to realize the input function.
[0189] The radio frequency circuit 304 may be used to send and receive radio frequency signals, so as to establish wireless communication with a network device or other electronic devices through wireless communication, and to send and receive signals with the network device or other electronic devices.
[0190] The audio circuit 305 can be used to provide an audio interface between the user and the electronic device through a speaker and a microphone. The audio circuit 305 can transmit the electrical signal converted from the received audio data to the speaker, which is converted into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 305 and converted into audio data, and then the audio data is output to the processor 301 for processing, and then sent to another electronic device through the radio frequency circuit 304, or the audio data is output to the memory 302 for further processing. The audio circuit 305 may also include an earplug jack to provide communication between an external headset and the electronic device.
[0191] The input unit 306 may be used to receive input numbers, character information or user feature information (such as fingerprint, iris, facial information, etc.), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0192] The power supply 307 is used to supply power to various components of the electronic device 300. Optionally, the power supply 307 can be logically connected to the processor 301 through a power management system, so that the power management system can manage charging, discharging, and power consumption. The power supply 307 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0193] although Figure 5 Not shown, the electronic device 300 may also include a camera, a sensor, a wireless fidelity module, a Bluetooth module, etc., which will not be described in detail here.
[0194] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0195] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0196] To this end, an embodiment of the present application provides a computer-readable storage medium, in which a plurality of computer programs are stored, and the computer program can be loaded by a processor to execute any one of the game commentary information processing methods provided in the embodiments of the present application. The computer program can execute the following steps of the game commentary information processing method:
[0197] In response to a game match start instruction, displaying a game scene corresponding to the game match in the graphical user interface, the game scene at least including a first camp character and a second camp character participating in the game, wherein the first camp character is controlled by the terminal device;
[0198] During the battle between the first camp character and the second camp character, obtaining game battle data corresponding to the first camp character and / or the second camp character;
[0199] Determine a target game element matched by the game match in a preset game knowledge graph, wherein the game knowledge graph includes a plurality of game elements associated with the game match, a preset association relationship exists between the game elements, the game element corresponds to at least one game element category, and the association relationship indicates a mutual influence relationship between the game elements during the game match;
[0200] Inputting the game battle data, the target game element, and the target association relationship of the target game element in the game knowledge graph into a first language model to obtain at least one game description information of the game game, wherein the first language model is trained by a plurality of first preset sample pairs, each of which is composed of a preset game battle data and corresponding preset game description information;
[0201] The at least one game description information is input into a second language model to generate commentary information for describing in real time the battle situation between the first camp character and the second camp character, wherein the second language model is trained by multiple second preset sample pairs, and each second preset sample pair consists of a preset game battle data and corresponding preset commentary information.
[0202] Due to the computer program stored in the storage medium, a game scene corresponding to the game match can be displayed in the graphical user interface in response to a game match start instruction, wherein the game scene at least includes a first camp character and a second camp character participating in the battle, wherein the first camp character is controlled by the terminal device; then, during the battle between the first camp character and the second camp character, game battle data corresponding to the first camp character and / or the second camp character is obtained; then, a target game element matched by the game match is determined in a preset game knowledge graph, wherein the game knowledge graph includes multiple game elements associated with the game match, there is a preset association relationship between the game elements, the game element corresponds to at least one game element category, and the association relationship indicates the relationship between the game elements. The game battle data, the target game elements, and the target association relationship between the target game elements in the game knowledge graph are input into a first language model to obtain at least one game description information of the game game, wherein the first language model is trained by a plurality of first preset sample pairs, and each first preset sample pair consists of a preset game battle data and a corresponding preset game description information; finally, the at least one game description information is input into a second language model to generate commentary information for real-time description of the battle situation between the first camp character and the second camp character, wherein the second language model is trained by a plurality of second preset sample pairs, and each second preset sample pair consists of a preset game battle data and a corresponding preset commentary information. Therefore, by adopting the solution of the embodiment of the present application, by generating commentary information for the current game game according to the real-time game battle data corresponding to the current game game in the target game, the current battle effect can be clearly and detailedly conveyed to the player, and the battle scene of the current game game can be fully rendered; moreover, the commentary information can also be dynamically generated according to the actual real-time game battle situation, thereby improving the realism of the game commentary, enhancing the player's immersive experience in the target game, and effectively improving the player's gaming experience.
[0203] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0204] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0205] Since the computer program stored in the computer-readable storage medium can execute any method for processing game commentary information provided in the embodiments of the present application, the beneficial effects that can be achieved by any method for processing game commentary information provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0206] According to one aspect of the present application, a computer program product or a computer program is also provided, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the methods provided in various optional implementations of the above embodiments.
[0207] In the above-mentioned embodiments of the processing device for game commentary information, computer-readable storage medium, electronic device, and computer program product, the description of each embodiment has its own emphasis. For the part not described in detail in a certain embodiment, reference can be made to the relevant description of other embodiments. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process and beneficial effects of the above-mentioned processing device for game commentary information, computer-readable storage medium, computer program product, electronic device and its corresponding units can refer to the description of the processing method of game commentary information in the above embodiment, and will not be repeated here.
[0208] The above is a detailed introduction to a method, device, electronic device, computer-readable storage medium and computer program product for processing game commentary information provided in the embodiments of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for processing game commentary information, characterized in that: Providing a graphical user interface through a terminal device, the method comprising: In response to a game match start instruction, displaying a game scene corresponding to the game match in the graphical user interface, the game scene at least including a first camp character and a second camp character participating in the game, wherein the first camp character is controlled by the terminal device; During the battle between the first camp character and the second camp character, obtaining game battle data corresponding to the first camp character and / or the second camp character; Determine a target game element matched by the game match in a preset game knowledge graph, wherein the game knowledge graph includes a plurality of game elements associated with the game match, a preset association relationship exists between the game elements, the game element corresponds to at least one game element category, and the association relationship indicates a mutual influence relationship between the game elements during the game match; Inputting the game battle data, the target game element, and the target association relationship of the target game element in the game knowledge graph into a first language model to obtain at least one game description information of the game game, wherein the first language model is trained by a plurality of first preset sample pairs, each of which is composed of a preset game battle data and corresponding preset game description information; The at least one game description information is input into a second language model to generate commentary information for describing in real time the battle situation between the first camp character and the second camp character, wherein the second language model is trained by multiple second preset sample pairs, and each second preset sample pair consists of a preset game battle data and corresponding preset commentary information.
2. The method according to claim 1, characterized in that Before obtaining the game battle data corresponding to the first camp character and / or the second camp character, the method further includes: Obtaining current combat information of the first camp character and / or the second camp character in the game; Based on multiple preset tag types, filtering out target combat information matching the preset tag type from the combat information; Game tag data is generated based on the target battle information and used as game battle data corresponding to the first camp character and / or the second camp character.
3. The method according to claim 2, characterized in that The step of determining the target game elements for the game match in a preset game knowledge graph includes: In a preset game knowledge graph, target game elements that match each target combat information in the game tag data are determined, and target association relationships of each target game element in the game knowledge graph are determined.
4. The method according to claim 1, characterized in that The game description information includes the battle situation and / or battle prediction result of the current game game, wherein the battle situation is used to describe the game battle event corresponding to the game game, and the battle prediction result is used to predict the game direction of the game game after the game battle event occurs.
5. The method according to claim 4, characterized in that After the game battle data, the target game element, and the target association relationship of the target game element in the game knowledge graph are input into a first language model to obtain at least one game description information of the game game, the method further includes: Obtaining the battle status of the game; The first language model is used to analyze the current scene description information and / or emotion description information of the game game based on the battle situation, the target game elements, and the target association relationship of the target game elements in the game knowledge graph, wherein the scene description information is used to describe the current game scene of the game game, and the emotion description information is used to describe the current game atmosphere of the game game.
6. The method according to claim 5, characterized in that The method further comprises: Through the second language model, based on the at least one game description information, the scene description information and / or the emotion description information, commentary information for real-time description of the battle situation between the first camp character and the second camp character is generated.
7. The method according to claim 6, characterized in that The generating, by the second language model, commentary information for describing in real time the battle situation between the first camp character and the second camp character based on the at least one game description information, the scene description information and / or the emotion description information, comprises: Generate task prompt information based on the at least one game description information, the scene description information and / or the emotion description information, and a preset text template; The task prompt information is input into the second language model, so as to generate the explanation information based on the task prompt information through the second language model.
8. The method according to claim 1, characterized in that The step of inputting the at least one game description information into a second language model to generate commentary information for describing the battle situation between the first camp character and the second camp character in real time includes: Generate task prompt information based on the at least one game description information and a preset text template; The task prompt information is input into a second language model, so as to generate, through the second language model and based on the task prompt information, commentary information for describing in real time the battle situation between the first camp character and the second camp character.
9. The method according to claim 1, characterized in that: The target commentary information includes a game commentary text and / or a game commentary voice, wherein the game commentary voice is generated based on the game commentary text; After inputting the at least one game description information into a second language model to generate commentary information for describing the battle situation between the first camp character and the second camp character in real time, the method further includes: The game commentary text is displayed and / or the game commentary voice is played through a graphical user interface.
10. The method according to claim 2, characterized in that After the game tag data is generated based on the target battle information and used as the game battle data corresponding to the first camp character and / or the second camp character, the method further includes: The game tag data is input into a preset language robot to trigger the language robot to generate commentary information for real-time description of the battle situation between the first camp character and the second camp character based on the game tag data according to the preset information generation logic.
11. A device for processing game commentary information, characterized in that: Provides a graphical user interface through terminal devices, including: A display unit, configured to display a game scene corresponding to the game in the graphical user interface in response to a game match start instruction, wherein the game scene includes at least a first camp character and a second camp character participating in the game, wherein the first camp character is controlled by the terminal device; An acquisition unit, configured to acquire game battle data corresponding to the first camp character and / or the second camp character during a battle between the first camp character and the second camp character; A determination unit, configured to determine a target game element matched by the game match in a preset game knowledge graph, wherein the game knowledge graph includes a plurality of game elements associated with the game match, a preset association relationship exists between the game elements, the game element corresponds to at least one game element category, and the association relationship indicates a mutual influence relationship between the game elements during the game match; a processing unit, configured to input the game battle data, the target game element, and the target association relationship of the target game element in the game knowledge graph into a first language model to obtain at least one game description information of the game game, wherein the first language model is obtained by training a plurality of first preset sample pairs, each of which is composed of a preset game battle data and corresponding preset game description information; A generating unit is used to input the at least one game description information into a second language model to generate commentary information for describing the battle situation between the first camp character and the second camp character in real time, wherein the second language model is obtained by training a plurality of second preset sample pairs, and each second preset sample pair consists of a preset game battle data and corresponding preset commentary information.
12. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores a plurality of instructions; the processor loads instructions from the memory to execute the steps of the method for processing game commentary information as claimed in any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps of the method for processing game commentary information as described in any one of claims 1 to 10.
Citation Information
Cited By
Game replaying method, device and equipment based on artificial intelligence and storage medium
CN120605510A
Artificial intelligence-based game review method, device, equipment and storage medium
CN120605510B