Hud element display adjustment method in game, model training method and device

By acquiring the descriptive text of the game scene and HUD elements, instantiating the prompt template, and using a pre-trained language model to predict the display priority, the display of HUD elements is dynamically adjusted, solving the problem of changing player information attention and improving information acquisition efficiency.

CN119701337BActive Publication Date: 2025-12-19NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411659172.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-19
Publication Date
2025-12-19
Estimated Expiration
2044-11-19

AI Technical Summary

Technical Problem

In existing technologies, the HUD elements displayed in games cannot adapt to the dynamic changes in players' attention to information at different stages of the game, resulting in information misalignment and obscuring of key information, which affects the efficiency of information acquisition.

Method used

By obtaining the description text of the current game scene and HUD elements of the virtual character, a prompt template is instantiated to set the input data format of the prediction model. The display priority of HUD elements is predicted by a pre-trained language model, and the display of HUD elements on the game interface is dynamically adjusted according to the priority information.

Benefits of technology

It achieves dynamic adaptation of HUD element display, ensuring that players can obtain key information in a timely manner, improving operational judgment and reaction speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119701337B_ABST
    Figure CN119701337B_ABST
Patent Text Reader

Abstract

The application discloses a HUD element display adjustment method and model training method and device in a game, and electronic equipment, and the method comprises the following steps: acquiring a scene description text of a game scene currently entered by a virtual character and a HUD element description text of a HUD element on a current game interface; instantiating a first prompt template according to the scene description text and the HUD element description text, and obtaining a target prompt after instantiating, wherein the first prompt template is used for setting the format of target prediction model input data; inputting the target prompt into the target prediction model to obtain display priority information of the HUD element output by the target prediction model; and adjusting the display of the HUD element on the game interface according to the display priority information. The application predicts the display priority of the HUD element through the scene description text of the game scene currently entered, adjusts the display of the HUD element on the game interface according to the display priority information, and can meet the dynamic change of the attention of the player to the HUD element.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, in particular to a HUD element display adjustment method in a game, a model training method, device, electronic equipment and computer readable storage medium. BACKGROUND

[0002] At present, the heads-up display (HUD) in the game displays various important information of the player in real time through the game interface or window, such as life value, energy, map, task prompt and other HUD elements, which helps the player better understand his own state and the surrounding environment in the game process, so as to make more effective decisions and operations.

[0003] In the related art, a fixed display level and a preset display rule are usually used to display the HUD elements. For example, a fixed display level corresponding to each HUD element, and a fixed display position and a fixed display mode of each HUD element determined according to the preset display rule.

[0004] However, since the attention of the player to different HUD elements is dynamically changed in different game stages, as the game stage changes, the HUD elements displayed on the HUD interface are misaligned with the HUD elements actually paid attention to by the player. Therefore, the above related technology cannot meet the dynamic change of the player's attention to the HUD elements. For example, assuming that the character blood volume progress bar is fixedly displayed at a prominent position on the HUD interface, and the display size of the technical description icon is small and the display position is not eye-catching, then in the game stage of fierce battle, the player can check the blood volume state in time to make decisions. But in the virtual material stage, the player cannot find the skill description icon in time, and thus cannot obtain the key information in time. SUMMARY

[0005] The present application provides a HUD element display adjustment method in a game, a model training method, device, electronic equipment and computer readable storage medium to solve the problem that the prior art cannot meet the dynamic change of the player's attention to the HUD elements.

[0006] In a first aspect, the present application provides a HUD element display adjustment method in a game, which comprises:

[0007] obtaining a scene description text of a game scene currently entered by a virtual character and a HUD element description text of a HUD element on a current game interface;

[0008] According to the scene description text and the HUD element description text, a first prompt template is instantiated, and a target prompt is obtained after instantiation, the first prompt template being used to set a format of target prediction model input data, the target prediction model being used to predict display priority information of the HUD element;

[0009] The target prompt is input into the target prediction model, and display priority information of the HUD element output by the target prediction model is obtained.

[0010] According to the display priority information, the HUD element on the game interface is displayed and adjusted.

[0011] In a second aspect, an embodiment of the present application provides a model training method, and the method comprises the following steps:

[0012] A plurality of first training samples are obtained, and the first training sample comprises scene description text of any game scene and HUD element description text of a HUD element matched with the game scene.

[0013] According to the first training sample, a second prompt template is instantiated, and a prompt training sample is obtained after instantiation, the second prompt template being used to set a format of input data when a pre-trained language model is trained.

[0014] According to the prompt training sample, the pre-trained language model is trained, and a target prediction model is obtained after training, the target prediction model being used to predict display priority of the HUD element.

[0015] In a third aspect, an embodiment of the present application provides a HUD element display adjustment device in a game, and the device comprises:

[0016] A first obtaining module is configured to obtain scene description text of a game scene in which a virtual character is currently located and HUD element description text of a HUD element on a current game interface.

[0017] A first processing module is configured to instantiate a first prompt template according to the scene description text and the HUD element description text, and a target prompt is obtained after instantiation, the first prompt template being used to set a format of target prediction model input data, the target prediction model being used to predict display priority information of the HUD element.

[0018] A prediction module is configured to input the target prompt into the target prediction model, and obtain display priority information of the HUD element output by the target prediction model.

[0019] An adjusting module is configured to perform display adjustment on the HUD element on the game interface according to the display priority information.

[0020] In a fourth aspect, an embodiment of the present application provides a model training apparatus, which comprises:

[0021] A second obtaining module is configured to obtain a plurality of groups of first training samples, wherein each of the first training samples comprises scene description text of any game scene and HUD element description text of a HUD element matched with the game scene.

[0022] A second processing module is configured to instantiate a second prompt template according to the first training samples, so as to obtain a prompt training sample, wherein the second prompt template is used to set a format of input data when training a pre-trained language model.

[0023] A training module is configured to train the pre-trained language model according to the prompt training sample, so as to obtain a target prediction model, wherein the target prediction model is used to predict a display priority of a HUD element.

[0024] In a third aspect, an embodiment of the present application provides an electronic device, which comprises:

[0025] A memory and a processor, wherein the memory and the processor are coupled.

[0026] The memory is configured to store one or more computer instructions.

[0027] The processor is configured to execute the one or more computer instructions to implement the HUD element display adjustment method in a game according to any one of the first aspect, or to implement the model training method according to any one of the second aspect.

[0028] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, which stores one or more computer instructions, wherein the instructions are executed by a processor to implement the HUD element display adjustment method in a game according to any one of the first aspect, or to implement the model training method according to any one of the second aspect.

[0029] In a fifth aspect, an embodiment of the present application provides a computer program product, which comprises a computer program, wherein the computer program is executed by a processor to implement the HUD element display adjustment method in a game according to any one of the first aspect, or to implement the model training method according to any one of the second aspect.

[0030] Compared with the prior art, the present application has the following advantages:

[0031] The HUD element display adjustment method in the game provided in the application comprises the following steps: obtaining a scene description text of a game scene currently entered by a virtual character and a HUD element description text of a HUD element on a current game interface; instantiating a first prompt template according to the scene description text and the HUD element description text, and obtaining a target prompt after instantiation, wherein the first prompt template is used for setting a format of input data of a target prediction model, and the target prediction model is used for predicting display priority information of the HUD element; inputting the target prompt into the target prediction model to obtain the display priority information of the HUD element output by the target prediction model; and dynamically adjusting the display of the HUD element on the game interface according to the display priority information. The intelligent dynamic adjustment mechanism can adapt to the dynamically changing information needs of the player in real time, avoids the misalignment between the information provided by the HUD interface and the actual needs of the player, and enables the player to obtain key information in a timely and fast manner, thereby promoting operation judgment and improving reaction speed. BRIEF DESCRIPTION OF DRAWINGS

[0032] The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and serve to explain the principles of the application, and do not limit the application in any way. In the drawings:

[0033] Figure 1 A flowchart of a model training method provided for the first embodiment of the application;

[0034] Figure 2 A flowchart of a HUD element display adjustment method in the game provided for the second embodiment of the application;

[0035] Figure 3 Schematic diagrams of the HUD element before and after adjustment provided for the second embodiment of the application;

[0036] Figure 4 A structural schematic diagram of a HUD element display adjustment device in the game provided for the third embodiment of the application;

[0037] Figure 5 A structural schematic diagram of a model training device provided for the fourth embodiment of the application;

[0038] Figure 6 A hardware structural schematic diagram of an electronic device provided for the fifth embodiment of the application.

[0039] The specific embodiments of the application have been shown in the above-described drawings, and will be described in more detail hereinafter. These drawings and textual descriptions are not intended to limit the scope of the concept of the application in any way, but to illustrate the concept of the application to those skilled in the art by referring to specific embodiments. Detailed Implementation

[0040] To make the objectives, advantages, and features of this application clearer, the application will be described clearly and completely below in conjunction with the accompanying drawings and specific embodiments. In the following description, many specific details are set forth to provide a full understanding of this application. However, the described embodiments are only some, not all, of the embodiments of this application, and all other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of this application.

[0041] It should be noted that in the description of this application, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance, or a specific order or sequence. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances. Furthermore, in the description of this application, unless otherwise stated, the term "multiple" refers to two or more. The term "and / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. The terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or devices.

[0042] The prior art involved in this application and the problems existing in the prior art are described below:

[0043] Currently, in-game head-up display (HUD) systems display various important information about players in real time through the game interface or window, such as health, energy, map, and mission prompts. HUD elements help players better understand their status and surrounding environment during the game, thereby making more effective decisions and actions.

[0044] In related technologies, HUD elements are typically displayed using fixed display levels and preset display rules. For example, each HUD element has a fixed display level, and the display position and display mode of each HUD element are determined according to preset display rules.

[0045] However, the aforementioned technologies still have the following problems:

[0046] Problem one, it is difficult to adapt to the dynamic changes of the information needs of the players: in the game process, the players in different game stages pay attention to different information, and the fixed display level and the preset display rule are used for the display mode, which leads to the problem that the HUD elements displayed on the HUD interface are mismatched with the actual attention of the players.

[0047] Problem two, the key information may be blocked, affecting the information acquisition efficiency. Since the fixed display level is used, when the different elements in the HUD are blocked, the important information concerned by the players may be blocked at a lower display level.

[0048] In order to solve the problems in the related art, the present application provides a HUD element display adjustment method in a game, a HUD element display adjustment device corresponding to the display adjustment method, a model training method, a model training device corresponding to the model training method, an electronic device and a computer readable storage medium which can implement the HUD element display adjustment method and the model training method in the game. The embodiments are provided below to explain the above-mentioned method, device, electronic device and computer readable storage medium in detail.

[0049] In order to make the purpose, technical scheme of the present application more clear and intuitive, the following will combine the drawings and embodiments to explain the method provided by the embodiments of the present application in detail. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application. It can be understood that the following embodiments can exist independently, and the embodiments described below and the features in the embodiments can be combined with each other without conflict between the embodiments provided by the present application. For the same or similar content, it is not repeated in different embodiments. In addition, the step sequence in each method embodiment described below is only an example, not a strict limitation. In some cases, the steps shown or described can be executed in different order.

[0050] The application provides a HUD element display adjustment method in a game, a model training method, a device, an electronic device and a computer readable storage medium. Specifically, the HUD element display adjustment method in a game of an embodiment of the application can be executed by a computer device, wherein the computer device can be a terminal or a server and the like. The terminal can be a terminal device such as a smart phone, a tablet computer, a notebook computer, a touch screen, a game console and the like. The terminal can further include a client, which can be a game application client, a browser client carrying a game program or an instant messaging client and the like. The server can be a stand-alone physical server, a server cluster or a distributed system composed of multiple physical servers, a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, and basic cloud computing services such as big data and artificial intelligence platforms.

[0051] First embodiment

[0052] In the following, the model training method provided by the first embodiment of the application is described in combination with Figure 1 Figure 1 The flowchart of the model training method provided by one of the embodiments of the application is shown in the following.

[0053] As Figure 1 shown, the model training method includes steps S110-S130:

[0054] S110, a plurality of first training samples are obtained, and the first training sample includes scene description text of any game scene and HUD element description text of a HUD element matched with the game scene.

[0055] S120, the second prompt template is instantiated according to the first training sample, and the instantiated prompt training sample is obtained, and the second prompt template is used to set the format of the input data when training the pre-trained language model.

[0056] S130, the pre-trained language model is trained according to the prompt training sample, and the target prediction model is obtained after the training, and the target prediction model is used to predict the display priority of the HUD element.

[0057] In the following, steps S110-S130 are described in detail.

[0058] ​In the embodiments of the present application, considering that the player pays attention to different HUD elements in different game scenes, in order to make the model gradually learn the matching relationship between the game scene and the HUD element in the model training process, that is, which HUD elements are displayed in a game scene, the embodiments of the present application obtain a plurality of sets of first training sample data, which includes the scene description text of any game scene and the HUD element description text of the HUD element matched with the game scene. The game scenes described by the scene description texts included in different first training samples are different, which facilitates the model to learn more matching relationships between the game scenes and the HUD elements in the model training process.

[0059] In the embodiments of the present application, in order to more comprehensively and in detail describe the game scene and the HUD element, the embodiments of the present application attribute mark (or label) the game scene and the HUD element from multiple dimensions to respectively form the description texts of the game scene and the HUD element.

[0060] First, the attribute marking of the game scene from multiple dimensions is described in detail.

[0061] In the game play process, according to the game nature and the player experience rhythm, several typical game scenes are extracted. For example, the game scenes include but are not limited to the novice period, the daily exploration, the Boss battle, the PVP confrontation, etc., which are only examples. The key elements of each game scene are extracted and structuredly marked, and the marking dimensions include but are not limited to: scene type, scene target, scene difficulty, time pressure, key event, special mechanism. Among them, the scene type is, for example, town, copy, battlefield, Boss battle, etc.; the scene target is used to describe the main target of the player in the scene, such as task completion, confrontation victory, equipment acquisition, etc.; the scene difficulty is used to evaluate the challenge degree of the scene to the player, such as simple, ordinary, difficult, epic, etc.; the time pressure is used to describe the time limit degree faced by the player in the game scene; the key event is used to extract the key event node in the scene which has a significant influence on the player's decision; and the special mechanism is used to mark the special game mechanism in the scene, such as time-limited BUFF, random event, etc.

[0062] In the embodiments of the present application, by extracting different game scenes and describing the characteristics of the game scenes in each dimension from multiple dimensions for each game scene, a structured semantic representation for the game scene can be formed, so as to obtain the structured scene description text corresponding to the game scene.

[0063] Exemplarily, a game scene structured scene description text can be: scene: epic boss battle, [scene goal: kill the boss], [scene difficulty: epic], [time pressure: high], [key event: boss gets angry and releases a powerful skill], [special mechanism: scene time limit buff], so that the characteristics of the game scene can be described from multiple dimensions.

[0064] Next, the attribute labeling of the HUD elements from multiple dimensions will be described in detail.

[0065] By selecting representative games from massive game data, games with representativeness and typicality are selected as analysis objects, and the HUD interfaces of these games are comprehensively collected. Each HUD element (such as text, icon, progress bar, etc.) in the collected HUD interface is labeled with multiple dimensions, including but not limited to: element type, information category, business importance, interaction mode, information update feature, information update feature. Among them, the element type is text, icon, progress bar, button, etc.; the information category is used for character attributes, task information, skill description, etc.; the business importance is used to refer to the core gameplay and numerical system of the game, and to evaluate the objective importance of the information carried by the element to the player's decision; the interaction mode is used to describe the operations that the element can accept, such as clicking, hovering, dragging, etc.; the information update feature is used to describe the dynamic change characteristics of the element content, such as real-time update, phased display, trigger pop-up, etc.; the display life cycle is used to describe the time characteristics of the element display in the interface, such as constant display, timed hiding, phased appearance, etc.

[0066] In the embodiments of the present application, by collecting different HUD interfaces and describing the characteristics of the HUD elements in the collected HUD interfaces from multiple dimensions, a structured semantic representation for the HUD elements can be formed, so as to obtain the structured HUD element description text corresponding to the HUD elements.

[0067] Exemplarily, a HUD element structured HUD element description text can be: HUD element: character blood bar, [element type: progress bar], [information category: character attribute], [business importance: high], [interaction mode: hover to display details], [update feature: real-time], [display feature: constant], so that the characteristics of the HUD element can be described from multiple dimensions.

[0068] The above, the second prompt template is used to set the format of the input data when training the pre-trained language model.

[0069] Next, two possible second prompt templates will be exemplarily described.

[0070] The second prompt template includes a scene background knowledge area, a scene description text area, a HUD element description text area, and a question area. The scene background knowledge area is used to place scene background knowledge related to the corresponding game scene. That is, compared to the first type, the second type adds a scene background knowledge area to enhance the description of the scene background knowledge of the game scene, so that the model can have a more detailed understanding of the game scene during training, thereby helping to give the display priority information of the HUD element that is more matched with the game scene. Similarly, the question text can be fixed or modified according to actual needs. For example, the question text can be "Please score the display priority of each HUD element (1-5 points) and give reasons". When using the second prompt template, the scene background knowledge text, the scene description text, and the HUD element description text corresponding to the game scene need to be filled into the scene background knowledge area, the scene description text area, and the HUD element description text area, respectively.

[0071] When using the second prompt template, the scene background knowledge text, the scene description text, and the HUD element description text corresponding to the game scene need to be filled into the scene background knowledge area, the scene description text area, and the HUD element description text area, respectively.

[0072] The second prompt template includes a scene background knowledge area, a scene description text area, a HUD element description text area, and a question area. The scene background knowledge area is used to place scene background knowledge related to the corresponding game scene. That is, compared to the first type, the second type adds a scene background knowledge area to enhance the description of the scene background knowledge of the game scene, so that the model can have a more detailed understanding of the game scene during training, thereby helping to give the display priority information of the HUD element that is more matched with the game scene. Similarly, the question text can be fixed or modified according to actual needs. For example, the question text can be "Please score the display priority of each HUD element (1-5 points) and give reasons". When using the second prompt template, the scene background knowledge text, the scene description text, and the HUD element description text corresponding to the game scene need to be filled into the scene background knowledge area, the scene description text area, and the HUD element description text area, respectively.

[0073] In the embodiment of the present application, the second prompt template is instantiated according to the first training sample, and a prompt training sample is obtained after instantiation. The second prompt template is used to set the format of the input data when training the pre-trained language model.

[0074] Specifically, for the first second prompt template described above, the scene description text and the HUD element description text are obtained from the first training sample, and the obtained scene description text and the obtained HUD element description text are filled into the scene description text area and the HUD element description text area respectively, that is, the (first) second prompt template is instantiated according to the first training sample, and a prompt training sample is obtained after instantiation. That is, assuming that there is a fixed question text in the question area of the second prompt template, when instantiating the (first) second prompt template, the scene description text area and the HUD element description text area need to be filled with the scene description text and the HUD element description text corresponding to the game scene.

[0075] Exemplarily, a prompt training sample is as follows:

[0076] {<scene>

[0077] Scene difficulty: epic

[0078] Time pressure: high

[0079] Key event: boss rage

[0080] Special mechanism: invincible buff

[0081] < / scene>

[0082] <HUD element>

[0083] HUD element 1:

[0084] Element type: progress bar

[0085] Information category: character blood volume

[0086] Business importance: high

[0087] HUD element 2:

[0088] Element type: icon

[0089] Information category: skill description

[0090] Business importance: medium

[0091]

[0092] < / HUD element>

[0093] <question>

[0094] Please score the display priority of each HUD element (1-5 points) and give reasons.

[0095] < / question>}

[0096] Specifically, for the above-mentioned second second prompt template, the scene description text and the HUD element description text are obtained from the first training sample, and the obtained scene description text and the HUD element description text are filled into the scene description text area and the HUD element description text area, respectively, and the scene background knowledge related to the game scene is obtained and filled into the scene background knowledge area, that is, the (second) second prompt template is instantiated according to the first training sample to obtain a prompt training sample after instantiation. That is, assuming that there is a fixed question text in the question area in the second prompt template, the scene background knowledge text, the scene description text and the HUD element description text corresponding to the game scene need to be filled into the scene background knowledge area, the scene description text area and the HUD element description text area, respectively, when using the (second) second prompt template.

[0097] Exemplarily, a prompt training sample is as follows:

[0098] {<scene background knowledge>

[0099] The current game scene is "Demon King's Hall" (scene id: s100), and the key HUD elements of the game scene include BOSS blood bar, skill cooling prompt, etc.

[0100] The player is performing the task "Defeat the Demon King" (task id: t050), and the related HUD elements of the task include task timer, BOSS position guide, etc.

[0101] The BOSS is currently in "Furious State" (event id: e200), and the information such as character blood volume and defense skills needs to be focused on in the furious state.

[0102] < / scene background knowledge>

[0103] <scene>

[0104] Scene difficulty: epic

[0105] Time pressure: high

[0106] Key event: Boss Anger

[0107] Special mechanism: invincible BUFF

[0108] < / scene>

[0109] <HUD element>

[0110] HUD element 1:

[0111] Element type: progress bar

[0112] Information category: Character health

[0113] Business importance: High

[0114] HUD element 2:

[0115] Element type: Icon

[0116] Information category: Skill description

[0117] Business importance: Medium

[0118]

[0119] < / HUD element>

[0120] <Question>

[0121] Please score the display priority of each HUD element (1-5) and give reasons.

[0122] < / Question>}

[0123] Next, a possible implementation of obtaining scene background knowledge related to the game scene is described, including steps S111-S112:

[0124] S111, Obtain a game knowledge graph, the game knowledge graph includes multiple nodes and edges connecting two nodes, different nodes are used to represent different game elements, and the edges are used to represent the semantic association between the game elements represented by the two connected nodes.

[0125] S112, Determine the scene background knowledge related to the game scene according to the game knowledge graph and the scene description text.

[0126] As mentioned above, the game knowledge graph is a structured data model that organizes and displays a large amount of information related to games in the form of graphs.

[0127] The construction process of the game knowledge graph is as follows: First, from a large amount of game data (such as game text materials, player strategies, live commentary, etc.), extract important game elements such as basic concepts, terminology expressions, narrative styles, gameplay rules, and character relationships. For example, important game elements include but are not limited to game characters, equipment, skills, tasks, maps, and copies. Among them, the attributes related to game characters include but are not limited to occupation, gender, and camp; the attributes related to equipment include but are not limited to name, type, and rarity.

[0128] Subsequently, the game elements are semantically modeled by using a knowledge graph technology, nodes are defined, and edges are defined. The nodes are used to represent game elements in the game. The edges are used to represent semantic associations between the nodes. The edges representing different semantic relationships include, but are not limited to, possession, belonging, location, strengthening, upgrading, and restraining.

[0129] Finally, based on the massive game data, node instances are extracted, and edge relationships between the node instances are constructed. For example, from the game data, a specific character A, equipment B, and the fact that the character A possesses the equipment B are identified, and an edge with a semantic relationship of “possession” is established between a node (i.e., a node instance) representing the character A and a node (i.e., a node instance) representing the equipment B. By continuously enriching the node instances and the edge relationships, a game knowledge network, i.e., a game knowledge graph, is formed. The game knowledge graph covers all aspects of the game and can flexibly express semantic associations between game elements.

[0130] For example, “character 1 possesses equipment 2” in the game knowledge graph is that a character node representing the character 1 and an equipment node representing the equipment 2 are connected by an edge representing a “possession” relationship. For another example, “equipment 2 strengthens skill 3” in the game knowledge graph is that an equipment node representing the equipment 2 and a skill node representing the skill 3 are connected by an edge representing a “strengthening” relationship.

[0131] In the embodiments of the present application, by defining nodes (such as characters, equipment, skills, etc.) representing game elements and diversified relationship edges (such as possession, strengthening, upgrading, etc.) between the nodes, knowledge in massive game data is refined into a structured semantic network to obtain a game knowledge graph. The game knowledge graph covers all aspects of the game and provides rich game common sense and domain knowledge for training a pre-trained language model.

[0132] In the embodiments of the present application, based on the game knowledge graph, scene background knowledge related to a game scene described by a scene description text is determined from the game knowledge graph according to the scene description text. Specifically, from the game knowledge graph, game elements contained in the scene description text are found, other game elements having semantic associations with the game elements are found out, and thus scene background knowledge related to the game scene described by the scene description text is obtained.

[0133] Exemplarily, it can be known from the scene description text that the game scene currently played by the player is a BOSS battle, and the following information can be queried from the game knowledge graph: "the current game scene is "Demon King's Hall" (scene id: s100), the key HUD elements of this game scene include the BOSS health bar, skill cooling prompt, etc.; the player is performing the task "Defeat the Demon King" (task id: t050), the related HUD elements of the task include the task timer, the BOSS position guide, etc.; the BOSS is currently in "Furious State" (event id: e200), and the information such as character blood volume, defense skills, etc. needs to be focused on in the furious state.

[0134] In the embodiment of the present application, the pre-training language model is trained according to the prompt training sample, and the target prediction model is obtained after training. Wherein, the target prediction model is used to predict the display priority of the HUD element.

[0135] The above, the pre-training language model is a model obtained by training a large-scale text data set, and the main purpose of pre-training is to enable the model to capture the context relationship and semantic structure of language. The pre-training language model refers to a model that can understand and generate natural language. These models not only recognize the meaning of words themselves, but also understand the relationship between words and their meaning in sentences. Pre-training language models can be used to perform various tasks such as question answering, text generation, sentiment analysis, etc.

[0136] In the embodiment of the present application, a Transformer-based large language model such as GPT-3, PaLM, etc. can be used. This type of model takes the self-attention mechanism as the core, and forms a deep network by stacking multiple transformer blocks. The model in the pre-training stage performs self-supervised learning on a large amount of text corpus and masters rich language knowledge. The encoder part of the model maps the text input into a semantic vector, and the decoder part generates the target text according to the semantic vector. Pre-training semantics enables the model to have the ability to understand and generate natural language.

[0137] Based on the prompt training samples constructed respectively based on the above plurality of first training samples, in each round of model training process, a prompt training sample is used as input data of the pre-training language model for supervised learning, so that it learns to predict the display priority score of the HUD element according to the scene description text.

[0138] Increasing the number and richness of the first training samples can improve the model's understanding of the scene semantics and the accuracy of predicting the HUD elements that go with it. Incorporating structured scene background knowledge as priori helps the model more efficiently grasp the specific rules of HUD layout optimization in different game scenes. By repeating the above training steps, the trained pre-trained language model gradually establishes a mapping relationship between scene features and reasonable HUD combinations. Different scene description texts are repeatedly combined with corresponding HUD element description texts, allowing the model to abstract and generalize the general rules of "specific scene-HUD presentation" from a large number of first training samples.

[0139] The pre-trained language model after training (i.e., the target prediction model) learns the implicit correspondence between game scene features and the best HUD combinations in a large number of labeled samples. The encoder part (such as the self-attention layer of the transformer) in the pre-trained language model can extract the key features of the game scene in terms of difficulty, time pressure, key events, etc. from the scene description text, forming a scene embedding vector rich in semantic information. At the same time, the encoder also represents the attribute information (such as element type, carrying information, update frequency, etc.) of each HUD element (such as character health bar, skill icon, etc.) as a semantic vector. Through the attention mechanism, the model can analyze the correlation between each HUD element semantic vector and the scene semantic vector, i.e., the importance of the HUD element to the current scene. In the decoder part, the model considers the semantic correlation information contained in the encoding stage to evaluate the display priority of each HUD element. If the semantics of an element (such as character blood volume) are highly related to the semantics of a critical scene (such as BOSS rage), the model will judge it as key information and generate a higher priority score, while elements unrelated to the current scene (such as backpack icon) will be evaluated as low priority. The pre-trained language model after training (i.e., the target prediction model) realizes real-time evaluation of the importance of HUD elements through semantic modeling and correlation analysis.

[0140] In the embodiments of the present application, through the structured input method of scene description text, HUD element description text, and question text, the integration of game knowledge graph, and targeted fine-tuning, the model is endowed with the understanding ability of "knowing that" and "knowing why" of specific game scenes, so that it can make HUD priority evaluation that meets the scene requirements.

[0141] The model training method provided in the embodiments of the present application first acquires a plurality of first training samples, wherein the first training sample includes scene description text of any game scene and HUD element description text of a HUD element matched with the game scene. According to the first training sample, a second prompt template is instantiated, and a prompt training sample is obtained after instantiation. The second prompt template is used to set the format of input data when training the pre-trained language model. According to the prompt training sample, the pre-trained language model is trained, and a target prediction model is obtained after training. The target prediction model is used to predict the display priority of the HUD element. Through the structured input mode of the scene description text and the HUD element description text, the pre-trained language model is fine-tuned to have the understanding ability of "knowing the phenomenon" and "knowing the reason" of the game scene, so that the pre-trained language model can make HUD element priority evaluation meeting the scene requirements.

[0142] On the basis of the first embodiment, the model training method provided in the first embodiment of the present application is further described.

[0143] An optional embodiment, before the target prediction model is obtained after training, the model training method further includes A1-A2:

[0144] A1, a plurality of second training samples are acquired, and the second training sample includes scene description sample, HUD element description text of a HUD element on a game interface, and display priority information of the HUD element.

[0145] A2, the pre-trained language model is trained according to the second training sample.

[0146] In the embodiments of the present application, the second sample data composed of the scene description sample, the HUD element description text of the HUD element on the game interface, and the display priority information of the HUD element can also be used to train the model. That is, a small amount of pre-prepared "scene-HUD layout-priority score" cases are added in the above training process, which can make the model better learn the corresponding relationship between different dimensional features and priority scores, that is, a stronger corresponding relationship between model training data and model output is established, so that the model can better "draw an inference from a single instance".

[0147] Second embodiment

[0148] Next, the HUD element display adjustment method provided in the second embodiment of the present application is described in combination with Figure 2 The HUD element display adjustment method provided in the second embodiment of the present application is described, Figure 2 The flowchart of the HUD element display adjustment method provided in the second embodiment of the present application is shown.

[0149] As Figure 2As shown, the HUD element display adjustment method in the game includes steps S210-S240:

[0150] S210, acquire scene description text of a game scene currently where a virtual character is located and HUD element description text of a HUD element on a current game interface.

[0151] S220, instantiate a first prompt template according to the scene description text and the HUD element description text, and obtain a target prompt after instantiation, the first prompt template being used for setting a format of input data of a target prediction model, the target prediction model being used for predicting display priority information of the HUD element.

[0152] S230, input the target prompt into the target prediction model to obtain the display priority information of the HUD element output by the target prediction model.

[0153] S240, perform display adjustment on the HUD element on the game interface according to the display priority information.

[0154] Next, steps S210-S240 are described in detail.

[0155] In the embodiments of the present application, during the game played by a player, the system captures scene description text of a game scene currently where a virtual character controlled by the player is located and HUD element description text of a HUD element on a current game interface in real time.

[0156] For example, the scene description text is: <scene difficulty: epic> <time pressure: high> <key event: boss rage> <special mechanism: invincible buff>.

[0157] The HUD element scene description text is: HUD element 1: <element type: progress bar> <information category: character blood volume> <business importance: high>; HUD element 2: <element type: icon> <information category: skill description> <business importance: medium>...

[0158] In an optional embodiment, the first prompt template includes a scene description text area, a HUD element description text area, and a question area, the question area being used for placing question text for inquiring about display priority of the HUD element.

[0159] As described above, the first prompt template is used for setting a format of input data of a target prediction model, and the target prediction model is used for predicting display priority information of the HUD element.

[0160] Next, two possible first prompt templates are described by way of example.

[0161] The first kind of the first prompt template includes a scene description text area, an HUD element description text area and a question area. The scene description text area is used to place the scene description text of the game scene currently occupied by the virtual character, the HUD element description text area is used to place the HUD element description text, and the question area is used to place the question text for inquiring the display priority of the HUD element. The question text can be fixed or modified according to actual needs. For example, the question text can be "Please score the display priority of each HUD element (1-5 points) and give reasons". The question text is used to guide the target prediction model to output the score of the display priority of each HUD element.

[0162] When using the first prompt template, the scene description text and the HUD element description text corresponding to the game scene need to be filled into the scene description text area and the HUD element description text area respectively, so as to obtain the target prompt after instantiation.

[0163] The second kind of the first prompt template includes a scene background knowledge area, a scene description text area, an HUD element description text area and a question area. The scene background knowledge area is used to place the scene background knowledge related to the game scene currently occupied by the virtual character. That is, compared with the first kind, the scene background knowledge area is added to enhance the description of the scene background knowledge of the game scene, so that the target prediction model can have a more detailed understanding of the game scene currently occupied by the game character in the prediction process, thereby helping to give the display priority information of the HUD element that is more matched with the game scene. Similarly, the question text can be fixed or modified according to actual needs. For example, the question text can be "Please score the display priority of each HUD element (1-5 points) and give reasons". When using the first prompt template, the scene background knowledge text, the scene description text and the HUD element description text corresponding to the game scene need to be filled into the scene background knowledge area, the scene description text area and the HUD element description text area respectively, so as to obtain the target prompt after instantiation.

[0164] Specifically, the scene background knowledge acquisition step can be: acquiring a game knowledge graph, the game knowledge graph including a plurality of nodes and edges connecting two nodes, different nodes being used to represent different game elements, and the edges being used to represent the semantic association between the game elements represented by the two connected nodes. According to the game knowledge graph and the scene description text, the scene background knowledge related to the virtual character currently occupied is determined.

[0165] Optionally, the explanation of a possible implementation of acquiring the scene background knowledge related to the game scene can refer to the above description and explanation of steps S111-S112, and the same technical effects can be achieved. To avoid repetition, it will not be described here.

[0166] In the embodiment of the application, the target prompt is input into the target prediction model to obtain the display priority information of the HUD elements output by the target prediction model. After the target prediction model inputs the target prompt as input data, the display priority (importance) of each HUD element is determined based on the understanding of the game scene. For example, the question text is "Please score the display priority of each HUD element (1-5 points) and give the reason", then the target prediction model outputs the estimated score of 1-5 points for each HUD element and provides the decision basis.

[0167] Exemplarily, the target prompt input into the target prediction model and the display priority of each HUD element predicted by the target prediction model are exemplarily described as follows:

[0168] The target prompt is as follows:

[0169] {<scene>

[0170] Scene difficulty: epic

[0171] Time pressure: high

[0172] Key event: boss rage

[0173] Special mechanism: invincible buff

[0174] < / scene>

[0175] <HUD element>

[0176] HUD element 1:

[0177] Element type: progress bar

[0178] Information category: character blood volume

[0179] Business importance: high

[0180] HUD element 2:

[0181] Element type: icon

[0182] Information category: skill description

[0183] Business importance: medium ...

[0185] < / HUD element>

[0186] <Question>

[0187] Please score the display priority of each HUD element (1-5) and provide reasons.

[0188] < / Question>}

[0189] The target prediction model outputs the predicted display priority of each HUD element as follows:

[0190] {<Answer>

[0191] HUD element 1 (character health bar): 4 points

[0192] Reason: During the boss's rage phase, players face enormous survival pressure. Timely understanding of their own health status is crucial for making defensive, recovery, and other responses. Therefore, the character health bar needs to be prominently displayed.

[0193] HUD element 2 (skill description icon): 2 points

[0194] Reason: During the boss's rage phase, the player's primary task is survival, and skill usage is less. In contrast, the importance of skill description decreases. It is recommended to reduce the display priority of this element during this phase to avoid interfering with the player's access to critical information. ...

[0196] < / Answer>}.

[0197] In the embodiments of the present application, after receiving the scene description text and the HUD element description text, the target prediction model gives a display priority estimation score to the display priority (importance) of each HUD element based on the understanding of the game scene, and provides decision-making basis. The priority score considers factors such as the category of information carried by the HUD element, the relevance to the scene goal, and the timeliness of the information. The priority score directly reflects the objective importance of the HUD in the current scene, providing decision-making reference for subsequent HUD layout adjustment.

[0198] In an optional implementation, a possible implementation of step S204 "adjusting the display of HUD elements on the game interface according to the display priority information" includes steps S241-S242:

[0199] S241, determining the display mode of each HUD element according to the display priority information, the display mode including at least one of the following: visibility, display position, display size, display level.

[0200] S242, adjusting the display of the HUD elements on the game interface according to the display mode of each HUD element.

[0201] In the embodiments of the present application, based on the priority estimation score of the HUD element, the game client dynamically optimizes the HUD layout from multiple dimensions such as visibility, position, size, level, etc.

[0202] In the embodiments of the present application, the adjustment ideas of the HUD element in the visibility dimension include but are not limited to: for non-key elements with low priority (such as 1-2 points), consider hiding or folding when the interface space is insufficient, and reduce the distraction of the player's attention. For key elements with high priority (such as 4-5 points), always keep resident display, and if necessary, can expand the display size to ensure that information acquisition is not affected.

[0203] Example: In the intense battle scene, non-core elements such as skill description and achievement progress can be temporarily hidden, and interface resources are given to key information such as character blood volume and skill CD.

[0204] In the embodiments of the present application, the adjustment ideas of the HUD element in the size dimension include but are not limited to: important elements with high priority are automatically adjusted to the eye-catching position of the interface, such as the center of the near field of view, the golden triangle area, etc., and the display size is appropriately enlarged.

[0205] In the embodiments of the present application, HUD elements with similar priority are aggregated as much as possible to facilitate the player to quickly read and associate. Example: In the boss battle scene, key elements such as boss blood bar and remaining time are automatically placed in the center of the near field of view, and the size is appropriately enlarged; player blood and blue bar, skill shortcut bar, etc. are aggregated in the lower left corner to avoid being too scattered.

[0206] In the embodiments of the present application, the adjustment ideas of the HUD element in the element level dimension include but are not limited to: interface elements automatically adjust the front and back blocking relationship according to the priority score, ensure that the key information is in the top layer, and is not covered by other secondary elements, thereby improving the information acquisition efficiency of the game player.

[0207] Elements of the same level follow the "first come, first served" principle, and newly appearing elements cannot block the display of elements of the same level. Example: In the battle scene, the player character blood bar is always in the top layer and will not be blocked by skill effects, floating words, etc.; the newly appearing pickup prompt cannot block the display of the skill CD number.

[0208] The method for adjusting display of HUD elements in a game provided by the embodiments of the present application first acquires a scene description text of a game scene currently occupied by a virtual character and a HUD element description text of a HUD element on a current game interface. Then, a first prompt template is instantiated according to the scene description text and the HUD element description text, and a target prompt is obtained after instantiation. The first prompt template is used to set a format of input data of a target prediction model, and the target prediction model is used to predict display priority information of the HUD element. Then, the target prompt is input into the target prediction model, and the display priority information of the HUD element output by the target prediction model is obtained. Finally, the HUD element on the game interface is adjusted in display according to the display priority information. Based on the scene description text of the game scene currently occupied by the virtual character and the HUD element description text of the HUD element on the current game interface, the display priority information of the HUD element output by the target prediction model. Based on the display priority information of the HUD element, the HUD element on the game interface is adjusted in display. In the embodiments of the present application, the display priority of the HUD element dynamically changes according to the game scene, and an intelligent dynamic adjustment mechanism is adopted, which can adapt to the dynamically changing information needs of the player in real time, avoids misalignment between information provided by the HUD interface and actual needs of the player, enables the player to timely and quickly obtain key information, and promotes operation judgment and improves reaction speed.

[0209] On the basis of the above-mentioned second embodiment, the method for adjusting display of HUD elements in a game provided by the second embodiment of the present application is further described.

[0210] In an optional implementation, a possible implementation of the step S240 of adjusting display of the HUD element on the game interface includes the step S242.

[0211] S242, adjusting color collocation, alignment mode and spacing ratio between the HUD elements.

[0212] In the embodiments of the present application, in terms of color collocation, the formulation of the overall color collocation scheme of the HUD needs to comprehensively consider factors such as a main color tone of a game picture, an emotional atmosphere and the like, and a color system that is coordinated with the main picture and has suitable light and shade contrast is selected. Under the premise of maintaining overall harmony, individual HUD elements can use slightly contrasting colors, such as a yellow flashing life value warning, a red attack skill icon and the like, to prompt the player about the special importance of the element through color change. For a large amount of text information, attention should be paid to contrast between a background color and a text color to meet the needs of barrier-free reading.

[0213] In the embodiments of the present application, in terms of alignment, the alignment within the HUD sub-module should be left-aligned or right-aligned in pursuit of visual simplicity and unity, depending on the specific layout requirements. The text descriptions and numbers of different fields are suggested to use fixed-width fonts to maintain uniformity and facilitate players to quickly obtain information. The alignment (up, down, left, and right) of adjacent HUD elements should be consistent, and diagonal cutting should be avoided to prevent unevenness.

[0214] In the embodiments of the present application, in terms of spacing ratio, the spacing between the HUD modules and the elements within the modules should be moderate to provide appropriate visual buffer for players. Typically, 2% of the width of the display area is used as the base unit, and the inner and outer margins of the elements can be set in multiples based on this base unit. The low-priority explanatory text is set to a smaller font size (not less than the minimum font size specified by the game), and the spacing with icons and numbers is increased to avoid overshadowing.

[0215] Next, the display adjustment of the HUD elements according to the display priority of the HUD elements will be described by way of example. Figure 3 Figure 3 The schematic diagram of the HUD elements before and after adjustment provided by one of the embodiments of the present application is shown in the following figure.

[0216] As shown in the figure, Figure 3 Before adjustment, the health bar, compass, task, and skill icon are displayed, and the game buff icon (i.e., game buff, a kind of "magic" or "effect" that enhances the character's ability) is displayed in a small size. After the multi-dimensional layout optimization of the HUD elements on the HUD interface, the user interface is immediately reflected. After adjustment, the health bar layer is always displayed on the top layer, the compass and task are hidden, the game buff icon is enhanced (i.e., the display size of the game buff icon is increased), and the skill icon is displayed as a group of dots by icon folding. After the display adjustment of the HUD elements, the user perceives the intelligent HUD elements that match the game rhythm, are efficient in information acquisition, and are aesthetically pleasing.

[0217] In an alternative embodiment, one possible implementation of the above step S240 "display adjustment of the HUD elements on the game interface" includes the following step S243:

[0218] S243, in response to satisfying a preset condition, display adjustment of the HUD elements on the game interface. The preset condition includes at least one of the following: a preset time-driven condition and a preset event-driven condition.

[0219] ​In this embodiment, the triggering mechanism can be based on a preset time-driven condition, a preset time-driven condition, or a combination of both, to trigger adjustments to the HUD elements on the game interface based on the game scene. Specifically, a preset time-driven condition, such as high-frequency periodic triggering (e.g., every second), can ensure that the HUD interface display responds in real time to changes in the scene. This is supplemented by an event-driven triggering mechanism, which allows for targeted optimization of the HUD elements at key game nodes. The two triggering mechanisms are combined.

[0220] The HUD element display adjustment device in the game provided in this application will be described below. The HUD element display adjustment device in the game described below can be referred to in correspondence with the HUD element display adjustment method in the game described above.

[0221] Figure 4 This is a schematic diagram of the structure of a HUD element display adjustment device in a game provided in the third embodiment of this application. Figure 4 As shown, the HUD element display adjustment device 400 in the game includes: a first acquisition module 401, a first processing module 402, a prediction module 403, and an adjustment module 404.

[0222] The first acquisition module is used to acquire the scene description text of the game scene where the virtual character is currently in and the HUD element description text of the HUD element on the current game interface.

[0223] The first processing module is used to instantiate a first prompt template based on the scene description text and the HUD element description text. The instantiated target prompt is used to set the format of the input data of the target prediction model. The target prediction model is used to predict the display priority information of the HUD element.

[0224] The prediction module is used to input the target prompt into the target prediction model to obtain the display priority information of the HUD elements output by the target prediction model;

[0225] The adjustment module is used to adjust the display of HUD elements on the game interface according to the display priority information.

[0226] An optional implementation, characterized in that the adjustment module is specifically used for:

[0227] Based on the display priority information, the display method of each HUD element is determined, and the display method includes at least one of the following: visibility, display position, display size, and display level;

[0228] According to the display manner of each HUD element, the HUD elements on the game interface are displayed and adjusted.

[0229] In an optional implementation, the adjustment module is further configured to:

[0230] adjust the color matching, alignment, and spacing ratio between the HUD elements.

[0231] In an optional implementation, the first prompt template includes a scene description text area, a HUD element description text area, and a question area, and the question area is configured to place question text for inquiring about the display priority of the HUD element.

[0232] In an optional implementation, the first prompt template further includes a scene background knowledge area configured to place scene background knowledge related to the current game scene in which the virtual character is located, and the first obtaining module is further configured to:

[0233] obtain a game knowledge graph including a plurality of nodes and edges connecting two nodes, different nodes being configured to represent different game elements, and the edges being configured to represent semantic associations between the game elements represented by the two connected nodes.

[0234] According to the game knowledge graph and the scene description text, scene background knowledge related to the current game scene in which the virtual character is located is determined.

[0235] In an optional implementation, the adjustment module is further configured to:

[0236] In response to a preset condition being met, the HUD elements on the game interface are displayed and adjusted, and the preset condition includes at least one of a preset time-driven condition and a preset event-driven condition.

[0237] The game HUD element display adjustment apparatus provided in this embodiment can be used to execute the technical solutions of the game HUD element display adjustment method embodiments described above, and has similar implementation principles and technical effects, which will not be described here again.

[0238] Next, the model training apparatus provided in this application is described, and the model training apparatus described below can be correspondingly referred to the model training method described above.

[0239] Figure 5 The structural diagram of the model training apparatus provided in this application is shown in FIG. 5. Figure 5 As shown in the figure, the model training apparatus 500 includes a second obtaining module 501, a second processing module 502, and a training module 503.

[0240] The second obtaining module is configured to obtain a plurality of groups of first training samples, wherein each of the first training samples comprises scene description text of an arbitrary game scene and HUD element description text of a HUD element matched with the game scene;

[0241] The second processing module is configured to instantiate a second prompt template according to the first training sample, so as to obtain a prompt training sample after instantiation, wherein the second prompt template is used to set a format of input data when training a pre-trained language model;

[0242] The training module is configured to train the pre-trained language model according to the prompt training sample, so as to obtain a target prediction model after training, wherein the target prediction model is used to predict a display priority of a HUD element.

[0243] In an optional implementation, the second prompt template comprises a scene description text area, a HUD element description text area, and a question area, wherein the question area is used to place question text for inquiring about the display priority of the HUD element.

[0244] In an optional implementation, the second prompt template further comprises at least one of the following: a scene background knowledge area, wherein the scene background knowledge area is used to place scene background knowledge related to the game scene; and the second obtaining module is further configured to:

[0245] obtain a game knowledge graph, wherein the game knowledge graph comprises a plurality of nodes and edges connecting two nodes, different nodes are used to represent different game elements, and the edges are used to represent semantic associations between the game elements represented by the two connected nodes;

[0246] determine scene background knowledge related to the current game scene according to the game knowledge graph and the scene description text.

[0247] In an optional implementation, the training module is further configured to:

[0248] obtain a plurality of groups of second training samples, wherein each of the second training samples comprises scene description text, HUD element description text of a HUD element on a game interface, and display priority information of the HUD element;

[0249] train the pre-trained language model according to the second training sample.

[0250] The model training apparatus provided in this embodiment can be used to execute the technical solutions of the model training method embodiments, and has similar implementation principles and technical effects, which will not be described here again.

[0251] Figure 6A hardware structure schematic diagram of an electronic device provided by the fifth embodiment of the present application is shown in FIG. 6, which includes a processor 601 and a memory 602. Figure 6 The electronic device 600 includes the processor 601 and the memory 602.

[0252] The memory 602 is configured to store computer-executable instructions.

[0253] The processor 601 is configured to execute the computer-executable instructions stored in the memory to implement each step of the HUD element display adjustment method in the game in the above-mentioned embodiments, or implement the technical solution corresponding to the model training method in any of the above-mentioned embodiments. For details, please refer to the related description in the method embodiments.

[0254] Optionally, the memory 602 can be independent or integrated with the processor 601.

[0255] When the memory 602 is independently arranged, the electronic device further includes a bus 603 for connecting the memory 602 and the processor 601.

[0256] The sixth embodiment of the present application further provides a computer-readable storage medium, which stores computer-executable instructions. When a processor executes the computer-executable instructions, the technical solution corresponding to the HUD element display adjustment method in the game in any of the above-mentioned embodiments or the technical solution corresponding to the model training method in any of the above-mentioned embodiments is implemented.

[0257] The seventh embodiment of the present application further provides a computer program product, which includes a computer program stored in a readable storage medium. At least one processor of an electronic device can read the computer program from the readable storage medium, and the at least one processor executes the computer program to make the electronic device execute the technical solution corresponding to the HUD element display adjustment method in the game in any of the above-mentioned embodiments or the technical solution corresponding to the model training method in any of the above-mentioned embodiments.

[0258] Although the above-mentioned embodiments are disclosed as preferred embodiments, they are not intended to limit the present application. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the protection scope of the present application should be subject to the scope defined by the claims of the present application.

[0259] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other manners. For example, the above-described device embodiments are merely illustrative. For example, the division of the modules is only a logical function division. There can be another division manner for the actual implementation, for example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections can be indirect couplings or communication connections through some interfaces, devices or modules, and can be electrical, mechanical or in other forms.

[0260] The integrated modules with the form of the software functional modules as described above can be stored in a computer readable storage medium. The software functional modules stored in the storage medium can include a number of instructions for enabling an electronic device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform some steps of the methods described in the various embodiments of the present application.

[0261] It should be understood that the processor can be a central processing module (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), etc. The general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the disclosed method can be directly embodied as a hardware processor for execution, or a combination of hardware and software modules in the processor for execution.

[0262] The memory can include a high-speed RAM memory, and can also include a non-volatile storage NVM, such as at least one disk memory, and can also be a U disk, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk, etc.

[0263] The bus can be an industry standard architecture (ISA) bus, a peripheral component (PCI) bus, or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, the bus in the drawings of the present application does not limit to only one bus or one type of bus.

[0264] The storage medium described above can be realized by any type of volatile or nonvolatile storage devices or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general or special purpose computer.

[0265] Those skilled in the art can understand that all or part of the steps of the above-mentioned method embodiments can be completed by program instruction related hardware. The foregoing program can be stored in a computer readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the foregoing storage medium includes various storage media that can store program codes, such as ROM, RAM, magnetic disk or optical disk.

[0266] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for adjusting the display of HUD elements in a game, characterized in that, The method comprises: obtaining a scene description text of a game scene currently occupied by a virtual role and a HUD element description text of a HUD element on a current game interface; instantiating a first prompt template according to the scene description text and the HUD element description text, to obtain a target prompt after instantiation, the first prompt template being used to set a format of a target prediction model input data, the target prediction model being used to predict display priority information of the HUD element; inputting the target prompt into the target prediction model to obtain the display priority information of the HUD element output by the target prediction model; adjusting display of the HUD element on the game interface according to the display priority information.

2. The method of claim 1, wherein, The adjusting display of the HUD element on the game interface according to the display priority information comprises: determining a display mode of each HUD element according to the display priority information, the display mode comprising at least one of the following: visibility, display position, display size, display level; adjusting display of the HUD element on the game interface according to the display mode of each HUD element.

3. The method of claim 2, wherein, The method further comprises: adjusting color matching, alignment mode and spacing ratio between the HUD elements.

4. The method of claim 1, wherein, The first prompt template comprises a scene description text area, a HUD element description text area and a question area, the question area being used to place a question text asking for display priority of the HUD element.

5. The method of claim 4, wherein, The first prompt template further comprises a scene background knowledge area, the scene background knowledge area being used to place scene background knowledge related to the game scene currently occupied by the virtual role; the method further comprises: obtaining a game knowledge graph, the game knowledge graph comprising a plurality of nodes and edges connecting two nodes, different nodes being used to represent different game elements, and the edges being used to represent semantic association between the game elements represented by the two connected nodes; determining scene background knowledge related to the game scene currently occupied by the virtual role according to the game knowledge graph and the scene description text.

6. The method of claim 1, wherein, The adjusting display of the HUD element on the game interface comprises: adjusting display of the HUD element on the game interface in response to satisfaction of a preset condition; the preset condition comprising at least one of the following: a preset time-driven condition and a preset event-driven condition.

7. A model training method, comprising: The method comprises: obtaining a plurality of groups of first training samples, the first training sample comprising scene description text of any game scene and HUD element description text of a HUD element matched with the game scene; instantiating a second prompt template according to the first training sample, to obtain a prompt training sample after instantiation, the second prompt template being used to set a format of input data when training a pre-trained language model; training the pre-trained language model according to the prompt training sample, to obtain a target prediction model after training, the target prediction model being used to predict display priority of a HUD element.

8. The method of claim 7, wherein, The second prompt template comprises a scene description text area, a HUD element description text area, and a question area for placing question text inquiring about the display priority of the HUD element.

9. The method of claim 8, wherein, The second prompt template further comprises at least one of the following: a scene background knowledge area for placing scene background knowledge related to the game scene; and the method further comprises: obtaining a game knowledge graph comprising a plurality of nodes and edges connecting two nodes, different nodes being used to represent different game elements, and the edges being used to represent semantic associations between the game elements represented by the two connected nodes; determining scene background knowledge related to the game scene according to the game knowledge graph and the scene description text.

10. The method of claim 7, wherein, Before the training is completed to obtain the target prediction model, the method further comprises: obtaining a plurality of sets of second training samples, the second training samples comprising scene description samples, HUD element description text of a HUD element on a game interface, and display priority information of the HUD element; training the pre-trained language model according to the second training samples.

11. A HUD element display adjustment device for a game, characterized in that, The apparatus comprises: a first obtaining module configured to obtain scene description text of a game scene in which a virtual character is currently located and HUD element description text of a HUD element on a current game interface; a first processing module configured to instantiate a first prompt template according to the scene description text and the HUD element description text, the first prompt template being used to set a format of input data of a target prediction model, the target prediction model being used to predict display priority information of the HUD element; a prediction module configured to input the target prompt into the target prediction model to obtain the display priority information of the HUD element output by the target prediction model; an adjustment module configured to perform display adjustment on the HUD element on the game interface according to the display priority information.

12. A model training apparatus, comprising: The apparatus comprises: a second obtaining module configured to obtain a plurality of sets of first training samples, the first training samples comprising scene description text of any game scene and HUD element description text of a HUD element matching the game scene; a second processing module configured to instantiate a second prompt template according to the first training samples, the second prompt template being used to set a format of input data when training a pre-trained language model, and obtain a prompt training sample after instantiation; a training module configured to train a pre-trained language model according to the prompt training sample, and obtain a target prediction model after the training is completed, the target prediction model being used to predict display priority of a HUD element.

13. An electronic device, comprising: The electronic device comprises: a processor; and A memory for storing a data processing program, after the electronic device is powered on and the program is run by the processor, the game HUD element display adjustment method according to any one of claims 1-6 is executed, or the model training method according to any one of claims 7-10 is executed.

14. A computer-readable storage medium, characterized in that, A memory for storing a data processing program, after the electronic device is powered on and the program is run by the processor, the game HUD element display adjustment method according to any one of claims 1-6 is executed, or the model training method according to any one of claims 7-10 is executed.

Citation Information

Patent Citations

  • Method and system for implementing window local modal in game

    CN101441559A

  • Vehicle interaction method and device, electronic equipment, storage medium and vehicle

    CN117235320A