Virtual character generation method and device, electronic equipment and medium

By extracting user historical behavior vectors and performing scene semantic analysis to generate target virtual characters, the problem of stiff interaction of virtual characters in existing technologies is solved, and personalized and scene-adaptive interactive experiences are achieved, enhancing the user's sense of realism and fun.

CN121891783APending Publication Date: 2026-04-21MIGU INTERACTIVE ENTERTAINMENT CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
MIGU INTERACTIVE ENTERTAINMENT CO LTD
Filing Date
2025-12-10
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing technologies cannot generate game virtual characters that are personalized, interactive, dynamically change with the scene, and have self-learning capabilities, resulting in stiff interactions and a lack of personalized experience.

Method used

By extracting user historical behavior vectors from a pre-set vector database based on user game identifiers, and combining them with multimodal game data for scene semantic analysis, a target virtual character containing appearance features, behavior patterns and dialogue content is generated, and the target virtual character is used to interact with the user.

Benefits of technology

By accurately capturing user behavior preferences and game scene semantics, the generated virtual character appearance features and behavior patterns are aligned with user habits and scenarios, enhancing the realism, immersion, and fun of user interaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121891783A_ABST
    Figure CN121891783A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a virtual character generation method and device, electronic equipment and a medium, and relates to the technical field of artificial intelligence, and one specific implementation mode of the method comprises the steps that based on a game identifier of a user, a user historical behavior vector is extracted from a preset vector database; obtaining multi-modal game data corresponding to the game identifier, and performing scene semantic analysis on the multi-modal game data to obtain a scene semantic fusion vector; and based on the user historical behavior vector, the scene semantic fusion vector and the initial virtual role template, generating a target virtual role including the appearance features, the behavior pattern and the dialogue content, so as to interact with the user by using the target virtual role. The appearance characteristics of the generated virtual character better accord with the aesthetic tendency of the user, the behavior pattern and the dialogue content of the virtual character can also closely fit the habit of the user and the current scene, and the reality sense, the immersion sense and the interestingness when the user interacts with the virtual character are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, specifically to a method, apparatus, electronic device, and medium for generating virtual characters. Background Technology

[0002] In interactive game scenarios, the generation and interaction of virtual characters mainly rely on a large number of pre-set scripts and fixed logic. Game developers need to write detailed interaction scripts for virtual characters in different scenarios and set their behavior patterns with players.

[0003] Currently, the generation of virtual characters in games mainly employs two technical solutions: rule-based methods and statistical data analysis-based methods. The core of the rule-based method is to manually set behavioral rules and triggering conditions for virtual characters. Game developers need to model all possible behavioral paths to regulate the behavior of virtual characters in the game. The statistical data analysis-based method, on the other hand, leverages the analysis and processing of large amounts of user behavior data to construct user behavior pattern models. Based on these models, corresponding behavioral strategies are then developed for virtual characters, attempting to make their behavior more closely resemble the general behavioral habits of players. However, both rule-based and statistical analysis-based methods rely on pre-defined logic, making it impossible to generate game virtual characters that are personalized, interactive, dynamically change with the scene, and have self-learning capabilities. This makes it difficult to meet the current players' demand for high-quality virtual character interactive experiences. Summary of the Invention

[0004] This application provides a method, apparatus, electronic device, and medium for generating virtual characters to solve problems such as stiff interaction and lack of individuality caused by preset logic in related technologies.

[0005] In a first aspect, embodiments of this application provide a method for generating a virtual character. The method includes: extracting a user's historical behavior vector from a preset vector database based on the user's game identifier; obtaining multimodal game data corresponding to the game identifier and performing scene semantic analysis on the multimodal game data to obtain a scene semantic fusion vector; and generating a target virtual character containing appearance features, behavior patterns, and dialogue content based on the user's historical behavior vector, the scene semantic fusion vector, and an initial virtual character template, so as to interact with the user using the target virtual character.

[0006] In some embodiments, before extracting the user's historical behavior vector from a preset vector database based on the user's game identifier, the method includes: acquiring historical game behavior data corresponding to the game identifier, the historical game behavior data including historical game operation data and historical game interaction data; converting the historical game operation data into standardized game events based on a preset event mapping relationship, the preset event mapping relationship being used to represent the mapping relationship between game operations and standardized game events; generating the user's historical behavior vector based on a preset embedding model, standardized game events, and historical game interaction data; classifying the user's game style using a multi-label classification model and the user's historical behavior vector to obtain a target label matching the game style, and storing the target label and the user's historical behavior vector corresponding to the target label in the preset vector database.

[0007] In some embodiments, classifying a user's gaming style using a multi-label classification model to obtain target labels that match the user's gaming style includes: classifying the user's gaming style using a multi-label classification model and the user's historical behavior vector to obtain a set of labels containing the gaming style; using a similarity evaluation algorithm to determine the similarity score between the user's historical behavior vector and each label vector in the label set; and filtering out target labels that match the gaming style based on the similarity score.

[0008] In some embodiments, multimodal game data includes game behavior data and game scene data, where game behavior data includes game interaction data. Scene semantic analysis of the multimodal game data to obtain a scene semantic fusion vector includes: using a preset visual model to extract semantics from the game scene data, obtaining a scene semantic vector and scene language description text; constructing a scene graph based on the scene semantic vector and scene language description text; encoding the scene graph using a graph neural network to convert the scene graph into a scene graph vector; and concatenating and fusing the user audio emotion vector, scene semantic vector, and scene graph vector according to multimodal fusion rules to obtain a scene semantic fusion vector. The user audio emotion vector is obtained by parsing game audio data from the game interaction data using an audio model.

[0009] In some embodiments, generating a target virtual character containing appearance features, behavioral patterns, and dialogue content based on user historical behavior vectors, scene semantic fusion vectors, and an initial virtual character template includes: fusing user historical behavior vectors and scene semantic fusion vectors to obtain a multimodal model input vector; generating virtual character interaction data matching the user based on a preset multimodal large model and an initial virtual character template; and generating a target virtual character based on the virtual character interaction data, the virtual character generation model, the scene semantic fusion vector, and the scene interaction type, wherein the scene interaction type is obtained by parsing game audio data in multimodal game data using an audio model.

[0010] In some embodiments, generating a target virtual character based on virtual character interaction data, a virtual character generation model, scene semantic fusion vectors, and scene interaction types includes: generating appearance features of the target virtual character based on the appearance generation model, scene semantic fusion vectors, and scene interaction types in the virtual character generation model; generating behavior patterns of the target virtual character based on the behavior action generation model, behavior intentions in the virtual character interaction data, and scene interaction types in the virtual character generation model; generating dialogue content of the target virtual character based on the behavior language generation model, dialogue text and sentiment features and language in the virtual character interaction data, and scene interaction types in the virtual character generation model; and obtaining the target virtual character based on the appearance features, behavior patterns, and dialogue content.

[0011] In some embodiments, after generating a target virtual character containing appearance features, behavior patterns, and dialogue content based on user historical behavior vectors, scene semantic fusion vectors, and an initial virtual character template, the method includes: obtaining user feedback interaction evaluation information based on the target virtual character; and updating the vector weights of the user historical behavior vectors and the model parameters in the virtual character generation model based on the interaction evaluation information and a preset update algorithm.

[0012] Secondly, embodiments of this application provide a virtual character generation apparatus, the apparatus comprising: The extraction unit is used to extract the user's historical behavior vector from a preset vector database based on the user's game identifier; The acquisition unit is used to acquire the multimodal game data corresponding to the game identifier, and perform scene semantic analysis on the multimodal game data to obtain the scene semantic fusion vector; The generation unit is used to generate a target virtual character that includes appearance features, behavior patterns and dialogue content based on the user's historical behavior vector, scene semantic fusion vector and initial virtual character template, so as to use the target virtual character to interact with the user.

[0013] Thirdly, embodiments of this application provide an electronic device, including: a processor and a memory for storing a computer program capable of running on the processor, wherein, when the processor runs the computer program, it performs the method described in any embodiment of the first aspect.

[0014] Fourthly, embodiments of this application provide a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to perform the methods described in any embodiment of the first aspect.

[0015] Fifthly, embodiments of this application provide a computer program product including a computer program that, when executed by a processor, performs the method described in any embodiment of the first aspect.

[0016] This application provides a method for generating virtual characters. Based on a user's game identifier, it extracts the user's historical behavior vector from a preset vector database; acquires multimodal game data corresponding to the game identifier and performs scene semantic analysis on the multimodal game data to obtain a scene semantic fusion vector; based on the user's historical behavior vector, the scene semantic fusion vector, and an initial virtual character template, it generates a target virtual character containing appearance features, behavioral patterns, and dialogue content, enabling interaction between the target virtual character and the user. This application can accurately capture unique information such as the user's past behavioral preferences and operating habits in games, while allowing the virtual character to deeply understand the complex semantics of the game scene, including scene atmosphere and task objectives. The virtual characters generated by this application not only have appearance features that better match the user's aesthetic preferences, but their behavioral patterns and dialogue content also closely align with the user's habits and the current scene, enhancing the realism, immersion, and fun of the user's interaction with the virtual character.

[0017] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0018] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are merely embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort, and this application can be applied to other similar scenarios based on the provided drawings.

[0019] Figure 1 A flowchart illustrating a virtual character generation method provided in this application embodiment; Figure 2 A flowchart illustrating the second virtual character generation method provided in this application embodiment; Figure 3 A schematic diagram illustrating the player's position in specific game scene data obtained in an embodiment of this application; Figure 4 A schematic diagram illustrating the interaction between a virtual character and a user, provided as an embodiment of this application; Figure 5 A schematic diagram illustrating a specific target virtual character provided in an embodiment of this application; Figure 6This is a schematic diagram illustrating a specific vector weight for updating user historical behavior vectors and model parameters in a virtual character generation model, provided for an embodiment of this application. Figure 7 This is a schematic diagram of the structure of a virtual character generation device provided in an embodiment of this application; Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0020] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. The described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0021] It should be noted that the terms "system," "device," "unit," and / or "module" used in this application are a method of distinguishing different components, elements, parts, sections, or assemblies at different levels. However, if other terms can achieve the same purpose, they can be replaced by other expressions.

[0022] Hereinafter, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first," "second," or "third" may explicitly or implicitly include one or more of that feature.

[0023] In interactive game scenarios, the generation and interaction of virtual characters (such as non-player characters, or NPCs) rely heavily on pre-defined scripts and fixed logic. Game developers must write detailed interaction scripts for virtual characters in different scenarios and set their behavioral patterns with players. This pattern is relatively static between different players, progressing according to a fixed storyline, making it difficult to achieve a personalized experience. For example, when a player enters a specific scene and triggers a dialogue with a virtual character, they can only choose from the developer's pre-defined dialogue options, and the virtual character's responses are also fixed, unable to dynamically change based on user behavior, game scenarios, or other factors. This static interaction severely disconnects the virtual character from the game's controls and context, ultimately resulting in very limited interactivity and personalized experiences for players during gameplay.

[0024] Currently, the generation of virtual characters in games mainly employs two technical solutions: rule-based methods and statistical data analysis-based methods. The core of the rule-based method is to manually set behavioral rules and triggering conditions for virtual characters. Game developers need to model all possible behavioral paths to regulate the behavior of virtual characters in the game. The statistical data analysis-based method, on the other hand, leverages the analysis and processing of large amounts of user behavior data to construct user behavior pattern models. Based on these models, corresponding behavioral strategies are then developed for virtual characters, attempting to make their behavior more closely resemble the general behavioral habits of players.

[0025] However, both virtual character generation technologies have significant drawbacks, and their overall technological level is relatively lagging. Rule-based methods, because the virtual character's behavior and reactions are statically predefined, cannot adapt to new game scenarios or new strategies proposed by players. They also lack effective interaction with the game environment and the ability to proactively learn and optimize their behavior. Statistical data analysis-based methods, while capable of modeling user behavior patterns, can only generate general behavioral strategies. They struggle to dynamically adjust the virtual character's interactions based on personalized factors such as the current game state and player status, and lack capabilities in causal reasoning and dynamic adaptation.

[0026] Therefore, the relevant technologies have failed to effectively integrate key capabilities such as natural language understanding, emotion perception, real-time generation, and multimodal fusion. They are unable to generate game virtual characters with personalized interaction, dynamic changes with the scene, and self-learning capabilities. At the same time, the overall technology is seriously out of touch with cutting-edge technologies such as large models and multimodal perception, making it difficult to meet the current players' demand for high-quality virtual character interactive experiences.

[0027] It is evident that the relevant technologies have significant shortcomings. On the one hand, they fail to effectively integrate key capabilities such as natural language understanding, emotion perception, real-time generation, and multimodal fusion, making it impossible to generate game virtual characters with personalized interaction, dynamic changes based on the scene, and self-learning capabilities. On the other hand, the overall technology is severely out of step with cutting-edge technologies such as large-scale models and multimodal perception, making it difficult to meet the current players' demands for high-quality virtual character interactive experiences. This is specifically reflected in the following three points: 1) Insufficient dynamic feedback and optimization: The relevant technologies do not establish a real-time dynamic data feedback and training mechanism, and only rely on preset scripts and trigger conditions to run. They cannot adjust their own logic according to the player's real-time behavior and lack dynamic adaptability.

[0028] 2) Lack of personalized experience: The technology is unable to generate unique, personalized virtual characters based on players' playstyles, preferences, and real-time play data. All players interact with their virtual characters in the same scenario, resulting in a completely identical experience without differentiation.

[0029] 3) Weak multi-scenario data fusion capabilities: Related technologies have not achieved effective integration of game scenarios and player behaviors (such as gameplay operations, emotional changes, character selection, etc.). Existing solutions only load virtual character scripts based on fixed scenarios and specific triggering conditions, and cannot adjust them in conjunction with real-time player feedback and dynamic environmental changes, resulting in a disconnect between virtual character behavior and the player's real-time experience.

[0030] To address the issues of stiff interaction and lack of personalization caused by pre-set logic in the aforementioned related technologies, this application proposes a virtual character generation method. By fusing user historical behavior vectors and scene semantic vectors, it can accurately capture unique information such as user behavior preferences and operating habits in the game, allowing the virtual character to deeply understand the complex semantics of the game scene, covering aspects such as scene atmosphere and task objectives. Furthermore, the target virtual character generated based on this information is more in line with the user's aesthetic preferences in terms of appearance, and its behavior patterns and dialogue content are also closely aligned with the user's habits and the current scene, greatly enhancing the realism, immersion, and fun of the user's interaction with the virtual character.

[0031] The following section provides a detailed description of a virtual character generation method provided in this application, with reference to the accompanying drawings.

[0032] Figure 1 A flowchart illustrating a virtual character generation method provided in an embodiment of this application is shown. Figure 1 As shown, the virtual character generation method includes steps 101-103.

[0033] Step 101: Based on the user's game identifier, extract the user's historical behavior vector from the preset vector database.

[0034] In the embodiments of this application, player data is associated with a user's unique game identifier (such as account ID or device ID) to characterize player behavior over a long period of time from a data perspective, providing a complete basis for historical preferences for the subsequent generation of personalized virtual characters.

[0035] User historical behavior vectors are vectors generated by embedding models based on players' long-term accumulated historical game data (such as the frequency of battles in the past week, historical dialogue style preferences, and distribution of long-term playtime). They are used to represent players' stable behavior patterns and preferences (for example, players who participate in battles frequently over a long period of time have a higher weight in the "battle preference" dimension of the vector).

[0036] A game identifier is a player's unique identity in the game (such as an account ID), used to accurately link and retrieve the player's current and historical data.

[0037] Step 102: Obtain the multimodal game data corresponding to the game identifier, and perform scene semantic analysis on the multimodal game data to obtain the scene semantic fusion vector.

[0038] In the embodiments of this application, the application can accurately associate multi-dimensional data corresponding to players through game identifiers, integrate two key information types: player behavior and game environment, and then transform unstructured data into structured vector form through scene semantic analysis technology. Finally, a scene semantic fusion vector that can simultaneously represent the player's real-time behavioral intentions and current scene characteristics is generated, providing basic data support for the subsequent generation of virtual characters adapted to the context in both scene and behavior dimensions.

[0039] Multimodal game data includes a collection of various data types across two dimensions: player behavior and game environment. Multimodal specifically refers to the fact that the data source is not a single form (such as text, audio, operation logs, or scene images), but rather multiple types of data collaboratively reflecting the current state of the game.

[0040] Multimodal game data can include game behavior data and game scene data. Game behavior data includes game interaction data and game audio data.

[0041] Game behavior data refers to the data generated by players' active interactions within the game. Game interaction data includes records of player interactions with the game system / other characters, such as text dialogues with NPCs, records of clicking "accept / abandon quest," and logs of cooperative / competitive actions with other players. Game audio data consists of audio information generated by players during gameplay, such as voice commands sent through the microphone ("Request support," "There's a treasure chest here") and emotional tone in voice dialogues (such as urgent calls for help or casual conversation).

[0042] Game scene data consists of static and dynamic information about the current game environment, such as scene type (fantasy forest / sci-fi city / battle instance), distribution of objects within the scene (location of quest NPCs, coordinates of interactive items, layout of obstacles), and scene status (weather changes, quest progress stage, remaining health of enemy characters), etc.

[0043] Scene semantic analysis can be a process of semantic extraction and association of multimodal game data by combining technologies such as natural language processing (NLP), audio recognition, and computer vision (CV).

[0044] Step 103: Based on the user's historical behavior vector, scene semantic fusion vector, and initial virtual character template, generate a target virtual character that includes appearance features, behavior patterns, and dialogue content, so as to use the target virtual character to interact with the user.

[0045] In the embodiments of this application, the application can combine three types of core data—player's current state, historical preferences, and scene context—with a basic character template, and output the complete attributes of the virtual character through a multi-dimensional generation model, thereby achieving a personalized and scene-adaptive interactive experience.

[0046] The initial virtual character template is the basic framework of a virtual character, containing preset parameters such as character type (e.g., quest guide type, combat support type), basic appearance style (e.g., fantasy / science fiction), and core behavioral logic (e.g., friendly / hostile), which serve as the basis for generating the target virtual character.

[0047] The target virtual character is the final generated virtual character that can interact with the player. Its core attributes include: Appearance characteristics: the character's visual appearance (such as clothing, hairstyle, and body type), which needs to be adapted to the player's historical preferences (e.g., if the player often chooses "ancient style skin", the character's appearance will be more ancient style) and scene semantics (e.g., in a "snow scene", the character will wear a thick coat); Behavioral patterns: the character's action logic (such as movement path and interaction triggering method), which needs to be combined with the player's current behavior (e.g., actively approaching when the player is stationary), historical preferences (e.g., if the player dislikes waiting, the character's movements will speed up) and scene requirements (e.g., in a "dangerous scene", the character will maintain an alert posture); Dialogue content: the text / voice information of the character's interaction with the player, which needs to match the player's current intention (e.g., if the player asks about a task, provide guidance), historical dialogue style (e.g., if the player prefers concise replies, the dialogue will be concise) and scene atmosphere (e.g., in a "story scene", the dialogue will be rich in emotion).

[0048] The target virtual character in this application interacts with the player in real time through the coordinated performance of the above-mentioned appearance, behavior and dialogue (such as when the player asks a question, the character replies with a tone that matches the scene and makes a pointing action), so as to achieve intelligent interaction that fits the player and adapts to the scene.

[0049] In summary, the virtual character generation method proposed in this application can accurately capture unique information such as users' past behavioral preferences and operating habits in games. At the same time, it allows virtual characters to deeply understand the complex semantics of game scenes, including scene atmosphere and task objectives. The virtual characters generated by this application not only have appearance features that better match users' aesthetic preferences, but their behavior patterns and dialogue content can also closely match users' habits and the current scene, enhancing the realism, immersion, and fun of users interacting with virtual characters.

[0050] based on Figure 1 The embodiment shown, Figure 2 A flowchart of a second virtual character generation method provided in an embodiment of this application is further shown. Figure 2 based on Figure 1 The illustrated embodiment further defines steps 102 and 103. Figure 2In the illustrated embodiment, step 102 includes steps 202, 203, 204, and 205, and step 103 includes steps 206, 207, and 208. Figure 2 As shown, the method includes the following steps: Step 201: Based on the user's game identifier, extract the user's historical behavior vector from the preset vector database.

[0051] In the embodiments of this application, before extracting the user's historical behavior vector from the preset vector database based on the user's game identifier, the construction and storage of the vector need to be completed. The overall process includes five stages: collection of historical game behavior data, preprocessing, vector generation, tag matching, and storage, as detailed below: The first step is the collection of historical game behavior data. This can be achieved through the collaborative capture of players' comprehensive behavioral information across multiple devices.

[0052] Specifically, this application can initialize the InputSystem of Unity or Unreal Engine as a behavior listener, register event hooks for various types such as keyboard, mouse, gamepad, touch, and VR interaction, and collect player input events in real time with timestamps, player position, view angle, and camera information; simultaneously, it calls the game engine's SceneManager and Object Manager to record the scene state around the player; in addition, it uses peripherals such as microphones and cameras to collect information such as the player's voice spectrum, emotional characteristics, facial expressions, and gaze direction, and analyzes the emotional state through local models or GPU inference. All collected data is obtained through corresponding interfaces (such as Input System, WebRTC, OpenCV, etc.) according to device type, and the data frequency is set according to device characteristics (ranging from 10 to 60Hz), and is streamed to the cache in real time, and periodically written to corresponding storage media such as JSON structure logs, PostgreSQL, and ProtoBuf structures. The collected content is specifically divided into historical game operation data (including key, mouse, touch, and other operations and related spatiotemporal information) and historical game interaction data (including dialogue information, voice, and emotionally related data such as facial expressions).

[0053] Among them, the full-dimensional behavioral information can be obtained through the acquisition device interfaces shown in Table 1: Table 1

[0054] This application can collect user game behavior data through Table 1 above, including key operations such as attack key (A), jump key (Space), skill keys (Q, W, E, R), mouse movement, real-time coordinates of the mouse in the game interface, touch events such as single click, double click, long press, swipe, etc., recording the timestamp, type (such as movement, attack, interaction), player position and direction, etc.; as well as user game interaction data, player dialogue information in the game, and content such as microphone and camera on the player's side.

[0055] Next, data preprocessing is performed. Based on the preset event mapping relationship (defining the correspondence rules between game operations and standardized game events), non-standardized historical game operation data is converted into standardized game events in a unified format (such as converting pressing the attack key into launching an attack event), ensuring that behaviors of different operation forms can be uniformly identified.

[0056] Subsequently, a user history behavior vector is generated: the voice (converted to text), text dialogues, and standardized game events from historical game interaction data are integrated into a text input. Feature extraction is performed using a pre-defined embedding model such as TF-IDF or BERT, outputting a dense vector V (i.e., the user history behavior vector). This dense vector V contains multiple feature dimensions. ; For the nth feature dimension of the current user, It represents a 1×768 array of numbers, where each single dimension (e.g., v1) is a 1×768 array of numbers, and each number corresponds to the encoding of a player’s behavioral attribute (e.g., combat frequency, dialogue participation).

[0057] The target label is then determined through a multi-label classification model and similarity assessment: a Transformer+BiGRU multi-label classification model is used to predict the style table of player behavior. This involves associating a dense vector with a fixed label system, taking the dense vector V as input, and outputting a set of labels Y containing the player's possible game styles (e.g., aggressive, exploratory). .

[0058] Then, using the cosine similarity algorithm, the similarity score between the dense vector V and the corresponding vectors of each label in the label set is calculated. Based on the score, the Top-K labels with the highest similarity are selected as the target labels that match the player's game style. .

[0059] in, It is the cosine similarity, vi is the i-th vector, 0≤i≤n, n is the total number of feature dimensions, and yj is the label type in the j-th label set, 0≤j≤m, m is the total number of label types in the label combination Y.

[0060] Finally, data storage is completed: a Kafka+MongoDB streaming system is used to associate target tags with corresponding user historical behavior vectors and store them in a pre-defined vector database. Player real-time behavior data is first written to the behavior database and periodically archived to object storage for subsequent model training iterations. The user's game identifier is used as an index to ensure that it can be quickly retrieved through the identifier in the future.

[0061] Step 202: Using a preset visual model, semantic extraction is performed on the game scene data to obtain scene semantic vectors and scene language description text.

[0062] In the embodiments of this application, the visual information of a game scene can be transformed into computable semantic vectors and natural language descriptions, providing a foundation for subsequent scene semantic fusion. The specific implementation is as follows: Multimodal game data includes game behavior data and game scene data. Game scene data is structured scene data, which can be directly obtained through the game engine interface. Then, combined with the semantic understanding of scene images by a large visual model, dual parsing of structured data and unstructured images is achieved. The final output is a scene semantic result that combines machine computability (scene semantic vector) and human readability (scene language description text), providing a basis for scene environment cognition for virtual character generation.

[0063] Specifically, this application can utilize native APIs (such as SceneAPI and Object Tag System) provided by game engines like Unity and Unreal Engine to batch collect structured information (i.e., game scene data) of the current scene. For example, it can acquire information about all objects in the current scene, such as level items, mission objectives, and character positions. Objects in the scene can be categorized to identify those related to player interaction, such as mission objectives, pickable items, and objects that can trigger events. The collected content includes the attributes and states of all objects in the scene, such as level items (treasure chests, obstacles), mission objectives (NPC locations, BOSS coordinates), and character distribution (friendly / enemy). Figure 3 As shown in the figure, this application provides a schematic diagram of the player's position in the specific game scene data obtained.

[0064] Subsequently, a large visual language model (such as Qwen-VL, GPT-4, etc.) is used to perform deep semantic analysis of the game scene. Scene images captured in real time by the game engine (single frame screenshots or continuous video frames) contain complete visual information of the scene from the current player's perspective; the large visual model performs object detection and feature extraction on the images to identify key elements in the scene (such as "forest scene", "red treasure chest", "injured NPC"); based on the recognition results, semantic association is performed to generate a structured scene semantic vector (low-dimensional dense vector, used for machine to quickly match scene features); at the same time, a scene language description text in natural language form is generated (such as "The player is currently in the middle of the forest, there is a glowing treasure chest 5 meters ahead, and there is an injured quest NPC under a tree on the left").

[0065] Understandably, the output of the visual large language model in this application includes scene speech vectors and scene language description text. The scene semantic vectors are used for subsequent fusion calculations with player behavior vectors to support the virtual character's machine understanding of the scene; the scene language description text is used to assist in generating the virtual character's dialogue content (such as the character being able to directly quote scene information from the text to interact with the player).

[0066] Through the above two steps, the entire process of processing game scenes from data collection to semantic parsing is realized. This not only preserves the structured features of the scene (facilitating computation) but also enhances the readability of the scene through natural language description (facilitating interaction), laying the foundation for the subsequent generation of virtual characters adapted to the scene.

[0067] Step 203: Construct a scene graph based on scene semantic vectors and scene language description text.

[0068] In the embodiments of this application, the scene graph is a structured model of the core elements and relationships between elements in a game scene. By integrating scene semantic vectors (machine-recognizable features) and scene language description text (human-readable semantics), key entities and related logic in the scene are extracted to form a visualized knowledge graph structure, which upgrades scene information from a single element to a relationship network.

[0069] This application can extract core entities from scene semantic vectors as graph nodes and scene language description text (such as "The player is currently in the middle of the forest, there is a glowing treasure chest 5 meters ahead, and an injured quest NPC under a tree on the left"), for example, fixing the node types into five categories: Player: The current player's character entity in the scene; Enemies: Hostile characters (such as BOSS and monsters) that exist in the scene. Task point: The trigger location related to the current task (such as the location of the NPC to submit the task, the target destruction point); Items: Interactive props within the scene (such as lootable treasure chests, healing potions, quest items); NPCs: Non-player characters within the scene (such as quest guide NPCs, merchants, and injured characters).

[0070] Subsequently, based on the semantic logic in the scene language description text and the association features in the scene semantic vector, two types of core relationships between nodes are defined as graph edges, clarifying the interaction rules and spatial locations between entities: For example, spatial relationships: describing the positional associations between entities (such as "player - 5 meters ahead - treasure chest" or "NPC - under the tree - to the left of the player"). Interactive events: Describe the triggerable behavioral relationships between entities (such as "player - can pick up - treasure chest", "player - can talk to - quest NPC", "player - can fight - enemy").

[0071] Finally, combining the above definitions of nodes and edges, specific scene information (such as "forest scene, glowing treasure chest, injured NPC") is filled into the graph structure to form an instantiated scene graph for the current scene (for example: nodes are "player", "glowing treasure chest", "injured NPC", and edges are "player-5 meters ahead-glowing treasure chest" and "player-talkable-injured NPC").

[0072] For example, the scene graph G of this application has nodes = {players, enemies, quest points, items, NPCs} and edges = {spatial relationships, interaction events}.

[0073] Step 204: Encode the scene graph using a graph neural network to convert the scene graph into a scene graph vector.

[0074] In the embodiments of this application, graph neural networks (GNNs) are adept at processing data with topological structures. By collaboratively learning the node features and edge relationships in the scene graph, the discrete graph structure is transformed into a low-dimensional, computable dense vector (scene graph vector), enabling the machine to directly understand the association logic of entities in the scene, rather than just recognizing a single entity feature.

[0075] This application can convert the scene graph constructed in step 203 into an input format that can be recognized by GNN: bind the corresponding feature vector to each node (such as "player" or "treasure chest") (the feature dimension of the corresponding entity in the scene semantic vector obtained in step 202 can be directly reused), and add relationship type labels to each edge (such as "spatial relationship" or "interaction event") (such as using the number "1" to represent spatial relationship and "2" to represent interaction event).

[0076] Specifically, this application can use graph neural networks (such as commonly used architectures like GAT and GCN) to encode the preprocessed scene map: The first layer (node ​​feature aggregation): The model identifies the neighboring nodes of each node through the adjacency matrix (e.g., the neighboring nodes of "player" are "treasure chest" and "injured NPC"), and fuses the features of the neighboring nodes with the features of the current node to capture local entity relationships; Deep (Global Relationship Learning): Through multi-round feature transfer and attention mechanisms, the weight of key relationships is strengthened (such as interactive events related to tasks, like "player-dialogueable-injured NPC", which have a higher weight than ordinary spatial relationships), and the global structural features of the scene graph are learned. Output layer (vector generation): Compresses the global features of the entire scene graph into dense vectors of fixed dimensions, i.e., scene graph vectors. (For example, 1×512 dimensions), this vector contains both the feature information of entities in the scene and the relationship information between entities.

[0077] The scene graph vectors generated by this application can be directly used in the subsequent "scene semantic fusion" stage. When combined with player behavior-related vectors, they enable the machine to accurately determine which entities a player can interact with in the current scene structure and how to interact (e.g., combining player behavior vectors to determine that exploratory players are more likely to trigger the "player-pick-up-treasure chest" interaction), providing a basis for virtual characters to generate behaviors and dialogues that adapt to the scene structure.

[0078] Step 205: According to the multimodal fusion rules, the user audio emotion vector, scene semantic vector, and scene graph vector are spliced ​​and fused to obtain the scene semantic fusion vector. The user audio emotion vector is obtained by parsing the game audio data in the game interaction data through the audio model.

[0079] In embodiments of this application, the user's audio emotion vector, scene semantic vector, and scene graph vector can be directly concatenated to obtain a scene semantic fusion vector. : .

[0080] in, It is a context vector. It is a scene semantic vector (represented in the form of encoded numbers). It is a scene graph vector (marking the current player's actions and attributes). It is the user's audio emotion vector. A dimension belonging to space.

[0081] In this application, the user audio emotion vector can be obtained by using an audio model to separate game audio data, thereby separating player voice data and scene background sound data; semantic recognition and emotion feature extraction are performed on the player voice data to obtain the user audio emotion vector.

[0082] Specifically, this application can use audio recognition models to identify game audio data, convert the audio content into text, identify user expectations corresponding to the audio, and recognize audio background. For example, models such as Whisper and Conformer can separate and parse ambient sound from player voice. The input consists of player voice data and background noise data; the output is a user audio emotion vector. +tone +text) and scene type (current situation (such as battle, plot dialogue)).

[0083] Step 206: Fuse the user's historical behavior vector and the scene semantic fusion vector to obtain the multimodal model input vector.

[0084] Step 207: Based on the preset multimodal large model and the initial virtual character template, generate virtual character interaction data that matches the user.

[0085] In the embodiments of this application, the generated player profile is combined with the current game scene, that is, the user's historical behavior vector and the scene semantic fusion vector are fused into a multimodal model input vector. For example, if the player is an explorer and the current scene is a mysterious forest, the system will integrate this information as the basis for generating NPCs. The player's historical behavior data in the game is also added to the integrated data to help the system understand the player's long-term preferences and gaming habits, thereby generating NPCs that better meet the player's expectations. The system will analyze the integrated data, find the content most similar to the player's current state, and give it higher weight. For example, if the player has frequently interacted with a certain type of NPC before, the system will prioritize generating NPCs of that type.

[0086] The input vector for the multimodal model is: ,in, This refers to the real-time behavior vector corresponding to the game behavior data (real-time player behavior state (real-time changes)). User historical behavior vector (creating a profile based on the player's historical actions and voice). Scene semantic fusion vector (player's textual emotional language).

[0087] This application will The input is fed into a preset multimodal large model, which outputs the NPC's emotional text language tailored to the player. The input vector of the fused multimodal model is then fed into the multimodal large model (which supports vector, natural language, and other inputs, and supports text and language outputs) to generate the text and language of the interactive NPC, i.e., the virtual character interaction data.

[0088] Input: Multimodal model input vector In addition, there are NPC prototypes (such as quest NPCs), Prompt templates, and scene types (the scene type is determined by extracting scene semantics from the background sound data of the scene using scene language description text). Output: Dialogue text Emotional characteristics behavioral intent ,language .

[0089] For example, such as Figure 4 The diagram shown illustrates an interaction between a virtual character and a user, as provided in this application. (Refer to...) Figure 4 If a player says, "Hello, I'd like to know some clues about this quest," the model will interpret the player's intention as "asking for quest clues." The NPC might reply (text and speech): "You can go to the stone tablet at the village entrance; there are some clues there." If the player attacks, the NPC might respond: "Watch out! I'll fight back!" If the NPC chooses to fight back, it might say: "Why did you attack me? I'll make you regret it!"; if the NPC chooses to defend, it might say: "I don't want to fight, but I will protect myself."

[0090] Step 208: Based on the virtual character interaction data, the virtual character generation model, the scene semantic fusion vector, and the scene interaction type, generate the target virtual character. The scene interaction type is obtained by parsing the game audio data in the game interaction data through the audio model.

[0091] In the embodiments of this application, the appearance features of the target virtual character are generated based on the appearance generation model, scene semantic fusion vector, and scene interaction type in the virtual character generation model; the behavior pattern of the target virtual character is generated based on the behavior action generation model, behavior intent in the virtual character interaction data, and scene interaction type in the virtual character generation model; the dialogue content of the target virtual character is generated based on the behavior language generation model, dialogue text and emotional features and language in the virtual character interaction data, and scene interaction type in the virtual character generation model; and the target virtual character is obtained based on the appearance features, behavior pattern, and dialogue content.

[0092] Specifically, for NPC appearance, the appearance generation model of this application can use Stable Diffusion text to generate images. By inputting scene semantic fusion vectors and scene interaction types into the model, appearance images of NPCs can be generated. Regarding NPC behavior, this application can generate a behavior action model based on the virtual character generation model and the behavioral intent in the virtual character interaction data. And the scene interaction type, to obtain NPC behavior actions (movement, combat, dialogue, gift giving, etc.); For NPC dialogue, this application can generate multi-turn dialogue content for target virtual characters based on behavioral language generation models, dialogue text and emotional features and language in virtual character interaction data, and scene interaction types, allowing direct communication with users. The NPC's behavior and dialogue will change according to the player's different choices, exhibiting different emotions and action changes.

[0093] For example, such as Figure 5 As shown, this application provides a schematic diagram of a specific target virtual character. (Refer to...) Figure 5 If a player helps an NPC solve a problem, the NPC will show gratitude and friendliness; if a player attacks an NPC, the NPC will show anger and hostility.

[0094] Furthermore, after generating a target virtual character containing appearance features, behavioral patterns, and dialogue content based on user historical behavior vectors, scene semantic fusion vectors, and an initial virtual character template, this application can also obtain user feedback interaction evaluation information based on the target virtual character; and update the vector weights of the user historical behavior vectors and the model parameters in the virtual character generation model based on the interaction evaluation information and a preset update algorithm.

[0095] Specifically, this application can collect player feedback and interaction evaluation data in real time, including: 1) Players' evaluation of NPCs (such as satisfaction ratings and specific feedback).

[0096] 2) Frequency of interaction between players and NPCs (such as the number of dialogues, the number of times quests are accepted and completed).

[0097] 3) Player behavior data in the game (such as task completion status, game time, and operation habits).

[0098] 4) Player's emotional state (obtained in real time through an emotion analysis algorithm).

[0099] 5) Player evaluations of NPCs, interaction frequency, quest completion status, etc. Player behavior data is recorded using in-game feedback mechanisms (such as questionnaires, rating systems) and server logs.

[0100] The system records player behavior data, including interaction frequency with NPCs and quest completion status, through server logs. It also uses sentiment analysis algorithms to analyze players' emotional states during NPC interactions in real time and records emotional changes. Combining long-term player behavior records and sentiment analysis results, the system modifies player profile tags, including playstyle, preferred content, and emotional characteristics.

[0101] Specifically, as shown in Table 2, which presents the interactive evaluation data of user feedback obtained in this application.

[0102] Table 2

[0103] After a user interacts with an NPC in the game, this application will aggregate and store the player's feedback data as reward signals and modify the current user profile and context information configuration. In subsequent dialogues, it will dynamically adjust the NPC's behavior and dialogue content, forming a closed-loop feedback mechanism. Each time a player interacts with an NPC, the system will optimize based on the latest feedback data to ensure that the NPC's behavior and dialogue better meet the player's needs and expectations. Figure 6 As shown, this application provides a schematic diagram of the vector weights for updating user historical behavior vectors and the model parameters in a virtual character generation model. (Refer to...) Figure 6 This application can update the vector weights of the user's historical behavior vectors by using a behavior clustering analysis module based on the user's behavior data related to NPCs in the game and the user's feedback interaction evaluation data, and at the same time use an AI self-learning module to update the model parameters in the virtual character generation model.

[0104] In one optional embodiment of this application, the application can construct a reward signal based on the current user's feedback, and fine-tune the parameters of the large model involved in NPC generation through self-learning feedback optimization, such as training with low-rank adaptation LORA, so as to better generate content that conforms to the user's personalization according to the current scenario.

[0105]

[0106] Where: R is the current reward signal, S is the NPC satisfaction rating (the result of players rating the NPC's response), C is the task completion ratio, and E is the mood improvement value (the positive mood improvement value, which is judged based on the player's voice and text). , , That is the corresponding weight.

[0107] Optimization formula: Based on the current reward signal R, fine-tune the model parameters in reverse.

[0108]

[0109] Where R is the current reward signal and E is the improvement in mood. These are the parameters for inverse model tuning.

[0110] As one player commented: "This NPC's dialogue is so boring." After system analysis, the NPC dialogue content was adjusted to add more plot details and interactive options.

[0111] In the next conversation, the NPC says, "You seem very smart. The key clue to this quest is actually hidden in the forest you just passed through. Did you notice anything unusual?" In summary, this application dynamically adjusts the dialogue content and style of NPCs by collecting and analyzing players' game scene changes, control behaviors, and character information in real time, using a multimodal large-scale model to closely match the current game context. Furthermore, by storing user behavior data long-term and constructing user profiles, combined with a sentiment analysis model, NPCs can achieve personalized interactions based on players' historical behavior and contextual information during dialogue and behavior generation. Further, by collecting player feedback in real time and utilizing reinforcement learning algorithms, the application dynamically adjusts NPC behavior strategies and dialogue content, forming a closed-loop learning mechanism to continuously improve the quality of NPC interactions and the player experience.

[0112] To implement the above embodiments, this application also provides a virtual character generation device. Figure 7 This is a schematic diagram of the structure of a virtual character generation device 700 provided in an embodiment of this application. Figure 7 As shown, the device includes: Extraction unit 710 is used to extract user historical behavior vectors from a preset vector database based on the user's game identifier; The acquisition unit 720 is used to acquire the multimodal game data corresponding to the game identifier, and to perform scene semantic analysis on the multimodal game data to obtain the scene semantic fusion vector; The generation unit 730 is used to generate a target virtual character containing appearance features, behavior patterns and dialogue content based on the user's historical behavior vector, scene semantic fusion vector and initial virtual character template, so as to use the target virtual character to interact with the user.

[0113] In some embodiments, the extraction unit 710 is configured to: obtain historical game behavior data corresponding to the game identifier before extracting the user's historical behavior vector from a preset vector database based on the user's game identifier; the historical game behavior data includes historical game operation data and historical game interaction data; convert the historical game operation data into standardized game events based on a preset event mapping relationship, the preset event mapping relationship being used to represent the mapping relationship between game operations and standardized game events; generate the user's historical behavior vector based on a preset embedding model, standardized game events, and historical game interaction data; classify the user's game style using a multi-label classification model and the user's historical behavior vector, obtain target labels matching the game style, and store the target labels and the user's historical behavior vectors corresponding to the target labels in the preset vector database.

[0114] In some embodiments, the extraction unit 710 is configured to: classify the user's game style using a multi-label classification model and the user's historical behavior vector to obtain a set of labels containing the game style; determine the similarity score between the user's historical behavior vector and each label vector in the label set using a similarity evaluation algorithm; and filter out target labels that match the game style based on the similarity score.

[0115] In some embodiments, multimodal game data includes game behavior data and game scene data, where game behavior data includes game interaction data; the acquisition unit 720 is configured to: extract semantics from the game scene data using a preset visual model to obtain scene semantic vectors and scene language description text; construct a scene graph based on the scene semantic vectors and scene language description text; encode the scene graph using a graph neural network to convert the scene graph into a scene graph vector; and concatenate and fuse the user audio emotion vector, scene semantic vector, and scene graph vector according to multimodal fusion rules to obtain a scene semantic fusion vector, wherein the user audio emotion vector is obtained by parsing the game audio data in the game interaction data using an audio model.

[0116] In some embodiments, the generation unit 730 is configured to: fuse user historical behavior vectors and scene semantic fusion vectors to obtain a multimodal model input vector; generate virtual character interaction data matching the user based on a preset multimodal large model and an initial virtual character template; and generate a target virtual character based on the virtual character interaction data, the virtual character generation model, the scene semantic fusion vector, and the scene interaction type, wherein the scene interaction type is obtained by parsing the game audio data in the game interaction data through an audio model.

[0117] In some embodiments, the generation unit 730 is configured to: generate appearance features of the target virtual character based on the appearance generation model, scene semantic fusion vector, and scene interaction type in the virtual character generation model; generate behavior patterns of the target virtual character based on the behavior action generation model, behavior intentions in the virtual character interaction data, and scene interaction type in the virtual character generation model; generate dialogue content of the target virtual character based on the behavior language generation model, dialogue text and sentiment features and language in the virtual character interaction data, and scene interaction type in the virtual character generation model; and obtain the target virtual character based on the appearance features, behavior patterns, and dialogue content.

[0118] In some embodiments, the generation unit 730 is further configured to: after generating a target virtual character containing appearance features, behavior patterns and dialogue content based on the user's historical behavior vector, the scene semantic fusion vector and the initial virtual character template, obtain user feedback interaction evaluation information based on the target virtual character; and update the vector weights of the user's historical behavior vector and the model parameters in the virtual character generation model based on the interaction evaluation information and a preset update algorithm.

[0119] The methods and apparatus provided in the embodiments of this application have been described above. To implement the functions of the methods provided in the embodiments of this application, the electronic device may include a hardware structure and software modules, and may implement the above functions in the form of a hardware structure, software modules, or a hardware structure plus software modules. One of the above functions may be executed in the form of a hardware structure, software modules, or a hardware structure plus software modules.

[0120] Figure 8 This is a block diagram illustrating an electronic device 800 for implementing the above-described virtual character generation method, according to an exemplary embodiment. For example, the electronic device 800 may be a mobile phone, computer, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.

[0121] Reference Figure 8 The electronic device 800 may include a communication interface 801, capable of interacting with other devices; a processor 802, connected to the communication interface 801 to interact with other devices, used to execute the methods provided by one or more of the above-mentioned technical solutions when running a computer program; and a memory 803, on which the computer program is stored. Specifically, the specific processing procedure of the processor 802 can refer to the virtual character generation method described in the above embodiments of this application.

[0122] Of course, in practical applications, the various components in electronic device 800 are coupled together through bus system 804. It can be understood that bus system 804 is used to realize the connection and communication between these components. In addition to a data bus, bus system 804 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, in... Figure 8 The general labeled all buses as Bus System 804.

[0123] The memory 803 in this embodiment is used to store various types of data to support the operation of the electronic device 800. Examples of such data include any computer program used to operate on the electronic device 800.

[0124] The methods disclosed in the embodiments of this application can be applied to processor 802, or implemented by processor 802. Processor 802 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in processor 802 or by instructions in the form of software. The processor 802 may be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Processor 802 can implement or execute the various methods, steps, and logic block diagrams of the application in the embodiments of this application. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the method applied in the embodiments of this application can be directly manifested as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium, which is located in memory 803. Processor 802 reads the information in memory 803 and combines its hardware to complete the steps of the aforementioned method.

[0125] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers (MCUs), microprocessors, or other electronic components to perform the aforementioned method.

[0126] Embodiments of this application also propose a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the virtual character generation method described in the above embodiments of this application.

[0127] Embodiments of this application also propose a computer program product, including a computer program that is executed by a processor using the virtual character generation method described in the above embodiments of this application.

[0128] Embodiments of this application also propose a chip including one or more interface circuits and one or more processors; the interface circuits are used to receive signals from the memory of an electronic device and send signals to the processors, the signals including computer instructions stored in the memory, and when the processor executes the computer instructions, it causes the electronic device to execute the virtual character generation method described in the above embodiments of this application.

[0129] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0130] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with an embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0131] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of the invention pertain.

[0132] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processing module, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (control method), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic device, and portable optical disc read-only memory (CDROM). In addition, computer-readable media can even be paper or other suitable media on which programs can be printed, because programs can be obtained electronically, for example, by optically scanning paper or other media, followed by editing, interpreting or otherwise processing as necessary, and then stored in computer memory.

[0133] It should be understood that various parts of the embodiments of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0134] Those skilled in the art will understand that all or part of the steps of the methods described in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

[0135] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc.

[0136] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.

Claims

1. A method for generating virtual characters, characterized in that, The method includes: Based on the user's game identifier, the user's historical behavior vector is extracted from a preset vector database; Obtain the multimodal game data corresponding to the game identifier, and perform scene semantic analysis on the multimodal game data to obtain a scene semantic fusion vector; Based on the user's historical behavior vector, the scene semantic fusion vector, and the initial virtual character template, a target virtual character containing appearance features, behavior patterns, and dialogue content is generated to interact with the user using the target virtual character.

2. The method according to claim 1, characterized in that, Before extracting the user's historical behavior vector from a preset vector database based on the user's game identifier, the method includes: Obtain the historical game behavior data corresponding to the game identifier, wherein the historical game behavior data includes historical game operation data and historical game interaction data; Based on a preset event mapping relationship, the historical game operation data is converted into standardized game events. The preset event mapping relationship is used to represent the mapping relationship between game operations and standardized game events. Based on the preset embedding model, the standardized game events, and the historical game interaction data, a user historical behavior vector is generated. Using a multi-label classification model and the user's historical behavior vector, the user's game style is classified to obtain a target label that matches the game style, and the target label and the user's historical behavior vector corresponding to the target label are stored in the preset vector database.

3. The method according to claim 2, characterized in that, The step of using a multi-label classification model to classify the user's gaming style and obtain target labels that match the user's gaming style includes: Using the multi-label classification model and the user's historical behavior vector, the user's game style is classified to obtain a set of labels containing the game style; A similarity evaluation algorithm is used to determine the similarity score between the user's historical behavior vector and each tag vector in the tag set; Based on the similarity score, target tags that match the game style are selected.

4. The method according to claim 1, characterized in that, The multimodal game data includes game behavior data and game scene data, and the game behavior data includes game interaction data; The process of performing scene semantic analysis on the multimodal game data to obtain the scene semantic fusion vector includes: Using a preset visual model, semantic extraction is performed on the game scene data to obtain scene semantic vectors and scene language description text; Based on the scene semantic vectors and the scene language description text, a scene graph is constructed; The scene graph is encoded using a graph neural network and converted into a scene graph vector. According to the multimodal fusion rules, the user audio emotion vector, the scene semantic vector, and the scene graph vector are concatenated and fused to obtain the scene semantic fusion vector. The user audio emotion vector is obtained by parsing the game audio data in the game interaction data through an audio model.

5. The method according to claim 1, characterized in that, The process of generating a target virtual character containing appearance features, behavioral patterns, and dialogue content based on the user's historical behavior vector, the scene semantic fusion vector, and the initial virtual character template includes: The user's historical behavior vector and the scene semantic fusion vector are fused to obtain the multimodal model input vector; Based on a pre-set multimodal large model and an initial virtual character template, generate virtual character interaction data that matches the user; Based on the virtual character interaction data, the virtual character generation model, the scene semantic fusion vector, and the scene interaction type, the target virtual character is generated. The scene interaction type is obtained by parsing the game audio data in the multimodal game data using an audio model.

6. The method according to claim 5, characterized in that, The process of generating the target virtual character based on the virtual character interaction data, the virtual character generation model, the scene semantic fusion vector, and the scene interaction type includes: Based on the appearance generation model in the virtual character generation model, the scene semantic fusion vector, and the scene interaction type, the appearance features of the target virtual character are generated. Based on the behavior and action generation model in the virtual character generation model, the behavioral intent in the virtual character interaction data, and the scene interaction type, the behavior pattern of the target virtual character is generated. Based on the behavioral language generation model in the virtual character generation model, the dialogue text and emotional features and language in the virtual character interaction data, and the scene interaction type, the dialogue content of the target virtual character is generated. The target virtual character is obtained based on the appearance features, the behavior pattern, and the dialogue content.

7. The method according to claim 1, characterized in that, After generating a target virtual character containing appearance features, behavioral patterns, and dialogue content based on the user's historical behavior vector, the scene semantic fusion vector, and the initial virtual character template, the method includes: Based on the target virtual character, obtain user feedback and interaction evaluation information; Based on the interaction evaluation information and the preset update algorithm, update the vector weights of the user's historical behavior vector and the model parameters in the virtual character generation model.

8. A virtual character generation device, characterized in that, The device includes: The extraction unit is used to extract the user's historical behavior vector from a preset vector database based on the user's game identifier; The acquisition unit is used to acquire the multimodal game data corresponding to the game identifier, and perform scene semantic analysis on the multimodal game data to obtain a scene semantic fusion vector; The generation unit is used to generate a target virtual character containing appearance features, behavior patterns and dialogue content based on the user's historical behavior vector, the scene semantic fusion vector and the initial virtual character template, so as to use the target virtual character to interact with the user.

9. An electronic device, characterized in that, include: The processor and the memory used to store computer programs that can run on the processor. When the processor is used to run the computer program, it performs the method according to any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method according to any one of claims 1 to 7.