Method, apparatus, device, and computer program for displaying video frames
By calculating a resource consumption index and adjusting the target video update frequency for virtual models, the method improves the smoothness and interaction rates of video frame display in virtual environments, addressing the limitations of existing technologies.
Patent Information
- Application Number
- JP2023575358
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2022-01-05
- Filing Date
- 2022-10-24
- Publication Date
- 2025-06-11
- Estimated Expiration
- 2042-10-24
AI Technical Summary
Existing technologies for displaying video frames in virtual environments suffer from reduced smoothness and low human-machine interaction rates due to direct display based on initial video update frequencies, which do not effectively manage resource consumption.
A method that calculates a resource consumption index based on the initial video update frequency of virtual models, adjusts the target video update frequency to optimize resource usage, and displays video frames accordingly, thereby improving smoothness and interaction rates.
The method enhances the smoothness of video frame display and increases the human-machine interaction rate by effectively managing resource consumption through optimized video update frequencies.
Smart Images

Figure 0007691005000001 
Figure 0007691005000002 
Figure 0007691005000003
Abstract
Description
Technical Field
[0001] This application claims the priority of a Chinese patent application filed on January 5, 2022, with the application number 202210006550.9 and the invention title "Method, Apparatus, Device, and Storage Medium for Displaying Video Frames", and all of its contents are incorporated herein by reference.
[0002] The embodiments of this application relate to the field of computer technology, and particularly to a method, apparatus, device, and storage medium for displaying video frames.
Background Art
[0003] With the development of computer technology, there are more and more application programs that can provide virtual environments. A virtual environment includes at least one virtual model. When displaying the screen of the virtual environment, the terminal displays the video frames of the at least one virtual model on the screen for an interaction object to check.
[0004] In related technologies, the video frames corresponding to the virtual model are directly displayed based on the initial video update frequency of the virtual model. The initial video update frequency of the virtual model is determined based on the ratio of the rendering size of the virtual model to the reference size.
Summary of the Invention
Problems to be Solved by the Invention
[0005] The embodiments of this application provide a method, apparatus, device, and storage medium for displaying video frames to improve the smoothness of video frame display. The technical solutions are as follows.
Means for Solving the Problems
[0006] According to one aspect, the embodiments of this application provide a method for displaying video frames, the method comprising: Obtaining a resource consumption index based on the initial video update frequency of at least one virtual model, wherein the resource consumption index indicates the amount of resources consumed by updating a video based on the initial video update frequency of the at least one virtual model, Obtaining the target video update frequency of the at least one virtual model based on the resource consumption index and the initial video update frequency, Displaying video frames corresponding to the at least one virtual model based on the target video update frequency.
[0007] According to another aspect, a video frame display device is provided, and the device includes: A first acquisition unit that obtains a resource consumption index based on the initial video update frequency of at least one virtual model, wherein the resource consumption index indicates the amount of resources consumed by updating a video based on the initial video update frequency of the at least one virtual model, A second acquisition unit that obtains the target video update frequency of the at least one virtual model based on 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.
[0008] According to another aspect, a computer device is provided, the computer device includes a processor and a memory, at least one computer program is stored in the memory, and when the at least one computer program is read and executed by the processor, the computer device realizes the video frame display method according to any one of the above items.
[0009] According to another aspect, a non-volatile computer-readable storage medium is further provided, in which at least one computer program is stored. The at least one computer program is read and executed by a processor to enable a computer to implement the method for displaying a video frame according to any one of the above items.
[0010] According to another aspect, a computer program product is further provided, which includes a computer program or computer instructions. The computer program or the computer instructions are read and executed by a processor to enable a computer to implement the method for displaying a video frame according to any one of the above items.
Advantages of the Invention
[0011] According to the technical solution provided by the embodiments of the present application, a video frame corresponding to at least one virtual model is displayed based on the target video update frequency of the at least one virtual model. The target video update frequency of the at least one virtual model is determined based on the initial video update frequency of the at least one virtual model while considering a resource consumption index. Global control effective for resource consumption can be performed based on the target video update frequency of the at least one virtual model, improving the smoothness of the display of video frames and further increasing the man-machine interaction rate.
Brief Description of the Drawings
[0012]
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7
Figure 8
Figure 9
Figure 10
Figure 11
Figure 12
Figure 13
Embodiments for Carrying out the Invention
[0013] In order to make the objectives, technical solutions and advantages of this application clearer, the embodiments of this application will be described in more detail below in conjunction with the drawings.
[0014] Terms related to the embodiments of this application will be introduced.
[0015] Virtual environment: When the application program runs on the terminal, it is the environment provided (or displayed), and this virtual environment is the environment for the activities of the created virtual objects. The virtual environment may be a two-dimensional virtual environment, a 2.5-dimensional virtual environment or a three-dimensional virtual environment. This virtual environment may be a simulation environment for the real world, or a semi-simulation semi-virtual environment, or even a full-virtual environment.
[0016] Virtual object: An object that can be active in a virtual environment. The virtual object may be a virtual character, a virtual animal, an anime character, etc. The interaction object controls the virtual object by using an external member or clicking on a touch display. In the virtual environment, each virtual object has its own shape and volume and occupies a part of the space in the virtual environment. Exemplarily, when the virtual environment is a three-dimensional virtual environment, the virtual object is a three-dimensional model established based on the video skeleton technology.
[0017] Virtual model: A model consisting of a skeleton in a virtual environment. The virtual model includes, but is not limited to, virtual objects, virtual props, virtual pets, etc. The terminal displays the virtual model by displaying the video of the virtual model, and the video of the virtual model is composed of a plurality of video frames. Each video frame in the video of the virtual model is obtained by performing complex logical calculations based on the relationship between the skeletons, and consumes a large amount of resources (for example, CPU (Central Processing Unit) resources). By controlling the video update frequency of the virtual model, the number of video frames by logical calculation 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): A video underclock optimization technology for a virtual model in UE4 (Unreal Engine 4). In some embodiments, URO explains the video update frequency. For example, URO1 updates the video once per frame of the screen, URO2 updates the video once per two frames of the screen, and so on by analogy.
[0020] Resource consumption: Resources consumed by the video update of the virtual model. For example, the consumed resources are the time taken by the occupied CPU. The higher the resource consumption, the longer the time taken by the CPU for the update of each frame screen.
[0021] In related technologies, a video frame corresponding to a virtual model is directly displayed based on the initial video update frequency of the virtual model. The initial video update frequency of the virtual model is determined based on the ratio of the rendering size of the virtual model to the reference size. Since the information by the method of displaying a video frame based on the initial video update frequency of the virtual model has limitations, it reduces the smoothness of the display of the video frame and results in a low human-machine interaction rate.
[0022] FIG. 1 is a schematic diagram of an implementation environment of a method for displaying a video frame provided by an embodiment of the present application. The implementation environment includes a terminal 11 and a server 12.
[0023] An application program that supports a virtual environment is installed and run on the terminal 11. The interaction object uses the terminal 11 to control the virtual object so that it can act in the virtual environment provided by the application program. Such activities include, but are not limited to, body posture adjustment, crawling, walking, running, cycling, jumping, driving, picking, shooting, attacking, throwing, position change, etc. In some embodiments, the terminal 11 is also referred to as an electronic device.
[0024] The embodiments of this application do not limit the application programs that support virtual environments. Exemplarily, application programs that support virtual environments include, but are not limited to, VR (Virtual Reality) application programs, AR (Augmented Reality) application programs, 3D map programs, game application programs, social application programs, interactive entertainment application programs, etc.
[0025] Exemplarily, game application programs include, but are not limited to, shooting games, MOBA (Multiplayer Online Battle Arena) games, SLG (Simulation Game), 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 that perform remote attacks using props.
[0026] In some embodiments, the application program that supports the virtual environment can support at least one of the Windows (registered trademark) operating system, Apple operating system, Android (registered trademark) operating system, IOS operating system, and Linux (registered trademark) operating system, and the application programs running on different operating systems can be connected to each other. In some embodiments, the application program that supports the virtual environment is an application program developed based on a 3D engine. In some embodiments, the application program that supports the virtual environment is a stand-alone application program or a network online application program.
[0027] Server 12 provides background services for the application program that supports the virtual environment installed on terminal 11. In one possible implementation, server 12 performs the main computing operations and terminal 11 performs the secondary computing operations, or server 12 performs the secondary computing operations and terminal 11 performs the main computing operations, or both server 12 and terminal 11 perform collaborative computing using a distributed computing architecture.
[0028] In one possible implementation, the terminal 11 is any one electronic product that performs human-machine interaction with interaction objects in one or more ways such as a keyboard, a touch panel, a touch screen, a remote control, voice interaction, or a handwriting device. For example, it can be 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 single server, or a server cluster composed of multiple servers, or a single 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. Other terminals or servers, whether conventional or future, should fall within the protection scope of this application if applicable to this application, and are hereby incorporated by reference.
[0030] The embodiments of this application provide a method for displaying video frames, and this method is applicable to the implementation environment of FIG. 1. Taking the application of this method to the terminal 11 as an example. As shown in FIG. 2, the method for displaying video frames provided by the embodiments of this application includes the following steps 201 to 203.
[0031] In step 201, based on the initial video update frequency of at least one virtual model, a resource consumption indicator is obtained, and the resource consumption indicator indicates the amount of resources consumed by updating the video based on the initial video update frequency of at least one virtual model.
[0032] At least one virtual model is a virtual model that displays video frames by considering resource consumption metrics in a virtual environment. The embodiments of the present application do not limit the number of at least one virtual model. Exemplarily, any of the at least one virtual models is a virtual model of a target category.
[0033] The embodiments of the present application do not limit the classification method of the virtual model categories, which may be set based on experience or flexibly adjusted based on the application scenario. Exemplarily, if all virtual models are classified into one category, at least one virtual model is all virtual models that display video frames on the same screen. Exemplarily, when the virtual models are classified into virtual object categories and virtual prop categories, if the target category is the virtual object category, 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 virtual model categories may have other classification methods, which are not limited to the embodiments of the present application.
[0034] In an exemplary embodiment, before the application program runs, each virtual model marks the category it belongs to with a unique character string, and then resource consumption is statistically analyzed with the category as the granularity.
[0035] During the operation process of the application program, the screen of the displayed virtual environment is continuously updated, and the method for displaying video frames provided by the embodiments of the present application occurs during the display process of the screen of the latest frame virtual environment. When displaying the screen of one frame of the virtual environment, at least one virtual model's video frame is displayed on the screen, and the embodiments of the present application introduce the realization process of displaying at least one virtual model's video frame. Here, when displaying the screen of one frame of the virtual environment, in addition to at least one virtual model's video frame, other virtual model's video frames or environmental elements, etc. may also be displayed on the screen, which are not limited by the embodiments of the present application. Unless otherwise specified, the screens mentioned in the embodiments of the present application are all screens of the virtual environment.
[0036] The initial video update frequency of at least one virtual model is the video update frequency of at least one virtual model that serves as the basis for obtaining the resource consumption index. The video update frequency indicates whether to update the video once for every several frame screens. If the video is updated once, it represents one new video frame. The new video frame is one video frame in the video. Exemplarily, if the video is updated once for every n (n is an integer greater than or equal to 1) frame screens, the video update frequency is denoted as UROn.
[0037] Before executing step 201, obtain the initial video update frequency of at least one virtual model. The principle of obtaining the initial video update frequency of each virtual model is the same. The process of obtaining the initial video update frequency of the first virtual model will be described as an example. The first virtual model is any one of the at least one virtual model.
[0038] Exemplarily, the method of obtaining the initial video update frequency of the first virtual model includes the step of setting the video update frequency of the first virtual model as the initial video update frequency of the first virtual model when displaying the screen of the previous frame virtual environment.
[0039] Exemplarily, the method of obtaining the initial video update frequency of the first virtual model is the step of setting the default video update frequency of the first virtual model as the 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 of obtaining the initial video update frequency of the first virtual model includes the step of determining the ratio of the first virtual model and setting the video update frequency corresponding to the ratio of the first virtual model as the initial video update frequency of the first virtual model. The ratio of the first virtual model is the ratio of the rendering size of the first virtual model to the reference size.
[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 the application scenario, and for different virtual models, the reference size may be the same or different. 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 the screen of the previous frame virtual environment is displayed. That is, the ratio of the first virtual model may continuously change as the screen of the virtual environment is updated. In this way, before the screen of each frame virtual environment is officially displayed, at least one initial video update frequency of the 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 statistically analyzed. Since the matching degree between the initial video update frequency of the virtual model determined in this way and the real-time display result of the video frame of the virtual model is high, the certainty of the initial video update frequency is high, and the certainty of the resource consumption index determined based on the initial video update frequency is improved.
[0042] Exemplarily, the terminal stores the correspondence between the ratio and the video update frequency. After determining the ratio of the first virtual model, based on the correspondence between the ratio and the video update frequency, the video update frequency corresponding to the ratio of the first virtual model is searched, and the searched video update frequency is used as the initial video update frequency of the first virtual model.
[0043] The correspondence between the ratio and the video update frequency is set based on experience or flexibly adjusted based on the application scenario, and the embodiments of the present application are not limited thereto. In the correspondence between the ratio and the video update frequency, the video update frequency corresponding to the first ratio is greater than or equal to the video update frequency corresponding to the 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, a correspondence relationship between a ratio range and a video update frequency is stored in the terminal. In this case, 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 based on the correspondence relationship between the ratio range and the video update frequency, search for the video update frequency corresponding to the ratio range in which the ratio of the first virtual model is located, 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, and the embodiments of the present application are not limited thereto. 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 greater than or equal to 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] Referring to the method for obtaining the initial video update frequency of the first virtual model, the initial video update frequency of at least one virtual model can be obtained. After obtaining the initial video update frequency of at least one virtual model, obtain a resource consumption index based on the initial video update frequency of at least one virtual model.
[0046] The resource consumption index indicates the amount of resources consumed by updating the video based on the initial video update frequency of at least one virtual model. Exemplarily, the greater the amount of resources consumed by updating the video based on the initial video update frequency of at least one virtual model, the more resources are consumed by displaying the video frames corresponding to at least one virtual model based on the initial video update frequency of at least one virtual model, and the worse the smoothness of the display of the video frames.
[0047] In one possible implementation, the method of obtaining a resource consumption metric based on the initial video update frequency of at least one virtual model includes obtaining the resource consumption sub-metrics of at least one virtual model and aggregating the resource consumption sub-metrics of at least one virtual model to obtain the resource consumption metric. There is a positive correlation between the resource consumption sub-metric of any one virtual model and the initial video update frequency of any one virtual model. That is, the higher the initial video update frequency of any one virtual model, the larger the resource consumption sub-metric of that virtual model, and the lower the initial video update frequency of any one virtual model, the smaller the resource consumption sub-metric of that virtual model. Exemplarily, the resource consumption sub-metric of any one virtual model indicates the amount of resources consumed by updating the video based on the initial video update frequency of that virtual model.
[0048] The principle of obtaining the resource consumption sub-metrics of at least one virtual model is the same. Taking the example of obtaining the resource consumption sub-metric of the first virtual model, the first virtual model is any one of the at least one virtual model.
[0049] Exemplarily, the method of obtaining the resource consumption sub-metric of the first virtual model includes determining the number of screen frames corresponding to the initial video update frequency of the first virtual model and using a positive number that has a negative correlation with the number of screen frames as the resource consumption sub-metric of the first virtual model. Exemplarily, taking the reciprocal of the number of screen frames corresponding to the initial video update frequency of the first virtual model as the resource consumption sub-metric of the first virtual model. Exemplarily, taking 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 positive number as the resource consumption sub-metric 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 frames of the screen 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 every 5-frame screen, the number of screen frames corresponding to the initial video update frequency of the first virtual model is 5.
[0051] Exemplarily, the default video update frequency of the first virtual model is to update the video once every 1-frame screen. The higher the number of screen frames corresponding to the initial video update frequency of the first virtual model, the greater the degree of decrease of the initial video update frequency of the first virtual model with respect 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] With reference to the method of obtaining the resource consumption sub-indicator of the first virtual model, the resource consumption sub-indicators of at least one virtual model can be obtained. After obtaining the resource consumption sub-indicators of at least one virtual model, the resource consumption sub-indicators of at least one virtual model are summarized to obtain the resource consumption indicator. Exemplarily, summarizing the resource consumption sub-indicators of at least one virtual model is to calculate the sum of the resource consumption sub-indicators of at least one virtual model. Exemplarily, summarizing the resource consumption sub-indicators of at least one virtual model is to perform a weighted sum on the resource consumption sub-indicators of at least one virtual model according to the weights of at least one virtual model, and the weights of at least one virtual model are set based on experience.
[0053] In step 202, based on the resource consumption indicator and the initial video update frequency, the target video update frequency of at least one virtual model is obtained.
[0054] After obtaining the resource consumption index, based on the resource consumption index and the initial video update frequency of at least one virtual model, obtain the target video update frequency of at least one virtual model. In this way, the process of obtaining the target video update frequency of at least one virtual model takes into account the resource consumption index, and effective global control can be performed on resource consumption based on the target video update frequency of at least one virtual model, avoiding the situation where the time taken for the display of video frames becomes too long due to excessive resource consumption, and improving the smoothness of the display of video frames.
[0055] In one possible implementation, the process of obtaining the target video update frequency of at least one virtual model based on the resource consumption index and the initial video update frequency includes the step of setting the initial video update frequency as the target video update frequency of at least one virtual model when the resource consumption index is below the resource consumption threshold.
[0056] The resource consumption threshold limits the maximum amount of resources consumed to update the video based on the video update frequency of at least one virtual model. The resource consumption threshold is a pre-arranged threshold.
[0057] In an exemplary embodiment, by setting the resource consumption thresholds corresponding to each category according to the configuration table, the resource consumption incurred by updating the videos of virtual models of each category using the resource consumption thresholds corresponding to each category is restricted. Exemplarily, all of the at least one virtual model are virtual models of the target category, and in this case, the resource consumption threshold is the resource consumption threshold corresponding to the target category.
[0058] In an exemplary embodiment, the resource consumption threshold restricts the maximum number of global virtual models that each frame screen permits to update the video. In an exemplary embodiment, the resource consumption threshold may also be referred to as a resource consumption budget, a video update budget, or the like.
[0059] When the resource consumption is below the resource consumption threshold, updating the video based on the initial video update frequency of at least one virtual model will not incur significant resource consumption. In this case, directly set the initial video update frequency of at least one virtual model to the target video update frequency of at least one virtual model. Here, setting the initial video update frequency of at least one virtual model to the target video update frequency of at least one virtual model means setting the initial video update frequency of each virtual model to the target video update frequency of each virtual model.
[0060] In one possible implementation, when the resource consumption indicator is greater than the resource consumption threshold, the process of obtaining the target video update frequency of at least one virtual model based on the resource consumption indicator and the initial video update frequency includes the following steps 1 to 3.
[0061] Step 1: Determine an adjustment coefficient based on the resource consumption indicator and the resource consumption threshold.
[0062] When the resource consumption indicator is greater than the resource consumption threshold, updating the video based on the initial video update frequency of at least one virtual model will incur significant resource consumption. In this case, by adjusting the initial video update frequency of at least one virtual model under the constraint of the resource consumption threshold, a first video update frequency with low resource consumption is obtained.
[0063] The process of adjusting the initial video update frequency of at least one virtual model is realized based on the adjustment coefficient, and the adjustment coefficient is determined based on the resource consumption indicator and the resource consumption threshold. In one possible implementation, the method of determining the adjustment coefficient based on the resource consumption indicator and the resource consumption threshold has the step of setting the ratio of the resource consumption indicator to the resource consumption threshold as the adjustment coefficient. Since the resource consumption indicator is greater than the resource consumption threshold, the adjustment coefficient is a coefficient greater than 1.
[0064] However, in some embodiments, the method for determining the adjustment coefficient based on the resource consumption index and the resource consumption threshold may be other methods, and the embodiments of the present application are not limited thereto. Exemplarily, the ratio of the resource consumption threshold to the resource consumption index is used as the adjustment coefficient. In this case, the adjustment coefficient is a coefficient less than 1.
[0065] Step 2: By adjusting the initial video update frequency based on the adjustment coefficient, obtain the first video update frequency of at least one virtual model.
[0066] After determining the adjustment coefficient, by adjusting the initial video update frequency of at least one virtual model based on the adjustment coefficient, obtain the first video update frequency of at least one virtual model. Exemplarily, for adjusting the initial video update frequency of each virtual model, the adjustment coefficient may also be referred to as a wide-area load distribution scale coefficient.
[0067] Here, by adjusting the initial video update frequency of each virtual model based on the adjustment coefficient respectively, obtain the 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 the same. Taking the adjustment of the initial video update frequency of the first virtual model based on the adjustment coefficient as an example for explanation. The first virtual model is any one of the at least one virtual model.
[0068] The method for adjusting the initial video update frequency of the first virtual model based on the adjustment coefficient is related to the method for determining the adjustment coefficient. 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, when the adjustment coefficient is the ratio of the resource consumption index to the resource consumption threshold, the method of adjusting the initial video update frequency of the 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, performing a rounding process on the product to obtain a target value, and setting the video update frequency corresponding to the number of screen frames being the target value as the first video update frequency of the first virtual model.
[0070] The method of performing the rounding process on the product is set based on experience or flexibly adjusted based on the application scenario, and the embodiments of the present application are not limited thereto. Exemplarily, the method of performing the rounding process on the product may be rounding up, rounding down, or even rounding to the nearest value. Taking rounding up as an example, the rounding process is performed on the product based on the Ceil function (rounding up function) to obtain the target value. After obtaining the target value, the video update frequency corresponding to the number of screen frames being 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 every two-frame screen (URO2) and the adjustment coefficient is 1.2, the number of screen frames corresponding to the initial video update frequency of the first virtual model is 2, 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, and after rounding up the product, if the obtained target value is 3, the video update frequency corresponding to the number of screen frames being 3 is set as the first video update frequency of the first virtual model. At this time, the determined first video update frequency of the first virtual model is to update the video once every three-frame screen (URO3).
[0072] The above takes as an example that the adjustment coefficient is the ratio of the resource consumption index to the resource consumption threshold, and introduces the process of adjusting the initial video update frequency of the first virtual model based on the adjustment coefficient. The embodiments of this application are not limited thereto. When the determination method of the adjustment coefficient is other methods, the process of adjusting the initial video update frequency of the first virtual model based on the adjustment coefficient may be other processes, as long as it is ensured that the first video update frequency of the adjusted first virtual model is lower than the initial video update frequency.
[0073] Referring to the method for obtaining the first video update frequency of the first virtual model, the first video update frequency of at least one virtual model can be obtained, and then step 3 is executed.
[0074] Exemplarily, the process of obtaining the first video update frequency of at least one virtual model based on the above step 1 and step 2 obtains the video update frequency based on the Load Balance URO (Load Balance Underclock Optimization Technology). Statistically global the resource consumption situation of the virtual models of the target category, and based on the pre-allocated resource consumption threshold, reduce the video update frequency according to the adjustment coefficient, and reduce 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: Based on the first video update frequency, obtain the target video update frequency of at least one virtual model.
[0076] Based on the first video update frequency, the process of obtaining the target video update frequency of at least one virtual model 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. Based on the first video update frequency of each virtual model, the principle of obtaining the target video update frequency of each virtual model is the same. Taking the process of obtaining the target video update frequency of the first virtual model based on the first video update frequency of the first virtual model as an example for explanation. The first virtual model is any one of at least one virtual model.
[0077] In one possible implementation, directly set the first video update frequency of the first virtual model as the target video update frequency of the first virtual model. The efficiency of this method is high.
[0078] In one possible implementation, the process of obtaining the target video update frequency of at least one virtual model based on the first video update frequency includes: when the first virtual model meets the first model selection condition and the first video update frequency of the first virtual model is below the reference video update frequency, setting the reference video update frequency as the target video update frequency of the first virtual model; and 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, setting the first video update frequency of the first virtual model as the target video update frequency of the first virtual model. This method further considers the first model selection condition on the basis of considering the adjustment coefficient, improving the certainty of the obtained target video update frequency of the first virtual model.
[0079] The first model selection condition is used to select virtual models. The first model selection condition is set based on experience or flexibly adjusted based on the application scenario, and is not limited to the embodiments of this application.
[0080] A virtual model that meets the first model selection condition is a virtual model with significant video presentation needs. Exemplarily, a virtual model that meets the first model selection condition is a virtual model whose initial video update frequency is greater than or equal to the reference video update frequency. The higher the initial video update frequency, the higher the importance of the virtual model. Exemplarily, a virtual model that meets the first model selection condition is called a high-importance virtual model, and a 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 the application scenario, and the embodiments of this application are not limited thereto. Exemplarily, the reference video update frequency is shown as URO5, and the initial video update frequency of one virtual model is shown as URO2. Since the video update frequency indicated by URO2 is higher than the video update frequency indicated by URO5, the virtual model meets the first model selection condition.
[0082] In some embodiments, further, by comparing the number of screen frames corresponding to the initial video update frequency of the virtual model with the screen frame number threshold, it is determined 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 screen frame number threshold, the virtual model meets the first model selection condition. The screen frame number threshold is set based on experience or flexibly adjusted based on the application scenario, and the embodiments of this application are not limited thereto. For example, the screen frame number threshold is 5.
[0083] Exemplarily, a virtual model that meets the first model selection condition may further be a virtual model whose ratio is greater than or equal to the ratio threshold. The ratio threshold is set based on experience or flexibly adjusted based on the application scenario, and the embodiments of this application are not limited thereto.
[0084] When the first virtual model meets the first model selection condition, the video expression needs of the first virtual model are high, and the target video update frequency of the first virtual model must be greater than or equal to 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 less than or equal to 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, the first video update frequency of the first virtual model is set as the target video update frequency of the first virtual model. That is, when the first virtual model meets the first model selection condition, the larger value of the first video update frequency and the reference video update frequency of the first virtual model is set as the target video update frequency of the first virtual model.
[0085] When the first virtual model does not meet the first model selection condition, the video expression needs of the first virtual model are low, and there is no need to limit the target video update frequency of the first virtual model. Therefore, the first video update frequency of the first virtual model can be directly set as the target video update frequency of the first virtual model.
[0086] After considering the adjustment coefficient, in order to ensure the video representation of virtual models with high importance, the first model selection condition is further considered. After adjustment based on the adjustment coefficient, since the number of virtual models is large, the obtained first video update frequency (i.e., the video update frequency obtained after load balancing underclock optimization) is significantly reduced. That is, the number of screen frames corresponding to the first video update frequency is significantly increased, and there is a risk that nearby virtual models will be overly underclocked. Therefore, for virtual models with high importance, by restricting the target video update frequency, the target video update frequency of virtual models with high importance is not less than the reference video update frequency. A nearby virtual model is a virtual model close to the virtual camera in the virtual environment, and the video representation needs of nearby virtual models are generally large. A virtual camera is a camera for shooting 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] Exemplarily, if the screen frame number threshold is 5, any virtual model among at least one virtual model whose number of screen frames corresponding to the initial video update frequency is 5 or less satisfies the first model selection condition, that is, any of them is a high-importance virtual model, and the number of screen frames corresponding to the target video update frequency of the virtual models in this part is limited to 5 or less. That is, the target video update frequency is at least to update the video once every 5-frame screen, thereby ensuring that the high-importance model updates the video at most once every 5 frames.
[0088] In step 203, based on the target video update frequency, video frames corresponding to at least one virtual model are displayed.
[0089] The target video update frequency is determined based on the initial video update frequency of at least one virtual model, taking into account the resource consumption index, enabling effective global control over resource consumption. It can effectively display video frames corresponding to at least one virtual model based on the target video update frequency, improve the smoothness of video frame display, and further improve the smoothness of screen updates.
[0090] The process of displaying video frames corresponding to at least one virtual model based on the target video update frequency is the process of displaying video frames corresponding to each virtual model based on the target video update frequency of each virtual model. Here, the video frames corresponding to each virtual model are displayed on the screen of the same frame virtual environment.
[0091] Based on the target video update frequency of each virtual model, the principle of displaying the video frames corresponding to each virtual model is the same. Taking the process of displaying the video frames corresponding to the first virtual model based on the target video update frequency of the first virtual model as an example for explanation. The first virtual model is any one of the at least one virtual model.
[0092] In one possible implementation form, the implementation process of displaying the video frames corresponding to the first virtual model based on the target video update frequency of the first virtual model directly includes the step of 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 meets certain conditions, 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 directly displaying a video frame corresponding to the first virtual model based on the target video update frequency of the first virtual model includes: when the target video update frequency of the first virtual model does not match the count value of the first virtual model, displaying the first video frame or the target video frame of the first virtual model; and when the target video update frequency of the first virtual model matches the count value of the first virtual model, displaying the second video frame of the first virtual model.
[0094] The first video frame is the latest displayed video frame 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, the first video frame has been displayed, and the second video frame has not been displayed yet. Since the calculation logic of the first video frame and the second video frame is complex, 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 attempting to display the second video frame, extracts and displays the second video frame from the cache.
[0095] The count value of the first virtual model is the count value possessed by the first virtual model. The count value possessed by the first virtual model indicates the number of unupdated screen frames of the video of the first virtual model. In an exemplary embodiment, the update method of the count value possessed by the first virtual model is as follows: that is, when a video frame in the video of the first virtual model is first displayed, the count value possessed by the first virtual model is 0, and if one screen has not displayed the next video frame of the said one video frame in the video of the first virtual model, add 1 to the count value possessed by the first virtual model.
[0096] When the target video update frequency of the first virtual model matches the count value of the first virtual model, the second video frame of the first virtual model is displayed. Exemplarily, that the target video update frequency of the first virtual model matches the count value of the first virtual model means that the count value of the first virtual model is greater than or equal to 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 4 or more, 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 that is currently the display target is the second video frame of the first virtual model. 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 that is currently the display target is not the second video frame of the first virtual model. 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 based on 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 method for determining the target video frame includes the steps of determining a candidate interpolation smoothed video frame based on the first video frame and the second video frame, and determining an interpolation smoothed video frame corresponding to the count value of the first virtual model from the candidate interpolation smoothed video frames, and setting the interpolation 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, based on the first video frame and the second video frame in the cache, an interpolated smoothed video frame is determined, and before displaying the second video frame after displaying the first video frame, the interpolated smoothed video frame is displayed and updated frame by frame, that is, it approaches a video effect without underclocking. The number of candidate interpolated smoothed video frames may be one or multiple. When the number of candidate interpolated smoothed video frames is one, directly use the one candidate interpolated smoothed video frame as the 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, the terminal stores the correspondence between the candidate interpolated smoothed video frames and the count values, and based on the correspondence, determines the interpolated smoothed video frame corresponding to the count value of the first virtual model from the candidate interpolated smoothed video frames.
[0100] Exemplarily, based on the first video frame and the second video frame in the cache, the number of determined candidate interpolated smoothed video frames is the same as 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 being calculated as the difference between the first video frame and the second video frame, and the time consumption for obtaining the candidate interpolated smoothed video frame by calculation is smaller than the time consumption for obtaining the first video frame and the second video frame by calculation. 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 embodiments of the present application, when the target video update frequency of the first virtual model does not match the count value of the first virtual model, the implementation form of displaying the first video frame or the target video frame of the first virtual model is not limited. Exemplarily, when the target video update frequency of the first virtual model does not match the count value of the first virtual model, the first video frame of the first virtual model is displayed. Exemplarily, when the target video update frequency of the first virtual model does not match the count value of the first virtual model, the target video frame is displayed.
[0104] Exemplarily, when 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 meet the second model selection condition, the first video frame of the first virtual model is displayed, and if the first virtual model meets the second model selection condition, the target video frame of the first virtual model is displayed.
[0105] The second model selection condition is used for the selection of the virtual model, and the second model selection condition is set based on experience or flexibly adjusted based on the application scenario, and the embodiments of the present application are not limited thereto. The second model selection condition may be the same as the first model selection condition or different from the first model selection condition.
[0106] A virtual model that meets the second model selection condition is a 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 the same as the first model selection condition, that is, a virtual model that meets the second model selection condition is a virtual model with large video presentation needs.
[0107] When the first virtual model meets the second model selection condition, by displaying the target video frame of the first virtual model, the adverse impact of underclocking on video presentation can be alleviated to a great extent. That is, for a virtual model with high importance, video interpolation smoothing is activated, and in the screen where the update is skipped, interpolation representation is performed for the high-importance virtual model by the cached first video frame and the second video frame, approaching the video effect without underclocking.
[0108] When the first virtual model does not meet the second model selection condition, the attention of the video presentation of the first virtual model is low, and the first video frame can be directly displayed.
[0109] In one possible implementation, based on the target video update frequency of the first virtual model, the implementation process of displaying the video frame corresponding to the first virtual model is as follows. When the first virtual model is not associated with other virtual models, directly display the video frame corresponding to the first virtual model based on the target video update frequency of the first virtual model. When the first virtual model is associated with the second virtual model, adjust the target video update frequency of the first virtual model to the video update frequency of the second virtual model to obtain the adjusted video update frequency of the first virtual model, and based on the adjusted video update frequency of the first virtual model, display the video frame corresponding to the first virtual model.
[0110] The second virtual model may be one of at least one virtual model, or may be one virtual model excluding at least one virtual model, and the embodiments of the present application are not limited thereto. The video update frequency of the second virtual model is the current latest video update frequency of the second virtual model. The terminal stores the association relationship between virtual models, determines whether the first virtual model is associated with other virtual models based on the association relationship, and when the first virtual model is associated with the second virtual model, adjusts the target video update frequency of the first virtual model to the video update frequency of the second virtual model. Exemplarily, the first virtual model being associated with the second virtual model corresponds to the first virtual model depending on the second virtual model.
[0111] In one possible implementation, after adjusting the target video update frequency of the first virtual model to the video update frequency of the second virtual model, the step of synchronizing the video update of the first virtual model and the video update of the second virtual model is further included by adjusting the count value of the first virtual model to the count value of the second virtual model.
[0112] By synchronizing the video update of the first virtual model and the video update of the second virtual model, the accuracy of video representation is guaranteed. After optimization, different virtual models may have different video update frequencies, but virtual models with an association relationship are required to match in video representation. For example, a virtual object and a virtual prop arranged on the virtual object are required to match in video representation. If the video update frequencies of virtual models with an association relationship are different, there may be a risk of misrepresentation.
[0113] Therefore, in the process of displaying video frames corresponding to the first virtual model based on the target video update frequency of the first virtual model, it is determined whether the first virtual model is associated with other virtual models. When the first virtual model is associated with the second virtual model, the count value of the first virtual model is adjusted to the count value of 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, thereby realizing underclock synchronization, that is, synchronizing the video update of the first virtual model and the video update of the second virtual model. Exemplarily, since the first virtual model is associated with the second virtual model, the first virtual model is called a child model and the second virtual model is called a parent model.
[0114] The details of realizing underclock synchronization are as follows: keep the update frequencies of the parent and child models synchronized, adopt the update frequency of the parent model for the child model, and align the count values of the parent and child models. Exemplarily, by aligning the count values of the parent and child models, the alignment of the update start frames of the parent and child models can be realized. The update start frame is the screen that first displays the latest video frame that has been displayed.
[0115] Exemplarily, the video update frequencies and update start frames of the parent model and the child model have four cases: when neither the video update frequencies nor the update start frames of the parent model and the child model match; when the video update frequencies of the parent model and the child model match but the update start frames do not match; when the video update frequencies of the parent model and the child model do not match but the update start frames match; when the video update frequencies and update start frames of the parent model and the child model match.
[0116] Figure 3 shows the video update synchronization status in the above four situations. In Figure 3, the screen where the video is updated is called the update frame, and the screen where the video is not updated is called the skip frame. As can be seen from Figure 3, when the video update frequencies and the update start frames of the parent model and the child model do not match, or when the video update frequencies of the parent model and the child model match but the update start frames do not match, or when the video update frequencies of the parent model and the child model do not match but the update start frames match, none of these are sufficient to completely synchronize the video updates of the parent model and the child model. Therefore, by adjusting the video update frequency of the child model to that of the parent model and adjusting the count value of the child model to that of the parent model, the effect of synchronizing video updates is achieved.
[0117] Exemplarily, Figure 4 shows the screen display effect in a situation where the video update frequencies and the update start frames of the parent model and the child model do not match. In Figure 4, the parent model is the virtual object 410, and the child model is the virtual prop 420. The video update frequency of the virtual object 410 is URO4, the video update frequency of the virtual prop 420 is URO7, and the update start frame of the virtual object 410 does not match the update start frame of the virtual prop 420. In Figure 4, when the problem that the virtual prop 420 detaches from the hand part of the virtual object 410 is significant, the video updates of the virtual object 410 and the virtual prop 420 are not synchronized.
[0118] Figure 5 shows the screen display effect in a situation where the video update frequencies of the parent model and the child model match but the update start frames do not match. In Figure 5, the parent model is the virtual object 510, and the child model is the virtual prop 520. The video update frequencies of both the virtual object 510 and the virtual prop 520 are URO4, and the update start frame of the virtual object 510 does not match the update start frame of the virtual prop 520. In Figure 5, when it is still possible to observe the problem that the virtual prop 520 detaches from the hand part of the virtual object 510, the video 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 video update frequencies and the update start frames of the parent model and the child model are all the same. In FIG. 6, the parent model is the virtual object 610, and the child model is the virtual prop 620. The video update frequency of the virtual object 610 and the video 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 has not detached from the hand part of the virtual object 610 and the screen representation is normal, the video 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, based on the adjusted video update frequency of the first virtual model, the video frame corresponding to the first virtual model is displayed. The realization principle of displaying the video frame 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 directly displaying the video frame corresponding to the first virtual model based on the target video update frequency of the first virtual model. Therefore, it is not elaborated here.
[0121] In an exemplary embodiment, when it is necessary to display the video frames of at least one virtual model, the above steps 201 to 203 are all executed. In an exemplary embodiment, the above steps 201 to 203 are executed to reduce the calculation amount only when the situation of the virtual model meets the reference conditions.
[0122] The embodiments of the present application do not limit the display method of video frames when the situation of the virtual model does not meet the reference conditions. Exemplarily, when the situation of the virtual model does not meet the reference conditions, the display of video frames is realized in 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 used as the initial video update frequency of at least one virtual model, and based on the initial video update frequency of at least one virtual model, the video frames corresponding to at least one virtual model are displayed.
[0123] Exemplarily, the ratio is also called the screen ratio, and the manner 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. The smaller the screen ratio, the lower the video update frequency. If the screen ratio is small, the virtual model is far 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 between the screen ratio and the number of screen frames is set in advance. 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 restrict the conditions for realizing the display of video frames based on the methods in steps 201 to 203. The reference conditions are set based on experience or flexibly adjusted based on the application scenario, and are not limited to the embodiments of the present application. Exemplarily, the reference conditions restrict the situation of at least one virtual model. Exemplarily, the reference conditions restrict the situations of all virtual models that display video frames on the same screen.
[0125] Take as an example that the reference condition restricts the situations of all virtual models that display video frames on the same screen. Exemplarily, that the situation of a virtual model meets the reference condition means that the number of all virtual models that display video frames on the same screen is greater than a first numerical threshold. Exemplarily, that the situation of a virtual model meets the reference condition means that the number of virtual models, among all virtual models that display video frames on the same screen, whose ratio is greater than a ratio threshold is greater than a second numerical threshold. Exemplarily, that the situation of a virtual model meets the reference condition means that the number of all virtual models that display video frames on the same screen is greater than a first numerical threshold, and the number of virtual models, among all virtual models, whose ratio is greater than a ratio threshold is greater than a second numerical threshold.
[0126] The first numerical threshold is greater than or equal to the second numerical threshold, and the first numerical threshold and the second numerical threshold are set based on experience or flexibly adjusted based on the application scenario, but this is not limited to the embodiments of the present application.
[0127] When there are few virtual models that display video frames on the same screen (the distribution situation of the virtual models in FIG. 7), in the display method of video frames in the related art, the URO optimization feature is continuously maintained, and underclock optimization is performed based on the ratio. For virtual models with a small ratio, the video is updated at a low frequency to reduce the time consumption caused by video updates. Exemplarily, virtual models with a small ratio are virtual models far from the virtual camera. Since such virtual models are 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, according to the order from near to far from the virtual camera, the video update frequencies on which the display of video frames of each virtual model is based are URO1, URO2, and URO3 respectively.
[0128] When there are many virtual models that display video frames on the same screen (the distribution status of the virtual models in FIG. 8), especially when the number of virtual models with a large ratio (i.e., close to the virtual camera) is large, using the video frame display method in the related art (i.e., the method of performing underclock optimization based on the ratio), the virtual models close to the virtual camera still update the video at a high video update frequency. For example, according to the order from close to far from the virtual camera, the video update frequencies serving as the basis for displaying the video frames of each virtual model are URO1, URO2, and URO3 respectively. As a result, the global video update pressure increases, and in scenarios such as when the number of virtual models close to the virtual camera is large, resource consumption increases, leading to heat generation of the terminal, further affecting the FPS, and possibly affecting the smoothness of the display of video frames and the smoothness of the operation of the application program.
[0129] By using the video frame display method provided by the embodiments of the present application, the performance expression of such scenarios can be effectively improved. The video frame display method provided by the embodiments of the present application is to globally statistically analyze the resource consumption indicators of virtual models every frame. When exceeding the allocated resource consumption threshold, further reduce the video update frequency of each virtual model, and perform video interpolation smoothing optimization on the virtual models that meet the first model selection condition, so as to avoid significant video performance problems caused by underclock. In this optimization method, according to the order from close to far from the virtual camera, the video update frequencies serving as the basis for displaying the video frames of each virtual model are optimized to URO2, URO4, and URO6 respectively, so that the time consumption for displaying the video frames of multiple virtual models on the same screen can be effectively controlled.
[0130] Exemplarily, with reference to FIG. 9 for the screen display effect in the video frame display method in the related art, and with reference to FIG. 10 for the screen display effect in the video frame display method of the embodiment of the present application. In FIGS. 9 and 10, the number of virtual models (referred to as short-distance virtual models) with a ratio greater than the ratio threshold is 20, and the initial video update frequency of these 20 virtual models is all URO1, that is, these 20 virtual models are all maintained to update the video once per frame screen. In this case, the time taken for each frame screen update of the application program is about 20 ms (milliseconds), and the FPS is 50.
[0131] When the resource consumption threshold is one virtual model, after performing load distribution initial adjustment (i.e., adjustment based on the constraint of the resource consumption threshold), the video update frequency of these 20 virtual models is all URO20. Since these 20 virtual models all meet the first model selection condition (i.e., all belong to high-importance models), it is not permitted that the video update frequency of high-importance models is below URO5. Otherwise, using the method provided by the embodiment of the present application, the target video update frequency of these 20 virtual models is all URO5, that is, the video is updated once every 5 frame screens. Based on such a target video update frequency to display video frames, the time taken for each frame screen update of the application program is about 15.6 ms, and the FPS is improved to 64. Compared with the related art, the time taken for each frame screen update is reduced by 4.4 ms, and the FPS is improved by 16. As can be seen from FIGS. 9 and 10, different video frame display methods result in different screen display effects.
[0132] Exemplarily, referring to FIG. 11 for the display process of video frames, before the application program runs, a resource consumption threshold corresponding to the target category is set. When displaying the Nth (N is an integer greater than or equal to 1) frame screen, at least one virtual model displays a video frame matching the Nth frame screen, and all of the at least one virtual model are virtual models of the target category. Based on the display result of the Nth frame screen, the ratio of at least one virtual model is calculated, and the video update frequency corresponding to the ratio of at least one virtual model is set as the initial video update frequency of at least one virtual model. Based on the initial video update frequency of at least one virtual model, a resource consumption index is obtained, 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, based on the initial video update frequency of at least one virtual model, a video frame corresponding to at least one virtual model is displayed, and the video frame corresponding to at least one virtual model is a video frame matching the (N + 1)th frame screen of at least one virtual model.
[0134] If the resource consumption index is greater than the resource consumption threshold, the ratio of the resource consumption index to the resource consumption threshold is used as an adjustment coefficient, and by adjusting the initial video update frequency of at least one virtual model based on the adjustment coefficient, the first video update frequency of at least one virtual model is obtained. Based on the first model selection condition and the first video update frequency of at least one virtual model, the target video update frequency of at least one virtual model is obtained to ensure the performance. By synchronizing the video update frequency and the count value among related models, the performance is ensured. Based on the latest video update frequency of at least one virtual model, a video frame corresponding to at least one virtual model is displayed, and the video frame corresponding to at least one virtual model is a video frame matching the (N + 1)th frame screen of at least one virtual model.
[0135] Here, at least one virtual model is a model of the target category, and for the case where the virtual models that display video frames on the same screen further include virtual models of other categories except the target category, regarding the display process of the video frames of the virtual models of other categories, it is realized by referring to the process provided by the embodiments of the present application, so as to ensure the display effect of the video frames of all virtual models that display video frames on the same screen.
[0136] In the embodiments of the present application, based on the URO video optimization technology of the UE4 engine itself, load balancing optimization characteristics are added, and important parameters such as the resource consumption budget of a certain category of virtual models, the minimum video update frequency of high-importance models, and the conditions for video interpolation smoothing are arranged and adjusted. On the premise of ensuring video performance, the resources consumed for video updates in multi-play scenarios can be effectively controlled, the time taken to display the video frames of multiple virtual models on the same screen can be effectively reduced, the balance between performance and representation can be achieved, the FPS can be improved, and the experience of the application program can be enhanced. For example, if the application program is a game application program, the game experience can be enhanced.
[0137] In the video frame display method provided by the embodiments of the present application, the video frames corresponding to at least one virtual model are displayed based on the target video update frequency of at least one virtual model, and the target video update frequency of at least one virtual model is determined by considering the resource consumption index based on the initial video update frequency of at least one virtual model. Effective global control over resource consumption can be performed based on the target video update frequency of at least one virtual model, the smoothness of the video frame display can be improved, and the human-machine interaction rate can be further increased.
[0138] In the process of determining the target video update frequency in consideration of the resource consumption index, the resource consumption index is compared with the resource consumption threshold. When the resource consumption index is greater than the resource consumption threshold, an adjustment coefficient is determined based on both of them, and the video update frequency is reduced according to the adjustment coefficient, so as to further reduce the amount of resources consumed for updating the video, achieve the purpose of reducing the time consumption of global video updates, and improve the FPS.
[0139] Furthermore, by restricting the target video update frequency of the virtual model with high importance in consideration of the first model selection condition, the target video update frequency of the virtual model with high importance becomes greater than or equal to the reference video update frequency, ensuring the video representation of the virtual model with high importance.
[0140] Also, when displaying the video frame of the virtual model based on the target video update frequency of the virtual model, the target video update frequency of the virtual model is compared with the count value of the virtual model. When the target video update frequency of the virtual model does not match the count value of the virtual model, the target video frame determined based on the first video frame, the second video frame and the count value of the virtual model is displayed. The target video frame is an interpolation smoothing video frame between the first video frame and the second video frame. By displaying the target video frame, it is close to the video effect of updating every frame, that is, close to the video effect without underclocking, improving the display effect of the video frame.
[0141] Also, it is determined whether the virtual model is associated with other virtual models. When the virtual model is associated with other virtual models, the target video update frequency of the virtual model is adjusted to the video update frequency of the other virtual models, and the count value of the virtual model is adjusted to the count value of the other virtual models, so as to achieve the synchronization of underclocking, that is, synchronize the video update of the virtual model and the video update of the associated virtual model, ensuring the accuracy of the video representation.
[0142] Referring to FIG. 12, the embodiment of the present application provides a video frame display device, and the device includes A first acquisition unit 1201 that acquires a resource consumption index based on the initial video update frequency of at least one virtual model, where the resource consumption index indicates the amount of resources consumed by updating a video based on the initial video update frequency of at least one virtual model. A second acquisition unit 1202 that acquires the target video update frequency of at least one virtual model based on the resource consumption index and the initial video update frequency. A display unit 1203 that displays video frames corresponding to at least one virtual model based on the target video update frequency.
[0143] In one possible implementation, 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, and adjusts the initial video update frequency based on the adjustment coefficient to obtain the first video update frequency of at least one virtual model, and acquires the target video update frequency of at least one virtual model based on the first video update frequency.
[0144] In one possible implementation, when the first virtual model meets the first model selection condition and the first video update frequency of the first virtual model is below the reference video update frequency, the second acquisition unit 1202 sets the reference video update frequency as the target video update frequency of the first virtual model, where the first virtual model is any one of at least one virtual model.
[0145] In one possible implementation, 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 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, where the first virtual model is any one of at least one virtual model.
[0146] In one possible implementation, the adjustment coefficient is the ratio of the resource consumption index to the resource consumption threshold. 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, performs a rounding process on the product to obtain a target value. The first virtual model is any one of at least one virtual model, and the video update frequency corresponding to the number of screen frames being the target value is set as the first video update frequency of the first virtual model.
[0147] In one possible implementation, when the resource consumption index is less than or equal to the resource consumption threshold, the second acquisition unit 1202 sets the initial video update frequency as the target video update frequency of at least one virtual model.
[0148] In one possible implementation, when the target video update frequency of the first virtual model does not match the count value of the first virtual model, the display unit 1203 displays the first video frame or the target video frame of the first virtual model. The first virtual model is any one of at least one virtual model. The first video frame is the latest displayed video frame 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. The second video frame is the next video frame of the first video frame in the video of the first virtual model.
[0149] In one possible implementation, when the first virtual model does not meet the second model selection condition, the display unit 1203 displays the first video frame of the first virtual model. When the first virtual model meets the second model selection condition, the display unit 1203 displays the target video frame of the first virtual model.
[0150] In one possible implementation, the display unit 1203 further determines a candidate interpolation smoothing video frame based on the first video frame and the second video frame, determines an interpolation smoothing video frame corresponding to the count value of the first virtual model from the candidate interpolation smoothing video frames, and sets the interpolation smoothing video frame corresponding to the count value of the first virtual model as the target video frame of the first virtual model.
[0151] In one possible implementation, when the target video update frequency of the first virtual model matches the count value of the first virtual model, the display unit 1203 displays the second video frame of the first virtual model. The first virtual model is any one of at least one virtual model. The second video frame is the next video frame of the first video frame in the video of the first virtual model, and the first video frame is the latest displayed video frame in the video of the first virtual model.
[0152] In one possible implementation, when the first virtual model is associated with the second virtual model, the display unit 1203 adjusts the target video update frequency of the first virtual model to the video update frequency of the second virtual model to obtain the adjusted video update frequency of the first virtual model. The first virtual model is any one of at least one virtual model. Based on the adjusted video update frequency of the first virtual model, the display unit 1203 displays the video frame corresponding to the first virtual model.
[0153] In one possible implementation, the display unit 1203 further synchronizes the video update of the first virtual model and the video update of 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, the first acquisition unit 1201 acquires resource consumption sub-indicators of at least one virtual model, and there is a positive correlation between the resource consumption sub-indicator of any one virtual model and the initial video update frequency of any one virtual model. The resource consumption sub-indicators of at least one virtual model are summarized to obtain a resource consumption indicator.
[0155] In one possible implementation, the first acquisition unit 1201 determines the number of screen frames corresponding to the initial video update frequency of the first virtual model. The first virtual model is any one of at least one virtual model, and a positive number having a negative correlation with the number of screen frames is used as the resource consumption sub-indicator of the first virtual model.
[0156] In one possible implementation, the first acquisition unit 1201 further determines the ratio of the first virtual model. The first virtual model is any one of at least one virtual model. The ratio of the first virtual model is the ratio of the rendering size of the first virtual model to the reference size, and the video update frequency corresponding to the ratio of the first virtual model is used as the initial video update frequency of the first virtual model.
[0157] In one possible implementation, the resource consumption threshold is the resource consumption threshold corresponding to the target category, and all of at least one virtual model are virtual models of the target category.
[0158] In one possible implementation, when the situation of the virtual model meets the reference condition, the first acquisition unit 1201 acquires a resource consumption index based on the initial video update frequency of at least one virtual model. The situation of the virtual model meeting the reference condition includes that the number of all virtual models displaying video frames on the same screen is greater than a first number threshold, the number of virtual models with a ratio greater than a ratio threshold among all virtual models displaying video frames on the same screen 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 with a ratio greater than the ratio threshold among all virtual models is greater than the second number threshold, and the ratio of any one virtual model is the ratio of the rendering size of any one virtual model to the reference size.
[0159] According to the video frame display device provided by the embodiments of the present application, the video frames corresponding to at least one virtual model are displayed based on the target video update frequency of at least one virtual model. The target video update frequency of at least one virtual model is determined by considering the resource consumption index based on the initial video update frequency of at least one virtual model. Effective global control over resource consumption can be performed based on the target video update frequency of at least one virtual model, improving the smoothness of video frame display and further increasing the man-machine interaction rate.
[0160] In the process of determining the target video update frequency by considering the resource consumption index, the resource consumption index is compared with a resource consumption threshold. When the resource consumption index is greater than the resource consumption threshold, an adjustment coefficient is determined based on both of them, the video update frequency is reduced according to the adjustment coefficient, and further, the amount of resources consumed for updating the video is reduced, achieving the purpose of reducing the time consumption of global video updates and improving the FPS.
[0161] Furthermore, by restricting the target video update frequency of the virtual model with high importance in consideration of the first model selection condition, the target video update frequency of the virtual model with high importance becomes equal to or higher than the reference video update frequency, ensuring the video representation of the virtual model with high importance.
[0162] Also, when displaying the video frames of the virtual model based on the target video update frequency of the virtual model, compare the target video update frequency of the virtual model with the count value of the virtual model. If the target video update frequency of the virtual model does not match the count value of the virtual model, display the target video frame determined based on the first video frame, the second video frame, and the count value of the virtual model. The target video frame is an interpolation smoothed video frame between the first video frame and the second video frame. By displaying the target video frame, it is close to the video effect of updating every frame, that is, close to the video effect of not underclocking, improving the display effect of the video frame.
[0163] Also, determine whether the virtual model is associated with other virtual models. If the virtual model is associated with other virtual models, adjust the target video update frequency of the virtual model to the video update frequency of the other virtual models and adjust the count value of the virtual model to the count value of the other virtual models to achieve underclock synchronization, that is, synchronize the video update of the virtual model with the video update of the associated virtual model to ensure the accuracy of the video representation.
[0164] Here, when the device provided by the above embodiments realizes its functions, only the division of the above functional units is taken as an example for explanation. In actual application, the above functions are allocated to different functional units based on needs, that is, the internal structure of the device is divided into different functional units to complete all or part of the functions described above. Also, the device provided by the above embodiments belongs to the same concept as the method embodiments. For its specific implementation process, refer to the method embodiments and no redundant description is provided here.
[0165] FIG. 13 is a schematic structural 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, or an in-vehicle terminal. The terminal may also be called by other names such as a user device, a portable terminal, a laptop terminal, a desktop terminal, etc.
[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 quad-core processor, an octa-core processor, etc. The processor 1301 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor 1301 includes a processor that processes data in the wake-up state, a main processor also called a CPU, and a coprocessor that is a low-power consumption processor that processes data in the standby state. In some embodiments, a GPU (Graphics Processing Unit) is integrated into the processor 1301, and the GPU performs rendering and drawing of the content to be displayed on the display. In some embodiments, the processor 1301 further includes an AI (Artificial Intelligence) processor, and the AI processor processes computing operations related to machine learning.
[0168] The memory 1302 includes one or more computer-readable storage media, and the computer-readable storage media are non-transitory. The memory 1302 may further include high-speed random access memory and non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 1302 stores at least one instruction, and the at least one instruction is executed by the processor 1301 to cause the terminal to implement the method for displaying video frames provided by the method embodiments in this application.
[0169] In some embodiments, the terminal may further include a display 1305.
[0170] The display 1305 displays a UI (User Interface). The UI includes graphics, text, icons, videos, and any combination thereof. When it is a touch display, the display 1305 further has the ability to collect touch signals on the surface of the display 1305 or above the surface. The touch signals are input to the processor 1301 as control signals for processing. In this case, the display 1305 further provides virtual buttons and / or a virtual keyboard, also called soft buttons and / or a soft keyboard. In some embodiments, there is one display 1305, which is provided on the front panel of the terminal. In some other embodiments, there are at least two displays 1305, which are respectively provided on different surfaces of the terminal or designed to be folded. In some other embodiments, the display 1305 is a flexible display, which is provided on the curved surface or the folding surface of the terminal. Further, the display 1305 is installed on an irregular graphic that is non-rectangular, that is, an irregular-shaped screen. The display 1305 is manufactured from materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode). Exemplarily, a video frame corresponding to at least one virtual model is displayed by the display 1305.
[0171] As can be understood by those skilled in the art, the structure in FIG. 13 does not limit the terminal, and it may include more or fewer components than shown, or some components may be combined, or different components may be adopted and arranged.
[0172] In an exemplary embodiment, a non-volatile computer-readable storage medium is further provided. At least one computer program is stored in the non-volatile computer-readable storage medium. By being read and executed by a processor of a computer device, the at least one computer program causes the computer to implement any one of the above video frame display methods.
[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, or the like.
[0174] In an exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program or computer instructions. By being read and executed by a processor, the computer program or computer instructions cause the computer to implement any one of the above video frame display methods.
[0175] Here, terms such as "first" and "second" in this application do not describe a specific order or sequence, but are used to distinguish similar objects. Where appropriate, such data may be exchanged with each other so that the embodiments of this application described herein can be implemented in an order other than that shown or described in the specification. The embodiments described in the above exemplary embodiments do not represent all embodiments consistent with this application. They are only examples of devices and methods consistent with some aspects of this application.
[0176] As used herein, "a plurality of" refers to two or more. "And / or" describes the relationship between related objects and indicates the existence of 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 are in an "or" relationship.
[0177] The above does not limit this application and is only an exemplary embodiment of this application. Any modifications, equivalent substitutions, improvements, etc. made within the principles of this application are all included within the protection scope of this application.
Claims
1. A method for displaying video frames, the method being executed by an electronic device, the method comprising: 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; 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; displaying video frames corresponding to the at least one virtual model based on the target video update frequency, the method comprising: 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, the step comprising: when the resource consumption index is greater than a resource consumption threshold, determining an adjustment coefficient based on the resource consumption index and the resource consumption threshold; obtaining a first video update frequency of the at least one virtual model by adjusting the initial video update frequency based on the adjustment coefficient; obtaining a target video update frequency of the at least one virtual model based on the first video update frequency, the method comprising:
2. The step of obtaining a target video update frequency of the at least one virtual model based on the first video update frequency, the step comprising: when a first virtual model meets a first model selection condition and the first video update frequency of the first virtual model is less than or equal to a reference video update frequency, setting the reference video update frequency as the target video update frequency of the first virtual model, the first virtual model being any one of the at least one virtual model, the method according to claim 1.
3. The step of obtaining a target video update frequency of the at least one virtual model based on the first video update frequency, the step comprising: If 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 if the first virtual model does not meet the first model selection condition, the step of setting the first video update frequency of the first virtual model to the target video update frequency of the first virtual model, where the first virtual model is any one of the at least one virtual model, is included in the method according to claim 1.
4. The adjustment coefficient is the ratio of the resource consumption index to the resource consumption threshold. By adjusting the initial video update frequency based on the adjustment coefficient, the step of obtaining the first video update frequency of the at least one virtual model is as follows: 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, where the first virtual model is any one of the at least one virtual model, and The step of setting the video update frequency corresponding to the number of screen frames that is the target value as the first video update frequency of the first virtual model, is included in the method according to claim 1.
5. Based on the resource consumption index and the initial video update frequency, the step of obtaining the target video update frequency of the at least one virtual model is as follows: If the resource consumption index is less than or equal to the resource consumption threshold, the method according to claim 1 includes the step of setting the initial video update frequency as the target video update frequency of the at least one virtual model.
6. A method for displaying video frames, the method being executed by an electronic device, and the method includes: Obtaining a resource consumption index based on the initial video update frequency of at least one virtual model, where the resource consumption index indicates the amount of resources consumed by updating a video based on the initial video update frequency of the at least one virtual model, and Based on the resource consumption index and the initial video update frequency, obtaining the target video update frequency of the at least one virtual model, and Displaying video frames corresponding to the at least one virtual model based on the target video update frequency. Based on the target video update frequency, the step of displaying video frames corresponding to the at least one virtual model is When the target video update frequency of the first virtual model does not match the count value of the first virtual model, the step of displaying the first video frame or the target video frame of the first virtual model, where the first virtual model is any one of the at least one virtual model, includes The first video frame is the latest displayed video frame 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 of the first video frame in the video of the first virtual model.
7. The step of displaying the first video frame or the target video frame of the first virtual model is When the first virtual model does not meet the second model selection condition, the step of displaying the first video frame of the first virtual model; and When the first virtual model meets the second model selection condition, the step of displaying the target video frame of the first virtual model. The method according to claim 6 includes
8. Before displaying the target video frame of the first virtual model, the method further includes Determining candidate interpolated smoothed video frames based on the first video frame and the second video frame; and 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. The method according to claim 7 further includes
9. A method for displaying video frames, the method being executed by an electronic device, the method including Obtaining a resource consumption indicator based on the initial video update frequency of at least one virtual model, where the resource consumption indicator indicates the amount of resources consumed by updating the video based on the 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; displaying video frames corresponding to the at least one virtual model based on the target video update frequency, including: The step of displaying video frames corresponding to the at least one virtual model based on the target video update frequency includes: when the target video update frequency of the first virtual model matches the count value of the first virtual model, displaying a second video frame of the first virtual model, where the first virtual model is any one of the at least one virtual model, the second video frame is the video frame next to the first video frame in the video of the first virtual model, and the first video frame is the latest displayed video frame in the video of the first virtual model. The method includes this step.
10. A method for displaying video frames, which is executed by an electronic device and includes: obtaining a resource consumption index based on the initial video update frequency of at least one virtual model, where the resource consumption index indicates the amount of resources consumed by updating a video based on the 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; displaying video frames corresponding to the at least one virtual model based on the target video update frequency, including: The step of displaying video frames corresponding to the at least one virtual model based on the target video update frequency includes: when the first virtual model is associated with the second virtual model, obtaining an 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, where the first virtual model is any one of the at least one virtual model. A method including the step of displaying a video frame corresponding to the first virtual model based on the updated video frequency of the first virtual model after adjustment.
11. After adjusting the target video update frequency of the first virtual model to the video update frequency of the second virtual model, the method includes: The method according to claim 10, further including the step of adjusting the count value of the first virtual model to the count value of the second virtual model so that the video update of the first virtual model is synchronized with the video update of the second virtual model.
12. A method for displaying a video frame, the method being executed by an electronic device, the method including: Obtaining a resource consumption index based on the initial video update frequency of at least one virtual model, the resource consumption index indicating the amount of resources consumed by updating a video based on the 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; Displaying a video frame corresponding to the at least one virtual model based on the target video update frequency, including: The step of obtaining the resource consumption index based on the initial video update frequency of the at least one virtual model includes: 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 the initial video update frequency of any one virtual model are in a positive correlation; A method including summarizing the resource consumption sub-indices of the at least one virtual model to obtain the resource consumption index.
13. The step of obtaining the resource consumption sub-index of the at least one virtual model includes: Determining the number of screen frames corresponding to the initial video update frequency of the first virtual model, wherein the first virtual model is any one of the at least one virtual model; The method according to claim 12, further including setting a positive number in a negative correlation with the number of screen frames as the resource consumption sub-index of the first virtual model.
14. A method for displaying a video frame, the method being executed by an electronic device, the method including: Obtaining a resource consumption index based on the initial video update frequency of at least one virtual model, wherein the resource consumption index indicates the amount of resources consumed by updating a video based on the 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, Displaying video frames corresponding to the at least one virtual model based on the target video update frequency, and Before obtaining the resource consumption index based on the initial video update frequency of the at least one virtual model, the method further includes: Determining a ratio of a first virtual model, wherein the first virtual model is any one of the at least one virtual model, and the ratio of the first virtual model is a ratio of the rendering size of the first virtual model to a reference size, Setting the video update frequency corresponding to the ratio of the first virtual model as the initial video update frequency of the first virtual model.
15. The method according to claim 1, wherein the resource consumption threshold is a resource consumption threshold corresponding to a target category, and all of the at least one virtual model are virtual models of the target category.
16. A method for displaying video frames, the method being executed by an electronic device, the method including: Obtaining a resource consumption index based on the initial video update frequency of at least one virtual model, wherein the resource consumption index indicates the amount of resources consumed by updating a video based on the 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, Displaying video frames corresponding to the at least one virtual model based on the target video update frequency, and The step of obtaining the resource consumption index based on the initial video update frequency of the at least one virtual model is: When the situation of the virtual model satisfies the reference condition, it includes the step of obtaining the resource consumption index based on the initial video update frequency of the at least one virtual model. That the situation of the virtual model satisfies the reference condition means the number of all virtual models displaying video frames on the same screen is greater than a first number threshold, the number of virtual models with a ratio greater than a ratio threshold among all virtual models displaying video frames on the same screen is greater than a second number threshold, and 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 with a ratio greater than the ratio threshold among all the virtual models is greater than the second number threshold. includes any one of The ratio of any one virtual model is the ratio of the rendering size of the any one virtual model to the reference size.
17. A display device for video frames, the device comprising a first acquisition unit that acquires a resource consumption index based on the initial video update frequency of at least one virtual model, where the resource consumption index indicates the amount of resources consumed by updating the video based on the initial video update frequency of the at least one virtual model. a second acquisition unit that acquires the target video update frequency of the at least one virtual model based on 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. The second acquisition unit When the resource consumption index is greater than a resource consumption threshold, determines an adjustment coefficient based on the resource consumption index and the resource consumption threshold. Obtains the first video update frequency of the at least one virtual model by adjusting the initial video update frequency based on the adjustment coefficient. A device that obtains the target video update frequency of the at least one virtual model based on the first video update frequency.
18. A computer device, the computer device includes a processor and a memory, at least one computer program is stored in the memory, and by being read and executed by the processor, the at least one computer program causes the computer device to implement the method for displaying video frames according to any one of claims 1 to 16.
19. A computer program, by being read and executed by a processor, the computer program causes a computer to implement the method for displaying video frames according to any one of claims 1 to 16.
Citation Information
Patent Citations
Game program, recording medium, and computer device
JP2011186834A
Controlling animation frame rate of applications
US20110096077A1