Training method, device, medium and computing equipment for virtual character behavior model

By training the virtual character behavior model, adjusting the feature vectors using global and local losses and feature heat maps, the problem of excessively single behavior patterns of virtual characters is solved, and a more realistic and diverse user interaction experience is achieved.

CN115487506BActive Publication Date: 2025-05-06ZHONGHAO XINYING (HANGZHOU) TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211130222.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-16
Publication Date
2025-05-06
Estimated Expiration
2042-09-16

AI Technical Summary

Technical Problem

The behavior patterns of virtual characters in existing online games are too single and cannot truly simulate human behavior, resulting in boring user interaction experience and reducing the game experience.

Method used

By obtaining the global feature vector of the training data, calculating global and local losses, adjusting the difficult feature vector using the feature heat map, and then training the virtual character behavior model to improve its prediction accuracy.

Benefits of technology

It makes the behavior pattern output by the virtual character behavior model closer to real human behavior, increases the diversity and fun of users' interactions with virtual characters, and improves the game's user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115487506B_ABST
    Figure CN115487506B_ABST
Patent Text Reader

Abstract

The embodiments of the present invention provide a training method, apparatus, medium and computing device for a virtual character behavior model. The method includes: obtaining a global feature vector of training data; wherein the global feature vector includes multiple sub-feature vectors; obtaining a global loss according to the true value and the multiple sub-feature vectors; obtaining a feature heat map according to the global feature vector; obtaining a local loss corresponding to the difficult sub-feature vector according to the true value, the feature heat map and the difficult sub-feature vectors in the multiple sub-feature vectors; based on the global loss and the local loss, the virtual character behavior model is trained for the purpose of improving the prediction accuracy of the virtual character behavior model. The present invention can avoid the situation where the user's interaction process with different virtual characters during the game is relatively single, thereby improving the game experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the technical field of data analysis, and more specifically, embodiments of the present invention relate to a training method, apparatus, medium and computing device for a virtual character behavior model. Background Art

[0002] This section is intended to provide a background or context to embodiments of the invention that are recited in the claims. No description herein is admitted to be prior art by inclusion in this section.

[0003] With the rapid development of Internet technology, more and more people choose online games for entertainment. At present, many online games will set up virtual characters to interact with users. However, in actual applications, the behavior patterns of virtual characters are usually controlled by fixed codes written by developers, which will cause the behavior patterns of different virtual characters in the game to be too single and very different from the behavior patterns of real people. As a result, the interaction process between users and different virtual characters during the game is single and boring, which reduces the gaming experience. Summary of the invention

[0004] In this context, embodiments of the present invention are intended to provide a method, apparatus, medium and computing device for training a virtual character behavior model.

[0005] In a first aspect of an embodiment of the present invention, a method for training a virtual character behavior model is provided, comprising:

[0006] Acquire a global feature vector of training data; wherein the training data includes basic personal information, and the global feature vector includes a plurality of sub-feature vectors;

[0007] A global loss is obtained according to the true value and the plurality of sub-feature vectors; wherein the true value is the true behavior information corresponding to the training data, and the global loss includes the sub-losses of each of the sub-feature vectors;

[0008] According to the global feature vector, a feature heat map is obtained;

[0009] According to the true value, the feature heat map, and a difficult sub-feature vector among the plurality of sub-feature vectors, a local loss corresponding to the difficult sub-feature vector is obtained; wherein the sub-loss of the difficult sub-feature vector is greater than a preset sub-loss threshold;

[0010] Based on the global loss and the local loss, the virtual character behavior model is trained for the purpose of improving the prediction accuracy of the virtual character behavior model.

[0011] In a second aspect of the embodiments of the present invention, a training device for a virtual character behavior model is provided, comprising:

[0012] An acquisition unit, configured to acquire a global feature vector of training data; wherein the training data includes basic personal information, and the global feature vector includes a plurality of sub-feature vectors;

[0013] A global loss acquisition unit, configured to obtain a global loss according to a true value and a plurality of sub-feature vectors; wherein the true value is the true behavior information corresponding to the training data, and the global loss includes sub-losses of each of the sub-feature vectors;

[0014] A heat map acquisition unit, used to obtain a feature heat map according to the global feature vector;

[0015] A local loss acquisition unit, configured to obtain a local loss corresponding to a difficult sub-feature vector according to the true value, the feature heat map, and a difficult sub-feature vector among the plurality of sub-feature vectors; wherein the sub-loss of the difficult sub-feature vector is greater than a preset sub-loss threshold;

[0016] A training unit is used to train the virtual character behavior model based on the global loss and the local loss so as to improve the prediction accuracy of the virtual character behavior model.

[0017] In a third aspect of the embodiments of the present invention, a computing device is provided, the computing device comprising:

[0018] at least one processor, memory, and input-output unit;

[0019] The memory is used to store a computer program, and the processor is used to call the computer program stored in the memory to execute any one of the methods in the first aspect.

[0020] In a fourth aspect of the embodiments of the present invention, a computer-readable storage medium is provided, which includes instructions, and when the instructions are executed on a computer, the computer executes any one of the methods described in the first aspect.

[0021] According to the training method, apparatus, medium and computing device of the virtual character behavior model according to the embodiment of the present invention, it is possible to train the virtual character behavior model based on real training data and real behavior information, so that the behavior of the virtual character output by the virtual character behavior model is closer to the behavior pattern of the real character, thereby avoiding the situation where the user's interaction process with different virtual characters during the game is relatively single, thereby improving the gaming experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, in which:

[0023] Figure 1 A schematic diagram of a flow chart of a method for training a virtual character behavior model provided by an embodiment of the present invention;

[0024] Figure 2 A schematic diagram of a flow chart of a method for determining a global feature vector provided by an embodiment of the present invention;

[0025] Figure 3 A schematic diagram of a flow chart of a method for determining global loss provided by an embodiment of the present invention;

[0026] Figure 4 A schematic diagram of a flow chart of a method for determining local loss provided in one embodiment of the present invention;

[0027] Figure 5 A schematic diagram of a flow chart of a method for training a virtual character behavior model provided by an embodiment of the present invention;

[0028] Figure 6 A schematic diagram of the structure of a virtual character behavior model provided by an embodiment of the present invention;

[0029] Figure 7 A schematic diagram of the structure of a training device for a virtual character behavior model provided by an embodiment of the present invention;

[0030] Figure 8 A schematic diagram of the structure of a medium according to an embodiment of the present invention is schematically shown;

[0031] Fig. 9 A schematic diagram of the structure of a computing device according to an embodiment of the present invention is schematically shown.

[0032] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts. DETAILED DESCRIPTION

[0033] The principles and spirit of the present invention will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present invention, and are not intended to limit the scope of the present invention in any way. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.

[0034] Those skilled in the art will appreciate that the embodiments of the present invention may be implemented as a system, device, apparatus, method or computer program product. Therefore, the present disclosure may be specifically implemented in the following forms, namely: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.

[0035] According to an embodiment of the present invention, a training method, apparatus, medium and computing device for a virtual character behavior model are proposed.

[0036] It should be understood herein that any number of elements in the drawings is for illustration rather than limitation, and any naming is only for distinction rather than having any limiting meaning.

[0037] The principle and spirit of the present invention are explained in detail below with reference to several representative embodiments of the present invention.

[0038] Exemplary Methods

[0039] Reference below Figure 1 , Figure 1 A flowchart of a method for training a virtual character behavior model provided by an embodiment of the present invention. It should be noted that the embodiments of the present invention can be applied to any applicable scenario.

[0040] Figure 1 The process of the training method of the virtual character behavior model provided by an embodiment of the present invention includes:

[0041] Step S101, obtaining the global feature vector of the training data.

[0042] In an embodiment of the present invention, the training data includes basic personal information, which may include but is not limited to name, gender, family members, occupation, education, age, and place of origin. The training data may include a large amount of basic personal information, and each basic personal information may correspond to a true value. The true value may be real behavior information, that is, the basic personal information corresponds to the true value one by one. The real behavior information may include but is not limited to hobbies, weight, graduation school, employment organization, exercise method, and travel method.

[0043] In the embodiment of the present invention, the global feature vector includes multiple sub-feature vectors; that is, multiple convolution operations can be performed on the training data, and each convolution operation can obtain a sub-feature vector; therefore, the global feature vector of the obtained training data can include multiple sub-feature vectors.

[0044] In another embodiment of the present invention, in order to increase the amount of information contained in the global feature vector, a down-sampling sub-feature vector can be extracted from the training data through a down-sampling operation; and the down-sampling sub-feature vector can be subjected to feature extraction through a dilated convolution to obtain a convolution sub-feature vector, and the down-sampling sub-feature vector and the convolution sub-feature vector can be determined as a global feature vector, such as Figure 2 As shown, the above step S101 is replaced by the following steps S201 to S203:

[0045] Step S201, downsampling the training data to obtain a downsampled sub-feature vector.

[0046] In the embodiment of the present invention, one or more downsampling operations may be performed on the training data, and each downsampling operation may obtain a downsampling sub-feature vector, so the number of the obtained downsampling sub-feature vectors may be one or more.

[0047] In the embodiment of the present invention, the virtual character behavior model may include a residual network, and the residual network may include one or more downsampling layers, and the training data may be downsampled through the downsampling layer.

[0048] Step S202, performing a dilated convolution on the downsampled sub-feature vector to obtain a convolved sub-feature vector.

[0049] In the embodiment of the present invention, one or more dilated convolutions may be performed on the downsampled sub-feature vector obtained by the last downsampling operation, and each dilated convolution may obtain a convolution sub-feature vector, so the number of the obtained convolution sub-feature vectors may be one or more. Furthermore, the size of each obtained convolution sub-feature vector is the same, so while improving the accuracy of the convolution sub-feature vector, the amount of information contained in the convolution sub-feature vector is also increased.

[0050] In the embodiment of the present invention, the residual network may further include one or more dilated convolutional layers, and the dilated convolutional layers may be used to perform dilated convolution on the downsampled sub-features obtained by the last downsampling operation.

[0051] Step S203: Determine the down-sampled sub-feature vector and the convolution sub-feature vector as the global feature vector of the training data.

[0052] By implementing the above steps S201 to S203, a down-sampled sub-feature vector can be extracted from the training data through a down-sampling operation; and a convolution sub-feature vector can be obtained by performing feature extraction on the down-sampled sub-feature vector through a dilated convolution, and the down-sampled sub-feature vector and the convolution sub-feature vector can be determined as a global feature vector. The convolution sub-feature vector obtained maintains the same receptive field as the down-sampled sub-feature vector, and the expansion of the receptive field can make the convolution sub-feature vector contain more information. Therefore, while improving the accuracy of the global feature vector, the amount of information contained in the global feature vector is also increased.

[0053] Step S102, obtaining a global loss according to the true value and the plurality of sub-feature vectors.

[0054] In the embodiment of the present invention, the true value is the true behavior information corresponding to the training data, and the global loss includes the sub-loss of each of the sub-feature vectors.

[0055] In another embodiment of the present invention, in order to make the obtained global loss more accurate, a predicted sub-result can be obtained according to the sub-feature vector, and then each predicted sub-result can be compared with the true value to obtain the sub-loss corresponding to each predicted sub-result, and the sum of each sub-loss can be determined as the global loss, such as Figure 3 As shown, the above step S102 is replaced by the following steps S301 to S303:

[0056] Step S301, obtaining each prediction sub-result according to each of the sub-feature vectors.

[0057] In the embodiment of the present invention, the sub-feature vectors correspond to the predicted sub-results one by one. Any sub-feature vector can be predicted to obtain the predicted sub-result corresponding to the sub-feature vector. The predicted sub-result can be the predicted behavior information obtained by predicting the sub-feature vectors.

[0058] Step S302, obtaining each sub-loss according to the true value and each of the predicted sub-results.

[0059] In the embodiment of the present invention, the predicted sub-results correspond to the sub-losses one by one. The true value can be compared with each predicted sub-result through a loss function to obtain the sub-losses corresponding to each predicted sub-result.

[0060] Step S303: Determine the sum of the sub-losses as the global loss.

[0061] In an embodiment of the present invention, each sub-loss can be added together to obtain a global loss. Since the sizes of the sub-feature vectors corresponding to each sub-loss are different, it is necessary to determine the maximum size from multiple sub-feature vectors, and enlarge the size of each sub-feature vector to the same as the maximum size; and the enlargement ratio of each sub-feature vector can be determined, and the corresponding sub-loss can be enlarged according to the enlargement ratio of each sub-feature vector to obtain the enlarged sub-loss; finally, the enlarged sub-loss can be added together to obtain the global loss. The global loss obtained in the above manner is more accurate.

[0062] By implementing the above steps S301 to S303, the predicted sub-results can be obtained according to the sub-feature vectors, and then each predicted sub-result can be compared with the true value to obtain the sub-loss corresponding to each predicted sub-result, and the sum of each sub-loss can be determined as the global loss to make the obtained global loss more accurate.

[0063] In an embodiment of the present invention, the global loss can be compared with a preset loss threshold (for example, 0.5). If the global loss is greater than the preset loss threshold, it can be considered that there are some sub-feature vectors with larger losses in the global feature vector, and these sub-feature vectors with larger losses can be considered as difficult feature vectors; therefore, it is necessary to make targeted adjustments to the difficult feature vectors, that is, steps S103 to S105 can be executed.

[0064] Step S103: obtaining a feature heat map according to the global feature vector.

[0065] As an optional implementation, step S103 may specifically obtain a feature heat map according to the global feature vector by:

[0066] The global feature vector is fused to obtain a first feature heat map and correlation information between the plurality of sub-feature vectors;

[0067] A second feature heat map is obtained according to the first feature heat map and the association information between the plurality of sub-feature vectors.

[0068] Among them, by implementing this implementation method, the global feature vector can be fused to obtain a first feature heat map, through which the different importance levels of different sub-feature vectors in the global feature vector can be intuitively seen; and the correlation information between multiple sub-feature vectors can also be obtained, and the correlation information can represent the correlation between multiple sub-feature vectors; and the first feature heat map can be corrected based on the correlation information between multiple sub-feature vectors to obtain a second feature heat map, so that the different importance levels of different sub-feature vectors represented in the obtained second feature heat map are more accurate.

[0069] In the embodiment of the present invention, since the sizes of the sub-feature vectors obtained by each downsampling operation and the sub-feature vectors obtained by each dilated convolution may be different, it is necessary to first unify the size of each sub-feature vector.

[0070] Specifically, the size of each sub-feature vector can be unified in a specific manner as follows: the maximum feature size in the sub-feature vectors can be obtained; a target sub-feature vector having a feature size smaller than the maximum feature size can be determined from multiple sub-feature vectors; and the target sub-feature vector can be adjusted so that the size of the adjusted target sub-feature vector is the same as the maximum feature size.

[0071] Optionally, after unifying the size of each sub-feature vector, the sub-heat maps corresponding to each sub-feature vector can be determined; and the sub-heat maps of each sub-feature vector can be superimposed and fused to obtain a first feature heat map. In addition, the correlation relationship between each sub-feature vector can be analyzed, and the correlation information between the sub-feature vectors with correlation relationship can be determined. The correlation information can include information of multiple sub-feature vectors with correlation relationship and the degree of correlation between multiple sub-feature vectors with correlation relationship.

[0072] For example, there may be a correlation between the two sub-feature vectors of education and age, and age may have a greater impact on education, so the correlation between education and age is high. That is, the correlation information between the two sub-feature vectors of education and age may include education, age, and high correlation.

[0073] In the embodiment of the present invention, since the first feature heat map is obtained based on the global feature vector, it is only obtained by analyzing each sub-feature vector separately. Therefore, the first feature heat map cannot reflect the correlation between each sub-feature vector. The second feature heat map is obtained based on the first feature heat map and the correlation information between multiple sub-feature vectors. Therefore, the second feature heat map can represent both the importance of the sub-feature vector and the correlation between each sub-feature vector.

[0074] Step S104: obtaining a local loss corresponding to the difficult sub-feature vector according to the true value, the feature heat map, and the difficult sub-feature vector in the plurality of sub-feature vectors.

[0075] In the embodiment of the present invention, the sub-loss of the difficult sub-feature vector is greater than a preset sub-loss threshold.

[0076] In another embodiment of the present invention, in order to make the local loss of the difficult sub-feature vector finally obtained more accurate, the first feature heat map and the multiple difficult sub-feature vectors can be compared with the true value to obtain the first local loss of the difficult sub-feature vector based on the first feature heat map; the second feature heat map and the multiple difficult sub-feature vectors can also be compared with the true value to obtain the second local loss of the difficult sub-feature vector based on the second feature heat map; the sum of the first local loss and the second local loss can be determined as the local loss of the difficult sub-feature vector, such as Figure 4 As shown, the above step S104 is replaced by the following steps S401 to S403:

[0077] Step S401: Obtain a first local loss corresponding to the difficult sub-feature vector according to the true value, the first feature heat map, and a difficult sub-feature vector among the plurality of sub-feature vectors.

[0078] In the embodiment of the present invention, since the sub-loss of the difficult sub-feature vector is large, training can be performed on the difficult sub-feature vector so that the sub-loss of the difficult sub-feature vector can be less than a preset sub-loss threshold, thereby improving the prediction accuracy of the virtual character behavior model.

[0079] In an embodiment of the present invention, the true value, the first feature heat map, and the difficult sub-feature vector among the multiple sub-feature vectors can be input into the first hourglass network in the virtual character behavior model, so that the first hourglass network outputs the first local loss corresponding to the difficult sub-feature vector.

[0080] As an optional implementation manner, in step S401, a method of obtaining a first local loss corresponding to the difficult sub-feature vector according to the true value, the first feature heat map, and the difficult sub-feature vector in the plurality of sub-feature vectors may be:

[0081] Determining, from the first feature heat map, a first difficult feature sub-heat map corresponding to a difficult sub-feature vector among the plurality of sub-feature vectors;

[0082] Obtaining a first difficulty feature prediction sub-result corresponding to the difficulty sub-feature vector according to the first difficulty feature sub-heat map;

[0083] A first local loss corresponding to the difficult sub-feature vector is obtained according to the true value and the first difficult feature prediction sub-result.

[0084] Among them, by implementing this implementation method, the first difficulty sub-heat map corresponding to the difficulty sub-feature vector can be selected from the first feature heat map, so that the first difficulty sub-heat map only contains information of the difficulty sub-feature vector; and the first difficulty feature prediction sub-result corresponding to the difficulty sub-feature vector can be predicted based on the first difficulty sub-heat map; based on the difference between the obtained first difficulty feature prediction sub-result and the true value, the first local loss corresponding to the difficulty sub-feature vector is obtained, so that the obtained first local loss is more accurate.

[0085] In the embodiment of the present invention, a loss function may be used to calculate the true value and the first difficult feature prediction sub-result to obtain a first local loss corresponding to the difficult sub-feature vector.

[0086] Step S402: Obtain a second local loss corresponding to the difficult sub-feature vector according to the true value, the second feature heat map, and the difficult sub-feature vector.

[0087] In the embodiment of the present invention, the true value, the second feature heat map and the difficult sub-feature vector may be input into the second hourglass network in the virtual character behavior model, so that the second hourglass network outputs the second local loss corresponding to the difficult sub-feature vector.

[0088] As an optional implementation manner, in step S402, the method of obtaining the second local loss corresponding to the difficult sub-feature vector according to the true value, the second feature heat map and the difficult sub-feature vector may be:

[0089] Determining a second difficulty feature sub-heatmap corresponding to the difficulty sub-feature vector from the second feature heatmap;

[0090] Obtaining a second difficulty feature prediction sub-result corresponding to the difficulty sub-feature vector according to the second difficulty feature sub-heat map;

[0091] A second local loss corresponding to the difficult sub-feature vector is obtained according to the true value and the second difficult feature prediction sub-result.

[0092] Among them, by implementing this implementation method, a second difficulty sub-heat map corresponding to the difficulty sub-feature vector can be selected from the second feature heat map, so that the second difficulty sub-heat map only contains information of the difficulty sub-feature vector; and based on the second difficulty sub-heat map, a second difficulty feature prediction sub-result corresponding to the difficulty sub-feature vector can be predicted; based on the difference between the obtained second difficulty feature prediction sub-result and the true value, a second local loss corresponding to the difficulty sub-feature vector is obtained, so that the obtained second local loss is more accurate.

[0093] In the embodiment of the present invention, a loss function may be used to calculate the true value and the second difficult feature prediction sub-result to obtain a second local loss corresponding to the difficult sub-feature vector.

[0094] Step S403: Determine the sum of the first local loss and the second local loss as the local loss corresponding to the difficult sub-feature vector.

[0095] By implementing the above steps S401 to S403, the first feature heat map can be compared with multiple difficult sub-feature vectors and the true value to obtain a first local loss of the difficult sub-feature vector based on the first feature heat map; the second feature heat map can also be compared with multiple difficult sub-feature vectors and the true value to obtain a second local loss of the difficult sub-feature vector based on the second feature heat map; the sum of the first local loss and the second local loss can be determined as the local loss of the difficult sub-feature vector. Different local losses are obtained through different feature heat maps, so that the local loss of the difficult sub-feature vector finally obtained can be more accurate.

[0096] Step S105 , based on the global loss and the local loss, the virtual character behavior model is trained for the purpose of improving the prediction accuracy of the virtual character behavior model.

[0097] In another embodiment of the present invention, in order to improve the accuracy of the training of the virtual character behavior model, the residual network of the virtual character behavior model can be trained by a global loss; the first hourglass network of the virtual character behavior model can also be trained by a first local loss; the second hourglass network of the virtual character behavior model can also be trained by a second local loss, such as Figure 5 As shown, the above step S105 is replaced by the following steps S501 to S503:

[0098] Step S501 : Based on the global loss, a residual network of the virtual character behavior model is trained for the purpose of improving the prediction accuracy of the virtual character behavior model.

[0099] Step S502: Based on the first local loss, a first hourglass network of the virtual character behavior model is trained for the purpose of improving the prediction accuracy of the virtual character behavior model.

[0100] Step S503: Based on the second local loss, a second hourglass network of the virtual character behavior model is trained for the purpose of improving the prediction accuracy of the virtual character behavior model.

[0101] By implementing the above steps S501 to S503, the residual network of the virtual character behavior model can be trained through the global loss; the first hourglass network of the virtual character behavior model can also be trained through the first local loss; the second hourglass network of the virtual character behavior model can also be trained through the second local loss, so that different networks in the virtual character behavior model can use corresponding losses for targeted training, thereby improving the accuracy of virtual character behavior model training.

[0102] Please also read Figure 6 , Figure 6 A schematic diagram of the structure of a virtual character behavior model provided by an embodiment of the present invention, wherein the virtual character behavior model may include a residual network, a first hourglass network, and a second hourglass network.

[0103] Specific:

[0104] (1) In the residual network:

[0105] The training data can be first input into the residual network, and the training data can be used as the input vector C1, and the size of the input vector C1 can be 512×512; and the input vector can be downsampled to obtain a sub-feature vector C2, and the size of the sub-feature vector C2 can be 256×256; and the sub-feature vector C2 can be downsampled again to obtain a sub-feature vector C3, and the size of the sub-feature vector C3 can be 128×128; and the sub-feature vector C3 can be subjected to a dilated convolution to obtain a sub-feature vector C4, and the size of the sub-feature vector C4 can be 128×128; and the sub-feature vector C4 can be subjected to a dilated convolution to obtain a sub-feature vector C5, and the size of the sub-feature vector C5 can also be 128×128. The obtained sub-feature vectors C2, C3, C4, and C5 can all be sent to the first hourglass network.

[0106] Furthermore, predictions can be made based on each sub-feature vector to obtain prediction results corresponding to each sub-feature vector; and loss calculations can be performed on each prediction result based on the true value to obtain sub-losses corresponding to each sub-feature vector; and each sub-loss can be added together to obtain the global loss of all sub-feature vectors contained in the residual network. The obtained global loss can be used to train the residual network to make the global loss obtained by the residual network smaller.

[0107] In addition, if the global loss is greater than a preset loss threshold, the first hourglass network and the second hourglass network can be used to perform targeted training on the difficult sub-feature vectors with larger losses.

[0108] (2) In the first hourglass network:

[0109] Sub-feature vector C2, sub-feature vector C3, sub-feature vector C4 and sub-feature vector C5 can be fused to obtain a first feature heat map; and a difficult sub-feature vector can be determined, wherein the sub-loss of the difficult sub-feature vector is greater than a preset sub-loss threshold, for example, sub-feature vector C3 and sub-feature vector C4 can be determined as difficult sub-feature vectors; and a first difficult feature sub-heat map corresponding to difficult sub-feature vector C3 and difficult sub-feature vector C4 can be determined from the first feature heat map; and a first difficult feature prediction sub-result corresponding to difficult sub-feature vector C3 and difficult sub-feature vector C4 can be obtained according to the first difficult feature sub-heat map; and a first local loss corresponding to difficult sub-feature vector C3 and difficult sub-feature vector C4 can be obtained according to the true value and the first difficult feature prediction sub-result. The obtained first local loss can be used to train the first hourglass network so that the first local loss obtained by the first hourglass network is smaller.

[0110] In addition, the relationship between the difficult sub-feature vector C3 and the difficult sub-feature vector C4 can be analyzed to obtain the association information between the difficult sub-feature vector C3 and the difficult sub-feature vector C4, and the association information between the first feature heat map and the difficult sub-feature vector C3 and the difficult sub-feature vector C4 can be sent to the second hourglass network.

[0111] (3) In the second hourglass network:

[0112] A second feature heat map can be obtained based on the first feature heat map and the association information between the multiple sub-feature vectors; and a second difficult feature sub-heat map corresponding to the difficult sub-feature vector C3 and the difficult sub-feature vector C4 can be determined from the second feature heat map; and a second difficult feature prediction sub-result corresponding to the difficult sub-feature vector C3 and the difficult sub-feature vector C4 can be obtained based on the second difficult feature sub-heat map; and a second local loss corresponding to the difficult sub-feature vector C3 and the difficult sub-feature vector C4 can be obtained based on the true value and the second difficult feature prediction sub-result. The obtained second local loss can be used to train the second hourglass network so that the second local loss obtained by the second hourglass network is smaller.

[0113] As an optional implementation, the trained virtual character behavior model can be applied to online games to build virtual characters in online games. For example, the current online game needs to generate the behavior patterns of three family members in a family. The personal basic information input into the virtual character behavior model may include information such as the husband (32 years old, male, doctor), the wife (30, female, teacher), and the child (10, male, student). The virtual character behavior model can output the behavior patterns of the three family members based on the input personal basic information.

[0114] Optionally, various types of virtual interaction spaces (such as classrooms, gymnasiums, bedrooms, buses, etc.) may be provided in the virtual space of online games, and the target virtual interaction space corresponding to the current location of the virtual character may also be input into the virtual character behavior model, so that the virtual character behavior model can output the behavior that the virtual character can normally perform in the virtual interaction space based on the virtual interaction space.

[0115] In addition, the virtual interactive space can also be set with attribute labels (such as dilapidated, multi-story, high-end, public, etc.). Different virtual interactive spaces can correspond to different attribute labels, and the behavior of the virtual character also needs to match the attribute label of the virtual interactive space in which the virtual character is located; therefore, the attribute label of the virtual interactive space can be input into the virtual character behavior model, so that the behavior of the virtual character output by the virtual character behavior model can match the attached label of the virtual interactive space to increase the authenticity of the virtual character behavior.

[0116] The training method of the virtual character behavior model proposed in this application is aimed at the virtual character behavior model constructed based on artificial intelligence represented by machine learning, especially deep learning, including but not limited to game character simulation, virtual character dialogue, virtual character interaction and other virtual character behavior models suitable for different application scenarios.

[0117] The present invention can train a virtual character behavior model based on real training data and real behavior information, so that the behavior of the virtual character output by the virtual character behavior model is closer to the behavior pattern of the real character, avoiding the situation that the user's interaction process with different virtual characters during the game is relatively simple, and improving the game experience. In addition, the present invention can also improve the amount of information contained in the global feature vector while improving the accuracy of the global feature vector. In addition, the present invention can also make the obtained global loss more accurate. In addition, the present invention can also make the different importance levels of different sub-feature vectors represented in the obtained second feature heat map more accurate. In addition, the present invention can also make the obtained first local loss more accurate. In addition, the present invention can also make the obtained second local loss more accurate. In addition, the present invention can also make the local loss of the difficult sub-feature vector finally obtained more accurate. In addition, the present invention can also improve the accuracy of the training of the virtual character behavior model.

[0118] Exemplary Devices

[0119] After introducing the method of the exemplary embodiment of the present invention, next, refer to Figure 7 A training device for a virtual character behavior model according to an exemplary embodiment of the present invention is described, and the device comprises:

[0120] An acquisition unit 701 is used to acquire a global feature vector of training data; wherein the training data includes basic personal information, and the global feature vector includes a plurality of sub-feature vectors;

[0121] A global loss acquisition unit 702 is used to obtain a global loss according to the true value and the multiple sub-feature vectors acquired by the acquisition unit 701; wherein the true value is the true behavior information corresponding to the training data, and the global loss includes the sub-loss of each of the sub-feature vectors;

[0122] A heat map acquisition unit 703, configured to obtain a feature heat map according to the global feature vector acquired by the acquisition unit 701;

[0123] The local loss acquisition unit 704 is used to obtain the local loss corresponding to the difficult sub-feature vector according to the true value, the feature heat map obtained by the heat map acquisition unit 703, and the difficult sub-feature vector among the multiple sub-feature vectors obtained by the acquisition unit 701; wherein the sub-loss of the difficult sub-feature vector is greater than a preset sub-loss threshold;

[0124] The training unit 705 is used to train the virtual character behavior model for the purpose of improving the prediction accuracy of the virtual character behavior model based on the global loss obtained by the global loss obtaining unit 702 and the local loss obtained by the local loss obtaining unit 704.

[0125] As an optional implementation, the acquisition unit 701 may acquire the global feature vector of the training data in the following manner:

[0126] Perform downsampling operation on the training data to obtain downsampled sub-feature vectors;

[0127] Performing a dilated convolution on the downsampled sub-feature vector to obtain a convolved sub-feature vector;

[0128] The down-sampled sub-feature vector and the convolution sub-feature vector are determined as global feature vectors of the training data.

[0129] Among them, by implementing this implementation method, a down-sampled sub-feature vector can be extracted from the training data through a down-sampling operation; and the down-sampled sub-feature vector can be feature extracted through a dilated convolution to obtain a convolution sub-feature vector, and the down-sampled sub-feature vector and the convolution sub-feature vector can be determined as a global feature vector. Among them, the obtained convolution sub-feature vector maintains the same receptive field as the down-sampled sub-feature vector, and the expansion of the receptive field can make the convolution sub-feature vector contain more information. Therefore, while improving the accuracy of the global feature vector, the amount of information contained in the global feature vector is also increased.

[0130] As an optional implementation manner, the global loss acquisition unit 702 obtains the global loss according to the true value and the multiple sub-feature vectors in the following manner:

[0131] Obtaining each prediction sub-result according to each of the sub-feature vectors, wherein the sub-feature vectors correspond to the prediction sub-results one-to-one;

[0132] Obtaining each sub-loss according to the true value and each of the predicted sub-results, wherein the predicted sub-results and the sub-losses correspond one to one;

[0133] The sum of each of the sub-losses is determined as the global loss.

[0134] Among them, by implementing this implementation method, the predicted sub-results can be obtained according to the sub-feature vectors, and then each predicted sub-result can be compared with the true value to obtain the sub-loss corresponding to each predicted sub-result, and the sum of each sub-loss can be determined as the global loss to make the obtained global loss more accurate.

[0135] As an optional implementation manner, the heat map acquisition unit 703 obtains the characteristic heat map according to the global feature vector in the following manner:

[0136] The global feature vector is fused to obtain a first feature heat map and correlation information between the plurality of sub-feature vectors;

[0137] A second feature heat map is obtained according to the first feature heat map and the association information between the plurality of sub-feature vectors.

[0138] Among them, by implementing this implementation method, the global feature vector can be fused to obtain a first feature heat map, through which the different importance levels of different sub-feature vectors in the global feature vector can be intuitively seen; and the correlation information between multiple sub-feature vectors can also be obtained, and the correlation information can represent the correlation between multiple sub-feature vectors; and the first feature heat map can be corrected based on the correlation information between multiple sub-feature vectors to obtain a second feature heat map, so that the different importance levels of different sub-feature vectors represented in the obtained second feature heat map are more accurate.

[0139] As an optional implementation manner, the local loss acquisition unit 704 obtains the local loss corresponding to the difficult sub-feature vector according to the true value, the feature heat map, and the difficult sub-feature vector in the plurality of sub-feature vectors in a manner that can be:

[0140] Obtaining a first local loss corresponding to the difficult sub-feature vector according to the true value, the first feature heat map, and a difficult sub-feature vector among the plurality of sub-feature vectors;

[0141] Obtaining a second local loss corresponding to the difficult sub-feature vector according to the true value, the second feature heat map, and the difficult sub-feature vector;

[0142] The sum of the first local loss and the second local loss is determined as the local loss corresponding to the difficult sub-feature vector.

[0143] Among them, when implementing this implementation method, the first feature heat map can be compared with multiple difficulty sub-feature vectors and the true value to obtain a first local loss of the difficulty sub-feature vector based on the first feature heat map; the second feature heat map can also be compared with multiple difficulty sub-feature vectors and the true value to obtain a second local loss of the difficulty sub-feature vector based on the second feature heat map; the sum of the first local loss and the second local loss can be determined as the local loss of the difficulty sub-feature vector, and different local losses are obtained through different feature heat maps, so that the local loss of the difficulty sub-feature vector finally obtained can be more accurate.

[0144] As an optional implementation manner, the local loss acquisition unit 704 obtains the first local loss corresponding to the difficult sub-feature vector according to the true value, the first feature heat map, and the difficult sub-feature vector in the plurality of sub-feature vectors in the following manner:

[0145] Determining, from the first feature heat map, a first difficult feature sub-heat map corresponding to a difficult sub-feature vector among the plurality of sub-feature vectors;

[0146] Obtaining a first difficulty feature prediction sub-result corresponding to the difficulty sub-feature vector according to the first difficulty feature sub-heat map;

[0147] A first local loss corresponding to the difficult sub-feature vector is obtained according to the true value and the first difficult feature prediction sub-result.

[0148] Among them, by implementing this implementation method, the first difficulty sub-heat map corresponding to the difficulty sub-feature vector can be selected from the first feature heat map, so that the first difficulty sub-heat map only contains information of the difficulty sub-feature vector; and the first difficulty feature prediction sub-result corresponding to the difficulty sub-feature vector can be predicted based on the first difficulty sub-heat map; based on the difference between the obtained first difficulty feature prediction sub-result and the true value, the first local loss corresponding to the difficulty sub-feature vector is obtained, so that the obtained first local loss is more accurate.

[0149] As an optional implementation manner, the local loss acquisition unit 704 obtains the second local loss corresponding to the difficult sub-feature vector according to the true value, the second feature heat map and the difficult sub-feature vector in the following manner:

[0150] Determining a second difficulty feature sub-heatmap corresponding to the difficulty sub-feature vector from the second feature heatmap;

[0151] Obtaining a second difficulty feature prediction sub-result corresponding to the difficulty sub-feature vector according to the second difficulty feature sub-heat map;

[0152] A second local loss corresponding to the difficult sub-feature vector is obtained according to the true value and the second difficult feature prediction sub-result.

[0153] Among them, by implementing this implementation method, a second difficulty sub-heat map corresponding to the difficulty sub-feature vector can be selected from the second feature heat map, so that the second difficulty sub-heat map only contains information of the difficulty sub-feature vector; and based on the second difficulty sub-heat map, a second difficulty feature prediction sub-result corresponding to the difficulty sub-feature vector can be predicted; based on the difference between the obtained second difficulty feature prediction sub-result and the true value, a second local loss corresponding to the difficulty sub-feature vector is obtained, so that the obtained second local loss is more accurate.

[0154] As an optional implementation manner, the training unit 705 trains the virtual character behavior model based on the global loss and the local loss to improve the prediction accuracy of the virtual character behavior model in the following manner:

[0155] Based on the global loss, a residual network of the virtual character behavior model is trained for the purpose of improving the prediction accuracy of the virtual character behavior model;

[0156] Based on the first local loss, training a first hourglass network of the virtual character behavior model for the purpose of improving the prediction accuracy of the virtual character behavior model;

[0157] Based on the second local loss, a second hourglass network of the virtual character behavior model is trained for the purpose of improving the prediction accuracy of the virtual character behavior model.

[0158] Among them, by implementing this implementation method, the residual network of the virtual character behavior model can be trained through the global loss; the first hourglass network of the virtual character behavior model can also be trained through the first local loss; the second hourglass network of the virtual character behavior model can also be trained through the second local loss, so that different networks in the virtual character behavior model can use corresponding losses for targeted training, thereby improving the accuracy of virtual character behavior model training.

[0159] Exemplary Media

[0160] After introducing the method and apparatus of the exemplary embodiment of the present invention, next, reference is made to Figure 8 For a description of a computer-readable storage medium according to an exemplary embodiment of the present invention, please refer to Figure 8 , the computer-readable storage medium shown is a CD 80, on which a computer program (i.e., a program product) is stored. When the computer program is executed by the processor, it will implement the steps recorded in the above method implementation, for example, obtaining a global feature vector of training data; wherein the training data includes personal basic information, and the global feature vector includes multiple sub-feature vectors; obtaining a global loss based on the true value and the multiple sub-feature vectors; wherein the true value is the true behavior information corresponding to the training data, and the global loss includes the sub-loss of each sub-feature vector; obtaining a feature heat map based on the global feature vector; obtaining a local loss corresponding to the difficult sub-feature vector based on the true value, the feature heat map, and the difficult sub-feature vector in the multiple sub-feature vectors; wherein the sub-loss of the difficult sub-feature vector is greater than a preset sub-loss threshold; based on the global loss and the local loss, the virtual character behavior model is trained for the purpose of improving the prediction accuracy of the virtual character behavior model; the specific implementation method of each step will not be repeated here.

[0161] It should be noted that examples of the computer-readable storage medium may also include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical or magnetic storage media, which are not listed here one by one.

[0162] Exemplary Computing Devices

[0163] After introducing the method, medium and apparatus of the exemplary embodiments of the present invention, next, reference is made to Fig. 9 A computing device for training a virtual character behavior model according to an exemplary embodiment of the present invention.

[0164] Fig. 9 A block diagram of an exemplary computing device 90, which may be a computer system or a server, is shown that is suitable for implementing embodiments of the present invention. Fig. 9 The computing device 90 shown is only an example and should not bring any limitation to the functionality and scope of use of the embodiments of the present invention.

[0165] like Fig. 9As shown, the components of the computing device 90 may include, but are not limited to: one or more processors or processing units 901, a system memory 902, and a bus 903 connecting different system components (including the system memory 902 and the processing unit 901).

[0166] The computing device 90 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computing device 90, including volatile and non-volatile media, removable and non-removable media.

[0167] The system memory 902 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 9021 and / or cache memory 9022. The computing device 90 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the ROM 9023 may be used to read and write non-removable, non-volatile magnetic media ( Fig. 9 is not shown in the Fig. 9 As shown in FIG. 1 , a disk drive for reading and writing a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 903 via one or more data medium interfaces. System memory 902 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of various embodiments of the present invention.

[0168] A program / utility 9025 having a set (at least one) of program modules 9024 may be stored, for example, in system memory 902, and such program modules 9024 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 9024 generally perform the functions and / or methods of the embodiments described herein.

[0169] The computing device 90 may also communicate with one or more external devices 904 (e.g., a keyboard, a pointing device, a display, etc.). Such communication may be performed via an input / output (I / O) interface 605. Furthermore, the computing device 90 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 906. Fig. 9 As shown, the network adapter 906 communicates with other modules (such as the processing unit 901, etc.) of the computing device 90 via the bus 903. It should be understood that although Fig. 9 Not shown, other hardware and / or software modules may be used in conjunction with computing device 90 .

[0170] The processing unit 901 executes various functional applications and data processing by running the program stored in the system memory 902, for example, obtaining a global feature vector of training data; wherein the training data includes basic personal information, and the global feature vector includes multiple sub-feature vectors; obtaining a global loss according to the true value and the multiple sub-feature vectors; wherein the true value is the true behavior information corresponding to the training data, and the global loss includes the sub-loss of each sub-feature vector; obtaining a feature heat map according to the global feature vector; obtaining a local loss corresponding to the difficult sub-feature vector according to the true value, the feature heat map, and the difficult sub-feature vector in the multiple sub-feature vectors; wherein the sub-loss of the difficult sub-feature vector is greater than a preset sub-loss threshold; based on the global loss and the local loss, the virtual character behavior model is trained for the purpose of improving the prediction accuracy of the virtual character behavior model. The specific implementation methods of each step will not be repeated here. It should be noted that although several units / modules or sub-units / sub-modules of the training device for the virtual character behavior model are mentioned in the above detailed description, this division is only exemplary and not mandatory. In fact, according to the embodiments of the present invention, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided into multiple units / modules to be embodied.

[0171] In the description of the present invention, it should be noted that the terms “first”, “second” and “third” are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0172] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0173] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0174] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0175] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0176] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0177] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

[0178] In addition, although the operations of the method of the present invention are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.

Claims

1. A training method for a virtual character behavior model, comprising: Acquire a global feature vector of training data; wherein the training data includes basic personal information, and the global feature vector includes a plurality of sub-feature vectors; A global loss is obtained according to the true value and the plurality of sub-feature vectors; wherein the true value is the true behavior information corresponding to the training data, and the global loss includes the sub-losses of each of the sub-feature vectors; According to the global feature vector, a feature heat map is obtained; According to the true value, the feature heat map, and a difficult sub-feature vector among the plurality of sub-feature vectors, a local loss corresponding to the difficult sub-feature vector is obtained; wherein the sub-loss of the difficult sub-feature vector is greater than a preset sub-loss threshold; Based on the global loss and the local loss, training the virtual character behavior model for the purpose of improving the prediction accuracy of the virtual character behavior model; The step of obtaining the global feature vector of the training data includes: Perform downsampling operation on the training data to obtain downsampled sub-feature vectors; Performing a dilated convolution on the downsampled sub-feature vector to obtain a convolved sub-feature vector; The down-sampled sub-feature vector and the convolution sub-feature vector are determined as global feature vectors of the training data.

2. The training method for a virtual character behavior model according to claim 1, wherein the global loss is obtained based on the true value and the plurality of sub-feature vectors, comprising: Obtaining each prediction sub-result according to each of the sub-feature vectors, wherein the sub-feature vectors correspond to the prediction sub-results one-to-one; Obtaining each sub-loss according to the true value and each of the predicted sub-results, wherein the predicted sub-results and the sub-losses correspond one to one; The sum of each of the sub-losses is determined as the global loss.

3. According to the training method of the virtual character behavior model according to any one of claims 1 to 2, obtaining a feature heat map according to the global feature vector comprises: The global feature vector is fused to obtain a first feature heat map and correlation information between the plurality of sub-feature vectors; A second feature heat map is obtained according to the first feature heat map and the association information between the plurality of sub-feature vectors.

4. The training method of the virtual character behavior model according to claim 3, wherein the obtaining, according to the true value, the feature heat map and the difficult sub-feature vector in the plurality of sub-feature vectors, the local loss corresponding to the difficult sub-feature vector comprises: Obtaining a first local loss corresponding to the difficult sub-feature vector according to the true value, the first feature heat map, and a difficult sub-feature vector among the plurality of sub-feature vectors; Obtaining a second local loss corresponding to the difficult sub-feature vector according to the true value, the second feature heat map, and the difficult sub-feature vector; The sum of the first local loss and the second local loss is determined as the local loss corresponding to the difficult sub-feature vector.

5. The training method of the virtual character behavior model according to claim 4, wherein the step of obtaining a first local loss corresponding to the difficult sub-feature vector according to the true value, the first feature heat map, and a difficult sub-feature vector among the plurality of sub-feature vectors comprises: Determining, from the first feature heat map, a first difficult feature sub-heat map corresponding to a difficult sub-feature vector among the plurality of sub-feature vectors; Obtaining a first difficulty feature prediction sub-result corresponding to the difficulty sub-feature vector according to the first difficulty feature sub-heat map; A first local loss corresponding to the difficult sub-feature vector is obtained according to the true value and the first difficult feature prediction sub-result.

6. The training method for a virtual character behavior model according to claim 4, wherein obtaining a second local loss corresponding to the difficult sub-feature vector according to the true value, the second feature heat map and the difficult sub-feature vector comprises: Determining a second difficulty feature sub-heatmap corresponding to the difficulty sub-feature vector from the second feature heatmap; Obtaining a second difficulty feature prediction sub-result corresponding to the difficulty sub-feature vector according to the second difficulty feature sub-heat map; A second local loss corresponding to the difficult sub-feature vector is obtained according to the true value and the second difficult feature prediction sub-result.

7. The method for training a virtual character behavior model according to claim 4, wherein the training of the virtual character behavior model based on the global loss and the local loss for the purpose of improving the prediction accuracy of the virtual character behavior model comprises: Based on the global loss, a residual network of the virtual character behavior model is trained for the purpose of improving the prediction accuracy of the virtual character behavior model; Based on the first local loss, training a first hourglass network of the virtual character behavior model for the purpose of improving the prediction accuracy of the virtual character behavior model; Based on the second local loss, a second hourglass network of the virtual character behavior model is trained for the purpose of improving the prediction accuracy of the virtual character behavior model.

8. A training device for a virtual character behavior model, comprising: An acquisition unit, configured to acquire a global feature vector of training data; wherein the training data includes basic personal information, and the global feature vector includes a plurality of sub-feature vectors; A global loss acquisition unit, configured to obtain a global loss according to a true value and a plurality of sub-feature vectors; wherein the true value is the true behavior information corresponding to the training data, and the global loss includes sub-losses of each of the sub-feature vectors; A heat map acquisition unit, used to obtain a feature heat map according to the global feature vector; A local loss acquisition unit, configured to obtain a local loss corresponding to a difficult sub-feature vector according to the true value, the feature heat map, and a difficult sub-feature vector among the plurality of sub-feature vectors; wherein the sub-loss of the difficult sub-feature vector is greater than a preset sub-loss threshold; A training unit, configured to train the virtual character behavior model based on the global loss and the local loss so as to improve the prediction accuracy of the virtual character behavior model; The step of obtaining the global feature vector of the training data includes: Perform downsampling operation on the training data to obtain downsampled sub-feature vectors; Performing a dilated convolution on the downsampled sub-feature vector to obtain a convolved sub-feature vector; The down-sampled sub-feature vector and the convolution sub-feature vector are determined as global feature vectors of the training data.

9. A computing device, comprising: at least one processor, memory, and input-output unit; The memory is used to store a computer program, and the processor is used to call the computer program stored in the memory to execute the method according to any one of claims 1 to 7.

10. A computer-readable storage medium comprising instructions, which, when executed on a computer, causes the computer to execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Image driving model training, image generation method, device, equipment and medium

    CN111797753A

  • Head attitude angle detection method and device, electronic equipment and storage medium

    CN112668480A