Virtual element regulation and control method in simulation deduction based on large model, electronic equipment, storage medium and program product
Through the simulation deduction method based on the big model, the virtual scene layout is analyzed and adjusted, and the virtual character reaction actions are generated, which solves the problem of lack of authenticity and diversity of virtual characters and virtual scene behaviors in the existing technology, and the dynamic adaptability and interactivity of simulation exercises are improved.
Patent Information
- Application Number
- CN202510585870.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-08
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2045-05-08
AI Technical Summary
The existing simulation deduction system is difficult to dynamically reproduce the uncertainty in real confrontation, resulting in a lack of authenticity and diversity in the behavior of virtual characters and virtual scenes.
Using a simulation deduction method based on big models, we obtain historical confrontation data between virtual characters and players, analyze and adjust the layout of virtual scenes, generate reaction actions of virtual characters against players, and achieve dynamic adaptation and interactive improvement.
It significantly improves the dynamic adaptability and interactivity of simulation exercises, allowing players to experience a more realistic and challenging simulation exercise environment.
Smart Images

Figure CN120105755A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of computer human-computer interaction, and in particular to a control method, electronic device, storage medium and program product for virtual elements in simulation deduction based on a large model. Background Art
[0002] Simulation deduction systems are usually used in confrontation games, military training, emergency drills, and various types of simulated confrontation exercises. In these highly simulated application scenarios, the behavior logic of virtual characters and the dynamic changes of virtual scenes are important indicators for measuring the authenticity and effectiveness of training exercises. However, in related technologies, it is difficult for virtual scenes and virtual characters' behaviors to dynamically reproduce the uncertainty in real confrontations. In view of this, there is an urgent need for a method for regulating virtual elements in simulation deduction to enable virtual characters and virtual scenes to dynamically adapt to the current player behavior, simulate actual exercise scenes more realistically, and provide players with a more immersive and challenging simulation exercise experience. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide a method for controlling virtual elements in simulation deduction based on a large model, an electronic device, a storage medium and a program product, so as to achieve the technical effect of improving the dynamic adaptability and interactivity of simulation exercises.
[0004] In a first aspect, an embodiment of the present application provides a method for controlling virtual elements in a simulation based on a large model, wherein the virtual elements include virtual characters and virtual scenes; the method includes: Acquire historical confrontation data between the virtual character and the player at the historical moment of the simulation; the historical confrontation data includes historical behavior data of the virtual character, historical behavior data of the player, and historical layout data of the virtual scene; wherein the historical behavior data of the virtual character carries a personality tag of the virtual character; Analyze the virtual character historical behavior data, the player historical behavior data, and the virtual scene historical layout data to determine the evaluation results of the confrontation authenticity and confrontation difficulty of the virtual scene at the historical moment; Adjust the historical layout of the virtual scene based on the evaluation result to obtain a target virtual scene; The player's historical behavior data and the virtual character's personality tag are input into a behavior generation model to obtain a reaction action of the virtual character to the player; the reaction action is used to instruct the virtual character to confront the player with the reaction action in the target virtual scene.
[0005] In the above implementation process, by obtaining the historical confrontation data between the virtual characters and players in the simulation system, including virtual character behavior, player behavior and virtual scene layout, and evaluating the authenticity and difficulty of the confrontation based on these data, the virtual scene layout is then adjusted according to the evaluation results, and the virtual character's current reaction actions to the player are generated, which significantly improves the dynamic adaptability and interactivity of the simulation exercise, allowing players to experience a more realistic and challenging simulation exercise environment.
[0006] Furthermore, before obtaining the historical confrontation data between the virtual character and the player at the historical moment of the simulation, the method further includes: In response to a scene generation instruction carrying scene image data, performing scene feature recognition processing on the scene image data using a preset recognition model to obtain scene features; The virtual scene is generated using the scene features.
[0007] In the above implementation process, the virtual scene is generated by identifying the features of the scene image data, thereby increasing the customization and diversity of the scene.
[0008] Furthermore, before obtaining the historical confrontation data between the virtual character and the player at the historical moment of the simulation, the method further includes: Input preset role attributes, role behavior patterns, and role background stories into a role reasoning model to obtain basic role parameters, and use the basic role parameters to construct the virtual role; the basic role parameters include role description information, role dialogue text, and role behavior script; wherein the role description information includes the personality label of the virtual role; the role dialogue text includes the sentence text of the virtual role that conforms to the personality label of the virtual role, the role behavior script is used to indicate a variety of personalized behaviors that conform to the personality label of the virtual role, and the reaction action is any one or more of the multiple personalized behaviors.
[0009] In the above implementation process, by inputting role attributes, behavior patterns, and background stories into the role reasoning model, a virtual character with rich personality traits and personalized behaviors can be constructed, enhancing the immersion and realism of the simulation exercise.
[0010] Furthermore, after constructing the virtual character using the character basic parameters, the method further includes: Obtaining preset confrontation rules of the virtual character, wherein the preset confrontation rules include attack range calculation rules, damage calculation rules, dialogue content generation rules, dialogue mode selection rules, decision process generation rules, and strategy selection rules; The step of inputting the player's historical behavior data and the virtual character's personality tag into a behavior generation model to obtain a reaction action of the virtual character to the player includes: The player's historical behavior data, the virtual character's personality label, and the preset confrontation rule are input into the behavior generation model to obtain the reaction action that meets the preset confrontation rule.
[0011] In the above implementation process, by introducing preset confrontation rules, it is ensured that the reaction actions of the virtual characters are consistent with their personality labels and the exercise logic and rules, thereby improving the fairness and playability of the simulation exercise.
[0012] Furthermore, the virtual character historical behavior data includes virtual character historical position change data and virtual character historical action data; the player historical behavior data includes player historical position change data and player historical action data; the historical layout includes historical environment parameters, historical obstacle layout, and historical prop distribution; The analyzing the virtual character historical behavior data, the player historical behavior data, and the virtual scene historical layout data to determine the evaluation result of the confrontation authenticity and confrontation difficulty of the virtual scene at the historical moment includes: Analyze the virtual character's historical position change data and the player's historical position change data to determine a confrontation authenticity result, analyze the virtual character's historical action data and the virtual character's historical action data to determine a confrontation difficulty result, and obtain the evaluation result including the confrontation authenticity result and the confrontation difficulty result; The adjusting the historical layout of the virtual scene based on the evaluation result to obtain a target virtual scene includes: The historical environment parameters are adjusted based on the comparison result of the confrontation authenticity result with the preset authenticity threshold, and the historical obstacle layout and the historical prop distribution are adjusted based on the comparison result of the confrontation difficulty result with the preset difficulty threshold to obtain the target virtual scene.
[0013] In the above implementation process, the authenticity and difficulty of the virtual scene confrontation are determined by analyzing historical confrontation data, and the virtual scene layout is adjusted accordingly, thereby achieving dynamic optimization of the virtual scene.
[0014] Furthermore, the method further comprises: Clustering the historical behavior data of the virtual character at the historical moment to obtain a plurality of first clusters, each of the first clusters being used to characterize a type of virtual character behavior; Clustering the player's historical behavior data at the historical moment to obtain a plurality of second clusters, each of the second clusters being used to characterize a category of player character behavior; Clustering the virtual scene historical layout data at the historical moment to obtain a plurality of third clusters, each of the third clusters being used to characterize a type of scene; Determine a cluster set time series based on the association relationship between each of the first clusters, each of the second clusters, and each of the third clusters; the cluster set time series includes a plurality of cluster sets arranged in time; each of the cluster sets includes a type of the virtual character behavior, a category of the player character behavior, and a type of the scene that are mutually associated; Determining a conversion rule between at least two of the cluster sets that are consecutive in time from the cluster set time series; Determining the reaction weakness of the virtual character from the conversion rule; The behavior generation model is updated based on the reaction weakness to obtain an updated behavior generation model.
[0015] In the above implementation process, by performing cluster analysis on historical confrontation data and scene layout data, the associations and conversion rules between virtual characters, player behaviors, and virtual scenes were determined, thereby identifying the reaction weaknesses of virtual characters and updating the behavior generation model accordingly, thereby improving the intelligence level and reaction ability of virtual characters, and continuously improving the overall quality and playability of simulation exercises.
[0016] Further, the behavior generation model includes a behavior strategy decision layer and a behavior generation layer connected in sequence; The step of adjusting the behavior generation model based on the reaction weakness to obtain an updated behavior generation model includes: In the case where the reaction weakness indicates that the accuracy of the virtual character behavior generated by the behavior generation layer does not exceed a first preset threshold, dividing the behavior generation layer into a plurality of behavior sub-generation layers according to a plurality of behavior types, each of the behavior sub-generation layers being used to generate a corresponding type of behavior; the plurality of behavior types including attack, defense, and movement; In the case where the reaction weakness indicates that the accuracy of the virtual character behavior strategy generated by the behavior strategy decision layer does not exceed a second preset threshold, the behavior strategy decision layer is divided into a plurality of behavior strategy sub-decision layers according to a plurality of strategy types, each of the behavior strategy sub-decision layers being used to generate a corresponding type of behavior strategy; the plurality of strategy types including path planning strategy, competitive confrontation strategy, task execution strategy, and patrol and standby strategy; Determine the updated behavior generation model including a plurality of the behavior sub-generation layers or a plurality of the behavior strategy sub-decision layers.
[0017] In the above implementation process, hierarchical optimization is performed for reaction weaknesses. When the behavior accuracy of the virtual character in the behavior generation layer is insufficient, it is subdivided into multiple behavior sub-generation layers that focus on specific behavior types such as attack, defense, and movement to improve the accuracy and pertinence of behavior generation. Similarly, when the behavior strategy accuracy of the behavior strategy decision layer does not meet the standard, it is subdivided into multiple behavior strategy sub-decision layers responsible for specific strategy types such as path planning and competitive confrontation to enhance the rationality and effectiveness of strategy formulation. Using this hierarchical optimization strategy can significantly improve the intelligence level of virtual characters and their ability to cope with complex exercise environments, providing players with a richer, more varied, and challenging exercise experience.
[0018] A second aspect of an embodiment of the present application provides an electronic device, the electronic device comprising: processor; a memory for storing processor-executable instructions; Wherein, when the processor calls the executable instruction, any method described in the first aspect is implemented.
[0019] A third aspect of an embodiment of the present application provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of any method described in the first aspect.
[0020] A fourth aspect of the embodiments of the present application provides a computer program product, wherein the computer program product includes a computer program, and when the computer program is executed by a processor, any method described in the first aspect is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0022] Figure 1 A schematic diagram of a flow chart of a method for controlling virtual elements in a simulation based on a large model according to an embodiment of the present application; Figure 2 A schematic diagram of the overall process of a control system provided in an embodiment of the present application; Figure 3 A schematic diagram of a scene dynamic adjustment process provided in an embodiment of the present application; Figure 4 A structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0023] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0024] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0025] In confrontation games, military training, emergency drills, and various simulated confrontation exercises, the generation of virtual enemy characters and the design of training scenarios play an important role in improving training effectiveness, enhancing players' coping capabilities, and strategic planning. Traditional methods of generating virtual enemy characters and setting scenarios often rely on artificially preset rules and scripts, which not only limits the diversity and intelligence of virtual enemy characters' behaviors, but also makes it difficult to dynamically adjust scenarios according to the actual progress of simulation exercises, thus affecting the authenticity and effectiveness of training.
[0026] With the rapid development of artificial intelligence technology, especially the widespread application of large language models and image recognition models, new possibilities have been provided for the intelligent generation of virtual enemy characters and the dynamic adaptation of training scenarios. However, how to effectively integrate these large model technologies into the simulation and deduction system to achieve the autonomous generation of virtual enemy characters, behavior prediction and dynamic adaptation, and real-time adjustment of training scenarios has become a technical problem that needs to be solved urgently.
[0027] In other words, in the relevant technology, the simulation deduction system relies on preset rules, and often cannot be dynamically adjusted and optimized according to the actual reaction of the players and the changes in the exercise process, resulting in a significant reduction in the training effect, and cannot fully demonstrate the complexity and variability of the real battlefield environment, thereby reducing the authenticity of the simulation exercise. In addition, when the simulation deduction system processes the behavior of the virtual enemy role, due to the lack of an effective prediction and adaptation mechanism, the behavior of the virtual enemy role often appears to be single and mechanical, and cannot truly reflect the enemy role strategy and behavior pattern in the actual confrontation. This limitation not only weakens the fun and challenge of the simulation exercise, but also limits the players' understanding and mastery of tactical strategies during the training exercise. Therefore, there is an urgent need for a method for regulating virtual elements in simulation deduction to achieve regulation of virtual elements including virtual enemy roles and virtual scenes, which can dynamically adjust and optimize the behavior or attributes of virtual elements according to the actual reaction of the players and the changes in the exercise process, so as to more realistically simulate the actual confrontation environment and provide players with a more immersive and challenging exercise experience.
[0028] In response to any of the above-mentioned problems, the present application provides a method for controlling virtual elements in a simulation based on a large model, referring to Figure 1 , Figure 1 A flowchart of a method for controlling virtual elements in a large-model-based simulation provided in an embodiment of the present application.
[0029] In this embodiment, the virtual elements include virtual characters and virtual scenes; the method includes: Step S10: obtaining historical confrontation data between the virtual character and the player at the historical moment of the simulation; the historical confrontation data includes historical behavior data of the virtual character, historical behavior data of the player, and historical layout data of the virtual scene; wherein the historical behavior data of the virtual character carries a personality tag of the virtual character; It should be noted that this embodiment provides a method for regulating virtual elements in simulation deduction based on a large model, which is suitable for an exercise training application scenario that requires dynamic adjustment of virtual scenes and virtual character behaviors, including confrontation games, military training, emergency drills, and various simulated confrontation exercise application scenarios, so as to achieve the effect of improving the quality of exercises in all aspects.
[0030] This embodiment does not limit the time length of the historical moment. The historical moment may refer to a period of time in the past, such as the past hour, or to a certain time point in the past, such as the previous minute.
[0031] In addition to the historical behavior data of virtual characters, the historical behavior data of players, and the historical layout data of virtual scenes, the historical confrontation data may also include the positions of virtual characters and players in the virtual scenes, their respective health status (including health value, energy value, and physical strength value, which can reflect the survival or combat ability of virtual characters and players), their respective equipment status (equipment, weapons, and props used), their respective skill status (virtual characters and players' learned skills and their cooling time and duration), their respective emotional states (which can be anger, fear, excitement, etc., which affect their behavioral choices), their respective resource states (the number of resources owned, such as gold coins, materials, and experience points), and the member status of their respective teams. Among them, the historical behavior data of virtual characters reflects the past behaviors of virtual characters in the simulation deduction system, and these behaviors can reflect the personality and strategies of virtual characters. The historical behavior data of virtual characters carries the personality tags of virtual characters, which help to understand the behavior patterns of virtual characters. The historical behavior data of players also reflects the past behaviors of players in the simulation deduction system, such as movement, attack, defense, etc. These data help to analyze the confrontation style and strategy of players. The virtual scene historical layout data records the layout of the exercise scene at past moments, including historical terrain, historical obstacle distribution, historical prop resource distribution, etc.
[0032] Step S20: analyzing the virtual character historical behavior data, the player historical behavior data, and the virtual scene historical layout data to determine the evaluation results of the confrontation authenticity and confrontation difficulty of the virtual scene at the historical moment; As an example, machine learning or statistical models can be used in combination with historical confrontation data to analyze whether the virtual scenes in which players and virtual characters are located are natural and realistic, and to determine whether the current confrontation difficulty meets the exercise difficulty selected by the players before entering the exercise. Ultimately, an evaluation result of the confrontation authenticity and difficulty can be obtained. The evaluation result can be used to indicate which aspects of the virtual exercise scene need to be improved or optimized.
[0033] Step S30: adjusting the historical layout of the virtual scene based on the evaluation result to obtain a target virtual scene; For example, based on the evaluation results, the scene layout is adjusted, such as changing the terrain, adding or reducing obstacles, adjusting the distribution of prop resources, etc., to generate a target virtual scene that better meets the realism and difficulty requirements of the confrontation.
[0034] Step S40: inputting the player's historical behavior data and the virtual character's personality label into a behavior generation model to obtain a reaction action of the virtual character to the player; the reaction action is used to instruct the virtual character to confront the player with the reaction action in the target virtual scene.
[0035] It should be noted that the behavior generation model can be a deep learning model or a large language model, etc. The generation ability of the behavior generation model can generate reactions for the virtual character that are consistent with its personality characteristics and the current exercise situation. As an example, the behavior generation model is used to generate reaction actions for the large language model: before the large language model is deployed, the large language model is fine-tuned to better adapt to the language and data characteristics of the corresponding application field (such as the application field of confrontation games, the application field of military training, the application field of emergency drills, etc.). This example uses the application field of confrontation games as an example. The fine-tuned large language model can generate outputs related to the input data based on the language patterns and knowledge learned during its training. The output of the fine-tuned large language model can be a narrative reaction instruction (such as "the virtual character should launch a surprise attack on the player to show its brave character") or a specific action description (such as "the virtual character should move to position X and then perform attack action Y"), which needs to be parsed into instructions or actions that can be executed by the game engine. After the fine-tuned large language model is deployed, the player's historical behavior data is collected and sorted, and the player's historical behavior data is converted into a format that the large language model can understand. Specifically, the behavior sequence can be encoded into a text description or a serialized data format, where the player's historical behavior data can include the player's actions, decisions, interaction patterns, etc. At the same time, the personality label of the virtual character is determined and also converted into a format that the large language model can understand, such as a text description or an embedding vector. Then, the converted player's historical behavior data and the virtual character's personality label are input into the large language model, and the model generates reaction instructions or action descriptions based on these input data. Next, the output generated by the large language model is parsed and converted into instructions or actions that can be executed by the game engine, and these instructions or actions are executed in the game engine, so that the virtual character interacts with the player according to the generated reaction. In this way, the virtual character behavior seen by the player in the game will be more intelligent and natural, consistent with its personality characteristics, and adapted to the current game scene and difficulty.
[0036] In this embodiment, by collecting and analyzing confrontation data, optimizing virtual scene layout and virtual character behavior, the aim is to improve the confrontation authenticity and difficulty of the simulation exercise, while increasing the fun and challenge of the simulation exercise. In addition, by introducing the personality label and behavior generation model of the virtual character, a more intelligent and personalized virtual character reaction action can be generated, thereby achieving the purpose of enhancing the player's exercise experience.
[0037] Based on any of the above embodiments, a method for controlling virtual elements in a simulation based on a large model comprises the following steps: Acquire historical confrontation data between the virtual character and the player at the historical moment of the simulation; the historical confrontation data includes historical behavior data of the virtual character, historical behavior data of the player, and historical layout data of the virtual scene; Analyze the virtual character historical behavior data, the player historical behavior data, and the virtual scene historical layout data to determine the evaluation results of the confrontation authenticity and confrontation difficulty of the virtual scene at the historical moment; The historical layout of the virtual scene is adjusted based on the evaluation result to obtain a target virtual scene.
[0038] It should be noted that this embodiment provides a method for regulating scenes in a simulation deduction system, which is applicable to a simulated confrontation exercise application scenario that requires dynamic adjustment of the virtual exercise scene to adapt to different player levels or exercise stages, so as to achieve the effect of improving the playability of the simulated confrontation. Specifically, first, the historical confrontation data between the virtual character and the player is collected. Then, by analyzing these historical data, the evaluation results of the confrontation authenticity and confrontation difficulty of the virtual scene at the historical moment are determined. Then, based on the above evaluation results, the historical layout of the virtual scene is adjusted to ensure that the exercise scene can provide players with a real and challenging experience.
[0039] In this embodiment, the virtual scene layout is optimized through data analysis to optimize the confrontation authenticity and difficulty of the simulation exercise.
[0040] Based on any of the above embodiments, a method for controlling virtual elements in a simulation based on a large model comprises the following steps: Acquire historical confrontation data between the virtual character and the player at the historical moment of the simulation; the historical confrontation data includes historical behavior data of the virtual character, historical behavior data of the player, and historical layout data of the virtual scene; wherein the historical behavior data of the virtual character carries a personality tag of the virtual character; the historical layout data of the virtual scene is used to characterize the virtual scene where the virtual character and the player are located; The player's historical behavior data and the virtual character's personality tag are input into a behavior generation model to obtain a reaction action of the virtual character to the player; the reaction action is used to instruct the virtual character to fight against the player with the reaction action in the virtual scene.
[0041] It should be noted that this embodiment provides a method for regulating the behavior of virtual characters in a simulation deduction system, which is applicable to a simulated confrontation exercise application scenario that requires the virtual character to have highly intelligent and personalized behavior, so as to achieve the effect of enhancing the immersion and interactivity of the confrontation exercise. Specifically, first, historical confrontation data is collected, wherein the historical confrontation data includes the personality label of the virtual character. Then, the player's historical behavior data and the virtual character's personality label are input into the behavior generation model, and artificial intelligence technology is used to predict and generate the virtual character's reaction action to the player at the next moment. The reaction action needs to be consistent with the personality characteristics of the virtual character and can generate meaningful interaction with the player's behavior to improve the quality of the player's interactive experience.
[0042] In this embodiment, by introducing a behavior generation model and combining the player's historical behavior data with the virtual character's personality label, the generation of intelligent and personalized reaction actions of the virtual character in the exercise is achieved, thereby enhancing the immersion and interactivity of the simulation exercise.
[0043] Based on any of the above embodiments, before step S10, the method further includes: In response to a scene generation instruction carrying scene image data, performing scene feature recognition processing on the scene image data using a preset recognition model to obtain scene features; The virtual scene is generated using the scene features.
[0044] It should be noted that the scene image data may be picture data or video data input by the exercise developer or acquired by calling the exercise library.
[0045] Specifically, first, after receiving the scene generation instruction, the instruction needs to be parsed to identify the scene image data carried by the instruction. Then, the scene image data is processed using a trained recognition model that can identify key features in the scene image to extract key scene features in the scene image data, which may be topography, buildings, vegetation, lighting conditions, etc. In addition, the extracted key scene features may be further processed by denoising, enhancement, classification, etc. to ensure the accuracy and efficiency of the subsequent steps of generating exercise scenes using scene features. Then, a virtual scene is constructed based on the identified and processed scene features. Optionally, in a competitive game application scenario, the scene feature data is mapped to the corresponding module of the game engine to generate a realistic virtual scene.
[0046] In this embodiment, scene features are extracted through the recognition model, and the scene features are used to generate a virtual scene, thereby improving the efficiency and accuracy of scene generation.
[0047] Based on any of the above embodiments, before step S10, the method further includes: Input preset role attributes, role behavior patterns, and role background stories into a role reasoning model to obtain basic role parameters, and use the basic role parameters to construct the virtual role; the basic role parameters include role description information, role dialogue text, and role behavior script; wherein the role description information includes the personality label of the virtual role; the role dialogue text includes the sentence text of the virtual role that conforms to the personality label of the virtual role, the role behavior script is used to indicate a variety of personalized behaviors that conform to the personality label of the virtual role, and the reaction action is any one or more of the multiple personalized behaviors.
[0048] It should be noted that character attributes refer to the basic attributes of a virtual character, such as age, gender, appearance characteristics, skills, etc.
[0049] Character behavior patterns describe how a character might behave in different situations. For example, a brave warrior might charge ahead in a combat exercise, while a cunning thief might prefer stealth and theft.
[0050] A character's backstory provides information about the character's history, motivations, and relationships with other characters. The backstory helps to enrich the character's personality and behavior.
[0051] A role reasoning model refers to a model that can generate the basic parameters of a role based on input information. The role reasoning model can be any one of a variety of large language models with reasoning capabilities or a model obtained by combining any number of them. For example, DeepMind's AlphaCode model (this model builds a role by understanding the role's programming logic and behavior patterns), OpenAI's Codex model, Meta's Code Llama (this model is mainly used to generate behaviors and dialogues that match the role's professional background), and a general large model combined with a reasoning module (some general large models, such as the GPT series and BERT, although they do not have a dedicated reasoning module themselves, can enhance their role reasoning capabilities by combining additional reasoning algorithms or modules).
[0052] The character description information includes the character's personality tags, such as: brave, cunning, kind, etc.
[0053] Character dialogue text refers to the sentence text that conforms to the character's personality label. These texts can be used for character dialogue and interaction in exercises.
[0054] A character behavior script refers to a script of multiple personalized behaviors that conform to the character's personality labels. These behaviors may include the character's actions, reactions, decisions, etc.
[0055] As an example, using technical means such as 3D modeling, animation production and interactive system design, the basic parameters of virtual characters are transformed into virtual character entities with vivid appearance, personalized dialogue and rich behavior patterns.
[0056] In this embodiment, by inputting preset character attributes, behavior patterns, and background stories into the character reasoning model, basic character parameters are generated, and based on this, a virtual character with distinct personality traits, personalized dialogues, and diversified behaviors is constructed, thereby providing players with a more vivid, realistic, and interesting confrontation exercise interactive experience.
[0057] On the basis of any of the above embodiments, after constructing the virtual character using the character basic parameters, the method further includes: Obtaining preset confrontation rules of the virtual character, wherein the preset confrontation rules include attack range calculation rules, damage calculation rules, dialogue content generation rules, dialogue mode selection rules, decision process generation rules, and strategy selection rules; It should be noted that the preset confrontation rules are the basis for guiding the behavior and decision-making of the virtual character when the virtual character interacts with the player. The preset confrontation rules include but are not limited to attack range calculation rules, damage calculation rules, dialogue content generation rules, dialogue method selection rules, decision process generation rules, and strategy selection rules.
[0058] The attack range calculation rule is used to characterize the spatial range in which the virtual character can launch an attack; the damage calculation rule is used to characterize the damage value that the virtual character can cause when attacking; the dialogue content generation rule is used to instruct the generation of dialogue content that conforms to the current situation; the dialogue method selection rule is used to instruct the selection of one or more dialogue methods that conform to the personality label of the virtual character from a variety of dialogue methods; the decision process generation rule is used to instruct the generation of a series of decision steps to guide the behavior of the virtual character; the strategy selection rule is used to instruct the selection of a strategy that conforms to the current state of the virtual character to deal with the player.
[0059] Specifically, the attack range calculation rules define the range that the virtual character can reach when attacking.
[0060] Damage calculation rules: Determine how to calculate the damage value when the virtual character attacks or is attacked.
[0061] Dialogue content generation rules: specify how the virtual character should generate dialogue content that is consistent with its personality and situation when talking to the player.
[0062] Dialogue method selection rules: Determine the method (such as direct, indirect, humorous, etc.) used by the virtual character when communicating with the player.
[0063] Decision-making process generation rules: define the process of how virtual characters make decisions when faced with different situations.
[0064] Strategy selection rules: stipulate how the virtual character should choose the appropriate strategy to deal with the player when confronting him.
[0065] The step of inputting the player's historical behavior data and the virtual character's personality tag into a behavior generation model to obtain a reaction action of the virtual character to the player includes: The player's historical behavior data, the virtual character's personality label, and the preset confrontation rule are input into the behavior generation model to obtain the reaction action that meets the preset confrontation rule.
[0066] It should be noted that, in addition to inputting the player's historical behavior data and the virtual character's personality label into the behavior generation model, this embodiment also adds preset confrontation rules as input. This is to ensure that the generated virtual character's reaction actions not only conform to its personality label, but also conform to the preset confrontation rules, thereby making the virtual character's behavior more reasonable and controllable.
[0067] Specifically, the player's historical behavior data (such as past actions, decisions, conversations, etc.) and the virtual character's personality labels (such as bravery, cunningness, kindness, etc.) are used as input and sent to the behavior generation model. The behavior generation model can generate virtual character reaction actions that conform to the preset confrontation rules based on the input data and labels. The generated reaction action can be an action, a sentence, a decision, etc. of the virtual character.
[0068] In this embodiment, by setting preset confrontation rules for the virtual character and using the behavior generation model to generate reaction actions according to the player's historical behavior data and the personality label of the virtual character, the controllability and rationality of the virtual character's behavior are achieved, making the virtual character's behavior more in line with the player's expectations and the logic of the simulated confrontation exercise.
[0069] Based on any of the above embodiments, the virtual character historical behavior data includes virtual character historical position change data and virtual character historical action data; the player historical behavior data includes player historical position change data and player historical action data; the historical layout includes historical environment parameters, historical obstacle layout, and historical prop distribution; The analyzing the virtual character historical behavior data, the player historical behavior data, and the virtual scene historical layout data to determine the evaluation result of the confrontation authenticity and confrontation difficulty of the virtual scene at the historical moment includes: Analyze the virtual character's historical position change data and the player's historical position change data to determine a confrontation authenticity result, analyze the virtual character's historical action data and the virtual character's historical action data to determine a confrontation difficulty result, and obtain the evaluation result including the confrontation authenticity result and the confrontation difficulty result; It should be noted that the historical position change data records the movement trajectory of the virtual characters and players in the simulated confrontation exercise scene. The historical position change data may include the coordinate information, movement speed, movement direction, etc. of the virtual characters and players in the simulated confrontation exercise scene. The historical action data records the various actions performed by the virtual characters and players, such as attacking, defending, picking up props, etc. The historical layout is used to describe the physical environment and resource distribution of the simulated confrontation exercise scene.
[0070] In the specific implementation, the application scenario of the confrontation game is used as an example. By analyzing the historical position change data of the virtual character and the player, the positions of both parties can be determined. In the confrontation game, the scene needs to change dynamically according to the behavior and position of the player. For example, when the player and the virtual character enter a new area, the game scene needs to be updated accordingly to show the new environment, obstacles and props. Therefore, the confrontation authenticity of the virtual scene can be determined by judging whether the current game scene is adapted to the current positions of both parties. In addition, in addition to being used to characterize whether the scene and the virtual character and the player's position are adapted, the confrontation authenticity can also be used to characterize whether the interactive confrontation behavior between the virtual character and the player is reasonable and real enough. Specifically: by comparing the movement trajectories of the player and the virtual character, it can be judged whether they have enough interaction and conflict. If the movement trajectories of the two parties in the game are intertwined with each other, and there is frequent interaction and confrontation, then the confrontation can be considered to be real. On the contrary, if the movement trajectories of the two parties in the game are independent of each other and lack interaction and confrontation, then the confrontation can be considered to be unreal. As an example, historical position change data can also be used to assist in evaluating the difficulty balance of the game. Specifically, by comparing the relative positions and movement speeds of the player and the virtual character, it can be determined whether the game is too easy or too difficult. If the player can easily avoid the attacks of the virtual character and defeat them, then the game may be too easy. On the contrary, if the player has difficulty approaching the virtual character and is under continuous attack, then the game may be too difficult. The difficulty of the game can be balanced by adjusting the scene environment, obstacles, and props distribution, so that players can enjoy a more balanced and interesting gaming experience.
[0071] By comparing the action data of the virtual character and the player, we can analyze the behavior patterns and strategies of both parties in the game, and then judge the difficulty of the confrontation, that is, whether the behavior of both parties is balanced, and whether one party has a clear advantage or disadvantage. Combining the evaluation results of the authenticity and difficulty of the confrontation, we can get a comprehensive evaluation result, which reflects the confrontation quality of the current game scene and the game experience of the player.
[0072] The adjusting the historical layout of the virtual scene based on the evaluation result to obtain a target virtual scene includes: The historical environment parameters are adjusted based on the comparison result of the confrontation authenticity result with the preset authenticity threshold, and the historical obstacle layout and the historical prop distribution are adjusted based on the comparison result of the confrontation difficulty result with the preset difficulty threshold to obtain the target virtual scene.
[0073] It should be noted that the present embodiment does not impose any restrictions on the preset authenticity threshold and the preset difficulty threshold. Specifically, if the authenticity of the confrontation is insufficient, it can be improved by adjusting the environmental parameters, for example, increasing the light intensity or changing the weather conditions to increase the realism and immersion of the simulation exercise. If the difficulty of the confrontation is too high or too low, it can be balanced by adjusting the obstacle layout and the prop distribution, for example, increasing or reducing the number and position of obstacles, changing the type and number of props, to adjust the challenge and fun of the simulation exercise. After the above adjustments, a target virtual scene that better meets the preset requirements can be obtained, and the preset requirements can be selected by the player. The target virtual scene not only has a higher confrontation authenticity and difficulty balance, but also provides a better player exercise experience.
[0074] In this embodiment, through data analysis and scene layout adjustment, accurate evaluation and optimization of the authenticity and difficulty of virtual scene confrontation are achieved, making the simulation exercise scene more in line with the player's expectations and the logic of real exercises.
[0075] Based on any of the above embodiments, the method further includes: Clustering the historical behavior data of the virtual character at the historical moment to obtain a plurality of first clusters, each of the first clusters being used to characterize a type of virtual character behavior; Clustering the player's historical behavior data at the historical moment to obtain a plurality of second clusters, each of the second clusters being used to characterize a category of player character behavior; Clustering the virtual scene historical layout data at the historical moment to obtain a plurality of third clusters, each of the third clusters being used to characterize a type of scene; Determine a cluster set time series based on the association relationship between each of the first clusters, each of the second clusters, and each of the third clusters; the cluster set time series includes a plurality of cluster sets arranged in time; each of the cluster sets includes a type of the virtual character behavior, a category of the player character behavior, and a type of the scene that are mutually associated; Determining a conversion rule between at least two of the cluster sets that are consecutive in time from the cluster set time series; Determining the reaction weakness of the virtual character from the conversion rule; The behavior generation model is updated based on the reaction weakness to obtain an updated behavior generation model.
[0076] It should be noted that, first, the virtual character behavior data at historical moments are clustered and analyzed to obtain multiple first clusters, each cluster representing a type of virtual character behavior, such as attack behavior, defense behavior, movement behavior, etc. Through cluster analysis, similar virtual character behaviors are classified together, which is convenient for subsequent analysis of the relationship between them and player behavior and virtual scenes. Next, the player behavior data at historical moments are clustered and analyzed to obtain multiple second clusters, each cluster representing a category of player behavior, such as offensive, defensive, exploratory, etc. Through cluster analysis, similar player behaviors are classified together, which helps to understand the player's confrontation style and strategy. Then, the virtual scene layout data at historical moments are clustered and analyzed to obtain multiple third clusters, each cluster representing a type of scene, such as a scene including a forest, a scene including a desert, and a scene including a city. Through cluster analysis, similar virtual scene layouts are classified together, which helps to understand the impact of different scenes on exercise confrontation, and facilitates the subsequent analysis of the relationship between scenes and virtual characters and player behaviors. Based on the association relationship between each first cluster, the second cluster, and the third cluster, a cluster set time series is determined, which includes multiple cluster sets arranged in time, and each cluster set includes a type of virtual character behavior, a category of player behavior, and a type of scene that are interrelated. By constructing a cluster set time series, the evolution of different behavior patterns and scene layouts during the exercise can be reflected, and the dynamic interaction process between virtual characters, players, and virtual scenes can also be clearly displayed. It should be understood that certain virtual character behaviors may trigger specific reactions of players, and these reactions may change the layout of virtual scenes. In some cases, virtual characters or players in specific scenes are often prone to make confrontational reaction actions that are not conducive to their own victory due to their inability to adapt to the scene. Then, the conversion rules between at least two cluster sets that are continuous in time are determined from the cluster set time series. These conversion rules describe the behavior changes and scene conversions of virtual characters, players, and virtual scenes at different time points. By determining the conversion rules, we can gain a deeper understanding of the dynamic process of the exercise confrontation, discover the first reaction mode of the virtual character in different scenarios and player behaviors, and / or discover the second reaction mode of the player in different scenarios and virtual character behaviors. In other words, by analyzing the conversion rules between cluster sets that are continuous in time, we can reveal the dynamic changes in the exercise behavior pattern, such as the virtual character switching from attack to defense, the player switching from exploration to combat, etc. Next, after determining the first reaction mode of the virtual character in different scenarios and player behaviors based on the conversion rules, we can find the reaction weaknesses of the virtual character based on the first reaction mode. In addition, we can find the reaction weaknesses of the player based on the second reaction mode.The reaction weakness of the virtual character may refer to the mistakes or deficiencies that the virtual character is prone to in a specific scene or when facing a specific player's behavior. Similarly, the reaction weakness of the player may also refer to the mistakes or deficiencies that the player is prone to in a specific scene or when facing a specific virtual character's behavior. By determining the reaction weakness of the virtual character, a basis for improving the virtual character behavior generation model can be provided for the exercise developer, making the behavior of the virtual character more realistic and challenging. In addition, by determining the reaction weakness of the player, a weakness analysis report can be provided for the player, so that the player can perform targeted combat power improvement according to the data shown in the weakness analysis report. In one case, the behavior generation model can be adjusted based on the reaction weakness of the player, so that the behavior of the virtual character can more effectively trigger the player's error reaction, thereby achieving the purpose of improving the challenge of the exercise. Finally, based on the determined virtual character reaction weakness, the behavior generation model for the virtual character is updated, which can be achieved by adjusting the parameters and algorithms of the model, so that the behavior generation model can generate virtual character behaviors that are more in line with the actual exercise confrontation situation.
[0077] In the specific implementation, first, the raw data from virtual characters, players, and scene changes are received and preliminarily processed in real time. The preliminary processing includes data cleaning (to remove duplicate, invalid, and abnormal data records) and data format conversion (converting real-time data into a unified data format). Next, the preliminarily processed data is stored in the database in timestamp order. Then, the principal component analysis feature extraction algorithm is used to extract key features from the stored data. The features include the behavior patterns of virtual characters, the reaction time of players, and the frequency of scene changes. Then, the cluster analysis K-means algorithm is used to analyze the extracted features and mine hidden patterns, association rules, and anomalies in the data; among them, the algorithm formula of cluster analysis is expressed as: For a given data set D={x 1 , x 2 , ..., x n}, through iterative optimization, the similarity of data points in the same cluster is high, and the similarity between different clusters is low. The specific algorithm is as follows: ; In formula 1, represents the center of the jth cluster at the t+1th iteration, represents the set of data points of the jth cluster, is the data point, is the number of data points in the cluster. Finally, based on the analysis results, the potential patterns and rules between the virtual character behavior, player reaction and scene changes are identified. In addition, the analysis results and the identified patterns can be organized into a report, which includes an overview of the data analysis, key findings, pattern recognition results, virtual character reaction weaknesses, player reaction weaknesses and recommended improvement measures for the weaknesses.
[0078] In this embodiment, through cluster analysis, the historical behavior data of virtual characters, players and virtual scenes are divided into multiple clusters, each cluster represents a specific type of behavior or scene. Clustering not only simplifies the complexity of the data, but also makes the subsequent analysis more efficient and accurate. On this basis, a cluster set time series is further constructed, which arranges multiple cluster sets containing interrelated virtual character behaviors, player character behaviors and virtual scene types in chronological order. By analyzing the continuity and conversion rules of these cluster sets in time, the reaction weaknesses of the virtual characters under specific scenes and player behaviors can be revealed. Then, based on these reaction weaknesses, the behavior generation model is updated to improve the accuracy and adaptability of the model, so that the behavior of the virtual characters is more in line with the expectations and exercise logic of the players.
[0079] Based on any of the above embodiments, the behavior generation model includes a behavior strategy decision layer and a behavior generation layer connected in sequence; The step of adjusting the behavior generation model based on the reaction weakness to obtain an updated behavior generation model includes: In the case where the reaction weakness indicates that the accuracy of the virtual character behavior generated by the behavior generation layer does not exceed a first preset threshold, dividing the behavior generation layer into a plurality of behavior sub-generation layers according to a plurality of behavior types, each of the behavior sub-generation layers being used to generate a corresponding type of behavior; the plurality of behavior types including attack, defense, and movement; It should be noted that the weakness of the virtual character's response is a specific manifestation of the poor performance of the behavior generation model at a specific level.
[0080] By dividing the behavior generation model into a behavior strategy decision layer and a behavior generation layer, and optimizing and adjusting these two layers based on the reaction weaknesses of the virtual character, the prediction accuracy and adaptability of the virtual character's behavior can be improved.
[0081] The behavior strategy decision layer is responsible for generating the behavior strategy of the virtual character, that is, deciding what kind of behavior the virtual character should take to achieve its goal. These strategies may include path planning strategies (used to instruct the virtual character how to move to the target location effectively), competitive confrontation strategies (used to instruct the virtual character how to compete with other players), task execution strategies (used to instruct the virtual character how to complete specific exercise tasks), and patrol and standby strategies (used to instruct the virtual character how to act when there is no specific task).
[0082] The behavior generation layer is responsible for generating specific behaviors of the virtual character based on the strategies generated by the behavior strategy decision layer. These behaviors may include attack, defense, movement, etc.
[0083] The first preset threshold is a preset value or range, which is used to determine whether the behavior generated by the virtual character behavior generation layer is accurate and whether it has reached the expected level and confrontation effect. When the accuracy of the behavior generated by the behavior generation layer is lower than this threshold, it is considered that the generated behavior is not accurate enough, and further adjustment and optimization are required. This embodiment does not limit the first preset threshold. The first preset threshold can be determined by analyzing a large amount of historical data. For example, the accuracy data of the virtual character's behavior generation in the past is analyzed, and then a threshold that can reflect these data characteristics is set. In addition, with the development of simulation exercises and changes in player needs, the first preset threshold can be dynamically adjusted.
[0084] It should be understood that the initial behavior generation layer can be a comprehensive layer, which is used to generate various behaviors of virtual characters. However, when the accuracy of the behaviors generated by this layer fails to meet the preset standards, it needs to be divided to improve the accuracy and professionalism of the generated behaviors. The behavior types of virtual characters include many types, not limited to attack, defense, and movement. The behavior generation layer can be divided into a corresponding number of behavior sub-generation layers according to the number of actual behavior types. For example, according to the three behavior types of attack, defense, and movement of virtual characters, the behavior generation layer is divided into an offensive behavior sub-generation layer (responsible for generating the offensive behavior of virtual characters, such as attacking, casting, using props, etc.), a defensive behavior sub-generation layer (responsible for generating the defensive behavior of virtual characters, such as dodging, blocking, counterattack, etc.), and a mobile behavior sub-generation layer (responsible for generating the mobile behavior of virtual characters, such as walking, running, jumping, etc.). By dividing the behavior generation layer into multiple behavior sub-generation layers, the management and generation of different behavior types can be achieved, which helps to improve the accuracy and authenticity of the behavior of virtual characters.
[0085] In the case where the reaction weakness indicates that the accuracy of the virtual character behavior strategy generated by the behavior strategy decision layer does not exceed a second preset threshold, the behavior strategy decision layer is divided into a plurality of behavior strategy sub-decision layers according to a plurality of strategy types, each of the behavior strategy sub-decision layers being used to generate a corresponding type of behavior strategy; the plurality of strategy types including path planning strategy, competitive confrontation strategy, task execution strategy, and patrol and standby strategy; It is understandable that subdividing the behavior strategy decision layer into multiple behavior strategy sub-decision layers is to enable each sub-decision layer to focus on generating a specific type of behavior strategy, thereby improving the accuracy and pertinence of behavior strategy generation.
[0086] The second preset threshold is used to measure whether the behavior strategy generated by the behavior strategy decision layer is accurate and reasonable. This embodiment does not limit the second preset threshold. It can be set according to the needs of the exercise design, the expectations of the players, and the behavioral characteristics of the virtual character. It can also be determined based on historical data, test results or the experience of the exercise developer to ensure that the generated behavior strategy is consistent with the exercise logic and can provide an interesting and challenging exercise experience. When the accuracy of the behavior strategy generated by the behavior strategy decision layer is lower than the second preset threshold, the behavior strategy decision layer needs to be divided. When the behavior strategy decision layer is divided into multiple sub-decision layers, each sub-decision layer focuses on generating corresponding types of behavior decisions. Among them, the strategy type can include multiple types. Although the path planning strategy, competitive confrontation strategy, task execution strategy, and patrol and standby strategy have covered most of the behavioral needs of the virtual character in the exercise, and can ensure that the virtual character can make reasonable responses according to different situations and scenarios, this embodiment does not limit the number and types of strategies.
[0087] It should be understood that the path planning strategy is responsible for planning a reasonable moving path for the virtual character to ensure that it can reach the target location efficiently. The path planning strategy involves obstacle avoidance, finding the shortest path, optimizing the moving speed and other aspects. Competitive confrontation strategy: In the exercise, the virtual character needs to compete with other players or enemies. The competitive confrontation strategy is responsible for providing the virtual character with effective attack, defense and counterattack strategies to ensure that it gains an advantage in the battle. Task execution strategy: The virtual character needs to complete various tasks in the exercise, such as finding items, defeating enemies, protecting teammates, etc. The task execution strategy is responsible for providing the virtual character with the strategies and methods required to complete the task to ensure that it can successfully complete the task. Patrol and standby strategy: In some cases, the virtual character needs to patrol or standby in a specific area. The patrol and standby strategy is responsible for providing the virtual character with reasonable patrol routes and standby behaviors to ensure that it can respond correctly when needed.
[0088] Determine the updated behavior generation model including a plurality of the behavior sub-generation layers or a plurality of the behavior strategy sub-decision layers.
[0089] It should be noted that the reason why the model's various levels are not divided into multiple sub-levels before the behavior generation model is deployed, but the sub-levels are divided only after the accuracy of the virtual character's reaction action does not reach the preset threshold, is because of the challenges and uncertainties before the model is deployed. Specifically, first, before the model is deployed, it is often difficult for exercise developers to fully predict all possible scenarios and player behaviors in the exercise, and the behavioral requirements of the virtual character are likely to change with the update and expansion of the exercise content. Second, dividing too many sub-levels in advance may cause the model structure to be too complex, increase the difficulty and cost of technical implementation, and exercise developers need to find a balance between the complexity and flexibility of the model. Third, before the model is deployed, there is often a lack of sufficient historical confrontation data to support the division and optimization of sub-levels. The collection and analysis of historical confrontation data usually needs to be carried out during the actual operation of the exercise to ensure the authenticity and validity of the data. In addition, there are the following advantages to dividing the sub-levels after the accuracy of the generated virtual character's reaction action is insufficient: First, by observing the behavior of the virtual character in the actual operation of the exercise, the exercise developer can more accurately identify the behavior type that needs to be optimized, which makes the division of sub-levels more targeted and can more effectively improve the accuracy and professionalism of behavior generation. Second, the post-division into sub-levels allows exercise developers to make dynamic adjustments based on changes in virtual scenarios and player behavior, which enhances the intelligence and adaptability of virtual characters, enabling them to better cope with various challenges in exercises.
[0090] In this embodiment, by subdividing the behavior generation layer into multiple behavior sub-generation layers, each sub-generation layer focuses on generating a specific type of behavior, thereby improving the generation efficiency of the behavior and ensuring the accuracy and diversity of the behavior. In addition, by subdividing the behavior strategy decision layer into multiple behavior strategy sub-decision layers, the virtual character can make more reasonable and efficient decisions when facing different situations, improving the behavior performance of the virtual character, enhancing the fun and challenge of the simulation exercise, and providing players with a richer and more realistic simulation exercise experience.
[0091] In addition, the embodiment of the present application provides a control system for virtual elements in a countermeasure game, such as Figure 2 As shown, Figure 2 The overall flow diagram of a control system provided in an embodiment of the present application is as follows: Figure 2 The enemy character generation module is the virtual character generation module described below.
[0092] In this embodiment, the system includes: Large model loading module, used to load pre-trained large language models and image recognition models as the basis for generating virtual character behaviors and scenes; The virtual character generation module uses the large model to generate virtual characters with specific attributes, skills and behaviors according to the exercise requirements and scenario settings; The scene dynamic construction module adjusts the environmental parameters, obstacle layout and prop distribution of the training scene in real time according to the exercise progress and the behavior of the virtual character; Interaction logic processing module, used to process the interaction logic between virtual characters and players, including combat, dialogue and strategy formulation; The behavior prediction and adaptation module uses the prediction capabilities of the large model to predict the possible behavior of the virtual character and dynamically adjust it according to the player's response; Data recording and analysis module, which records all data during the exercise, including the behavior of the virtual characters, the player's reactions and scene changes, for subsequent analysis and evaluation; The feedback and optimization module adjusts the parameters of the large model according to the results of the data recording and analysis module to optimize the generation of virtual characters and the dynamic adaptation of the scene; User interface module, which provides an intuitive operation interface, allowing players to easily control the exercise process and view relevant information; The multimodal output module provides output in multiple forms, including text, images, and sounds, to enhance the realism and immersion of training.
[0093] Optionally, the step of generating a virtual character by the virtual character generating module includes: Receive input on exercise requirements and scenario settings, including the number, type, and difficulty level of avatars; Leverage the text generation capabilities of large language models to generate background stories, personality traits, and combat styles of virtual characters; Assign corresponding skills and behavior patterns to the large language model based on the generated background story and personality traits; The generated virtual character information is stored in the database for subsequent calling and modification.
[0094] Optionally, the step of adjusting the training scene by the scene dynamic construction module includes: Monitor the progress of the exercise in real time to obtain the position, behavior and reaction of the virtual character; Based on the monitoring data, analyze whether the current scenario meets the exercise requirements, including difficulty, challenge, and authenticity; If the requirements are not met, the image recognition or generation capabilities of the large model are used to adjust the environmental parameters of the scene, including lighting, weather, and terrain; According to the behavior of the virtual character and the player's strategy, the obstacle layout and prop distribution are dynamically changed to increase the complexity and uncertainty of the scene.
[0095] Optionally, the step of the interaction logic processing module processing the interaction logic includes: Define the rules of interaction between virtual characters and players, including combat rules, dialogue rules, and strategy formulation rules; During the exercise, the interaction events between the virtual character and the player are judged in real time; Based on the interaction rules and event types, the big model is called to make behavioral decisions or generate dialogues; Provide real-time feedback to players on decision-making results or conversation content to promote the development of the exercise process.
[0096] Optionally, the step of predicting the behavior of the virtual character by the behavior prediction and adaptation module includes: Utilize the predictive power of the big model to analyze the current status, skills, and combat style of the virtual character; Combine the player's historical reactions and current behavior to predict the virtual character's likely next move; Dynamically adjust the behavior strategy of the virtual character based on the prediction results; Monitor the player's reactions and fine-tune the behavior prediction model if the predictions do not match the actual reactions.
[0097] Optionally, the detailed steps of recording and analyzing data by the data recording and analysis module include: Data preprocessing: real-time reception and preliminary processing of raw data from virtual characters, players, and scene changes. The processing process includes data cleaning to remove duplicate, invalid, or abnormal data records, and data format conversion to convert raw data into a unified data format. Data storage, storing the preprocessed data in the database in timestamp order; Feature extraction, using principal component analysis feature extraction algorithm to extract key features from the stored data, including the behavior patterns of virtual characters, the player's reaction time and the frequency of scene changes; Data analysis uses the K-means clustering algorithm to analyze the extracted features and mine hidden patterns, association rules, and anomalies in the data. The algorithm formula of clustering analysis is expressed as follows: For a given data set D={x 1 ,x 2 , ..., x n}, through iterative optimization, the similarity of data points in the same cluster is high, and the similarity between different clusters is low. The specific algorithm is shown in Formula 1 above.
[0098] Pattern recognition, based on the results of the analysis, identifies potential patterns and regularities between virtual character behaviors, player reactions, and scene changes; Report generation: Organize the analysis results and identified patterns into a report that includes an overview of the data analysis, key findings, pattern recognition results, and recommended improvement measures.
[0099] Optionally, the step of adjusting the large model parameters by the feedback and optimization module includes: Receive the evaluation report generated by the data recording and analysis module and analyze the problems and deficiencies therein; Depending on the problem type, determine the large model parameters or structures that need to be adjusted; Use optimization algorithms to iteratively train large models until the expected optimization effect is achieved; The optimized large model is reloaded into the system for subsequent exercise tasks.
[0100] Optionally, the operation interface provided by the user interface module includes: Exercise control area, used to control the start, pause, end and progress adjustment of the exercise; A virtual character information display area is used to display the attributes, skills and status of the virtual character; Player information display area, used to display the player's health, equipment and position; The scene display area displays the current status of the training scene in real time in the form of two-dimensional or three-dimensional images; The interactive operation area provides function buttons or input boxes for dialogue and combat interactions with virtual characters.
[0101] Optionally, the output forms supported by the multimodal output module include: Text output, used to display the dialogue content and combat prompt information of the virtual character; Image output, used to display two-dimensional or three-dimensional images of training scenes and images of virtual characters; Sound output, used to play the voice of virtual characters and combat sound effects; Tactile output, including vibration and force feedback to simulate physical collisions or impacts in combat.
[0102] Optionally, the system further comprises: Compatibility adaptation module for integration with existing exercise systems by providing standard API interfaces or data exchange formats.
[0103] It should be understood that by loading the pre-trained large language model and image recognition model, the intelligent generation and behavior prediction of virtual characters are realized, making the virtual characters more intelligent and behaviorally diverse. This highly realistic simulation environment can more accurately reflect the complexity and variability of the real battlefield environment, thereby greatly improving the authenticity and effectiveness of various exercises such as military training, emergency drills and simulated confrontation exercises.
[0104] The scenario dynamic construction module can adjust the environmental parameters, obstacle layout and prop distribution of the training scenario in real time according to the exercise process and the behavior of the virtual character. This dynamic adaptability ensures that the training scenario can closely follow the actual development of the exercise, providing players with a richer and more varied challenge environment, thereby enhancing their response capabilities and strategic planning capabilities.
[0105] The behavior prediction and adaptation module uses the powerful prediction ability of the large model to accurately predict the possible behavior of the virtual character and make instant adjustments based on the player's response. This not only makes the behavior of the virtual character closer to the strategy and behavior pattern of the virtual enemy character in the actual confrontation, but also greatly improves the pertinence and effectiveness of the training.
[0106] The data recording and analysis module comprehensively records all data during the exercise, including the behavior of virtual characters, the reactions of players, and scene changes. These data provide valuable resources for subsequent in-depth analysis and evaluation, helping to identify deficiencies and improvements in training, thereby optimizing training plans and improving training results.
[0107] The feedback and optimization module dynamically adjusts the parameters of the large model based on the results of data recording and analysis, and continuously optimizes the prediction generation of virtual character behavior and the dynamic adaptation of the scene. This continuous optimization process makes the system more flexible and intelligent, and can better adapt to different training needs and scene settings.
[0108] The multimodal output module provides output in various forms such as text, images and sounds, creating an all-round and multi-dimensional training environment for players. This immersive training experience can greatly stimulate the enthusiasm and participation of players and improve the training effect.
[0109] It should be noted that the large model loading module is responsible for loading pre-trained large language models and image recognition models. First, select large language models suitable for exercise needs from the model library, such as the GPT series or BERT series, and image recognition models, such as ResNet or YOLO series. These models are loaded into the system through the model loading interface to provide a basis for the subsequent generation of virtual character behaviors and scenes.
[0110] Virtual character generation module: Based on the specific needs and scenario settings of the exercise, this module uses the loaded large model to generate virtual characters. By inputting the character's attributes (such as arms, equipment, skills, etc.), behavior patterns (such as attack, defense, retreat, etc.) and background stories, the large model generates a virtual character with specific characteristics and behavior logic. The generated character data includes text descriptions, image features, and behavior scripts.
[0111] Dynamic scene construction module: This module adjusts the training scene in real time according to the exercise progress and the behavior of the virtual characters. By monitoring the real-time data of the exercise, such as the position of the players, the actions and combat status of the virtual characters, the module dynamically adjusts the environmental parameters (such as weather and lighting), obstacle layout (such as bunkers and traps), and prop distribution (such as weapons and supplies). The adjustment is achieved by calling the scene editor to ensure that the scene is closely related to the exercise progress.
[0112] Interaction logic processing module: This module is responsible for processing the interaction logic between virtual characters and players. By defining combat rules, dialogue mechanisms, and strategy formulation processes, the module implements combat interaction, information exchange, and strategic confrontation between virtual characters and players. The interaction logic is based on the predictive ability of the large model, enabling the virtual character to respond based on the player's behavior.
[0113] Behavior prediction and adaptation module: Using the prediction capability of the big model, this module predicts the possible behavior of the virtual character. By analyzing the historical data and current status of the virtual character and the player, the module predicts the next action of the virtual character and makes dynamic adjustments based on the player's response. Adjustments include modifying the behavior strategy of the virtual character, adjusting the battle rhythm, and changing the content of the dialogue to ensure the authenticity and challenge of the simulation exercise.
[0114] Data recording and analysis module: This module is responsible for recording all data during the exercise, including the behavior of virtual characters, the reactions of players, and scene changes. The data is stored in a database and processed through a data analysis algorithm to generate detailed exercise reports and evaluation indicators. The reports are used for subsequent training effect analysis and system optimization.
[0115] Feedback and Optimization Module: Based on the results of the Data Recording and Analysis Module, this module adjusts the parameters of the large model to optimize the generation of virtual characters and the dynamic adaptation of the scene. Through machine learning algorithms, the module analyzes exercise data, identifies model performance bottlenecks, and adjusts model parameters to improve prediction accuracy and scene adaptability.
[0116] User Interface Module: This module provides an intuitive operation interface, allowing players to easily control the exercise process and view relevant information. The interface includes functions such as map display, character status monitoring, task list and exercise progress control, and realizes the interaction between users and the system through a graphical interface and interactive controls.
[0117] Multimodal output module: To enhance the realism and immersion of training, this module provides multiple forms of output, including text, images, and sounds. By integrating text synthesis technology, image rendering engine, and sound effect library, the module realizes the dialogue output of virtual characters, real-time rendering of scene images, and playback of combat sounds, providing players with a full range of sensory experience.
[0118] Specific implementation of the virtual character generation module: Receive input parameters: The system receives input from exercise planners or game developers, including the number, type (such as infantry, tank, scout, etc.) and difficulty level (such as beginner, intermediate, advanced) of virtual characters. These parameters are used to guide the subsequent character generation process.
[0119] Generate background stories and personality traits: Use the text generation capabilities of the big model to generate unique background stories, personality traits, and combat styles for each virtual character based on the type and difficulty level of the input. For example, a high-level scout may have rich battlefield experience, keen insight, and cunning combat strategies.
[0120] Assigning skills and behavior patterns: Based on the generated background story and personality traits, the virtual characters are assigned corresponding skills (such as sniping, demolition, stealth) and behavior patterns (such as active attack, defensive counterattack, retreat and escape). These skills and behavior patterns are represented by predefined labels or vectors and associated with the output layer of the large model.
[0121] Storing character information: The generated virtual character information, including background story, personality traits, skills and behavior patterns, as well as related images and text descriptions, is stored in the database. This information can be called and modified in subsequent exercises to meet different exercise requirements.
[0122] like Figure 3 As shown, Figure 3 A schematic diagram of a scene dynamic adjustment process provided by an embodiment of the present application. Specific implementation of the scene dynamic construction module: Real-time monitoring of exercises: Through integrated sensors and data processing modules, the progress of exercises can be monitored in real time to obtain the position, behavior and reaction of virtual characters. These data are used to analyze the status and effect of the current scene.
[0123] Analyze scenario requirements: Based on monitoring data, analyze whether the current scenario meets the exercise requirements, including whether the difficulty is moderate, whether it is sufficiently challenging and realistic. This step is achieved through preset evaluation indicators and algorithms, such as difficulty evaluation based on battle intensity, and authenticity evaluation based on player feedback.
[0124] Adjust environmental parameters: If the current scene does not meet the requirements, use the image recognition or generation capabilities of the image recognition model to adjust the scene's environmental parameters. For example, change the lighting conditions (such as sunrise, sunset, cloudy days) to affect the combat field of view; change the weather conditions (such as rainy days, snowy days) to increase the difficulty of the battle; change the terrain features (such as mountains, deserts) to affect the combat strategy.
[0125] Dynamically change obstacles and props: Dynamically change the layout of obstacles (such as adding shelters and setting traps) and the distribution of props (such as placing weapons and supplies) according to the behavior of the virtual characters and the strategies of the players. This step aims to increase the complexity and uncertainty of the scene and improve the realism and challenge of the simulation exercise.
[0126] Specific implementation of the interactive logic processing module: Define interaction rules: Before the exercise begins, define the interaction rules between the virtual character and the player, including combat rules (such as attack range, damage calculation), dialogue rules (such as dialogue content, dialogue method) and strategy formulation rules (such as decision-making process, strategy selection). These rules are implemented through predefined scripts or algorithms.
[0127] Determine interactive events: During the exercise, determine interactive events between the virtual character and the player in real time, such as combat contact, dialogue request, strategy negotiation, etc. This step is achieved through event monitoring and triggering mechanisms.
[0128] Calling the big model for decision-making or dialogue: Based on the interaction rules and event types, the big model is called to make behavioral decisions or generate dialogues. For example, in a combat event, the big model selects the most appropriate attack method based on the combat style and current state of the virtual character; in a dialogue event, the big model generates realistic dialogue content based on the personality traits and dialogue rules of the virtual character.
[0129] Feedback of decision results or dialogue content: Feedback of the decision results or dialogue content of the big model to the players in real time to promote the development of the exercise process. This step is achieved through the user interface module and the multimodal output module to ensure that the players can clearly perceive and understand the behavior and intentions of the virtual character.
[0130] Behavior prediction and adaptation module: This module aims to dynamically adjust the behavior strategy of the virtual character through the prediction ability of the large model to be closer to the behavior of the virtual character in the actual battlefield. The specific steps are as follows: Analyze the virtual character status: Utilizing the deep learning capabilities of the large model, a comprehensive analysis is conducted on the virtual character’s current status (such as position, health, and ammunition), skills (such as shooting accuracy and movement speed), and combat style (such as offensiveness and defensiveness) to form a comprehensive assessment of the virtual character’s current capabilities.
[0131] Predict the next move: Combining the player's historical responses (such as common strategies in combat, reaction time to specific situations) and current behaviors (such as movement direction, attack targets), the predictive capabilities of the large model are used to predict the virtual character's possible next counterattack action, such as attack, retreat, seek cover, etc.
[0132] Dynamically adjust behavior strategies: According to the prediction results, the virtual character's behavior strategy is dynamically adjusted to make it more consistent with the virtual character's behavior logic in the actual battlefield. For example, if it is predicted that the player is about to attack, the virtual character may choose to retreat or seek cover; if it is predicted that the player is at a disadvantage, the virtual character may choose to attack.
[0133] Monitor and fine-tune forecast models: Monitor the actual reactions of players in real time and compare them with the predicted results. If the predicted results do not match the actual reactions, it means that there is a deviation in the prediction model. At this time, the prediction model needs to be fine-tuned to improve the accuracy of the prediction. The fine-tuning process can be achieved by adjusting the parameters of the large model, increasing training data, or improving the prediction algorithm.
[0134] Data recording and analysis module: This module is responsible for recording and analyzing various data during the exercise, providing a basis for subsequent feedback and optimization. The specific implementation steps are as follows: Data preprocessing: Receive raw data from virtual characters, players, and scene changes in real time, clean the data, and remove duplicate, invalid, or abnormal data records. At the same time, convert the data into a unified data format for subsequent processing and analysis.
[0135] Data storage: Store the preprocessed data in the database in timestamp order to ensure data integrity and traceability. The database design should support efficient data query and retrieval to meet the needs of subsequent analysis.
[0136] Feature extraction: Using feature extraction algorithms such as principal component analysis (PCA) to extract key features from the stored data. These features include the behavior patterns of virtual characters (such as attack frequency, movement path), the player's reaction time (such as decision-making speed, operation accuracy) and the frequency of scene changes (such as the frequency of obstacle appearance, weather change speed), etc.
[0137] Data analysis: The K-means clustering algorithm is used to analyze the extracted features and mine the hidden patterns, association rules and anomalies in the data. The clustering analysis algorithm formula is expressed as: For a given data set D={x 1 , x 2 , ...,x n}, through iterative optimization, the similarity of data points in the same cluster is high, and the similarity between different clusters is low. The specific algorithm is shown in formula 1 above.
[0138] Pattern recognition: Based on the analysis results, the potential patterns and rules between virtual character behaviors, player reactions, and scene changes are identified. These patterns and rules can provide strong support for subsequent exercise design, training strategy formulation, and large model optimization.
[0139] Report generation: The results of the analysis and the identified patterns are organized into a report that includes an overview of the data analysis, key findings, pattern recognition results, and recommended improvement measures. The report should be presented in a clear and intuitive manner that is easy for exercise planners and players to understand and use.
[0140] Feedback and optimization module: This module is responsible for providing feedback and optimizing the large model based on the evaluation report generated by the data recording and analysis module. The specific steps are as follows: Receive the evaluation report: Receive the evaluation report generated by the data recording and analysis module, and read and understand the contents carefully, especially the problems and deficiencies.
[0141] Determine the adjustment plan: Determine the parameters or structure of the big model that need to be adjusted based on the type of problem. For example, if the problem lies in prediction accuracy, you may need to adjust the prediction layer of the big model or add relevant features; if the problem lies in the behavioral strategy, you may need to adjust the behavioral decision layer of the big model or add new behavioral patterns.
[0142] Iterative training optimization: Use optimization algorithms (such as gradient descent, genetic algorithm, etc.) to iteratively train large models. During the training process, the model parameters are continuously adjusted until the expected optimization effect is achieved. The optimization effect can be evaluated by comparing indicators such as prediction accuracy and rationality of behavioral strategies before and after training.
[0143] Reload the model: Reload the optimized large model into the system for subsequent exercise tasks. Before reloading, sufficient testing should be carried out to ensure the stability and reliability of the model in actual operation.
[0144] Specific implementation of the user interface module: The user interface module is an important window for players to interact with the system. Its design should be intuitive, easy to use, and able to fully display key information during the exercise. The specific implementation method is as follows: Exercise Control Area: This area provides a series of control buttons, such as "Start", "Pause", "End", and a progress adjustment slider. Players can control the progress of the exercise by clicking these buttons, such as starting a new exercise, pausing the current exercise to adjust the strategy, or ending the exercise to view the results. The progress adjustment slider allows players to quickly jump to a specific stage of the exercise for review and analysis.
[0145] Virtual character information display area: This area displays the virtual character's attributes (such as health, defense), skills (such as special attacks, movement speed) and current status (such as whether it is in combat, whether it is injured) in detail. This information is presented in the form of charts, progress bars or text descriptions to help players quickly understand the strength and status of the virtual character and formulate effective combat strategies.
[0146] Player information display area: This area displays key player information, including health, equipment (such as weapons, armor), and current location. Health is represented by numbers or progress bars, equipment is displayed by icons or text descriptions, and location is identified by maps or coordinate systems. This information allows players to understand their combat status and position at any time so that they can make corresponding adjustments.
[0147] Scene display area: This area displays the current status of the training scene in real time in the form of two-dimensional or three-dimensional images, including terrain, obstacles, virtual characters and player positions. Two-dimensional images are suitable for simple scene displays, while three-dimensional images can provide more realistic spatial perception and depth information. Players can observe the training scene comprehensively by rotating, zooming and moving the perspective, so as to better understand the battlefield environment and formulate strategies.
[0148] Interactive operation area: This area provides a series of function buttons or input boxes for dialogue and combat interaction with virtual characters. For example, players can initiate an attack by clicking the "attack" button, or enter instructions through the input box to communicate with the virtual character. These interactive operations make the training process more interactive and realistic, which helps improve the training effect.
[0149] Specific implementation of the multimodal output module: The multimodal output module aims to provide players with a rich sensory experience through multiple output forms, enhancing the immersion and authenticity of the simulation exercise. The specific implementation method is as follows: Text output: This module can display the dialogue content and combat prompts of virtual characters in text form. For example, when a virtual character attacks, the system can remind the player to dodge in text form; when the player has a conversation with a virtual character, the system can display the virtual character's reply in text form. The text output is concise and clear, making it easy for players to quickly obtain key information.
[0150] Image output: This module can display two-dimensional or three-dimensional images of training scenes and images of virtual characters. Two-dimensional images can be used for simple scene display and character image display, while three-dimensional images can provide more realistic visual effects and spatial perception. Through image output, players can more intuitively understand the battlefield environment and the appearance characteristics of virtual characters.
[0151] Sound output: This module can play the voice and combat sound effects of the virtual character. For example, when the virtual character launches an attack, the system can play the corresponding attack sound effect; when the virtual character speaks, the system can play its voice. Sound output can enhance the immersion and authenticity of the simulation exercise, allowing players to participate in the exercise process more attentively.
[0152] Haptic output: This module simulates physical collisions or impacts in combat through vibrations, force feedback, and other means. For example, when a player is hit by a virtual character, the system can simulate the feeling of being hit through vibrations or force feedback. Haptic output can further enhance the authenticity and interactivity of simulation exercises, allowing players to experience the combat process more deeply.
[0153] Specific implementation of the compatibility adaptation module: The compatibility adaptation module is designed to achieve seamless integration of this system with the existing exercise system, ensuring that this system can run smoothly in different environments and platforms. The specific implementation methods are as follows: Provide standard API interface: This module designs a series of standard API interfaces for data exchange and communication with other exercise systems. These API interfaces follow common data formats and communication protocols to ensure smooth data and information transmission between different systems. Through the API interface, this technology can be easily integrated with existing exercise systems to achieve data sharing and interaction.
[0154] Standardization of data exchange formats: In addition to providing API interfaces, this module also defines a set of standardized data exchange formats. This format specifies details such as the structure, type, and encoding of data to ensure that different systems can accurately understand and parse data. Through the standardization of data exchange formats, this technology can more efficiently exchange and share data with other systems.
[0155] Adaptation to different platforms and environments: This module also takes into account the differences and compatibility between different platforms and environments. By adapting and optimizing different platforms and environments, it ensures that the system can run smoothly and perform at its best in various environments. This includes support and optimization for different operating systems, hardware configurations, and network environments.
[0156] In this embodiment, by loading the pre-trained large language model and image recognition model, a virtual character with intelligence and diversity is generated. According to the exercise process and the player's reaction, the environmental parameters, obstacle layout and virtual character behavior strategy of the training scene are adjusted in real time to achieve dynamic construction and adaptation of the scene. At the same time, multiple modules such as interactive logic processing, behavior prediction and adaptation, data recording and analysis, feedback and optimization are used to ensure the authenticity and effectiveness of the training. Through the multimodal output module, multiple forms of output such as text, images and sounds are provided to enhance the realism and immersion of the training, which is suitable for military training, emergency drills and various simulated confrontation exercises.
[0157] Based on the method described in any of the above embodiments, the present application also provides Figure 4 A schematic diagram of the structure of an electronic device is shown in FIG. Figure 4 At the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include hardware required for other services. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to implement the method described in any of the above embodiments.
[0158] Based on the method described in any of the above embodiments, the present application also provides a computer storage medium, which stores a computer program. When the computer program is executed by a processor, it can be used to execute the method described in any of the above embodiments.
[0159] Based on the method described in any of the above embodiments, the present application also provides a computer program product, which includes one or more computer programs or instructions. The computer program or instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. When the computer program is executed by a processor, the method described in any of the above embodiments is implemented.
[0160] The above description is only an embodiment of the present application and is not intended to limit the scope of protection of the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.
Claims
1. A method for controlling virtual elements in a simulation based on a large model, characterized in that: The virtual elements include virtual characters and virtual scenes; the method includes: Acquire historical confrontation data between the virtual character and the player at the historical moment of the simulation; the historical confrontation data includes historical behavior data of the virtual character, historical behavior data of the player, and historical layout data of the virtual scene; wherein the historical behavior data of the virtual character carries a personality tag of the virtual character; Analyze the virtual character historical behavior data, the player historical behavior data, and the virtual scene historical layout data to determine the evaluation results of the confrontation authenticity and confrontation difficulty of the virtual scene at the historical moment; Adjust the historical layout of the virtual scene based on the evaluation result to obtain a target virtual scene; The player's historical behavior data and the virtual character's personality label are input into a behavior generation model to obtain a reaction action of the virtual character to the player; the reaction action is used to instruct the virtual character to confront the player with the reaction action in the target virtual scene.
2. The method according to claim 1, characterized in that Before obtaining the historical confrontation data between the virtual character and the player at the historical moment of the simulation, the method further includes: In response to a scene generation instruction carrying scene image data, performing scene feature recognition processing on the scene image data using a preset recognition model to obtain scene features; The virtual scene is generated using the scene features.
3. The method according to claim 1, characterized in that Before obtaining the historical confrontation data between the virtual character and the player at the historical moment of the simulation, the method further includes: Input preset role attributes, role behavior patterns, and role background stories into a role reasoning model to obtain basic role parameters, and use the basic role parameters to construct the virtual role; the basic role parameters include role description information, role dialogue text, and role behavior script; wherein the role description information includes the personality label of the virtual role; the role dialogue text includes the sentence text of the virtual role that conforms to the personality label of the virtual role, the role behavior script is used to indicate a variety of personalized behaviors that conform to the personality label of the virtual role, and the reaction action is any one or more of the multiple personalized behaviors.
4. The method according to claim 3, characterized in that After constructing the virtual character using the character basic parameters, the method further includes: Obtaining preset confrontation rules of the virtual character, the preset confrontation rules including attack range calculation rules, damage calculation rules, dialogue content generation rules, dialogue mode selection rules, decision process generation rules, and strategy selection rules; The step of inputting the player's historical behavior data and the virtual character's personality tag into a behavior generation model to obtain a reaction action of the virtual character to the player includes: The player's historical behavior data, the virtual character's personality label, and the preset confrontation rule are input into the behavior generation model to obtain the reaction action that meets the preset confrontation rule.
5. The method according to claim 1, characterized in that The virtual character historical behavior data includes the virtual character historical position change data and the virtual character historical action data; the player historical behavior data includes the player historical position change data and the player historical action data; the historical layout includes historical environmental parameters, historical obstacle layout, and historical prop distribution; The analyzing the virtual character historical behavior data, the player historical behavior data, and the virtual scene historical layout data to determine the evaluation result of the confrontation authenticity and confrontation difficulty of the virtual scene at the historical moment includes: Analyze the virtual character's historical position change data and the player's historical position change data to determine a confrontation authenticity result, analyze the virtual character's historical action data and the virtual character's historical action data to determine a confrontation difficulty result, and obtain the evaluation result including the confrontation authenticity result and the confrontation difficulty result; The adjusting the historical layout of the virtual scene based on the evaluation result to obtain a target virtual scene includes: The historical environment parameters are adjusted based on the comparison result of the confrontation authenticity result with the preset authenticity threshold, and the historical obstacle layout and the historical prop distribution are adjusted based on the comparison result of the confrontation difficulty result with the preset difficulty threshold to obtain the target virtual scene.
6. The method according to claim 1, characterized in that The method further comprises: Clustering the historical behavior data of the virtual character at the historical moment to obtain a plurality of first clusters, each of the first clusters being used to characterize a type of virtual character behavior; Clustering the player's historical behavior data at the historical moment to obtain a plurality of second clusters, each of the second clusters being used to characterize a category of player character behavior; Clustering the virtual scene historical layout data at the historical moment to obtain a plurality of third clusters, each of the third clusters being used to characterize a type of scene; Determine a cluster set time series based on the association relationship between each of the first clusters, each of the second clusters, and each of the third clusters; the cluster set time series includes a plurality of cluster sets arranged in time; each of the cluster sets includes a type of the virtual character behavior, a category of the player character behavior, and a type of the scene that are mutually associated; Determining a conversion rule between at least two of the cluster sets that are consecutive in time from the cluster set time series; Determining the reaction weakness of the virtual character from the conversion rule; The behavior generation model is updated based on the reaction weakness to obtain an updated behavior generation model.
7. The method according to claim 6, characterized in that The behavior generation model includes a behavior strategy decision layer and a behavior generation layer connected in sequence; The step of adjusting the behavior generation model based on the reaction weakness to obtain an updated behavior generation model includes: In the case where the reaction weakness indicates that the accuracy of the virtual character behavior generated by the behavior generation layer does not exceed a first preset threshold, dividing the behavior generation layer into a plurality of behavior sub-generation layers according to a plurality of behavior types, each of the behavior sub-generation layers being used to generate a corresponding type of behavior; the plurality of behavior types including attack, defense, and movement; In the case where the reaction weakness indicates that the accuracy of the virtual character behavior strategy generated by the behavior strategy decision layer does not exceed a second preset threshold, the behavior strategy decision layer is divided into a plurality of behavior strategy sub-decision layers according to a plurality of strategy types, each of the behavior strategy sub-decision layers being used to generate a corresponding type of behavior strategy; the plurality of strategy types including path planning strategy, competitive confrontation strategy, task execution strategy, and patrol and standby strategy; Determine the updated behavior generation model including a plurality of the behavior sub-generation layers or a plurality of the behavior strategy sub-decision layers.
8. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing processor-executable instructions; Wherein, when the processor calls the executable instruction, the method described in any one of claims 1-7 is implemented.
9. A computer-readable storage medium, characterized in that: Computer instructions are stored thereon, and when the computer instructions are executed by a processor, the steps of any method described in claims 1-7 are implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Virtual character control method and device, electronic equipment and storage medium
CN111450531A
Game interaction simulation method and device, computer equipment and storage medium
CN116870479A
Action generation method and device of virtual object, equipment, medium and program product
CN116920407A
Virtual object control method and device, medium and equipment
CN117654046A
Virtual character control method and related device
CN117899478A