Control method, device, and apparatus for virtual object, and storage medium
By dynamically combining the real-time frame rate of the application in the computer device, the target motion parameters suitable for devices with different performance are determined, which solves the problem of unsmooth virtual object motion and achieves smoothness and naturalness of motion in different computer devices.
Patent Information
- Application Number
- CN202210369258.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-08
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2042-04-08
AI Technical Summary
In existing technologies, because motion prediction models perform motion prediction at a fixed frame rate, virtual object movements become unsmooth on computer devices with varying computing capabilities, resulting in movements that are either too fast or too slow.
By dynamically determining motion parameters based on the real-time running frame rate of the application, the computer device performs motion prediction based on the real-time motion parameters of the virtual object, obtains at least two sets of predicted motion parameters, and determines the target motion parameters according to the real-time running frame rate, which is applicable to computer devices with different performance.
It improves the smoothness of virtual object movements on different computer devices, avoids problems of movements being too fast or too slow, and ensures the continuity and naturalness of movements.
Smart Images

Figure CN116934795B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence, and in particular to a method, apparatus, device, and storage medium for controlling virtual objects. Background Technology
[0002] Generating actions for virtual objects in real time has always been a challenging task, and the quality of virtual object action generation has also received widespread attention.
[0003] In related technologies, motion prediction models with motion prediction capabilities are obtained by capturing the movements of professional stunt performers and using the collected motion data for model training. The trained motion prediction model can be deployed on a terminal, enabling the terminal to have motion prediction capabilities, and then controlling the movement of virtual objects based on the predicted motion parameters.
[0004] However, since the motion prediction model performs motion prediction at a fixed frame rate, and the computing performance of different terminals varies, the solutions in the relevant technologies may result in unsmooth virtual object movements on some terminals. Summary of the Invention
[0005] This application provides a method, apparatus, device, and storage medium for controlling virtual objects, which can improve the smoothness of virtual object movements across different terminals. The technical solution is as follows:
[0006] On one hand, embodiments of this application provide a method for controlling a virtual object, the method comprising:
[0007] Action prediction is performed based on the real-time action parameters of virtual objects in the application, resulting in at least two sets of predicted action parameters, where different predicted action parameters correspond to different candidate running frame rates;
[0008] Based on at least two sets of the predicted action parameters and the real-time running frame rate of the application, a target action parameter is determined, wherein the target action parameter is an action parameter applicable to the real-time running frame rate.
[0009] The virtual object is controlled based on the target action parameters.
[0010] On the other hand, embodiments of this application provide a control device for a virtual object, the device comprising:
[0011] The motion prediction module is used to predict motion based on the real-time motion parameters of virtual objects in the application, and obtain at least two sets of predicted motion parameters, where different predicted motion parameters correspond to different candidate running frame rates;
[0012] The action prediction module is further configured to determine target action parameters based on at least two sets of predicted action parameters and the real-time running frame rate of the application, wherein the target action parameters are action parameters applicable to the real-time running frame rate.
[0013] The control module is used to control the virtual object based on the target action parameters.
[0014] On the other hand, embodiments of this application provide a computer device including a processor and a memory, wherein the memory stores at least one instruction, which is loaded and executed by the processor to implement the virtual object control method as described above.
[0015] On the other hand, embodiments of this application provide a computer-readable storage medium storing at least one instruction, which is loaded and executed by a processor to implement the virtual object control method as described above.
[0016] On the other hand, embodiments of this application provide a computer program product including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the virtual object control method provided in the above aspects.
[0017] In this embodiment, the computer device predicts actions based on real-time action parameters of virtual objects in an application, obtaining at least two sets of predicted action parameters corresponding to different candidate frame rates. Based on these two sets of predicted action parameters and the application's real-time frame rate, a target action parameter suitable for that real-time frame rate is determined, and then the virtual object is controlled based on the target action parameter. Using the solution provided in this embodiment, the computer device can dynamically combine the predicted action parameters with the application's real-time frame rate to determine action parameters that match the computer device's performance, avoiding the problem of virtual object actions being too fast or too slow on computer devices with different performance levels, and improving the smoothness of virtual object actions on different computer devices. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1A flowchart illustrating a method for controlling a virtual object provided in an exemplary embodiment of this application is shown.
[0020] Figure 2 A flowchart illustrating a method for controlling a virtual object provided in another exemplary embodiment of this application is shown;
[0021] Figure 3 This is a schematic diagram illustrating an exemplary embodiment of the motion prediction model of this application;
[0022] Figure 4 This is a graph illustrating the speed of the left and right feet during walking, as shown in an exemplary embodiment of this application.
[0023] Figure 5 This is a schematic diagram illustrating the action phase of an exemplary embodiment of this application;
[0024] Figure 6 A flowchart illustrating a method for controlling a virtual object provided in another exemplary embodiment of this application is shown;
[0025] Figure 7 This is a schematic diagram illustrating an exemplary embodiment of this application of a hybrid expert network performing multi-frame-rate action prediction;
[0026] Figure 8 This is a flowchart illustrating the action prediction model training process in an exemplary embodiment of this application;
[0027] Figure 9 This is an exemplary embodiment of the present application illustrating the motion effects of a virtual object at different frame rates;
[0028] Figure 10 This is a structural block diagram of a virtual object control device provided in an exemplary embodiment of this application;
[0029] Figure 11 A schematic diagram of the structure of a computer device provided in an exemplary embodiment of this application is shown. Detailed Implementation
[0030] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0031] Artificial intelligence (AI) is the theory, methods, technology, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce a new kind of intelligent machine that can react in a way similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to possess the functions of perception, reasoning, and decision-making.
[0032] Artificial intelligence (AI) is a comprehensive discipline encompassing a wide range of fields, including both hardware and software technologies. Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies primarily include computer vision, speech processing, natural language processing, and machine learning / deep learning.
[0033] Machine Learning (ML) is a multidisciplinary field involving probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory. It specifically studies how computers can simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to endow computers with intelligence; its applications span all areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and instruction-based learning.
[0034] The virtual object control involved in this application embodiment is mainly based on artificial neural network technology in machine learning. Based on a large amount of pre-collected action data, the action prediction model is trained, and the virtual object is controlled by outputting predicted action parameters based on the action prediction model, so that the virtual object performs corresponding actions.
[0035] In related technologies, motion prediction models predict motion at a fixed frame rate, which can lead to virtual objects moving too fast or too slow on computer devices with varying computing capabilities.
[0036] For example, if a motion prediction model performs motion prediction at 60Hz, and this model is deployed on a computer with poor computing power, the virtual objects in the application will move slowly because the application's frame rate is lower than 60Hz (e.g., 30Hz). For example, an action that should have been completed in 1 / 60th of a second will actually be completed in 1 / 30th of a second. If the model is deployed on a computer with strong computing power, the virtual objects in the application will move too fast because the application's frame rate is higher than 60Hz (e.g., 120Hz). For example, an action that should have been completed in 1 / 60th of a second will actually be completed in 1 / 120th of a second.
[0037] To address the aforementioned issues, this application provides a scheme for dynamically determining motion parameters based on the real-time frame rate of an application. In this scheme, the computer device does not perform motion prediction based solely on a single motion frame rate, but rather predicts motion parameters corresponding to at least two candidate frame rates. This allows for the subsequent determination of target motion parameters suitable for the real-time frame rate based on at least two sets of predicted motion parameters, ensuring smooth operation of virtual object actions on computer devices with varying performance levels.
[0038] The virtual object control method provided in this application is used in computer devices that have virtual object control requirements. The virtual object can be a virtual character, virtual animal, virtual robot, virtual cartoon character, etc. in an application, and the computer device can be a smartphone, tablet computer, personal computer, or vehicle terminal, etc. This application does not limit the scope of the virtual object control method.
[0039] Figure 1 A flowchart illustrating a method for controlling a virtual object according to an exemplary embodiment of this application is shown. The method includes the following steps:
[0040] Step 101: Perform motion prediction based on the real-time motion parameters of virtual objects in the application to obtain at least two sets of predicted motion parameters, wherein different predicted motion parameters correspond to different candidate running frame rates.
[0041] Computer devices control virtual objects by setting corresponding motion parameters. Therefore, the actions of the virtual object in each frame are grouped into a set of motion parameters. To ensure smooth and continuous motion of the virtual object in each frame, the computer device needs to predict the motion parameters of the virtual object in the current frame to obtain the predicted motion parameters for the virtual object in the next frame.
[0042] Unlike related technologies that predict motion based on a single frame rate, in this embodiment, the computer device obtains different predicted motion parameters based on different candidate running frame rates, wherein there are at least two sets of predicted motion parameters.
[0043] In one possible implementation, the motion parameters include skeletal joint parameters and motion trajectory parameters of the virtual object. The skeletal joint parameters characterize the position, velocity, and direction of each skeletal joint in the virtual object, while the motion trajectory parameters characterize the position, direction of motion, type of motion, and speed of the virtual object.
[0044] In an illustrative example, the computer device selects 30Hz and 60Hz as candidate running frame rates, respectively, and performs motion prediction based on the real-time motion parameters of the current frame, obtaining the first set of predicted motion parameters corresponding to the 30Hz running frame rate and the second set of predicted motion parameters corresponding to the 60Hz running frame rate.
[0045] In another illustrative example, the computer device selects 30Hz, 60Hz and 120Hz as candidate running frame rates, respectively, and performs motion prediction based on the real-time motion parameters of the current frame, respectively obtaining the first set of predicted motion parameters corresponding to the 30Hz running frame rate, the second set of predicted motion parameters corresponding to the 60Hz running frame rate, and the third set of predicted motion parameters corresponding to the 120Hz running frame rate.
[0046] Step 102: Based on at least two sets of predicted action parameters and the real-time running frame rate of the application, determine the target action parameters, which are action parameters applicable to the real-time running frame rate.
[0047] When different computer devices run the same application, the application's frame rate may vary or become unstable due to differences in device performance. For example, a high-performance computer may run the application at a frame rate of 60Hz, while a low-performance computer may only achieve a frame rate of 30Hz. To dynamically adapt the application's frame rate, in this embodiment, the computer device acquires the application's real-time frame rate and determines target action parameters suitable for that real-time frame rate based on the real-time frame rate and at least two sets of predicted action parameters.
[0048] The target action parameter can be one of at least two sets of predicted action parameters, or it can be different from any set of predicted action parameters.
[0049] In one possible implementation, when the frame rate difference between the candidate running frame rate and the real-time running frame rate is less than a threshold (e.g., 5Hz), the computer device determines the predicted action parameters corresponding to the candidate running frame rate as the target action parameters under the real-time running frame rate.
[0050] When the frame rate difference between the real-time running frame rate and each candidate running frame rate is greater than the threshold, the computer device determines the target action parameters based on at least two sets of predicted action parameters.
[0051] In an illustrative example, the computer device selects 30Hz and 60Hz as candidate running frame rates. At this time, the real-time running frame rate of the application is 59Hz. The computer device directly determines the predicted action parameters corresponding to the candidate running frame rate of 60Hz as the target action parameters. When the real-time running frame rate of the application is 45Hz, the computer device determines the target action parameters based on the predicted action parameters corresponding to the 30Hz and 60Hz candidate running frame rates, combined with the real-time running frame rate.
[0052] Step 103: Control the virtual object based on the target action parameters.
[0053] Furthermore, the computer device controls the virtual object based on target motion parameters applicable to the real-time operating frame rate.
[0054] In one possible implementation, the computer device controls each skeletal node in the virtual object based on the target skeletal node parameters and the target trajectory parameters in the target motion parameters, so that the virtual object moves along the target trajectory.
[0055] In summary, in this embodiment, the computer device predicts actions based on real-time action parameters of virtual objects in an application, obtaining at least two sets of predicted action parameters corresponding to different candidate frame rates. Based on these two sets of predicted action parameters and the application's real-time frame rate, a target action parameter suitable for that real-time frame rate is determined, and the virtual object is then controlled based on the target action parameter. Using the solution provided in this embodiment, the computer device can dynamically combine the predicted action parameters with the application's real-time frame rate to determine action parameters that match the computer device's performance, avoiding the problem of virtual object actions being too fast or too slow on computer devices with different performance levels, and improving the smoothness of virtual object actions on different computer devices.
[0056] Regarding the method of motion prediction based on real-time motion parameters of virtual objects by computer devices, in one possible implementation, the computer device can pre-train a motion prediction model with multi-frame-rate prediction capabilities, thereby using the motion prediction model to predict at least two sets of predicted motion parameters. An exemplary embodiment is described below.
[0057] Figure 2 A flowchart illustrating a method for controlling a virtual object according to another exemplary embodiment of this application is shown. The method includes the following steps:
[0058] Step 201: Input the real-time motion parameters into the motion prediction model to obtain at least two sets of predicted motion parameters output by the motion prediction model.
[0059] Computer devices train motion prediction models based on large amounts of continuous motion data, enabling the generation of motion parameters for virtual objects. These models then predict motion parameters based on real-time motion data. Unlike related technologies that only predict motion parameters at a single frame rate, the motion prediction model in this embodiment has at least two output heads, each corresponding to a different candidate frame rate, thus achieving motion parameter prediction for at least two frame rates.
[0060] In one possible implementation, the action prediction model includes at least two expert networks, a gate network, and a hybrid expert network, wherein different expert networks are used to predict different actions, and the hybrid expert network has the same network structure as the expert networks.
[0061] Indicative, such as Figure 3 As shown, the virtual object supports six types of actions, each corresponding to a different expert network that learns from the others. Expert network 301 learns the standing action, expert network 302 learns the walking action, expert network 303 learns the running action, expert network 304 learns the hiding action, expert network 305 learns the alert action, and expert network 306 learns the jumping action. ω1 represents the network weight of expert network 301, ω2 represents the network weight of expert network 302, ω3 represents the network weight of expert network 303, ω4 represents the network weight of expert network 304, ω5 represents the network weight of expert network 305, and ω6 represents the network weight of expert network 306.
[0062] In this system, different expert networks all use the same network structure, but the network weights of the network layers differ among the expert networks. For example... Figure 3 As shown, the network structure 307 of each expert network consists of two fully connected layers. A fully connected layer means that each node is connected to all nodes in the previous layer, used to synthesize the extracted features. The input X of the expert network... i The output Y of the expert network can be obtained by processing through two fully connected layers. i .
[0063] Optionally, the input to the expert network includes the skeletal joint parameters and motion trajectory parameters corresponding to the current frame, and the output of the expert network includes the skeletal joint parameters, motion trajectory parameters, and phase parameters corresponding to the next frame.
[0064] Since actions such as standing and walking are actually periodic, that is, the cycle of left foot-right foot-left foot landing, computer devices use phase parameters to represent the current stage of the action cycle.
[0065] To illustrate, let's take a cycle of left foot landing - right foot landing - left foot landing as an example. Figure 4 The diagram shows the velocity curves for the right foot (401) and the left foot (402), with landing frames (403) for both feet annotated. Based on the periodic changes in these landing frames, corresponding motion phases can be generated, such as... Figure 5 As shown, the horizontal axis represents the frame number, and the vertical axis represents the phase of the action. A phase of 0 represents the standing state, and when walking, the phase changes periodically from 0 to 1.
[0066] Indicative, expert network input X i and expert network output Y i It can be represented as:
[0067]
[0068]
[0069] in, Represents the position of the bone joints in the current frame. Represents the velocity of the bone joints in the current frame. This represents the trajectory position of the current frame's root node. Represents the trajectory direction of the current frame's root node. Represents the action type of the current frame root node. This represents the position of the bone joints in the next frame. Represents the velocity of the skeletal joints in the next frame. This represents the trajectory position of the root node in the next frame. This represents the trajectory direction of the root node in the next frame. This represents the action type of the root node in the next frame. It represents the phase of the next frame.
[0070] Expert network input X i and expert network output Y i The relationship can be represented as:
[0071] Y i =W2ReLU(W1ReLU(W0X) i +b0)+b1)+b2
[0072] Among them, W i b i Represents the weights and biases of the i-th layer of the expert network (the example above uses a 2-layer fully connected layer as an example), and ReLU is the activation function.
[0073] It should be noted that the above embodiments are only illustrative of the network structure of expert networks, and do not constitute a limitation thereof.
[0074] Based on the above model structure, in one possible implementation, this step may include the following sub-steps:
[0075] 1. Use gate networks to predict action types and obtain the action weights corresponding to each action.
[0076] In order to improve the smoothness and naturalness of the transition between different actions performed by virtual objects, in this embodiment of the application, the computer device uses a gate network to predict the action type and obtain the action weight of each action, so as to perform expert network fusion based on the action weight.
[0077] In one possible implementation, the real-time motion parameters include motion trajectory parameters and phase parameters, wherein the motion trajectory parameters are used to characterize the motion trajectory of the root node, and the phase parameters are used to characterize the phase of the motion cycle.
[0078] Since motion prediction models are trained on a large amount of collected motion data, and the collected data is specific and absolute motion data, only by converting the absolute position corresponding to the data into a relative position can computer devices perform motion prediction through the model.
[0079] Computer devices determine a root node as a reference node for each skeletal node in a virtual object, and convert the collected absolute motion data into relative motion data, thereby obtaining the motion trajectory parameters of the virtual object.
[0080] In one possible implementation, the computer device inputs phase parameters and motion trajectory parameters over a future period into a gate network to obtain the action weights corresponding to each action output by the gate network. The motion trajectory parameters over the future period are predicted by the computer device based on received motion control commands (such as forward commands, backward commands, running commands, crawling commands, jumping commands, etc.).
[0081] In an illustrative example, the motion trajectory parameters include relative position, relative direction, motion type, and target velocity, respectively represented by... This represents the position of the root node one second from now. Represents the direction of the root node in the next second. This represents the action type of the root node in the next second. Represents the phase of the current frame.
[0082] Schematic representation: This network comprises a two-layer network structure, W i ,bi This represents the weights and biases of the i-th layer of the gate network. The process by which the gate network determines action weights based on phase parameters and motion trajectory parameters can be represented as:
[0083]
[0084]
[0085]
[0086] Where α is the action parameter (0-1 interval), W i b i This represents the weights and biases of the i-th layer of the gate network. p represents the Kronecker product. i X′ represents the phase of the i-th frame. The input X′ to the gate network. i It is a subset of the expert network input, including the trajectory position of the root node in the next second. Trajectory direction and action type
[0087] 2. Based on the action weights, the network weights of each expert network are fused to obtain the network weights of the hybrid expert network.
[0088] Furthermore, based on the determined action weights, the computer device fuses the network weights of the various expert networks to obtain the network weights of the hybrid expert network. The network weights of the hybrid expert network can be expressed as:
[0089]
[0090] Where n represents the number of expert networks, ω i α represents the network weight of the i-th expert network. i This represents the action weights corresponding to the i-th expert network.
[0091] Indicative, such as Figure 3 As shown, the computer device will X′ i Input gate network 308 to obtain action weights for each action, where α1 is the action weight for standing, α2 for walking, α3 for running, α4 for hiding, α5 for guarding, and α6 for jumping. The computer device then performs a weighted sum of the action weights and their corresponding network weights to obtain the network weight ω′ of the hybrid expert network 309.
[0092] 3. Input the real-time action parameters into the hybrid expert network to obtain at least two sets of predicted action parameters output by the hybrid expert network.
[0093] Indicative, such as Figure 3 As shown, the hybrid expert network 309 calculates the input real-time action parameters X. i The first prediction action parameter 310 corresponding to the candidate running frame rate of 60Hz and the second prediction action parameter 311 corresponding to the candidate running frame rate of 30Hz are output.
[0094] Step 202: Determine the interpolation ratio based on the frame rate difference between the real-time running frame rate and the candidate running frame rate.
[0095] In order to obtain the target motion parameters applicable to the real-time running frame rate more accurately, in one possible implementation, the computer device uses an interpolation method to determine the interpolation ratio based on the frame rate difference between the real-time running frame rate and the candidate running frame rate, so that subsequent interpolation calculations can be performed based on the interpolation ratio.
[0096] In one possible scenario, when only two candidate running frame rates are set, the computer device determines the interpolation ratio based on the real-time running frame rate and the two candidate running frame rates.
[0097] In another possible scenario, to improve the accuracy of subsequent interpolation calculations, the hybrid expert network has at least three output heads, each used to output predicted action parameters corresponding to at least three different candidate running frame rates. When determining the interpolation ratio, the computer device needs to select the two candidate running frame rates with the best interpolation effect from at least three candidate running frame rates. In one possible implementation, this step may include the following sub-steps:
[0098] 1. In the presence of at least three candidate running frame rates, a first candidate running frame rate and a second candidate running frame rate are determined from the at least three candidate running frame rates based on the real-time running frame rate. The first candidate running frame rate and the second candidate running frame rate are adjacent to the real-time running frame rate in the order of the size of the candidate running frame rates.
[0099] According to the principle of interpolation, the smaller the interpolation interval, the more accurate the interpolation result. Therefore, the computer device determines two candidate running frame rates adjacent to the real-time running frame rate from at least three candidate running frame rates.
[0100] In an illustrative example, when the hybrid expert network supports outputting predicted action parameters corresponding to three candidate running frame rates, namely candidate running frame rates of 30Hz, 60Hz and 120Hz, if the real-time running frame rate is 45Hz, the computer device will select 30Hz as the first candidate running frame rate and 60Hz as the second candidate running frame rate.
[0101] 2. Determine the interpolation ratio based on the frame rate difference between the first candidate running frame rate, the second candidate running frame rate, and the real-time running frame rate.
[0102] The computer device determines the interpolation ratio based on the frame rate difference between the determined first candidate running frame rate, the second candidate running frame rate, and the real-time running frame rate.
[0103] In an illustrative example, the real-time frame rate is b, where b∈[30,60]. The computer device can derive the formula for calculating the interpolation ratio k based on the frame rate difference:
[0104]
[0105] Step 203: Perform interpolation calculation based on at least two sets of predicted motion parameters and interpolation ratio to obtain the target motion parameters.
[0106] Furthermore, the computer device uses interpolation to calculate the target motion parameters corresponding to the real-time running frame rate based on at least two sets of predicted motion parameters and interpolation ratios.
[0107] In one possible implementation, the computer device performs interpolation calculations based on a first predicted motion parameter corresponding to a first candidate running frame rate, a second predicted motion parameter corresponding to a second candidate running frame rate, and an interpolation ratio to obtain the target motion parameters. This process may include the following steps:
[0108] 1. Determine the difference in motion parameters between the first predicted motion parameters and the second predicted motion parameters.
[0109] The computer device obtains the first predicted action parameters corresponding to the first candidate running frame rate and the second predicted action parameters corresponding to the second candidate running frame rate, and calculates the difference between the two to determine the action parameter difference between the first predicted action parameters and the second predicted action parameters.
[0110] In an illustrative example, the computer device determines the first predicted action parameter Y corresponding to the first candidate running frame rate of 30Hz. i 30 The second predicted action parameter Y corresponding to the second candidate running frame rate of 60Hz i 60 The difference between the first predicted action parameters and the second predicted action parameters is Y. i 60 -Y i 30 .
[0111] 2. Determine the motion parameter interpolation based on the difference in motion parameters and the interpolation ratio.
[0112] The computer device determines the motion parameter interpolation by multiplying the obtained motion parameter difference and the interpolation ratio.
[0113] In an illustrative example, when the real-time frame rate is b, b∈[30,60], the motion parameter interpolation is:
[0114] 3. The sum of the first predicted action parameter and the interpolated action parameter is determined as the target action parameter.
[0115] In an illustrative example, when the real-time frame rate is b, b∈[30,60], the computer device can obtain the target motion parameter Y corresponding to the real-time frame rate through interpolation. i b :
[0116]
[0117] It should be noted that the above explanation only uses interpolation as an example; computer devices can also use extrapolation. For instance, when candidate frame rates include 30Hz, 60Hz, and 90Hz, if the real-time frame rate is 120Hz, the computer device can calculate the target motion parameters corresponding to 120Hz based on the predicted motion parameters corresponding to 60Hz and 90Hz using extrapolation.
[0118] Step 204: Control the virtual object based on the target action parameters.
[0119] The implementation method of this step can refer to step 103 above, and will not be repeated here.
[0120] In this embodiment, the computer device uses gate networks to predict action types, obtains the action weights of each action, and performs weight fusion on the network weights of each expert network based on the action weights to obtain the network weights of the hybrid expert network, thereby improving the smoothness and naturalness of the transition between different actions performed by the virtual object.
[0121] In addition, based on the principle of interpolation, the computer device determines two candidate running frame rates adjacent to the real-time running frame rate from at least three candidate running frame rates. By combining the two sets of predicted action parameters corresponding to the two candidate running frame rates and performing interpolation calculations, the target action parameters corresponding to the real-time running frame rate can be obtained more accurately.
[0122] When a computer device determines the real-time frame rate, it only needs to combine the two candidate frame rates adjacent to the real-time frame rate and the two sets of predicted action parameters corresponding to the candidate frame rates, and then calculate the target action parameters through interpolation. Therefore, among the predicted action parameters corresponding to at least three different candidate frame rates output by the hybrid expert network, only the predicted action parameters corresponding to the two candidate frame rates adjacent to the real-time frame rate are invalid.
[0123] In one possible implementation, the computer device preferentially determines two adjacent candidate running frame rates based on the real-time running frame rate, and then uses a hybrid expert network to output the corresponding predicted action parameters, which can reduce the computational load of the computer device. The following exemplary embodiment will be used for illustration.
[0124] Figure 6 A flowchart illustrating a method for controlling a virtual object according to another exemplary embodiment of this application is shown. The method includes the following steps:
[0125] Step 601: In the presence of at least three candidate running frame rates, determine a first candidate running frame rate and a second candidate running frame rate from the at least three candidate running frame rates based on the real-time running frame rate. The first candidate running frame rate and the second candidate running frame rate are adjacent to the real-time running frame rate in the order of the size of the candidate running frame rates.
[0126] The computer device, based on the known real-time running frame rate, preferentially determines the first candidate running frame rate and the second candidate running frame rate from at least three candidate running frame rates according to the adjacent principle.
[0127] In an illustrative example, when the candidate running frame rates are 30Hz, 60Hz and 120Hz, if the real-time running frame rate is 45Hz, the computer device will select 30Hz as the first candidate running frame rate and 60Hz as the second candidate running frame rate.
[0128] Step 602: Perform action prediction based on the real-time action parameters of virtual objects in the application to obtain the first predicted action parameters corresponding to the first candidate running frame rate and the second predicted action parameters corresponding to the second candidate running frame rate.
[0129] The computer device predicts actions based on the determined first and second candidate frame rates using an action prediction model. The hybrid expert network outputs two sets of predicted action parameters instead of outputting any additional predicted action parameters.
[0130] Indicative, such as Figure 7 As shown, the hybrid expert network 701 has three output heads, which are used to output the predicted action parameters corresponding to the three candidate running frame rates (30Hz, 60Hz, and 120Hz). Given that the real-time running frame rate is 45Hz, the hybrid expert network only outputs the predicted action parameters corresponding to the candidate running frame rate of 30Hz and the candidate running frame rate of 60Hz, and no longer outputs the predicted action parameters for the candidate running frame rate of 120Hz.
[0131] Step 603: Determine the interpolation ratio based on the frame rate difference between the real-time running frame rate and the candidate running frame rate.
[0132] The computer device determines the interpolation ratio based on the frame rate difference between the real-time running frame rate and the candidate running frame rate, according to the selected first candidate running frame rate and second candidate running frame rate.
[0133] In an illustrative example, the real-time frame rate is b, where b∈[30,60]. The computer device can derive the formula for calculating the interpolation ratio k based on the frame rate difference:
[0134]
[0135] Step 604: Perform interpolation calculation based on at least two sets of predicted motion parameters and interpolation ratio to obtain the target motion parameters.
[0136] The implementation method of this step can refer to step 303 above, and will not be repeated here.
[0137] Step 605: Control the virtual object based on the target action parameters.
[0138] The implementation method of this step can refer to step 304 above, and will not be repeated here in this embodiment.
[0139] In this embodiment, the computer device preferentially determines two adjacent candidate running frame rates based on the real-time running frame rate, thereby determining two sets of predicted action parameters corresponding to the candidate running frame rates. This avoids the hybrid expert network from predicting actions for other invalid candidate running frame rates, thus reducing the computational load of the computer device.
[0140] The training process of the action prediction model in the above embodiments will be described below using exemplary examples.
[0141] Figure 8 A flowchart illustrating the training process of an action prediction model provided in an exemplary embodiment of this application is shown. The process may include the following steps:
[0142] Step 801: Obtain sample action parameters and at least two sets of true values of predicted action parameters corresponding to the sample action parameters, wherein different true values of predicted action parameters correspond to different candidate running frame rates.
[0143] Computer devices need to control the motion of virtual objects based on corresponding motion parameters, including skeletal joint parameters, motion trajectory parameters, and phase parameters.
[0144] In one possible implementation, the computer device preprocesses the acquired motion data, transforming it into sample motion parameters. Since motion data is typically acquired at a high frame rate, while motion prediction models usually predict motion at relatively low frame rates, the computer device obtains at least two sets of ground truth values for the predicted motion parameters based on different candidate running frame rates through downsampling processing.
[0145] For the input data of the model, the skeletal joint parameters include relative position, relative velocity, relative forward direction, and relative upward direction; the motion trajectory parameters include relative position, relative direction, motion type, and target velocity; and the gate network input includes phase, future trajectory position, and direction.
[0146] The output data corresponds to the skeletal joint parameters and motion trajectory parameters of the next frame, respectively, based on the downsampling rate. The corresponding model input and output are shown in Table 1 when the downsampling rate is 60Hz and 30Hz.
[0147] Table 1
[0148]
[0149]
[0150] In one possible implementation, the computer device acquiring sample action parameters and at least two sets of true values for predicted action parameters corresponding to the sample action parameters may include the following steps:
[0151] 1. Obtain the original motion parameters corresponding to the original running frame rate, where the original running frame rate is greater than the candidate running frame rate;
[0152] The establishment of motion prediction models is based on sample motion data. Computer equipment usually collects sample motion data at a high frame rate and then converts the collected sample motion data into raw motion parameters that can be input into the model.
[0153] In an illustrative example, the computer device acquires samples at the raw running frame rate of 120Hz to obtain the corresponding raw motion parameters.
[0154] 2. Determine at least two downsampling rates based on the original running frame rate and at least two candidate running frame rates;
[0155] Since the original running frame rate is usually high, while the motion prediction model performs motion prediction at a relatively low running frame rate, the computer device needs to determine at least two downsampling rates based on at least two candidate running frame rates.
[0156] In an illustrative example, if the application's real-time frame rate is between 30 and 60 Hz, and the raw frame rate based on data acquisition is 120 Hz, then the computer device can determine the downsampling rate to be 30 Hz and 60 Hz.
[0157] 3. For the same sample action parameter in the original action parameters, downsample the original action parameters based on at least two downsampling rates to obtain at least two sets of true values of predicted action parameters.
[0158] Furthermore, the computer device can downsample the original motion parameters based on at least two determined downsampling rates for the same sample motion parameter in the original motion parameters, thereby obtaining at least two sets of true values for the predicted motion parameters.
[0159] Step 802: Input the sample action parameters into the action prediction model to obtain at least two sets of sample predicted action parameters output by the action prediction model.
[0160] After converting sample action data into corresponding sample action parameters, the computer device can obtain at least two sets of sample predicted action parameters by inputting the sample action parameters into the action prediction model.
[0161] Step 803: Train the action prediction model with supervision from at least two sets of true values of predicted action parameters and at least two sets of sample predicted action parameters.
[0162] To ensure that the action prediction model outputs more accurate predicted action parameters, the computer equipment repeatedly trains the model. The computer equipment trains the action prediction model with supervision from at least two sets of true predicted action parameter values and at least two sets of sample predicted action parameter values. This ensures that the predicted action parameters output by the action prediction model in the next frame infinitely approach the true values of the sample predicted action parameters, thereby improving the accuracy of the action prediction model.
[0163] In one possible implementation, the computer device predicts action parameters based on samples and determines an action parameter prediction loss. Based on this loss, the action prediction model is trained using backpropagation. Training terminates when training conditions are met (e.g., loss convergence or the number of training epochs is reached).
[0164] Indicative, such as Figure 9As shown, the motion prediction model outputs the virtual object motion parameters corresponding to downsampling rates of 30Hz and 60Hz, respectively. The horizontal axis represents time. It can be seen that when the downsampling rate is 60Hz, the motion between each frame is more detailed and there are more connected motions. When the downsampling rate is 30Hz, the motion between each frame is larger. Moreover, the motion performance of the virtual object at the same time is the same under different frame rates, which effectively confirms the effect of dynamically determining the target motion parameters based on the real-time running frame rate in the embodiments of this application.
[0165] In this embodiment, based on model size analysis, when using the action prediction model to output action parameters corresponding to a single frame rate, assuming the input dimension is 372, the gate network input dimension is 63, the output dimension is 372, there are 4 expert networks, each expert network hidden layer contains 512 units, and the gate network hidden layer contains 32 units, the number of parameters contained in the model is (372×512+512×512+512×372)×4+63×32+32×32+32×4=2575456≈2.5e 6 When outputting two sets of motion parameters corresponding to two different frame rates, the number of parameters is (372×512+512×512+512×372×2)×4+63×32+32×32+32×4=3337312≈3.3e 6 With a model size increase of only 29.6%, it is possible to achieve the effect of dynamically determining target action parameters based on the real-time running frame rate.
[0166] Since the real-time requirements of actions are high in virtual object control scenarios, in this embodiment, real-time action parameters are used as input, and a motion prediction model with at least two output heads (corresponding to different frame rates) is used to predict multi-frame-rate action parameters to ensure the prediction speed of action parameters, thereby meeting the real-time requirements of virtual object actions and ensuring the smoothness of the actions performed by the virtual object.
[0167] In addition, at least two output heads in the action prediction model share the backbone network, with only the network weights of the output heads differing. This reduces the model size while ensuring the accuracy of action parameter prediction, which helps to reduce the difficulty of model deployment (it can be deployed to mobile terminals) and improve the model's running speed.
[0168] Meanwhile, since virtual objects support the execution of multiple actions, and the actions performed by virtual objects are uncertain, a gate network in the action prediction model is used to predict action types. Based on the prediction results of action types, the network weights of expert networks corresponding to different action types are fused, enabling the fused hybrid expert network to learn the action features of different action types. Subsequently, when using the hybrid expert network for action parameter prediction, the naturalness of the transitions between different actions is improved when the required actions of the virtual object change. This avoids the problem of abrupt transitions between different actions when directly using the action parameter prediction results of different expert networks to control the virtual object, further improving the control quality of the virtual object.
[0169] Figure 10 This is a structural block diagram of a virtual object control device provided in an exemplary embodiment of this application. The device includes:
[0170] The motion prediction module 1001 is used to predict motion based on the real-time motion parameters of virtual objects in the application, and obtain at least two sets of predicted motion parameters, wherein different predicted motion parameters correspond to different candidate running frame rates.
[0171] The motion prediction module 1001 is further configured to determine target motion parameters based on at least two sets of predicted motion parameters and the real-time running frame rate of the application, wherein the target motion parameters are motion parameters applicable to the real-time running frame rate.
[0172] The control module 1002 is used to control the virtual object based on the target motion parameters.
[0173] Optionally, the action prediction module 1001 is used for:
[0174] The interpolation ratio is determined based on the frame rate difference between the real-time running frame rate and the candidate running frame rate.
[0175] The target action parameters are obtained by interpolation calculation based on at least two sets of the predicted action parameters and the interpolation ratio.
[0176] Optionally, the action prediction module 1001 is used for:
[0177] In the presence of at least three candidate running frame rates, a first candidate running frame rate and a second candidate running frame rate are determined from the at least three candidate running frame rates based on the real-time running frame rate. The first candidate running frame rate and the second candidate running frame rate are adjacent to the real-time running frame rate in the order of the size of the candidate running frame rates.
[0178] The interpolation ratio is determined based on the frame rate difference between the first candidate running frame rate, the second candidate running frame rate, and the real-time running frame rate.
[0179] The interpolation calculation based on at least two sets of predicted action parameters and the interpolation ratio to obtain the target action parameters includes:
[0180] The target action parameters are obtained by interpolation based on the first predicted action parameters corresponding to the first candidate running frame rate, the second predicted action parameters corresponding to the second candidate running frame rate, and the interpolation ratio.
[0181] Optionally, the action prediction module 1001 is used for:
[0182] Determine the difference in action parameters between the first predicted action parameter and the second predicted action parameter;
[0183] Based on the difference in motion parameters and the interpolation ratio, the motion parameter interpolation is determined;
[0184] The sum of the first predicted action parameter and the interpolated action parameter is determined as the target action parameter.
[0185] Optionally, the action prediction module 1001 is used for:
[0186] In the presence of at least three candidate running frame rates, a first candidate running frame rate and a second candidate running frame rate are determined from the at least three candidate running frame rates based on the real-time running frame rate. The first candidate running frame rate and the second candidate running frame rate are adjacent to the real-time running frame rate in the order of the size of the candidate running frame rates.
[0187] Based on the real-time action parameters of the virtual object in the application, action prediction is performed to obtain the first predicted action parameters corresponding to the first candidate running frame rate and the second predicted action parameters corresponding to the second candidate running frame rate.
[0188] Optionally, the action prediction module 1001 is used for:
[0189] The real-time motion parameters are input into the motion prediction model to obtain at least two sets of predicted motion parameters output by the motion prediction model.
[0190] Optionally, the action prediction model includes at least two expert networks, a gate network, and a hybrid expert network, wherein different expert networks are used to predict different actions, and the hybrid expert network has the same network structure as the expert networks.
[0191] The action prediction module 1001 is used for:
[0192] The action type is predicted by the gate network to obtain the action weights corresponding to each action.
[0193] Based on the action weights, the network weights of each expert network are fused to obtain the network weights of the hybrid expert network.
[0194] The real-time action parameters are input into the hybrid expert network to obtain at least two sets of predicted action parameters output by the hybrid expert network.
[0195] Optionally, the real-time motion parameters include motion trajectory parameters and phase parameters. The motion trajectory parameters are used to characterize the motion trajectory of the root node, and the phase parameters are used to characterize the stage of the current motion cycle.
[0196] The action prediction module 1001 is used for:
[0197] The phase parameters and the motion trajectory parameters over a future period are input into the gate network to obtain the action weights corresponding to each action output by the gate network.
[0198] Optionally, the real-time motion parameters may also include skeletal joint parameters, which are used to characterize the motion of the skeletal joints relative to the root node.
[0199] The action prediction module 1001 is used for:
[0200] The skeletal joint parameters and the motion trajectory parameters are input into the hybrid expert network to obtain at least two sets of skeletal joint prediction parameters, motion trajectory prediction parameters, and phase prediction parameters output by the hybrid expert network.
[0201] Optionally, the action prediction module 1001 is used for:
[0202] Obtain sample action parameters and at least two sets of true values of predicted action parameters corresponding to the sample action parameters, wherein different true values of predicted action parameters correspond to different candidate running frame rates;
[0203] The sample action parameters are input into the action prediction model to obtain at least two sets of sample predicted action parameters output by the action prediction model.
[0204] The action prediction model is trained using at least two sets of true values of the predicted action parameters as supervision for at least two sets of the sample predicted action parameters.
[0205] Optionally, the action prediction module 1001 is used for:
[0206] Obtain the original action parameters corresponding to the original running frame rate, wherein the original running frame rate is greater than the candidate running frame rate;
[0207] At least two downsampling rates are determined based on the original running frame rate and at least two candidate running frame rates;
[0208] For the same sample action parameter in the original action parameters, the original action parameters are downsampled based on at least two downsampling rates to obtain at least two sets of true values of the predicted action parameters.
[0209] In summary, in this embodiment, the computer device predicts actions based on real-time action parameters of virtual objects in an application, obtaining at least two sets of predicted action parameters corresponding to different candidate frame rates. Based on these two sets of predicted action parameters and the application's real-time frame rate, a target action parameter suitable for that real-time frame rate is determined, and the virtual object is then controlled based on the target action parameter. Using the solution provided in this embodiment, the computer device can dynamically combine the predicted action parameters with the application's real-time frame rate to determine action parameters that match the computer device's performance, avoiding the problem of virtual object actions being too fast or too slow on computer devices with different performance levels, and improving the smoothness of virtual object actions on different computer devices.
[0210] It should be noted that the apparatus provided in the above embodiments is only an example of the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the apparatus can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and their implementation process can be found in the method embodiments, which will not be repeated here.
[0211] Please refer to Figure 11 This illustration shows a schematic diagram of the structure of a computer device provided in an exemplary embodiment of this application. Specifically, the computer device 1100 includes a Central Processing Unit (CPU) 1101, a system memory 1104 including a random access memory 1102 and a read-only memory 1103, and a system bus 1105 connecting the system memory 1104 and the CPU 1101. The computer device 1100 also includes a basic input / output system (I / O system) 1106 that facilitates the transfer of information between various devices within the computer, and a mass storage device 1107 for storing the operating system 1113, application programs 1114, and other program modules 1115.
[0212] The basic input / output system 1106 includes a display 1108 for displaying information and an input device 1109 for user input, such as a mouse or keyboard. Both the display 1108 and the input device 1109 are connected to the central processing unit 1101 via an input / output controller 1110 connected to the system bus 1105. The basic input / output system 1106 may also include the input / output controller 1110 for receiving and processing input from multiple other devices such as a keyboard, mouse, or electronic stylus. Similarly, the input / output controller 1110 also provides output to a display screen, printer, or other types of output devices.
[0213] The mass storage device 1107 is connected to the central processing unit 1101 via a mass storage controller (not shown) connected to the system bus 1105. The mass storage device 1107 and its associated computer-readable media provide non-volatile storage for the computer device 1100. That is, the mass storage device 1107 may include computer-readable media (not shown) such as a hard disk or drive.
[0214] Without loss of generality, the computer-readable medium may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented using any method or technology for storing information such as computer-readable instructions, data structures, program modules, or other data. Computer storage media include random access memory (RAM), read-only memory (ROM), flash memory or other solid-state storage technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic tape cassettes, magnetic tape, disk storage, or other magnetic storage devices. Of course, those skilled in the art will recognize that the computer storage media are not limited to the above-mentioned types. The system memory 1104 and mass storage device 1107 described above can be collectively referred to as memory.
[0215] The memory stores one or more programs, which are configured to be executed by one or more central processing units 1101. The one or more programs contain instructions for implementing the methods described above, and the central processing unit 1101 executes the one or more programs to implement the methods provided in the various method embodiments described above.
[0216] According to various embodiments of this application, the computer device 1100 can also be connected to a remote computer on a network, such as the Internet. That is, the computer device 1100 can be connected to the network 1112 via the network interface unit 1111 connected to the system bus 1105, or the network interface unit 1111 can be used to connect to other types of networks or remote computer systems (not shown).
[0217] The memory further includes one or more programs stored in the memory, and the one or more programs include steps performed by a computer device in the methods provided in the embodiments of this application.
[0218] This application also provides a computer-readable storage medium storing at least one instruction, which is loaded and executed by a processor to implement the virtual object control method described in the above embodiments.
[0219] Optionally, the computer-readable storage medium may include ROM, RAM, solid-state drives (SSDs), or optical discs, etc. The RAM may include resistive random access memory (ReRAM) and dynamic random access memory (DRAM).
[0220] This application provides a computer program product including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the virtual object control method described in the above embodiments.
[0221] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0222] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for controlling a virtual object, characterized in that, The method includes: Action prediction is performed based on the real-time action parameters of virtual objects in the application, resulting in at least two sets of predicted action parameters, where different predicted action parameters correspond to different candidate running frame rates; Based on the frame rate difference between the real-time running frame rate of the application and the candidate running frame rate, an interpolation ratio is determined; based on at least two sets of predicted action parameters and the interpolation ratio, an interpolation calculation is performed to obtain target action parameters, which are action parameters applicable to the real-time running frame rate; The virtual object is controlled based on the target action parameters.
2. The method according to claim 1, characterized in that, Determining the interpolation ratio based on the frame rate difference between the real-time running frame rate of the application and the candidate running frame rate includes: In the presence of at least three candidate running frame rates, a first candidate running frame rate and a second candidate running frame rate are determined from the at least three candidate running frame rates based on the real-time running frame rate. The first candidate running frame rate and the second candidate running frame rate are adjacent to the real-time running frame rate in the order of the size of the candidate running frame rates. The interpolation ratio is determined based on the frame rate difference between the first candidate running frame rate, the second candidate running frame rate, and the real-time running frame rate. The interpolation calculation based on at least two sets of predicted action parameters and the interpolation ratio to obtain target action parameters includes: The target action parameters are obtained by interpolation based on the first predicted action parameters corresponding to the first candidate running frame rate, the second predicted action parameters corresponding to the second candidate running frame rate, and the interpolation ratio.
3. The method according to claim 2, characterized in that, The interpolation operation based on the first predicted action parameter corresponding to the first candidate running frame rate, the second predicted action parameter corresponding to the second candidate running frame rate, and the interpolation ratio to obtain the target action parameter includes: Determine the difference in action parameters between the first predicted action parameter and the second predicted action parameter; Based on the difference in motion parameters and the interpolation ratio, the motion parameter interpolation is determined; The sum of the first predicted action parameter and the interpolated action parameter is determined as the target action parameter.
4. The method according to claim 1, characterized in that, The action prediction based on real-time action parameters of virtual objects in the application yields at least two sets of predicted action parameters, including: In the presence of at least three candidate running frame rates, a first candidate running frame rate and a second candidate running frame rate are determined from the at least three candidate running frame rates based on the real-time running frame rate. The first candidate running frame rate and the second candidate running frame rate are adjacent to the real-time running frame rate in the order of the size of the candidate running frame rates. Based on the real-time action parameters of the virtual object in the application, action prediction is performed to obtain the first predicted action parameters corresponding to the first candidate running frame rate and the second predicted action parameters corresponding to the second candidate running frame rate.
5. The method according to any one of claims 1 to 4, characterized in that, The action prediction based on real-time action parameters of virtual objects in the application yields at least two sets of predicted action parameters, including: The real-time motion parameters are input into the motion prediction model to obtain at least two sets of predicted motion parameters output by the motion prediction model.
6. The method according to claim 5, characterized in that, The action prediction model includes at least two expert networks, a gate network, and a hybrid expert network, wherein different expert networks are used to predict different actions, and the hybrid expert network has the same network structure as the expert networks. The step of inputting the real-time motion parameters into the motion prediction model to obtain at least two sets of predicted motion parameters output by the motion prediction model includes: The action type is predicted by the gate network to obtain the action weights corresponding to each action. Based on the action weights, the network weights of each expert network are fused to obtain the network weights of the hybrid expert network. The real-time action parameters are input into the hybrid expert network to obtain at least two sets of predicted action parameters output by the hybrid expert network.
7. The method according to claim 6, characterized in that, The real-time motion parameters include motion trajectory parameters and phase parameters. The motion trajectory parameters are used to characterize the motion trajectory of the root node, and the phase parameters are used to characterize the stage of the motion cycle. The step of predicting action types through the gate network to obtain the action weights corresponding to each action includes: The phase parameters and the motion trajectory parameters over a future period are input into the gate network to obtain the action weights corresponding to each action output by the gate network.
8. The method according to claim 7, characterized in that, The real-time motion parameters also include skeletal joint parameters, which are used to characterize the motion of the skeletal joints relative to the root node. The step of inputting the real-time action parameters into the hybrid expert network to obtain at least two sets of predicted action parameters output by the hybrid expert network includes: The skeletal joint parameters and the motion trajectory parameters are input into the hybrid expert network to obtain at least two sets of skeletal joint prediction parameters, motion trajectory prediction parameters, and phase prediction parameters output by the hybrid expert network.
9. The method according to claim 5, characterized in that, The method further includes: Obtain sample action parameters and at least two sets of true values of predicted action parameters corresponding to the sample action parameters, wherein different true values of predicted action parameters correspond to different candidate running frame rates; The sample action parameters are input into the action prediction model to obtain at least two sets of sample predicted action parameters output by the action prediction model. The action prediction model is trained using at least two sets of true values of the predicted action parameters as supervision for at least two sets of the sample predicted action parameters.
10. The method according to claim 9, characterized in that, The acquisition of sample action parameters and at least two sets of true values of predicted action parameters corresponding to the sample action parameters includes: Obtain the original action parameters corresponding to the original running frame rate, wherein the original running frame rate is greater than the candidate running frame rate; At least two downsampling rates are determined based on the original running frame rate and at least two candidate running frame rates; For the same sample action parameter in the original action parameters, the original action parameters are downsampled based on at least two downsampling rates to obtain at least two sets of true values of the predicted action parameters.
11. A control device for a virtual object, characterized in that, The device includes: The motion prediction module is used to predict motion based on the real-time motion parameters of virtual objects in the application, and obtain at least two sets of predicted motion parameters, where different predicted motion parameters correspond to different candidate running frame rates; The action prediction module is further configured to determine an interpolation ratio based on the frame rate difference between the real-time running frame rate of the application and the candidate running frame rate; and to perform interpolation calculation based on at least two sets of predicted action parameters and the interpolation ratio to obtain target action parameters, wherein the target action parameters are action parameters applicable to the real-time running frame rate. The control module is used to control the virtual object based on the target action parameters.
12. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing at least one instruction, which is loaded and executed by the processor to implement the control method for the virtual object as described in any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that, The readable storage medium stores at least one instruction, which is loaded and executed by a processor to implement the control method for the virtual object as described in any one of claims 1 to 10.
14. A computer program product, characterized in that, The computer program product includes computer instructions stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions to cause the computer device to perform the control method for the virtual object as described in any one of claims 1 to 10.
Citation Information
Patent Citations
Action generation method and device based on neural network and computing equipment
CN113592986A
Game graph parameter configuration method and device thereof and terminal equipment
CN113769387A