Game content element generation method and apparatus, storage medium, and computer device
Patent Information
- Application Number
- CN202610948901.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-26
- Publication Date
- 2026-09-08
AI Technical Summary
[0003]本申请的目的旨在至少能解决上述的技术缺陷之一,特别是现有技术中随着游戏内容规模不断扩大,资源种类和数量持续增加,人工完成资源选择和内容构建的工作量较大,生成效率较低,难以快速构建符合需求的游戏内容元素的技术缺陷
[0057]本申请提供的游戏内容元素的生成方法、装置、存储介质及计算机设备,先获取故事文本,并对故事文本进行语义分析,得到游戏内容关键词集合,从而将原本需要人工理解和提取的内容需求转化为游戏内容关键词;进一步地,将游戏内容关键词集合映射至预设的资源库及内容描述模板库,自动确定与游戏内容需求相匹配的目标资源及目标模板,无需开发人员从大量角色、场景、任务、道具等游戏资源中逐一进行筛选、组合和配置;随后,基于目标资源及目标模板生成游戏内容元素,实现游戏内容元素的自动构建。由此,通过建立游戏内容关键词与资源库、内容描述模板库之间的映射关系,利用已有游戏资源和模板完成游戏内容元素的自动生成,减少了人工参与资源选择和内容构建的工作量,提高了游戏内容元素的生成效率和资源利用效率,能够在游戏资源种类和数量持续增加的情况下,快速构建符合内容需求的游戏内容元素,从而提升游戏内容开发和扩展的效率。
Smart Images

Figure CN122702149A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of human-computer interaction technology, and in particular to a method, apparatus, storage medium, and computer device for generating game content elements. Background Technology
[0002] Game content elements are the essential foundation for game operation and presentation, including virtual characters, scene maps, quests and events, items and equipment, and interactive objects. In current game development processes, game content elements such as characters, scenes, quests, and items typically require developers to select, combine, and configure from a large pool of game resources to construct the corresponding game content. As the scale of game content continues to expand, and the types and quantities of resources increase, the workload of manually selecting resources and constructing content becomes substantial, resulting in low efficiency and making it difficult to quickly create game content elements that meet specific requirements. Summary of the Invention
[0003] The purpose of this application is to at least address one of the aforementioned technical deficiencies, particularly the technical deficiency in the prior art where, as the scale of game content continues to expand and the types and quantities of resources continue to increase, the workload of manually completing resource selection and content construction is large, the generation efficiency is low, and it is difficult to quickly construct game content elements that meet the requirements.
[0004] Firstly, this application provides a method for generating game content elements, the method comprising:
[0005] Obtain the story text and perform semantic analysis on it to obtain a set of keywords for the game content;
[0006] Map the set of game content keywords to a preset resource library and content description template library to determine the corresponding target resources and target templates;
[0007] Based on the target resources and target template, generate game content elements.
[0008] Optionally, semantic analysis is performed on the story text to obtain a set of game content keywords, including:
[0009] The large language model is used to perform semantic analysis on the story text, identify multiple game content keywords, the confidence level of each game content keyword, and the corresponding text fragments.
[0010] A set of game content keywords is generated based on each game content keyword, its corresponding confidence level, and text fragments.
[0011] Optionally, a set of game content keywords is generated based on each game content keyword, its corresponding confidence level, and text fragments, including:
[0012] Based on the confidence level of each game content keyword, the game content keywords are filtered to determine the target keywords;
[0013] Based on the contextual information of each target keyword in the corresponding text fragment, determine the keyword category corresponding to each target keyword;
[0014] Generate a set of game content keywords based on each target keyword and its corresponding keyword category.
[0015] Optionally, the set of game content keywords is mapped to a preset resource library and content description template library to determine the corresponding target resources and target templates, including:
[0016] Based on the keyword categories in the game content keyword set, retrieve the corresponding candidate resources from the preset resource library and the corresponding candidate templates from the preset content description template library;
[0017] Based on the matching relationship between each candidate resource and each candidate template, the target resource and target template are determined.
[0018] Optionally, the target resource and target template are determined based on the matching relationship between each candidate resource and each candidate template, including:
[0019] Each candidate resource is combined with a candidate template to obtain multiple resource template combinations;
[0020] Calculate the matching degree between the resource tags of the candidate resources and the template tags of the candidate templates in each resource template combination;
[0021] Based on each matching degree, the target resource and target template are determined in each resource template combination.
[0022] Optionally, based on each matching degree, the target resource and target template are determined in each resource template combination, including:
[0023] Resource cost is evaluated for resource template combinations with a matching degree exceeding a preset threshold, and the target resource and target template are determined from the resource template combinations with the lowest resource cost.
[0024] Optionally, based on the target resources and target template, game content elements are generated, including:
[0025] Generate initial game content element configurations based on target resources and target templates;
[0026] In response to the adjustment request for the initial game content element configuration, the initial game content element configuration is adjusted to obtain the adjusted configuration;
[0027] Based on the adjusted configuration, game content elements are generated.
[0028] Optionally, based on the target resources and target template, an initial game content element configuration is generated, including:
[0029] Parse the target template to determine the corresponding configuration items;
[0030] Analyze the target resource and determine the initial configuration parameters corresponding to each configuration item;
[0031] Based on the initial configuration parameters, generate the initial game content element configuration.
[0032] Optionally, the target resource is parsed to determine the initial configuration parameters corresponding to each configuration item, including:
[0033] Obtain the default configuration table of the target resource;
[0034] The default parameter values for each configuration item are retrieved from the default configuration table and used as the initial configuration parameters.
[0035] Optionally, in response to an adjustment request for the initial game content element configuration, the initial game content element configuration is adjusted to obtain an adjusted configuration, including:
[0036] In response to adjustments made to the target configuration item, obtain the adjustment parameters;
[0037] Based on the adjusted parameters, the initial game content element configuration corresponding to the target configuration item is updated to obtain the adjusted configuration.
[0038] Optionally, based on the adjustment parameters, the initial game content element configuration corresponding to the target configuration item is updated to obtain the adjusted configuration, including:
[0039] The adjustment parameters are validated based on the parameter constraint rules corresponding to the target configuration item;
[0040] When the verification passes, the initial configuration parameters corresponding to the target configuration item are updated using the adjusted parameters to obtain the adjusted configuration.
[0041] Optionally, based on the adjusted configuration, game content elements are generated, including:
[0042] Determine the target resource components according to the adjusted configuration;
[0043] If the target resource component is a non-character resource, then the game content elements are generated by combining and rendering based on the target resource component.
[0044] If the target resource component is a character resource, then the game content elements are generated by combining and rendering based on the target resource component, and the element descriptions corresponding to the game content elements are generated according to the target template.
[0045] Optionally, the method further includes:
[0046] A preview interface showcasing game content elements;
[0047] In response to editing operations on game content elements on the preview interface, determine the editing parameters;
[0048] Based on the editing parameters, the game content elements are re-rendered and the display results are updated.
[0049] Secondly, this application provides a device for generating game content elements, the device comprising:
[0050] The keyword set determination module is used to acquire story text and perform semantic analysis on the story text to obtain a set of game content keywords;
[0051] The resource template mapping module is used to map the set of game content keywords to a preset resource library and content description template library to determine the corresponding target resources and target templates;
[0052] The game content element generation module is used to generate game content elements based on target resources and target templates.
[0053] Thirdly, this application provides a storage medium storing computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of any of the game content element generation methods described in the above embodiments.
[0054] Fourthly, this application provides a computer device, including: one or more processors, and a memory;
[0055] The memory stores computer-readable instructions, which, when executed by one or more processors, perform the steps of any of the game content element generation methods described in the above embodiments.
[0056] As can be seen from the above technical solutions, the embodiments of this application have the following advantages:
[0057] The method, apparatus, storage medium, and computer equipment for generating game content elements provided in this application first acquire the story text and perform semantic analysis on it to obtain a set of game content keywords, thereby transforming the content requirements that originally required manual understanding and extraction into game content keywords. Further, the set of game content keywords is mapped to a preset resource library and content description template library, automatically determining target resources and templates that match the game content requirements. This eliminates the need for developers to manually select, combine, and configure numerous game resources such as characters, scenes, tasks, and items. Subsequently, game content elements are generated based on the target resources and templates, achieving automatic construction of game content elements. Thus, by establishing a mapping relationship between game content keywords and resource libraries and content description template libraries, and utilizing existing game resources and templates to automatically generate game content elements, the workload of manual resource selection and content construction is reduced, improving the efficiency of game content element generation and resource utilization. This allows for the rapid construction of game content elements that meet content requirements even as the types and quantities of game resources continue to increase, thereby improving the efficiency of game content development and expansion. Attached Figure Description
[0058] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0059] Figure 1 This is a schematic diagram of the application architecture provided for an embodiment of this application;
[0060] Figure 2 A flowchart illustrating the method for generating game content elements provided in this application embodiment;
[0061] Figure 3 Example diagram of a story text input interface provided in the embodiments of this application;
[0062] Figure 4 Example diagram of the initial game content element configuration provided in the embodiments of this application;
[0063] Figure 5 Example diagram of a floating panel for selecting weapon models provided in embodiments of this application;
[0064] Figure 6 One of the example images of the game content element preview interface provided in the embodiments of this application;
[0065] Figure 7Example diagram two of the game content element preview interface provided in the embodiments of this application;
[0066] Figure 8 A schematic diagram of the structure of the device for generating game content elements provided in the embodiments of this application;
[0067] Figure 9 This is a schematic diagram of the internal structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0068] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0069] As the gaming industry continues to expand, the quantity and complexity of game content elements are growing exponentially. Traditional manual selection, combination, and configuration methods are not only time-consuming and labor-intensive, but also struggle to quickly respond to diverse content demands. To address this, this application proposes an automated generation scheme for game content elements. By establishing an intelligent mapping link from story text to game resources, the resource selection process, which originally relied on manual experience, is transformed into a data-driven automated process, thereby significantly improving generation efficiency while ensuring content quality. The technical solution of this application will be described in detail below with reference to specific embodiments.
[0070] Please refer to Figure 1 , Figure 1 This is a schematic diagram of the application architecture provided in this application embodiment. The architecture includes a server 110 and a client 120. The server 110 can be a standalone physical server, a server cluster, or a cloud server, mainly used to store preset resource libraries and content description template libraries, and to execute core logic, including semantic analysis of story text, keyword mapping, resource and template matching, and generation and assembly of game content elements. The client 120 can be a terminal device such as a smartphone, tablet, or personal computer. Content planners can input story text and trigger content generation instructions through the client. The server and client establish a communication connection through a network. The client sends the story text to be processed and the generation request to the server. After the server completes the processing, it returns the generated game content elements to the client for planners to preview, adjust, or directly import into the game engine. It is understood that the above method can run entirely on the server, or some calculation steps can be deployed locally on the client. The specific operating mode can be adjusted according to the actual scenario, and is not limited here.
[0071] To make the technical solution of this application clearer and easier to understand, the key terms involved in the text are defined below.
[0072] Game content elements refer to the basic or combined units that constitute playable game content, including virtual characters, scene maps, quests and events, items and equipment, and interactive objects. A game content element can be a single resource instance or a composite content consisting of multiple resources.
[0073] Story text refers to natural language text that describes the game's content requirements. It is written by game planners based on the game design requirements and can be in the form of short sentences, paragraphs, or multi-line descriptions. It implicitly contains multiple content elements such as scenes, characters, and mission objectives.
[0074] The game content keyword set is structured data extracted after semantic analysis of the story text. Each keyword can be accompanied by attribute information such as type, name, confidence level, and text fragment.
[0075] The default resource library is a collection of game resources pre-stored on the server, including reusable assets such as character models, scene prefabs, item icons, and skill effects. Each resource is tagged when it is added to the library for subsequent matching.
[0076] The content description template library is a collection that stores structured content description templates. Each template defines the skeleton of a certain type of game content element, including the attribute fields, field types, and placeholders required for that type of content. The placeholders in the template will be filled in later by specific resource instances matched from the resource library.
[0077] Target resources refer to one or more resource instances selected from the resource library that match the set of game content keywords. Target templates refer to templates selected from the content description template library that match the type of game content element to be generated. This application automatically determines target resources and target templates through keyword-to-tag mapping, and then fills in the resources based on the template structure to generate complete game content elements.
[0078] like Figure 2 As shown, this application provides a method for generating game content elements, which includes the following steps:
[0079] S110: Obtain the story text and perform semantic analysis on the story text to obtain a set of game content keywords.
[0080] In this step, server 110 first obtains the story text to be processed. The source of this story text can be diverse, such as original stories input by content planners through client 120, preset plot text built into server 110, novel excerpts imported from third-party literary platforms, or narrative content dynamically generated based on the user's historical game behavior. For example... Figure 3 As shown, when a planner clicks the "Import Story" button, pastes text into the input box, or completes tasks such as writing an adventure log on the story input interface of client 120, they can also clear the text box and re-enter the text. After confirming the story text content, the planner clicks the "Submit" button, and client 120 sends a story text retrieval request to server 110. Upon receiving the request, server 110 retrieves the corresponding story text data and temporarily stores it in memory for semantic analysis.
[0081] It is understood that the story text described in this application refers to natural language text containing descriptions of plot, characters, environment, or events, and its length is not limited, ranging from a single sentence to a complete novel chapter. These texts implicitly contain key elements needed to construct game content, such as character types, item names, scene attributes, or mission objectives. Server 110, through semantic analysis of the text, can automatically extract a structured set of game content keywords, thereby transforming the narrative material provided by the planners into configurable game resources.
[0082] In the specific implementation of semantic analysis, the server 110 adopts natural language processing technologies, including word segmentation, part-of-speech tagging, named entity recognition, dependency syntactic analysis, and semantic role labeling based on pre-trained language models. For example, when a planner inputs a piece of text for an overhead story with a background of separatist regime among rival powers, such as "On the divided Cangyuan Continent, Shen Yi, the young commander of the Iron Banner Army, leads the exhausted defending troops to retreat to Yanmen Pass. He needs to secretly contact the Jinjiang Alliance in the south and raise enough cold iron ore from the occupied areas to cast cloud-piercing crossbow bolts", the server 110 will execute a complete semantic analysis process. Firstly, named entity recognition extracts the character entity "Shen Yi, the young commander of the Iron Banner Army", the faction entities "Iron Banner Army" and "Jinjiang Alliance", the scene entity "Yanmen Pass", the item entities "cold iron ore" and "cloud-piercing crossbow bolts", and the action entities include "lead", "retreat to", "contact", "raise" and "cast". Then dependency syntactic analysis reveals the attribute modification relationship: for example, "young" modifies "commander", "exhausted" modifies "defending troops", "secretly" modifies the behavior mode of "contact", and "enough" serves as the quantity attribute of "cold iron ore". The word segmentation and part-of-speech filtering step filters out stop words with no practical meaning such as "of", "了" (past tense marker in the original Chinese), "on" and retains content words such as nouns, verbs and adjectives. After the above analysis, the server 110 generates a structured set of game content keywords, in which it is distinguished that the military commander character is Shen Yi with the young attribute, the faction relationship is the alliance intention between the Iron Banner Army and the Jinjiang Alliance, the military supplies are cold iron ore and cloud-piercing crossbow bolts, the strategic actions are retreat and secret contact, and the scene is positioned at Yanmen Pass. This set can be stored in the server 110 in the form of key-value pairs, label vectors or graph database nodes, which is convenient for conversion into specific game resources in subsequent steps, such as generating military commander characters, cross-faction tasks or weapon forging formulas.
[0083] Furthermore, Server 110 supports configuration of multiple keyword types. Based on the game system's requirements, the game content keyword set must include at least one or a combination of the following categories: character keywords such as commander or strategist; item keywords such as cold iron ore or cloud-piercing crossbow bolts; scene keywords such as Yanmen Pass or occupied territory; action keywords such as communication or forging; attribute keywords such as young or tired; and faction keywords such as Iron Flag Army or Jinjiang Alliance. Each type of keyword corresponds to a different resource template in the game system. To improve the accuracy and flexibility of keyword extraction, Server 110 can combine preset game domain dictionaries for enhanced matching. For example, in a fictional war strategy game, Server 110 has a built-in general dictionary containing commander, general, and vanguard; a weaponry dictionary containing crossbow bolts, armor, and siege rams; and a faction dictionary containing army, alliance, and empire. When the story text contains the phrase "Shen Yi, the young commander of the Iron Flag Army, forges the Cloud-Piercing Crossbow," server 110 will prioritize matching "Shen Yi" as a military general keyword and adding "young" as an attribute tag, while matching "Cloud-Piercing Crossbow" as a weaponry keyword and adding the special effect tag "Cloud-Piercing." For rare words or self-coined words not included in the dictionary, server 110 will calculate the cosine similarity of word vectors and classify them into the closest category.
[0084] In terms of user interaction, after completing semantic analysis, server 110 sends the initially extracted keyword set to client 120. Client 120 presents candidate keywords in its graphical user interface in the form of a tag cloud or list. Designers can click to confirm and accept the results extracted by server 110, or manually add missing keywords such as "occupied area" or delete incorrectly extracted words. If designers do not intervene within a preset time, such as thirty seconds, client 120 automatically confirms the current keyword set and sends the confirmation result back to server 110, which then proceeds to the next processing step. This semi-automated design reduces the configuration burden on designers while retaining their control over game content generation.
[0085] In handling boundary cases, server 110 can cope with various special scenarios. If the planner does not input any story text or the text only contains meaningless symbols, server 110 will return an empty keyword set to client 120 and prompt the planner to re-enter the keywords. If the number of extracted keywords is less than a preset threshold, such as less than three, server 110 will activate an expansion mode, supplementing relevant keywords based on existing keywords through association rules or external knowledge bases. For example, it might associate "commander" with "warhorse" and "commander's flag," or associate "casting" with "blacksmith shop" and "mold," and then generate a supplementary list to send to client 120 for planner confirmation. For words with multiple meanings, such as "iron" which can refer to both metal and weapon material, server 110 will select the interpretation with the highest probability based on the semantic confidence of the context, while sending alternative options to client 120 for planners to manually correct. Through the semantic analysis process described above, server 110 converts the original story text into a structured set of game content keywords, providing a standardized and scalable data foundation for the subsequent generation of game resources such as virtual characters, tasks, and items, enabling planners to drive the dynamic construction of the game world through simple story descriptions.
[0086] S120: Map the set of game content keywords to the preset resource library and content description template library to determine the corresponding target resources and target templates.
[0087] In this step, after completing the semantic analysis of the story text and obtaining a set of game content keywords, server 110 further maps this keyword set to a preset resource library and content description template library, thereby automatically determining the target resources and target templates that match the story text. Server 110 internally maintains two core databases. One is the resource library, which stores a large number of reusable game resources that have been developed, such as 3D models of virtual characters, prefabs of scene maps, icons and effects of props, skill animations, etc. Each resource is tagged with category tags and attribute tags when it is entered into the library. For example, general character resources may have tags such as "character", "general", "sword", "heavy armor", etc., and weapon resources may have tags such as "item", "weapon", "crossbow", "armor penetration", etc. Secondly, there is a content description template library, which stores structured content description templates. Each template defines the skeleton of a certain type of game content element, including the attribute fields, field types, and placeholders required for that type of content. For example, a general character template may include fields such as name, faction, weapon type, and skill description, with specific values or resource references left as placeholders for later filling.
[0088] When server 110 performs mapping, it first compares each keyword in the game content keyword set with the resource tags in the resource library. For example, the keyword "young commander" can be matched with resource instances in the resource library that have tags such as "commander," "young," and "general," selecting the resource with the most matching tags as a candidate. If there are multiple candidate resources in the same category, server 110 can sort them according to the order of appearance of the keywords in the story text or their collocation with other keywords. For example, if the story text explicitly mentions "cloud-piercing crossbow," then resources with tags containing "crossbow" and the "cloud-piercing" effect will be matched first. For keywords that cannot be directly matched, server 110 can trigger a fuzzy matching mechanism, expanding through synonyms or merging tags at higher levels. For example, if "cold iron ore" is not precisely matched in the resource library, then resources of the higher-level "ore" category can be matched, or based on the collocation of the complete phrase "forging cloud-piercing crossbows," "iron ingots" can be automatically deduced as the alternative resource to be matched. After the target resources are determined, server 110 generates a list of target resources, which includes one or more resource instances selected from the resource library. Each instance is accompanied by information such as its storage path, resource type, and matching keywords.
[0089] Meanwhile, server 110 maps the set of game content keywords to a content description template library to determine the most suitable target template. The mapping is based on the types of content elements implicit in the keyword set. For example, if the keyword set contains general characters like Shen Yi, faction relationships like the Iron Flag Army and the Jinjiang Alliance, strategic actions like liaison and forging, and military supplies like Cold Iron Ore and Cloud Piercing Crossbows, server 110 can determine that the content element to be generated belongs to "composite content of faction conflict" and select the corresponding "faction mission template" or "general alliance template" from the template library accordingly. If the keyword set contains only an isolated character keyword without other related elements, server 110 selects a "single character template." Template selection can also be based on the distribution of keywords. For example, when the keywords "forging," "cold iron ore," and "cloud piercing crossbows" appear simultaneously, the "equipment forging template" is prioritized over the general "item template." Server 110 also supports multiple template combinations; that is, when the story text contains multiple independent plots, multiple content intentions can be extracted, and a corresponding template can be matched for each intention. For example, "Shen Yi led the garrison to retreat to Yanmen Pass" matches the "Military Operation Template," "Secretly contacting the Jinjiang Alliance" matches the "Diplomatic Event Template," and "Raising Cold Iron Ore to Forge Cloud Piercing Crossbows" matches the "Production Task Template." These templates will be processed in parallel, and after being populated with resources, they will be merged into a complete set of content elements.
[0090] During the matching process between target resources and target templates, server 110 also performs consistency checks to ensure compatibility between resources and templates. For example, if the target template is a "general character template" and requires placeholders to be filled including character models, weapon models, and skill effects, server 110 needs to filter resource instances of type "character model," "weapon model," and "skill effect" from the target resource list. If a certain type of resource is missing, an auto-completion mechanism will be activated, generating a new resource request based on existing keywords or selecting a default resource from the resource library. Similarly, if the template requires the faction field to be two opposing forces, but the story text only mentions one faction keyword, server 110 can automatically generate a placeholder for the opposing faction or prompt the planner to supplement the input. After the verification is successful, server 110 establishes an association between the target resources and the target template, generating a mapping result data structure. This structure contains the template identifier, template type, target resource identifiers corresponding to each placeholder, and optional parameters that have not yet been filled.
[0091] After completing the mapping, server 110 sends the determined list of target resources and target template information to client 120. Client 120 displays the mapping results visually in a graphical user interface, such as listing candidate resources in card format for designers to preview, or displaying the skeleton structure before filling through a template preview window. Designers can confirm the automatic matching results, manually replace a target resource with other alternatives in the resource library, or adjust the template type. If the designer does not perform any operation within a preset time, client 120 automatically confirms the current mapping results and sends them back to server 110, which then proceeds to the subsequent content element assembly steps. Through this dual mapping mechanism from keywords to resources and templates, server 110 quickly transforms the story text described in natural language into resource references and content structures that can be directly used by the game engine, achieving efficient and automated conversion from ideas to assets.
[0092] S130: Generate game content elements based on target resources and target templates.
[0093] In this step, after mapping the game content keyword set to the target resources and target templates, server 110 further fills the target resources into the corresponding placeholders in the target templates, thereby generating complete game content elements. Server 110 first obtains the target resource list and target template determined in step S120. The target template defines the structured skeleton of a certain type of game content element, which contains multiple field placeholders to be filled. For example, a general character template may contain character name placeholders, faction affiliation placeholders, weapon model placeholders, skill description placeholders, and attribute value placeholders. The target resource list provides specific instances that can be filled, such as Shen Yi's character model resources, the Iron Flag Army's faction flag texture, the Cloud Piercing Crossbow's weapon model, and the corresponding skill effect resources.
[0094] When server 110 performs the population, it fills in the corresponding placeholders for each target resource according to the field mapping rules defined in the target template. The mapping rules are based on the matching relationship between resource tags and template field types. For example, if the weapon model placeholder in the template requires a resource instance with the tags "weapon" and "model", server 110 will select the Cloud Piercing Crossbow model resource that meets the condition from the target resource list and fill it in. For name-type fields, such as the character name "Shen Yi" or the faction name "Iron Flag Army", server 110 directly extracts the corresponding text string from the keyword set and fills it in the placeholder without matching from the resource library. For attribute value-type fields, such as a general's attack power, defense power, or skill cooldown time, server 110 can automatically calculate according to preset value generation rules, such as generating basic attribute values based on the character type and the strength described in the story text. If there are optional fields in the template, such as whether a character has a mount or special passive skills, server 110 can decide whether to fill in specific content or leave it blank based on whether the keyword set contains relevant keywords.
[0095] During the population process, server 110 also performs combination and assembly, especially when the target template is a composite template. For example, in step S120, three independent templates may be matched for the story text: a military action template, a diplomatic event template, and a production task template. Server 110 needs to populate these three templates separately, and then assemble the generated content elements into a composite game content element according to the plot order or logical relationship of the story text. For example, after populating the military action template, a level event of "retreating to Yanmen Pass" is generated; the diplomatic event template generates a side quest of "secretly contacting the Jinjiang Alliance"; and the production task template generates a crafting recipe of "collecting cold iron ore to forge the Cloud Piercing Crossbow". Server 110 associates these elements with the same general, Shen Yi, forming a complete plot chain, and packages this plot chain into a composite content element for direct import into the game later. During assembly, server 110 can also automatically generate reference relationships between elements. For example, the "Cloud Piercing Crossbow" weapon forged in the production task can be used as equipment for the defending army in military operations, and the "Jinjiang Alliance" reinforcements successfully formed in the diplomatic event can be used as a triggerable reinforcement condition for retreating to the pass.
[0096] After server 110 completes the population and assembly, it generates one or more complete game content element instances. Each instance includes resource reference paths, populated attribute values, text descriptions, and relationships between elements. Server 110 then sends these game content elements to client 120. Client 120 displays the generated results in a graphical user interface in a visual format, such as displaying generated general characters, quest events, and crafting recipes as a card list, and provides a preview function. Designers can view the 3D model of characters, preview the dialogue text of quests, or the attribute panel of weapons. Designers can fine-tune the generated content elements, such as modifying an attribute value, replacing a resource, or adjusting the order of events. If the designer confirms that everything is correct, client 120 sends the final version back to server 110. Server 110 exports the game content elements in a format recognizable by the game engine, such as a JSON configuration file or resource package, and stores it in the game content library for later use.
[0097] In handling boundary cases, server 110 can resolve resource missing or template mismatch issues that occur during the filling process. If the resource type required by a placeholder does not exist in the target resource list, server 110 will activate the default resource filling mechanism. For example, if a general character lacks skill effects, the system will automatically fill in the common "basic attack effects". If any required field in the template cannot be obtained from the keyword set or resource list, server 110 will mark the field as needing to be supplemented and highlight it when sending it to client 120 to prompt the planner to fill it in manually. Through the above filling and assembly process, server 110 transforms discrete target resources and abstract target templates into concrete and usable game content elements, realizing the final generation from a structured keyword set to complete game assets, providing game development with efficient and automated content creation capabilities.
[0098] In the above embodiments, the story text is first acquired and semantically analyzed to obtain a set of game content keywords, thereby transforming the content requirements that originally required manual understanding and extraction into game content keywords. Further, the set of game content keywords is mapped to a preset resource library and content description template library, automatically determining target resources and templates that match the game content requirements. This eliminates the need for developers to manually select, combine, and configure numerous game resources such as characters, scenes, tasks, and items. Subsequently, game content elements are generated based on the target resources and templates, achieving automatic construction of game content elements. Thus, by establishing a mapping relationship between game content keywords and the resource library and content description template library, and utilizing existing game resources and templates to automatically generate game content elements, the workload of manual resource selection and content construction is reduced, improving the efficiency of game content element generation and resource utilization. This allows for the rapid construction of game content elements that meet content requirements even as the types and quantities of game resources continue to increase, thereby improving the efficiency of game content development and expansion.
[0099] In one embodiment, semantic analysis of the story text is performed to obtain a set of game content keywords, including:
[0100] The large language model is used to perform semantic analysis on the story text, identify multiple game content keywords, the confidence level of each game content keyword, and the corresponding text fragments.
[0101] A set of game content keywords is generated based on each game content keyword, its corresponding confidence level, and text fragments.
[0102] In this embodiment, after obtaining the story text, server 110 calls a large language model to perform semantic analysis on the story text. This large language model can be a pre-trained generative model, such as a natural language understanding model, capable of identifying keywords related to the game content from natural language text and outputting the confidence level and corresponding text fragment for each keyword. Specifically, the planner inputs a fictional war-themed story text through client 120, such as, "On the fragmented Cangyuan Continent, Shen Yi, the young commander of the Iron Flag Army, leads his exhausted garrison to retreat to Yanmen Pass. He needs to secretly contact the Jinjiang Alliance in the south and gather enough cold iron ore from the occupied territories to forge the Cloud Piercing Crossbow." Server 110 submits this story text as input to the large language model, which returns a structured result after reasoning.
[0103] The large language model first identifies multiple game-related keywords in the story text and assigns a confidence score to each keyword, representing the model's confidence in the accuracy of its keyword extraction. Simultaneously, the model returns the corresponding text fragment for each keyword, i.e., the specific text snippet in the original text that supports the keyword extraction. For example, the model identifies the character keyword "Shen Yi" with a confidence score of 98%, based on the text fragment "Shen Yi, the young commander of the Iron Flag Army"; the faction keyword "Iron Flag Army" with a confidence score of 95%, based on the text fragment "the young commander of the Iron Flag Army"; and the item keyword "Cloud Piercing Crossbow" with a confidence score of 91%, based on the text fragment "forging Cloud Piercing Crossbows". For more abstract or ambiguous words in the text, the large language model may assign a lower confidence score; for example, the attribute keyword "exhausted" may only have a 75% confidence score, based on the text fragment "exhausted garrison".
[0104] After receiving the results returned by the large language model, server 110 generates a set of game content keywords based on each game content keyword, its corresponding confidence score, and the reference text fragment. During the generation process, server 110 can set a confidence threshold, such as 80%, and only include keywords with a confidence score exceeding this threshold in the final keyword set, thereby filtering out extraction results that the model cannot fully grasp. For keywords with a confidence score below the threshold, server 110 can mark them as items awaiting manual confirmation and send them along with the set to client 120 for review by the planners. When constructing the keyword set, server 110 retains the confidence score and reference text fragment of each keyword as metadata, which is convenient for evaluating the reliability of the match in subsequent mapping steps or displaying the source basis in the user interface. The final generated set of game content keywords can be represented in a structured data format, such as a list containing multiple key-value pairs, each key-value pair including the keyword text, keyword type, confidence score, and the reference position of the reference text fragment. This set is then used for resource and template mapping in step S120.
[0105] By invoking a large language model for semantic analysis and simultaneously outputting confidence scores and supporting text fragments, this embodiment significantly improves the interpretability and accuracy of keyword extraction. Designers can view the source and confidence score of each keyword on client 120, manually correcting low-confidence results, thus achieving a balance between automated efficiency and manual quality control. Server 110 can also dynamically adjust subsequent mapping strategies based on confidence scores, for example, using strict exact matching for high-confidence keywords and more lenient fuzzy matching or direct manual processing for low-confidence keywords. This semantic analysis method based on a large language model makes the conversion process from story text to game content keywords more intelligent and reliable.
[0106] In one embodiment, a set of game content keywords is generated based on each game content keyword, its corresponding confidence level, and text fragments, including:
[0107] Based on the confidence level of each game content keyword, the game content keywords are filtered to determine the target keywords;
[0108] Based on the contextual information of each target keyword in the corresponding text fragment, determine the keyword category corresponding to each target keyword;
[0109] Generate a set of game content keywords based on each target keyword and its corresponding keyword category.
[0110] In this embodiment, server 110 first filters the game content keywords based on their confidence levels to determine target keywords. Specifically, server 110 presets a confidence threshold, such as 80%. Only keywords with a confidence level of 80% or higher are retained as target keywords; keywords with a confidence level below the threshold are filtered out or marked for manual confirmation. Using the previous example, the large language model identifies the following keywords from the story text: the character keyword "Shen Yi" has a confidence level of 98%; the faction keyword "Iron Flag Army" has a confidence level of 95%; the item keyword "Cloud Piercing Crossbow" has a confidence level of 91%; and the attribute keyword "exhausted" has a confidence level of 75%. After filtering according to the 80% threshold, server 110 determines "Shen Yi," "Iron Flag Army," and "Cloud Piercing Crossbow" as target keywords, while "exhausted" is excluded due to insufficient confidence. For the excluded keywords, server 110 can record them in a separate list and send them to client 120 along with the final results for planners to review whether to add them manually.
[0111] Server 110 then determines the keyword category of each target keyword based on the context information of the corresponding text fragment. Although the large language model has already attached a type label to each keyword, Server 110 can perform secondary verification and completion by combining the context of the text fragment to improve the accuracy of category determination. For example, the text fragment corresponding to the target keyword "Shen Yi" is "Shen Yi, the young commander of the Iron Flag Army". Server 110 analyzes the context information in this fragment and finds that the word "commander" implies that the keyword belongs to the role category, and "Iron Flag Army" is the faction affiliation, thus confirming that the keyword category of "Shen Yi" is the role category. For the target keyword "Iron Flag Army", its text fragment is "the young commander of the Iron Flag Army". In the fragment, "Iron Flag Army" is a subordinate noun modifying "young commander", and the context indicates that it is the name of a military force. Server 110 determines its category as the faction category accordingly. For the target keyword "cloud-piercing crossbow," based on the text fragment "forging cloud-piercing crossbows," the verb "forging" in the context forms a verb-object relationship with the noun. Combining the meaning of "crossbow," server 110 classifies it as an item. If the contextual information of a target keyword in the text fragment is insufficient to clearly define its category—for example, the keyword "forging" might belong to both the action and skill categories—server 110 can further expand the context window, reading more text content before and after the keyword, or referencing the positional characteristics of the keyword in the story text, ultimately determining the most likely category.
[0112] After determining the categories, server 110 generates a set of game content keywords based on each target keyword and its corresponding keyword category. This set is organized in a structured manner, with each entry containing the text content of the target keyword, the determined category, an optional confidence score, and a reference to a text fragment. For example, the final generated set of game content keywords can be represented as follows: the character category includes "Shen Yi" with a reference to a text fragment; the faction category includes "Iron Flag Army"; and the item category includes "Cloud Piercing Crossbow." This set can also be grouped by category, facilitating rapid matching of corresponding items in the resource library and template library in subsequent steps. Server 110 temporarily stores this generated set of game content keywords in memory as input data for mapping to the resource library and template library in step S120.
[0113] Through the aforementioned secondary processing of screening and category determination, this embodiment effectively improves the quality and usability of the large language model's output. The confidence-based screening mechanism eliminates keywords that the model cannot identify, reducing noise interference in subsequent mapping steps. Context-based category determination compensates for potential coarse or erroneous labels in the model's original output, making the final keyword set more accurate and structured. Planners can also view the comparison before and after screening and the criteria for category determination for each keyword on the client-side (120), allowing for manual intervention when necessary, thus achieving a good balance between automation efficiency and accuracy.
[0114] In one embodiment, a set of game content keywords is mapped to a preset resource library and content description template library to determine the corresponding target resources and target templates, including:
[0115] Based on the keyword categories in the game content keyword set, retrieve the corresponding candidate resources from the preset resource library and the corresponding candidate templates from the preset content description template library;
[0116] Based on the matching relationship between each candidate resource and each candidate template, the target resource and target template are determined.
[0117] In this embodiment, server 110 first obtains a set of game content keywords. Each keyword in this set has been assigned a corresponding keyword category, such as character, faction, item, action, or scene. Based on each keyword category in the game content keyword set, server 110 retrieves corresponding candidate resources from a preset resource library and corresponding candidate templates from a preset content description template library. Candidate resources refer to a set of resource instances retrieved from the resource library based on keyword categories that may be selected as target resources; similarly, candidate templates refer to a set of template instances retrieved from the template library based on keyword categories that may be selected as target templates.
[0118] Specifically, server 110 iterates through each keyword in the game content keyword set, searching the resource library according to its category. The resource library stores a large number of completed game resource instances, each with its category specified upon entry. For example, for the keyword "Shen Yi" (character category), server 110 finds all character-related resource instances in the resource library, using these as candidate character resources, which may include character models of different styles, character avatars, etc. For the keyword "Piercing Crossbow" (item category), server 110 finds all item or weapon-related resource instances as candidate item resources. The search results under each keyword category form a corresponding set of candidate resources. Simultaneously, server 110 searches for candidate templates in the content description template library based on the same keyword category information. Each template in the template library pre-defines its applicable content type; for example, "General Character Template" is suitable for scenarios containing character-related keywords, "Equipment Forging Template" is suitable for scenarios containing both item and action-related keywords, and "Faction Quest Template" is suitable for scenarios containing both faction and action-related keywords. Server 110 filters out all potentially applicable templates based on the category combinations contained in the current game content keyword set, creating a candidate template list.
[0119] After completing the search for candidate resources and templates, server 110 determines the final target resources and templates based on the matching relationships between each candidate resource and template. This matching relationship determination is primarily based on whether the fill requirements defined in the template are compatible with the types of candidate resources. For example, the candidate template "General Character Template" requires three fill items, corresponding to character models, weapon models, and skill effects. Server 110 selects resources belonging to character models as the character model option for this template, resources belonging to weapon models as the weapon model option, and resources belonging to skill effects as the skill effect option. If multiple resources exist for a certain type of option, server 110 can select based on the textual connection of keywords. For example, "Cloud Piercing Crossbow" is more closely related to resources with "crossbow" in their name, so that resource is preferred. Server 110 checks whether all required fill items for each candidate template can be found in the candidate resources for their corresponding resource types. If all requirements are met, the template is prioritized; if a certain type of resource is missing, the template is temporarily shelved or marked as pending addition. Server 110 selects a template that can be fully supported by candidate resources as the target template, and selects the most corresponding candidate resource as the target resource for each fill item of the template. If multiple templates can be supported, server 110 can select according to preset rules, such as prioritizing the template with more fill items. After determining the target resource and target template, server 110 establishes a correspondence between the two and generates a mapping result for subsequent content element generation steps.
[0120] This embodiment first retrieves candidate resources and templates by keyword category, and then determines the target resource and target template based on the matching relationship between the two. This effectively narrows the search scope and improves mapping efficiency. Simultaneously, filtering based on the matching of template requirements and resource types ensures structural compatibility between resources and templates, reduces the risk of filling errors during subsequent content element generation, and makes the mapping process more reliable and easier to maintain.
[0121] In one embodiment, determining the target resource and target template based on the matching relationship between each candidate resource and each candidate template includes:
[0122] Each candidate resource is combined with a candidate template to obtain multiple resource template combinations;
[0123] Calculate the matching degree between the resource tags of the candidate resources and the template tags of the candidate templates in each resource template combination;
[0124] Based on each matching degree, the target resource and target template are determined in each resource template combination.
[0125] In this embodiment, after completing the candidate resource retrieval and candidate template retrieval by keyword category, server 110 obtains multiple candidate resources and multiple candidate templates. Server 110 first combines each candidate resource with each candidate template to obtain multiple resource template combinations. For example, assuming that the candidate resources include character model resource A, character model resource B, and weapon model resource C, and the candidate templates include general character templates and elite soldier templates, then server 110 combines all possible combinations to form a total of 6 resource template combinations. Each combination contains a candidate template and candidate resources selected for each item to be filled in the template.
[0126] After obtaining all resource template combinations, server 110 calculates the matching degree between the resource tags of candidate resources and the template tags of candidate templates in each resource template combination. Resource tags are a set of descriptive markers attached to each resource when it is added to the database. For example, a character model resource might have tags such as "general," "heavy armor," and "sword." Template tags are the markers for the filler items declared in each template. For example, the weapon filler item of a general character template requires tags such as "weapon," "ranged," or "melee." For a resource template combination, server 110 compares the tags required for each filler item in the template with the tags possessed by the corresponding candidate resources, counts the number of tags that are consistent or semantically similar, and then calculates the overall matching degree of the combination. The matching degree can be the percentage of matching tags or a weighted score assigned to different tags according to preset rules. For example, for a general character template, the expected tags for its weapon filler item are "weapon" and "crossbow." If the tags of candidate weapon resource C include "weapon," "crossbow," and "armor penetration," then the match is good; if the tags of candidate weapon resource D are only "weapon" and "melee," then the matching degree is low. Server 110 summarizes the matching status of each fill item for each resource template combination to obtain a comprehensive matching score.
[0127] Server 110 determines the target resource and target template based on the matching degree of each resource template combination. Typically, server 110 selects the resource template combination with the highest matching degree as the final result, as this combination best satisfies the fit between the template's filling requirements and the actual attributes of the resource. If multiple combinations have the same and highest matching degree, server 110 can select one according to preset auxiliary rules, such as randomly selecting one and prompting the planner for confirmation. After determining the target resource and target template, server 110 designates the template in the combination as the target template and the resources selected for each filling item in the combination as the target resources, establishing corresponding binding relationships. Server 110 then sends the selected result to client 120 for planners to preview. Planners can view the best combination automatically selected based on the matching degree and have the right to manually change it to other combinations. By combining all candidate resources and candidate templates and calculating the matching degree in this way, server 110 can systematically evaluate every possible combination, select the optimal solution, and ensure that the selection result of the target resource and target template is the best match in a global sense.
[0128] In one embodiment, determining the target resource and target template in each resource template combination based on each matching degree includes:
[0129] Resource cost is evaluated for resource template combinations with a matching degree exceeding a preset threshold, and the target resource and target template are determined from the resource template combinations with the lowest resource cost.
[0130] In this embodiment, after calculating the matching degree of each resource template combination, server 110 obtains a series of combinations with matching degree scores. Server 110 first sets a preset threshold, such as a matching degree of no less than 80 points, and then filters out all resource template combinations with matching degrees exceeding the threshold as candidate combinations. These candidate combinations have reached an acceptable standard in terms of tag matching fit, which can ensure basic compatibility when generating subsequent game content elements.
[0131] Server 110 then evaluates the resource overhead of each candidate combination. Resource overhead refers to the system resources consumed by using the combination during game runtime or content element loading, such as memory usage, video memory usage, resource loading time, storage space size, and potential real-time computing overhead. Each resource comes with a resource overhead list upon being added to the database, recording various overhead metrics for that resource; each template itself may also introduce additional overhead, such as complex templates requiring more instantiation time. For a candidate combination, Server 110 sums or performs a weighted summation of the overhead values of all its target resources and target templates to obtain the total resource overhead of the combination. For example, if character model resource A occupies 50 megabytes of memory, weapon model resource C occupies 10 megabytes, skill effect resource E occupies 30 megabytes, and the instantiation overhead of the general character template is approximately 5 megabytes, then the total resource overhead of this combination is 95 megabytes. The resource overhead of different combinations may vary significantly. For example, although character model resource B also exceeds the matching degree threshold, its model polygon count is higher, and its memory usage reaches 120 megabytes, resulting in a higher total overhead for its combination.
[0132] Server 110 compares the resource overhead values of all candidate combinations, selects the resource template combination with the lowest resource overhead, and determines the target resource and target template from it. If multiple candidate combinations have the same and lowest resource overhead, server 110 can further compare other secondary indicators, such as resource loading speed or network transmission size, or select one according to a preset order. After determining the final target resource and target template, server 110 designates the template in the combination as the target template, and the resources in the combination that are paired with each fill item as the target resource, and establishes a binding relationship. Server 110 then sends the selection result to client 120. The planner can see on the interface that the system prioritizes the solution with the lowest resource overhead while ensuring matching quality, thus balancing matching degree and performance efficiency during content generation. Through this mechanism of selecting the minimum resource overhead among combinations that meet the matching degree standard, this embodiment effectively reduces the resource burden during game operation and improves overall performance while ensuring resource and template compatibility.
[0133] In one embodiment, game content elements are generated based on target resources and target templates, including:
[0134] Generate initial game content element configurations based on target resources and target templates;
[0135] In response to the adjustment request for the initial game content element configuration, the initial game content element configuration is adjusted to obtain the adjusted configuration;
[0136] Based on the adjusted configuration, game content elements are generated.
[0137] In this embodiment, after determining the target resources and target template, server 110 first generates an initial game content element configuration based on the target resources and target template. The initial game content element configuration refers to an unverified and unadjusted data file obtained by initially filling the target resources according to the structure defined by the target template. This file contains the basic skeleton and placeholder content of the game content elements. For example, the target template is a general character template, defining five fields: character name, faction affiliation, weapon model, skill effects, and basic attributes. Server 110 fills the corresponding placeholders in the template with the Shen Yi character model, Iron Flag Army faction icon, Cloud Piercing Crossbow weapon model, and corresponding skill effect resources obtained from the target resources. Simultaneously, it generates the character's basic attribute values according to preset rules, such as an initial attack power of 80 points and a defense power of 60 points. After the above filling is completed, an initial general character configuration is formed and stored in the memory of server 110 in a structured format.
[0138] After generating the initial game content element configuration, server 110 sends it to client 120. Client 120 displays this initial configuration in a graphical user interface for designers to preview and review. Figure 4 As shown, the initial configuration is presented in form, titled "Initial Configuration - General Character Template." It lists the character name (value: Shen Yi), faction (value: Iron Flag Army), attack power (value: 80), weapon model (value: Cloud Piercing Crossbow), and other configuration items. Each configuration item has an edit button on the right, and confirmation and cancellation buttons at the bottom, along with an additional entry for adding fields. Designers may be dissatisfied with certain aspects of the initial configuration, such as believing that the generated character attribute values do not meet their needs, or wanting to replace a target resource with another alternative resource in the resource library. In this case, designers can initiate an adjustment request for the initial game content element configuration through client 120. The adjustment request can contain various types of adjustment instructions, such as modifying attribute values, replacing resources, deleting or adding fields, and adjusting the relationships between elements. Each adjustment operation generates a corresponding adjustment request from client 120 and sends it to server 110 in real-time or in batches.
[0139] In response to a received adjustment request, server 110 adjusts the initial game content element configuration to obtain an adjusted configuration. Therefore, the adjusted configuration is the final configuration data obtained after modifying the initial configuration in response to a user's adjustment request. The adjustment process involves applying each instruction in the adjustment request one by one and updating the configuration data synchronously. For example, after receiving a request to adjust the attack power from 80 points to 100 points, server 110 locates the attack power field in the configuration file and modifies its value to 100. If a request to replace a weapon model is received, server 110 retrieves a new weapon model resource reference from the resource library, replaces the original Cloud Piercing Crossbow model reference, and updates the storage path of the relevant fields in the configuration file. If the designers have made multiple adjustments, server 110 can apply them sequentially or in batches according to the order they are received.
[0140] Based on the adjusted configuration, server 110 generates the final game content elements. This step transforms the adjusted configuration from an abstract data structure into concrete game content element instances that can be directly used by the game engine. Specifically, server 110 reads all fields and resource references in the adjusted configuration and packages and serializes them according to the format required by the game engine. For example, for a general character content element, server 110 integrates the character model file, weapon model file, skill effect file, and attribute value table into a complete character resource package and generates a corresponding metadata description file. Simultaneously, server 110 assigns a unique identifier to this game content element and stores it in the game content library for subsequent loading and use by the game runtime environment. After generation, server 110 sends the final game content elements to client 120, where designers can view the generated results, including a preview of the character's 3D model, an attribute panel display, and skill effect demonstration animations. If designers are still not satisfied, they can continue to initiate new adjustment requests, repeatedly executing the above adjustment and generation process until a satisfactory final version is obtained. Through this three-stage mechanism of first generating initial configuration, then responding to adjustment requests, and finally generating content elements, this embodiment gives planners full flexibility and control on the basis of automated generation, so that game content elements can be produced efficiently and finely optimized according to specific needs.
[0141] In one embodiment, an initial game content element configuration is generated based on the target resources and the target template, including:
[0142] Parse the target template to determine the corresponding configuration items;
[0143] Analyze the target resource and determine the initial configuration parameters corresponding to each configuration item;
[0144] Based on the initial configuration parameters, generate the initial game content element configuration.
[0145] In this embodiment, after determining the target template and target resources, server 110 first parses the target template to determine the configuration items contained within it. A configuration item refers to a field in the template that defines specific content to be filled in. Each configuration item corresponds to an attribute or component of a game content element. For example, when the template type is a general character template, its configuration items may include character name, faction affiliation, character model resource reference, weapon model resource reference, skill effect resource reference, and basic attribute values such as attack power and defense power. The template parsing process is completed by reading the template's structured description file. This file defines the name, data type, whether it is required, and value range of all configuration items in key-value pairs or a tree structure. Server 110 traverses each field in the template file, extracting them one by one to form a configuration item list. This list determines all the target positions that need to be filled in when generating subsequent configurations.
[0146] Server 110 then parses the target resources to determine the initial configuration parameters for each configuration item. The target resources are specific instances selected from the resource library, each containing its own attribute information and storage path. For example, the character model resource "Shen Yi" in the target resources includes its file path, model type, animation, etc.; the weapon model resource "Piercing Crossbow" includes its file path, attack range, damage type, etc.; and the faction resource "Iron Flag Army" includes its name text, flag icon path, etc. Server 110 associates each configuration item with its corresponding target resource, extracting suitable parameter values from the resource to fill in that configuration item. For example, for the character name configuration item, Server 110 can read the character display name "Shen Yi" from the metadata of the character model resource, or directly obtain the text string as a parameter from the previous keyword set. For the weapon model resource reference configuration item, Server 110 will extract the storage path string of the Piercing Crossbow model as a parameter. For basic attribute value configuration items, if the target template requires attack power and defense power, but the target resource does not directly provide specific values, Server 110 can generate initial parameters according to preset rules. Each configuration item receives a corresponding initial configuration parameter, which may be a text string, file path, number, or resource identifier.
[0147] After all configuration parameters are determined, server 110 generates initial game content element configurations based on these initial parameters. This step combines the configuration items and parameters into a structured configuration data file. Server 110 writes each configuration item and its corresponding initial configuration parameters into the file according to the data format defined in the template, forming key-value pair configuration records. For example, the generated content might be: character name = Shen Yi, faction affiliation = Iron Flag Army, character model = path / models / shenyi.fbx, weapon model = path / weapons / chuanyun.fbx, skill effects = path / effects / chuanyun.particle, attack power = 80, defense power = 60. These configuration records are organized into a common format such as JSON or XML, and include template version information and a generation timestamp. Server 110 temporarily stores this initial game content element configuration in memory, while simultaneously generating a unique configuration identifier for subsequent adjustments and tracking.
[0148] Through the parsing and generation process, server 110 structures the discrete target templates and instantiates the target resources, transforming them into a complete and standardized initial configuration. This configuration directly reflects the initial automated conversion result from story text to game content elements. This method of parsing templates to determine configuration items, parsing resources to determine parameters, and then combining them to generate the configuration makes the entire initial configuration generation process logically clear and the steps well-defined, ensuring automation efficiency.
[0149] In one embodiment, the target resource is parsed to determine the initial configuration parameters corresponding to each configuration item, including:
[0150] Obtain the default configuration table of the target resource;
[0151] The default parameter values for each configuration item are retrieved from the default configuration table and used as the initial configuration parameters.
[0152] In this embodiment, after parsing the target template and obtaining the configuration item list, server 110 further parses each target resource to extract the initial configuration parameters suitable for filling in each configuration item. Server 110 first obtains the default configuration table for each target resource. The default configuration table is a structured data file pre-created when each resource is added to the database, which records the default parameter values of the resource under different application scenarios. For example, the default configuration table of a character model resource "Shen Yi" may contain parameters such as character display name, character description text, and model scaling ratio; the default configuration table of a weapon model resource "Piercing Crossbow" may contain parameters such as weapon name, attack power bonus, and attack speed. The default configuration table is stored in key-value pairs and is stored in the resource database of server 110 along with the resource file.
[0153] After obtaining the default configuration table, server 110 searches for the default parameter values of each configuration item and uses these default parameter values as initial configuration parameters. Specifically, server 110 iterates through the list of configuration items parsed from the target template. For each configuration item, it attempts to find a key name with the same or semantically matching name in the default configuration table of the target resource. For example, if the configuration item in the target template is "role name", server 110 searches for entries with the key name "role name" or "display name" in the default configuration table and reads their corresponding values as initial configuration parameters. If an exact match is found, it is used directly; otherwise, server 110 performs fuzzy matching based on a preset mapping relationship.
[0154] In practice, some configuration items in a template may not have corresponding entries in the default configuration table of that resource. For example, a general character template requires an "attack power" configuration item, but the default configuration table of a character model resource usually does not contain an attack power value. Server 110 can adopt several handling strategies to address this situation. First, mark the unfinished configuration item as pending, to be manually entered by the planner later. Second, search from other related target resources, such as the attack power bonus from the default configuration table of a weapon model resource. Third, enable a global default value library, which stores standard default values for various configuration items, such as a default attack power of 50 points.
[0155] When a configuration item in the template needs to retrieve parameters from multiple target resources—for example, a skill effect configuration item might require three sub-parameters: skill name, effect file path, and cooldown time—server 110 will look up these sub-parameters from the default configuration table of the corresponding resource, and then combine them into a composite parameter to fill in the configuration item. For text-type configuration items, the default configuration table may store text in multiple languages; server 110 will select the corresponding version based on the current game's language settings.
[0156] After completing the search for all configuration items, server 110 collects the obtained default parameter values to form the initial configuration parameter set corresponding to each configuration item. If a configuration item cannot obtain a valid parameter from any default configuration table, server 110 marks it as missing and reserves an empty space in the generated initial game content element configuration. At the same time, it generates a prompt message and sends it to client 120, informing the planner to manually supplement it. Through this parameter extraction method based on the default configuration table, server 110 can quickly and systematically fill the initial values of various configurations of the target template, ensuring that the generated initial configuration has reasonable basic values. At the same time, the separation of resource design and configuration improves the maintainability and scalability of the system.
[0157] In one embodiment, in response to an adjustment request for the initial game content element configuration, the initial game content element configuration is adjusted to obtain an adjusted configuration, including:
[0158] In response to adjustments made to the target configuration item, obtain the adjustment parameters;
[0159] Based on the adjusted parameters, the initial game content element configuration corresponding to the target configuration item is updated to obtain the adjusted configuration.
[0160] In this embodiment, after the server 110 generates the initial game content element configuration and sends it to the client 120, the planner can view the detailed content of the configuration in the graphical user interface of the client 120. The interface typically displays each configuration item and its current parameter value in the form of a form, attribute panel, or visual editor. When the planner wants to modify a specific configuration item, such as believing that the system-generated character attack power of 80 points is too low, or wanting to replace the current weapon model, the planner can initiate an adjustment operation on the target configuration item through mouse clicks, numerical input, drop-down selection, or dragging and dropping resources. Specifically, the planner can directly modify the attribute value on the interface, such as adjusting Shen Yi's attack power from 80 points to 100 points. If the planner wants to change the weapon model, they can click the replace button next to the weapon model. At this time, the client 120 will pop up a list of candidate weapons for selection, such as... Figure 5 As shown. Figure 5 The interface displays a floating panel for selecting weapon models, listing three candidate options: Cloud Piercing Crossbow, Long-handled Battle Axe, and Steel Sword. Confirm and cancel buttons are located at the bottom. Once a designer selects a target weapon, client 120 captures the adjustment operation, determining the target configuration item as a weapon model reference and the adjustment parameter value as the storage path of the new weapon model. Additionally, designers can add a mount field and select the corresponding mount resource. Client 120 captures these adjustment operations in real-time, determining the target configuration item manipulated by the designer and its new value, thereby generating corresponding adjustment parameters. The adjustment parameters must at least include the identifier of the target configuration item and the modified parameter value; for example, if the target configuration item is attack power, the adjustment parameter value is 100; or if the target configuration item is a weapon model reference, the adjustment parameter value is the storage path of the new weapon model.
[0161] Client 120 sends an adjustment request containing adjustment parameters to server 110. In response to the received adjustment request, server 110 first parses out the target configuration item identifier and adjustment parameters. Then, server 110 updates the initial game content element configuration corresponding to the target configuration item according to the adjustment parameters, obtaining the adjusted configuration. The specific update method depends on the numerical type of the configuration item. For numerical configuration items, such as attack power, defense power, and skill cooldown time, server 110 directly reads the new value from the adjustment parameters, locates the position of the configuration item in the initial configuration file, and replaces the original value with the new value. For resource reference configuration items, such as character model paths, weapon model paths, and special effects file paths, server 110 directly replaces the original path with the new path in the adjustment parameters. For text-based configuration items, such as character names and task descriptions, server 110 directly replaces the original text with the new text in the adjustment parameters. If the adjustment parameters include batch modification of multiple sub-parameters, such as simultaneously modifying multiple attributes of a character, server 110 applies the update operation for each sub-parameter sequentially.
[0162] Server 110 can support multiple consecutive adjustment operations. Designers might first adjust attack power, then weapon models, and finally skill effects. Each adjustment triggers an update, and Server 110 progressively modifies the current configuration, resulting in a cumulative adjusted configuration. To improve user experience, Client 120 can also collect multiple adjustment operations and send adjustment requests in batches. Server 110 then updates all target configuration items in a single batch. After receiving the adjusted configuration, Server 110 temporarily stores it and optionally resends it to Client 120 for designers to preview and confirm. Through this mechanism of responding to single or batch configuration item adjustment operations, obtaining adjustment parameters, and updating them item by item, this embodiment empowers designers with the ability to fine-tune automatically generated content. This allows game content elements to be quickly and automatically generated from story text and flexibly adjusted according to design requirements, achieving an effective combination of automation and manual intervention.
[0163] In one embodiment, the initial game content element configuration corresponding to the target configuration item is updated according to the adjustment parameters to obtain the adjusted configuration, including:
[0164] The adjustment parameters are validated based on the parameter constraint rules corresponding to the target configuration item;
[0165] When the verification passes, the initial configuration parameters corresponding to the target configuration item are updated using the adjusted parameters to obtain the adjusted configuration.
[0166] In this embodiment, after receiving the adjustment request sent by the client 120 and parsing out the target configuration item identifier and adjustment parameters, the server 110 does not immediately perform an update operation. Instead, it first verifies the adjustment parameters according to the parameter constraint rules corresponding to the target configuration item. Parameter constraint rules are a set of predefined conditions stored in the server 110, used to limit the acceptable parameter range or format for each configuration item. These rules can be numerical range constraints, such as attack power must be between 0 and 999, or skill cooldown time must be between 1 second and 60 seconds; they can also be enumeration value constraints, such as character class can only be selected from three options: warrior, mage, and archer; or they can be format constraints, such as resource paths must conform to a specific string pattern. Each type of configuration item is associated with corresponding parameter constraint rules when the template is defined. These rules are recorded in the template's metadata or uniformly stored in the configuration item rule library for the server 110 to call.
[0167] After obtaining the parameter constraint rules corresponding to the target configuration item, server 110 compares the adjusted parameters with the rules. For numerical configuration items, server 110 checks whether the adjusted parameter is between the minimum and maximum values specified by the rule. For example, if the rule requires attack power to be between 50 and 200, a parameter of 100 passes the check; a parameter of 250 exceeds the limit and fails the check. For enumerated configuration items, server 110 checks whether the adjusted parameter is a member of the enumerated value set in the rule. For example, if the weapon type configuration rule includes four options: sword, bow, crossbow, and spear, a parameter of crossbow bolt passes the check; a parameter of dart is not in the set and fails the check. For resource path configuration items, server 110 checks whether the path format in the adjusted parameter conforms to a preset regular expression, such as whether it starts with / models / and ends with .fbx. It also checks whether the path points to an actual resource file in the resource library. For composite configuration items, such as skill configurations containing multiple sub-parameters, server 110 checks each sub-parameter one by one.
[0168] When the verification passes, server 110 updates the initial configuration parameters corresponding to the target configuration item using adjustment parameters, resulting in the adjusted configuration. The update operation involves replacing the original parameter value of the configuration item in the initial game content element configuration file with the verified adjusted parameter. For example, if Shen Yi's attack power is 80 points in the initial configuration, and the planner submits an adjustment parameter of 100 points, after verification, server 110 changes the attack power field value in the configuration file from 80 to 100. If the target configuration item is a resource reference type, server 110 replaces the original resource path with the new path, keeping other fields in the configuration file unchanged. After the update is complete, server 110 generates a new configuration data, i.e., the adjusted configuration. This adjusted configuration has the same structure as the initial configuration; only the modified configuration items have changed.
[0169] When the verification fails, server 110 rejects the adjustment operation, does not update the configuration, and returns an error response to client 120. The error response will include a specific reason for the failure, such as "Attack power value exceeds the allowed range, the allowed range is 50 to 200" or "Weapon type is not in the selectable list". After receiving the error response, client 120 can display a prompt message on the interface, guiding the planner to re-enter parameter values that comply with the constraint rules. Server 110 can support multiple verification attempts. Planners can resubmit the adjustment request after correcting the parameters until the verification passes or the operation is actively canceled. This embodiment verifies the adjustment parameters by introducing parameter constraint rules, ensuring that only parameters that comply with the rules can be used to update the configuration. This effectively prevents illegal or out-of-range values, incompatible resource paths, and other errors from entering the game content element configuration, thereby improving the accuracy of configuration data and the stability of system operation.
[0170] In one embodiment, game content elements are generated based on the adjusted configuration, including:
[0171] Determine the target resource components according to the adjusted configuration;
[0172] If the target resource component is a non-character resource, then the game content elements are generated by combining and rendering based on the target resource component.
[0173] If the target resource component is a character resource, then the game content elements are generated by combining and rendering based on the target resource component, and the element descriptions corresponding to the game content elements are generated according to the target template.
[0174] In this embodiment, after adjusting the initial game content element configuration and obtaining the final adjusted configuration, server 110 enters the actual generation stage of game content elements. The adjusted configuration is configuration data that has been confirmed or modified item by item by the planners. The resource component corresponding to each configuration item has been uniquely determined. The resource component refers to the specific resource unit that makes up the game content element, such as character model, weapon model, skill effect, etc. The character model resource component points to the specific Shen Yi model file, the weapon model resource component points to the specific Piercing Cloud Crossbow model file, and the skill effect resource component points to the specific Piercing Cloud effect particle system. Server 110 first determines the target resource component to be used according to the adjusted configuration, that is, reads the resource identifier or storage path referenced by each configuration item from the adjusted configuration, and then locates and loads the corresponding resource file in the resource library. These target resource components include, but are not limited to, character models, weapon models, equipment models, skill effects, sound effect files, UI icons, and scene objects, depending on the content element type defined by the target template.
[0175] After server 110 obtains all target resource components, it further determines the type of each resource component, specifically whether it is a character resource. Character resources typically refer to entities with independent behavioral logic, animation state machines, interactive capabilities, and the potential to carry attribute values, such as general characters, ordinary NPCs, monsters, and mounts. The determination is based on the type tag in the resource's metadata. For example, if a resource is marked as "character" or "character model" when it is entered into the database, it is classified as a character resource; if it is marked as "weapon," "effect," or "icon," it is classified as a non-character resource. This distinction is crucial because the handling of character resources and non-character resources in game content elements differs fundamentally.
[0176] If server 110 determines that the target resource component is a non-character resource, such as the weapon model resource component "Cloud Piercing Crossbow," then server 110 directly performs composite rendering based on this target resource component to generate game content elements. Composite rendering refers to spatially assembling and visually presenting all non-character resource components in the adjustment configuration according to the relative position, hierarchical relationship, attachment point, and other information defined by the target template. For example, for a weapon model, server 110 needs to bind it to the hand bone node of the character model and apply appropriate scaling, rotation angle, and position offset to make the weapon appear to be held by the character. For skill effects, server 110 needs to attach its particle system to the weapon tip or around the character and set the trigger condition to a specific frame of the attack animation. For scene maps, server 110 needs to place the terrain, buildings, vegetation, waypoints, and other resource components in the adjustment configuration one by one into the virtual scene according to the coordinate positions and hierarchical order defined by the template. For example, placing the city wall model of Yanmen Pass at specified coordinates, planting the Iron Flag Army's flag on the city tower, and setting up barricades and crossbow positions in front of the pass. Figure 6 As shown, the scene map preview interface displays the bird's-eye view of Yanmen Pass in a simplified line drawing style, including the city walls, the iron flags fluttering on the city towers, the barricades and crossbows in front of the city, and the patrol routes of the garrison marked with dotted lines. The legend on the left clearly indicates the city walls, barricades, crossbows, flags, and other graphic elements. For other scene objects and non-character resources, such as a single city wall or flag, server 110 also places them in the virtual scene according to the coordinates in the template. The rendering process is executed by the graphics rendering engine of client 120, ultimately generating a complete instance of game content elements that can be directly used in the game. This instance includes the visual appearance and basic interactive functions of all non-character resources, but does not require additional descriptive text generation.
[0177] If server 110 determines that the target resource component is a character resource, such as the character model resource component of Shen Yi, then server 110 will also perform composite rendering based on the target resource component to generate game content elements containing the character model. Unlike processing non-character resources, after completing the composite rendering, server 110 also needs to generate element descriptions corresponding to the game content elements according to the target template. An element description is a structured text or metadata used to describe the character's basic information and functional characteristics, facilitating the display of character details, quest dialogues, or encyclopedia content within the game. Specifically, server 110 reads all description fields defined in the target template, such as character name, character title, faction, character introduction, skill name, skill description, and background story. Then, it extracts the corresponding parameter values from the configuration and fills them into these description fields. For example, the configuration records the character name as Shen Yi, the title as the young commander of the Iron Flag Army, the faction as the Iron Flag Army, the skill name as "Piercing Clouds and Breaking Armor," and the skill description as firing a highly penetrating crossbow bolt that can ignore part of the target's defense. Server 110 combines this information according to the template's preset format into a complete element description text, such as "Shen Yi, the young commander of the Iron Flag Army, is skilled in using the Cloud Piercing Crossbow to unleash the Cloud Piercing Armor-Piercing skill, effectively striking heavily armored enemy units." This description text can be exported as JSON and packaged together with the already rendered character models, weapon models, skill effects, and other resources to form the final game content element instance. The element description can also be called by other game systems; for example, the quest system generates relevant quests based on the character description, and the encyclopedia system displays character profiles.
[0178] Furthermore, when multiple characters are involved in the story text, server 110 also extracts character relationship information from the semantic analysis results of the story text, generates a character relationship graph, and outputs this graph as part of the element description. Specifically, during the semantic analysis process in step S110, the large language model, in addition to identifying keywords, also identifies social relationships between characters, such as allies, enemies, rulers and subjects, masters and disciples, fathers and sons, as well as action relationships such as alliances, attacks, requests for help, and betrayals. Server 110 stores these relationships in the form of triples. For example, the relationship between Shen Yi and the Jinjiang Alliance is a secret alliance, the relationship between Shen Yi and the Hantie Mine is to raise funds for neutrality, and the relationship between the Iron Flag Army and Yanmen Pass is defense and being defended. When generating the element description corresponding to a character resource, server 110 traverses all relationship triples related to that character to construct a character relationship graph centered on that character. This graph can be stored in the form of a node-connected graph, where nodes represent characters or forces, and edges represent relationship types and strengths. For example, Shen Yi's character relationship graph includes a node called Jinjiang Alliance, with an edge labeled "Secret Alliance"; and another node called Yanmen Pass, with an edge labeled "Defensive Stronghold". The final client 120's preview interface of game content elements is as follows: Figure 7 As shown, the top of the interface displays character information, listing the name Shen Yi, title "Young Commander of the Iron Flag Army," attack power of 100, weapon "Piercing Crossbow," and skill "Cloud Piercing Armor." The left side shows a preview of Shen Yi's appearance; the right side displays a tree-like character relationship graph, clearly showing Shen Yi's affiliation, alliances, and defensive relationships with forces and strongholds such as the Iron Flag Army, Jinjiang Alliance, Yanmen Pass, and Cold Iron Mine. The character relationship graph is serialized into JSON format and packaged into game content element instances along with character models, skill effects, and other resources. During game runtime, the system can automatically generate dialogue logic between characters, quest trigger conditions, and changes in faction reputation based on the character relationship graph.
[0179] By using this generation method that branches according to resource component type, this embodiment, while ensuring the visual rendering of game content elements, adds narrative descriptions to character resources. This results in content elements that possess both complete visual presentation and sufficient textual readability and functional configurability. For non-character resources, only rendering is required, avoiding unnecessary description generation overhead. The entire generation process is based entirely on predetermined adjustment configurations, eliminating the need for additional selection or switching operations. This ensures the consistency of resource determination and adjustment logic, thereby achieving smooth, efficient, and logically consistent automated generation from story text to complete game content elements.
[0180] In one embodiment, the method further includes:
[0181] A preview interface showcasing game content elements;
[0182] In response to editing operations on game content elements on the preview interface, determine the editing parameters;
[0183] Based on the editing parameters, the game content elements are re-rendered and the display results are updated.
[0184] In this embodiment, after generating the game content element, the server 110 sends the element to the client 120. The client 120 displays a preview interface of the game content element in its graphical user interface. The preview interface typically includes a 3D rendering window to display the visualization effects of the game content element, such as the model posture of the general character, the weapon holding position, the skill effect playback effect, and the scene lighting. At the same time, the preview interface also displays various editable parameters of the game content element in the form of an attribute panel, list, or floating tab, such as the character's attack power, defense power, skill cooldown time, character name, character description text, and the associated nodes and edge attributes in the bound character relationship graph.
[0185] Designers can inspect the currently displayed game content elements in the preview interface. If they find areas requiring adjustment, they can initiate editing operations directly on the preview screen. Editing operations can take various forms, such as dragging a character's skeletal node in the 3D rendering window to adjust the weapon's grip position, modifying the text input box for the character's name in the attribute panel, or clicking a relationship edge in the character relationship graph and changing the relationship type to another option. Client 120 responds to the designer's editing operations on game content elements in the preview interface, capturing the target object and the intent of the modification to determine the editing parameters. The editing parameters at least include the identifier of the configuration item being edited and the new value after modification, such as changing the character's attack power from 80 points to 100 points, or changing the particle color of a skill effect from red to gold.
[0186] Client 120 sends editing parameters to server 110. Server 110 then re-renders the game content elements and updates the display results based on these parameters. The re-rendering process depends on the type of editing parameters. For attribute-based editing, such as modifying attack or defense, server 110 only needs to update the corresponding fields in the data structure of the game content element and send the new values back to client 120. Client 120 then refreshes the display in the attribute panel without needing to regenerate the visual content. However, for visually related editing, such as model resources, special effects, or skeletal binding relationships, server 110 needs to reload or replace the corresponding resource components and re-execute the combined rendering process. For example, if the designers replace Shen Yi's weapon from the Cloud Piercing Crossbow to a different longsword model, server 110 will load the new longsword model from the resource library, recalculate the binding point positions and rotation offsets, and then instruct client 120's rendering engine to redraw the image of the character holding the longsword. For example, if the planners adjust the particle emission speed of the skill effect from 30 particles per second to 50 particles per second, server 110 will update the effect configuration file and regenerate the particle system instance, and client 120 will then play the updated effect animation.
[0187] After re-rendering, client 120 updates the display results in real time in the preview interface, allowing designers to see the edited effects without closing or reopening the interface. The updated display results include refreshing the model image in the 3D rendering window, changing values in the attribute panel, and altering the style of nodes or connections in the character relationship graph. If designers are still not satisfied with the re-display results, they can initiate a new round of editing operations, with server 110 responding and updating again, forming a closed loop of multiple iterations and optimizations. Through this real-time preview and instant editing mechanism, this embodiment enables designers to make intuitive, WYSIWYG adjustments based on the generated content, greatly improving the efficiency of game content element creation and refinement, while reducing the time cost of repeated submissions and regeneration.
[0188] The following describes the apparatus for generating game content elements according to embodiments of this application. The apparatus described below corresponds to the method described above for generating game content elements. For example... Figure 8 As shown, this application provides a device for generating game content elements, the device comprising:
[0189] Keyword set determination module 210 is used to acquire story text and perform semantic analysis on the story text to obtain a set of game content keywords;
[0190] The resource template mapping module 220 is used to map the set of game content keywords to a preset resource library and content description template library to determine the corresponding target resources and target templates.
[0191] The game content element generation module 230 is used to generate game content elements based on the target resources and target templates.
[0192] In one embodiment, the keyword set determination module 210 includes:
[0193] The story text semantic analysis submodule is used to call a large language model to perform semantic analysis on the story text, identify multiple game content keywords, the confidence level of each game content keyword, and the corresponding text fragments.
[0194] The keyword set generation submodule is used to generate a set of game content keywords based on each game content keyword, its corresponding confidence level, and text fragments.
[0195] In one embodiment, the keyword set generation submodule includes:
[0196] The target keyword determination unit is used to filter the keywords of each game content based on the confidence level of each game content keyword, and determine the target keywords.
[0197] The keyword category determination unit is used to determine the keyword category corresponding to each target keyword based on the context information of each target keyword in the corresponding text fragment;
[0198] The keyword set generation unit is used to generate a set of game content keywords based on each target keyword and its corresponding keyword category.
[0199] In one embodiment, the resource template mapping module 220 includes:
[0200] The candidate template retrieval submodule is used to retrieve corresponding candidate resources from a preset resource library based on each keyword category in the game content keyword set, and to retrieve corresponding candidate templates from a preset content description template library.
[0201] The target template determination submodule is used to determine the target resource and target template based on the matching relationship between each candidate resource and each candidate template.
[0202] In one embodiment, the target template determination submodule includes:
[0203] The resource template combination determination unit is used to combine each candidate resource with each candidate template to obtain multiple resource template combinations.
[0204] The matching degree calculation unit is used to calculate the matching degree between the resource tags of the candidate resources and the template tags of the candidate templates in each resource template combination;
[0205] The target template determination unit is used to determine the target resource and target template in each resource template combination based on each matching degree.
[0206] In one embodiment, the target template determination unit includes:
[0207] The target template determination subunit is used to evaluate the resource overhead of resource template combinations with a matching degree exceeding a preset threshold, and to determine the target resource and target template from the resource template combination with the minimum resource overhead.
[0208] In one embodiment, the game content element generation module 230 includes:
[0209] The initial game content element configuration generation submodule is used to generate the initial game content element configuration based on the target resources and target template;
[0210] The configuration adjustment determination submodule is used to respond to adjustment requests for the initial game content element configuration, adjust the initial game content element configuration, and obtain the adjusted configuration;
[0211] The game content element generation submodule is used to generate game content elements based on the adjusted configuration.
[0212] In one embodiment, the initial configuration generation submodule includes:
[0213] The configuration item determination unit is used to parse the target template and determine the corresponding configuration items;
[0214] The initial configuration parameter determination unit is used to parse the target resource and determine the initial configuration parameters corresponding to each configuration item.
[0215] The initial game content element configuration generation unit is used to generate the initial game content element configuration based on each initial configuration parameter.
[0216] In one embodiment, the initial configuration parameter determination unit includes:
[0217] The default configuration table retrieval sub-unit is used to retrieve the default configuration table of the target resource;
[0218] The initial configuration parameter determination sub-unit is used to look up the default parameter values of each configuration item in the default configuration table as the initial configuration parameters.
[0219] In one embodiment, the configuration adjustment determination submodule includes:
[0220] The parameter acquisition unit is used to acquire adjustment parameters in response to adjustment operations on the target configuration item.
[0221] The configuration adjustment determination unit is used to update the initial game content element configuration corresponding to the target configuration item according to the adjustment parameters, so as to obtain the adjusted configuration.
[0222] In one embodiment, the configuration adjustment determination unit includes:
[0223] The parameter verification subunit is used to verify the adjustment parameters according to the parameter constraint rules corresponding to the target configuration item.
[0224] The configuration adjustment determination sub-unit is used to update the initial configuration parameters corresponding to the target configuration item with adjustment parameters when the verification passes, so as to obtain the adjusted configuration.
[0225] In one embodiment, the game content element generation submodule includes:
[0226] The target resource component determination unit is used to determine the target resource components according to the adjusted configuration.
[0227] The first game content element generation unit is used to generate game content elements by combining and rendering the target resource component if the target resource component is a non-character resource.
[0228] The second game content element generation unit is used to generate game content elements by combining and rendering the target resource component if the target resource component is a character resource, and to generate the element descriptions corresponding to the game content elements according to the target template.
[0229] In one embodiment, the apparatus further includes:
[0230] The preview interface display module is used to display a preview interface of game content elements;
[0231] The editing parameter determination module is used to determine the editing parameters in response to editing operations on game content elements on the preview interface;
[0232] The display result update module is used to re-render and update the display results of game content elements based on editing parameters.
[0233] In one embodiment, this application also provides a storage medium storing computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the method for generating game content elements as described in any of the above embodiments.
[0234] In one embodiment, this application also provides a computer device storing computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the method for generating game content elements as described in any of the above embodiments.
[0235] Indicatively, such as Figure 9 As shown, Figure 9 This is a schematic diagram of the internal structure of a computer device 300 provided in an embodiment of this application. The computer device 300 can be provided as a server. (Refer to...) Figure 9 The computer device 300 includes a processing component 320, which further includes one or more processors, and memory resources represented by memory 310 for storing instructions executable by the processing component 320, such as application programs. The application programs stored in memory 310 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 320 is configured to execute instructions to perform the method for generating game content elements of any of the above embodiments.
[0236] The computer device 300 may also include a power supply component 330 configured to perform power management of the computer device 300, a wired or wireless network interface 340 configured to connect the computer device 300 to a network, and an input / output (I / O) interface 350. The computer device 300 may operate on an operating system stored in memory 310, such as Windows Server™, Mac OS X™, Unix™, Linux™, Free BSD™, or similar.
[0237] Those skilled in the art will understand that Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0238] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element. In this document, "a," "an," "the," "the," and "its" may also include plural forms unless the context clearly indicates otherwise. "Multiple" refers to at least two, such as 2, 3, 5, or 8, etc. "And / or" includes any and all combinations of the related listed items.
[0239] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can be referred to each other.
[0240] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for generating game content elements, characterized in that, The method includes: Obtain the story text and perform semantic analysis on the story text to obtain a set of game content keywords; The game content keyword set is mapped to a preset resource library and content description template library to determine the corresponding target resources and target templates; Based on the target resource and the target template, game content elements are generated.
2. The method according to claim 1, characterized in that, The semantic analysis of the story text yields a set of game content keywords, including: A large language model is invoked to perform semantic analysis on the story text, identifying multiple game content keywords, the confidence level of each game content keyword, and the corresponding text fragments. A set of game content keywords is generated based on each game content keyword, its corresponding confidence level, and the text fragment.
3. The method according to claim 2, characterized in that, The step of generating a set of game content keywords based on each game content keyword, its corresponding confidence level, and text fragments includes: Based on the confidence level of each game content keyword, the game content keywords are filtered to determine the target keywords; Based on the contextual information of each target keyword in the corresponding text fragment, determine the keyword category corresponding to each target keyword; A set of game content keywords is generated based on each target keyword and its corresponding keyword category.
4. The method according to claim 1, characterized in that, The step of mapping the set of game content keywords to a preset resource library and content description template library to determine the corresponding target resources and target templates includes: Based on each keyword category in the game content keyword set, retrieve corresponding candidate resources from the preset resource library and retrieve corresponding candidate templates from the preset content description template library; The target resource and target template are determined based on the matching relationship between each candidate resource and each candidate template.
5. The method according to claim 4, characterized in that, The step of determining the target resource and target template based on the matching relationship between each candidate resource and each candidate template includes: Each of the candidate resources is combined with each of the candidate templates to obtain multiple resource template combinations; Calculate the matching degree between the resource tags of the candidate resources and the template tags of the candidate templates in each of the resource template combinations; Based on the matching degree, the target resource and target template are determined in each of the resource template combinations.
6. The method according to claim 5, characterized in that, The step of determining the target resource and target template in each resource template combination based on each matching degree includes: Resource cost is evaluated for resource template combinations with a matching degree exceeding a preset threshold, and the target resource and target template are determined from the resource template combinations with the lowest resource cost.
7. The method according to claim 1, characterized in that, The process of generating game content elements based on the target resource and the target template includes: Based on the target resources and the target template, generate the initial game content element configuration; In response to the adjustment request for the initial game content element configuration, the initial game content element configuration is adjusted to obtain the adjusted configuration; Based on the adjusted configuration, game content elements are generated.
8. The method according to claim 7, characterized in that, The step of generating initial game content element configurations based on the target resources and the target template includes: Parse the target template to determine the corresponding configuration items; Analyze the target resource to determine the initial configuration parameters corresponding to each configuration item; Based on the initial configuration parameters described above, generate the initial game content element configuration.
9. The method according to claim 8, characterized in that, The step of parsing the target resource and determining the initial configuration parameters corresponding to each configuration item includes: Obtain the default configuration table of the target resource; The default parameter values for each configuration item are retrieved from the default configuration table and used as the initial configuration parameters.
10. The method according to claim 8, characterized in that, In response to an adjustment request for the initial game content element configuration, the initial game content element configuration is adjusted to obtain an adjusted configuration, including: In response to adjustments made to the target configuration item, obtain the adjustment parameters; Based on the adjustment parameters, the initial game content element configuration corresponding to the target configuration item is updated to obtain the adjusted configuration.
11. The method of claim 10, wherein, The step of updating the initial game content element configuration corresponding to the target configuration item according to the adjustment parameters to obtain the adjusted configuration includes: The adjustment parameters are verified according to the parameter constraint rules corresponding to the target configuration item; When the verification passes, the initial configuration parameters corresponding to the target configuration item are updated using the adjustment parameters to obtain the adjusted configuration.
12. The method of claim 7, wherein, The step of generating game content elements according to the adjusted configuration includes: Determine the target resource components according to the adjusted configuration described above; If the target resource component is a non-character resource, then the game content element is generated by combining and rendering based on the target resource component. If the target resource component is a character resource, then the game content element is generated by combining and rendering based on the target resource component, and the element description corresponding to the game content element is generated according to the target template.
13. The method according to any one of claims 1 to 12, characterized in that, The method further includes: A preview interface showcasing the game content elements; In response to editing operations performed on the game content elements on the preview interface, the editing parameters are determined; Based on the editing parameters, the game content elements are re-rendered and the display results are updated.
14. An apparatus for generating a game content element, characterized by The device includes: The keyword set determination module is used to acquire story text and perform semantic analysis on the story text to obtain a set of game content keywords; The resource template mapping module is used to map the set of game content keywords to a preset resource library and content description template library to determine the corresponding target resources and target templates. The game content element generation module is used to generate game content elements based on the target resource and the target template.
15. A storage medium characterized by: The storage medium stores computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the method for generating game content elements as described in any one of claims 1 to 13.
16. A computer device, comprising: include: One or more processors, and memory; The memory stores computer-readable instructions, which, when executed by the one or more processors, perform the steps of the method for generating game content elements as described in any one of claims 1 to 13.