Method, device, equipment and computer program for displaying video frames
By adjusting video update frequencies based on resource consumption indicators, the method improves the fluency and interaction rates of video frame display in virtual environments.
Patent Information
- Application Number
- JP2023575358
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2022-01-05
- Filing Date
- 2022-10-24
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2042-10-24
AI Technical Summary
Existing methods for displaying video frames in virtual environments based on initial video update frequency of virtual models result in reduced fluency and low man-machine interaction rates due to inefficient resource consumption.
A method and apparatus for displaying video frames that involve obtaining a resource consumption indicator based on the initial video update frequency, adjusting the target video update frequency based on resource consumption metrics, and displaying frames accordingly to optimize resource usage and improve fluency.
The method enhances the display fluency of video frames and increases man-machine interaction rates by effectively managing resource consumption through targeted video update frequencies.
Smart Images

Figure 2024530563000001_ABST
Abstract
Description
[Technical field]
[0001] This application claims priority to a Chinese patent application filed on January 5, 2022, bearing application number 202210006550.9 and entitled "Method, device, equipment and storage medium for displaying video frames," the entire contents of which are incorporated herein by reference.
[0002] TECHNICAL FIELD The embodiments of the present application relate to the field of computer technology, and in particular to a method, apparatus, device and storage medium for displaying video frames. [Background technology]
[0003] With the development of computer technology, there are more and more application programs that can provide a virtual environment, and the virtual environment includes at least one virtual model. When displaying the screen of the virtual environment, the terminal displays a video frame of the at least one virtual model on the screen, so that the interaction object can check it.
[0004] In the related art, an animation frame corresponding to a virtual model is directly displayed based on an initial animation update frequency of the virtual model, where the initial animation update frequency of the virtual model is determined based on a ratio between a rendering size and a reference size of the virtual model. Summary of the Invention [Problem to be solved by the invention]
[0005] The embodiments of the present application provide a method, device, apparatus and storage medium for displaying video frames, for improving the fluency of displaying video frames. The technical solutions are as follows: [Means for solving the problem]
[0006] According to one aspect, an embodiment of the present application provides a method for displaying video frames, the method comprising: obtaining a resource consumption metric based on an initial video update frequency of at least one virtual model, the resource consumption metric indicating an amount of resources consumed by updating video based on an initial video update frequency of the at least one virtual model; obtaining a target video update frequency of the at least one virtual model based on the resource consumption index and the initial video update frequency; and displaying video frames corresponding to the at least one virtual model based on the target video update frequency.
[0007] According to another aspect, there is provided a display device for video frames, said device comprising: a first obtaining unit for obtaining a resource consumption index based on an initial video update frequency of at least one virtual model, the resource consumption index indicating an amount of resources consumed by updating a video based on the initial video update frequency of the at least one virtual model; A second obtaining unit obtains a target video update frequency of the at least one virtual model according to the resource consumption index and the initial video update frequency; and a display unit for displaying video frames corresponding to the at least one virtual model based on the target video update frequency.
[0008] According to another aspect, there is provided a computer device, the computer device including a processor and a memory, the memory storing at least one computer program, the at least one computer program being loaded and executed by the processor to cause the computer device to realize any one of the above video frame display methods.
[0009] According to another aspect, there is further provided a non-volatile computer readable storage medium having at least one computer program stored therein, the at least one computer program being loaded and executed by a processor to cause a computer to realize any one of the above video frame display methods.
[0010] According to another aspect, there is further provided a computer program product, the computer program product including a computer program or computer instructions, the computer program or computer instructions being loaded and executed by a processor to cause a computer to realize any one of the above methods for displaying video frames. Effect of the Invention
[0011] According to the technical solution provided by the embodiments of the present application, video frames corresponding to at least one virtual model are displayed according to a target video update frequency of the at least one virtual model, and the target video update frequency of the at least one virtual model is determined according to an initial video update frequency of the at least one virtual model and taking into consideration a resource consumption index. According to the target video update frequency of the at least one virtual model, an effective global control can be performed on resource consumption, so as to improve the fluency of displaying video frames and further enhance the man-machine interaction rate. [Brief description of the drawings]
[0012] [Figure 1] FIG. 2 is a schematic diagram of an implementation environment of a video frame display method provided by an embodiment of the present application; [Diagram 2] 1 is a flowchart of a method for displaying video frames provided by an embodiment of the present application; [Diagram 3] FIG. 2 is a schematic diagram of a video update synchronization situation provided by an embodiment of the present application; [Figure 4] 1 is a schematic diagram of a screen display effect provided by an embodiment of the present application; [Diagram 5]1 is a schematic diagram of a screen display effect provided by an embodiment of the present application; [Figure 6] 1 is a schematic diagram of a screen display effect provided by an embodiment of the present application; [Figure 7] FIG. 2 is a schematic diagram of a distribution situation of a virtual model provided by an embodiment of the present application. [Figure 8] FIG. 2 is a schematic diagram of a distribution situation of a virtual model provided by an embodiment of the present application. [Figure 9] 1 is a schematic diagram of a screen display effect provided by an embodiment of the present application; [Figure 10] 1 is a schematic diagram of a screen display effect provided by an embodiment of the present application; [Figure 11] 1 is a schematic diagram of a display process of a video frame provided by an embodiment of the present application; [Figure 12] FIG. 2 is a schematic diagram of a display device for video frames provided by an embodiment of the present application; [Figure 13] FIG. 2 is a structural schematic diagram of a computer device provided by an embodiment of the present application; DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0013] In order to make the objectives, technical solutions and advantages of the present application more comprehensible, the following describes the embodiments of the present application in more detail in conjunction with the drawings.
[0014] The examples of this application introduce the terminology involved.
[0015] Virtual environment: An environment provided (or displayed) when an application program runs on a terminal, the virtual environment being an environment for the activity of created virtual objects. The virtual environment may be a 2D virtual environment, a 2.5D virtual environment, or a 3D virtual environment. The virtual environment may be a simulation environment for the real world, a semi-simulated semi-virtual environment, or even a full virtual environment.
[0016] Virtual object: an object that can be moved in a virtual environment. The virtual object may be a virtual person, a virtual animal, a cartoon character, etc. An interaction object controls the virtual object by using an external object or by clicking on a touch display. In a virtual environment, each virtual object has its own shape and volume and occupies a part of the space of the virtual environment. For example, if the virtual environment is a three-dimensional virtual environment, the virtual object is a three-dimensional model established based on video skeleton technology.
[0017] Virtual model: A model consisting of skeletons in a virtual environment. Virtual models include, but are not limited to, virtual objects, virtual props, virtual pets, etc. A terminal displays a video of the virtual model, and the video of the virtual model is composed of multiple video frames. Each video frame in the video of the virtual model is obtained by performing complex logical calculations based on the relationships between skeletons, and consumes a lot of resources (e.g., CPU (Central Processing Unit) resources). By controlling the video update frequency of the virtual model, the number of video frames by logical calculations can be controlled, thereby controlling resource consumption.
[0018] FPS (Frames Per Second): Abbreviated as frame rate, the higher the frame rate, the smoother the screen experience.
[0019] URO (Update Rate Optimizations): It is a video underclocking optimization technique for a virtual model of UE4 (Unreal Engine 4). In some embodiments, URO describes the video update frequency, for example, URO1 updates the video once every one frame screen, URO2 updates the video once every two frames screen, and so on.
[0020] Resource consumption: The resources consumed by updating the animation of the virtual model. For example, the consumed resources is the CPU time taken to occupy, and the higher the resource consumption, the longer the CPU time required to update each frame screen.
[0021] In the related art, the video frames corresponding to the virtual model are directly displayed according to the initial video update frequency of the virtual model, and the initial video update frequency of the virtual model is determined according to the ratio between the rendering size and the reference size of the virtual model. The information provided by the method of displaying video frames according to the initial video update frequency of the virtual model is limited, which reduces the fluency of video frame display and reduces the man-machine interaction rate.
[0022] 1 is a schematic diagram of an implementation environment of a method for displaying video frames provided by an embodiment of the present application. The implementation environment includes a terminal 11 and a server 12.
[0023] An application program supporting a virtual environment is installed and operated on the terminal 11. An interaction object uses the terminal 11 to control a virtual object to perform an action in the virtual environment provided by the application program, including, but not limited to, body posture adjustment, crawling, walking, running, cycling, jumping, driving, picking, shooting, attacking, throwing, changing position, etc. In some embodiments, the terminal 11 may also be referred to as an electronic device.
[0024] The embodiments of the present application are not limited to application programs that support virtual environments. By way of example, application programs that support virtual environments include, but are not limited to, VR (Virtual Reality) type application programs, AR (Augmented Reality) type application programs, 3D map programs, game type application programs, social type application programs, interactive entertainment type application programs, and the like.
[0025] Exemplarily, game application programs include, but are not limited to, shooting games, MOBA (Multiplayer Online Battle Arena) games, SLG (Simulation Games), etc. Shooting games include, but are not limited to, FPS (First-Person Shooting) games and TPS (Third-Personal Shooting) games, and refer to all games in which a long-distance attack is performed using a prop.
[0026] In some embodiments, the application program supporting the virtual environment can support at least one of the following operating systems: Windows operating system, Apple operating system, Android operating system, IOS operating system, and Linux operating system, and application programs running on different operating systems can be connected to each other. In some embodiments, the application program supporting the virtual environment is an application program developed based on a three-dimensional engine. In some embodiments, the application program supporting the virtual environment is a standalone application program or a network online application program.
[0027] The server 12 provides background services to application programs supporting the virtual environment installed on the terminal 11. In one possible implementation, the server 12 performs primary computing operations and the terminal 11 performs secondary computing operations, or the server 12 performs secondary computing operations and the terminal 11 performs primary computing operations, or the server 12 and the terminal 11 perform collaborative computing using a distributed computing architecture.
[0028] In one possible implementation, the terminal 11 is any electronic product that performs man-machine interaction with an interaction object in one or more ways, such as a keyboard, a touch panel, a touch screen, a remote control, a voice interaction, or a handwriting device, such as a PC (Personal Computer), a mobile phone, a smartphone, a PDA (Personal Digital Assistant), a wearable device, a portable game console, a PPC (Pocket PC), a tablet, a smart in-vehicle infotainment product, a smart TV, a smart speaker, an in-vehicle terminal, etc. The server 12 may be a server, a server cluster consisting of multiple servers, or a cloud computing service center. The terminal 11 and the server 12 establish a communication connection via a wired or wireless network.
[0029] As can be understood by those skilled in the art, the above terminal 11 and server 12 are merely examples, and other conventional or future terminals or servers, if applicable to this application, should fall within the scope of protection of this application and are hereby incorporated by reference.
[0030] An embodiment of the present application provides a method for displaying video frames, and the method is applied to the implementation environment of Fig. 1. Take for example that the method is applied to a terminal 11. As shown in Fig. 2, the method for displaying video frames provided by the embodiment of the present application includes the following steps 201 to 203.
[0031] In step 201, a resource consumption index is obtained based on an initial animation update frequency of the at least one virtual model, the resource consumption index indicating an amount of resources consumed by updating animation based on the initial animation update frequency of the at least one virtual model.
[0032] The at least one virtual model is a virtual model in a virtual environment that displays video frames by considering resource consumption indicators. The embodiment of the present application does not limit the number of the at least one virtual model. Illustratively, the at least one virtual model is a virtual model of a target category.
[0033] The embodiment of the present application does not limit the partitioning method of the classification of virtual models, and may be set based on experience or flexibly adjusted based on application scenarios. Exemplarily, if all virtual models are partitioned into one category, the at least one virtual model is all virtual models that display video frames on the same screen. Exemplarily, if the virtual models are partitioned into a virtual object category and a virtual prop category, and the target category is a virtual object category, the at least one virtual model is a virtual model belonging to the virtual object category among all virtual models that display video frames on the same screen. Of course, the classification of virtual models may have other partitioning methods, which are not limited to the embodiment of the present application.
[0034] In an exemplary embodiment, before an application program runs, each virtual model marks the category to which it belongs with a unique string, and thereafter, resource consumption statistics are generated with the granularity of the category.
[0035] In the operation process of the application program, the screen of the displayed virtual environment is continuously updated, and the display method of the video frame provided by the embodiment of the present application occurs in the display process of the latest frame screen of the virtual environment. When displaying the screen of one frame virtual environment, at least one video frame of a virtual model is displayed on the screen, and the embodiment of the present application introduces the implementation process of displaying the video frame of at least one virtual model. Here, when displaying the screen of one frame virtual environment, in addition to the video frame of at least one virtual model, the screen may further display video frames of other virtual models or environmental elements, etc., which are not limited to the embodiment of the present application. Unless otherwise stated, all the screens referred to in the embodiment of the present application are screens of virtual environments.
[0036] The initial video update frequency of at least one virtual model is the video update frequency of at least one virtual model that is the basis for acquiring the resource consumption index. The video update frequency indicates whether to update the video once for each of several frame screens, and updating the video once represents one new video frame. The new video frame is one video frame in the video. Exemplarily, if one video update frequency is updating the video once for every n (n is an integer equal to or greater than 1) frame screens, the video update frequency is indicated as UROn.
[0037] Before performing step 201, obtain the initial animation update frequency of at least one virtual model. The principle of obtaining the initial animation update frequency of each virtual model is similar, and the process of obtaining the initial animation update frequency of the first virtual model is taken as an example. The first virtual model is any one of the at least one virtual models.
[0038] Exemplarily, a method for obtaining an initial animation update frequency of a first virtual model includes a step of setting the animation update frequency of the first virtual model as the initial animation update frequency of the first virtual model when displaying a screen of a previous frame virtual environment.
[0039] Exemplarily, a method for obtaining an initial video update frequency of a first virtual model includes a step of setting a default video update frequency of the first virtual model as an initial video update frequency of the first virtual model, where the default video update frequency of the first virtual model is an inherent attribute of the first virtual model.
[0040] Exemplarily, the method for obtaining the initial animation update frequency of the first virtual model includes the steps of determining a ratio of the first virtual model, and setting the animation update frequency corresponding to the ratio of the first virtual model as the initial animation update frequency of the first virtual model, where the ratio of the first virtual model is a ratio between the rendering size and the reference size of the first virtual model.
[0041] Exemplarily, the rendering size of the first virtual model is the rendering size of the first virtual model displayed on the screen of the previous frame virtual environment. The reference size is set based on experience or flexibly adjusted based on application scenarios, and the reference size may be the same or different for different virtual models. Exemplarily, when the reference size is the same for different virtual models, the reference size may be the size of the screen of the virtual environment. Exemplarily, the rendering size of the first virtual model displayed on the screen of the previous frame virtual environment is obtained by recognizing the video frame of the first virtual model displayed when displaying the screen of the previous frame virtual environment. That is, the ratio of the first virtual model may change continuously with the update of the screen of the virtual environment. In this method, before the screen of each frame virtual environment is formally displayed, the initial video update frequency of at least one virtual model is obtained based on the display result of the screen of the previous frame virtual environment, and the resource consumption index is further calculated. Since the initial video update frequency of the virtual model determined by this method has a high degree of matching with the real-time display result of the video frame of the virtual model, the reliability of the initial video update frequency is increased, and the reliability of the resource consumption index determined based on the initial video update frequency is improved.
[0042] For example, the terminal stores a correspondence between the ratio and the video update frequency, and after determining the ratio of the first virtual model, the terminal searches for the video update frequency corresponding to the ratio of the first virtual model based on the correspondence between the ratio and the video update frequency, and sets the searched video update frequency as the initial video update frequency of the first virtual model.
[0043] The corresponding relationship between ratio and video update frequency is established based on experience, or flexibly adjusted based on application scenario, which is not limited to the embodiment of the present application.In the corresponding relationship between ratio and video update frequency, the video update frequency corresponding to a first ratio is equal to or greater than the video update frequency corresponding to a second ratio, and the first ratio is greater than the second ratio.That is, as the ratio increases, the video update frequency corresponding to the ratio remains unchanged or increases.
[0044] In an exemplary embodiment, the terminal stores a correspondence relationship between the ratio range and the video update frequency, in which the video update frequency corresponding to the ratio of the first virtual model is the video update frequency corresponding to the ratio range in which the ratio of the first virtual model is located. After determining the ratio of the first virtual model, determine the ratio range in which the ratio of the first virtual model is located, and search for the video update frequency corresponding to the ratio range in which the ratio of the first virtual model is located based on the correspondence relationship between the ratio range and the video update frequency, and then use the searched video update frequency as the initial video update frequency of the first virtual model. The correspondence relationship between the ratio range and the video update frequency is set based on experience, or flexibly adjusted based on the application scenario, which is not limited to the embodiment of the present application. Exemplarily, in the correspondence relationship between the ratio range and the video update frequency, the video update frequency corresponding to the first ratio range is equal to or greater than the video update frequency corresponding to the second ratio range, and the lower limit of the first ratio range is greater than the upper limit of the second ratio range.
[0045] The initial video update frequency of at least one virtual model can be obtained by referring to the manner of obtaining the initial video update frequency of the first virtual model. After obtaining the initial video update frequency of the at least one virtual model, a resource consumption index is obtained according to the initial video update frequency of the at least one virtual model.
[0046] The resource consumption index indicates an amount of resources consumed by updating the video based on the initial video update frequency of the at least one virtual model. Exemplarily, the larger the amount of resources consumed by updating the video based on the initial video update frequency of the at least one virtual model, the more resources consumed by displaying video frames corresponding to the at least one virtual model based on the initial video update frequency of the at least one virtual model, and the poorer the fluency of displaying the video frames.
[0047] In one possible implementation, the method for obtaining a resource consumption index based on an initial video update frequency of at least one virtual model includes obtaining a resource consumption sub-index of at least one virtual model, and aggregating the resource consumption sub-indexes of at least one virtual model to obtain a resource consumption index. The resource consumption sub-index of any one virtual model and the initial video update frequency of any one virtual model are positively correlated. That is, the higher the initial video update frequency of any one virtual model, the larger the resource consumption sub-index of the one virtual model, and the lower the initial video update frequency of any one virtual model, the smaller the resource consumption sub-index of the one virtual model. Exemplarily, the resource consumption sub-index of any one virtual model indicates a resource amount consumed by updating a video based on the initial video update frequency of the one virtual model.
[0048] The principle of obtaining the resource consumption sub-indicators of at least one virtual model is similar, and obtaining the resource consumption sub-indicators of a first virtual model is described as an example, where the first virtual model is any one of the at least one virtual models.
[0049] Exemplarily, the method for obtaining the resource consumption sub-index of the first virtual model includes the steps of determining the number of screen frames corresponding to the initial video update frequency of the first virtual model, and setting a positive number negatively correlated with the number of screen frames as the resource consumption sub-index of the first virtual model. Exemplarily, the reciprocal of the number of screen frames corresponding to the initial video update frequency of the first virtual model is set as the resource consumption sub-index of the first virtual model. Exemplarily, the product of the reciprocal of the number of screen frames corresponding to the initial video update frequency of the first virtual model and a certain positive number is set as the resource consumption sub-index of the first virtual model.
[0050] The number of screen frames corresponding to the initial video update frequency of the first virtual model is the number of screen frames required for one video update as indicated by the initial video update frequency of the first virtual model. For example, if the initial video update frequency of the first virtual model is to update the video once for every 5 frame screen, then the number of screen frames corresponding to the initial video update frequency of the first virtual model is 5.
[0051] For example, if the default video update frequency of the first virtual model is to update the video once per screen frame, the greater the number of screen frames corresponding to the initial video update frequency of the first virtual model, the greater the degree of reduction in the initial video update frequency of the first virtual model compared to the default video update frequency, and the smaller the amount of resources consumed by updating the video based on the initial video update frequency of the first virtual model.
[0052] The resource consumption sub-indicators of the at least one virtual model can be obtained by referring to the manner of obtaining the resource consumption sub-indicators of the first virtual model. After obtaining the resource consumption sub-indicators of the at least one virtual model, the resource consumption sub-indicators of the at least one virtual model are aggregated to obtain a resource consumption index. Exemplarily, the aggregation of the resource consumption sub-indicators of the at least one virtual model includes calculating a sum of the resource consumption sub-indicators of the at least one virtual model. Exemplarily, the aggregation of the resource consumption sub-indicators of the at least one virtual model includes performing a weighted sum on the resource consumption sub-indicators of the at least one virtual model according to a weight of the at least one virtual model, and the weight of the at least one virtual model is set based on experience.
[0053] In step 202, obtain a target animation update frequency of at least one virtual model based on the resource consumption index and the initial animation update frequency.
[0054] After obtaining the resource consumption index, obtain a target video update frequency of the at least one virtual model according to the resource consumption index and the initial video update frequency of the at least one virtual model. In this method, the process of obtaining the target video update frequency of the at least one virtual model takes into account the resource consumption index, and can perform effective global control on resource consumption according to the target video update frequency of the at least one virtual model, thereby avoiding the time required for displaying video frames being extended due to excessive resource consumption, and improving the fluency of displaying video frames.
[0055] In one possible implementation form, the process of obtaining a target video update frequency of at least one virtual model based on a resource consumption index and an initial video update frequency includes a step of setting the initial video update frequency as the target video update frequency of the at least one virtual model when the resource consumption index is below a resource consumption threshold.
[0056] The resource consumption threshold limits a maximum amount of resources consumed to update the animation based on an animation update frequency of the at least one virtual model. The resource consumption threshold is a pre-configured threshold.
[0057] In an exemplary embodiment, a resource consumption threshold for each type is set according to a configuration table, and the resource consumption threshold for each type is used to restrict resource consumption caused by updating the video of the virtual model for each type. Exemplarily, at least one virtual model is a virtual model of a target category, and in this case, the resource consumption threshold is a resource consumption threshold corresponding to the target category.
[0058] In an exemplary embodiment, the resource consumption threshold constrains the global maximum number of virtual models that each frame screen is allowed to update any one of. In an exemplary embodiment, the resource consumption threshold may be referred to as a resource consumption budget, an animation update budget, or the like.
[0059] When the resource consumption is equal to or less than the resource consumption threshold, updating the video according to the initial video update frequency of the at least one virtual model does not incur large resource consumption, and in this case, directly sets the initial video update frequency of the at least one virtual model as the target video update frequency of the at least one virtual model, where setting the initial video update frequency of the at least one virtual model as the target video update frequency of the at least one virtual model means setting the initial video update frequency of each virtual model as the target video update frequency of each virtual model.
[0060] In one possible implementation form, when the resource consumption index is greater than the resource consumption threshold, the process of obtaining a target video update frequency of at least one virtual model based on the resource consumption index and the initial video update frequency includes the following steps 1 to 3.
[0061] Step 1: Determine an adjustment factor based on a resource consumption index and a resource consumption threshold.
[0062] If the resource consumption index is greater than the resource consumption threshold, updating the video based on the initial video update frequency of at least one virtual model will result in large resource consumption; in this case, the initial video update frequency of the at least one virtual model is adjusted under the constraint of the resource consumption threshold to obtain a first video update frequency with small resource consumption.
[0063] The process of adjusting the initial video update frequency of at least one virtual model is realized based on an adjustment factor, and the adjustment factor is determined based on a resource consumption index and a resource consumption threshold. In one possible implementation, the method of determining the adjustment factor based on the resource consumption index and the resource consumption threshold includes a step of setting the ratio of the resource consumption index to the resource consumption threshold as the adjustment factor. Since the resource consumption index is greater than the resource consumption threshold, the adjustment factor is a factor greater than 1.
[0064] Of course, in some embodiments, the manner of determining the adjustment factor based on the resource consumption index and the resource consumption threshold may be other manners, which is not limited to the embodiments of the present application. Illustratively, the ratio between the resource consumption threshold and the resource consumption index is the adjustment factor, and in this case, the adjustment factor is a coefficient less than 1.
[0065] Step 2: Obtain a first video update frequency of the at least one virtual model by adjusting an initial video update frequency based on an adjustment coefficient.
[0066] After determining the adjustment factor, adjust the initial video update frequency of the at least one virtual model according to the adjustment factor to obtain a first video update frequency of the at least one virtual model. Illustratively, for adjusting the initial video update frequency of each virtual model, the adjustment factor may also be called a global load balancing scale factor.
[0067] Here, the initial video update frequency of each virtual model is adjusted based on the adjustment coefficient to obtain a first video update frequency of each virtual model. The principle of adjusting the initial video update frequency of each virtual model based on the adjustment coefficient is similar, and the adjustment of the initial video update frequency of the first virtual model based on the adjustment coefficient is described as an example. The first virtual model is any one of at least one virtual model.
[0068] The method of adjusting the initial video update frequency of the first virtual model based on the adjustment coefficient is related to the method of determining the adjustment coefficient, and the adjustment principle is that the first video update frequency of the first virtual model is lower than the initial video update frequency of the first virtual model.
[0069] In one possible implementation form, when the adjustment coefficient is a ratio between a resource consumption index and a resource consumption threshold, a method for adjusting the initial video update frequency of a first virtual model based on the adjustment coefficient includes: calculating the product of the number of screen frames corresponding to the initial video update frequency of the first virtual model and the adjustment coefficient, and performing a rounding process on the product to obtain a target value; and setting the video update frequency whose corresponding number of screen frames is the target value as the first video update frequency of the first virtual model.
[0070] The method of rounding the product is established based on experience or flexibly adjusted based on application scenarios, and is not limited to the embodiments of the present application. For example, the method of rounding the product may be rounding up, rounding down, or even rounding off. Taking rounding up as an example, the product is rounded according to a Ceil function (rounding up function) to obtain a target value. After obtaining the target value, the video update frequency whose corresponding screen frame number is the target value is set as the first video update frequency of the first virtual model.
[0071] For example, if the initial video update frequency of the first virtual model is to update the video once for every two screen frames (URO2), and the adjustment coefficient is 1.2, then the number of screen frames corresponding to the initial video update frequency of the first virtual model is 2, and the product of the number of screen frames corresponding to the initial video update frequency of the first virtual model and the adjustment coefficient is 2.4. After rounding up the product, if the target value obtained is 3, then the video update frequency for which the corresponding number of screen frames is 3 is set as the first video update frequency of the first virtual model, and at this time, the first video update frequency of the first virtual model determined is to update the video once for every three screen frames (URO3).
[0072] The above introduces the process of adjusting the initial video update frequency of the first virtual model based on the adjustment coefficient, taking the adjustment coefficient as an example of the ratio between the resource consumption index and the resource consumption threshold. The embodiments of the present application are not limited to this, and if the adjustment coefficient is determined in another manner, the process of adjusting the initial video update frequency of the first virtual model based on the adjustment coefficient may be another process, as long as it is ensured that the first video update frequency of the first virtual model after adjustment is lower than the initial video update frequency.
[0073] The first animation update frequency of the at least one virtual model can be obtained by referring to the manner of obtaining the first animation update frequency of the first virtual model, and then step 3 is performed.
[0074] For example, the process of obtaining the first video update frequency of at least one virtual model according to the above steps 1 and 2 obtains the video update frequency according to a load balancing video underclocking optimization technique (Load Balance URO), globally collects statistics on the resource consumption of the virtual model of each target category, and reduces the video update frequency according to an adjustment coefficient according to a pre-assigned resource consumption threshold, thereby reducing the amount of resources consumed by updating the video, thereby achieving the purpose of reducing the time consumption of global video updates and improving the FPS.
[0075] Step 3: Obtain a target video update frequency of the at least one virtual model based on the first video update frequency.
[0076] The process of obtaining the target video update frequency of at least one virtual model based on the first video update frequency is a process of obtaining the target video update frequency of each virtual model based on the first video update frequency of each virtual model. The principle of obtaining the target video update frequency of each virtual model based on the first video update frequency of each virtual model is similar, and the example of obtaining the target video update frequency of the first virtual model based on the first video update frequency of the first virtual model is described. The first virtual model is any one of the at least one virtual models.
[0077] In one possible implementation, the first animation update frequency of the first virtual model is directly set as the target animation update frequency of the first virtual model, which has high efficiency.
[0078] In one possible implementation, the process of obtaining the target video update frequency of at least one virtual model according to the first video update frequency includes the following steps: when the first virtual model meets the first model selection condition and the first video update frequency of the first virtual model is equal to or lower than the reference video update frequency, the reference video update frequency is set as the target video update frequency of the first virtual model; when the first virtual model meets the first model selection condition and the first video update frequency of the first virtual model is higher than the reference video update frequency or when the first virtual model does not meet the first model selection condition, the first video update frequency of the first virtual model is set as the target video update frequency of the first virtual model. This method takes into account the adjustment coefficient and further takes into account the first model selection condition to improve the reliability of the obtained target video update frequency of the first virtual model.
[0079] The first model selection condition selects a virtual model, and the first model selection condition is set based on experience or flexibly adjusted based on application scenarios, which is not limited to the embodiments of the present application.
[0080] The virtual model that meets the first model selection condition is a virtual model that has a large need for video expression.Exemplarily, the virtual model that meets the first model selection condition is a virtual model whose initial video update frequency is equal to or greater than the reference video update frequency.The higher the initial video update frequency, the higher the importance of the virtual model.Exemplarily, the virtual model that meets the first model selection condition is called a high-importance virtual model, and the virtual model that does not meet the first model selection condition is called a low-importance virtual model.
[0081] The reference video update frequency is set based on experience, or flexibly adjusted based on application scenario, which is not limited to the embodiment of the present application. For example, the reference video update frequency is indicated as URO5, and the initial video update frequency of one virtual model is indicated as URO2, and the video update frequency indicated by URO2 is higher than the video update frequency indicated by URO5, so the virtual model meets the first model selection condition.
[0082] In some embodiments, further, the number of screen frames corresponding to the initial video update frequency of the virtual model is compared with a threshold number of screen frames to determine whether the virtual model meets the first model selection condition. If the number of screen frames corresponding to the initial video update frequency of the virtual model is less than or equal to the threshold number of screen frames, the virtual model meets the first model selection condition. The threshold number of screen frames is set based on experience, or flexibly adjusted based on application scenarios, whereby the embodiment of the present application is not limited, for example, the threshold number of screen frames is 5.
[0083] For example, the virtual model that meets the first model selection condition may further be a virtual model whose ratio is equal to or greater than a ratio threshold. The ratio threshold is set based on experience, or flexibly adjusted based on application scenarios, and is not limited to the embodiment of the present application.
[0084] When the first virtual model meets the first model selection condition, the video expression needs of the first virtual model are large, and the target video update frequency of the first virtual model must be equal to or higher than the reference video update frequency, thereby ensuring the video expression effect of the first virtual model. Therefore, when the first virtual model meets the first model selection condition and the first video update frequency of the first virtual model is equal to or lower than the reference video update frequency, the reference video update frequency is taken as the target video update frequency of the first virtual model. When the first virtual model meets the first model selection condition and the first video update frequency of the first virtual model is higher than the reference video update frequency, the first video update frequency of the first virtual model is taken as the target video update frequency of the first virtual model. In other words, when the first virtual model meets the first model selection condition, the larger value of the first video update frequency of the first virtual model and the reference video update frequency is taken as the target video update frequency of the first virtual model.
[0085] If the first virtual model does not meet the first model selection conditions, the need for animation expression of the first virtual model is small, and there is no need to limit the target animation update frequency of the first virtual model, so the first animation update frequency of the first virtual model can be directly set as the target animation update frequency of the first virtual model.
[0086] After considering the adjustment coefficient, the first model selection condition is further considered to ensure the video expression of the virtual model with high importance. After adjustment based on the adjustment coefficient, the first video update frequency obtained (i.e., the video update frequency obtained after performing the load balancing underclock optimization) is greatly reduced due to the large number of virtual models, that is, the number of screen frames corresponding to the first video update frequency is greatly increased, and there is a risk of the nearby virtual model being excessively underclocked. Therefore, the target video update frequency is restricted for the virtual model with high importance, so that the target video update frequency of the virtual model with high importance is equal to or greater than the reference video update frequency. The nearby virtual model is a virtual model close to the virtual camera in the virtual environment, and the video expression needs of the nearby virtual model are generally large. The virtual camera is a camera for capturing the screen of the virtual environment. For one virtual model, the closer the virtual model is to the virtual camera, the larger the display size of the virtual model on the screen of the virtual environment.
[0087] For example, if the screen frame number threshold is 5, among at least one virtual model, all virtual models whose screen frame number corresponding to the initial video update frequency is 5 or less satisfy the first model selection condition, i.e., all of them are high importance virtual models, and the screen frame number corresponding to the target video update frequency of the virtual model in question is limited to 5 or less, i.e., the target video update frequency is at least one video update per 5 screen frames, thereby ensuring that the high importance model updates video at most one video update per 5 frames.
[0088] At step 203, display video frames corresponding to the at least one virtual model based on a target video update rate.
[0089] The target video update frequency is determined based on the initial video update frequency of at least one virtual model while taking into consideration the resource consumption index, which can provide effective global control over resource consumption, and can effectively display video frames corresponding to at least one virtual model based on the target video update frequency, thereby improving the fluency of the display of video frames and further improving the fluency of screen updates.
[0090] The step of displaying video frames corresponding to at least one virtual model based on a target video update frequency includes displaying video frames corresponding to each virtual model based on a target video update frequency of each virtual model, where the video frames corresponding to each virtual model are displayed on a screen of a same frame virtual environment.
[0091] The principle of displaying video frames corresponding to each virtual model based on the target video update frequency of each virtual model is similar, and a process of displaying video frames corresponding to a first virtual model based on the target video update frequency of the first virtual model is taken as an example to describe, where the first virtual model is any one of the at least one virtual models.
[0092] In one possible implementation, the implementation step of displaying the video frames corresponding to the first virtual model based on the target video update frequency of the first virtual model includes the step of directly displaying the video frames corresponding to the first virtual model based on the target video update frequency of the first virtual model. In this case, the video frames corresponding to the first virtual model are the video frames corresponding to the target video update frequency of the first virtual model. That is, there is no need to determine whether the first virtual model satisfies a certain condition, and the video frames corresponding to the target video update frequency of the first virtual model are directly displayed.
[0093] In an exemplary embodiment, the process of displaying video frames corresponding to a first virtual model directly based on a target video update frequency of the first virtual model includes: displaying a first video frame or a target video frame of the first virtual model when the target video update frequency of the first virtual model does not match the count value of the first virtual model; and displaying a second video frame of the first virtual model when the target video update frequency of the first virtual model matches the count value of the first virtual model.
[0094] The first video frame is the latest video frame that has been displayed in the video of the first virtual model, and the second video frame is the next video frame of the first video frame in the video of the first virtual model. The first video frame and the second video frame are two adjacent video frames in the video of the first virtual model, where the first video frame has been displayed and the second video frame has not yet been displayed. Because the calculation logic of the first video frame and the second video frame is complicated, it takes a long time to determine the first video frame and the second video frame. After displaying the first video frame, the terminal calculates and caches the second video frame, and when the terminal wants to display the second video frame, it extracts the second video frame from the cache and displays it.
[0095] The count value of the first virtual model is a count value possessed by the first virtual model. The count value possessed by the first virtual model indicates the number of screen frames of the animation of the first virtual model that have not been updated. In an exemplary embodiment, the update manner of the count value possessed by the first virtual model is as follows: when a video frame in the animation of the first virtual model is displayed for the first time, the count value possessed by the first virtual model is 0; if a screen does not display the next video frame of the video frame of the first virtual model, the count value possessed by the first virtual model is incremented by 1.
[0096] When the target video update frequency of the first virtual model matches the count value of the first virtual model, display the second video frame of the first virtual model. Exemplarily, the target video update frequency of the first virtual model matches the count value of the first virtual model when the count value of the first virtual model is equal to or greater than the difference between the number of screen frames corresponding to the target video update frequency of the first virtual model and 1. For example, if the number of screen frames corresponding to the target video update frequency of the first virtual model is 5 and the count value of the first virtual model is equal to or greater than 4, the target video update frequency of the first virtual model matches the count value of the first virtual model.
[0097] When the target video update frame rate of the first virtual model matches the count value of the first virtual model, the video frame to be currently displayed is the second video frame of the first virtual model, and therefore the second video frame of the first virtual model is displayed. When the target video update frequency of the first virtual model does not match the count value of the first virtual model, the video frame to be currently displayed is not the second video frame of the first virtual model, and in this case the first video frame or the target video frame of the first virtual model is displayed.
[0098] The target video frame is determined according to the first video frame, the second video frame and the count value of the first virtual model. Before displaying the target video frame, the target video frame is determined. Exemplarily, the manner of determining the target video frame includes: determining a candidate interpolated smoothed video frame according to the first video frame and the second video frame; determining an interpolated smoothed video frame corresponding to the count value of the first virtual model from the candidate interpolated smoothed video frames, and setting the interpolated smoothed video frame corresponding to the count value of the first virtual model as the target video frame of the first virtual model.
[0099] Exemplarily, an interpolated smoothed video frame is determined based on the first video frame and the second video frame in the cache, and the interpolated smoothed video frame is displayed after the first video frame is displayed and before the second video frame is displayed, to approach a video effect of updating every frame, i.e., a non-underclocked video effect. The number of candidate interpolated smoothed video frames may be one or more. When the number of candidate interpolated smoothed video frames is one, the one candidate interpolated smoothed video frame is directly set as an interpolated smoothed video frame corresponding to the count value of the first virtual model. When the number of candidate interpolated smoothed video frames is multiple, the target video frame of the first virtual model is one interpolated smoothed video frame corresponding to the count value of the first virtual model among the multiple candidate interpolated smoothed video frames. Exemplarily, a correspondence relationship between the candidate interpolated smoothed video frames and the count values is stored in the terminal, and an interpolated smoothed video frame corresponding to the count value of the first virtual model is determined from the candidate interpolated smoothed video frames based on the correspondence.
[0100] Illustratively, the number of candidate interpolated smoothed video frames determined based on the first video frame and the second video frame in the cache is similar to the number of count values that do not match the target video update frequency of the first virtual model, and each candidate interpolated smoothed video frame corresponds to one count value that does not match the target video update frequency of the first virtual model.
[0101] Exemplarily, the number of count values that do not match the target video update frequency of the first virtual model is the difference between the number of screen frames corresponding to the target video update frequency of the first virtual model and 1. For example, if the number of screen frames corresponding to the target video update frequency of the first virtual model is 5, the number of count values that do not match the target video update frequency of the first virtual model is 4, and four candidate interpolated smoothed video frames can be determined.
[0102] The candidate interpolated smoothed video frame is obtained by calculating a difference between the first video frame and the second video frame, and the time consumption of calculating to obtain the candidate interpolated smoothed video frame is less than the time consumption of calculating to obtain the first video frame and the second video frame. An interpolated smoothed video frame corresponding to the count value of the first virtual model is searched from each candidate interpolated smoothed video, and the interpolated smoothed video frame is the target video frame.
[0103] In the embodiment of the present application, the implementation of displaying the first video frame or the target video frame of the first virtual model is not limited when the target video update frequency of the first virtual model does not match the count value of the first virtual model. Exemplarily, displaying the first video frame of the first virtual model when the target video update frequency of the first virtual model does not match the count value of the first virtual model. Exemplarily, displaying the target video frame when the target video update frequency of the first virtual model does not match the count value of the first virtual model.
[0104] Exemplarily, if the target video update frequency of the first virtual model does not match the count value of the first virtual model, if the first virtual model does not satisfy the second model selection condition, a first video frame of the first virtual model is displayed, and if the first virtual model satisfies the second model selection condition, a target video frame of the first virtual model is displayed.
[0105] The second model selection condition is used to select the virtual model, and the second model selection condition is set based on experience or flexibly adjusted based on application scenarios, which is not limited to the embodiments of the present application. The second model selection condition may be the same as the first model selection condition or may be different from the first model selection condition.
[0106] The virtual model that meets the second model selection condition is the virtual model that needs to display the target video frame when the target video update frequency does not match the count value. In an exemplary embodiment, the second model selection condition is similar to the first model selection condition, that is, the virtual model that meets the second model selection condition is the virtual model that has great video presentation needs.
[0107] If the first virtual model satisfies the second model selection condition, the detrimental effect of underclocking on animation presentation is mitigated to a large extent by displaying the target animation frame of the first virtual model. That is, animation interpolation smoothing is activated for the virtual model of high importance, and in the screen where the update is skipped, the cached first animation frame and the second animation frame are used to perform interpolation presentation for the virtual model of high importance, thereby approaching the animation effect without underclocking.
[0108] If the first virtual model does not satisfy the second model selection condition, the animation representation of the first virtual model will attract less attention, and the first animation frame can be directly displayed.
[0109] In one possible implementation form, the implementation process of displaying video frames corresponding to a first virtual model based on the target video update frequency of the first virtual model is as follows: when the first virtual model is not associated with other virtual models, display the video frames corresponding to the first virtual model directly based on the target video update frequency of the first virtual model; when the first virtual model is associated with a second virtual model, obtain the adjusted video update frequency of the first virtual model by adjusting the target video update frequency of the first virtual model to the video update frequency of the second virtual model, and display the video frames corresponding to the first virtual model based on the adjusted video update frequency of the first virtual model.
[0110] The second virtual model may be one of the at least one virtual models, or one virtual model excluding the at least one virtual model, which is not limited to the embodiment of the present application. The video update frequency of the second virtual model is the current latest video update frequency of the second virtual model. The terminal stores an association relationship between the virtual models, and determines whether the first virtual model is associated with another virtual model based on the association relationship, and adjusts the target video update frequency of the first virtual model to the video update frequency of the second virtual model when the first virtual model is associated with the second virtual model. Illustratively, the association of the first virtual model with the second virtual model corresponds to the dependency of the first virtual model on the second virtual model.
[0111] In one possible implementation, the method further includes a step of synchronizing the video updates of the first virtual model and the second virtual model by adjusting the target video update frequency of the first virtual model to the video update frequency of the second virtual model and then adjusting the count value of the first virtual model to the count value of the second virtual model.
[0112] The video update of the first virtual model is synchronized with the video update of the second virtual model to ensure the accuracy of the video representation. After optimization, different virtual models may have different video update frequencies, but the virtual models having an associated relationship are required to match in their video representations, for example, a virtual object and a virtual prop placed on the virtual object are required to match in their video representations. If the video update frequencies of the virtual models having an associated relationship are different, it may cause misrepresentation.
[0113] Therefore, in the process of displaying the video frames corresponding to the first virtual model according to the target video update frequency of the first virtual model, it is determined whether the first virtual model is associated with other virtual models, and when the first virtual model is associated with the second virtual model, the target video update frequency of the first virtual model is adjusted to the video update frequency of the second virtual model, thereby adjusting the count value of the first virtual model to the count value of the second virtual model, thereby realizing underclock synchronization, i.e., synchronizing the video update of the first virtual model with the video update of the second virtual model. Illustratively, since the first virtual model is associated with the second virtual model, the first virtual model is referred to as a child model, and the second virtual model is referred to as a parent model.
[0114] The details of achieving underclocking synchronization are as follows: the update frequency of the parent and child models are kept synchronized, the update frequency of the parent model is adopted for the child model, and the count values of the parent and child models are matched. For example, by matching the count values of the parent and child models, the update start frame of the parent and child models can be matched. The update start frame is the screen that first displays the latest video frame that has already been displayed.
[0115] For example, the video update frequency and update start frame of the parent model and child model have four cases: when the video update frequency and update start frame of the parent model and child model do not match, when the video update frequency of the parent model and child model match but the update start frames do not match, when the video update frequency of the parent model and child model do not match but the update start frames match, and when the video update frequency and update start frame of the parent model and child model match.
[0116] Figure 3 shows the video update synchronization situation in the above four situations. In Figure 3, the screen with updated video is called update frame, and the screen with no updated video is called skip frame. As can be seen from Figure 3, when the video update frequency and update start frame of the parent model and the child model are not the same, or when the video update frequency of the parent model and the child model are the same but the update start frame is not the same, or when the video update frequency of the parent model and the child model are not the same but the update start frame is the same, it is not enough to completely synchronize the video update of the parent model and the child model. Therefore, the video update frequency of the child model is adjusted to the video update frequency of the parent model, and the count value of the child model is adjusted to the count value of the parent model, thereby achieving the effect of synchronizing the video update.
[0117] For example, Fig. 4 shows a screen display effect in a situation where the animation update frequency and update start frame of the parent model and child model are not consistent. In Fig. 4, the parent model is a virtual object 410, and the child model is a virtual prop 420. The animation update frequency of the virtual object 410 is URO4, and the animation update frequency of the virtual prop 420 is URO7, and the update start frame of the virtual object 410 and the update start frame of the virtual prop 420 are not consistent. In Fig. 4, when the problem of the virtual prop 420 being separated from the hand of the virtual object 410 is serious, the animation updates of the virtual object 410 and the virtual prop 420 are not synchronized.
[0118] Fig. 5 shows the screen display effect in a situation where the animation update frequency of the parent model and the child model are the same, but the update start frame is not the same. In Fig. 5, the parent model is a virtual object 510, and the child model is a virtual prop 520. The animation update frequency of the virtual object 510 and the animation update frequency of the virtual prop 520 are both URO4, and the update start frame of the virtual object 510 and the update start frame of the virtual prop 520 are not the same. In Fig. 5, it can still be observed that the virtual prop 520 is separated from the hand of the virtual object 510, and the animation updates of the virtual object 510 and the virtual prop 520 are not synchronized.
[0119] Fig. 6 shows the screen display effect in a situation where the animation update frequency and update start frame of the parent model and child model are the same. In Fig. 6, the parent model is a virtual object 610, and the child model is a virtual prop 620. The animation update frequency of the virtual object 610 and the animation update frequency of the virtual prop 620 are both URO4, and the update start frame of the virtual object 610 and the update start frame of the virtual prop 620 are the same. In Fig. 6, when the virtual prop 620 is not separated from the hand of the virtual object 610 and the screen display is normal, the animation updates of the virtual object 610 and the virtual prop 620 are synchronized.
[0120] When obtaining the adjusted video update frequency of the first virtual model, display video frames corresponding to the first virtual model based on the adjusted video update frequency of the first virtual model. The realization principle of displaying video frames corresponding to the first virtual model based on the adjusted video update frequency of the first virtual model is the same as the realization principle of displaying video frames corresponding to the first virtual model based directly on the target video update frequency of the first virtual model, so no detailed description is given here.
[0121] In an exemplary embodiment, whenever at least one video frame of a virtual model needs to be displayed, the above steps 201 to 203 are executed. In an exemplary embodiment, the above steps 201 to 203 are executed only when the situation of the virtual model satisfies a reference condition, thereby reducing the amount of calculation.
[0122] The embodiment of the present application does not limit the display manner of video frames when the situation of the virtual model does not meet the reference condition. Exemplarily, when the situation of the virtual model does not meet the reference condition, the display of video frames is realized by the manner in the related art. Exemplarily, the manner in the related art is as follows: the video update frequency corresponding to the ratio of at least one virtual model is the initial video update frequency of the at least one virtual model, and the video frame corresponding to the at least one virtual model is displayed according to the initial video update frequency of the at least one virtual model.
[0123] Exemplarily, the ratio is also called the screen ratio, and the method in the related art is a display method of video frames realized based on the URO optimization solution of the UE4 engine itself. The URO optimization solution of the UE4 engine itself calculates the screen ratio of each virtual model, and the smaller the screen ratio, the lower the video update frequency, and the smaller the screen ratio, the farther the virtual model is from the virtual camera. In this way, by reducing the video update frequency of the virtual model far from the virtual camera, the resource consumption of the video update of the virtual model can be effectively reduced. Exemplarily, the correspondence relationship between the screen ratio and the number of screen frames is set in advance, and the larger the number of screen frames, the lower the video update frequency. Exemplarily, the number of screen frames is further indicated by the level of URO.
[0124] The reference conditions constrain the conditions for realizing the display of video frames according to the method of steps 201 to 203. The reference conditions are set based on experience or flexibly adjusted based on application scenarios, which are not limited to the embodiments of the present application. Exemplarily, the reference conditions constrain the status of at least one virtual model. Exemplarily, the reference conditions constrain the status of all virtual models displaying video frames on the same screen.
[0125] Take for example that the reference condition restricts the situation of all virtual models that display video frames on the same screen. Exemplarily, the situation of the virtual models satisfies the reference condition when the number of all virtual models that display video frames on the same screen is greater than a first number threshold. Exemplarily, the situation of the virtual models satisfies the reference condition when the number of virtual models whose ratio is greater than the ratio threshold among all virtual models that display video frames on the same screen is greater than a second number threshold. Exemplarily, the situation of the virtual models satisfies the reference condition when the number of all virtual models that display video frames on the same screen is greater than a first number threshold, and when the number of virtual models whose ratio is greater than the ratio threshold among all virtual models is greater than a second number threshold.
[0126] The first number threshold is equal to or greater than the second number threshold, and the first number threshold and the second number threshold are set based on experience or flexibly adjusted based on application scenarios, which are not limited to the embodiments of the present application.
[0127] When the number of virtual models displaying video frames on the same screen is small (distribution of virtual models in FIG. 7), the display method of video frames in the related art continuously maintains the URO optimization feature, performs underclock optimization based on the ratio, and updates the video at a low frequency for virtual models with a small ratio to reduce the time consumed by video updates. For example, a virtual model with a small ratio is a virtual model far from the virtual camera, and since such a virtual model is located far away, the interaction object may not be clearly visible, and the video update frequency can be reduced. In the case of FIG. 7, using the method in the related art, the video update frequencies based on which the video frames of each virtual model are displayed are URO1, URO2, and URO3, respectively, in the order from closest to furthest from the virtual camera.
[0128] When there are many virtual models displaying video frames on the same screen (distribution of virtual models in FIG. 8), especially when there are many virtual models with a large ratio (i.e., close to the virtual camera), when using the video frame display method in the related technology (i.e., the method of performing underclocking optimization based on the ratio), the virtual models close to the virtual camera still update videos at a high video update frequency. For example, in the order from closest to the virtual camera to furthest, the video update frequencies on which the video frames of each virtual model are displayed are URO1, URO2, and URO3, respectively. This increases the global video update pressure, and in a scenario where there are many virtual models close to the virtual camera, resource consumption increases, leading to heat generation of the terminal, which may further affect the FPS, and may affect the fluency of video frame display and the fluency of application program operation.
[0129] The performance performance of such a scenario can be effectively improved by using the video frame display method provided by the embodiment of the present application. The video frame display method provided by the embodiment of the present application globally statistics the resource consumption index of the virtual model for each frame, and when the allocated resource consumption threshold is exceeded, further reduces the video update frequency of each virtual model, and performs video interpolation smoothing optimization on the virtual models that meet the first model selection condition, thereby avoiding significant video presentation problems caused by underclocking. In this optimization method, the video update frequency on which the video frames of each virtual model are displayed is optimized to URO2, URO4, and URO6 according to the order from the closest to the virtual camera, so that the time consumption of displaying video frames of multiple virtual models on the same screen can be effectively controlled.
[0130] For example, see Fig. 9 for the screen display effect in the display mode of video frames in the related art, and see Fig. 10 for the screen display effect in the display mode of video frames in the embodiment of the present application. In Fig. 9 and Fig. 10, the number of virtual models (called close-distance virtual models) whose ratio is greater than the ratio threshold is 20, and the initial video update frequency of the 20 virtual models is URO1, that is, the 20 virtual models are all maintained to update the video once per frame screen, in this case, the time required to update each frame screen of the application program is about 20 ms (milliseconds), and the FPS is 50.
[0131] If the resource consumption threshold is one virtual model, after performing the load balancing initial adjustment (i.e., adjusting according to the constraint of the resource consumption threshold), the video update frequency of the 20 virtual models is URO20, and the 20 virtual models all meet the first model selection condition (i.e., all belong to high importance models), so the video update frequency of the high importance model is not allowed to be lower than URO5, and then, using the method provided by the embodiment of the present application, the target video update frequency of the 20 virtual models is URO5, that is, the video is updated once every 5 frame screens. By displaying the video frames according to such a target video update frequency, the time required for updating each frame screen of the application program is about 15.6 ms, and the FPS is improved to 64. Compared with the related art, the time required for updating each frame screen is reduced by 4.4 ms, and the FPS is improved by 16. As can be seen from FIG. 9 and FIG. 10, the screen display effect is different when different video frame display methods are used.
[0132] 11 for an exemplary video frame display process, before an application program runs, a resource consumption threshold corresponding to a target category is set, and when an Nth (N is an integer greater than or equal to 1) frame screen is displayed, a video frame matching the Nth frame screen of at least one virtual model is displayed, and the at least one virtual model is a virtual model of a target category, and a proportion of the at least one virtual model is calculated based on the display result of the Nth frame screen, and an video update frequency corresponding to the proportion of the at least one virtual model is an initial video update frequency of the at least one virtual model. A resource consumption index is obtained based on the initial video update frequency of the at least one virtual model, and it is determined whether the resource consumption index is greater than the resource consumption threshold.
[0133] If the resource consumption index is less than or equal to the resource consumption threshold, display a video frame corresponding to the at least one virtual model based on an initial video update frequency of the at least one virtual model, and the video frame corresponding to the at least one virtual model is a video frame that matches the (N+1)th frame screen of the at least one virtual model.
[0134] If the resource consumption index is greater than the resource consumption threshold, a ratio between the resource consumption index and the resource consumption threshold is an adjustment coefficient, and an initial video update frequency of the at least one virtual model is adjusted based on the adjustment coefficient to obtain a first video update frequency of the at least one virtual model. A target video update frequency of the at least one virtual model is obtained based on the first model selection condition and the first video update frequency of the at least one virtual model to ensure the representation. The video update frequencies and count values between the related models are synchronized to ensure the representation. A video frame corresponding to the at least one virtual model is displayed based on the latest video update frequency of the at least one virtual model, and the video frame corresponding to the at least one virtual model is a video frame matching the (N+1)th frame screen of the at least one virtual model.
[0135] Here, when at least one virtual model is a target category model and the virtual models displaying video frames on the same screen further include virtual models of other categories other than the target category, the display process of video frames of virtual models of other categories is implemented by referring to the process provided by the embodiments of the present application, thereby ensuring the display effect of video frames of all virtual models displaying video frames on the same screen.
[0136] In an embodiment of the present application, based on the URO video optimization technology of the UE4 engine itself, a load balancing optimization characteristic is added, and important parameters such as the resource consumption budget of a certain type of virtual model, the minimum video update frequency of a high importance model, and the conditions for video interpolation smoothing are configured and adjusted, so that under the premise of ensuring the video performance, the resources consumed for video updates in multi-play scenarios can be effectively controlled, and the time required to display video frames of multiple virtual models on the same screen can be effectively reduced, thereby achieving a balance between performance and performance, improving the FPS, and enhancing the experience of the application program. For example, if the application program is a game-type application program, the game experience can be improved.
[0137] In the video frame display method provided by the embodiment of the present application, video frames corresponding to at least one virtual model are displayed according to a target video update frequency of the at least one virtual model, and the target video update frequency of the at least one virtual model is determined according to an initial video update frequency of the at least one virtual model and taking into consideration a resource consumption index. According to the target video update frequency of the at least one virtual model, effective global control can be performed on resource consumption, so as to improve the fluency of displaying video frames and further enhance the man-machine interaction rate.
[0138] In the process of determining the target video update frequency taking into consideration the resource consumption index, the resource consumption index is compared with the resource consumption threshold. If the resource consumption index is greater than the resource consumption threshold, an adjustment coefficient is determined based on the two, and the video update frequency is reduced according to the adjustment coefficient, thereby further reducing the amount of resources consumed for updating videos, thereby achieving the purpose of reducing the time consumption of global video updates and improving the FPS.
[0139] Furthermore, by limiting the target video update frequency of a virtual model with high importance taking into consideration the first model selection condition, the target video update frequency of the virtual model with high importance becomes equal to or greater than the reference video update frequency, thereby ensuring the video representation of the virtual model with high importance.
[0140] In addition, when displaying video frames of a virtual model based on a target video update frequency of the virtual model, the target video update frequency of the virtual model is compared with a count value of the virtual model, and if the target video update frequency of the virtual model does not match the count value of the virtual model, a target video frame determined based on the first video frame, the second video frame and the count value of the virtual model is displayed, and the target video frame is an interpolated smoothed video frame between the first video frame and the second video frame. By displaying the target video frame, the display effect of the video frames is improved to be close to the video effect of updating every frame, i.e., close to the video effect of not underclocking.
[0141] In addition, it determines whether the virtual model is associated with other virtual models, and if the virtual model is associated with other virtual models, it adjusts the target video update frequency of the virtual model to the video update frequency of the other virtual models, and adjusts the count value of the virtual model to the count value of the other virtual models, thereby achieving underclock synchronization, i.e., synchronizing the video update of the virtual model with the video update of the associated virtual model, and ensuring the accuracy of the video representation.
[0142] Referring to FIG. 12, an embodiment of the present application provides a display device for video frames, the device comprising: A first obtaining unit 1201 for obtaining a resource consumption index according to an initial video update frequency of at least one virtual model, the resource consumption index indicating an amount of resources consumed by updating the video according to the initial video update frequency of the at least one virtual model; A second obtaining unit 1202 obtains a target video update frequency of the at least one virtual model according to the resource consumption index and the initial video update frequency; and a display unit 1203 for displaying video frames corresponding to the at least one virtual model based on the target video update frequency.
[0143] In one possible implementation form, when the resource consumption index is greater than the resource consumption threshold, the second acquisition unit 1202 determines an adjustment coefficient based on the resource consumption index and the resource consumption threshold, adjusts an initial video update frequency based on the adjustment coefficient to obtain a first video update frequency of the at least one virtual model, and obtains a target video update frequency of the at least one virtual model based on the first video update frequency.
[0144] In one possible implementation form, the second acquisition unit 1202 sets the reference video update frequency as the target video update frequency of the first virtual model when the first virtual model satisfies the first model selection condition and the first video update frequency of the first virtual model is less than or equal to the reference video update frequency, and the first virtual model is any one of the at least one virtual models.
[0145] In one possible implementation form, the second acquisition unit 1202 sets the first video update frequency of the first virtual model as the target video update frequency of the first virtual model when the first virtual model meets the first model selection condition and the first video update frequency of the first virtual model is higher than the reference video update frequency, or when the first virtual model does not meet the first model selection condition, and the first virtual model is any one of the at least one virtual models.
[0146] In one possible implementation form, the adjustment coefficient is a ratio between the resource consumption index and the resource consumption threshold, and the second acquisition unit 1202 calculates the product of the number of screen frames corresponding to the initial video update frequency of the first virtual model and the adjustment coefficient, and performs a rounding operation on the product to obtain a target value, where the first virtual model is any one of the at least one virtual models, and the video update frequency whose corresponding number of screen frames is the target value is the first video update frequency of the first virtual model.
[0147] In one possible implementation, the second obtaining unit 1202 sets the initial video update frequency as the target video update frequency of the at least one virtual model when the resource consumption indicator is equal to or less than the resource consumption threshold.
[0148] In one possible implementation form, the display unit 1203 displays a first video frame or a target video frame of the first virtual model when the target video update frequency of the first virtual model does not match the count value of the first virtual model, where the first virtual model is any one of the at least one virtual models, the first video frame is the latest video frame displayed in the video of the first virtual model, the target video frame is determined based on the first video frame, the second video frame and the count value of the first virtual model, and the second video frame is the next video frame after the first video frame in the video of the first virtual model.
[0149] In one possible implementation form, the display unit 1203 displays a first video frame of the first virtual model when the first virtual model does not satisfy the second model selection condition, and displays a target video frame of the first virtual model when the first virtual model satisfies the second model selection condition.
[0150] In one possible implementation form, the display unit 1203 further determines a candidate interpolated smoothed video frame based on the first video frame and the second video frame, determines an interpolated smoothed video frame corresponding to the count value of the first virtual model from the candidate interpolated smoothed video frames, and sets the interpolated smoothed video frame corresponding to the count value of the first virtual model as a target video frame of the first virtual model.
[0151] In one possible implementation form, the display unit 1203 displays a second video frame of the first virtual model when the target video update frequency of the first virtual model matches the count value of the first virtual model, where the first virtual model is any one of the at least one virtual models, the second video frame is a next video frame to the first video frame in the video of the first virtual model, and the first video frame is the latest video frame already displayed in the video of the first virtual model.
[0152] In one possible implementation form, when a first virtual model is associated with a second virtual model, the display unit 1203 obtains an adjusted video update frequency of the first virtual model by adjusting a target video update frequency of the first virtual model to the video update frequency of the second virtual model, the first virtual model being any one of the at least one virtual models, and displays video frames corresponding to the first virtual model based on the adjusted video update frequency of the first virtual model.
[0153] In one possible implementation form, the display unit 1203 further synchronizes the video updates of the first virtual model and the second virtual model by adjusting the count value of the first virtual model to the count value of the second virtual model.
[0154] In one possible implementation form, the first acquisition unit 1201 acquires resource consumption sub-indicators of at least one virtual model, and the resource consumption sub-indicators of any one of the virtual models are positively correlated with the initial video update frequency of any one of the virtual models, and the resource consumption sub-indicators of the at least one virtual model are aggregated to acquire a resource consumption index.
[0155] In one possible implementation form, the first acquisition unit 1201 determines a screen frame number corresponding to an initial video update frequency of a first virtual model, where the first virtual model is any one of the at least one virtual models, and a positive number negatively correlated with the screen frame number is the resource consumption sub-indicator of the first virtual model.
[0156] In one possible implementation form, the first acquisition unit 1201 further determines a ratio of the first virtual model, where the first virtual model is any one of the at least one virtual models, the ratio of the first virtual model is the ratio between the rendering size and the reference size of the first virtual model, and the video update frequency corresponding to the ratio of the first virtual model is the initial video update frequency of the first virtual model.
[0157] In one possible implementation, the resource consumption thresholds are resource consumption thresholds corresponding to target categories, and the at least one virtual model is a virtual model of each target category.
[0158] In one possible implementation form, the first acquisition unit 1201 acquires a resource consumption index based on the initial video update frequency of at least one virtual model when the status of the virtual model satisfies a reference condition, and the status of the virtual model satisfying the reference condition includes any one of the following: the number of all virtual models displaying video frames on the same screen is greater than a first number threshold; among all virtual models displaying video frames on the same screen, the number of virtual models whose ratio is greater than the ratio threshold is greater than a second number threshold; the number of all virtual models displaying video frames on the same screen is greater than the first number threshold and the number of virtual models whose ratio is greater than the ratio threshold is greater than the second number threshold; and the ratio of any one virtual model is the ratio between the rendering size and the reference size of any one virtual model.
[0159] According to the video frame display device provided by the embodiment of the present application, the video frames corresponding to at least one virtual model are displayed according to a target video update frequency of the at least one virtual model, and the target video update frequency of the at least one virtual model is determined according to an initial video update frequency of the at least one virtual model and taking into consideration a resource consumption index. According to the target video update frequency of the at least one virtual model, an effective global control can be performed on the resource consumption, so as to improve the fluency of the display of the video frames and further enhance the man-machine interaction rate.
[0160] In the process of determining the target video update frequency taking into consideration the resource consumption index, the resource consumption index is compared with a resource consumption threshold, and if the resource consumption index is greater than the resource consumption threshold, an adjustment coefficient is determined based on the two, and the video update frequency is reduced according to the adjustment coefficient, thereby reducing the amount of resources consumed for updating videos, achieving the purpose of reducing the time consumption of global video updates, and improving the FPS.
[0161] Furthermore, by limiting the target video update frequency of a virtual model with high importance taking into consideration the first model selection condition, the target video update frequency of the virtual model with high importance becomes equal to or greater than the reference video update frequency, thereby ensuring the video representation of the virtual model with high importance.
[0162] In addition, when displaying video frames of a virtual model based on a target video update frequency of the virtual model, the target video update frequency of the virtual model is compared with a count value of the virtual model, and if the target video update frequency of the virtual model does not match the count value of the virtual model, a target video frame determined based on the first video frame, the second video frame and the count value of the virtual model is displayed, and the target video frame is an interpolated smoothed video frame between the first video frame and the second video frame. By displaying the target video frame, the display effect of the video frames is improved to be close to the video effect of updating every frame, i.e., close to the video effect of not underclocking.
[0163] In addition, it determines whether the virtual model is associated with other virtual models, and if the virtual model is associated with other virtual models, it adjusts the target video update frequency of the virtual model to the video update frequency of the other virtual models, and adjusts the count value of the virtual model to the count value of the other virtual models, thereby achieving underclock synchronization, i.e., synchronizing the video update of the virtual model with the video update of the associated virtual model, and ensuring the accuracy of the video representation.
[0164] Here, when the device provided in the above embodiment realizes its functions, only the partition of each functional unit is described as an example, and in actual application, the above functions are assigned to be completed by different functional units according to needs, that is, the internal structure of the device is partitioned into different functional units to achieve all or part of the above functions. In addition, the device provided in the above embodiment belongs to the same concept as the method embodiment, and the specific implementation process thereof can be referred to the method embodiment, and is not described here in detail.
[0165] 13 is a structural schematic diagram of a computer device provided by an embodiment of the present application. The computer device may be a terminal, and the terminal may be a PC, a phone, a smartphone, a PDA, a wearable device, a portable game console, a PPC, a tablet, a smart in-vehicle infotainment product, a smart TV, a smart speaker, an in-vehicle terminal, etc. The terminal may also be called a user device, a portable terminal, a laptop terminal, a desktop terminal, or other names.
[0166] Generally, the terminal includes a processor 1301 and a memory 1302 .
[0167] The processor 1301 includes one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1301 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), or a PLA (Programmable Logic Array). The processor 1301 includes a processor that processes data in a wake-up state, a main processor also called a CPU, and a co-processor, which is a low-power consumption processor that processes data in a standby state. In some embodiments, the processor 1301 is integrated with a GPU (Graphics Processing Unit), which renders and draws content to be displayed on the display. In some embodiments, the processor 1301 further includes an AI (Artificial Intelligence) processor, which processes computing operations related to machine learning.
[0168] The memory 1302 includes one or more computer-readable storage media, which are non-transitory. The memory 1302 may further include a high-speed random access memory and a non-volatile memory, such as one or more magnetic disk storage devices, flash storage devices, etc. In some embodiments, the non-transitory computer-readable storage medium in the memory 1302 stores at least one instruction, which is executed by the processor 1301 to cause the terminal to realize a method for displaying video frames provided by a method embodiment in the present application.
[0169] In some embodiments, the terminal may further include a display 1305 .
[0170] The display 1305 displays a UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. If the display 1305 is a touch display, the display 1305 may further have the ability to collect touch signals on or above the surface of the display 1305. The touch signals are input as control signals to the processor 1301 for processing. In this case, the display 1305 may further provide virtual buttons and / or virtual keyboards, also referred to as soft buttons and / or soft keyboards. In some embodiments, the display 1305 is one and is located on the front panel of the terminal, in other embodiments, the display 1305 is at least two and is located on different surfaces of the terminal respectively or designed to be folded, in other embodiments, the display 1305 is a flexible display and is located on a curved or folded surface of the terminal. Furthermore, the display 1305 may be installed on a non-rectangular irregular graphic, i.e., an irregular screen. The display 1305 is manufactured from materials such as LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), etc. Illustratively, video frames corresponding to at least one virtual model are displayed by the display 1305.
[0171] As will be appreciated by those skilled in the art, the structure of FIG. 13 is not limiting of the terminal, which may include more or fewer components than shown, or may combine some components, or may employ different components in different configurations.
[0172] In an exemplary embodiment, a non-volatile computer-readable storage medium is further provided, in which at least one computer program is stored, and the at least one computer program is loaded and executed by a processor of a computer device, thereby causing the computer to realize any one of the above methods for displaying video frames.
[0173] In one possible implementation, the above non-volatile computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), a magnetic tape, a flexible disk, an optical data storage device, etc.
[0174] In an exemplary embodiment, a computer program product is further provided, the computer program product including a computer program or computer instructions, which is loaded and executed by a processor to cause a computer to realize any one of the above methods for displaying video frames.
[0175] Here, the terms "first", "second", etc. in this application do not describe a particular order or sequence, but are intended to distinguish between similar objects. Where appropriate, such data may be interchanged, such that the embodiments of the application described herein may be performed in an order other than as shown or described in the specification. The embodiments described in the illustrative examples above do not represent all embodiments consistent with this application, but are merely illustrative of apparatus and methods consistent with certain aspects of this application.
[0176] Here, "plurality" as referred to herein refers to two or more than two. "And / or" describes a relationship between related objects and indicates that there are three relationships, for example, A and / or B indicates three situations: A exists alone, A and B exist simultaneously, and B exists alone. The symbol " / " generally indicates that the related objects before and after it are in an "or" relationship.
[0177] The above does not limit the present application, but is merely an illustrative embodiment of the present application, and any modifications, equivalent replacements, improvements, etc. completed within the principle of the present application are within the protection scope of the present application.
Claims
1. 1. A method for displaying video frames, the method being performed by an electronic device, the method comprising: obtaining a resource consumption metric based on an initial video update frequency of at least one virtual model, the resource consumption metric indicating an amount of resources consumed by updating video based on an initial video update frequency of the at least one virtual model; obtaining a target video update frequency for the at least one virtual model based on the resource consumption metric and the initial video update frequency; and displaying video frames corresponding to the at least one virtual model based on the target video update rate.
2. obtaining a target video update frequency of the at least one virtual model based on the resource consumption metric and the initial video update frequency, if the resource consumption index is greater than a resource consumption threshold, determining an adjustment factor based on the resource consumption index and the resource consumption threshold; adjusting the initial animation update rate based on the adjustment factor to obtain a first animation update rate of the at least one virtual model; and obtaining a target video update rate for the at least one virtual model based on the first video update rate.
3. obtaining a target video update rate for the at least one virtual model based on the first video update rate, 3. The method of claim 2, further comprising: if a first virtual model satisfies a first model selection condition and a first video update frequency of the first virtual model is equal to or lower than a reference video update frequency, setting the reference video update frequency as a target video update frequency of the first virtual model, wherein the first virtual model is any one of the at least one virtual models.
4. obtaining a target video update rate for the at least one virtual model based on the first video update rate, 3. The method of claim 2, further comprising: if a first virtual model satisfies a first model selection condition and a first video update frequency of the first virtual model is higher than a reference video update frequency, or if the first virtual model does not satisfy the first model selection condition, setting the first video update frequency of the first virtual model as a target video update frequency of the first virtual model, wherein the first virtual model is any one of the at least one virtual models.
5. The adjustment factor is a ratio between the resource consumption index and the resource consumption threshold, and the step of obtaining a first video update frequency of the at least one virtual model by adjusting the initial video update frequency based on the adjustment factor includes: calculating a product of a number of screen frames corresponding to an initial video update frequency of a first virtual model and the adjustment factor, and performing a rounding process on the product to obtain a target value, wherein the first virtual model is any one of the at least one virtual models; and determining as a first animation update rate for the first virtual model a corresponding number of screen frames of the first virtual model.
6. obtaining a target video update frequency of the at least one virtual model based on the resource consumption metric and the initial video update frequency, The method of claim 1 , further comprising setting the initial video update frequency to a target video update frequency for the at least one virtual model if the resource consumption metric is less than or equal to a resource consumption threshold.
7. displaying video frames corresponding to the at least one virtual model based on the target video update frequency, displaying a first video frame or a target video frame of a first virtual model if a target video update frequency of a first virtual model does not match a count value of the first virtual model, the first virtual model being any one of the at least one virtual models; 2. The method of claim 1 , wherein the first video frame is a most recently displayed video frame in a video of the first virtual model, the target video frame is determined based on a count value of the first video frame, a second video frame and the first virtual model, and the second video frame is a next video frame to the first video frame in the video of the first virtual model.
8. Displaying a first video frame or a target video frame of the first virtual model includes: displaying a first video frame of the first virtual model if the first virtual model does not satisfy a second model selection condition; and displaying a target video frame of the first virtual model if the first virtual model meets the second model selection criteria.
9. Prior to displaying a target video frame of the first virtual model, the method further comprises: determining a candidate interpolated smoothed video frame based on the first video frame and the second video frame; 9. The method of claim 8, further comprising: determining an interpolated smoothed video frame from the candidate interpolated smoothed video frames that corresponds to a count value of the first virtual model; and setting the interpolated smoothed video frame that corresponds to the count value of the first virtual model as a target video frame of the first virtual model.
10. displaying video frames corresponding to the at least one virtual model based on the target video update frequency, 2. The method of claim 1, comprising: displaying a second video frame of the first virtual model when a target video update frequency of a first virtual model matches a count value of the first virtual model, the first virtual model being any one of the at least one virtual models, the second video frame being a next video frame to a first video frame in the video of the first virtual model, and the first video frame being a most recent video frame already displayed in the video of the first virtual model.
11. displaying video frames corresponding to the at least one virtual model based on the target video update frequency, If a first virtual model is associated with a second virtual model, adjusting a target video update frequency of the first virtual model to a video update frequency of the second virtual model to obtain an adjusted video update frequency of the first virtual model, where the first virtual model is any one of the at least one virtual models; and displaying video frames corresponding to the first virtual model based on the adjusted video update frequency of the first virtual model.
12. After adjusting the target video update rate of the first virtual model to the video update rate of the second virtual model, the method further comprises:
12. The method of claim 11, further comprising adjusting count values of the first virtual model to count values of the second virtual model such that video updates of the first virtual model and the second virtual model are synchronized.
13. The step of obtaining a resource consumption metric based on an initial video update frequency of the at least one virtual model includes: A step of obtaining a resource consumption sub-index of the at least one virtual model, wherein the resource consumption sub-index of any one virtual model and an initial video update frequency of the any one virtual model are positively correlated; and aggregating resource consumption sub-indices of the at least one virtual model to obtain the resource consumption indicator.
14. The step of obtaining a resource consumption sub-metric of the at least one virtual model comprises: determining a number of screen frames corresponding to an initial video update frequency of a first virtual model, the first virtual model being any one of the at least one virtual models; The method of claim 13 , further comprising: determining a positive number that is negatively correlated with the number of screen frames as a resource consumption sub-indicator of the first virtual model.
15. Before obtaining a resource consumption metric based on an initial video update frequency of the at least one virtual model, the method further comprises: determining a ratio of a first virtual model, the first virtual model being any one of the at least one virtual models, and the ratio of the first virtual model being a ratio of a rendering size and a reference size of the first virtual model; The method of claim 1 , further comprising: setting an initial animation update rate for the first virtual model that corresponds to the proportion of the first virtual model.
16. The method of claim 2 , wherein the resource consumption threshold is a resource consumption threshold corresponding to a target category, and the at least one virtual model is a virtual model of the target category.
17. The step of obtaining a resource consumption metric based on an initial video update frequency of the at least one virtual model includes: If the status of the virtual model satisfies a reference condition, obtaining the resource consumption index based on an initial video update frequency of the at least one virtual model; The condition of the virtual model satisfies the reference conditions, the number of all virtual models that display video frames on the same screen is greater than a first number threshold, the number of virtual models whose ratio is greater than a ratio threshold among all virtual models that display video frames on the same screen is greater than a second number threshold, and the number of all virtual models that display video frames on the same screen is greater than the first number threshold and the number of virtual models whose ratio is greater than the ratio threshold among all virtual models is greater than the second number threshold; Any one of the following: The method of claim 1 , wherein the ratio of any one virtual model is a ratio of a rendered size and a reference size of the any one virtual model.
18. 1. A display device for displaying video frames, the device comprising: a first obtaining unit for obtaining a resource consumption index based on an initial video update frequency of at least one virtual model, the resource consumption index indicating an amount of resources consumed by updating a video based on the initial video update frequency of the at least one virtual model; A second obtaining unit obtains a target video update frequency of the at least one virtual model according to the resource consumption index and the initial video update frequency; a display unit that displays video frames corresponding to the at least one virtual model based on the target video update frequency.
19. A computer device comprising a processor and a memory, wherein at least one computer program is stored in the memory, and wherein the at least one computer program is loaded and executed by the processor, thereby causing the computer device to realize the method for displaying video frames described in any one of claims 1 to 17.
20. A computer program, which, when loaded and executed by a processor, causes a computer to realize the method for displaying video frames according to any one of claims 1 to 17.
Citation Information
Patent Citations
Game program, recording medium, and computer device
JP2011186834A
Controlling animation frame rate of applications
US20110096077A1
