Methods, devices, storage media and electronic devices for predicting the behavior of virtual objects

By weighting the basic features and map features of virtual objects, generating intermediate features and combining them with a behavior prediction model, the problem of low accuracy in predicting the behavior of AI-controlled virtual objects is solved, improving prediction accuracy and anthropomorphism, and enhancing user experience.

CN115671733BActive Publication Date: 2026-04-03NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-14
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

In existing technologies, the accuracy of predicting the behavior of AI-controlled virtual objects is low, leading to deviations from human players' decisions and affecting the user experience.

Method used

By acquiring the basic features and map features of each virtual object in the virtual scene, a weighted mechanism is used to generate the first and second intermediate features, and the behavior prediction information of the target virtual object is output by combining the behavior prediction model.

Benefits of technology

It improves the accuracy of predicting virtual object behavior, enhances the anthropomorphism, and improves user experience and immersion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115671733B_ABST
    Figure CN115671733B_ABST
Patent Text Reader

Abstract

This disclosure provides a method, apparatus, computer-readable storage medium, and electronic device for predicting the behavior of virtual objects, relating to the field of artificial intelligence technology. The method for predicting the behavior of virtual objects includes: acquiring the basic features of each virtual object in a virtual scene at a first time step and the map features of the virtual scene; weighting the basic features of each virtual object according to the relationship between the basic features of each virtual object and the basic features of a target virtual object to obtain a first intermediate feature corresponding to the target virtual object; acquiring the position prediction information of the target virtual object, and weighting the map features of different regions in the virtual scene according to the position prediction information to obtain a second intermediate feature corresponding to the target virtual object; and outputting the behavior prediction information of the target virtual object at a second time step based on the first and second intermediate features corresponding to the target virtual object. This disclosure improves the accuracy of virtual object behavior prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of artificial intelligence technology, and in particular to a method for predicting the behavior of virtual objects, a device for predicting the behavior of virtual objects, a computer-readable storage medium, and an electronic device. Background Technology

[0002] Artificial intelligence (AI) technology is being used more and more widely in human intellectual activities. For example, in games such as MOBA (Multiplayer Online Battle Arena), AI models are used to predict the behavior of virtual objects in the game, allowing AI players to control virtual objects based on the prediction results, thus enabling AI players to cooperate or compete with human players.

[0003] In related technologies, the accuracy of predicting the behavior of virtual objects still needs to be improved, which may cause AI-controlled virtual objects to make behaviors that deviate from human decisions and affect the user experience. Summary of the Invention

[0004] This disclosure provides a method for predicting the behavior of virtual objects, a device for predicting the behavior of virtual objects, a computer-readable storage medium, and an electronic device, thereby improving, at least to some extent, the problem of low accuracy in predicting the behavior of virtual objects.

[0005] Other features and advantages of this disclosure will become apparent from the following detailed description, or may be learned in part by practice of this disclosure.

[0006] According to a first aspect of this disclosure, a method for predicting the behavior of a virtual object is provided, comprising: acquiring basic features of each virtual object in a virtual scene at a first time and map features of the virtual scene; the virtual scene includes multiple virtual objects, the multiple virtual objects including a target virtual object to be predicted; weighting the basic features of each virtual object according to the relationship between the basic features of each virtual object and the basic features of the target virtual object to obtain a first intermediate feature corresponding to the target virtual object; acquiring location prediction information of the target virtual object, and weighting the map features of different regions in the virtual scene according to the location prediction information to obtain a second intermediate feature corresponding to the target virtual object; and outputting behavior prediction information of the target virtual object at a second time based on the first intermediate feature and the second intermediate feature corresponding to the target virtual object; the second time being later than the first time.

[0007] Optionally, the basic features include location information and state information; the step of weighting the basic features of each virtual object according to the relationship between the basic features of each virtual object and the basic features of the target virtual object to obtain the first intermediate feature corresponding to the target virtual object includes: determining the position weight of each virtual object according to the relationship between the position information of each virtual object and the position information of the target virtual object; determining the state weight of each virtual object according to the relationship between the state information of each virtual object and the state information of the target virtual object; determining the attention of each virtual object based on the position weight and state weight of each virtual object; and weighting the basic features of each virtual object based on the attention of each virtual object to obtain the first intermediate feature corresponding to the target virtual object.

[0008] Optionally, determining the position weight of each virtual object based on the relationship between the position information of each virtual object and the position information of the target virtual object includes: determining the distance between any virtual object and the target virtual object based on the position information of any virtual object and the position information of the target virtual object; calculating the ratio of the distance to the farthest distance in the virtual scene; and determining the position weight of any virtual object based on the ratio.

[0009] Optionally, determining the state weight of each virtual object based on the relationship between the state information of each virtual object and the state information of the target virtual object includes: determining the state weight of any virtual object based on the similarity between the state information of any virtual object and the state information of the target virtual object.

[0010] Optionally, the map features include: global map features corresponding to the global map of the virtual scene, and local map features corresponding to the local area where the target virtual object is located in the virtual scene; the second intermediate features include global map intermediate features and local map intermediate features; obtaining the location prediction information of the target virtual object, and weighting the map features of different areas in the virtual scene according to the location prediction information to obtain the second intermediate features corresponding to the target virtual object, includes: predicting the activity position of the target virtual object to obtain the location prediction information; the location prediction information includes global location prediction information and local location prediction information, the global location prediction information is used to represent the predicted position of the target virtual object in the global map, and the local location prediction information is used to represent the predicted position of the target virtual object in the local area; determining global attention weights according to the global location prediction information, and weighting the global map features using the global attention weights to obtain the global map intermediate features; determining local attention weights according to the local location prediction information, and weighting the local map features using the local attention weights to obtain the local map intermediate features.

[0011] Optionally, predicting the activity location of the target virtual object to obtain the location prediction information includes: predicting the activity location of the target virtual object based on the global map features and the local map features to obtain the location prediction information.

[0012] Optionally, the method further includes: obtaining a pre-trained behavior prediction model, the behavior prediction model including a first feature extraction layer, a second feature extraction layer, and a feature fusion layer; weighting the basic features of each virtual object according to the relationship between the basic features of each virtual object and the basic features of the target virtual object to obtain a first intermediate feature corresponding to the target virtual object, including: processing the basic features of each virtual object and the basic features of the target virtual object through the first feature extraction layer to determine the attention of the target virtual object to each virtual object, and weighting the basic features of each virtual object based on the attention of each virtual object to output the first intermediate feature corresponding to the target virtual object; obtaining the position prediction information of the target virtual object, and according to the position prediction... The information weights the map features of different regions in the virtual scene to obtain a second intermediate feature corresponding to the target virtual object, including: processing the map features through the second feature extraction layer to obtain the location prediction information of the target virtual object, and weighting the map features of different regions in the virtual scene according to the location prediction information to obtain the second intermediate feature corresponding to the target virtual object; the step of outputting the behavior prediction information of the target virtual object at a second time based on the first intermediate feature and the second intermediate feature corresponding to the target virtual object includes: fusing the first intermediate feature and the second intermediate feature corresponding to the target virtual object through the feature fusion layer, and outputting the behavior prediction information of the target virtual object at the second time based on the fused features.

[0013] According to a second aspect of this disclosure, a device for predicting the behavior of a virtual object is provided, comprising: a basic feature and map feature acquisition module configured to acquire basic features of each virtual object in a virtual scene at a first time and map features of the virtual scene; the virtual scene includes multiple virtual objects, the multiple virtual objects including a target virtual object to be predicted; a first intermediate feature acquisition module configured to weight the basic features of each virtual object according to the relationship between the basic features of each virtual object and the basic features of the target virtual object to obtain a first intermediate feature corresponding to the target virtual object; a second intermediate feature acquisition module configured to acquire location prediction information of the target virtual object, and weight the map features of different regions in the virtual scene according to the location prediction information to obtain a second intermediate feature corresponding to the target virtual object; and a behavior prediction information output module configured to output behavior prediction information of the target virtual object at a second time based on the first intermediate feature and the second intermediate feature corresponding to the target virtual object; the second time is later than the first time.

[0014] According to a third aspect of this disclosure, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the behavior prediction method for the virtual object described in the first aspect and possible implementations thereof.

[0015] According to a fourth aspect of this disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor. The processor is configured to execute the behavior prediction method for a virtual object of the first aspect and possible implementations thereof by executing the executable instructions.

[0016] The technical solution disclosed herein has the following beneficial effects:

[0017] On the one hand, based on the relationship between the basic features of each virtual object and the basic features of the target virtual object, the basic features of each virtual object are weighted to obtain the first intermediate feature; based on the location prediction information, the map features of different areas in the virtual scene are weighted to obtain the second intermediate feature; and the behavior prediction information of the target virtual object is output based on the first and second intermediate features. By applying different weights to different features, the behavior of the virtual object can be further predicted based on the features with higher weights, which suppresses the interference of redundant features on the prediction of virtual object behavior and improves the accuracy of the prediction of virtual object behavior. On the other hand, this solution can weight the basic features of each virtual object based on the relationship between the basic features of each virtual object and the basic features of the target virtual object, thereby obtaining the first intermediate feature corresponding to the target virtual object; and weight the map features of different regions in the virtual scene to obtain the second intermediate feature corresponding to the target virtual object. This results in different weights for the basic features of each virtual object and different weights for different regions in the virtual scene, thus making the basic features of each virtual object and different regions in the virtual scene have different importance. In other words, the target virtual object has different attention to different virtual objects and different regions in the virtual scene, which improves the anthropomorphism of the target virtual object, makes the prediction results closer to real behavior, thereby improving the user experience and enhancing the user's immersion.

[0018] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0019] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.

[0020] Figure 1 This illustrates the system operating architecture of this exemplary embodiment;

[0021] Figure 2 This diagram illustrates a flowchart of a method for predicting the behavior of a virtual object in this exemplary embodiment.

[0022] Figure 3 This diagram illustrates a method for extracting basic features of a virtual object in this exemplary embodiment.

[0023] Figure 4 A flowchart illustrating a method for obtaining a first intermediate feature in this exemplary embodiment is shown;

[0024] Figure 5 This diagram illustrates a method for obtaining intermediate features of a global map and intermediate features of a local map according to this exemplary embodiment;

[0025] Figure 6 A schematic diagram illustrating the process of a behavior prediction method for a virtual object in this exemplary embodiment;

[0026] Figure 7 This exemplary embodiment shows a flowchart of a method for predicting the behavior of virtual objects using a behavior prediction model.

[0027] Figure 8 A schematic diagram illustrating a model of a behavior prediction method for virtual objects in this exemplary embodiment is shown.

[0028] Figure 9 A schematic diagram of a model of a first feature extraction layer in this exemplary embodiment is shown;

[0029] Figure 10 A schematic diagram of a model of a second feature extraction layer in this exemplary embodiment is shown;

[0030] Figure 11 This diagram illustrates the structure of a behavior prediction device for a virtual object in this exemplary embodiment.

[0031] Figure 12 A schematic diagram of the structure of an electronic device in this exemplary embodiment is shown. Detailed Implementation

[0032] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this disclosure more comprehensive and complete, and to fully convey the concept of the exemplary embodiments to those skilled in the art. The described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a full understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced with one or more specific details omitted, or other methods, components, apparatus, steps, etc., can be employed. In other instances, well-known technical solutions are not shown or described in detail to avoid obscuring various aspects of this disclosure.

[0033] Furthermore, the accompanying drawings are merely illustrative of this disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0034] In related technologies, AI agents are used to predict the behavior of characters in MOBA games. The AI ​​in a MOBA game acts as a game agent, capable of performing human-like actions in different states, cooperating or competing with human players. A good game AI agent can mimic the behavior of real players, providing a more realistic and immersive gaming experience. In a 5v5 MOBA game, the game AI agent needs to control a character, cooperating with four teammates to fight against five enemy heroes, aiming to destroy the enemy's core building, the base. To achieve similar actions to human players, the AI ​​agent needs to make reasonable actions similar to the player based on the current game state, including enemy and ally health, position, and tower range, such as moving or releasing skills. Typically, the AI ​​agent directly splices together features acquired in the virtual scene to control the character's behavior. However, the accuracy of this method in predicting the behavior of virtual objects needs improvement, causing the AI-controlled virtual objects to make decisions that deviate from human player behavior, affecting the user experience.

[0035] In view of one or more of the above-mentioned problems, this disclosure first provides an exemplary embodiment of a method for predicting the behavior of virtual objects. The following describes the method in conjunction with... Figure 1 The system architecture of the operating environment for this exemplary embodiment will be described.

[0036] refer to Figure 1 As shown, the system architecture 100 may include a terminal device 110 and a server 120. The terminal device 110 may be an electronic device such as a smartphone, tablet, or desktop computer, and can be used to acquire the basic characteristics of each virtual object and the map features of the virtual scene. The server 120 generally refers to the backend system that provides services related to the prediction of virtual object behavior in this exemplary embodiment, such as a server that implements the method for predicting the behavior of virtual objects. The server 120 may be a single server or a cluster of multiple servers; this disclosure does not limit this. The terminal device 110 and the server 120 can be connected via a wired or wireless communication link for data interaction.

[0037] In one implementation, the behavior prediction method for virtual objects in this exemplary embodiment can be executed by the terminal device 110. For example, in a MOBA game scenario, the terminal device 110 can execute the behavior prediction method for virtual objects of this application to control the behavior of a target virtual object based on the prediction result. The target virtual object can be a teammate or an enemy of other virtual objects. The terminal device 110 can also be a computer used by a human player, and the target virtual object can be a virtual object controlled by the player. The target virtual object can cooperate or fight against other virtual objects in the game scenario. If the player chooses game auto-play, the terminal device 110 can execute the behavior prediction method for virtual objects to output the behavior prediction information of the target virtual object in the virtual scene based on the weighted basic characteristics of each virtual object and the weighted map features, so as to control the virtual object to perform a certain behavior at a certain position in the virtual scene in the next moment of the current moment.

[0038] In one implementation, the terminal device 110 can also acquire the basic features of each virtual object in the virtual scene and the map features of the virtual scene in real time at the first moment, and then upload the basic features of each virtual object and the map features of the virtual scene to the server 120. After acquiring the basic features of each virtual object and the map features of the virtual scene, the server 120 can weight the basic features of each virtual object according to the relationship between the basic features of each virtual object and the basic features of the target virtual object to obtain the first intermediate feature of the target virtual object. Then, it can acquire the position prediction information of the target virtual object, and weight the map features of different areas in the virtual scene according to the position prediction information to obtain the second intermediate feature of the target virtual object. Finally, based on the first intermediate feature and the second intermediate feature corresponding to the target virtual object, it can output the behavior prediction information of the target virtual object at the second moment, which is later than the first moment. After receiving the behavior prediction information sent by the server 120, the terminal device 110 can control the position and behavior of the target virtual object at the second moment according to the behavior prediction information.

[0039] As can be seen from the above, the behavior prediction method for virtual objects in this exemplary embodiment can be executed by the terminal device 110 or the server 120.

[0040] The following is combined with Figure 2 The method for predicting the behavior of virtual objects is explained. Figure 2 An exemplary flow of a method for predicting the behavior of virtual objects is shown, including the following steps S210 to S240:

[0041] Step S210: Obtain the basic features of each virtual object in the virtual scene at the first moment and the map features of the virtual scene; the virtual scene includes multiple virtual objects, and the multiple virtual objects include the target virtual object to be predicted;

[0042] Step S220: Based on the relationship between the basic features of each virtual object and the basic features of the target virtual object, the basic features of each virtual object are weighted to obtain the first intermediate feature corresponding to the target virtual object.

[0043] Step S230: Obtain the location prediction information of the target virtual object, and weight the map features of different areas in the virtual scene according to the location prediction information to obtain the second intermediate feature corresponding to the target virtual object.

[0044] Step S240: Based on the first intermediate feature and the second intermediate feature corresponding to the target virtual object, output the behavior prediction information of the target virtual object at the second time point; the second time point is later than the first time point.

[0045] Based on the above method, on the one hand, the basic features of each virtual object are weighted according to the relationship between the basic features of each virtual object and the basic features of the target virtual object to obtain the first intermediate feature; on the other hand, the map features of different areas in the virtual scene are weighted according to the location prediction information to obtain the second intermediate feature; and the behavior prediction information of the target virtual object is output based on the first and second intermediate features. By applying different weights to different features, the behavior of the virtual object can be further predicted based on the features with higher weights, which suppresses the interference of redundant features on the prediction of virtual object behavior and improves the accuracy of the prediction of virtual object behavior. On the other hand, this solution can weight the basic features of each virtual object based on the relationship between the basic features of each virtual object and the basic features of the target virtual object, thereby obtaining the first intermediate feature corresponding to the target virtual object; and weight the map features of different regions in the virtual scene to obtain the second intermediate feature corresponding to the target virtual object. This results in different weights for the basic features of each virtual object and different weights for different regions in the virtual scene, thus making the basic features of each virtual object and different regions in the virtual scene have different importance. In other words, the target virtual object has different attention to different virtual objects and different regions in the virtual scene, which improves the anthropomorphism of the target virtual object, makes the prediction results closer to real behavior, thereby improving the user experience and enhancing the user's immersion.

[0046] The following is about Figure 2 Each step in the process will be explained in detail.

[0047] refer to Figure 2 In step S210, the basic features of each virtual object in the virtual scene at the first moment and the map features of the virtual scene are obtained; the virtual scene includes multiple virtual objects, and the multiple virtual objects include the target virtual object to be predicted.

[0048] Here, "first moment" can be the current moment; "virtual scene" can include the scene where the virtual object is located, such as a MOBA game scene; "virtual object" can include various characters in the virtual scene. For example, in a 5v5 MOBA game scene, the 10 game characters in the battle can be virtual objects; "target virtual object" can be a virtual object whose behavior is predicted by the behavior prediction method of the virtual object in this solution.

[0049] The basic characteristics of a virtual object can include various information about the virtual object at the first moment. The specific content and acquisition method of the basic characteristics disclosed herein are not specifically limited. For example, a virtual object can be a game character in a MOBA game. In this case, the basic characteristics of the virtual object can include the game character's health, skill status, equipment, faction, etc. at the current moment.

[0050] In one implementation, such as Figure 3 As shown, various information about N virtual objects can be acquired in real time. N deep neural networks are then used to extract features from this information, resulting in feature vectors for each virtual object. Finally, the basic features of the N virtual objects are derived from these feature vectors. Employing N deep neural networks to extract the basic features of the N virtual objects individually, and allowing multiple deep neural networks to run in parallel, effectively improves the efficiency of basic feature extraction.

[0051] Map features of a virtual scene can characterize map information in the virtual scene. This disclosure does not impose any special limitations on the specific content and acquisition method of map features of a virtual scene. For example, map features may include image features of the map in the virtual scene, accessibility information of virtual objects to target locations, etc.

[0052] In one implementation, the map features of the virtual scene can include global map features and local map features. These can be extracted by acquiring image frames from the virtual scene in real time and inputting them into a convolutional neural network (CNN). For example, global map features can include image features showing the location of the virtual object in a thumbnail map of the virtual scene at the current moment; local map features can include image features showing the area where the virtual object is located in the virtual scene at the current moment. The global map can be a thumbnail of all areas in the virtual scene, and the local map can include maps of specific areas within the virtual scene. Extracting global and local map features from image frames of both the global and local maps allows for the simultaneous acquisition of both general and detailed map information, which is beneficial for improving the accuracy of virtual object behavior prediction methods.

[0053] By acquiring the basic features of each virtual object in the virtual scene at the first moment and the map features of the virtual scene in step S210, the information in the virtual scene at the first moment can be effectively integrated and quantified, thereby further improving the accuracy of predicting the behavior of the target virtual object.

[0054] After obtaining the basic features of each virtual object in the virtual scene at the first moment and the map features of the virtual scene, in step S220, the basic features of each virtual object can be weighted according to the relationship between the basic features of each virtual object and the basic features of the target virtual object to obtain the first intermediate feature corresponding to the target virtual object.

[0055] The relationship between the basic characteristics of each virtual object and the basic characteristics of the target virtual object may include the positional relationship, survival status, and similarity of skill information between each virtual object and the target virtual object. This disclosure does not specifically limit the content of the relationship. For example, the relationship between the basic characteristics of each virtual object and the basic characteristics of the target virtual object may include the distance between the target virtual object and each virtual object, the similarity of the remaining health of the game characters, the similarity of skills, etc.

[0056] In one implementation, the aforementioned basic features include location information and status information; the basic features of each virtual object are weighted according to the relationship between the basic features of each virtual object and the basic features of the target virtual object to obtain the first intermediate feature corresponding to the target virtual object, such as... Figure 4 As shown, it may include steps S410 to S440:

[0057] Step S410: Determine the position weight of each virtual object based on the relationship between the position information of each virtual object and the position information of the target virtual object;

[0058] Step S420: Determine the state weight of each virtual object based on the relationship between the state information of each virtual object and the state information of the target virtual object;

[0059] Step S430: Determine the attention level of each virtual object based on its position weight and state weight;

[0060] Step S440: Based on the attention of each virtual object, the basic features of each virtual object are weighted to obtain the first intermediate feature corresponding to the target virtual object.

[0061] The aforementioned location information can include the coordinates of the virtual object within the virtual scene; the distance between any two virtual objects can be calculated based on their coordinates. Status information can include the virtual object's survival status and skill status information. For example, in a MOBA game scenario, the virtual object's status information could include its remaining health and skill information. Attention level can characterize the degree of importance the target virtual object places on each other. The first intermediate feature can include the weighted basic features of each virtual object.

[0062] The following explains the specific steps in step S410 for determining the position weight of each virtual object based on the relationship between the position information of each virtual object and the position information of the target virtual object.

[0063] In one implementation, determining the position weight of each virtual object based on the relationship between the position information of each virtual object and the position information of the target virtual object may include the following steps:

[0064] Based on the location information of any virtual object and the location information of the target virtual object, determine the distance between any virtual object and the target virtual object;

[0065] Calculate the ratio of the above distance to the farthest distance in the virtual scene, and determine the position weight of any of the above virtual objects based on this ratio.

[0066] The distance between any virtual object and the target virtual object is calculated by comparing the position information of any virtual object with that of the target virtual object. Then, the position weight of any virtual object is calculated based on the ratio of this distance to the farthest distance in the virtual scene. Distance weights can be assigned to each virtual object based on the different distances between each virtual object and the target virtual object. This simulates the different attention human players allocate when facing other game characters at different distances from their own game character, thereby improving the anthropomorphism of the target virtual object.

[0067] In one implementation, the cosine of the ratio of the aforementioned distance to the farthest distance in the virtual scene can be calculated, and the position weight of any of the aforementioned virtual objects can be determined based on this cosine value. For example, when the distance between virtual object N and the target virtual object is relatively close, the ratio of the distance between virtual object N and the target virtual object to the farthest distance is smaller, and the cosine value corresponding to this ratio is larger. By assigning a distance weight to virtual object N based on this cosine value, the distance weight value of virtual objects that are closer to the target virtual object can be increased, thereby achieving the effect that humans pay more attention to objects that are closer to them.

[0068] For example, in a 5v5 MOBA game scenario, since most heroes' actions are limited by distance, when heroes are far apart, two heroes that are far apart will basically not interact for a period of time. The cosine of the ratio of the distance between two heroes to the farthest distance in the virtual scene is obtained using the following formula (1). Heroes that are farther away are assigned a smaller positional weight, while heroes that are closer are assigned a larger positional weight, so as to determine the target hero's attention to other heroes based on the relative positions of the two heroes in the virtual scene:

[0069]

[0070] Where r represents the relative distance between each hero and the main hero, r max This indicates the farthest distance on the map.

[0071] In one implementation, the position weight of any virtual object can be determined by calculating the cosine of the ratio of the distance between any virtual object and the target virtual object to a preset maximum distance. This method eliminates the need to obtain the farthest distance in the virtual scene, thus improving the overall speed of the virtual object behavior prediction method.

[0072] The specific steps for obtaining the state weights in step S420 are described below. In one embodiment, determining the state weights of each virtual object based on the relationship between the state information of each virtual object and the state information of the target virtual object may include the following steps:

[0073] The state weight of any virtual object is determined based on the similarity between the state information of any virtual object and the state information of the target virtual object.

[0074] For example, in a MOBA game scenario, the state weight of a virtual object can be determined based on the similarity between the virtual object's skills and the target virtual object's remaining health.

[0075] After obtaining the distance weight and state weight corresponding to each virtual object, in one implementation, determining the attention level of any virtual object based on the weighted sum of the distance weight and state weight corresponding to any virtual object may include the following steps:

[0076] First, obtain the weighted sum of distance weight and state weight for any virtual object: Based on the survival status and skill information of the target virtual object, the team information of the target virtual object, and the enemy team information of the target virtual object, obtain the adjustment parameter corresponding to the distance weight of any virtual object; then, multiply the adjustment parameter by the distance weight and add it to the state weight to obtain the weighted sum of distance weight and state weight for any virtual object; determine the attention level of any virtual object based on this weighted sum.

[0077] The team information mentioned above may include team performance data, such as team gold, team experience, and team kills. Adjustment parameters can be used to characterize the importance of distance weights. In one implementation, the adjustment parameters can be obtained by training a deep model using information such as the survival status and skill information of the target virtual object, the team information of the target virtual object, and the enemy team information of the target virtual object.

[0078] The above method obtains the attention level of any virtual object by weighting the distance weight and the state weight. This method comprehensively considers the skill status, survival status, and distance between each virtual object and the target virtual object from the perspective of the target virtual object, thereby improving the anthropomorphism of the target virtual object and thus enhancing the accuracy of predicting the behavior of the target virtual object.

[0079] In one implementation, the weighted sum of the distance weight and state weight corresponding to any virtual object can be normalized, and the attention level of any virtual object can be determined based on the normalization result.

[0080] For example, normalization can be performed using the sigmoid function, and the attention level of any virtual object can be obtained according to the following formula (2):

[0081] weight = sigmoid(α × weight) r +weight s (2)

[0082] Where weight is the attention level of any virtual object, and α can be an adjustment parameter. r It is the distance weight. s It can be state weights.

[0083] In this exemplary embodiment, by normalizing the weighted sum of the distance weight and state weight corresponding to any virtual object, the attention of any virtual object can be obtained. This can standardize the numerical range of the attention of each virtual object, thereby effectively improving the running efficiency of the model.

[0084] After determining the attention level of each virtual object, in step S440, the basic features of each virtual object can be weighted and fused based on the attention level of each virtual object to obtain the first intermediate feature corresponding to the target virtual object.

[0085] Based on the method in step S220, by combining the distance between each virtual object and the target virtual object and the current state of each virtual object, different attention weight values ​​are assigned to each virtual object. By using different weight values ​​to simulate the different degrees of human attention to different virtual objects, the first intermediate feature is obtained based on the basic characteristics of virtual objects with different degrees of attention, which effectively improves the accuracy of virtual object behavior prediction.

[0086] Continue to refer to Figure 2 In step S230, the location prediction information of the target virtual object is obtained, and the map features of different areas in the virtual scene are weighted according to the location prediction information to obtain the second intermediate feature corresponding to the target virtual object.

[0087] The location prediction information may include information about the target movement or operation location of the virtual object, such as the coordinates of the target movement location. The second intermediate feature may include image features of various regions in the virtual scene with different weight values.

[0088] In one implementation, the map features may include: global map features corresponding to the global map of the virtual scene, and local map features corresponding to the local area where the target virtual object is located in the virtual scene; the second intermediate feature may include global map intermediate features and local map intermediate features; the above-mentioned method of obtaining the location prediction information of the target virtual object, and weighting the map features of different areas in the virtual scene according to the location prediction information to obtain the second intermediate feature corresponding to the target virtual object, such as... Figure 5 As shown, steps S510 to S530 may be included:

[0089] Step S510: Predict the activity position of the target virtual object to obtain position prediction information; the position prediction information includes global position prediction information and local position prediction information. The global position prediction information is used to represent the predicted position of the target virtual object in the global map, and the local position prediction information is used to represent the predicted position of the target virtual object in a local area.

[0090] Step S520: Determine the global attention weight based on the global location prediction information, and use the global attention weight to weight the global map features to obtain the intermediate features of the global map.

[0091] Step S530: Determine the local attention weights based on the local location prediction information, and use the local attention weights to weight the local map features to obtain the intermediate features of the local map.

[0092] The intermediate features of the global map can include global map features weighted by global attention weights, and the intermediate features of the local map can include local map features weighted by local attention weights.

[0093] For example, in a MOBA game scenario, information can include a minimap and local map information. This map information can include crucial data such as the presence of bushes and the number of minions within a given area, which significantly influence the target virtual object's behavioral choices. Since directly obtained map information is largely redundant, and a hero's movement range is limited within a given timeframe, a convolutional neural network can be used to extract features from the minimap and local map information, yielding global and local map features. These global and local map features are then used to predict the target virtual object's location, resulting in global and local location prediction information. Global attention weights are determined using the global location prediction information, and local attention weights are determined using the local location prediction information. The global attention weights are then used to weight the global map features, and the local attention weights are used to weight the local map features, allowing the target virtual object to show different levels of attention to different areas of the virtual scene.

[0094] based on Figure 5 The method obtained a second intermediate feature, which includes intermediate features of the global map and intermediate features of the local map. Different attention weight values ​​were assigned to different regions in the virtual scene. In other words, from the perspective of the target virtual object, different attention was paid to different regions in the virtual scene, which improved the anthropomorphism of the target virtual object and thus helped to improve the accuracy of predicting the behavior of the target virtual object.

[0095] In one implementation, the above-mentioned prediction of the activity location of the target virtual object to obtain location prediction information includes the following steps:

[0096] The location prediction information is obtained by predicting the activity location of a target virtual object based on global and local map features. For example, the activity location of the target virtual object can be predicted by inputting global and local map features into a classifier in a deep model, and the location prediction information can be determined based on the classification results.

[0097] In one implementation, intermediate features of the global and local maps can also be obtained using a global saliency map and local saliency maps: a global saliency map can be obtained based on global location prediction information, and a local saliency map can be obtained based on local location prediction information; wherein, the global saliency map may contain global attention weights, and the local saliency map may contain local attention weights; performing a pixel-wise multiplication between the global map features and the global saliency map yields intermediate features of the global map; performing a pixel-wise multiplication between the local map features and the local saliency map yields intermediate features of the local map. By obtaining the global and local saliency maps, the saliency of different regions in the global and local maps is obtained. Pixel-wise multiplication between the saliency map and map features is performed to achieve image overlay, thereby obtaining global and local maps with different attention weights. This simplifies the model structure for obtaining the second intermediate feature, reduces computational complexity, and effectively improves the operating efficiency of the virtual object behavior prediction method.

[0098] After obtaining the first intermediate feature and the second intermediate feature corresponding to the target virtual object, in step S240, the behavior prediction information of the target virtual object at the second time point can be output based on the first intermediate feature and the second intermediate feature corresponding to the target virtual object; the second time point is later than the first time point.

[0099] Among them, behavior prediction information can be used to characterize when and where the target virtual object performs what behavior in the virtual scene. Based on behavior prediction information, the target virtual object can be controlled to perform specific operations at a certain position in the virtual scene at a second moment.

[0100] In one implementation, the first intermediate feature and the second intermediate feature corresponding to the target virtual object can be fused, and the behavior prediction information of the target virtual object at the second time point can be output based on the fused features.

[0101] Based on the above method, by weighting the basic features of each virtual object to obtain the first intermediate feature and weighting the map features of the virtual scene to obtain the second intermediate feature, the behavior prediction information of the target virtual object at the second time point is output. This not only reduces the interference of redundant features on the prediction results, but also improves the anthropomorphism of the behavior prediction results, further enhancing the accuracy of the behavior prediction method for virtual objects and improving the user experience.

[0102] In one implementation, the above-described virtual object behavior prediction method can be applied to hero behavior prediction in MOBA game scenarios, such as... Figure 6 As shown, the behavior prediction method for the virtual object described above can include an offline training process and an online prediction process.

[0103] During offline training, a large number of 5v5 MOBA game recordings can be acquired first to obtain training sample pairs that include the basic features of virtual objects and the game's map features. These training sample pairs can include hero features, global map features, and local map features, along with corresponding labels. The labels can include the hero's specific actions at the current moment, as well as global and local position prediction information, representing the hero's location on the global and local maps respectively when they perform an action after a certain time. After feature selection and extraction from the hero, global, and local map features, the processed hero, global, and local map features are used to train the model.

[0104] During the online prediction process, image frames of the game scene in progress are acquired in real time. The processed hero features, global map features, and local map features are obtained according to the feature extraction method described above. Based on these features, the model makes predictions to output the actions that the hero will take in the next moment.

[0105] In one implementation, Figure 6 The model prediction part may include the following steps S710 to S740:

[0106] Step S710: Obtain a pre-trained behavior prediction model, which may include a first feature extraction layer, a second feature extraction layer, and a feature fusion layer.

[0107] In one implementation, the above-mentioned behavior prediction model can be as follows: Figure 8As shown, feature extraction can be performed using different deep networks on the basic features of virtual objects, global map features, and local map features. An attention mechanism is added to these deep network models to assign attention to the basic features of virtual objects, global map features, and local map features, resulting in first intermediate features, global map intermediate features, and local map intermediate features. The behavior prediction of virtual objects is then based on the feature fusion results of these three sets of features. By adding three attention mechanism modules between the feature processing network and the classification network, the model simulates the different levels of attention human players give to different information in real-world scenarios. This achieves the function of assigning different levels of attention to different information based on the basic features of the virtual object and the map features of the virtual scene at the current moment. This allows the network to obtain different attention weights based on different feature inputs, providing a certain degree of adaptability to static networks. Furthermore, the attention mechanism module has a simplified structure, maintaining the real-time predictive performance of the entire model while improving the accuracy and reasonableness of the prediction results. The attention mechanism module simulates the attention mechanism of human players, providing a certain degree of interpretability to the behavior prediction model.

[0108] Continue to refer to Figure 7 In step S720, the above-mentioned weighting of the basic features of each virtual object based on the relationship between the basic features of each virtual object and the basic features of the target virtual object to obtain the first intermediate feature corresponding to the target virtual object may include:

[0109] The basic features of each virtual object and the basic features of the target virtual object are processed by the first feature extraction layer to determine the attention of the target virtual object to each virtual object. Based on the attention of each virtual object, the basic features of each virtual object are weighted and the first intermediate feature corresponding to the target virtual object is output.

[0110] In one implementation, such as Figure 9 As shown, the first feature extraction layer can include a fully connected layer and an attention layer, which can be achieved through... Figure 9The first feature extraction layer shown obtains the first intermediate feature of the virtual object. Firstly, a fully connected layer determines the state weights and position weights based on the relationship between the basic features of the virtual object and the basic features of the target virtual object. Team information is input into the fully connected layer for training to obtain the adjustment parameter α. The product of the adjustment parameter α and the distance weight, and the sum of the state weights, are input into the normalization layer. The output of the normalization layer determines the attention level of the target virtual object to each virtual object. Based on the attention level of each virtual object, the basic features of each virtual object are weighted to obtain the first intermediate feature corresponding to the target virtual object. Through a lightweight network model, different attention weights are assigned to the basic features of different virtual objects according to the positional relationship between the target virtual object and each virtual object, as well as the state relationship between the target virtual object and each virtual object, explicitly modeling the degree of influence of different virtual objects on the specific operation of the target virtual object at the current moment.

[0111] Continue to refer to Figure 7 In step S730, the above-mentioned acquisition of the location prediction information of the target virtual object, and the weighting of map features of different areas in the virtual scene based on the location prediction information to obtain the second intermediate feature corresponding to the target virtual object, may include the following steps:

[0112] The map features are processed by the second feature extraction layer to obtain the location prediction information of the target virtual object. The map features of different areas in the virtual scene are weighted according to the location prediction information to obtain the second intermediate feature corresponding to the target virtual object.

[0113] In one implementation, such as Figure 10 As shown, the second feature extraction layer can include convolutional layers, fully connected layers, and normalization layers. Real-time acquired global or local maps can be input into the convolutional layers to extract global or local map features. Global or local location prediction information is input into the fully connected and normalization layers to obtain a global or local saliency map with global or local attention weights. The global saliency map is then multiplied pixel-wise with the global map features, or the local saliency map and local map features are multiplied pixel-wise. The intermediate features of the global or local map are obtained based on the result of the pixel multiplication. From the perspective of human users, this simulates the different levels of attention human users pay to different areas of the map, increasing the interpretability of the network and introducing an effective inductive bias.

[0114] Continue to refer to Figure 7 After obtaining the first intermediate feature and the second intermediate feature, in step S740, the above-mentioned behavior prediction information of the target virtual object at the second time point based on the first intermediate feature and the second intermediate feature corresponding to the target virtual object can be output, which may include the following steps:

[0115] The feature fusion layer fuses the first and second intermediate features corresponding to the target virtual object, and outputs the behavior prediction information of the target virtual object at the second time step based on the fused features.

[0116] In one implementation, compared to existing technologies, by assigning attention weights to different features in the first and second feature extraction layers, the global location prediction accuracy and local location prediction accuracy are increased by 0.26% and 0.02%, respectively; the target virtual object behavior prediction accuracy is improved by 1.18%; and the location prediction accuracy is improved by 2.37%. This effectively improves the accuracy of virtual object behavior prediction.

[0117] based on Figure 7 The proposed method predicts the behavior of a target virtual object using a pre-trained behavior prediction model. By assigning attention weights to different features in the first and second feature extraction layers, the interference of redundant features on the prediction results is reduced, thus improving the real-time prediction results. Furthermore, the behavior prediction model has a simple structure, low computational complexity, high operating efficiency, and high portability.

[0118] Exemplary embodiments of this disclosure also provide a device for predicting the behavior of virtual objects. For example... Figure 11 As shown, the behavior prediction device 1100 for the virtual object may include:

[0119] The basic feature and map feature acquisition module 1110 is configured to acquire the basic features of each virtual object in the virtual scene at the first moment and the map features of the virtual scene; the virtual scene includes multiple virtual objects, and the multiple virtual objects include the target virtual object to be predicted;

[0120] The first intermediate feature acquisition module 1120 is configured to weight the basic features of each virtual object according to the relationship between the basic features of each virtual object and the basic features of the target virtual object, so as to obtain the first intermediate feature corresponding to the target virtual object.

[0121] The second intermediate feature acquisition module 1130 is configured to acquire the location prediction information of the target virtual object, and to weight the map features of different areas in the virtual scene according to the location prediction information to obtain the second intermediate feature corresponding to the target virtual object.

[0122] The behavior prediction information output module 1140 is configured to output the behavior prediction information of the target virtual object at a second time point based on the first intermediate feature and the second intermediate feature corresponding to the target virtual object; the second time point is later than the first time point.

[0123] In one implementation, the aforementioned basic features include location information and status information; based on the relationship between the basic features of each virtual object and the basic features of the target virtual object, the basic features of each virtual object are weighted to obtain a first intermediate feature corresponding to the target virtual object, which may include:

[0124] The position weight of each virtual object is determined based on the relationship between the position information of each virtual object and the position information of the target virtual object.

[0125] The state weight of each virtual object is determined based on the relationship between the state information of each virtual object and the state information of the target virtual object.

[0126] The attention level of each virtual object is determined based on its position weight and state weight.

[0127] The basic features of each virtual object are weighted based on the attention level of each virtual object to obtain the first intermediate feature corresponding to the target virtual object.

[0128] In one implementation, determining the position weight of each virtual object based on the relationship between the position information of each virtual object and the position information of the target virtual object may include:

[0129] Based on the location information of any virtual object and the location information of the target virtual object, determine the distance between any virtual object and the target virtual object;

[0130] Calculate the ratio of the distance to the farthest distance in the virtual scene, and determine the position weight of any virtual object based on the ratio.

[0131] In one implementation, determining the state weight of each virtual object based on the relationship between the state information of each virtual object and the state information of the target virtual object may include:

[0132] The state weight of any virtual object is determined based on the similarity between the state information of any virtual object and the state information of the target virtual object.

[0133] In one implementation, the map features mentioned above may include: global map features corresponding to the global map of the virtual scene, and local map features corresponding to the local area where the target virtual object is located in the virtual scene; the second intermediate features include global map intermediate features and local map intermediate features; the above-mentioned obtaining the location prediction information of the target virtual object, and weighting the map features of different areas in the virtual scene according to the location prediction information to obtain the second intermediate features corresponding to the target virtual object, may include:

[0134] The activity location of the target virtual object is predicted to obtain location prediction information. The location prediction information includes global location prediction information and local location prediction information. The global location prediction information is used to represent the predicted location of the target virtual object in the global map, and the local location prediction information is used to represent the predicted location of the target virtual object in a local area.

[0135] Global attention weights are determined based on global location prediction information, and global map features are weighted using global attention weights to obtain intermediate features of the global map.

[0136] Local attention weights are determined based on local location prediction information, and local map features are weighted using these local attention weights to obtain intermediate features of the local map.

[0137] In one implementation, the above-mentioned prediction of the activity location of the target virtual object to obtain location prediction information includes:

[0138] The location prediction information is obtained by predicting the activity location of the target virtual object based on global map features and local map features.

[0139] In one embodiment, the above method further includes a behavior prediction model acquisition module, configured to acquire a pre-trained behavior prediction model, the behavior prediction model including a first feature extraction layer, a second feature extraction layer and a feature fusion layer.

[0140] Based on the relationship between the basic characteristics of each virtual object and the basic characteristics of the target virtual object, the basic characteristics of each virtual object are weighted to obtain the first intermediate characteristic corresponding to the target virtual object, including:

[0141] The basic features of each virtual object and the basic features of the target virtual object are processed by the first feature extraction layer to determine the attention of the target virtual object to each virtual object. Based on the attention of each virtual object, the basic features of each virtual object are weighted and the first intermediate feature corresponding to the target virtual object is output.

[0142] The above-mentioned method obtains the location prediction information of the target virtual object, and then weights the map features of different regions in the virtual scene based on the location prediction information to obtain the second intermediate feature corresponding to the target virtual object, including:

[0143] The map features are processed by the second feature extraction layer to obtain the location prediction information of the target virtual object. The map features of different areas in the virtual scene are weighted according to the location prediction information to obtain the second intermediate feature corresponding to the target virtual object.

[0144] Based on the first and second intermediate features corresponding to the target virtual object, the above-mentioned behavior prediction information of the target virtual object at the second time step is output, including:

[0145] The feature fusion layer fuses the first and second intermediate features corresponding to the target virtual object, and outputs the behavior prediction information of the target virtual object at the second time step based on the fused features.

[0146] The specific details of each part of the above-mentioned device have been described in detail in the method section of the implementation, and therefore will not be repeated here.

[0147] Exemplary embodiments of this disclosure also provide a computer-readable storage medium that can be implemented as a program product including program code, which, when run on an electronic device, causes the electronic device to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this disclosure. In an alternative embodiment, the program product can be implemented as a portable compact disc read-only memory (CD-ROM) including program code and can run on an electronic device, such as a personal computer. However, the program product of this disclosure is not limited thereto. In this document, the readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0148] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0149] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device.

[0150] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0151] Program code for performing the operations of this disclosure can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing devices can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0152] Exemplary embodiments of this disclosure also provide an electronic device. The electronic device may include a processor and a memory. The memory stores executable instructions for the processor, such as program code. The processor executes the executable instructions to perform the methods of this exemplary embodiment.

[0153] The following is for reference. Figure 12 The electronic device is illustrated by way of a general-purpose computing device. It should be understood that... Figure 12 The electronic device 1200 shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0154] like Figure 12 As shown, the electronic device 1200 may include: a processor 1210, a memory 1220, a bus 1230, an I / O (input / output) interface 1240, and a network adapter 1250.

[0155] The processor 1210 may include one or more processing units, such as a central processing unit (CPU), an application processor (AP), a modem processor, a display processing unit (DPU), a graphics processing unit (GPU), an image signal processor (ISP), a controller, an encoder, a decoder, a digital signal processor (DSP), a baseband processor, an artificial intelligence processor, etc. In one embodiment, the artificial intelligence processor can acquire the basic features of each virtual object in the virtual scene at a first moment, as well as the map features of the virtual scene; then, based on the relationship between the basic features of each virtual object and the basic features of the target virtual object, the basic features of each virtual object are weighted to obtain a first intermediate feature corresponding to the target virtual object; and the position prediction information of the target virtual object is acquired, and the map features of different regions in the virtual scene are weighted based on the position prediction information to obtain a second intermediate feature corresponding to the target virtual object; finally, based on the first and second intermediate features corresponding to the target virtual object, the behavior prediction information of the target virtual object at a second moment is output; wherein the second moment is later than the first moment.

[0156] Memory 1220 may include volatile memory, such as RAM 1221 and cache unit 1222, and may also include non-volatile memory, such as ROM 1223. Memory 1220 may also include one or more program modules 1224, such program modules 1224 including, but not limited to: operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. For example, program module 1224 may include the modules in the above-described device 1100.

[0157] Bus 1230 is used to connect different components of electronic device 1200, and may include data bus, address bus and control bus.

[0158] Electronic device 1200 can communicate with one or more external devices 1300 (e.g., keyboard, mouse, external controller, etc.) through I / O interface 1240.

[0159] Electronic device 1200 can communicate with one or more networks via network adapter 1250. For example, network adapter 1250 can provide mobile communication solutions such as 3G / 4G / 5G, or wireless communication solutions such as wireless LAN, Bluetooth, and near-field communication. Network adapter 1250 can communicate with other modules of electronic device 1200 via bus 1230.

[0160] although Figure 12 Other hardware and / or software modules, including but not limited to: displays, microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, may also be configured in the electronic device 1200.

[0161] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to exemplary embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0162] Those skilled in the art will understand that various aspects of this disclosure can be implemented as systems, methods, or program products. Therefore, various aspects of this disclosure can be embodied in entirely hardware implementations, entirely software implementations (including firmware, microcode, etc.), or implementations combining hardware and software aspects, collectively referred to herein as “circuit,” “module,” or “system.” Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.

[0163] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is defined only by the appended claims.

Claims

1. A method for predicting the behavior of a virtual object, characterized in that, include: Obtain the basic features of each virtual object in the virtual scene at the first moment and the map features of the virtual scene; The virtual scene includes multiple virtual objects, including a target virtual object to be predicted. The map features include: global map features corresponding to the global map of the virtual scene, and local map features corresponding to the local area where the target virtual object is located in the virtual scene. Based on the relationship between the basic features of each virtual object and the basic features of the target virtual object, the basic features of each virtual object are weighted to obtain a first intermediate feature corresponding to the target virtual object. The basic features include location information and state information. The process of weighting the basic features of each virtual object to obtain the first intermediate feature corresponding to the target virtual object includes: determining the position weight of each virtual object based on the relationship between the position information of each virtual object and the position information of the target virtual object; determining the state weight of each virtual object based on the relationship between the state information of each virtual object and the state information of the target virtual object; determining the attention level of each virtual object based on its position weight and state weight; and weighting the basic features of each virtual object based on its attention level to obtain the first intermediate feature corresponding to the target virtual object. The process involves obtaining the predicted location information of the target virtual object, and weighting the map features of different regions in the virtual scene based on the predicted location information to obtain a second intermediate feature corresponding to the target virtual object. This process includes: predicting the activity location of the target virtual object to obtain the predicted location information; determining a global attention weight based on global location prediction information included in the predicted location information, and weighting the global map features using the global attention weight to obtain a global map intermediate feature; determining a local attention weight based on local location prediction information included in the predicted location information, and weighting the local map features using the local attention weight to obtain a local map intermediate feature, thus obtaining a second intermediate feature corresponding to the target virtual object that includes both the global map intermediate feature and the local map intermediate feature. The global location prediction information represents the predicted location of the target virtual object in the global map, and the local location prediction information represents the predicted location of the target virtual object in a local region. Based on the first intermediate feature and the second intermediate feature corresponding to the target virtual object, the behavior prediction information of the target virtual object at the second time point is output; the second time point is later than the first time point.

2. The method according to claim 1, characterized in that, The step of determining the position weight of each virtual object based on the relationship between the position information of each virtual object and the position information of the target virtual object includes: Based on the location information of any virtual object and the location information of the target virtual object, determine the distance between the virtual object and the target virtual object; Calculate the ratio of the distance to the farthest distance in the virtual scene, and determine the position weight of any virtual object based on the ratio.

3. The method according to claim 1, characterized in that, The step of determining the state weight of each virtual object based on the relationship between the state information of each virtual object and the state information of the target virtual object includes: The state weight of any virtual object is determined based on the similarity between the state information of any virtual object and the state information of the target virtual object.

4. The method according to claim 1, characterized in that, The step of predicting the activity location of the target virtual object to obtain the location prediction information includes: The location prediction information is obtained by predicting the activity location of the target virtual object based on the global map features and the local map features.

5. The method according to claim 1, characterized in that, The method further includes: A pre-trained behavior prediction model is obtained, the behavior prediction model including a first feature extraction layer, a second feature extraction layer and a feature fusion layer; The step of weighting the basic features of each virtual object based on the relationship between the basic features of each virtual object and the basic features of the target virtual object to obtain the first intermediate feature corresponding to the target virtual object includes: The first feature extraction layer processes the basic features of each virtual object and the basic features of the target virtual object to determine the attention of the target virtual object to each virtual object, and weights the basic features of each virtual object based on the attention of each virtual object to output the first intermediate feature corresponding to the target virtual object. The step of obtaining the location prediction information of the target virtual object, and weighting the map features of different regions in the virtual scene based on the location prediction information to obtain the second intermediate feature corresponding to the target virtual object, includes: The map features are processed by the second feature extraction layer to obtain the location prediction information of the target virtual object. The map features of different areas in the virtual scene are weighted according to the location prediction information to obtain the second intermediate feature corresponding to the target virtual object. The step of outputting the behavior prediction information of the target virtual object at the second time point based on the first intermediate feature and the second intermediate feature corresponding to the target virtual object includes: The feature fusion layer fuses the first intermediate feature and the second intermediate feature corresponding to the target virtual object, and outputs the behavior prediction information of the target virtual object at the second time point based on the fused features.

6. A device for predicting the behavior of a virtual object, characterized in that, include: The basic feature and map feature acquisition module is configured to acquire the basic features of each virtual object in the virtual scene at the first moment and the map features of the virtual scene; The virtual scene includes multiple virtual objects, including a target virtual object to be predicted. The map features include: global map features corresponding to the global map of the virtual scene, and local map features corresponding to the local area where the target virtual object is located in the virtual scene. The first intermediate feature acquisition module is configured to weight the basic features of each virtual object based on the relationship between the basic features of each virtual object and the basic features of the target virtual object to obtain the first intermediate feature corresponding to the target virtual object. The basic features include location information and state information. Specifically, the first intermediate feature acquisition module is configured to determine the position weight of each virtual object based on the relationship between the position information of each virtual object and the position information of the target virtual object; determine the state weight of each virtual object based on the relationship between the state information of each virtual object and the state information of the target virtual object; determine the attention level of each virtual object based on its position weight and state weight; and weight the basic features of each virtual object based on its attention level to obtain the first intermediate feature corresponding to the target virtual object. The second intermediate feature acquisition module is configured to acquire the location prediction information of the target virtual object, and weight the map features of different regions in the virtual scene according to the location prediction information to obtain the second intermediate feature corresponding to the target virtual object; wherein, the second intermediate feature acquisition module is specifically configured to predict the activity position of the target virtual object to obtain the location prediction information; determine a global attention weight according to the global location prediction information contained in the location prediction information, and use the global attention weight to weight the global map features to obtain a global map intermediate feature; determine a local attention weight according to the local location prediction information contained in the location prediction information, and use the local attention weight to weight the local map features to obtain a local map intermediate feature, thereby obtaining the second intermediate feature corresponding to the target virtual object, which includes the global map intermediate feature and the local map intermediate feature; the global location prediction information is used to represent the predicted position of the target virtual object in the global map, and the local location prediction information is used to represent the predicted position of the target virtual object in the local region; The behavior prediction information output module is configured to output behavior prediction information of the target virtual object at a second time point based on the first intermediate feature and the second intermediate feature corresponding to the target virtual object; the second time point is later than the first time point.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1 to 5.

8. An electronic device, characterized in that, include: processor; Memory for storing the executable instructions of the processor; The processor is configured to execute the method of any one of claims 1 to 5 by executing the executable instructions.

Citation Information

Patent Citations

  • Object controlling method and device, electronic design and computer readable storage medium

    CN109529338A

  • Interaction method and device in game, computer equipment and storage medium

    CN113952723A